From ec1d35248510235483abdf1294afb96500ae910f Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 20 Jun 2012 13:48:11 -0400 Subject: [PATCH] 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". --- INT.h.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/INT.h.in b/INT.h.in index ee4c4bb82..d2eda6387 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)