***SPAM*** Re: [ofa-general] [PATCH V2 1/3] Create a new library libibnetdisc

Jason Gunthorpe jgunthorpe at obsidianresearch.com
Tue Dec 23 10:43:31 PST 2008


On Tue, Dec 23, 2008 at 10:29:02AM -0800, Al Chu wrote:

> > +#define	IBND_DEBUG(str, args...) \
> > +	if (ibdebug) printf("%s:%d; "str, __FILE__, __LINE__, ##args)
> > +#define	IBND_ERROR(str, args...) \
> > +	fprintf(stderr, "%s:%d; "str, __FILE__, __LINE__, ##args)
> 
> I believe the "args ..." and "##args" are only for gcc.  Not sure how
> much this portability issue matters for OFED.  Personally, I always
> do

Right that format is an obsolete gcc extension. Ira, it should be

     #define debug(format, ...) fprintf (stderr, format, __VA_ARGS__)

Which is how C99 standardized varadic macros.

Jason



More information about the general mailing list