summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-06-20 17:48:11 (GMT)
committerBrad King <brad.king@kitware.com>2012-06-21 12:04:16 (GMT)
commitec1d35248510235483abdf1294afb96500ae910f (patch)
treeda4e7741f754b506519b07a6ea87319c13dbb630
parent64d0e15627e72e4d96297096dd5c63598827ed10 (diff)
downloadCMake-ec1d35248510235483abdf1294afb96500ae910f.zip
CMake-ec1d35248510235483abdf1294afb96500ae910f.tar.gz
CMake-ec1d35248510235483abdf1294afb96500ae910f.tar.bz2
KWIML: Teach INT about broken UINT32_C on old HP
Old HP inttypes.h defines UINT32_C as: #define __CONCAT__(_A,_B) _A ## _B #define __CONCAT_U__(_A) _A ## u #define UINT32_C(__c) __CONCAT__(__CONCAT_U__(__c),l) The __CONCAT__ macro does not delay concatenation for an extra level so standard preprocessor implementations like GNU complain that they cannot concatenate the ")" and "l".
-rw-r--r--INT.h.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/INT.h.in b/INT.h.in
index ee4c4bb..d2eda63 100644
--- a/INT.h.in
+++ b/INT.h.in
@@ -529,6 +529,12 @@ An includer may test the following macros after inclusion:
# define @KWIML@_INT_PRIX32 "X"
#endif
+#if defined(__hpux) && defined(__GNUC__) && !defined(__LP64__) \
+ && defined(__CONCAT__) && defined(__CONCAT_U__)
+ /* Some HPs define UINT32_C incorrectly and break GNU. */
+# define @KWIML@_INT_BROKEN_UINT32_C
+#endif
+
/* 32-bit constants */
#if defined(INT32_C) && !defined(@KWIML@_INT_BROKEN_INT32_C)
# define @KWIML@_INT_INT32_C(c) INT32_C(c)