svn commit: r192316 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb sys

John Baldwin jhb at FreeBSD.org
Mon May 18 17:39:13 UTC 2009


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


More information about the svn-src-stable-7 mailing list