From owner-freebsd-standards Sun Dec 8 16:13:58 2002 Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8710837B401 for ; Sun, 8 Dec 2002 16:13:57 -0800 (PST) Received: from espresso.q9media.com (espresso.q9media.com [65.39.129.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id B9F2543EB2 for ; Sun, 8 Dec 2002 16:13:56 -0800 (PST) (envelope-from mike@espresso.q9media.com) Received: by espresso.q9media.com (Postfix, from userid 1002) id 55B179C10; Sun, 8 Dec 2002 19:04:04 -0500 (EST) Date: Sun, 8 Dec 2002 19:04:04 -0500 From: Mike Barcroft To: Marc Recht Cc: David Schultz , freebsd-standards@FreeBSD.ORG Subject: Re: POSIX and the real life or FreeBSD too strict ? Message-ID: <20021208190404.H74206@espresso.q9media.com> References: <584000000.1039360297@leeloo.intern.geht.de> <20021208203949.GA535@HAL9000.homeunix.com> <758430000.1039382013@leeloo.intern.geht.de> <20021208214357.GA945@HAL9000.homeunix.com> <794560000.1039386792@leeloo.intern.geht.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <794560000.1039386792@leeloo.intern.geht.de>; from marc@informatik.uni-bremen.de on Sun, Dec 08, 2002 at 11:33:12PM +0100 Organization: The FreeBSD Project Sender: owner-freebsd-standards@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: > > If you say -D_XOPEN_SOURCE=600 instead of -D_XOPEN_SOURCE_=600, > > the first test works fine. ;-) > Argh, too much copying between the systems. That was the rewritten one.. l > = sysconf has been > l = getpagesize(); > before. Which gives you (Wall): implicit declaration of function > `getpagesize'. But, _only_ on FreeBSD 5-current. Did you even look at the header to find out why? The conditional says `#if __XSI_VISIBLE <= 500 || __BSD_VISIBLE'. From this, one might draw the conclusion that getpagesize() was supported in X/Open up until version 500 (SUSv2). Now, compare this to the actual standards and one finds that in SUSv2 getpagesize() was marked LEGACY and in SUSv3 it was removed. If you want SUSv2 functions, use _XOPEN_SOURCE=500 and an appropriate _POSIX_C_SOURCE version. > > The second one looks like a bug in FreeBSD. > For me, too. As I explained in another thread in -current, requesting a standard and then using headers outside that standard's scope is unsupported. This is why no one has bother to change u_int to unsigned int in most non-standard headers. As for the extention to allow POSIX and BSD object to both be visible by defining an extra constant, I don't think this is a very good idea. You end up with each OS having a different escape word, each being unportable. A much more portable solution would be not to request a specific standard at all if one requires things outside that standard's scope. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message