changeset: 102665:e0ec3471cb09 branch: 2.7 parent: 102654:d568f66fa26c user: Ned Deily date: Mon Aug 15 02:59:31 2016 -0400 files: Include/pyport.h description: Issue #10910: Avoid C++ compilation errors on FreeBSD and OS X. Patch by Ronald Oussoren. diff -r d568f66fa26c -r e0ec3471cb09 Include/pyport.h --- a/Include/pyport.h Sun Aug 14 16:08:42 2016 -0400 +++ b/Include/pyport.h Mon Aug 15 02:59:31 2016 -0400 @@ -713,6 +713,12 @@ #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 @@ #undef toupper #define toupper(c) towupper(btowc(c)) #endif +#endif /* Declarations for symbol visibility.