mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-01 14:15:49 +08:00
Add tests for vsnprintf and snprintf.
This commit is contained in:
parent
41e25b4041
commit
5009ee7b13
94
configure
vendored
94
configure
vendored
@ -6142,8 +6142,67 @@ fi
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if test $ac_cv_func_vprintf = yes ; then
|
||||||
|
for ac_func in vsnprintf
|
||||||
|
do
|
||||||
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||||
|
echo "configure:6151: checking for $ac_func" >&5
|
||||||
|
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||||
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
|
else
|
||||||
|
cat > conftest.$ac_ext <<EOF
|
||||||
|
#line 6156 "configure"
|
||||||
|
#include "confdefs.h"
|
||||||
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
|
which can conflict with char $ac_func(); below. */
|
||||||
|
#include <assert.h>
|
||||||
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
|
/* We use char because int might match the return type of a gcc2
|
||||||
|
builtin and then its argument prototype would still apply. */
|
||||||
|
char $ac_func();
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
|
||||||
|
/* The GNU C library defines this for functions which it implements
|
||||||
|
to always fail with ENOSYS. Some functions are actually named
|
||||||
|
something starting with __ and the normal name is an alias. */
|
||||||
|
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
|
||||||
|
choke me
|
||||||
|
#else
|
||||||
|
$ac_func();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
; return 0; }
|
||||||
|
EOF
|
||||||
|
if { (eval echo configure:6179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||||
|
rm -rf conftest*
|
||||||
|
eval "ac_cv_func_$ac_func=yes"
|
||||||
|
else
|
||||||
|
echo "configure: failed program was:" >&5
|
||||||
|
cat conftest.$ac_ext >&5
|
||||||
|
rm -rf conftest*
|
||||||
|
eval "ac_cv_func_$ac_func=no"
|
||||||
|
fi
|
||||||
|
rm -f conftest*
|
||||||
|
fi
|
||||||
|
|
||||||
|
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
|
||||||
|
echo "$ac_t""yes" 1>&6
|
||||||
|
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
|
||||||
|
cat >> confdefs.h <<EOF
|
||||||
|
#define $ac_tr_func 1
|
||||||
|
EOF
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "$ac_t""no" 1>&6
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
|
echo $ac_n "checking for wait3 that fills in rusage""... $ac_c" 1>&6
|
||||||
echo "configure:6147: checking for wait3 that fills in rusage" >&5
|
echo "configure:6206: checking for wait3 that fills in rusage" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_func_wait3_rusage'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -6151,7 +6210,7 @@ else
|
|||||||
ac_cv_func_wait3_rusage=no
|
ac_cv_func_wait3_rusage=no
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 6155 "configure"
|
#line 6214 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
@ -6182,7 +6241,7 @@ main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:6186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
if { (eval echo configure:6245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||||
then
|
then
|
||||||
ac_cv_func_wait3_rusage=yes
|
ac_cv_func_wait3_rusage=yes
|
||||||
else
|
else
|
||||||
@ -6222,6 +6281,7 @@ for ac_func in \
|
|||||||
setsid \
|
setsid \
|
||||||
signal \
|
signal \
|
||||||
sigset \
|
sigset \
|
||||||
|
snprintf \
|
||||||
socket \
|
socket \
|
||||||
strerror \
|
strerror \
|
||||||
strstr \
|
strstr \
|
||||||
@ -6236,12 +6296,12 @@ for ac_func in \
|
|||||||
|
|
||||||
do
|
do
|
||||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||||
echo "configure:6240: checking for $ac_func" >&5
|
echo "configure:6300: checking for $ac_func" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 6245 "configure"
|
#line 6305 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
which can conflict with char $ac_func(); below. */
|
which can conflict with char $ac_func(); below. */
|
||||||
@ -6264,7 +6324,7 @@ $ac_func();
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:6268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
if { (eval echo configure:6328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_func_$ac_func=yes"
|
eval "ac_cv_func_$ac_func=yes"
|
||||||
else
|
else
|
||||||
@ -6292,12 +6352,12 @@ done
|
|||||||
for ac_func in getopt strdup tempnam
|
for ac_func in getopt strdup tempnam
|
||||||
do
|
do
|
||||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||||
echo "configure:6296: checking for $ac_func" >&5
|
echo "configure:6356: checking for $ac_func" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 6301 "configure"
|
#line 6361 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
which can conflict with char $ac_func(); below. */
|
which can conflict with char $ac_func(); below. */
|
||||||
@ -6320,7 +6380,7 @@ $ac_func();
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:6324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
if { (eval echo configure:6384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_func_$ac_func=yes"
|
eval "ac_cv_func_$ac_func=yes"
|
||||||
else
|
else
|
||||||
@ -6350,13 +6410,13 @@ done
|
|||||||
# Check Configuration
|
# Check Configuration
|
||||||
|
|
||||||
echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
|
echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
|
||||||
echo "configure:6354: checking declaration of sys_errlist" >&5
|
echo "configure:6414: checking declaration of sys_errlist" >&5
|
||||||
if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ol_cv_dcl_sys_errlist'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 6360 "configure"
|
#line 6420 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -6366,7 +6426,7 @@ int main() {
|
|||||||
char *c = (char *) *sys_errlist
|
char *c = (char *) *sys_errlist
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:6370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:6430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
ol_cv_dcl_sys_errlist=yes
|
ol_cv_dcl_sys_errlist=yes
|
||||||
else
|
else
|
||||||
@ -6387,20 +6447,20 @@ if test $ol_cv_dcl_sys_errlist = no ; then
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
|
echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
|
||||||
echo "configure:6391: checking existence of sys_errlist" >&5
|
echo "configure:6451: checking existence of sys_errlist" >&5
|
||||||
if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ol_cv_have_sys_errlist'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 6397 "configure"
|
#line 6457 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
int main() {
|
int main() {
|
||||||
char *c = (char *) *sys_errlist
|
char *c = (char *) *sys_errlist
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:6404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
if { (eval echo configure:6464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
ol_cv_have_sys_errlist=yes
|
ol_cv_have_sys_errlist=yes
|
||||||
else
|
else
|
||||||
@ -6529,6 +6589,10 @@ if test $ol_enable_slurpd != no -a $ol_link_threads != no -a \
|
|||||||
BUILD_SLURPD=yes
|
BUILD_SLURPD=yes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test $ol_enable_ldapd != no ; then
|
||||||
|
BUILD_SLURPD=yes
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
11
configure.in
11
configure.in
@ -803,6 +803,12 @@ dnl Checks for library functions.
|
|||||||
AC_FUNC_MEMCMP
|
AC_FUNC_MEMCMP
|
||||||
AC_FUNC_STRFTIME
|
AC_FUNC_STRFTIME
|
||||||
AC_FUNC_VPRINTF
|
AC_FUNC_VPRINTF
|
||||||
|
|
||||||
|
if test $ac_cv_func_vprintf = yes ; then
|
||||||
|
dnl check for vsnprintf
|
||||||
|
AC_CHECK_FUNCS(vsnprintf)
|
||||||
|
fi
|
||||||
|
|
||||||
AC_FUNC_WAIT3
|
AC_FUNC_WAIT3
|
||||||
|
|
||||||
AC_CHECK_FUNCS( \
|
AC_CHECK_FUNCS( \
|
||||||
@ -822,6 +828,7 @@ AC_CHECK_FUNCS( \
|
|||||||
setsid \
|
setsid \
|
||||||
signal \
|
signal \
|
||||||
sigset \
|
sigset \
|
||||||
|
snprintf \
|
||||||
socket \
|
socket \
|
||||||
strerror \
|
strerror \
|
||||||
strstr \
|
strstr \
|
||||||
@ -911,6 +918,10 @@ if test $ol_enable_slurpd != no -a $ol_link_threads != no -a \
|
|||||||
BUILD_SLURPD=yes
|
BUILD_SLURPD=yes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test $ol_enable_ldapd != no ; then
|
||||||
|
BUILD_SLURPD=yes
|
||||||
|
fi
|
||||||
|
|
||||||
dnl ----------------------------------------------------------------
|
dnl ----------------------------------------------------------------
|
||||||
|
|
||||||
AC_SUBST(BUILD_LDAPD)
|
AC_SUBST(BUILD_LDAPD)
|
||||||
|
@ -290,6 +290,9 @@ is provided ``as is'' without express or implied warranty.
|
|||||||
/* Define if you have the sigset function. */
|
/* Define if you have the sigset function. */
|
||||||
#undef HAVE_SIGSET
|
#undef HAVE_SIGSET
|
||||||
|
|
||||||
|
/* Define if you have the snprintf function. */
|
||||||
|
#undef HAVE_SNPRINTF
|
||||||
|
|
||||||
/* Define if you have the socket function. */
|
/* Define if you have the socket function. */
|
||||||
#undef HAVE_SOCKET
|
#undef HAVE_SOCKET
|
||||||
|
|
||||||
@ -323,6 +326,9 @@ is provided ``as is'' without express or implied warranty.
|
|||||||
/* Define if you have the tempnam function. */
|
/* Define if you have the tempnam function. */
|
||||||
#undef HAVE_TEMPNAM
|
#undef HAVE_TEMPNAM
|
||||||
|
|
||||||
|
/* Define if you have the vsnprintf function. */
|
||||||
|
#undef HAVE_VSNPRINTF
|
||||||
|
|
||||||
/* Define if you have the waitpid function. */
|
/* Define if you have the waitpid function. */
|
||||||
#undef HAVE_WAITPID
|
#undef HAVE_WAITPID
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* include/portable.h.nt -- manually updated of MS NT (MS VC5) */
|
/* include/portable.h.nt -- manually updated of MS NT (MS VC5) */
|
||||||
/* synced with portable.h.in 1.5 */
|
/* synced with portable.h.in 1.6 */
|
||||||
/*
|
/*
|
||||||
Copyright 1998 The OpenLDAP Foundation, Redwood City, California, USA
|
Copyright 1998 The OpenLDAP Foundation, Redwood City, California, USA
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
@ -89,6 +89,9 @@ typedef char * caddr_t;
|
|||||||
/* Define if you have the vprintf function. */
|
/* Define if you have the vprintf function. */
|
||||||
#define HAVE_VPRINTF 1
|
#define HAVE_VPRINTF 1
|
||||||
|
|
||||||
|
/* Define if you have the vsnprintf function. */
|
||||||
|
/* #undef HAVE_VSNPRINTF */
|
||||||
|
|
||||||
/* Define if you have the wait3 system call. */
|
/* Define if you have the wait3 system call. */
|
||||||
/* #undef HAVE_WAIT3 */
|
/* #undef HAVE_WAIT3 */
|
||||||
|
|
||||||
@ -315,6 +318,9 @@ typedef char * caddr_t;
|
|||||||
/* Define if you have the sigset function. */
|
/* Define if you have the sigset function. */
|
||||||
/* #undef HAVE_SIGSET */
|
/* #undef HAVE_SIGSET */
|
||||||
|
|
||||||
|
/* Define if you have the snprintf function. */
|
||||||
|
/* #undef HAVE_SNPRINTF */
|
||||||
|
|
||||||
/* Define if you have the socket function. */
|
/* Define if you have the socket function. */
|
||||||
#define HAVE_SOCKET 1
|
#define HAVE_SOCKET 1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user