summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-07-04 12:23:54 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-07-04 12:23:54 (GMT)
commit99b9538636e44f2400b45a4b9fa3d74ccb958922 (patch)
treee55a5c1779528ffdc849e153a9d479147c9aa800 /Include
parent9122fdd8fae87190a47a94767b7f0157478306ef (diff)
downloadcpython-99b9538636e44f2400b45a4b9fa3d74ccb958922.zip
cpython-99b9538636e44f2400b45a4b9fa3d74ccb958922.tar.gz
cpython-99b9538636e44f2400b45a4b9fa3d74ccb958922.tar.bz2
Issue #9642: Uniformize the tests on the availability of the mbcs codec
Add a new HAVE_MBCS define.
Diffstat (limited to 'Include')
-rw-r--r--Include/unicodeobject.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h
index 6c492d1..44c1775 100644
--- a/Include/unicodeobject.h
+++ b/Include/unicodeobject.h
@@ -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 ---------------------------------------------------- */