+
+
echo $ac_n "checking for library containing res_mkquery""... $ac_c" 1>&6
-echo "configure:753: checking for library containing res_mkquery" >&5
+echo "configure:755: checking for library containing res_mkquery" >&5
if eval "test \"`echo '$''{'ac_cv_search_res_mkquery'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_res_mkquery="no"
cat > conftest.$ac_ext <<EOF
-#line 760 "configure"
+#line 762 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
res_mkquery()
; return 0; }
EOF
-if { (eval echo configure:771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_res_mkquery="none required"
else
test "$ac_cv_search_res_mkquery" = "no" && for i in resolv bind; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 782 "configure"
+#line 784 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
res_mkquery()
; return 0; }
EOF
-if { (eval echo configure:793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_res_mkquery="-l$i"
break
fi;
echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
-echo "configure:814: checking for socket in -lsocket" >&5
+echo "configure:816: checking for socket in -lsocket" >&5
ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 822 "configure"
+#line 824 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
socket()
; return 0; }
EOF
-if { (eval echo configure:833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6
-echo "configure:861: checking for inet_ntoa in -lnsl" >&5
+echo "configure:863: checking for inet_ntoa in -lnsl" >&5
ac_lib_var=`echo nsl'_'inet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 869 "configure"
+#line 871 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
inet_ntoa()
; return 0; }
EOF
-if { (eval echo configure:880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "$ac_t""no" 1>&6
fi
+echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
+echo "configure:910: checking for socklen_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ cat > conftest.$ac_ext <<EOF
+#line 916 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+ #include <sys/socket.h>
+int main() {
+socklen_t len = 42; return len;
+; return 0; }
+EOF
+if { (eval echo configure:924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_type_socklen_t=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_type_socklen_t=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
+ if test $ac_cv_type_socklen_t != yes; then
+ cat >> confdefs.h <<\EOF
+#define socklen_t int
+EOF
+
+ fi
+
trap '' 1 2 15
cat > confcache <<\EOF
AC_PROG_CC
+AC_DEFUN(AC_TYPE_SOCKLEN_T,
+[AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
+[
+ AC_TRY_COMPILE(
+ [#include <sys/types.h>
+ #include <sys/socket.h>],
+ [socklen_t len = 42; return len;],
+ ac_cv_type_socklen_t=yes,
+ ac_cv_type_socklen_t=no)
+])
+ if test $ac_cv_type_socklen_t != yes; then
+ AC_DEFINE(socklen_t, int)
+ fi
+])
+
AC_SEARCH_LIBS(res_mkquery, resolv bind);
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(nsl, inet_ntoa)
+AC_TYPE_SOCKLEN_T
AC_OUTPUT(Makefile)
/***
*** DNS Query Performance Testing Tool (queryperf.c)
***
- *** Version $Id: queryperf.c,v 1.1.1.2 2001/07/18 23:33:04 gson Exp $
+ *** Version $Id: queryperf.c,v 1.1.1.2.2.1 2001/09/27 00:44:26 marka Exp $
***
*** Stephen Jacob <sj@nominum.com>
***/
show_startup_info(void) {
printf("\n"
"DNS Query Performance Testing Tool\n"
-"Version: $Id: queryperf.c,v 1.1.1.2 2001/07/18 23:33:04 gson Exp $\n"
+"Version: $Id: queryperf.c,v 1.1.1.2.2.1 2001/09/27 00:44:26 marka Exp $\n"
"\n");
}
bufsize = 1024 * socket_bufsize;
ret = setsockopt(sock, SOL_SOCKET, SO_RCVBUF,
- &bufsize, sizeof(bufsize));
+ (char *) &bufsize, sizeof(bufsize));
if (ret < 0)
fprintf(stderr, "Warning: setsockbuf(SO_RCVBUF) failed\n");
ret = setsockopt(sock, SOL_SOCKET, SO_SNDBUF,
- &bufsize, sizeof(bufsize));
+ (char *) &bufsize, sizeof(bufsize));
if (ret < 0)
fprintf(stderr, "Warning: setsockbuf(SO_SNDBUF) failed\n");