Date: Wed, 14 Dec 2005 11:18:46 +0100 From: Stefan Farfeleder <stefan@fafoe.narf.at> To: Hans Petter Selasky <hselasky@c2i.net> Cc: freebsd-hackers@freebsd.org Subject: Re: Standard C-macro scripting Message-ID: <20051214101844.GE608@wombat.fafoe.narf.at> In-Reply-To: <200512131936.11640.hselasky@c2i.net> References: <200512131936.11640.hselasky@c2i.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Dec 13, 2005 at 07:36:10PM +0100, Hans Petter Selasky wrote: > Hi, > > What do you think about defining the following macros like this: > > #ifndef NOT > #define NOT(arg) _NOT(YES arg(() NO)) > #define _NOT(args...) args > #endif If you're interested in standards conforming code (as you seem to imply in the subject), use this instead: #define _NOT(...) __VA_ARGS__ Stefan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051214101844.GE608>