r178110 - [lib/Headers] Define NULL as __DARWIN_NULL when on __APPLE__.
Argyrios Kyrtzidis
akyrtzi at gmail.com
Tue Mar 26 18:25:37 PDT 2013
Author: akirtzidis
Date: Tue Mar 26 20:25:37 2013
New Revision: 178110
URL: http://llvm.org/viewvc/llvm-project?rev=178110&view=rev
Log:
[lib/Headers] Define NULL as __DARWIN_NULL when on __APPLE__.
This makes it identical with the system definition.
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=178110&r1=178109&r2=178110&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/stddef.h (original)
+++ cfe/trunk/lib/Headers/stddef.h Tue Mar 26 20:25:37 2013
@@ -53,7 +53,9 @@ typedef __WCHAR_TYPE__ wchar_t;
#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
More information about the cfe-commits
mailing list