Date: Tue, 8 Jun 1999 11:37:12 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: "Andrew R. Gillett" cc: djgpp AT delorie DOT com Subject: Re: NULL redefined In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Mon, 7 Jun 1999, Andrew R. Gillett wrote: > > Upgrade to DJGPP v2.02, > > I did, months ago. May I suggest in the future to include version information when you you reporting problems? Given that info, people who are trying to help you can concentrate on the real causes of your problem instead of considering irrelevant ones. > > > In file included from c:/tools/djgpp/lang/cxx/stl_alloc.h:57, > > > from c:/tools/djgpp/lang/cxx/alloc.h:21, > > > from c:/tools/djgpp/lang/cxx/std/bastring.h:39, > > > from c:/tools/djgpp/lang/cxx/string:6 > > > from map.cpp:2: > > > c:/tools/djgpp/include/stdlib.h:16: warning: 'NULL' redefined > > > c:/tools/djgpp/lang/cxx/libio.h:88: warning: this is the location of the > > > previous definition I don't understand how could this happen with v2.02. The version of stdlib.h from djdev202.zip has a line that says "#undef NULL" near its beginning. So no conflicts should be caused by defining NULL later in stdlib.h. Could you please look closer at your headers and see why doesn't this work for you? > > and read section 8.18 of the FAQ for explanation of the problem. > > I don't see anything there relevant to this. It might be that you have a stale version of the FAQ. The latest FAQ version is 2.11 (dated 13 Sep 1998), and its section 8.18 says this: 8.18 C++ compiler says "NULL redefined" ======================================= **Q*: When I compile a C++ program which includes some standard C header files, the compiler prints error messages about redefinition of `NULL'...* *A*: This is because GCC 2.8.1 comes with C++ header files which redefine `NULL' in a way that conflicts with the DJGPP headers. It's a bug in the GNU C++ headers, but until it is fixed, you will need to make sure you include the C++ headers *after* the C headers. If that doesn't help in your case, you will need to hack your headers to reconcile them.