diff -r 0dd04c39fb89 Modules/_decimal/libmpdec/io.c --- a/Modules/_decimal/libmpdec/io.c Sat May 11 14:47:12 2013 -0400 +++ b/Modules/_decimal/libmpdec/io.c Sun May 12 00:42:30 2013 +0200 @@ -34,7 +34,9 @@ #include #include #include +#ifdef HAVE_LOCALE_H #include +#endif #include "bits.h" #include "constants.h" #include "memory.h" diff -r 0dd04c39fb89 Modules/_localemodule.c --- a/Modules/_localemodule.c Sat May 11 14:47:12 2013 -0400 +++ b/Modules/_localemodule.c Sun May 12 00:42:30 2013 +0200 @@ -13,7 +13,9 @@ #include "Python.h" #include +#ifdef HAVE_LOCALE_H #include +#endif #include #include diff -r 0dd04c39fb89 Modules/main.c --- a/Modules/main.c Sat May 11 14:47:12 2013 -0400 +++ b/Modules/main.c Sun May 12 00:42:30 2013 +0200 @@ -3,7 +3,9 @@ #include "Python.h" #include "osdefs.h" +#ifdef HAVE_LOCALE_H #include +#endif #ifdef __VMS #error "PEP 11: VMS is now unsupported, code will be removed in Python 3.4" diff -r 0dd04c39fb89 Modules/python.c --- a/Modules/python.c Sat May 11 14:47:12 2013 -0400 +++ b/Modules/python.c Sun May 12 00:42:30 2013 +0200 @@ -1,7 +1,9 @@ /* Minimal main program -- everything is loaded from the library */ #include "Python.h" +#ifdef HAVE_LOCALE_H #include +#endif #ifdef __FreeBSD__ #include diff -r 0dd04c39fb89 Modules/readline.c --- a/Modules/readline.c Sat May 11 14:47:12 2013 -0400 +++ b/Modules/readline.c Sun May 12 00:42:30 2013 +0200 @@ -10,6 +10,9 @@ #include #include #include +#ifdef HAVE_LOCALE_H +#include +#endif #if defined(HAVE_SETLOCALE) /* GNU readline() mistakenly sets the LC_CTYPE locale. @@ -17,7 +20,6 @@ * We must save and restore the locale around the rl_initialize() call. */ #define SAVE_LOCALE -#include #endif #ifdef SAVE_LOCALE diff -r 0dd04c39fb89 Objects/stringlib/localeutil.h --- a/Objects/stringlib/localeutil.h Sat May 11 14:47:12 2013 -0400 +++ b/Objects/stringlib/localeutil.h Sun May 12 00:42:30 2013 +0200 @@ -1,6 +1,8 @@ /* stringlib: locale related helpers implementation */ +#ifdef HAVE_LOCALE_H #include +#endif #ifndef STRINGLIB_IS_UNICODE # error "localeutil is specific to Unicode" diff -r 0dd04c39fb89 Python/fileutils.c --- a/Python/fileutils.c Sat May 11 14:47:12 2013 -0400 +++ b/Python/fileutils.c Sun May 12 00:42:30 2013 +0200 @@ -4,8 +4,10 @@ # include #endif +#ifdef HAVE_LOCALE_H +#include +#endif #ifdef HAVE_LANGINFO_H -#include #include #endif diff -r 0dd04c39fb89 Python/formatter_unicode.c --- a/Python/formatter_unicode.c Sat May 11 14:47:12 2013 -0400 +++ b/Python/formatter_unicode.c Sun May 12 00:42:30 2013 +0200 @@ -3,7 +3,9 @@ of int.__float__, etc., that take and return unicode objects */ #include "Python.h" +#ifdef HAVE_LOCALE_H #include +#endif /* Raises an exception about an unknown presentation type for this * type. */ diff -r 0dd04c39fb89 Python/frozenmain.c --- a/Python/frozenmain.c Sat May 11 14:47:12 2013 -0400 +++ b/Python/frozenmain.c Sun May 12 00:42:30 2013 +0200 @@ -2,7 +2,9 @@ /* Python interpreter main program for frozen scripts */ #include "Python.h" +#ifdef HAVE_LOCALE_H #include +#endif #ifdef MS_WINDOWS extern void PyWinFreeze_ExeInit(void); diff -r 0dd04c39fb89 Python/pystrtod.c --- a/Python/pystrtod.c Sat May 11 14:47:12 2013 -0400 +++ b/Python/pystrtod.c Sun May 12 00:42:30 2013 +0200 @@ -1,7 +1,9 @@ /* -*- Mode: C; c-file-style: "python" -*- */ #include +#ifdef HAVE_LOCALE_H #include +#endif /* Case-insensitive string match used for nan and inf detection; t should be lower-case. Returns 1 for a successful match, 0 otherwise. */ diff -r 0dd04c39fb89 Python/pythonrun.c --- a/Python/pythonrun.c Sat May 11 14:47:12 2013 -0400 +++ b/Python/pythonrun.c Sun May 12 00:42:30 2013 +0200 @@ -24,8 +24,10 @@ #include "malloc.h" /* for alloca */ #endif +#ifdef HAVE_LOCALE_H +#include +#endif #ifdef HAVE_LANGINFO_H -#include #include #endif diff -r 0dd04c39fb89 Python/sysmodule.c --- a/Python/sysmodule.c Sat May 11 14:47:12 2013 -0400 +++ b/Python/sysmodule.c Sun May 12 00:42:30 2013 +0200 @@ -36,8 +36,10 @@ #include #endif +#ifdef HAVE_LOCALE_H +#include +#endif #ifdef HAVE_LANGINFO_H -#include #include #endif diff -r 0dd04c39fb89 configure.ac --- a/configure.ac Sat May 11 14:47:12 2013 -0400 +++ b/configure.ac Sun May 12 00:42:30 2013 +0200 @@ -1518,7 +1518,7 @@ CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw" AC_CHECK_HEADERS(asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \ fcntl.h grp.h \ -ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \ +ieeefp.h io.h locale.h langinfo.h libintl.h ncurses.h process.h pthread.h \ sched.h shadow.h signal.h stdint.h stropts.h termios.h \ unistd.h utime.h \ poll.h sys/devpoll.h sys/epoll.h sys/poll.h \ diff -r 0dd04c39fb89 pyconfig.h.in --- a/pyconfig.h.in Sat May 11 14:47:12 2013 -0400 +++ b/pyconfig.h.in Sun May 12 00:42:30 2013 +0200 @@ -516,6 +516,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_TIPC_H +/* Define to 1 if you have the header file. */ +#undef HAVE_LOCALE_H + /* Define to 1 if you have the `lockf' function. */ #undef HAVE_LOCKF