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

Ira Weiny weiny2 at llnl.gov
Thu Jan 22 11:23:46 PST 2009


On Wed, 21 Jan 2009 12:33:59 +0200
Sasha Khapyorsky <sashak at voltaire.com> wrote:

> On 16:41 Tue 23 Dec     , Ira Weiny wrote:
> > 
> > +#define        IBND_ERROR(...) \
> > +       { \
> > +               fprintf(stderr, "%s:%d; ", __FILE__, __LINE__); \
> > +               fprintf(stderr, __VA_ARGS__); \
> > +       }
> 
> As far as know macro like this (using '##' for var args and without
> breaking this in two) will work fine with both gcc and VC:
> 
> #define IBND_ERROR(fmt, ...) \
> 	fprintf(stderr, "%s:%d: " fmt, __FILE__, __LINE__, ## __VA_ARGS__)
> 

It was my understanding we were going for C99 compliance.  If this is not the
case I will change it, I prefer the ##.

Ira




More information about the general mailing list