Issue #10910: merge from 3.5

This commit is contained in:
Ned Deily 2016-08-15 03:23:23 -04:00
commit 6349612a8e
2 changed files with 14 additions and 1 deletions

View File

@ -677,7 +677,9 @@ extern pid_t forkpty(int *, char *, struct termios *, struct winsize *);
#ifdef __FreeBSD__
#include <osreldate.h>
#if __FreeBSD_version > 500039
#if (__FreeBSD_version >= 500040 && __FreeBSD_version < 602113) || \
(__FreeBSD_version >= 700000 && __FreeBSD_version < 700054) || \
(__FreeBSD_version >= 800000 && __FreeBSD_version < 800001)
# define _PY_PORT_CTYPE_UTF8_ISSUE
#endif
#endif
@ -688,6 +690,12 @@ extern pid_t forkpty(int *, char *, struct termios *, struct winsize *);
#endif
#ifdef _PY_PORT_CTYPE_UTF8_ISSUE
#ifndef __cplusplus
/* The workaround below is unsafe in C++ because
* the <locale> defines these symbols as real functions,
* with a slightly different signature.
* See issue #10910
*/
#include <ctype.h>
#include <wctype.h>
#undef isalnum
@ -705,6 +713,7 @@ extern pid_t forkpty(int *, char *, struct termios *, struct winsize *);
#undef toupper
#define toupper(c) towupper(btowc(c))
#endif
#endif
/* Declarations for symbol visibility.

View File

@ -165,6 +165,10 @@ Build
- Issue #26662: Set PYTHON_FOR_GEN in configure as the Python program to be
used for file generation during the build.
- Issue #10910: Avoid C++ compilation errors on FreeBSD and OS X.
Also update FreedBSD version checks for the original ctype UTF-8 workaround.
What's New in Python 3.6.0 alpha 3
==================================