From 3033610f5dfd03b68de35631a8693963a80099c2 Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Tue, 27 Dec 2011 21:36:31 +0000 Subject: [PATCH] Define NULL to nullptr in C++11 mode (not strictly required, but it makes migrating code to C++11 easier). Approved by: dim (mentor) --- sys/sys/_null.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/sys/_null.h b/sys/sys/_null.h index ed6804ccd10..92706c6a037 100644 --- a/sys/sys/_null.h +++ b/sys/sys/_null.h @@ -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__)