delorie.com/archives/browse.cgi | search |
> From: Geoff Keating <geoffk AT cygnus DOT 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.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |