aboutsummaryrefslogtreecommitdiff
path: root/test/Headers
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-09-26 16:41:11 +0000
committerJordan Rose <jordan_rose@apple.com>2012-09-26 16:41:11 +0000
commit1aca4565aba1b5dc5dfbbfe4446f630b846fe01f (patch)
tree727315152fd4f2a7bf3e6fd35940bed77801ab3b /test/Headers
parent526d24444c91404dc4165b141e5ec095125c1bc8 (diff)
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.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164706 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Headers')
-rw-r--r--test/Headers/Inputs/include/stdint.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/test/Headers/Inputs/include/stdint.h b/test/Headers/Inputs/include/stdint.h
index 4a7cd36170..7a1fddef82 100644
--- a/test/Headers/Inputs/include/stdint.h
+++ b/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 */