From 98ba455b9afe3fa78751ecae2e9d29f1ba82e7f7 Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Mon, 15 Aug 2016 02:59:31 -0400 Subject: [PATCH] Issue #10910: Avoid C++ compilation errors on FreeBSD and OS X. Patch by Ronald Oussoren. --- Include/pyport.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Include/pyport.h b/Include/pyport.h index 2259548ea85c..736b984e056a 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. -- 2.47.3