Re: INTERFACE definitions

"Martin Fuchs" <[email protected]> Tue, 02 Mar 2004 23:15:05 +0100
Newsgroups gmane.comp.gnu.mingw.patches
Message-ID <[email protected]>
> But what about the very first #define INTERFACE (wherever that may
> happen).  Doesn't that need protection too?  So each header that defines
> INTERFACE would need to undef before first definition.

Since we are talking about the W32API headers, which are system headers,
there are no other headers included before them, which could define
INTERFACE macros.

The safest solution however would be to #undef INTERFACE at the very
beginning of each file, then #undef it again after each block, that defines
and uses another temporary INTERFACE definition:

[file start]
#undef INTERFACE

.. some code

#define INTERFACE
.. [use INTERFACE]
#undef INTERFACE

.. some other code

[EOF]


Regards,

   Martin


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click