Date: Thu, 8 Jun 2006 15:44:30 +0300 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Saifi <saifi@twincling.org> Cc: freebsd-questions@freebsd.org Subject: Re: __P macro Message-ID: <20060608124430.GD4442@gothmog.pc> In-Reply-To: <20060608051546.27320.qmail@coolhost77.com> References: <20060608051546.27320.qmail@coolhost77.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2006-06-08 10:45, Saifi <saifi@twincling.org> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060608124430.GD4442>
