[cfe-commits] r164706 - /cfe/trunk/test/Headers/Inputs/include/stdint.h
Jordan Rose
jordan_rose at apple.com
Wed Sep 26 09:41:11 PDT 2012
Author: jrose
Date: Wed Sep 26 11:41:11 2012
New Revision: 164706
URL: http://llvm.org/viewvc/llvm-project?rev=164706&view=rev
Log:
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.)
Modified:
cfe/trunk/test/Headers/Inputs/include/stdint.h
Modified: cfe/trunk/test/Headers/Inputs/include/stdint.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Headers/Inputs/include/stdint.h?rev=164706&r1=164705&r2=164706&view=diff
==============================================================================
--- cfe/trunk/test/Headers/Inputs/include/stdint.h (original)
+++ cfe/trunk/test/Headers/Inputs/include/stdint.h Wed Sep 26 11:41:11 2012
@@ -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 */
More information about the cfe-commits
mailing list