Author: theraven
Date: Tue Dec 27 21:36:31 2011
New Revision: 228918
URL: http://svn.freebsd.org/changeset/base/228918

Log:
  Define NULL to nullptr in C++11 mode (not strictly required, but it makes
  migrating code to C++11 easier).
  
  Approved by:  dim (mentor)

Modified:
  head/sys/sys/_null.h

Modified: head/sys/sys/_null.h
==============================================================================
--- head/sys/sys/_null.h        Tue Dec 27 20:03:57 2011        (r228917)
+++ head/sys/sys/_null.h        Tue Dec 27 21:36:31 2011        (r228918)
@@ -31,7 +31,9 @@
 #if !defined(__cplusplus)
 #define        NULL    ((void *)0)
 #else
-#if defined(__GNUG__) && defined(__GNUC__) && __GNUC__ >= 4
+#if __cplusplus >= 201103L
+#define        NULL    nullptr
+#elif defined(__GNUG__) && defined(__GNUC__) && __GNUC__ >= 4
 #define        NULL    __null
 #else
 #if defined(__LP64__)
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to