check for vsnprintf() with C++ compiler

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-03-22 12:02:06 +00:00
parent fb5e087649
commit 988ba3ce13
2 changed files with 190 additions and 180 deletions

357
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -2249,7 +2249,17 @@ AC_CHECK_LIB(c, wcslen, [
dnl check for vprintf/vsprintf() which are GNU extensions dnl check for vprintf/vsprintf() which are GNU extensions
AC_FUNC_VPRINTF AC_FUNC_VPRINTF
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
dnl check for vsnprintf() - a safe version of vsprintf() dnl check for vsnprintf() - a safe version of vsprintf()
dnl
dnl NB: do it using C++ compiler as on some systems it is present in the
dnl libraries, but not declared in the header
dnl
dnl NB2: we might also check for it with AC_LANG_C if it is not found with
dnl AC_LANG_CPLUSPLUS and declare it ourselves if it is found in that
dnl case...
AC_CHECK_FUNCS(vsnprintf, AC_CHECK_FUNCS(vsnprintf,
AC_DEFINE(HAVE_VSNPRINTF), AC_DEFINE(HAVE_VSNPRINTF),
AC_MSG_WARN(unsafe function sprintf will be used instead of snprintf) AC_MSG_WARN(unsafe function sprintf will be used instead of snprintf)
@@ -2258,9 +2268,6 @@ AC_CHECK_FUNCS(vsnprintf,
dnl check for vsscanf() - on some platforms (Linux, glibc 2.1.1) it's 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 available in the library but the prototype is missing, so we can't use
dnl AC_CHECK_FUNCS here, do it manually dnl AC_CHECK_FUNCS here, do it manually
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_CACHE_CHECK([for vsscanf], wx_cv_func_vsscanf, AC_CACHE_CHECK([for vsscanf], wx_cv_func_vsscanf,
[ [
AC_TRY_RUN( AC_TRY_RUN(