From owner-freebsd-current Fri Dec 13 16: 5: 8 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 9E23537B401 for ; Fri, 13 Dec 2002 16:05:07 -0800 (PST) Received: from espresso.q9media.com (espresso.q9media.com [65.39.129.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id F3A6F43EB2 for ; Fri, 13 Dec 2002 16:05:06 -0800 (PST) (envelope-from mike@espresso.q9media.com) Received: by espresso.q9media.com (Postfix, from userid 1002) id 4651B9BC3; Fri, 13 Dec 2002 18:55:03 -0500 (EST) Date: Fri, 13 Dec 2002 18:55:03 -0500 From: Mike Barcroft To: Nate Lawson Cc: current@freebsd.org Subject: Re: __BSD_VISIBLE and u_int Message-ID: <20021213185503.G61753@espresso.q9media.com> References: <20021211195330.A50528@espresso.q9media.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ; from nate@root.org on Fri, Dec 13, 2002 at 02:26:12PM -0800 Organization: The FreeBSD Project 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 Nate Lawson writes: > On Wed, 11 Dec 2002, Mike Barcroft wrote: > > Nate Lawson writes: > > > What's the proper way to get a typedef for u_int? Is there a doc > > > somewhere on what we expect in terms of #defines for 3rd party application > > > authors? > > > > will give you a typedef, provided you aren't writing a > > POSIX or X/Open application. If you're writing a POSIX or X/Open > > application (the only time __BSD_VISIBLE is false) you'll have to do > > the typedef manually in your application. > > Hmm, which of these defines claims posix src? -D_ANSI_SOURCE ? _ANSI_SOURCE means a strictly conforming C89 application. Everything in sys is off limits for such a program. > cc -O -c -O -pipe -mcpu=pentiumpro -mcpu=pentiumpro -I./../include > -I./.. -DDIRENT=1 -DDIRENT=1 -DSTDC_HEADERS=1 -DHAVE_UNISTD_H=1 > -DHAVE_FCNTL_H=1 -DHAVE_ST_RDEV=1 -DHAVE_TM_ZONE=1 > -DHAVE_LONG_FILE_NAMES=1 -DHAVE_RESTARTABLE_SYSCALLS=1 -D_ANSI_SOURCE > -DHAVE_DEV_CONSOLE=1 os.c > In file included from os.c:25: > /usr/include/sys/file.h:130: syntax error before "u_int" > > > u_int is undocumented and unportable, so it probably shouldn't be > > used. It's only 3 characters shorter than `unsigned' anyway. > > It's for ports. I fixed a port like this recently. _ANSI_SOURCE was actually added by the port, not the application vendor, in that case. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message