Fuzzy string comparison.
[gnulib.git] / lib / stdint_.h
index b2a53da..1ada949 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 it before <inttypes.h>, since any "#include <stdint.h>"
      in <inttypes.h> would reinclude us, skipping our contents because
      _GL_STDINT_H is defined.  */
-# include @FULL_PATH_STDINT_H@
+# include @ABSOLUTE_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 @ABSOLUTE_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.  */
+# define _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H
 # include <inttypes.h>
+# undef _GL_JUST_INCLUDE_ABSOLUTE_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.  */
 #define WINT_MAX  \
    _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
 
+#endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */
+
 /* 7.18.4. Macros for integer constants */
 
+#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS
+
 /* 7.18.4.1. Macros for minimum-width integer constants */
 /* According to ISO C 99 Technical Corrigendum 1 */