Date: Tue, 27 Dec 2011 21:36:31 +0000 (UTC) From: David Chisnall <theraven@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r228918 - head/sys/sys Message-ID: <201112272136.pBRLaVZs069838@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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__)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112272136.pBRLaVZs069838>