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);
#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
......@@ -730,6 +736,7 @@ extern int fdatasync(int);
#undef toupper
#define toupper(c) towupper(btowc(c))
#endif
#endif
/* 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