S
Santa Claus
I have the following problem:
I would like for a piece of code to be compiled only if a certain macro
has been defined AND has some specific value. Let me illustrate:
#ifdef SYMBOL
f() ;
#endif
will compile the f() line whenever SYMBOL is defined. Thus, if I have
compiled the file where all this stuff is contained with
-DSYMBOL=1
then f() will be compiled. It will also be compiled if I use
-DSYMBOL=
where no specific value follows the equal sign.
How can I arrange things so that f() does not get compiled in this latter
case?
I would like for a piece of code to be compiled only if a certain macro
has been defined AND has some specific value. Let me illustrate:
#ifdef SYMBOL
f() ;
#endif
will compile the f() line whenever SYMBOL is defined. Thus, if I have
compiled the file where all this stuff is contained with
-DSYMBOL=1
then f() will be compiled. It will also be compiled if I use
-DSYMBOL=
where no specific value follows the equal sign.
How can I arrange things so that f() does not get compiled in this latter
case?