Date: Mon, 18 May 2009 17:39:12 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r192316 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb sys Message-ID: <200905181739.n4IHdCui069699@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Mon May 18 17:39:12 2009 New Revision: 192316 URL: http://svn.freebsd.org/changeset/base/192316 Log: MFC: Use __null for NULL for GNU C++ 4.x and use the same value for NULL in the kernel as in userland. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/sys/_null.h Modified: stable/7/sys/sys/_null.h ============================================================================== --- stable/7/sys/sys/_null.h Mon May 18 17:37:27 2009 (r192315) +++ stable/7/sys/sys/_null.h Mon May 18 17:39:12 2009 (r192316) @@ -28,14 +28,18 @@ #ifndef NULL -#if defined(_KERNEL) || !defined(__cplusplus) +#if !defined(__cplusplus) #define NULL ((void *)0) #else +#if defined(__GNUG__) && defined(__GNUC__) && __GNUC__ >= 4 +#define NULL __null +#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?200905181739.n4IHdCui069699>