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".
This commit is contained in:
Brad King 2012-06-20 13:48:11 -04:00
parent 64d0e15627
commit ec1d352485
1 changed files with 6 additions and 0 deletions

View File

@ -529,6 +529,12 @@ An includer may test the following macros after inclusion:
# define @KWIML@_INT_PRIX32 "X" # define @KWIML@_INT_PRIX32 "X"
#endif #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 */ /* 32-bit constants */
#if defined(INT32_C) && !defined(@KWIML@_INT_BROKEN_INT32_C) #if defined(INT32_C) && !defined(@KWIML@_INT_BROKEN_INT32_C)
# define @KWIML@_INT_INT32_C(c) INT32_C(c) # define @KWIML@_INT_INT32_C(c) INT32_C(c)