Mercurial > hg > octave-nkf > gnulib-hg
changeset 6914:ca3b46b1eab7
* stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
MacOS X 10.4.6. Don't mention <sys/int_types.h>.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Tue, 04 Jul 2006 04:48:23 +0000 |
parents | 68c943c7c310 |
children | 85faf7df624e |
files | lib/ChangeLog lib/stdint_.h |
diffstat | 2 files changed, 21 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,5 +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>. + Merge from coreutils. * .cppi-disable: Add stdint_.h.
--- 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. */