changeset 27:536eb2988c28

Fix Issue 9: Surround (U)INTMAX_C with #ifndef's to prevent compiler warnings.
author alexander.chemeris@gmail.com@d525d15b-5824-0410-80a3-6185d19c2cde
date Fri, 24 May 2013 22:36:43 +0000
parents 480de4e30dcd
children 206352ae55e9
files stdint.h
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/stdint.h
+++ b/stdint.h
@@ -243,8 +243,14 @@ typedef uint64_t  uintmax_t;
 #define UINT64_C(val) val##ui64
 
 // 7.18.4.2 Macros for greatest-width integer constants
-#define INTMAX_C   INT64_C
-#define UINTMAX_C  UINT64_C
+// These #ifndef's are needed to prevent collisions with <boost/cstdint.hpp>.
+// Check out Issue 9 for the details.
+#ifndef INTMAX_C //   [
+#  define INTMAX_C   INT64_C
+#endif // INTMAX_C    ]
+#ifndef UINTMAX_C //  [
+#  define UINTMAX_C  UINT64_C
+#endif // UINTMAX_C   ]
 
 #endif // __STDC_CONSTANT_MACROS ]