diff -ur mtr-0.32/NEWS mtr-0.33/NEWS --- mtr-0.32/NEWS Sun Mar 7 22:23:14 1999 +++ mtr-0.33/NEWS Tue Mar 9 20:22:55 1999 @@ -1,5 +1,8 @@ WHAT'S NEW? + v0.33 Fixed the Linux glibc resolver problems. + Fixed the off-by-one problem with -c option. + v0.32 Fixed the FreeBSD bug detection stuff. v0.31 Fixed a few documentation issues. -- Matt diff -ur mtr-0.32/configure mtr-0.33/configure --- mtr-0.32/configure Sat Mar 6 14:27:09 1999 +++ mtr-0.33/configure Tue Mar 9 19:59:41 1999 @@ -700,7 +700,7 @@ PACKAGE=mtr -VERSION=0.32 +VERSION=0.33 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -2119,13 +2119,157 @@ fi +echo $ac_n "checking for res_mkquery""... $ac_c" 1>&6 +echo "configure:2124: checking for res_mkquery" >&5 +if eval "test \"`echo '$''{'ac_cv_func_res_mkquery'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* 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 res_mkquery(); + +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_res_mkquery) || defined (__stub___res_mkquery) +choke me +#else +res_mkquery(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_res_mkquery=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_res_mkquery=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'res_mkquery`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for res_init in -lbind""... $ac_c" 1>&6 +echo "configure:2170: checking for res_init in -lbind" >&5 +ac_lib_var=`echo bind'_'res_init | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lbind $LIBS" +cat > conftest.$ac_ext <&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 "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/^a-zA-Z0-9_/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +echo $ac_n "checking for res_init in -lresolv""... $ac_c" 1>&6 +echo "configure:2215: checking for res_init in -lresolv" >&5 +ac_lib_var=`echo resolv'_'res_init | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lresolv $LIBS" +cat > conftest.$ac_ext <&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 "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/^a-zA-Z0-9_/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +{ echo "configure: error: No resolver library found" 1>&2; exit 1; } +fi + +fi + +fi + + echo $ac_n "checking for herror""... $ac_c" 1>&6 -echo "configure:2124: checking for herror" >&5 +echo "configure:2268: checking for herror" >&5 if eval "test \"`echo '$''{'ac_cv_func_herror'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_herror=yes" else @@ -2172,12 +2316,12 @@ fi echo $ac_n "checking for strerror""... $ac_c" 1>&6 -echo "configure:2176: checking for strerror" >&5 +echo "configure:2320: checking for strerror" >&5 if eval "test \"`echo '$''{'ac_cv_func_strerror'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_strerror=yes" else diff -ur mtr-0.32/configure.in mtr-0.33/configure.in --- mtr-0.32/configure.in Fri Mar 5 08:28:21 1999 +++ mtr-0.33/configure.in Tue Mar 9 19:56:49 1999 @@ -1,5 +1,5 @@ AC_INIT(mtr.c) -AM_INIT_AUTOMAKE(mtr, 0.32) +AM_INIT_AUTOMAKE(mtr, 0.33) AC_SUBST(GTK_OBJ) AC_SUBST(CURSES_OBJ) @@ -38,6 +38,10 @@ AC_CHECK_LIB(nsl, gethostbyname, , AC_MSG_ERROR(No nameservice library found))) AC_CHECK_FUNC(res_init, , + AC_CHECK_LIB(bind, res_init, , + AC_CHECK_LIB(resolv, res_init, , AC_MSG_ERROR(No resolver library found)))) + +AC_CHECK_FUNC(res_mkquery, , AC_CHECK_LIB(bind, res_init, , AC_CHECK_LIB(resolv, res_init, , AC_MSG_ERROR(No resolver library found)))) diff -ur mtr-0.32/select.c mtr-0.33/select.c --- mtr-0.32/select.c Fri Mar 5 00:49:41 1999 +++ mtr-0.33/select.c Tue Mar 9 20:21:21 1999 @@ -46,7 +46,9 @@ struct timeval lasttime, thistime, selecttime; float wt; - NumPing = 0; + /* This starts at -1, because the first packet sent is not counted + as a ping. That confuses people. */ + NumPing = -1; anyset = 0; gettimeofday(&lasttime, NULL); DeltaTime = WaitTime/10; .