C99 variadic macros
Stefan Farfeleder
stefan at fafoe.narf.at
Thu Feb 5 08:46:44 PST 2004
Hi,
I went through the source tree and converted all occurrences of
GNU-style variadic macros to C99 compliant ones in !contrib code.
For macros that (ab)use string concatenation like
#define foo(fmt, args...) printf("%s: " fmt "\n", __func__, ##args)
three printf's must be used. As almost all variadic macros are used for
debugging, this shouldn't matter much. Two occurrences
(src/lib/libypclnt/ypclnt.h and src/sys/dev/ichsmb/ichsmb.c) remain
since they can't be converted easily and are already protected by
defined(__GNUC__).
http://www.ten15.org/~stefanf/FreeBSD/vamacro.diff
Cheers,
Stefan Farfeleder
More information about the freebsd-arch
mailing list