remove __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS checks in stdint.h
authorRich Felker <dalias@aerifal.cx>
Tue, 23 Apr 2013 00:47:34 +0000 (20:47 -0400)
committerRich Felker <dalias@aerifal.cx>
Tue, 23 Apr 2013 00:47:34 +0000 (20:47 -0400)
C++11, the first C++ with stdint.h, requires the previously protected
macros to be exposed unconditionally by stdint.h. apparently these
checks were an early attempt by the C committee to guess what the C++
committee would want, and they guessed wrong.

include/stdint.h

index 138fb211cdc679405e9c04ba639a1051ed99df18..7628404881d7351afe2ce69efed1b60e46dfb0d9 100644 (file)
@@ -39,8 +39,6 @@ typedef uint16_t uint_least16_t;
 typedef uint32_t uint_least32_t;
 typedef uint64_t uint_least64_t;
 
-#if !defined __cplusplus || defined __STDC_LIMIT_MACROS
-
 #define INT8_MIN   (-1-0x7f)
 #define INT16_MIN  (-1-0x7fff)
 #define INT32_MIN  (-1-0x7fffffff)
@@ -88,10 +86,6 @@ typedef uint64_t uint_least64_t;
 
 #include <bits/stdint.h>
 
-#endif
-
-#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS
-
 #define INT8_C(c)  c
 #define INT16_C(c) c
 #define INT32_C(c) c
@@ -113,5 +107,3 @@ typedef uint64_t uint_least64_t;
 #endif
 
 #endif
-
-#endif