[cfe-commits] r116794 - /cfe/trunk/lib/Headers/stddef.h
NAKAMURA Takumi
geek4civic at gmail.com
Mon Oct 18 20:42:41 PDT 2010
Author: chapuni
Date: Mon Oct 18 22:42:41 2010
New Revision: 116794
URL: http://llvm.org/viewvc/llvm-project?rev=116794&view=rev
Log:
lib/Headers/stddef.h: wint_t should be defined whenever <stddef.h> is included with __need_wint_t.
Modified:
cfe/trunk/lib/Headers/stddef.h
Modified: cfe/trunk/lib/Headers/stddef.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/stddef.h?rev=116794&r1=116793&r2=116794&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/stddef.h (original)
+++ cfe/trunk/lib/Headers/stddef.h Mon Oct 18 22:42:41 2010
@@ -46,13 +46,16 @@
#define NULL ((void*)0)
#endif
-// Some C libraries expect to see a wint_t here. Others (notably MinGW) will use
-// __WINT_TYPE__ directly; accomodate both by requiring __need_wint_t
-#if defined(__need_wint_t) && !defined(_WINT_T)
-#define _WINT_T
-typedef __WINT_TYPE__ wint_t;
-#endif
-
#define offsetof(t, d) __builtin_offsetof(t, d)
#endif /* __STDDEF_H */
+
+/* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use
+__WINT_TYPE__ directly; accomodate both by requiring __need_wint_t */
+#if defined(__need_wint_t)
+#if !defined(_WINT_T)
+#define _WINT_T
+typedef __WINT_TYPE__ wint_t;
+#endif /* _WINT_T */
+#undef __need_wint_t
+#endif /* __need_wint_t */
More information about the cfe-commits
mailing list