Issue #10910: Avoid C++ compilation errors on FreeBSD and OS X.
Patch by Ronald Oussoren.
This commit is contained in:
parent
285a2537c8
commit
98ba455b9a
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue