Get the C++ macros/conditionals right.
authorBruno Haible <bruno@clisp.org>
Thu, 27 Jul 2006 12:54:05 +0000 (12:54 +0000)
committerBruno Haible <bruno@clisp.org>
Thu, 27 Jul 2006 12:54:05 +0000 (12:54 +0000)
lib/ChangeLog
lib/stdint_.h
m4/ChangeLog
m4/stdint.m4

index 2fe0eba62001a62c687c76c1e95bb06721e23f8a..5f475c5eef7f09615bd02986db6a3e153efb883f 100644 (file)
@@ -1,3 +1,9 @@
+2006-07-27  Bruno Haible  <bruno@clisp.org>
+
+       * stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
+       __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
+       defined.
+
 2006-07-26  Eric Blake  <ebb9@byu.net>
 
        * mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
@@ -5,7 +11,6 @@
        * pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
        avoid compilation warning on mingw.
 
-
 2006-07-25  Bruno Haible  <bruno@clisp.org>
 
        * version-etc.c (version_etc_va): Use va_copy, assumed to be defined in
index adab4d7c24e909f5f535c75d6e512c089f80f8b7..44eca933ca414b76dbe203a19f7434b2eb9894cf 100644 (file)
 #define WINT_MAX  \
    _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
 
+#endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */
+
 /* 7.18.4. Macros for integer constants */
 
+#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS
+
 /* 7.18.4.1. Macros for minimum-width integer constants */
 /* According to ISO C 99 Technical Corrigendum 1 */
 
index 89bc9f480c0869357ffe447bf262c9786003f395..62cee0ccc5d151f6c6f667f48fb6cd71fd045f9c 100644 (file)
@@ -1,3 +1,8 @@
+2006-07-27  Bruno Haible  <bruno@clisp.org>
+
+       * stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
+       test.
+
 2006-07-26  Eric Blake  <ebb9@byu.net>
 
        * unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
index b58ccdc612e8e3aa3a73bf4fbf70bf41f0caa046..48748c61397d5e9cc1264ac776e3a7d6f0a7c528 100644 (file)
@@ -1,4 +1,4 @@
-# stdint.m4 serial 17
+# stdint.m4 serial 18
 dnl Copyright (C) 2001-2002, 2004-2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -71,6 +71,7 @@ AC_DEFUN([gl_STDINT_H],
         AC_LANG_PROGRAM([[
 #include <stddef.h>
 #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 */
 #include ABSOLUTE_STDINT_H
 #ifdef INT8_MAX
 int8_t a1 = INT8_MAX;