Date: Sun, 7 Jan 1996 22:31:58 -0800 (PST) From: obrien@cs.ucdavis.edu (David E. O'Brien) To: chuckr@glue.umd.edu (Chuck Robey) Cc: FreeBSD-chat@freebsd.org Subject: Re: cpp construction Message-ID: <9601080632.AA25848@toadflax.cs.ucdavis.edu> In-Reply-To: <Pine.SUN.3.91.960107232459.7194E-100000@cappuccino.eng.umd.edu> from "Chuck Robey" at Jan 7, 96 11:31:27 pm
next in thread | previous in thread | raw e-mail | index | archive | help
>
> static int null_node_alloc __P((struct mount *mp, struct vnode *lowervp,
> struct vnode **vpp));
>
> It's that __P thing, with the double parens, that has me wondering. I'd
> really appreciate some help.
Somewhere else (read in a file included before this one) is:
#ifdef __STDC__ /* plus GCC and anything else that understand prototypes */
# define __P(args) args
#else
# define __P(args) ()
#endif
Thus under FreeBSD we get:
static int null_node_alloc (struct mount *mp, struct vnode *lowervp,
vnode **vpp);
And if we tried this using cc on SunOS 4.x:
static int null_node_alloc ();
So it is a method for increase portablity between K&R and Ansi-C.
-- David (obrien@cs.ucdavis.edu)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9601080632.AA25848>
