From owner-freebsd-arch Wed Jan 30 16:23:55 2002 Delivered-To: freebsd-arch@freebsd.org Received: from avocet.prod.itd.earthlink.net (avocet.mail.pas.earthlink.net [207.217.120.50]) by hub.freebsd.org (Postfix) with ESMTP id E552F37B421 for ; Wed, 30 Jan 2002 16:21:22 -0800 (PST) Received: from pool0175.cvx40-bradley.dialup.earthlink.net ([216.244.42.175] helo=mindspring.com) by avocet.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16W4yU-0006iM-00; Wed, 30 Jan 2002 16:21:11 -0800 Message-ID: <3C588DCF.AFC83B3@mindspring.com> Date: Wed, 30 Jan 2002 16:20:31 -0800 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Anders Andersson Cc: Jordan Hubbard , Dallas De Atley , arch@FreeBSD.ORG Subject: Re: __P macro question References: <3C57BED2.E1144F41@mindspring.com> <66467.1012412972@winston.freebsd.org> <20020130175639.GB2437@sushi.sanyusan.se> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Anders Andersson wrote: > On Wed, Jan 30, 2002 at 09:49:32AM -0800, Jordan Hubbard wrote: > > Even the NetBSD/amiga port uses gcc. > > NetBSD/amiga just very recently got ANSIfied also :-) I run SVR3.2, the last MMU-less System V, on my 68010 Amiga, not NetBSD, so it's irrelevent whether or not NetBSD/Amiga has been ASNI-fied as to whether or not the FreeBSD source code that I am interested in can be succeffuly compiled with a minimum of effort on platforms other than GCC, or, in the limit, platforms other than *BSD, or platforms other than FreeBSD. This is a code protability and comparative maintenance problem (and, to some, also an aesthetic problem). I consider the __P() to be ugly, but it solves some real problems: 1) Until NetBSD and OpenBSD follow suit, removing __P() will increase cosmetic differences, and therefore will incresingly impede code sharing. 2) The same is true for Darwin/MacOS X and BSD/OS; while it can be argued that BSD/OS is a marginal player at best (though FreeBSD still appears to be in the process of porting code from it), the same argument can not be made of Darwin/MacOS X. 3) I realize that the post that started this thread was by an Apple employee who could not see the use of the __P() construct, and had been referred to this forum by Jordan, and that this argues that the Darwin/MacOS X camp would be happy to go along with removing the __P(), if that were the consensus for the code involved. However, we should note that the MacOS UDF FS implementeation depends on having both block and character devices, so it is already a divergent code base, and we should be mindful of that fact. The bottom line is that the policy is *already* to not put it in to new code, and to use prototypes instead, rendering new code non-portable to older platforms and uncompilable by older tool chains. While I may disagree with this policy strenuously, it is the stated policy of the FreeBSD Project. People will remember that I noted that this was the policy in my very first posting in this thread. With that in mind, we are now talking about the liberal interpretation of that policy when visiting code that is not new, and making that change to code shared with the other *BSD variants, OpenBSD, NetBSD, Darwin/MacOS X, and BSD/OS. This liberal interpretation has been made by some to justify an increase n the cosmetic changes. While I agree that it improves the aesthetics of the code, I also believe that it damages both portability, and the ability to track differences between the code bases. I am also probably not alone in being a BSD person who would be just as happy with the FreeBSD, NetBSD, and OpenBSD code bases moving toward unification, even if such is more than a decade away, and with the Darwin/MacOS X code base being even more literally derived from the FreeBSD code base. I believe that removing the __P() macro -- indeed, removing all of the uses of the cdefs.h header file at all -- must, minimally, be done with the consensus of the NetBSD and OpenBSD and Darwin/MacOS X code bases to do the same. As an intentionally marginalized player, waiting for BSD/OS to agree to follow suit is not necessarily a requirement, but it is, to my mind, desirable to solicit such participation as possible from that camp, should the consensus decision be made by the other *BSD to go in that direction. I fear that yielding to full dependency on a single tool chain is not a good idea for the long term. Putting aside the argument that the next version of the license could be modified to apply to the GCC components that are liked into every program, thus causing a monumental problem going forward (Brett Glass, by advocating this position has thereby painted it as alarmist), there is another problem: the GCC does not generate as good code as the commercial compilers for non-Intel platforms. Indeed, even for Intel platforms, the "how to compile code for the Pentium 4" document reads as a litany of why one should not build their compiler in the way that GCC has built its compiler. While we may now argue that "the Alpha platform is dead", and justify in our own minds thereby the idea that GCC dependence is acceptable for that platform, that does not fix the known problems with GCC code generation for the IA64, Pentium 4, or SPARC processors, which we can not so quickly dismiss. As we have learned -- or should have learned -- diversity in the OS ecosystem is a positive influence on the code: it is better for having a Linux, a UnixWare, a Solaris, and, yes, a Windows NT. Artificially limiting code diversity in the realm of compilers seems, to me, an obvious mistake. It is my wish that, if nothing else be taken from this discussion, that people at least take this: The total removal of __P() or cdefs.h itself is not a decision which can be made in isolation by FreeBSD, with disregard for the other *BSD communities, and without a consensus that all will make the change at around the same time, if the change is in fact inevitable. Even if I personally believe such a decision to be misguided by youth and a zeal to discard inconvenient history, it is at least better that all the code move or none of the code move, than it is that some moves and some does not. Thank you, -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message