tcpdump mailing list archives

Re: Creeping GCC'sims in tcpdump


From: Darren Reed <darrenr () reed wattle id au>
Date: Tue, 13 Apr 2004 01:14:10 +1000 (EST)

In some email I received from Brian Ginsbach, sie wrote:
The following in netdissect.h seems like a bad thing to do.
 
#define ND_PRINT(fmt, args...) (*ndo->ndo_printf)(ndo, fmt, ##args)
 
Not all compilers/preprocessors support variable argument macros
like GCC.  Compiling tcpdump shouldn't require GCC or a C99 compiler.
This macro is only used once in print-eap.c.  Its use should
be nipped in the bud.

I agree that in something such as tcpdump, gcc-isms should be heavily
discouraged, however, I'm not sure about the C99 compiler bit.  In time,
using C99isms will be like using C89isms (or ANSI C.)  For many of us,
the only C99 compiler we have access to is going to be gcc, and whilst
we can equate requiring C99 to requiring gcc, they're not quite the same.

Hmmm, so, what am I trying to say ?

C99 is coming on 5 years old and continuing to object to it will grow
old in time... install a modern O/S and install a modern development
suite.

Cheers,
Darren
-
This is the tcpdump-workers list.
Visit https://lists.sandelman.ca/ to unsubscribe.


Current thread: