From owner-svn-src-head@FreeBSD.ORG Sat Apr 7 17:20:07 2012 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 F266B1065672; Sat, 7 Apr 2012 17:20:06 +0000 (UTC) (envelope-from theraven@FreeBSD.ORG) Received: from theravensnest.org (theravensnest.org [109.169.23.128]) by mx1.freebsd.org (Postfix) with ESMTP id 7E0F98FC15; Sat, 7 Apr 2012 17:20:06 +0000 (UTC) Received: from [192.168.0.2] (cpc1-cwma8-2-0-cust257.7-3.cable.virginmedia.com [82.20.153.2]) (authenticated bits=0) by theravensnest.org (8.14.4/8.14.4) with ESMTP id q37HJwtS013489 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sat, 7 Apr 2012 18:19:58 +0100 (BST) (envelope-from theraven@FreeBSD.ORG) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: David Chisnall In-Reply-To: <20120407171022.GB2737@zim.MIT.EDU> Date: Sat, 7 Apr 2012 18:19:53 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <44678A07-0CDB-40E5-A149-DFE55FB96611@FreeBSD.ORG> References: <201203011845.q21IjQqt091350@svn.freebsd.org> <20120302125334.GH75778@deviant.kiev.zoral.com.ua> <0F23DDD1-1CAC-4E72-A3CB-56B81F0C0790@FreeBSD.org> <20120407171022.GB2737@zim.MIT.EDU> To: David Schultz X-Mailer: Apple Mail (2.1257) Cc: Konstantin Belousov , svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Kirk McKusick Subject: Re: svn commit: r232351 - in head/sys: kern sys ufs/ffs ufs/ufs 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, 07 Apr 2012 17:20:07 -0000 On 7 Apr 2012, at 18:10, David Schultz wrote: > The biggest hinderance to using extern inline is that gcc and C99 > disagree about what it means, unless you use a reasonably recent > compiler in C99 mode. I first tried to use extern inline in the > tree several years after I backported gcc's C99 inline support, > and it still turned out to be a headache. You can detect which inlining mode is going to happen by checking the = value of __STDC_VERSION__ and the value of __GNUC_GNU_INLINE__. If = __STDC_VERSION__ is >=3D 199901L and __GNUC_GNU_INLINE__ is not defined = then you're in C99 inlining mode, otherwise you're in GNU inlining mode. = =20 On some projects with headers that need to work in both modes, we've = written some INLINE_EXTERN macros that do the right thing in whichever = mode we find ourselves compiling. It might be worth putting these in = cdefs.h if they're generally useful. David=