aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2013-05-02 13:12:32 +0000
committerHans Wennborg <hans@hanshq.net>2013-05-02 13:12:32 +0000
commitc814c64c6f7e7a26f4af0d040ad04b69917a36c8 (patch)
tree902da2bd581d7c2e97bffaf60e71cdd43586c886 /lib
parentde5ed04b08dcc23ac2caad282c372d541f60c6ee (diff)
Make sure we define wchar_t related macros correctly in -fms-extensions mode.
This adds a test to make sure we define _WCHAR_T_DEFINED and _NATIVE_WCHAR_T_DEFINED correctly in the preprocessor, and updates stddef.h to set it when typedeffing wchar_t. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180918 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Headers/stddef.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Headers/stddef.h b/lib/Headers/stddef.h
index 0c5c961d5e..6a64d6d32a 100644
--- a/lib/Headers/stddef.h
+++ b/lib/Headers/stddef.h
@@ -58,6 +58,9 @@ typedef __SIZE_TYPE__ rsize_t;
#if !defined(_WCHAR_T) || __has_feature(modules)
#if !__has_feature(modules)
#define _WCHAR_T
+#if defined(_MSC_EXTENSIONS)
+#define _WCHAR_T_DEFINED
+#endif
#endif
typedef __WCHAR_TYPE__ wchar_t;
#endif