summaryrefslogtreecommitdiffstats
path: root/clang/test/Headers/Inputs/include/stdint.h
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
commit17df40d484c650245b67a7e3fa2ae91354f5ea26 (patch)
tree3599a4d6d1f508f7013698e143a7138101bc6a35 /clang/test/Headers/Inputs/include/stdint.h
parent9ae3956f223b3f7961ffcca8da7f1a1b1f6585d7 (diff)
downloadbcm5719-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
Diffstat (limited to 'clang/test/Headers/Inputs/include/stdint.h')
-rw-r--r--clang/test/Headers/Inputs/include/stdint.h18
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 */
OpenPOWER on IntegriCloud