Mail Archives: djgpp-workers/2000/07/20/12:13:48
DJ Delorie wrote:
>
> > 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. 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. Where does it end?
The worst one *is* NULL. The reason is that there are so bloody
many platforms out there that define it in all manner of random places.
I assume you know that. GCC has to adapt itself to all these platforms.
fixincludes will no longer wrap #defines of NULL in the presence
of either "#if.*NULL" or a "#undef NULL". It also always wraps the
typedefs for size_t, ptrdiff_t and wchar_t. It does this on the
assumption that they will be provided by GCC-supplied stddef.h.
The amusing thing about that is that stddef.h is not platform
specific, even though the SIZE_TYPE, PTRDIFF_TYPE and WCHAR_TYPE
defines are. I'm thinking that fixincludes should do its thing
on the GCC-supplied stddef.h since fixincludes replaces these
typedefs with platform-specific changes (as of today :-).
> Of course, a working fixincludes might circumvent the technical
> problems.
I'm ready to help, but I don't have a DOS platform to play on.
(Don't really want one, either. ;) The fork(2) and pipe(2) calls
can be gotten around with temporary files and system(3).
- Raw text -