Date: Mon, 11 May 2009 21:13:01 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r192002 - head/sys/sys Message-ID: <200905112113.n4BLD1YW002289@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Mon May 11 21:13:00 2009 New Revision: 192002 URL: http://svn.freebsd.org/changeset/base/192002 Log: *sigh*, while the kernel built, userland C did not. Revert the previous commit and fix it correctly by removing the _KERNEL check entirely. Now the kernel always sees the same value of NULL as userland meaning that it sees __null, 0, or 0L when compiled as C++, and '(void *)0' when compiled as C. Modified: head/sys/sys/_null.h Modified: head/sys/sys/_null.h ============================================================================== --- head/sys/sys/_null.h Mon May 11 19:58:03 2009 (r192001) +++ head/sys/sys/_null.h Mon May 11 21:13:00 2009 (r192002) @@ -28,18 +28,18 @@ #ifndef NULL +#if !defined(__cplusplus) +#define NULL ((void *)0) +#else #if defined(__GNUG__) && defined(__GNUC__) && __GNUC__ >= 4 #define NULL __null #else -#if defined(_KERNEL) && !defined(__cplusplus) -#define NULL ((void *)0) -#else #if defined(__LP64__) #define NULL (0L) #else #define NULL 0 #endif /* __LP64__ */ -#endif /* _KERNEL && !__cplusplus */ #endif /* __GNUG__ */ +#endif /* !__cplusplus */ #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905112113.n4BLD1YW002289>