Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Aug 1999 15:43:02 -0700
From:      Matthew Hunt <mph@astro.caltech.edu>
To:        Marc Tardif <intmktg@CAM.ORG>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: prototypes with __P
Message-ID:  <19990806154302.A74040@wopr.caltech.edu>
In-Reply-To: <Pine.SOL.4.10.9908061827240.41-100000@Stratus.CAM.ORG>; from Marc Tardif on Fri, Aug 06, 1999 at 06:33:30PM -0400
References:  <Pine.SOL.4.10.9908061827240.41-100000@Stratus.CAM.ORG>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Aug 06, 1999 at 06:33:30PM -0400, Marc Tardif wrote:

> If anyone could point me in the right direction, and maybe even show me
> how I could've found the answer myself, I'd appreciate.

It's defined in /usr/include/sys/cdefs.h, among other places.

I found it with:

cd /usr/include
find . -name \*.h | xargs grep 'define.*__P'

(The regular expression given to grep matches "define", zero or more
other characters that we don't care about, then "__P".)

The intent of the macro is to allow the programmer to take advantage
of ANSI-style function prototypes (and the error checking they provide)
while not breaking the code on K&R compilers that don't support ANSI
prototypes.

I have no idea how much of the FreeBSD code would actually build on
a K&R compiler.

-- 
Matthew Hunt <mph@astro.caltech.edu> * Inertia is a property
http://www.pobox.com/~mph/           * of matter.


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990806154302.A74040>