From owner-svn-src-head@freebsd.org Thu Jun 14 08:26:05 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25492100FFF8; Thu, 14 Jun 2018 08:26:05 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 938C17D11F; Thu, 14 Jun 2018 08:26:04 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 26CDD104D6AC; Thu, 14 Jun 2018 18:25:53 +1000 (AEST) Date: Thu, 14 Jun 2018 18:25:44 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Hans Petter Selasky cc: Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r335053 - in head/sys: compat/freebsd32 compat/linux fs/nfsclient kern sys In-Reply-To: <90566a73-c793-2cc4-27ac-039bf83fd2d0@selasky.org> Message-ID: <20180614181525.I1417@besplex.bde.org> References: <201806131222.w5DCM00c001080@repo.freebsd.org> <90566a73-c793-2cc4-27ac-039bf83fd2d0@selasky.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=FNpr/6gs c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=veEjxAY5SaK3AuIXAPsA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 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: Thu, 14 Jun 2018 08:26:05 -0000 On Thu, 14 Jun 2018, Hans Petter Selasky wrote: > On 06/13/18 14:22, Bruce Evans wrote: >> [... inlines for makedev(), etc.] > > Can you use all macros here? This breaks OFED, because __makedev() is used to > initialize variables. See another reply. I will change them to macros and fear breaking them with a gccism instead of with with inlines. I should have worried more about the inlines. Plain inline is only in C99 or a gcc extension starting in gcc-2.mumble. Portability of sys/types.h is more important than for any other header in the system except sys/cdevs.h. So it must compile with C90 compilers and should compile with K&R compilers. For makedev(), etc., it spells inline as __inline so the inline feature can be turned off easily (the functions then become static and repeated every time sys/types.h is included, but this probably happens anyway with -O0 and it works for any compiler). Turning off the statement-expression feature needed to write safe macros is not so easy. In , this feature is only used in mostly-kernel headers and in stdatomic.h. Bruce