stdint: allow test to pass with C++
authorEric Blake <eblake@redhat.com>
Fri, 16 Apr 2010 20:11:08 +0000 (14:11 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 16 Apr 2010 21:40:01 +0000 (15:40 -0600)
__STDC_LIMIT_MACROS is only half the battle.

* tests/test-stdint.c: Define __STDC_CONSTANT_MACROS, for glibc.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
tests/test-stdint.c

index a86e305..2a3f017 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2010-04-16  Eric Blake  <eblake@redhat.com>
 
+       stdint: allow test to pass with C++
+       * tests/test-stdint.c: Define __STDC_CONSTANT_MACROS, for glibc.
+
        getopt: allow compilation with C++
        * lib/getopt_int.h (__ordering): Hoist enum declaration outside
        struct.
index 9cec2e2..d64057a 100644 (file)
@@ -22,6 +22,7 @@
 #define DO_PEDANTIC 0
 
 #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* likewise */
 #include <stdint.h>
 
 #include "verify.h"