From owner-svn-src-head@FreeBSD.ORG Sat Dec 24 13:28:49 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7024106564A; Sat, 24 Dec 2011 13:28:49 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D21838FC0C; Sat, 24 Dec 2011 13:28:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBODSngW014996; Sat, 24 Dec 2011 13:28:49 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBODSnkH014994; Sat, 24 Dec 2011 13:28:49 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201112241328.pBODSnkH014994@svn.freebsd.org> From: David Chisnall Date: Sat, 24 Dec 2011 13:28:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228859 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Dec 2011 13:28:50 -0000 Author: theraven Date: Sat Dec 24 13:28:49 2011 New Revision: 228859 URL: http://svn.freebsd.org/changeset/base/228859 Log: Some GCC-compatibility definitions. Define clang's feature test pseudomacros to always evaluate to 0 if we are using a compiler that doesn't implement them. This lets us use the macros easily in standard headers (e.g. stdatomic.h, which should be the subject of my next commit). Approved by: dim (mentor) Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Sat Dec 24 12:28:23 2011 (r228858) +++ head/sys/sys/cdefs.h Sat Dec 24 13:28:49 2011 (r228859) @@ -617,4 +617,14 @@ #endif #endif +#ifndef __has_feature +#define __has_feature(x) 0 +#endif +#ifndef __has_include +#define __has_include(x) 0 +#endif +#ifndef __has_builtin +#define __has_builtin(x) 0 +#endif + #endif /* !_SYS_CDEFS_H_ */