From owner-freebsd-current Mon Jan 13 12:43:52 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 45DB037B401; Mon, 13 Jan 2003 12:43:50 -0800 (PST) Received: from puffin.mail.pas.earthlink.net (puffin.mail.pas.earthlink.net [207.217.120.139]) by mx1.FreeBSD.org (Postfix) with ESMTP id B78A643F43; Mon, 13 Jan 2003 12:43:49 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from pool0169.cvx21-bradley.dialup.earthlink.net ([209.179.192.169] helo=mindspring.com) by puffin.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 18YBQs-0005TF-00; Mon, 13 Jan 2003 12:43:43 -0800 Message-ID: <3E2324B0.585FD417@mindspring.com> Date: Mon, 13 Jan 2003 12:42:24 -0800 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Marcel Moolenaar Cc: Bruce Evans , Jake Burkholder , sparc@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: [PATCH] Re: fpsetmask on sparc64 References: <20030113034638.GA2310@dhcp01.pn.xcllnt.net> <20030113190710.I11541-100000@gamplex.bde.org> <20030113100558.GA3423@dhcp01.pn.xcllnt.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4e1a62e94264aa9b04a7bb99bada3d2853ca473d225a0f487350badd9bab72f9c350badd9bab72f9c Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Marcel Moolenaar wrote: > This part is what makes me opt for moving the prototypes to the > MD header. These functions are trivial most of the time that > inlining them makes sense. I don't see why other platforms can't > or won't inline in the future. I think so, too, but it depends on the hardware. > What about signaling the MI header about the existence (or non- > existence) of inline functions and/or macros in the MD header so > that the MI header can optionally provide the prototypes? This > can be done by having the MD header define (or undefine) some > macro (or set of macros). This would be a Bad Thing(tm). Specifically, it would throw some namespace pollution into the implementation space, which is not something that should be permitted, I think. > Also, it appears to me that we always have to provide non-inlined > versions in libc for when inlining is disabled. See ctype.h. > I may misinterpret the comment though... No, this is true. There is also a problem with the "GNUC" tests in the inilining definitions, particularly, since there is a cdefs.h in scope, and there's a portable way to get rid of the "GNUC"-isms. > Am I right when I say that removing floatingpoint.h (both the MD > file and the MI link) will fix the port, independent of how we > shape ieeefp.h? IMO, no. The port will remain broken. Kris is the person to ask on this, actually, since he's the one who reported the problem, initially. > > - We implement as a link to > > to get the MD and implementation details right and the MI details wrong. > > Perhaps the broken ports include this and not . > > Then they would be less broken. > > Some configure scripts may check for for compatibility > with SunOS/Solaris. I doubt they will check And here's the reason why. The SPARC platform for FreeBSD will need to be sensitive to the fact that people will port from SPARC running some other OS to SPARC running FreeBSD. The most likely source of ported code in this case is SPARC running Solaris, which has the header file in question. > In summary: I like Terry's second patch but am sensitive to having > the MI prototypes in as well as allowing inlining. > What about something like the following to keep the prototypes in > , but still allow inlining (in combination with Terrys > patch): This is a patch post-application of my patch; you are missing the floating point function prototypes in the non-inlined case. 8-). But it's fixable. I personally worry about putting stuff into the namespace that people might then key off of when doing ports or other work, in order to let them use FreeBSD-isms. I'm particularly sensitive on this point, because I personally abused the PTHREAD_MUTEX_INITIALIZER to distinguish between draft 4 and standard implementations, and then that was the first thing that they added going from draft 4 to standard, without implementing all of the rest of the standard first. 8-(. This broke a lot of pthreaded code that I worked on and threw the patches back to the maintainers, including MySQL, OpenLDAP, ACAP, and anything statically declaring the mutex-using classes that implement using threads in the C++ STL code out of MCSCA. It was a real mess when FreeBSD made that change. 8-(. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message