Date: Sat, 27 Jun 2015 15:13:15 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284890 - head/sys/sys Message-ID: <201506271513.t5RFDFeT019030@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Sat Jun 27 15:13:14 2015 New Revision: 284890 URL: https://svnweb.freebsd.org/changeset/base/284890 Log: Change detection for the gnu_inline attribute. According to the GCC documentation: "This attribute is available in GCC 4.1.3 and later. It is available if either of the preprocessor macros __GNUC_GNU_INLINE__ or __GNUC_STDC_INLINE__ are defined." We don't keep the gcc granularity up to the minor number so it's better to use the documented way. Current clang defines both macros. Reference: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Sat Jun 27 12:37:09 2015 (r284889) +++ head/sys/sys/cdefs.h Sat Jun 27 15:13:14 2015 (r284890) @@ -542,7 +542,7 @@ * using these but GCC-compatible compilers tend to support the extensions * well enough to use them in limited cases. */ -#if __GNUC_PREREQ__(4, 1) +#if defined(__GNUC_GNU_INLINE__) || defined(__GNUC_STDC_INLINE__) #if __has_attribute(artificial) || __GNUC_PREREQ__(4, 3) #define __gnu_inline __attribute__((__gnu_inline__, __artificial__)) #else
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506271513.t5RFDFeT019030>