> From: Akim Demaille <[EMAIL PROTECTED]>
> Date: 11 Jun 2001 20:36:50 +0200
> Russ> If it isn't, autoconf may need to check explicitly if
> Russ> <inttypes.h> and <sys/types.h> can be included at the same time,
> Russ> a la the existing checks for <time.h> and <sys/time.h>.
>
> Akim> Agreed.
>
> Akim> Paul, Jim? On IRIX 5.3 there are conflicts.
>
> Or should we simply state that #undef HAVE_INTTYPES_H when both cannot
> be included together?
That sounds like a reasonable simplification to me.
One compatibility point, though. Currently, autoconf assumes that
<sys/types.h> exists, but this assumption is valid only for
POSIX-related items, as <sys/types.h> is required only by POSIX, not
by the C Standard. <inttypes.h> is a C-language item, not a POSIX
item, so the test for inttypes.h should look something like this:
#if HAVE_SYS_TYPES_H
/* On some older hosts, <sys/types.h> is incompatible with <inttypes.h>.
To avoid porting hassles, do not define HAVE_INTTYPES_H on such hosts. */
# include <sys/types.h>
#endif
#include <inttypes.h>
While you're at it you should wrap '#include <sys/types.h>' inside
'#if HAVE_SYS_TYPES_H' in all other macros that ought to work even on
non-POSIX platforms. Here is a list of autoconf macros that I think
could use a change along those lines:
AC_PROG_CC_STDC
AC_STRUCT_TIMEZONE
AC_STRUCT_TM
AC_TYPE_SIGNAL
_AC_CHECK_TYPE_OLD
_AC_INCLUDES_DEFAULT_REQUIREMENTS
Also, in the documentation, the @node Default Includes and the @node
Particular Types should be updated to reflect this wrapping.