From owner-freebsd-current Sun Oct 20 21: 4: 5 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1DB6437B401; Sun, 20 Oct 2002 21:04:04 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7BF2743E65; Sun, 20 Oct 2002 21:04:03 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.3/8.12.3) with ESMTP id g9L442pk078963; Sun, 20 Oct 2002 22:04:02 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 20 Oct 2002 22:03:45 -0600 (MDT) Message-Id: <20021020.220345.111000843.imp@bsdimp.com> To: peter@wemm.org Cc: mike@FreeBSD.ORG, kris@obsecurity.org, current@FreeBSD.ORG Subject: Re: Conflicting declarations for ffs() From: "M. Warner Losh" In-Reply-To: <20021020195557.972FD2A88D@canning.wemm.org> References: <20021020094608.F81582@espresso.q9media.com> <20021020195557.972FD2A88D@canning.wemm.org> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <20021020195557.972FD2A88D@canning.wemm.org> Peter Wemm writes: : Mike Barcroft wrote: : : > Kris Kennaway writes: : > > Take a look at: : > > : > > http://bento.freebsd.org/errorlogs/5-full/cqcam-0.91_1.log : > > : > > This port includes headers that declare the ffs() function twice: once : > > with an inline version and once with a prototype. : > > : > > Is the bug in the application, or the headers? : > : > It looks like a bug in our headers. I don't see why this is a new bug : > though. It looks like (which used to include) : > and i386's have been defining conflicting ffs() : > prototypes since at least 1999. : : machine/cpufunc.h is really meant to be a kernel header and isn't really : meant for consumption by userland. However, it is sortof useful. Most of the problem is that FreeBSD doesn't have an interface to inb, etc that's defined in an approved header. Bruce says cpufunc.h isn't it, but then doesn't define one. Others say that this is OK, but it really isn't. There needs to be something where this is well defined. Note, inb, et al, aren't i386 only, per se, because the concept of doing I/O is present even on machines with only memory mapped I/O. But defining a sane interface to it gets tricky... Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message