From owner-freebsd-current Sun Dec 8 8:57:13 2002 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 5E2CB37B401 for ; Sun, 8 Dec 2002 08:57:11 -0800 (PST) Received: from espresso.q9media.com (espresso.q9media.com [65.39.129.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF90343EBE for ; Sun, 8 Dec 2002 08:57:10 -0800 (PST) (envelope-from mike@espresso.q9media.com) Received: by espresso.q9media.com (Postfix, from userid 1002) id D906B9BC3; Sun, 8 Dec 2002 11:47:18 -0500 (EST) Date: Sun, 8 Dec 2002 11:47:18 -0500 From: Mike Barcroft To: Marc Recht Cc: freebsd-current@FreeBSD.org Subject: Re: sys/file.h and POSIX Message-ID: <20021208114718.G74206@espresso.q9media.com> References: <509390000.1039349835@leeloo.intern.geht.de> <20021208104335.E74206@espresso.q9media.com> <619340000.1039364545@leeloo.intern.geht.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <619340000.1039364545@leeloo.intern.geht.de>; from marc@informatik.uni-bremen.de on Sun, Dec 08, 2002 at 05:22:25PM +0100 Organization: The FreeBSD Project 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 Marc Recht writes: > The standard is specified to get the standard functions. Eg. if i specify > _POSIX_C_SOURCE=200112L then I want (for example) POSIX's flockfile, if the > OS supports POSIX. This doesn't mean that I don't want rpc. This means that > I need to change third party code, which needs POSIX functions, not to > declare POSIX/POSIX_C_SOURCE/XSI to get BSD/other functions (and inderectly > the POSIX 200112 functions). Again, I'll point you at section 2.2 of POSIX.1-2001: : 2.2.1 Strictly Conforming POSIX Application : : A Strictly Conforming POSIX Application is an application that : requires only the facilities described in IEEE Std 1003.1-2001. [...] A conforming application cannot make use of facilities outside the scope of the standard. This means that if you define _POSIX_C_SOURCE=200112L you don't want RPC. > Since it isn't that way on any UNIX (at least I know about) vendors are > forced to do special treatment for FreeBSD. Which is IMHO really bad and > may lead to less support for FreeBSD. 4.4BSD (and earlier?) and most derived systems have many conditionals to prevent namespace pollution in the standards-case. So why do we do this? To prevent screwage of perfectly valid applications that use the same keywords as system extentions to the standard. For instance, the major() macro in is a very common and likely to be used word, so it is not defined in the standards case to prevent POSIX applications that define a different major() macro from failing to compile. > IMHO this is bad and breaks compilation of much third-party code. Not really. Conforming applications have no trouble (obviously), pseudo-conforming applications only need a little work (removing bogus POSIX keywords that specify conformance), and non-conforming BSD applications (the majority of software) have no problems. > I've read/looked at the standard (see my posting to standards@) and I don't > think it forces FreeBSD's behaviour. I even think FreeBSD's behaviour isn't > the spirit of the standard. FreeBSD's behaviour is consistent with BSD's behaviour. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message