From aea02638ea2a58a568453e5e1d7e7ec90ba22361 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 7 Aug 1999 14:44:58 +0000 Subject: [PATCH] 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 --- acconfig.h | 3 +++ configure.in | 37 ++++++++++++++++++++++++++++++------- 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/acconfig.h b/acconfig.h index 203fec51bc..29c6edee8f 100644 --- a/acconfig.h +++ b/acconfig.h @@ -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__ */ diff --git a/configure.in b/configure.in index 4d6975506f..6e7fa23fe5 100644 --- a/configure.in +++ b/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 + #include + ], + [ + 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 ------------------------------------------------------------------------ -- 2.45.2