diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-09-03 19:37:39 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-09-03 19:37:39 +0000 |
commit | 206043aac9f6fc670c9b2df587c8d42461f96ba0 (patch) | |
tree | fa7a0d7070f872e6b3175422952dde4765bb257b | |
parent | 08a6c7614be9793754b17930ba619e875aef9585 (diff) |
Provide correct definition of uint64_t for platforms that have only
u_int64_t defined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16154 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Support/DataTypes.h.in | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/Support/DataTypes.h.in b/include/llvm/Support/DataTypes.h.in index 180258478d..6b3aee8ce6 100644 --- a/include/llvm/Support/DataTypes.h.in +++ b/include/llvm/Support/DataTypes.h.in @@ -21,6 +21,8 @@ #ifndef SUPPORT_DATATYPES_H #define SUPPORT_DATATYPES_H +#include <llvm/Config/config.h> + // Note that this header's correct operation depends on __STDC_LIMIT_MACROS // being defined. We would define it here, but in order to prevent Bad Things // happening when system headers or C++ STL headers include stdint.h before @@ -34,6 +36,16 @@ @INCLUDE_INTTYPES_H@ @INCLUDE_SYS_TYPES_H@ @INCLUDE_STDINT_H@ + +// Handle incorrect definition of uint64_t as u_int64_t +#ifndef HAVE_UINT64_T +#ifdef HAVE_U_INT64_T +typedef u_int64_t uint64_t; +#else +# error "Don't have a definition for uint64_t on this platform" +#endif +#endif + #else // Visual C++ doesn't provide standard integer headers, but it does provide // built-in data types. |