From: Doug Morris Date: Fri, 15 Oct 1999 22:38:55 +0000 (+0000) Subject: replaced the BIND guess (based on BSDishness) with checks for gethostbyname and setho... X-Git-Tag: nmh-1_0~133 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=3d251965606d6a6e47897504594f84d12e3e292a;p=mmh replaced the BIND guess (based on BSDishness) with checks for gethostbyname and sethostent --- diff --git a/ChangeLog b/ChangeLog index cb6de26..ab88fa9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Sat Oct 16 00:17:36 1999 Doug Morris + + * Removed BIND define and replaced it with a check for + gethostbyname (to determine if the host is DNS aware) and a + check for sethostent. This appears to be the right thing to + do, but there is no explanation of the reasoning behind the + BIND define in the code and it appears to have been used for + multiple purposes. + Wed Oct 13 15:53:53 1999 Doug Morris * Updated manpages Makefile to link mh-profile.5 to diff --git a/acconfig.h b/acconfig.h index 476bb92..6db7549 100644 --- a/acconfig.h +++ b/acconfig.h @@ -132,7 +132,6 @@ /* Defined for SunOS 4, FreeBSD, NetBSD, OpenBSD, BSD/OS -- does * PicoBSD have uname? :) */ -#undef BIND #undef BSD42 /* Defined for SCO5 */ @@ -253,5 +252,14 @@ /* Define if your system has mkstemp */ #undef HAVE_MKSTEMP +/* Define if your system has sethostent */ +#undef HAVE_SETHOSTENT + +/* Define if your system has gethostbyname */ +#undef HAVE_GETHOSTBYNAME + +/* Define if your system has netdb.h */ +#undef HAVE_NETDB_H + /* Define if your system has db1/ndbm.h instead of ndbm.h (ppclinux) */ #undef HAVE_DB1_NDBM_H diff --git a/config.h.in b/config.h.in index 6d03f36..64b33bd 100644 --- a/config.h.in +++ b/config.h.in @@ -133,7 +133,6 @@ /* Defined for SunOS 4, FreeBSD, NetBSD, OpenBSD, BSD/OS -- does * PicoBSD have uname? :) */ -#undef BIND #undef BSD42 /* Defined for SCO5 */ @@ -297,6 +296,9 @@ /* Define if your system has sigsetjmp */ #undef HAVE_SIGSETJMP +/* Define if you have the gethostbyname function. */ +#undef HAVE_GETHOSTBYNAME + /* Define if you have the killpg function. */ #undef HAVE_KILLPG @@ -306,6 +308,9 @@ /* Define if you have the mkstemp function. */ #undef HAVE_MKSTEMP +/* Define if you have the sethostent function. */ +#undef HAVE_SETHOSTENT + /* Define if you have the sigaction function. */ #undef HAVE_SIGACTION @@ -381,6 +386,9 @@ /* Define if you have the header file. */ #undef HAVE_NDIR_H +/* Define if you have the header file. */ +#undef HAVE_NETDB_H + /* Define if you have the header file. */ #undef HAVE_STDLIB_H diff --git a/configure b/configure index 456d6ba..c4ee350 100755 --- a/configure +++ b/configure @@ -2119,7 +2119,7 @@ fi for ac_hdr in string.h memory.h stdlib.h unistd.h errno.h fcntl.h \ limits.h crypt.h termcap.h termio.h termios.h locale.h \ - sys/param.h sys/time.h sys/utsname.h arpa/inet.h \ + netdb.h sys/param.h sys/time.h sys/utsname.h arpa/inet.h \ arpa/ftp.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` @@ -2638,15 +2638,16 @@ else fi for ac_func in waitpid wait3 sigaction sigprocmask sigblock sigsetmask \ - sighold sigrelse writev lstat uname tzset killpg mkstemp + sighold sigrelse writev lstat uname tzset killpg mkstemp \ + sethostent gethostbyname do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2645: checking for $ac_func" >&5 +echo "configure:2646: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2695,16 +2696,16 @@ done echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 -echo "configure:2699: checking for sigsetjmp" >&5 +echo "configure:2700: checking for sigsetjmp" >&5 cat > conftest.$ac_ext < int main() { sigsetjmp((void *)0, 0); ; return 0; } EOF -if { (eval echo configure:2708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_SIGSETJMP 1 @@ -2721,12 +2722,12 @@ rm -f conftest* for ac_func in snprintf strerror strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2725: checking for $ac_func" >&5 +echo "configure:2726: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2777,12 +2778,12 @@ done echo $ac_n "checking for modf""... $ac_c" 1>&6 -echo "configure:2781: checking for modf" >&5 +echo "configure:2782: checking for modf" >&5 if eval "test \"`echo '$''{'ac_cv_func_modf'+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:2810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_modf=yes" else @@ -2823,7 +2824,7 @@ if eval "test \"`echo '$ac_cv_func_'modf`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for modf in -lm""... $ac_c" 1>&6 -echo "configure:2827: checking for modf in -lm" >&5 +echo "configure:2828: checking for modf in -lm" >&5 ac_lib_var=`echo m'_'modf | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2831,7 +2832,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2847: \"$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 @@ -2873,12 +2874,12 @@ fi echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:2877: checking for gethostbyname" >&5 +echo "configure:2878: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+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:2906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -2919,7 +2920,7 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:2923: checking for gethostbyname in -lnsl" >&5 +echo "configure:2924: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2927,7 +2928,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2943: \"$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 @@ -2964,7 +2965,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for gethostbyname in -lresolv""... $ac_c" 1>&6 -echo "configure:2968: checking for gethostbyname in -lresolv" >&5 +echo "configure:2969: checking for gethostbyname in -lresolv" >&5 ac_lib_var=`echo resolv'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2972,7 +2973,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2988: \"$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 @@ -3015,12 +3016,12 @@ fi fi echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:3019: checking for socket" >&5 +echo "configure:3020: checking for socket" >&5 if eval "test \"`echo '$''{'ac_cv_func_socket'+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:3048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -3061,7 +3062,7 @@ if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 -echo "configure:3065: checking for socket in -lsocket" >&5 +echo "configure:3066: 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 @@ -3069,7 +3070,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3085: \"$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 @@ -3112,12 +3113,12 @@ fi echo $ac_n "checking for ruserpass""... $ac_c" 1>&6 -echo "configure:3116: checking for ruserpass" >&5 +echo "configure:3117: checking for ruserpass" >&5 if eval "test \"`echo '$''{'ac_cv_func_ruserpass'+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:3145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_ruserpass=yes" else @@ -3158,12 +3159,12 @@ if eval "test \"`echo '$ac_cv_func_'ruserpass`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for _ruserpass""... $ac_c" 1>&6 -echo "configure:3162: checking for _ruserpass" >&5 +echo "configure:3163: checking for _ruserpass" >&5 if eval "test \"`echo '$''{'ac_cv_func__ruserpass'+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:3191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__ruserpass=yes" else @@ -3204,7 +3205,7 @@ if eval "test \"`echo '$ac_cv_func_'_ruserpass`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for _ruserpass in -lsocket""... $ac_c" 1>&6 -echo "configure:3208: checking for _ruserpass in -lsocket" >&5 +echo "configure:3209: checking for _ruserpass in -lsocket" >&5 ac_lib_var=`echo socket'_'_ruserpass | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3212,7 +3213,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3228: \"$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 @@ -3269,7 +3270,7 @@ fi termcap_curses_order="termcap curses ncurses" for lib in $termcap_curses_order; do echo $ac_n "checking for tgetent in -l${lib}""... $ac_c" 1>&6 -echo "configure:3273: checking for tgetent in -l${lib}" >&5 +echo "configure:3274: checking for tgetent in -l${lib}" >&5 ac_lib_var=`echo ${lib}'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3277,7 +3278,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l${lib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3293: \"$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 @@ -3312,12 +3313,12 @@ done echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:3316: checking for dbm_open" >&5 +echo "configure:3317: checking for dbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+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:3345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -3358,7 +3359,7 @@ if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6 -echo "configure:3362: checking for dbm_open in -lndbm" >&5 +echo "configure:3363: checking for dbm_open in -lndbm" >&5 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3366,7 +3367,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lndbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3382: \"$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 @@ -3403,7 +3404,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:3407: checking for dbm_open in -ldbm" >&5 +echo "configure:3408: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3411,7 +3412,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldbm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3427: \"$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 @@ -3458,17 +3459,17 @@ for ac_hdr in db1/ndbm.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3462: checking for $ac_hdr" >&5 +echo "configure:3463: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3501,12 +3502,12 @@ if test x$with_hesiod != x -a x$with_hesiod != xno; then HESIOD_LIBS="-L$with_hesiod/lib" fi echo $ac_n "checking for res_send""... $ac_c" 1>&6 -echo "configure:3505: checking for res_send" >&5 +echo "configure:3506: checking for res_send" >&5 if eval "test \"`echo '$''{'ac_cv_func_res_send'+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:3534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_res_send=yes" else @@ -3547,7 +3548,7 @@ if eval "test \"`echo '$ac_cv_func_'res_send`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for res_send in -lresolv""... $ac_c" 1>&6 -echo "configure:3551: checking for res_send in -lresolv" >&5 +echo "configure:3552: checking for res_send in -lresolv" >&5 ac_lib_var=`echo resolv'_'res_send | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3555,7 +3556,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3571: \"$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 @@ -3596,7 +3597,7 @@ fi fi echo $ac_n "checking for hes_resolve in -lhesiod""... $ac_c" 1>&6 -echo "configure:3600: checking for hes_resolve in -lhesiod" >&5 +echo "configure:3601: checking for hes_resolve in -lhesiod" >&5 ac_lib_var=`echo hesiod'_'hes_resolve | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3604,7 +3605,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lhesiod $HESIOD_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3620: \"$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 @@ -3649,7 +3650,7 @@ if test x$with_krb4 != x -a x$with_krb4 != xno; then KRB4_INCLUDES="-I/usr/include/kerberosIV" fi echo $ac_n "checking for krb_rd_req in -lkrb4""... $ac_c" 1>&6 -echo "configure:3653: checking for krb_rd_req in -lkrb4" >&5 +echo "configure:3654: checking for krb_rd_req in -lkrb4" >&5 ac_lib_var=`echo krb4'_'krb_rd_req | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3657,7 +3658,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lkrb4 $KRB4_LIBS -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3673: \"$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 @@ -3687,7 +3688,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for krb_rd_req in -lkrb""... $ac_c" 1>&6 -echo "configure:3691: checking for krb_rd_req in -lkrb" >&5 +echo "configure:3692: checking for krb_rd_req in -lkrb" >&5 ac_lib_var=`echo krb'_'krb_rd_req | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3695,7 +3696,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lkrb $KRB4_LIBS -ldes $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3711: \"$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 @@ -3736,12 +3737,12 @@ nmh_save_LIBS="$LIBS" LIBS="$TERMLIB $LIBS" echo $ac_n "checking if an include file defines ospeed""... $ac_c" 1>&6 -echo "configure:3740: checking if an include file defines ospeed" >&5 +echo "configure:3741: checking if an include file defines ospeed" >&5 if eval "test \"`echo '$''{'nmh_cv_decl_ospeed_include_defines'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if HAVE_TERMIOS_H @@ -3754,7 +3755,7 @@ int main() { ospeed = 0; ; return 0; } EOF -if { (eval echo configure:3758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* nmh_cv_decl_ospeed_include_defines=yes else @@ -3770,19 +3771,19 @@ echo "$ac_t""$nmh_cv_decl_ospeed_include_defines" 1>&6 if test $nmh_cv_decl_ospeed_include_defines = no; then echo $ac_n "checking if you must define ospeed""... $ac_c" 1>&6 -echo "configure:3774: checking if you must define ospeed" >&5 +echo "configure:3775: checking if you must define ospeed" >&5 if eval "test \"`echo '$''{'nmh_cv_decl_ospeed_must_define'+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:3787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* nmh_cv_decl_ospeed_must_define=yes else @@ -3817,12 +3818,12 @@ fi LIBS="$nmh_save_LIBS" echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3821: checking return type of signal handlers" >&5 +echo "configure:3822: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3839,7 +3840,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3858,12 +3859,12 @@ EOF echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3862: checking for pid_t" >&5 +echo "configure:3863: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3891,12 +3892,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3895: checking for off_t" >&5 +echo "configure:3896: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3924,12 +3925,12 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3928: checking for uid_t in sys/types.h" >&5 +echo "configure:3929: checking for uid_t in sys/types.h" >&5 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF @@ -3958,12 +3959,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3962: checking for mode_t" >&5 +echo "configure:3963: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3991,12 +3992,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3995: checking for size_t" >&5 +echo "configure:3996: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4025,12 +4026,12 @@ fi echo $ac_n "checking for sigset_t""... $ac_c" 1>&6 -echo "configure:4029: checking for sigset_t" >&5 +echo "configure:4030: checking for sigset_t" >&5 if eval "test \"`echo '$''{'nmh_cv_type_sigset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4038,7 +4039,7 @@ int main() { sigset_t tempsigset; ; return 0; } EOF -if { (eval echo configure:4042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* nmh_cv_type_sigset_t=yes else @@ -4059,12 +4060,12 @@ EOF fi echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6 -echo "configure:4063: checking for st_blksize in struct stat" >&5 +echo "configure:4064: checking for st_blksize in struct stat" >&5 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4072,7 +4073,7 @@ int main() { struct stat s; s.st_blksize; ; return 0; } EOF -if { (eval echo configure:4076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_st_blksize=yes else @@ -4094,12 +4095,12 @@ fi echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6 -echo "configure:4098: checking for tm_gmtoff in struct tm" >&5 +echo "configure:4099: checking for tm_gmtoff in struct tm" >&5 if eval "test \"`echo '$''{'nmh_cv_struct_tm_gmtoff'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4115,7 +4116,7 @@ int main() { struct tm temptm; temptm.tm_gmtoff = 0; ; return 0; } EOF -if { (eval echo configure:4119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* nmh_cv_struct_tm_gmtoff=yes else @@ -4136,7 +4137,7 @@ EOF fi echo $ac_n "checking what style of signals to use""... $ac_c" 1>&6 -echo "configure:4140: checking what style of signals to use" >&5 +echo "configure:4141: checking what style of signals to use" >&5 if test $ac_cv_func_sigaction = yes -a $ac_cv_func_sigprocmask = yes; then signals_style=POSIX_SIGNALS cat >> confdefs.h <<\EOF @@ -4174,7 +4175,7 @@ fi echo "$ac_t""$signals_style" 1>&6 echo $ac_n "checking where signal.h is located""... $ac_c" 1>&6 -echo "configure:4178: checking where signal.h is located" >&5 +echo "configure:4179: checking where signal.h is located" >&5 if eval "test \"`echo '$''{'nmh_cv_path_signal_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4234,20 +4235,12 @@ EOF ;; sunos4*) cat >> confdefs.h <<\EOF -#define BIND 1 -EOF - - cat >> confdefs.h <<\EOF #define BSD42 1 EOF ;; freebsd*) cat >> confdefs.h <<\EOF -#define BIND 1 -EOF - - cat >> confdefs.h <<\EOF #define BSD42 1 EOF @@ -4258,10 +4251,6 @@ EOF ;; netbsd*) cat >> confdefs.h <<\EOF -#define BIND 1 -EOF - - cat >> confdefs.h <<\EOF #define BSD42 1 EOF @@ -4272,10 +4261,6 @@ EOF ;; openbsd*) cat >> confdefs.h <<\EOF -#define BIND 1 -EOF - - cat >> confdefs.h <<\EOF #define BSD42 1 EOF @@ -4286,10 +4271,6 @@ EOF ;; bsd/os*) cat >> confdefs.h <<\EOF -#define BIND 1 -EOF - - cat >> confdefs.h <<\EOF #define BSD42 1 EOF diff --git a/configure.in b/configure.in index 5bf050c..f06a1d2 100644 --- a/configure.in +++ b/configure.in @@ -285,7 +285,7 @@ AC_HEADER_SYS_WAIT AC_HEADER_STAT AC_CHECK_HEADERS(string.h memory.h stdlib.h unistd.h errno.h fcntl.h \ limits.h crypt.h termcap.h termio.h termios.h locale.h \ - sys/param.h sys/time.h sys/utsname.h arpa/inet.h \ + netdb.h sys/param.h sys/time.h sys/utsname.h arpa/inet.h \ arpa/ftp.h) @@ -339,7 +339,8 @@ dnl --------------- AC_FUNC_VFORK AC_CHECK_LIB(mkstemp,mkstemp) AC_CHECK_FUNCS(waitpid wait3 sigaction sigprocmask sigblock sigsetmask \ - sighold sigrelse writev lstat uname tzset killpg mkstemp) + sighold sigrelse writev lstat uname tzset killpg mkstemp \ + sethostent gethostbyname) dnl sigsetjmp may be a macro AC_MSG_CHECKING(for sigsetjmp) @@ -583,26 +584,21 @@ case "$target_os" in AC_DEFINE(SVR4) ;; sunos4*) - AC_DEFINE(BIND) AC_DEFINE(BSD42) ;; freebsd*) - AC_DEFINE(BIND) AC_DEFINE(BSD42) AC_DEFINE(BSD44) ;; netbsd*) - AC_DEFINE(BIND) AC_DEFINE(BSD42) AC_DEFINE(BSD44) ;; openbsd*) - AC_DEFINE(BIND) AC_DEFINE(BSD42) AC_DEFINE(BSD44) ;; bsd/os*) - AC_DEFINE(BIND) AC_DEFINE(BSD42) AC_DEFINE(BSD44) ;; diff --git a/mts/sendmail/hosts.c b/mts/sendmail/hosts.c index 7d1d808..0bc7532 100644 --- a/mts/sendmail/hosts.c +++ b/mts/sendmail/hosts.c @@ -47,7 +47,7 @@ OfficialName (char *name) if (!strcasecmp (LocalName(), site)) return LocalName(); -#ifndef BIND +#ifdef HAVE_SETHOSTENT sethostent (1); #endif diff --git a/mts/smtp/hosts.c b/mts/smtp/hosts.c index daa59b6..83727d5 100644 --- a/mts/smtp/hosts.c +++ b/mts/smtp/hosts.c @@ -47,7 +47,7 @@ OfficialName (char *name) if (!strcasecmp (LocalName(), site)) return LocalName(); -#ifndef BIND +#ifdef HAVE_SETHOSTENT sethostent (1); #endif diff --git a/uip/ftpsbr.c b/uip/ftpsbr.c index 671a533..525554e 100644 --- a/uip/ftpsbr.c +++ b/uip/ftpsbr.c @@ -29,7 +29,7 @@ extern int v_verbose; #include #include -#if defined(BIND) && !defined(h_addr) +#if !defined(h_addr) # define h_addr h_addr_list[0] #endif diff --git a/zotnet/mts/client.c b/zotnet/mts/client.c index b9679e9..2093374 100644 --- a/zotnet/mts/client.c +++ b/zotnet/mts/client.c @@ -61,7 +61,7 @@ char krb_realm[REALM_SZ]; char *PrincipalHostname(); #endif /* KPOP */ -#if defined(BIND) && !defined(h_addr) +#if !defined(h_addr) # define h_addr h_addr_list[0] #endif @@ -92,7 +92,8 @@ client (char *args, char *protocol, char *service, int rproto, char *arguments[MAXARGS]; register struct hostent *hp; register struct servent *sp; -#ifndef BIND +/* we assume netent and getnetbyaddr come with gethostbyname */ +#ifdef HAVE_GETHOSTBYNAME register struct netent *np; #endif @@ -143,9 +144,18 @@ client (char *args, char *protocol, char *service, int rproto, for (ap = arguments; *ap; ap++) { if (**ap == '\01') { -#ifndef BIND +/* + * the assumption here is that if the system doesn't have a + * gethostbyname() function, it must not use DNS. So we need to look + * into the /etc/hosts using gethostent(). There probablly aren't any + * systems still like this, but you never know. On every system I have + * access to, this section is ignored. + */ +#ifndef HAVE_GETHOSTBYNAME if ((np = getnetbyname (*ap + 1))) { +#ifdef HAVE_SETHOSTENT sethostent (1); +#endif /* HAVE_SETHOSTENT */ while ((hp = gethostent())) if (np->n_addrtype == hp->h_addrtype && inet (hp, np->n_net)) { @@ -163,7 +173,7 @@ client (char *args, char *protocol, char *service, int rproto, break; } } -#endif +#endif /* don't HAVE_GETHOSTBYNAME */ continue; } diff --git a/zotnet/mts/mts.c b/zotnet/mts/mts.c index 31d96bd..f53a8be 100644 --- a/zotnet/mts/mts.c +++ b/zotnet/mts/mts.c @@ -285,9 +285,9 @@ LocalName (void) /* first get our local name */ gethostname (buffer, sizeof(buffer)); #endif -#ifndef BIND +#ifdef HAVE_SETHOSTENT sethostent (1); -#endif +#endif /* now fully qualify our name */ if ((hp = gethostbyname (buffer))) strncpy (buffer, hp->h_name, sizeof(buffer));