[Python-checkins] cpython (merge 3.5 -> default): Issue #10910: merge from 3.5
ned.deily
python-checkins at python.org
Mon Aug 15 03:24:29 EDT 2016
https://hg.python.org/cpython/rev/5ca8790f1161
changeset: 102664:5ca8790f1161
parent: 102661:a4101218364e
parent: 102663:27a99a722828
user: Ned Deily <nad at python.org>
date: Mon Aug 15 03:23:23 2016 -0400
summary:
Issue #10910: merge from 3.5
files:
Include/pyport.h | 11 ++++++++++-
Misc/NEWS | 4 ++++
2 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/Include/pyport.h b/Include/pyport.h
--- a/Include/pyport.h
+++ b/Include/pyport.h
@@ -677,7 +677,9 @@
#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 @@
#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 @@
#undef toupper
#define toupper(c) towupper(btowc(c))
#endif
+#endif
/* Declarations for symbol visibility.
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -165,6 +165,10 @@
- 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
==================================
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list