diff options
author | Oscar Fuentes <ofv@wanadoo.es> | 2009-12-08 02:40:09 +0000 |
---|---|---|
committer | Oscar Fuentes <ofv@wanadoo.es> | 2009-12-08 02:40:09 +0000 |
commit | 350dd4a6a61b6f8a3a35e094c5ba17b2fa98ba04 (patch) | |
tree | 8bd242c0bea9421c7274276585fc90721236fc24 | |
parent | 9aa1ec87b0d04730d06d20c63486fc4a8a06b458 (diff) | |
download | external_llvm-350dd4a6a61b6f8a3a35e094c5ba17b2fa98ba04.zip external_llvm-350dd4a6a61b6f8a3a35e094c5ba17b2fa98ba04.tar.gz external_llvm-350dd4a6a61b6f8a3a35e094c5ba17b2fa98ba04.tar.bz2 |
For VC++, define the ?INT*_C macros only it they are not yet defined.
Some compatibility updates like the Boost TR1 compatibility headers
define them.
Patch contributed by OvermindDL1!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90828 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/System/DataTypes.h.cmake | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/include/llvm/System/DataTypes.h.cmake b/include/llvm/System/DataTypes.h.cmake index 180c86c..d9ca273 100644 --- a/include/llvm/System/DataTypes.h.cmake +++ b/include/llvm/System/DataTypes.h.cmake @@ -118,14 +118,33 @@ typedef signed int ssize_t; #define INT32_MAX 2147483647 #define INT32_MIN -2147483648 #define UINT32_MAX 4294967295U -#define INT8_C(C) C -#define UINT8_C(C) C -#define INT16_C(C) C -#define UINT16_C(C) C -#define INT32_C(C) C -#define UINT32_C(C) C ## U -#define INT64_C(C) ((int64_t) C ## LL) -#define UINT64_C(C) ((uint64_t) C ## ULL) +/* Certain compatibility updates to VC++ introduce the `cstdint' + * header, which defines the INT*_C macros. On default installs they + * are absent. */ +#ifndef INT8_C +# define INT8_C(C) C +#endif +#ifndef UINT8_C +# define UINT8_C(C) C +#endif +#ifndef INT16_C +# define INT16_C(C) C +#endif +#ifndef UINT16_C +# define UINT16_C(C) C +#endif +#ifndef INT32_C +# define INT32_C(C) C +#endif +#ifndef UINT32_C +# define UINT32_C(C) C ## U +#endif +#ifndef INT64_C +# define INT64_C(C) ((int64_t) C ## LL) +#endif +#ifndef UINT64_C +# define UINT64_C(C) ((uint64_t) C ## ULL) +#endif #endif /* _MSC_VER */ /* Set defaults for constants which we cannot find. */ |