From owner-freebsd-chat Sun Jan 7 22:32:13 1996 Return-Path: owner-chat Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id WAA16495 for chat-outgoing; Sun, 7 Jan 1996 22:32:13 -0800 (PST) Received: from toadflax.cs.ucdavis.edu (toadflax.cs.ucdavis.edu [128.120.56.188]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id WAA16490 for ; Sun, 7 Jan 1996 22:32:11 -0800 (PST) Received: by toadflax.cs.ucdavis.edu (4.1/UCD.CS.2.6) id AA25848; Sun, 7 Jan 96 22:32:00 PST From: obrien@cs.ucdavis.edu (David E. O'Brien) Message-Id: <9601080632.AA25848@toadflax.cs.ucdavis.edu> Subject: Re: cpp construction To: chuckr@glue.umd.edu (Chuck Robey) Date: Sun, 7 Jan 1996 22:31:58 -0800 (PST) Cc: FreeBSD-chat@freebsd.org In-Reply-To: from "Chuck Robey" at Jan 7, 96 11:31:27 pm X-Mailer: ELM [version 2.4 PL24 ME8b] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-chat@freebsd.org Precedence: bulk > > 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)