diff options
author | Anders Carlsson <andersca@mac.com> | 2008-11-04 06:53:14 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2008-11-04 06:53:14 +0000 |
commit | f8e61b371d085516b8b9b906099db3e0b915a7c0 (patch) | |
tree | 935bd55d6c1793484c8446a12e217ca6c1b434ef | |
parent | ddf7cac45d85b73127adbbd91a2b28fc7291c57e (diff) |
#define NULL as 0 when compiling as C++. This fixes the carbon.cpp and cocoa.mm test failures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58685 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Headers/stddef.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Headers/stddef.h b/lib/Headers/stddef.h index 3e7e4dda0d..d5f4eb9c7c 100644 --- a/lib/Headers/stddef.h +++ b/lib/Headers/stddef.h @@ -32,7 +32,12 @@ typedef __typeof__(sizeof(int)) size_t; typedef __typeof__(*L"") wchar_t; #endif +#ifdef __cplusplus +#define NULL (0) +#else #define NULL ((void*)0) +#endif + #define offsetof(t, d) __builtin_offsetof(t, d) #endif /* __STDDEF_H */ |