Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jan 2002 02:04:43 -0800
From:      Michael Smith <msmith@freebsd.org>
To:        Dallas De Atley <deatley@apple.com>
Cc:        arch@freebsd.org
Subject:   Re: __P macro question 
Message-ID:  <200201301004.g0UA4hb01286@mass.dis.org>
In-Reply-To: Your message of "Tue, 29 Jan 2002 20:15:27 PST." <FD5651F8-1537-11D6-993F-003065766C3C@apple.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 	I asked a question of our resident experts here at Apple and was 
> eventually directed to you by Jordan Hubbard.

"I send you this for your consideration". G'day. 8)

> 	My question was: What is the __P macro used for in all those 
> function declarations in the BSD libraries and do we still need it?

It's used to hide function arguments from non-ANSI compilers.  No, we 
don't still need it.

> 	It was explained that this macro is used for pre-ANSI C compilers 
> and that while Darwin and thus Mac OS X compile with gcc 2.95, we retain 
> it in our code so that the diffs between our code and yours is small. 
> This enables the Darwin team to keep on top of changes between FreeBSD 
> and Darwin.

That's not a bad reason, although the diffs are already pretty horrific.  
As a general rule, FreeBSD folk try to avoid gratuitous diffs where 
possible, hence __P() living on long after it should have died.

> 	Is the __P macro still necessary? Are there pre ANSI C compilers 
> FreeBSD wishes to support or is this macro effectively benign but 
> useless?

That would be a generous interpretation of the situation.

Regards,
Mike



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201301004.g0UA4hb01286>