From owner-svn-src-all@FreeBSD.ORG Mon May 18 17:39:12 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C42A010656D7; Mon, 18 May 2009 17:39:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B13208FC16; Mon, 18 May 2009 17:39:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4IHdCjQ069700; Mon, 18 May 2009 17:39:12 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4IHdCui069699; Mon, 18 May 2009 17:39:12 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200905181739.n4IHdCui069699@svn.freebsd.org> From: John Baldwin Date: Mon, 18 May 2009 17:39:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r192316 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2009 17:39:13 -0000 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