# HG changeset patch # User Bruno Haible # Date 1185921298 0 # Node ID 5a648774d6a3597fa6f3a8ea22e299161d26e82f # Parent 38df3bd8e54e9d8272a257bd3242f7b1057f62c2 Don't pretend that stdint.h conforms to C99 if it doesn't define WCHAR_MIN and WCHAR_MAX. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-07-31 Bruno Haible + + * m4/stdint.m4 (gl_STDINT_H): Test whether WCHAR_MIN and WCHAR_MAX + are defined by (as opposed to , as on Dragonfly). + Reported by Joerg Sonnenberger . + 2007-07-31 Bruno Haible * lib/fflush.c (rpl_fflush): On BSD systems, use the __SNPT flag. diff --git a/m4/stdint.m4 b/m4/stdint.m4 --- a/m4/stdint.m4 +++ b/m4/stdint.m4 @@ -1,4 +1,4 @@ -# stdint.m4 serial 27 +# stdint.m4 serial 28 dnl Copyright (C) 2001-2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -59,12 +59,18 @@ [gl_cv_header_working_stdint_h], [gl_cv_header_working_stdint_h=no AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([gl_STDINT_INCLUDES - [ + AC_LANG_PROGRAM([[ #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include +/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ +#if !(defined WCHAR_MIN && defined WCHAR_MAX) +#error "WCHAR_MIN, WCHAR_MAX not defined in " +#endif +] +gl_STDINT_INCLUDES +[ #ifdef INT8_MAX int8_t a1 = INT8_MAX; int8_t a1min = INT8_MIN;