delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/03/30/09:18:07

Message-Id: <m0yJfIy-000S3PC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>, djgpp-workers AT delorie DOT com,
dj AT delorie DOT com
Date: Mon, 30 Mar 1998 11:16:11 +0000
MIME-Version: 1.0
Subject: Re: NULL redefined! :(
References: <199803300226 DOT VAA00564 AT delorie DOT com>
In-reply-to: <Pine.SUN.3.91.980330141041.19525J-100000@is>

Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote:

> On Sun, 29 Mar 1998, DJ Delorie wrote: 
> > Thus (to paraphrase) we should have:
> > 
> > #undef NULL
> > #define NULL 0
>  
> Can we agree to put the above inside all the DJGPP headers that define
> NULL?

I disagree, undefining the NULL definition is not a good idea, It breaks any 
mechanism used to get a better NULL check. The #ifdef is better from my point 
of view. Nobody will define NULL in a way that breaks libc (just because your 
program will fail) but somebody (currently the FSF) can define it to get a 
better syntax check and undefining it the effort is just destroyed, 
additionally the user can't avoid this destruction so easilly because some C++ 
headers includes standard C headers (not the reverse).

> (Btw, wouldn't it be better to define a single header, say
> <sys/_null.h>, which would then be included by all the rest?)

Yes that's needed.

SET 
 
------------------------------------ 0 --------------------------------
Visit my home page: http://set-soft.home.ml.org/
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -


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