diff options
author | Ned Deily <nad@python.org> | 2016-08-15 07:07:26 (GMT) |
---|---|---|
committer | Ned Deily <nad@python.org> | 2016-08-15 07:07:26 (GMT) |
commit | 7659aab5e990dd33fab47bd29c445ed7202e0cac (patch) | |
tree | 424618b420c4b29e370d7c8e476580285d219c37 /Include | |
parent | 80a3ba90fd46ca3857206f35d6ee68270aab6eba (diff) | |
download | cpython-7659aab5e990dd33fab47bd29c445ed7202e0cac.zip cpython-7659aab5e990dd33fab47bd29c445ed7202e0cac.tar.gz cpython-7659aab5e990dd33fab47bd29c445ed7202e0cac.tar.bz2 |
Issue #10910: Avoid C++ compilation errors on FreeBSD and OS X.
Patch by Ronald Oussoren.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/pyport.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Include/pyport.h b/Include/pyport.h index 66e00d4..3bab84d 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 <locale> defines these symbols as real functions, + * with a slightly different signature. + * See issue #10910 + */ #include <ctype.h> #include <wctype.h> #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. |