* lib/fcntl_.h: Prefer #include_next <foo.h> to #include
[pspp] / lib / stdint_.h
index 92d64539a0dd6b044ea9ba2738296b2392df66fc..f32b8dc882abf2324b7230e628d691fa3d6a9827 100644 (file)
      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 @ABSOLUTE_STDINT_H@
+# if @HAVE_INCLUDE_NEXT@
+#  include_next <stdint.h>
+# else
+#  include @ABSOLUTE_STDINT_H@
+# endif
 #endif
 
 /* <sys/types.h> defines some of the stdint.h types as well, on glibc,
 #undef INT64_MIN
 #undef INT64_MAX
 #ifdef GL_INT64_T
-# define INT64_MIN  (~ INT64_MAX)
+/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0
+   evaluates the latter incorrectly in preprocessor expressions.  */
+# define INT64_MIN  (- INTMAX_C (1) << 63)
 # define INT64_MAX  INTMAX_C (9223372036854775807)
 #endif
 
 
 #undef INTMAX_MIN
 #undef INTMAX_MAX
-#define INTMAX_MIN  (~ INTMAX_MAX)
 #ifdef INT64_MAX
+# define INTMAX_MIN  INT64_MIN
 # define INTMAX_MAX  INT64_MAX
 #else
+# define INTMAX_MIN  INT32_MIN
 # define INTMAX_MAX  INT32_MAX
 #endif