*BSD News Article 56056


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.ecn.uoknor.edu!news.ysu.edu!usenet.ins.cwru.edu!agate!howland.reston.ans.net!vixen.cso.uiuc.edu!uwm.edu!chi-news.cic.net!newsfeed.internetmci.com!news.sprintlink.net!sundog.tiac.net!gary
From: gary@wheel.tiac.net (Gary D. Duzan)
Newsgroups: comp.unix.bsd.netbsd.misc
Subject: Re: What is __P() for?
Date: 28 Nov 1995 15:52:52 GMT
Organization: Brain Dead Innovations
Lines: 22
Message-ID: <49fb8k$h9u@sundog.tiac.net>
References: <498eac$2gm@taco.cc.ncsu.edu>
NNTP-Posting-Host: wheel.tiac.net

In article <498eac$2gm@taco.cc.ncsu.edu>,
Kevin P. Neal <kpneal@eos.ncsu.edu> wrote:
=>What is the purpose of this:
=>
=>int __P(functname(int arg)); 
=>
=>(Did I do that right?) What is the point? Doesn't it just
=>get converted by the preprocessor into (funct...) anyway?
=>
=>I think this has something to do with ANSI C, but what is the
=>story behind it?

   I believe the __P() stuff automagically lets you compile on either
ANSI or pre-ANSI (no prototypes) C compilers automagically. And the
syntax is more like "int functname __P((int arg));". You can see it
in action in /usr/include/*.h.

                                      Gary D. Duzan
                         Humble Practitioner of the Computer Arts