Fixed MinGW/configure/Unicode compilation: MinGW/MSVCRT vswprintf does not
behave like other vswprintf; under Win32 you really want _vsnwprintf. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17163 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3008,6 +3008,15 @@ AC_CHECK_FUNCS(vsnprintf)
|
||||
if test "$wxUSE_UNICODE" = yes; then
|
||||
dnl also look if we have wide char IO functions
|
||||
AC_CHECK_FUNCS(fputwc wprintf vswprintf)
|
||||
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
|
||||
|
||||
AC_LANG_RESTORE
|
||||
|
@@ -576,7 +576,10 @@ WXDLLEXPORT bool wxOKlibc(); // for internal use
|
||||
*/
|
||||
#ifndef wxVsnprintf_
|
||||
#if wxUSE_UNICODE
|
||||
#if defined(HAVE_VSWPRINTF)
|
||||
#if defined(HAVE__VSNWPRINTF)
|
||||
#define wxVsnprintf_ _vsnwprintf
|
||||
/* MinGW?MSVCRT has the wrong vswprintf */
|
||||
#elif defined(HAVE_VSWPRINTF) && !defined(__MINGW32__)
|
||||
#define wxVsnprintf_ vswprintf
|
||||
#endif
|
||||
#else // ASCII
|
||||
|
@@ -1100,6 +1100,9 @@
|
||||
/* Define this if you have wprintf() and related functions */
|
||||
#undef HAVE_VSWPRINTF
|
||||
|
||||
/* Define this if you have _vsnwprintf */
|
||||
#undef HAVE__VSNWPRINTF
|
||||
|
||||
/* Define this if you are using gtk and gdk contains support for X11R6 XIM */
|
||||
#undef HAVE_XIM
|
||||
|
||||
|
Reference in New Issue
Block a user