-#ifdef HAVE_SYS_TYPES #include <sys/types.h> -#endif
There is a HAVE_SYS_TYPES_H though. However since HAVE_SYS_TYPES isn't defined, couldn't you remove the #include too?
Huw.
On Fri, 12 May 2006, Huw Davies wrote: [...]
There is a HAVE_SYS_TYPES_H though. However since HAVE_SYS_TYPES isn't defined, couldn't you remove the #include too?
Good point. I've removed it and will post an updated patch.
However while investigating this I discovered this comment in winapi_check:
# This checks for a bunch of standard headers # There's stdlib.h, string.h and sys/types.h too but we don't # want to force ifdefs for those at this point.
Why don't we want to force ifdefs for these headers?
Either they are conditional and then having ifdefs in only 1/10 of the time is useless.
Or they are not and then there's no point in having HAVE_SYS_TYPES_H & co.
Any objection to patches that would switch to strict ifdef enforcement for these headers?
Francois Gouget fgouget@free.fr writes:
Either they are conditional and then having ifdefs in only 1/10 of the time is useless.
Or they are not and then there's no point in having HAVE_SYS_TYPES_H & co.
Any objection to patches that would switch to strict ifdef enforcement for these headers?
There's no point, since we haven't yet found a platform that doesn't have them. The defines only exist because of things that autoconf does behind the scenes, we don't explicitly check for these headers.
On Fri, 12 May 2006, Alexandre Julliard wrote: [...]
There's no point, since we haven't yet found a platform that doesn't have them. The defines only exist because of things that autoconf does behind the scenes, we don't explicitly check for these headers.
And yet there are some places where we check for HAVE_SYS_TYPES_H. And if autoconf says these should be conditional there's no harm in checking, that way when that platforms turns up we'll be ready.
Francois Gouget fgouget@free.fr writes:
On Fri, 12 May 2006, Alexandre Julliard wrote: [...]
There's no point, since we haven't yet found a platform that doesn't have them. The defines only exist because of things that autoconf does behind the scenes, we don't explicitly check for these headers.
And yet there are some places where we check for HAVE_SYS_TYPES_H. And if autoconf says these should be conditional there's no harm in checking, that way when that platforms turns up we'll be ready.
There are plenty of headers that don't have ifdefs, and we shouldn't add them if there's no reason to, it just clutters up the code. If the ifdef really becomes necessary one day, it's easy enough to add it then.