From owner-freebsd-standards@FreeBSD.ORG Fri Jan 27 16:09:58 2012 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE75A106566C; Fri, 27 Jan 2012 16:09:58 +0000 (UTC) (envelope-from tijl@coosemans.org) Received: from mailrelay006.isp.belgacom.be (mailrelay006.isp.belgacom.be [195.238.6.172]) by mx1.freebsd.org (Postfix) with ESMTP id 95F168FC0C; Fri, 27 Jan 2012 16:09:57 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EAO/IIk9bsYWl/2dsb2JhbABErB+CMYEGgXIBAQVWIxALGC45HogXuCWJEAElBgkBCAEGBAMDBAwZgmyBNQUhAQIggxwEiAyWOYkj Received: from 165.133-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.133.165]) by relay.skynet.be with ESMTP; 27 Jan 2012 16:59:49 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.5/8.14.5) with ESMTP id q0RFxmga003618; Fri, 27 Jan 2012 16:59:48 +0100 (CET) (envelope-from tijl@coosemans.org) From: Tijl Coosemans To: freebsd-standards@freebsd.org Date: Fri, 27 Jan 2012 16:59:40 +0100 User-Agent: KMail/1.13.7 (FreeBSD/10.0-CURRENT; KDE/4.7.3; i386; ; ) References: <4F1AAA75.5050500@FreeBSD.org> <20120122192526.GA52071@zim.MIT.EDU> In-Reply-To: <20120122192526.GA52071@zim.MIT.EDU> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1395942.TgWN4u9Efg"; protocol="application/pgp-signature"; micalg=pgp-sha256 Content-Transfer-Encoding: 7bit Message-Id: <201201271659.45930.tijl@coosemans.org> Cc: David Schultz , theraven@freebsd.org, python@freebsd.org, Andriy Gapon , gogo@cs.uni-sb.de Subject: Re: pyconfig.h and freebsd10: _POSIX_C_SOURCE and _XOPEN_SOURCE X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jan 2012 16:09:59 -0000 --nextPart1395942.TgWN4u9Efg Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable On Sunday 22 January 2012 20:25:26 David Schultz wrote: > On Sat, Jan 21, 2012, Andriy Gapon wrote: >> It seems that python27's pyconfig.h (artificially?) limits visibility of= system >> APIs by setting _POSIX_C_SOURCE to 200112L and _XOPEN_SOURCE to 600. >> This might not actually change much for earlier FreeBSD versions. >>=20 >> But in FreeBSD 10 we now have interfaces from POSIX 200809, specifically= some >> things that are then used by xlocale.h. >>=20 >> Now take an example of py-lxml port. It depends on both libxslt and pyt= hon >> (obviously). libxslt doesn't have any limitations in POSIX interfaces t= hat it >> uses, so it detects xlocale.h and uses it. xlocale.h depends on definit= ion of >> locale_t in locale.h. But since locale_t has been introduced in POSIX 2= 008 its >> declaration is under __POSIX_VISIBLE >=3D 200809. And because of pyconf= ig.h, >> py-lxml build doesn't see locale_t and so the build fails. >>=20 >> This is probably an issue that the upstream should also consider. >>=20 >> Having briefly looked at python27's configure script I wonder if we shou= ld set >> define_xopen_source=3Dno for FreeBSD 10 (like it has been done for FreeB= SD/4.*). >>=20 >> But in general I am not sure why python has to limit itself to those lev= els of >> interfaces (_POSIX_C_SOURCE 200112L and _XOPEN_SOURCE 600). >>=20 >> Thoughts, ideas, suggestions? >> Thank you! >=20 > Technically it's a problem with python. If you ask for a strict > POSIX environment (doesn't matter what version) and also #include > a non-POSIX header, there's no guarantee about what you'll get. > I've CC'd the xlocale author in case he wants to comment or > voluntarily make xlocale work in an otherwise strict POSIX > environment, but that's not officially supported. The POSIX feature macros only mean that headers that are part of the standard need to behave as defined by the standard. Non-standard headers like xlocale.h can do whatever they want. So if that header wants to expose a new locale API it can do so, but then it must also expose locale_t of course, because you cannot use the API without it. However, xlocale.h is a very ugly header (does different things depending on which headers have been included already), and some of the function prototypes have become part of the latest POSIX standard and need to be moved to different headers (strxfrm_l, strcoll_l,...). So it may be better to move all prototypes to their respective headers and remove xlocale.h (or leave a minimal header like glibc seems to have done). Then libxslt would have to be patched to support plain POSIX and not require xlocale.h. --nextPart1395942.TgWN4u9Efg Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iF4EABEIAAYFAk8iyfEACgkQfoCS2CCgtivNfwD/SQkWxgm2V9qcsXIBAOa0M2mT uydibAy1gl2NJ3pwBR4A/3IMuWBTkF9lac5SUuydEEICUzS/IA3iDV6UK2vwV9dZ =pFYg -----END PGP SIGNATURE----- --nextPart1395942.TgWN4u9Efg--