This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: libio/gen-params and linuxlibc1
- To: Zack Weinberg <zack at bitmover dot com>
- Subject: Re: libio/gen-params and linuxlibc1
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Wed, 08 Sep 1999 02:40:53 -0600
- cc: egcs-patches at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
In message <199909061541.IAA27556@zack.bitmover.com>you write:
>
> While doing some testing with the old Linux C library I ran into an
> interesting interaction bug in libio.
>
> _G_config.h has at the very end
>
> #undef NULL
> #define __need_NULL
> #include <stddef.h>
>
> If stddef.h has already defined NULL, it will not do so again. We are
> therefore left with no definition of NULL. This causes one category
> of horrible breakages. Worse, libc5's stdlib.h has
>
> /* Don't ask me why. H.J. */
> #ifndef NULL
> #define NULL ((void *)0)
> #endif
>
> so any C++ source that includes _G_config.h and then stdlib.h will get
> a bogus definition of NULL, leading to another category of horrible
> breakages.
I have no idea what to do with this.
It would have been benefitical if HJ had actually included comments for that
disgusting, horrible and simply wrong definition of NULL cited above.
jeff