msg188362 - (view) |
Author: Antonio Cavallo (cavallo71) |
Date: 2013-05-04 14:09 |
This patch adds autoconf.ac check for the locale.h file in addition to langinfo.h. The patch contains also a fix to Python/fileutils.c file. The android ndk provides locale.h but no langinfo.h: this fixes the issue. BTW bionic doesn't have any runtime support for locale at the moment in the standard build at least. |
|
|
msg188913 - (view) |
Author: Antoine Pitrou (pitrou) *  |
Date: 2013-05-11 12:30 |
There are more places where including locale.h is guarded by HAVE_LANGINFO_H. Also, there are places where including locale.h isn't guarded by anything (such as Python/formatter_unicode.c), so I don't think we need the new configure check. |
|
|
msg188940 - (view) |
Author: Antonio Cavallo (cavallo71) |
Date: 2013-05-11 18:36 |
I see, in that case wouldn't make more sense completely remove the check for the langinfo.h either? I think is better to close the issue to keep the noise low. Thanks |
|
|
msg188942 - (view) |
Author: Antoine Pitrou (pitrou) *  |
Date: 2013-05-11 18:38 |
You might have misunderstood me. Since locale.h appears to exist on all systems (including Android) there's no need to add a check for it in configure. On the other hand, it is correct to fix the existing guards like your patch proposes to do, except that there appears to be more places to fix. I'm reopening the issue. |
|
|
msg188969 - (view) |
Author: Antonio Cavallo (cavallo71) |
Date: 2013-05-11 23:10 |
ok I see it, thanks. I've attached a new patch fixing the files with the locale's guards. Modules/readline.c might have the SAVE_LOCALE renamed into HAVE_SETLOCALE but the patch doesn't address that bit. Android has definitively locale.h but it is a dummy implementation at the moment. I'm trying with http://www.crystax.net/en/android/ndk instead but still no luck. |
|
|
msg264159 - (view) |
Author: Xavier de Gaye (xdegaye) *  |
Date: 2016-04-25 07:59 |
Android API level 21 has a full fledged locale.h now. There is still no langinfo.h, this issue is a duplicate of issue #22747. |
|
|
msg264195 - (view) |
Author: Stefan Krah (skrah) *  |
Date: 2016-04-25 19:17 |
Okay, closing as a duplicate (the second patch here that checks for locale.h seems too broad to me since it's a standard header). |
|
|
msg264196 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2016-04-25 19:39 |
New changeset cc501d439239 by Stefan Krah in branch 'default': Issue #17905: Do not guard locale include with HAVE_LANGINFO_H. https://hg.python.org/cpython/rev/cc501d439239 |
|
|
msg264197 - (view) |
Author: Stefan Krah (skrah) *  |
Date: 2016-04-25 19:43 |
I think all locale includes are unguarded now. |
|
|