[lib/Headers] Define NULL as __DARWIN_NULL when on __APPLE__.
This makes it identical with the system definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178110 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Headers/stddef.h b/lib/Headers/stddef.h
index 5296224..a8d6bf4 100644
--- a/lib/Headers/stddef.h
+++ b/lib/Headers/stddef.h
@@ -53,7 +53,9 @@
#endif
#undef NULL
-#ifdef __cplusplus
+#if defined(__APPLE__) && defined(__DARWIN_NULL)
+# define NULL __DARWIN_NULL
+#elif defined(__cplusplus)
# if !defined(__MINGW32__) && !defined(_MSC_VER)
# define NULL __null
# else