On Sun, 13 Jun 2010, Rainer Jung wrote:
I think Stefan needs uses C99 in include/http_log.h via variadic macros (__VA_ARGS__). There, if the compiler is C99, the call to the log function is surrounded with an "if" checking the log level first (for efficiency). If the compiler is not C99, then it will jump always into the log function and only check the log level there.

Exactly.


gcc when not used in C99 mode has another idiom for variadic macros, see e.g.

http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Variadic-Macros.html#Variadic-Macros

But that way is not standardized.

If we want to support autoconf 2.59, it seems much easier to just backport the autoconf macro. And in that way, non-gcc users would benefit as well.

Reply via email to