From owner-svn-src-all@freebsd.org Sat Jun 27 15:13:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 771A898D2C5; Sat, 27 Jun 2015 15:13:15 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6833F1C51; Sat, 27 Jun 2015 15:13:15 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5RFDFcJ019031; Sat, 27 Jun 2015 15:13:15 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5RFDFeT019030; Sat, 27 Jun 2015 15:13:15 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201506271513.t5RFDFeT019030@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 27 Jun 2015 15:13:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r284890 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 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: Sat, 27 Jun 2015 15:13:15 -0000 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