diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2010-10-19 03:42:41 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2010-10-19 03:42:41 +0000 |
commit | 51f56fc36e6d441b6dd722cc09c4ac9f081c0974 (patch) | |
tree | cc6b26ea966bd86d8762dc05b760d47cc06dddf1 | |
parent | 157c5bf8515f00ebbd770b53ebaf72bd54448c51 (diff) |
lib/Headers/stddef.h: wint_t should be defined whenever <stddef.h> is included with __need_wint_t.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116794 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Headers/stddef.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lib/Headers/stddef.h b/lib/Headers/stddef.h index 84ec1a7b4e..7cc0bc1a75 100644 --- a/lib/Headers/stddef.h +++ b/lib/Headers/stddef.h @@ -46,13 +46,16 @@ typedef __WCHAR_TYPE__ wchar_t; #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 */ |