From owner-freebsd-questions@FreeBSD.ORG Thu Jun 8 14:47:03 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC2D716D1BC for ; Thu, 8 Jun 2006 12:42:40 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 773C143D4C for ; Thu, 8 Jun 2006 12:42:38 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.pc (host5.bedc.ondsl.gr [62.103.39.229]) (authenticated bits=128) by igloo.linux.gr (8.13.6/8.13.6/Debian-1) with ESMTP id k58Ch7fR001482 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 8 Jun 2006 15:43:13 +0300 Received: from gothmog.pc (gothmog [127.0.0.1]) by gothmog.pc (8.13.6/8.13.6) with ESMTP id k58CiUOo004668; Thu, 8 Jun 2006 15:44:33 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.pc (8.13.6/8.13.6/Submit) id k58CiU1b004667; Thu, 8 Jun 2006 15:44:30 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Thu, 8 Jun 2006 15:44:30 +0300 From: Giorgos Keramidas To: Saifi Message-ID: <20060608124430.GD4442@gothmog.pc> References: <20060608051546.27320.qmail@coolhost77.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060608051546.27320.qmail@coolhost77.com> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-2.792, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 1.61, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-questions@freebsd.org Subject: Re: __P macro X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2006 14:47:05 -0000 On 2006-06-08 10:45, Saifi wrote: > Hi: > > Most of the racoon code uses __P macro. > > and the __P macro is defined as - > > #undef __P > #ifndef __P > #if __STDC__ > #define __P(protos) protos > #else > #define __P(protos) () > #endif > #endif > > It seems to make many expressions difficult to read - > eg. > > static int (*pkrecvf[]) __P((caddr_t *)) = { > ... > } > > What is the downside if this macro is not used in defining new > function prototypes ? (working with FreeBSD 5.4 and above with > gcc 3.x compiler) Your program may fail to compile with compilers that do not support ANSI C function prototypes. This includes some old, pre-ANSI compilers. How important these compilers are for your particular application is debatable though.