diff options
| author | Jordan Rose <jordan_rose@apple.com> | 2012-09-26 16:41:11 +0000 |
|---|---|---|
| committer | Jordan Rose <jordan_rose@apple.com> | 2012-09-26 16:41:11 +0000 |
| commit | 17df40d484c650245b67a7e3fa2ae91354f5ea26 (patch) | |
| tree | 3599a4d6d1f508f7013698e143a7138101bc6a35 | |
| parent | 9ae3956f223b3f7961ffcca8da7f1a1b1f6585d7 (diff) | |
| download | bcm5719-llvm-17df40d484c650245b67a7e3fa2ae91354f5ea26.tar.gz bcm5719-llvm-17df40d484c650245b67a7e3fa2ae91354f5ea26.zip | |
Make our mini-stdint.h platform-independent by using predefined macros.
This also adds a definition for uint64_t, which was causing build failures
on some platforms. (I'm actually surprised this didn't happen on more
builders, but maybe the search paths are different.)
llvm-svn: 164706
| -rw-r--r-- | clang/test/Headers/Inputs/include/stdint.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/clang/test/Headers/Inputs/include/stdint.h b/clang/test/Headers/Inputs/include/stdint.h index 4a7cd361707..7a1fddef82d 100644 --- a/clang/test/Headers/Inputs/include/stdint.h +++ b/clang/test/Headers/Inputs/include/stdint.h @@ -1,14 +1,18 @@ #ifndef STDINT_H #define STDINT_H -#if defined(__arm__) || defined(__i386__) || defined(__mips__) -typedef unsigned int uint32_t; -typedef unsigned int uintptr_t; -#elif defined(__x86_64__) -typedef unsigned int uint32_t; -typedef unsigned long uintptr_t; +#ifdef __INT32_TYPE__ +typedef unsigned __INT32_TYPE__ uint32_t; +#endif + +#ifdef __INT64_TYPE__ +typedef unsigned __INT64_TYPE__ uint64_t; +#endif + +#ifdef __INTPTR_TYPE__ +typedef unsigned __INTPTR_TYPE__ uintptr_t; #else -#error "Unknown target architecture" +#error Every target should have __INTPTR_TYPE__ #endif #endif /* STDINT_H */ |

