This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author WanderingLogic
Recipients Arfrever, WanderingLogic, lemburg, loewis, pitrou, skrah, vstinner
Date 2014-10-31.21:57:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1414792636.06.0.0157172663844.issue22747@psf.upfronthosting.co.za>
In-reply-to
Content
I am working on using my resources at Intel to put some pressure on Google to fix some of the (many) problems in the Bionic libc.

I have a sort of "polyfill" library that implements locale.h, langinfo.h, as well as the structure definitions for wchar.h, and it borrows the utf8 mbs*towcs() and wcs*tombs() implementations from FreeBSD.  It implements a setlocale() and nl_langinfo() that starts in locale "C", fakes it as though the user's envvars are set to "C.UTF-8" (so if you call setlocale(LC_ALL, "") the encoding is changed to UTF-8).

But Bionic has been broken for many years, and it will most likely take many more years before I (or somebody) can arrange the right set of things to get it fixed.  It is not really in Google's interest to have people writing non-JVM code, so they seem to only grudgingly support it, their JVM APIs are the "walled garden" that keeps apps sticky to their platform, while allowing them to quickly switch to new processor architectures if they need to.

But all of that is not really germane to this bug.  The fact is that cpython, when compiled for a system with no langinfo.h creates an executable that does nothing but crash.

What other systems (other than Android) have no langinfo.h?  (Alternatively, why has this feature-test been in configure.ac for many years?)  If the solution for Android is "it's android's bug and they should fix it" then shouldn't we remove all the #ifdef HAVE_LANGINFO_H tests from the code and just let compilation fail on systems that don't have langinfo.h?  That is option (1) or (2) that I suggested above.
History
Date User Action Args
2014-10-31 21:57:16WanderingLogicsetrecipients: + WanderingLogic, lemburg, loewis, pitrou, vstinner, Arfrever, skrah
2014-10-31 21:57:16WanderingLogicsetmessageid: <1414792636.06.0.0157172663844.issue22747@psf.upfronthosting.co.za>
2014-10-31 21:57:16WanderingLogiclinkissue22747 messages
2014-10-31 21:57:15WanderingLogiccreate