Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Dec 2011 13:28:49 +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: r228859 - head/sys/sys
Message-ID:  <201112241328.pBODSnkH014994@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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_ */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112241328.pBODSnkH014994>