diff --git a/configure b/configure index 1e86b67b37..5eb0d307ab 100755 --- a/configure +++ b/configure @@ -30050,13 +30050,11 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test "$wxUSE_UNICODE" = yes; then - - wchar_headers="#include +wchar_headers="#include #include " - case "${host}" in - *-*-solaris2* ) - for ac_header in widec.h +case "${host}" in + *-*-solaris2* ) + for ac_header in widec.h do : ac_fn_c_check_header_compile "$LINENO" "widec.h" "ac_cv_header_widec_h" "$ac_includes_default " @@ -30069,11 +30067,11 @@ fi done - if test "$ac_cv_header_widec_h" = "yes"; then - wchar_headers="$wchar_headers + if test "$ac_cv_header_widec_h" = "yes"; then + wchar_headers="$wchar_headers #include " - fi - esac + fi +esac for wx_func in putws fputws wprintf vswprintf vswscanf @@ -30132,9 +30130,9 @@ _ACEOF done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _vsnwprintf" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _vsnwprintf" >&5 $as_echo_n "checking for _vsnwprintf... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -30148,14 +30146,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - $as_echo "#define HAVE__VSNWPRINTF 1" >>confdefs.h + $as_echo "#define HAVE__VSNWPRINTF 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext; -fi if test "$wxUSE_FILE" = "yes"; then diff --git a/configure.in b/configure.in index c8d2732531..98fd07171f 100644 --- a/configure.in +++ b/configure.in @@ -4273,34 +4273,31 @@ if test "$ac_cv_func_vsscanf" = "yes"; then fi AC_LANG_POP() -if test "$wxUSE_UNICODE" = yes; then - - dnl also look if we have wide char IO functions, notice that [f]putws are - dnl declared in special widec.h under Solaris - wchar_headers="#include +dnl also look if we have wide char IO functions, notice that [f]putws are +dnl declared in special widec.h under Solaris +wchar_headers="#include #include " - case "${host}" in - *-*-solaris2* ) - AC_CHECK_HEADERS(widec.h,,, [AC_INCLUDES_DEFAULT()]) - if test "$ac_cv_header_widec_h" = "yes"; then - wchar_headers="$wchar_headers +case "${host}" in + *-*-solaris2* ) + AC_CHECK_HEADERS(widec.h,,, [AC_INCLUDES_DEFAULT()]) + if test "$ac_cv_header_widec_h" = "yes"; then + wchar_headers="$wchar_headers #include " - fi - esac + fi +esac - WX_CHECK_FUNCS(putws fputws wprintf vswprintf vswscanf,,, - [$wchar_headers]) +WX_CHECK_FUNCS(putws fputws wprintf vswprintf vswscanf,,, + [$wchar_headers]) - dnl MinGW has a vswprintf with a different prototype, and - dnl a _vsnwprintf with the correct prototype, but AC_CHECK_FUNCS - dnl finds it even if it is not declared in some versions... - AC_MSG_CHECKING([for _vsnwprintf]) - AC_TRY_COMPILE([#include ], - [&_vsnwprintf;], - [AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE__VSNWPRINTF)], - [AC_MSG_RESULT([no])]); -fi +dnl MinGW has a vswprintf with a different prototype, and +dnl a _vsnwprintf with the correct prototype, but AC_CHECK_FUNCS +dnl finds it even if it is not declared in some versions... +AC_MSG_CHECKING([for _vsnwprintf]) +AC_TRY_COMPILE([#include ], + [&_vsnwprintf;], + [AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE__VSNWPRINTF)], + [AC_MSG_RESULT([no])]); if test "$wxUSE_FILE" = "yes"; then WX_CHECK_FUNCS(fsync) diff --git a/include/wx/wxcrtvararg.h b/include/wx/wxcrtvararg.h index 666e806ef3..bcb6c2c7f9 100644 --- a/include/wx/wxcrtvararg.h +++ b/include/wx/wxcrtvararg.h @@ -202,7 +202,7 @@ so on but not all systems have them so use our own implementations in this case. */ -#if wxUSE_UNICODE && !defined(wxHAVE_TCHAR_SUPPORT) && !defined(HAVE_WPRINTF) +#if !defined(wxHAVE_TCHAR_SUPPORT) && !defined(HAVE_WPRINTF) #define wxNEED_WPRINTF #endif #if !defined(wxHAVE_TCHAR_SUPPORT) && !defined(HAVE_VSWSCANF)