Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Dec 2002 14:26:12 -0800 (PST)
From:      Nate Lawson <nate@root.org>
To:        Mike Barcroft <mike@FreeBSD.org>
Cc:        current@freebsd.org
Subject:   Re: __BSD_VISIBLE and u_int
Message-ID:  <Pine.BSF.4.21.0212131423560.37378-100000@root.org>
In-Reply-To: <20021211195330.A50528@espresso.q9media.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 11 Dec 2002, Mike Barcroft wrote:
> Nate Lawson <nate@root.org> 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?
> 
> <sys/types.h> 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 ?

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.

-Nate


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0212131423560.37378-100000>