Commit 98ba455b authored by Ned Deily's avatar Ned Deily

Issue #10910: Avoid C++ compilation errors on FreeBSD and OS X.

Patch by Ronald Oussoren.
parent 285a2537
...@@ -713,6 +713,12 @@ extern int fdatasync(int); ...@@ -713,6 +713,12 @@ extern int fdatasync(int);
#endif #endif
#ifdef _PY_PORT_CTYPE_UTF8_ISSUE #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 <ctype.h>
#include <wctype.h> #include <wctype.h>
#undef isalnum #undef isalnum
...@@ -730,6 +736,7 @@ extern int fdatasync(int); ...@@ -730,6 +736,7 @@ extern int fdatasync(int);
#undef toupper #undef toupper
#define toupper(c) towupper(btowc(c)) #define toupper(c) towupper(btowc(c))
#endif #endif
#endif
/* Declarations for symbol visibility. /* Declarations for symbol visibility.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment