* stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
[pspp] / lib / stdint_.h
index b2a53dafa9904a3b2404af707adfff7df1fbf1dc..932329be8874cf0bc959c3ac5c26551e84387fbc 100644 (file)
    for the "fast" types and macros, which we recommend against using
    in public interfaces due to compiler differences.  */
 
-/* <sys/types.h> defines some of the stdint.h types as well, on glibc,
-   IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).  */
-#if @HAVE_SYS_TYPES_H@
-# include <sys/types.h>
-#endif
-
-/* Get LONG_MIN, LONG_MAX, ULONG_MAX.  */
-#include <limits.h>
-
 #if @HAVE_STDINT_H@
 # if defined __sgi && ! defined __c99
    /* Bypass IRIX's <stdint.h> if in C89 mode, since it merely annoys users
 # include @FULL_PATH_STDINT_H@
 #endif
 
+/* <sys/types.h> defines some of the stdint.h types as well, on glibc,
+   IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
+   MacOS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
+   relies on the system <stdint.h> definitions, so include
+   <sys/types.h> after @FULL_PATH_STDINT_H@.  */
+#if @HAVE_SYS_TYPES_H@
+# include <sys/types.h>
+#endif
+
+/* Get LONG_MIN, LONG_MAX, ULONG_MAX.  */
+#include <limits.h>
+
 #if @HAVE_INTTYPES_H@
   /* In OpenBSD 3.8, <inttypes.h> includes <machine/types.h>, which defines
      int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__.
      <inttypes.h> also defines intptr_t and uintptr_t.  */
 # include <inttypes.h>
+#elif @HAVE_SYS_INTTYPES_H@
+  /* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and
+     the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX.  */
+# include <sys/inttypes.h>
 #endif
 
 #if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__
 # include <sys/bitypes.h>
 #endif
 
-#if @HAVE_SYS_INTTYPES_H@ && !@HAVE_INTTYPES_H@
-  /* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and
-     the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX.
-     But note that <sys/int_types.h> contains only the type definitions!  */
-# include <sys/inttypes.h>
-#endif
-
 #if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS
 
 /* Get WCHAR_MIN, WCHAR_MAX.  */