Check for mbstowcs_l separately

This commit is contained in:
Evan Miller 2021-08-24 15:15:34 -04:00
parent 0164b4df1a
commit 41d2a797ab
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ AC_CHECK_DECLS([program_invocation_short_name], [], [], [[
dnl Checks for library functions.
VL_LIB_READLINE
AC_CHECK_FUNCS(strptime fmemopen gmtime_r reallocf wcstombs_l vasprintf vasnprintf)
AC_CHECK_FUNCS(strptime fmemopen gmtime_r reallocf wcstombs_l mbstowcs_l vasprintf vasnprintf)
AM_GCC_ATTRIBUTE_ALIAS

View File

@ -66,7 +66,7 @@ static size_t ascii2unicode(struct _hdbc* dbc, const char *_in, size_t _in_len,
size_t count = 0, i;
#if defined(_WIN32) || defined(WIN32) || defined(_WIN64) || defined(WIN64) || defined(WINDOWS)
count = _mbstowcs_l(w, _in, _out_count, dbc->locale);
#elif defined(HAVE_WCSTOMBS_L)
#elif defined(HAVE_MBSTOWCS_L)
count = mbstowcs_l(w, _in, _out_count, dbc->locale);
#else
locale_t oldlocale = uselocale(dbc->locale);