delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/03/08/07:40:24

X-Authentication-Warning: acp3bf.physik.rwth-aachen.de: broeker owned process doing -bs
Date: Wed, 8 Mar 2000 13:10:06 +0100 (MET)
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
X-Sender: broeker AT acp3bf
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
cc: djgpp-workers AT delorie DOT com
Subject: Re: iso646.h and some questions
In-Reply-To: <Pine.SUN.3.91.1000308135129.7315F@is>
Message-ID: <Pine.LNX.4.10.10003081303470.16372-100000@acp3bf>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: dj-admin AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 8 Mar 2000, Eli Zaretskii wrote:

> On Wed, 8 Mar 2000, Hans-Bernhard Broeker wrote:
> 
> > > > 	#undef NULL
> > > > 	#define NULL 0
> > > 
> > > Won't this make trouble in C++ programs?
> > 
> > Why should it? This is the exact definition found in current DJGPP
> > headers, already.
> 
> See stdlib.h.  Recent versions of libstdc++ define NULL to something like 
> __null.  There was a thread about this on djgpp-workers several months 
> ago, and I think on c.o.m.d. as well; you might read it for details.
> 
> I guess we fixed stdlib, but not stddef...

When would that have been done? I just downloaded a spare copy of
djdev203.zip, dated Jan 07, 2000, to this Linux box, and this is what I
got:

~/Ltmp/djgpp> find include -type f | xargs grep 'define.*NULL'
include/coff.h:#define T_NULL           0
include/coff.h:#define C_NULL           0
include/crt0.h:#define _CRT0_FLAG_NULLOK                        0x0100
include/locale.h:#define NULL           0
include/stddef.h:#define NULL 0
include/stdio.h:#define NULL            0
include/stdlib.h:#define NULL           0
include/string.h:#define NULL 0
include/sys/config.h:#define HAVE_UTIME_NULL 1
include/sys/config.h:#define NULL_DEVICE "nul"
include/time.h:#define NULL 0
include/unistd.h:#define NULL 0

As you can see, it's '0', everywhere in the C headers.

Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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