[cfe-commits] r70806 - /cfe/trunk/lib/Headers/stdint.h
Eli Friedman
eli.friedman at gmail.com
Sun May 3 16:00:51 PDT 2009
Author: efriedma
Date: Sun May 3 18:00:48 2009
New Revision: 70806
URL: http://llvm.org/viewvc/llvm-project?rev=70806&view=rev
Log:
Fix for PR3841: follow gcc's example and fall back to the system
stdint.h unless we are freestanding.
Any suggestions here are welcome.
Modified:
cfe/trunk/lib/Headers/stdint.h
Modified: cfe/trunk/lib/Headers/stdint.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/stdint.h?rev=70806&r1=70805&r2=70806&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/stdint.h (original)
+++ cfe/trunk/lib/Headers/stdint.h Sun May 3 18:00:48 2009
@@ -22,8 +22,15 @@
*
\*===----------------------------------------------------------------------===*/
-#ifndef __STDINT_H
-#define __STDINT_H
+#ifndef __CLANG_STDINT_H
+#define __CLANG_STDINT_H
+
+/* If we're hosted, fall back to the system's stdint.h, which might have
+ * additional definitions.
+ */
+#if __STDC_HOSTED__
+# include_next <stdint.h>
+#else
/* We currently only support targets with power of two, 2s complement integers.
*/
@@ -221,4 +228,5 @@
#define INTMAX_C(v) (v##LL)
#define UINTMAX_C(v) (v##ULL)
-#endif /* __STDINT_H */
+#endif /* __STDC_HOSTED__ */
+#endif /* __CLANG_STDINT_H */
More information about the cfe-commits
mailing list