www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/28/08:28:43

Date: Sun, 28 Jun 1998 15:28:35 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: djgpp AT delorie DOT com
Subject: Re: GCC 2.8.1 and NULL
In-Reply-To: <bWLoegW7sFse-pn2-Fd2thRzLcDIB@localhost>
Message-ID: <Pine.SUN.3.91.980628152508.9146F-100000@is>
MIME-Version: 1.0

On 27 Jun 1998, Gili wrote:

> 	Since GCC 2.8.1 (and perhaps a bit earlier) the authors have begun 
> using "#define NULL __null".. One problem arises:

This redefinition only happens in the C++ headers, right?

> If #include <stdio.h> occures anywhere throughout my code (and since 
> it is a very common library, it obviously does) I get the following 
> message telling me that stdio.h tried to redefine NULL (which was 
> previously defined as __null).. The only way I found around this is to
> stick an "#ifndef ... #endif" block before "#define NULL 0" command in
> <stdio.h>.. But what I'm wondering is, is this conflict suppose to 
> exist? Is something wrong with my configuration? What's going on? :)

It's a bug in libstdc++, and should be reported to the GNU maintainers.

A recent discussion among DJGPP developers couldn't yield an agreement 
about what's the best way and place of fixing this.  In particular, DJ 
Delorie objects to a change in DJGPP's C headers.

So for now, your best bet would be to fix your own headers the best you 
can (I suggest doing that in the C++ header(s) that rewdefine NULL).

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019