www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/06/17/13:08:04

Date: Wed, 17 Jun 1998 13:07:19 -0400 (EDT)
Message-Id: <199806171707.NAA25890@delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: salvador AT inti DOT gov DOT ar
CC: eliz AT is DOT elta DOT co DOT il, djgpp-workers AT delorie DOT com
In-reply-to: <m0ymJLb-000S4BC@inti.gov.ar> (salvador@inti.gov.ar)
Subject: Re: NULL redefined in djgpp headers

> I don't think is a good idea to correct the GNU headers. Why DJ
> doesn't want to correct the libc headers?

Because the standard says I must do it the way I do it - the *system*
headers define NULL, not the application.  It's not feasible to
protect each and every #define (and not possible to protect the
prototypes), so a partial solution (protect NULL but not others) is
nothing more than a mess.

If the GNU header #define NULL and *then* include system headers, then
the GNU sources are *wrong*.  *They* should use #ifdef *after* they
are done including system headers.

> IMHO is a very bad idea to define NULL without checking or using undef first.

It's worse to #define something and then #include the header that ANSI
says is responsible for that symbol.

- Raw text -


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