#define NULL as 0 when compiling as C++. This fixes the carbon.cpp and cocoa.mm test failures.

llvm-svn: 58685
This commit is contained in:
Anders Carlsson 2008-11-04 06:53:14 +00:00
parent 09053e62a9
commit 6b0dc85119
1 changed files with 5 additions and 0 deletions

View File

@ -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 */