Always check for wide char IO functions, they are used regardless of wxUSE_UNICODE setting
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
9a44838055
commit
6fc2e956cf
25
configure
vendored
25
configure
vendored
@ -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 <stdio.h>
|
||||
wchar_headers="#include <stdio.h>
|
||||
#include <wchar.h>"
|
||||
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 <widec.h>"
|
||||
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 <wchar.h>
|
||||
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
|
||||
|
||||
|
45
configure.in
45
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 <stdio.h>
|
||||
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 <stdio.h>
|
||||
#include <wchar.h>"
|
||||
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 <widec.h>"
|
||||
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 <wchar.h>],
|
||||
[&_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 <wchar.h>],
|
||||
[&_vsnwprintf;],
|
||||
[AC_MSG_RESULT([yes])
|
||||
AC_DEFINE(HAVE__VSNWPRINTF)],
|
||||
[AC_MSG_RESULT([no])]);
|
||||
|
||||
if test "$wxUSE_FILE" = "yes"; then
|
||||
WX_CHECK_FUNCS(fsync)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user