summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-07-04 04:50:34 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-07-04 04:50:34 +0000
commit948ca71450553b6bc245895d9ce83d1c615d77f5 (patch)
tree4f4a63b68834a92b7afe3bb40d004a54a829cbbe
parenta9cf203e2d4a0f94cb2ade11dfbdb903fac70d91 (diff)
downloadcoreutils-948ca71450553b6bc245895d9ce83d1c615d77f5.tar.xz
Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
MacOS X 10.4.6. Don't mention <sys/int_types.h>.
-rw-r--r--lib/ChangeLog7
-rw-r--r--lib/stdint_.h32
2 files changed, 23 insertions, 16 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog
index ab12de5f3..6256a606c 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,10 @@
+2006-07-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ * stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
+ MacOS X 10.4.6. Don't mention <sys/int_types.h>. Problems
+ reported by Mark D. Baushke, one in
+ <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
+
2006-07-03 Jim Meyering <jim@meyering.net>
* cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
diff --git a/lib/stdint_.h b/lib/stdint_.h
index b2a53dafa..932329be8 100644
--- a/lib/stdint_.h
+++ b/lib/stdint_.h
@@ -32,15 +32,6 @@
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
@@ -55,11 +46,27 @@
# 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__
@@ -69,13 +76,6 @@
# 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. */