GCC headers and DJGPP port

Eli Zaretskii eliz@delorie.com
Sat Jul 22 02:06:00 GMT 2000


> From: Geoff Keating <geoffk@cygnus.com>
> Date: 21 Jul 2000 11:33:58 -0700
> 
> Note that:
> - size_t is defined by stdio.h and stddef.h and string.h and wchar.h;
> - NULL is defined by stdio.h and stddef.h and string.h and time.h and wchar.h;
> - wchar_t is defined by stdlib.h and stddef.h and wchar.h;
> 
> so you already have to test if NULL is defined before defining it.

Not if every definition of NULL says the same.  This is allowed by
ANSI/ISO C (AFAIK), and GCC quite rightfully doesn't print any warnings.

As for size_t and wchar_t, we have a private header that defines them,
which is included by all the headers that need those types.  There are
safeguards to prevent multiple typedefs.


More information about the Gcc mailing list