From: Ned Deily Date: Mon, 15 Aug 2016 07:07:26 +0000 (-0400) Subject: Issue #10910: Avoid C++ compilation errors on FreeBSD and OS X. X-Git-Tag: v3.6.0a4~5^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7659aab5e990dd33fab47bd29c445ed7202e0cac;p=thirdparty%2FPython%2Fcpython.git 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 66e00d4e6dd0..3bab84d690a5 100644 --- a/Include/pyport.h +++ b/Include/pyport.h @@ -688,6 +688,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 defines these symbols as real functions, + * with a slightly different signature. + * See issue #10910 + */ #include #include #undef isalnum @@ -705,6 +711,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.