delorie.com/archives/browse.cgi | search |
> > I don't know what your copy of stdio.h looks like, however, it > > should certainly test whether NULL is defined before defining it. > > It doesn't. It shouldn't have to. ANSI says that stdio.h provides > NULL. According to ISO C99, NULL is provided by the following headers locale.h (7.11) stddef.h (7.17) stdio.h (7.19) stdlib.h (7.20) string.h (7.21) time.h (7.23) wchar.h (7.24) so it is not all that clear that it is provided by stdio.h exclusively. > I have a philosophical problem with anyone saying "it should > certainly test it" because it means that, at the whim of the gcc team, > we'd need to add yet another test to our standard headers because yet > another symbol was absconded by the gcc headers. Please tell me how you implement the above requirement without testing whether NULL has been defined? Regards, Martin
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |