# HG changeset patch # User Bruno Haible # Date 1230285605 -3600 # Node ID 1aa0d32739407aec52b34a8915ef94ab6d899a31 # Parent e1a3422c4e909950a51b5b101fd0147d5068f3c6 Include after defining the types, not before. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-12-26 Bruno Haible + + * lib/stdint.in.h: Move the include of down until after all + the types are defined. Also conditionalize it on __STDC_LIMIT_MACROS, + not __STDC_CONSTANT_MACROS. + Reported by Nelson H. F. Beebe via Eric Blake. + 2008-12-25 Bruno Haible Add support for universal builds to vasnprintf. diff --git a/lib/stdint.in.h b/lib/stdint.in.h --- a/lib/stdint.in.h +++ b/lib/stdint.in.h @@ -89,15 +89,6 @@ # include #endif -#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS - -/* Get WCHAR_MIN, WCHAR_MAX. */ -# if ! (defined WCHAR_MIN && defined WCHAR_MAX) -# include -# endif - -#endif - #undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* Minimum and maximum values for a integer type under the usual assumption. @@ -482,6 +473,13 @@ #endif /* wchar_t limits */ +/* Get WCHAR_MIN, WCHAR_MAX. + This include is not on the top, above, because on OSF/1 4.0 we have a sequence of nested + includes -> -> -> , and the latter includes + and assumes its types are already defined. */ +#if ! (defined WCHAR_MIN && defined WCHAR_MAX) +# include +#endif #undef WCHAR_MIN #undef WCHAR_MAX #define WCHAR_MIN \