Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Feb 2004 17:46:40 +0100
From:      Stefan Farfeleder <stefan@fafoe.narf.at>
To:        arch@freebsd.org
Subject:   C99 variadic macros
Message-ID:  <20040205164639.GC602@wombat.fafoe.narf.at>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040205164639.GC602>