UErrorCode *status);
#endif
-#ifndef WIN32
/*
* POSIX doesn't define _l-variants of these functions, but several systems
- * have them. We provide our own replacements here. For Windows, we have
- * macros in win32_port.h.
+ * have them. We provide our own replacements here.
*/
#ifndef HAVE_MBSTOWCS_L
static size_t
mbstowcs_l(wchar_t *dest, const char *src, size_t n, locale_t loc)
{
+#ifdef WIN32
+ return _mbstowcs_l(dest, src, n, loc);
+#else
size_t result;
locale_t save_locale = uselocale(loc);
result = mbstowcs(dest, src, n);
uselocale(save_locale);
return result;
+#endif
}
#endif
#ifndef HAVE_WCSTOMBS_L
static size_t
wcstombs_l(char *dest, const wchar_t *src, size_t n, locale_t loc)
{
+#ifdef WIN32
+ return _wcstombs_l(dest, src, n, loc);
+#else
size_t result;
locale_t save_locale = uselocale(loc);
result = wcstombs(dest, src, n);
uselocale(save_locale);
return result;
-}
#endif
+}
#endif
/*
#define strcoll_l _strcoll_l
#define strxfrm_l _strxfrm_l
#define wcscoll_l _wcscoll_l
-#define wcstombs_l _wcstombs_l
-#define mbstowcs_l _mbstowcs_l
/*
* Versions of libintl >= 0.18? try to replace setlocale() with a macro