[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.17 Naming Conflicts

AutoOpts generates a header file that contains many C preprocessing macros and several external names. For the most part, they begin with either opt_ or option, or else they end with _opt. If this happens to conflict with other macros you are using, or if you are compiling multiple option sets in the same compilation unit, the conflicts can be avoided. You may specify an external name prefix (see section Program Description Attributes) for all of the names generated for each set of option definitions.

Among these macros, several take an option name as a macro argument. Sometimes, this will inconveniently conflict. For example, if you specify an option named, debug, the emitted code will presume that DEBUG is not a preprocessing name. Or also, if you are building on a Windows platform, you may find that MicroSoft has usurped a number of user space names in its header files. Consequently, you will get a preprocessing error if you use, for example, HAVE_OPT(DEBUG) or HAVE_OPT(INTERNAL) (see section HAVE_OPT( <NAME> ) - Have this option?) in your code. You may trigger an obvious warning for such conflicts by specifying the guard-option-names attribute (see section Program Description Attributes). That emitted code will also #undef-ine the conflicting name.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated by Bruce Korb on August 30, 2014 using texi2html 1.82.