Mail Archives: djgpp-workers/1998/03/30/09:18:07
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 -