From 0964ea95ff284487426df4ccc7f0ecf40f748d6b Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 31 Jul 2007 22:34:58 +0000 Subject: [PATCH] Don't pretend that stdint.h conforms to C99 if it doesn't define WCHAR_MIN and WCHAR_MAX. --- ChangeLog | 6 ++++++ m4/stdint.m4 | 12 +++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d4c894b214..cc34fc7d76 100644 --- 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 index e8016bdd7e..03bb093202 100644 --- 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 @@ AC_DEFUN([gl_STDINT_H], [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; -- 2.30.2