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 _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"