Work around wrong vsscanf() declaration under HP-UX.
Under this system vsscanf() is declared as taking a non-const char* as first argument which prevented our code using it from compiling. Wrap it in wxCRT_VsscanfA() adding the necessary const_cast<> to fix this. Closes #15638. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75340 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
48
configure
vendored
48
configure
vendored
@@ -29994,6 +29994,54 @@ $as_echo "$wx_cv_func_vsscanf_decl" >&6; }
|
||||
if test "$wx_cv_func_vsscanf_decl" = "yes"; then
|
||||
$as_echo "#define HAVE_VSSCANF_DECL 1" >>confdefs.h
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if vsscanf() declaration is broken" >&5
|
||||
$as_echo_n "checking if vsscanf() declaration is broken... " >&6; }
|
||||
if ${wx_cv_func_broken_vsscanf_decl+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#ifdef __MSL__
|
||||
#if __MSL__ >= 0x6000
|
||||
namespace std {}
|
||||
using namespace std;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
const char *buf;
|
||||
va_list args;
|
||||
vsscanf(buf, "%s", args);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_compile "$LINENO"; then :
|
||||
wx_cv_func_broken_vsscanf_decl=no
|
||||
else
|
||||
wx_cv_func_broken_vsscanf_decl=yes
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $wx_cv_func_broken_vsscanf_decl" >&5
|
||||
$as_echo "$wx_cv_func_broken_vsscanf_decl" >&6; }
|
||||
|
||||
if test "$wx_cv_func_broken_vsscanf_decl" = "yes"; then
|
||||
$as_echo "#define HAVE_BROKEN_VSSCANF_DECL 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
ac_ext=c
|
||||
|
Reference in New Issue
Block a user