check for vswscanf(), AIX 5.1 and HP-UX 11.11 don't have it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
2
configure
vendored
2
configure
vendored
@@ -35304,7 +35304,7 @@ done
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
for wx_func in putws fputws wprintf vswprintf
|
for wx_func in putws fputws wprintf vswprintf vswscanf
|
||||||
do
|
do
|
||||||
{ echo "$as_me:$LINENO: checking for $wx_func" >&5
|
{ echo "$as_me:$LINENO: checking for $wx_func" >&5
|
||||||
echo $ECHO_N "checking for $wx_func... $ECHO_C" >&6; }
|
echo $ECHO_N "checking for $wx_func... $ECHO_C" >&6; }
|
||||||
|
@@ -4174,7 +4174,7 @@ if test "$wxUSE_UNICODE" = yes; then
|
|||||||
fi
|
fi
|
||||||
esac
|
esac
|
||||||
|
|
||||||
WX_CHECK_FUNCS(putws fputws wprintf vswprintf,,,
|
WX_CHECK_FUNCS(putws fputws wprintf vswprintf vswscanf,,,
|
||||||
[$wchar_headers])
|
[$wchar_headers])
|
||||||
|
|
||||||
dnl MinGW has a vswprintf with a different prototype, and
|
dnl MinGW has a vswprintf with a different prototype, and
|
||||||
|
@@ -101,6 +101,7 @@
|
|||||||
#define HAVE_STRCASECMP_IN_STRING_H 1
|
#define HAVE_STRCASECMP_IN_STRING_H 1
|
||||||
#define HAVE_WPRINTF 1
|
#define HAVE_WPRINTF 1
|
||||||
#define HAVE_VSWPRINTF 1
|
#define HAVE_VSWPRINTF 1
|
||||||
|
#define HAVE_VSWSCANF 1
|
||||||
#define HAVE_FSEEKO 1
|
#define HAVE_FSEEKO 1
|
||||||
#define HAVE_SYS_SELECT_H 1
|
#define HAVE_SYS_SELECT_H 1
|
||||||
|
|
||||||
|
@@ -196,6 +196,9 @@
|
|||||||
#if wxUSE_UNICODE && !defined(wxHAVE_TCHAR_SUPPORT) && !defined(HAVE_WPRINTF)
|
#if wxUSE_UNICODE && !defined(wxHAVE_TCHAR_SUPPORT) && !defined(HAVE_WPRINTF)
|
||||||
#define wxNEED_WPRINTF
|
#define wxNEED_WPRINTF
|
||||||
#endif
|
#endif
|
||||||
|
#if wxUSE_UNICODE && !defined(wxHAVE_TCHAR_SUPPORT) && !defined(HAVE_VSWSCANF)
|
||||||
|
#define wxNEED_VSWSCANF
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(wxNEED_WPRINTF)
|
#if defined(wxNEED_WPRINTF)
|
||||||
@@ -232,11 +235,14 @@
|
|||||||
int wxCRT_ScanfW(const wchar_t *format, ...);
|
int wxCRT_ScanfW(const wchar_t *format, ...);
|
||||||
int wxCRT_SscanfW(const wchar_t *str, const wchar_t *format, ...);
|
int wxCRT_SscanfW(const wchar_t *str, const wchar_t *format, ...);
|
||||||
int wxCRT_FscanfW(FILE *stream, const wchar_t *format, ...);
|
int wxCRT_FscanfW(FILE *stream, const wchar_t *format, ...);
|
||||||
int wxCRT_VsscanfW(const wchar_t *str, const wchar_t *format, va_list ap);
|
|
||||||
#else
|
#else
|
||||||
#define wxCRT_ScanfW wxVMS_USE_STD wscanf
|
#define wxCRT_ScanfW wxVMS_USE_STD wscanf
|
||||||
#define wxCRT_SscanfW wxVMS_USE_STD swscanf
|
#define wxCRT_SscanfW wxVMS_USE_STD swscanf
|
||||||
#define wxCRT_FscanfW wxVMS_USE_STD fwscanf
|
#define wxCRT_FscanfW wxVMS_USE_STD fwscanf
|
||||||
|
#endif
|
||||||
|
#ifdef wxNEED_VSWSCANF
|
||||||
|
int wxCRT_VsscanfW(const wchar_t *str, const wchar_t *format, va_list ap);
|
||||||
|
#else
|
||||||
#define wxCRT_VsscanfW wxVMS_USE_STD vswscanf
|
#define wxCRT_VsscanfW wxVMS_USE_STD vswscanf
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -1070,6 +1070,9 @@
|
|||||||
/* Define this if you have _vsnwprintf */
|
/* Define this if you have _vsnwprintf */
|
||||||
#undef HAVE__VSNWPRINTF
|
#undef HAVE__VSNWPRINTF
|
||||||
|
|
||||||
|
/* vswscanf() */
|
||||||
|
#undef HAVE_VSWSCANF
|
||||||
|
|
||||||
/* Define if fseeko and ftello are available. */
|
/* Define if fseeko and ftello are available. */
|
||||||
#undef HAVE_FSEEKO
|
#undef HAVE_FSEEKO
|
||||||
|
|
||||||
|
@@ -281,21 +281,6 @@ static int vwscanf(const wchar_t *format, va_list argptr)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vswscanf(const wchar_t *ws, const wchar_t *format, va_list argptr)
|
|
||||||
{
|
|
||||||
// The best we can do without proper Unicode support in glibc is to
|
|
||||||
// convert the strings into MB representation and run ANSI version
|
|
||||||
// of the function. This doesn't work with %c and %s because of difference
|
|
||||||
// in size of char and wchar_t, though.
|
|
||||||
|
|
||||||
wxCHECK_MSG( wxStrstr(format, _T("%s")) == NULL, -1,
|
|
||||||
_T("incomplete vswscanf implementation doesn't allow %s") );
|
|
||||||
wxCHECK_MSG( wxStrstr(format, _T("%c")) == NULL, -1,
|
|
||||||
_T("incomplete vswscanf implementation doesn't allow %c") );
|
|
||||||
|
|
||||||
return vsscanf(wxConvLibc.cWX2MB(ws), wxConvLibc.cWX2MB(format), argptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int vfwscanf(FILE *stream, const wchar_t *format, va_list argptr)
|
static int vfwscanf(FILE *stream, const wchar_t *format, va_list argptr)
|
||||||
{
|
{
|
||||||
wxFAIL_MSG( _T("TODO") );
|
wxFAIL_MSG( _T("TODO") );
|
||||||
@@ -327,6 +312,23 @@ static int vwprintf(const wchar_t *format, va_list argptr)
|
|||||||
|
|
||||||
#endif // wxNEED_WPRINTF
|
#endif // wxNEED_WPRINTF
|
||||||
|
|
||||||
|
#ifdef wxNEED_VSWSCANF
|
||||||
|
static int vswscanf(const wchar_t *ws, const wchar_t *format, va_list argptr)
|
||||||
|
{
|
||||||
|
// The best we can do without proper Unicode support in glibc is to
|
||||||
|
// convert the strings into MB representation and run ANSI version
|
||||||
|
// of the function. This doesn't work with %c and %s because of difference
|
||||||
|
// in size of char and wchar_t, though.
|
||||||
|
|
||||||
|
wxCHECK_MSG( wxStrstr(format, _T("%s")) == NULL, -1,
|
||||||
|
_T("incomplete vswscanf implementation doesn't allow %s") );
|
||||||
|
wxCHECK_MSG( wxStrstr(format, _T("%c")) == NULL, -1,
|
||||||
|
_T("incomplete vswscanf implementation doesn't allow %c") );
|
||||||
|
|
||||||
|
return vsscanf(wxConvLibc.cWX2MB(ws), wxConvLibc.cWX2MB(format), argptr);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxPrintf(), wxScanf() and relatives
|
// wxPrintf(), wxScanf() and relatives
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user