Date: Tue, 24 Mar 1998 11:39:47 -0500 (EST) Message-Id: <199803241639.LAA06639@delorie.com> From: DJ Delorie To: eliz AT is DOT elta DOT co DOT il CC: djgpp AT delorie DOT com, djgpp-workers AT delorie DOT com In-reply-to: (message from Eli Zaretskii on Tue, 24 Mar 1998 17:23:23 +0300 (IDT)) Subject: Re: NULL redefined! :( Precedence: bulk > I think that the C header(s) which define NULL should do so only under > "#ifndef __cplusplus". It is safer to let C++ use its own definition > throughout, and leave C at its usual definition. No, that won't work, because C++ must accept ANSI as well, so the following MUST be valid C++: #include int main() { if (fopen("foo", "r") == NULL) whatever(); } DJGPP could be more careful about this, by #undef'ing NULL before setting it (this always succeeds), but any other headers that screw with the ANSI defined symbols are at fault if they conflict, because ANSI says which headers define which symbols, not some third-party library.