test for vsscanf enhanced, added HAVE_VSSCANF to acconfig.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3309 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -612,6 +612,9 @@
|
||||
/* Define if you have wcslen function */
|
||||
#undef HAVE_WCSLEN
|
||||
|
||||
/* define if you have vsscanf function */
|
||||
#undef HAVE_VSSCANF
|
||||
|
||||
@BOTTOM@
|
||||
|
||||
#endif /* __WX_SETUP_H__ */
|
||||
|
37
configure.in
37
configure.in
@@ -1277,6 +1277,32 @@ AC_CHECK_FUNCS(vsnprintf,
|
||||
AC_MSG_WARN(unsafe function sprintf will be used instead of snprintf)
|
||||
)
|
||||
|
||||
dnl check for vsscanf() - on some platforms (Linux, glibc 2.1.1) it's
|
||||
dnl available in the library but the prototype is missing, so we can't use
|
||||
dnl AC_CHECK_FUNCS here, do it manually
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
|
||||
AC_CACHE_CHECK([for vsscanf], wx_cv_func_vsscanf,
|
||||
[
|
||||
AC_TRY_COMPILE(
|
||||
[
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
],
|
||||
[
|
||||
va_list ap;
|
||||
vsscanf("", "", ap);
|
||||
], [
|
||||
wx_cv_func_vsscanf=yes
|
||||
AC_DEFINE(HAVE_VSSCANF)
|
||||
], [
|
||||
wx_cv_func_vsscanf=no
|
||||
])
|
||||
])
|
||||
|
||||
AC_LANG_RESTORE
|
||||
|
||||
dnl check for vfork() (even if it's the same as fork() in modern Unices)
|
||||
AC_CHECK_FUNCS(vfork)
|
||||
|
||||
@@ -1344,11 +1370,11 @@ if test "$wxUSE_THREADS" = "yes" ; then
|
||||
])
|
||||
])
|
||||
])
|
||||
fi
|
||||
|
||||
if test -z "$THREADS_OBJ" ; then
|
||||
wxUSE_THREADS=no
|
||||
AC_MSG_WARN(No thread support on this system)
|
||||
if test -z "$THREADS_OBJ" ; then
|
||||
wxUSE_THREADS=no
|
||||
AC_MSG_WARN(No thread support on this system)
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl do other tests only if we are using threads
|
||||
@@ -1738,9 +1764,6 @@ if test "$wxUSE_JOYSTICK" = 1; then
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
AC_CHECK_FUNCS(vsscanf)
|
||||
|
||||
dnl ------------------------------------------------------------------------
|
||||
dnl DLL support
|
||||
dnl ------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user