changeset: 102662:2f857ac9c7af branch: 3.5 parent: 102656:2aa2fbb681d8 user: Ned Deily date: Mon Aug 15 03:07:26 2016 -0400 files: Include/pyport.h description: Issue #10910: Avoid C++ compilation errors on FreeBSD and OS X. Patch by Ronald Oussoren. diff -r 2aa2fbb681d8 -r 2f857ac9c7af Include/pyport.h --- a/Include/pyport.h Sun Aug 14 16:10:17 2016 -0400 +++ b/Include/pyport.h Mon Aug 15 03:07:26 2016 -0400 @@ -688,6 +688,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 @@ -705,6 +711,7 @@ #undef toupper #define toupper(c) towupper(btowc(c)) #endif +#endif /* Declarations for symbol visibility.