Issue #9642: Uniformize the tests on the availability of the mbcs codec

Add a new HAVE_MBCS define.
This commit is contained in:
Victor Stinner 2011-07-04 14:23:54 +02:00
parent 9122fdd8fa
commit 99b9538636
6 changed files with 22 additions and 15 deletions

View file

@ -109,6 +109,10 @@ Copyright (c) Corporation for National Research Initiatives.
# endif
#endif
#if defined(MS_WINDOWS) && defined(HAVE_USABLE_WCHAR_T)
# define HAVE_MBCS
#endif
#ifdef HAVE_WCHAR_H
/* Work around a cosmetic bug in BSDI 4.x wchar.h; thanks to Thomas Wouters */
# ifdef _HAVE_BSDI
@ -1162,7 +1166,7 @@ PyAPI_FUNC(PyObject *) PyUnicode_TranslateCharmap(
);
#endif
#ifdef MS_WIN32
#ifdef HAVE_MBCS
/* --- MBCS codecs for Windows -------------------------------------------- */
@ -1191,7 +1195,7 @@ PyAPI_FUNC(PyObject*) PyUnicode_EncodeMBCS(
);
#endif
#endif /* MS_WIN32 */
#endif /* HAVE_MBCS */
/* --- Decimal Encoder ---------------------------------------------------- */