summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/clang/lib/Headers/stddef.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Headers/stddef.h')
-rw-r--r--contrib/llvm/tools/clang/lib/Headers/stddef.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/contrib/llvm/tools/clang/lib/Headers/stddef.h b/contrib/llvm/tools/clang/lib/Headers/stddef.h
index 9e87ee89..eb919b5 100644
--- a/contrib/llvm/tools/clang/lib/Headers/stddef.h
+++ b/contrib/llvm/tools/clang/lib/Headers/stddef.h
@@ -43,10 +43,20 @@ typedef __WCHAR_TYPE__ wchar_t;
#undef NULL
#ifdef __cplusplus
-#undef __null // VC++ hack.
-#define NULL __null
+# if !defined(__MINGW32__) && !defined(_MSC_VER)
+# define NULL __null
+# else
+# define NULL 0
+# endif
#else
-#define NULL ((void*)0)
+# define NULL ((void*)0)
+#endif
+
+#ifdef __cplusplus
+#if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED)
+namespace std { typedef decltype(nullptr) nullptr_t; }
+using ::std::nullptr_t;
+#endif
#endif
#define offsetof(t, d) __builtin_offsetof(t, d)
OpenPOWER on IntegriCloud