Standard C-macro scripting
Stefan Farfeleder
stefan at fafoe.narf.at
Wed Dec 14 02:18:51 PST 2005
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
More information about the freebsd-hackers
mailing list