From: Ned Deily Date: Mon, 15 Aug 2016 06:59:31 +0000 (-0400) Subject: Issue #10910: Avoid C++ compilation errors on FreeBSD and OS X. X-Git-Tag: v2.7.13rc1~214 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=98ba455b9afe3fa78751ecae2e9d29f1ba82e7f7;p=python Issue #10910: Avoid C++ compilation errors on FreeBSD and OS X. Patch by Ronald Oussoren. --- diff --git a/Include/pyport.h b/Include/pyport.h index 2259548ea8..736b984e05 100644 --- a/Include/pyport.h +++ b/Include/pyport.h @@ -713,6 +713,12 @@ extern int fdatasync(int); #endif #ifdef _PY_PORT_CTYPE_UTF8_ISSUE +#ifndef __cplusplus + /* The workaround below is unsafe in C++ because + * the defines these symbols as real functions, + * with a slightly different signature. + * See issue #10910 + */ #include #include #undef isalnum @@ -730,6 +736,7 @@ extern int fdatasync(int); #undef toupper #define toupper(c) towupper(btowc(c)) #endif +#endif /* Declarations for symbol visibility.