diff --git a/configure.ac b/configure.ac index 65be04d..d1d21f0 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/src/odbc/odbcw.c b/src/odbc/odbcw.c index ffd5902..899dbd9 100644 --- a/src/odbc/odbcw.c +++ b/src/odbc/odbcw.c @@ -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);