diff Include/unicodeobject.h @ 71193:13e6d3cb2ecd

Issue #9642: Uniformize the tests on the availability of the mbcs codec Add a new HAVE_MBCS define.
author Victor Stinner <victor.stinner@haypocalc.com>
date Mon, 04 Jul 2011 14:23:54 +0200
parents b39270c6b8d1
children 77171f993bf2
line wrap: on
line diff
--- a/Include/unicodeobject.h	Mon Jul 04 13:55:40 2011 +0200
+++ b/Include/unicodeobject.h	Mon Jul 04 14:23:54 2011 +0200
@@ -109,6 +109,10 @@
 # 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 @@
     );
 #endif
 
-#ifdef MS_WIN32
+#ifdef HAVE_MBCS
 
 /* --- MBCS codecs for Windows -------------------------------------------- */
 
@@ -1191,7 +1195,7 @@
     );
 #endif
 
-#endif /* MS_WIN32 */
+#endif /* HAVE_MBCS */
 
 /* --- Decimal Encoder ---------------------------------------------------- */