Subject: Re: CVS commit: basesrc / NULL
To: Klaus Klein <>
From: Erik Bertelsen <>
List: tech-toolchain
Date: 12/23/1999 23:32:04
On Thu, Dec 23, 1999 at 07:43:28PM +0100, Klaus Klein wrote:
> > Also do we break strict adherence to ISO C by having <stddef.h>
> > etc. actually include other headers? I have faint recalls about the
> > standard saying that inclusion of these headers don't cause other
> > headers to be included ...  (which is possibly the reason that NULL
> > is defined in several places).
> A quick search of C89 and the latest C99 draft document I have access
> to (N869) didn't yield anything assorted (though I might easily have
> missed it), but given the (possible) problem you point out above I'm

I've had a look at the c9x draft document (N869 via 
and by searching and looking through that, I don't find any  requirements
that the standard headers must not include each other, just that they
are idempotent (except <assert.h>). In the light of this I don't care too
much if the c89 standard might have banned standard headers including other

Still the existence of a header that should not be used by itself (<null.h>)
is somewhat ugly.

What about putting the definitions of NULL back into all the standard headers
needing it and creating a maintenance script (to be called by cron on one of
the machines at (ir)regular intervals) that checks that alle the
definitions are consistent?

- Erik Bertelsen