diff --git a/lib/bind/configure b/lib/bind/configure index d7e2710591..7c162e8b51 100644 --- a/lib/bind/configure +++ b/lib/bind/configure @@ -1,7 +1,7 @@ #! /bin/sh -# From configure.in Revision: 1.10 +# From configure.in Revision: 1.11 # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 @@ -5120,7 +5120,36 @@ fi if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then echo "$ac_t""yes" 1>&6 + cat > conftest.$ac_ext < +struct hostent *gethostbyname_r + (const char *, struct hostent *, char *, int, int *h_errnop) {} + +int main() { +return (0); + +HOST_R_ARGS="#define HOST_R_ARGS char *buf, int buflen, int *h_errnop" +HOST_R_BAD="#define HOST_R_BAD NULL" +HOST_R_COPY="#define HOST_R_COPY buf, buflen" +HOST_R_COPY_ARGS="#define HOST_R_COPY_ARGS char *buf, int buflen" +HOST_R_ERRNO="#define HOST_R_ERRNO *h_errnop = h_errno" +HOST_R_OK="#define HOST_R_OK hptr" +HOST_R_RETURN="#define HOST_R_RETURN struct hostent *" + + +; return 0; } +EOF +if { (eval echo configure:5146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + else echo "$ac_t""no" 1>&6 HOST_R_ARGS="#define HOST_R_ARGS char *buf, int buflen, int *h_errnop" @@ -5142,12 +5171,12 @@ fi echo $ac_n "checking for endhostent_r""... $ac_c" 1>&6 -echo "configure:5146: checking for endhostent_r" >&5 +echo "configure:5175: checking for endhostent_r" >&5 if eval "test \"`echo '$''{'ac_cv_func_endhostent_r'+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:5203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_endhostent_r=yes" else @@ -5198,12 +5227,12 @@ fi echo $ac_n "checking for sethostent_r""... $ac_c" 1>&6 -echo "configure:5202: checking for sethostent_r" >&5 +echo "configure:5231: checking for sethostent_r" >&5 if eval "test \"`echo '$''{'ac_cv_func_sethostent_r'+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:5259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_sethostent_r=yes" else @@ -5253,7 +5282,7 @@ fi cat > conftest.$ac_ext < @@ -5265,7 +5294,7 @@ int main() { return (0); ; return 0; } EOF -if { (eval echo configure:5269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* SETPWENT_VOID="#define SETPWENT_VOID 1" @@ -5280,12 +5309,12 @@ rm -f conftest* echo $ac_n "checking for getnetgrent_r""... $ac_c" 1>&6 -echo "configure:5284: checking for getnetgrent_r" >&5 +echo "configure:5313: checking for getnetgrent_r" >&5 if eval "test \"`echo '$''{'ac_cv_func_getnetgrent_r'+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:5341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getnetgrent_r=yes" else @@ -5342,12 +5371,12 @@ fi echo $ac_n "checking for endnetgrent_r""... $ac_c" 1>&6 -echo "configure:5346: checking for endnetgrent_r" >&5 +echo "configure:5375: checking for endnetgrent_r" >&5 if eval "test \"`echo '$''{'ac_cv_func_endnetgrent_r'+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:5403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_endnetgrent_r=yes" else @@ -5398,12 +5427,12 @@ fi echo $ac_n "checking for setnetgrent_r""... $ac_c" 1>&6 -echo "configure:5402: checking for setnetgrent_r" >&5 +echo "configure:5431: checking for setnetgrent_r" >&5 if eval "test \"`echo '$''{'ac_cv_func_setnetgrent_r'+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:5459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_setnetgrent_r=yes" else @@ -5453,12 +5482,12 @@ fi echo $ac_n "checking for getprotoent_r""... $ac_c" 1>&6 -echo "configure:5457: checking for getprotoent_r" >&5 +echo "configure:5486: checking for getprotoent_r" >&5 if eval "test \"`echo '$''{'ac_cv_func_getprotoent_r'+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:5514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getprotoent_r=yes" else @@ -5495,7 +5524,37 @@ fi if eval "test \"`echo '$ac_cv_func_'getprotoent_r`\" = yes"; then echo "$ac_t""yes" 1>&6 - : + cat > conftest.$ac_ext < +struct protoent *getprotoent_r(struct protoent *result, + char *buffer, int buflen) {} + + +int main() { +return (0); + +; return 0; } +EOF +if { (eval echo configure:5542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + +PROTO_R_ARGS="#define PROTO_R_ARGS char *buf, int buflen" +PROTO_R_BAD="#define PROTO_R_BAD NULL" +PROTO_R_COPY="#define PROTO_R_COPY buf, buflen" +PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS PROTO_R_ARGS" +PROTO_R_OK="#define PROTO_R_OK pptr" +PROTO_R_RETURN="#define PROTO_R_RETURN struct protoent *" + + +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + else echo "$ac_t""no" 1>&6 PROTO_R_ARGS="#define PROTO_R_ARGS char *buf, int buflen" @@ -5515,12 +5574,12 @@ fi echo $ac_n "checking for endprotoent_r""... $ac_c" 1>&6 -echo "configure:5519: checking for endprotoent_r" >&5 +echo "configure:5578: checking for endprotoent_r" >&5 if eval "test \"`echo '$''{'ac_cv_func_endprotoent_r'+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:5606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_endprotoent_r=yes" else @@ -5571,12 +5630,12 @@ fi echo $ac_n "checking for setprotoent_r""... $ac_c" 1>&6 -echo "configure:5575: checking for setprotoent_r" >&5 +echo "configure:5634: checking for setprotoent_r" >&5 if eval "test \"`echo '$''{'ac_cv_func_setprotoent_r'+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:5662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_setprotoent_r=yes" else @@ -5625,12 +5684,12 @@ fi echo $ac_n "checking for getpwent_r""... $ac_c" 1>&6 -echo "configure:5629: checking for getpwent_r" >&5 +echo "configure:5688: checking for getpwent_r" >&5 if eval "test \"`echo '$''{'ac_cv_func_getpwent_r'+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:5716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getpwent_r=yes" else @@ -5687,12 +5746,12 @@ fi echo $ac_n "checking for endpwent_r""... $ac_c" 1>&6 -echo "configure:5691: checking for endpwent_r" >&5 +echo "configure:5750: checking for endpwent_r" >&5 if eval "test \"`echo '$''{'ac_cv_func_endpwent_r'+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:5778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_endpwent_r=yes" else @@ -5743,12 +5802,12 @@ fi echo $ac_n "checking for setpwent_r""... $ac_c" 1>&6 -echo "configure:5747: checking for setpwent_r" >&5 +echo "configure:5806: checking for setpwent_r" >&5 if eval "test \"`echo '$''{'ac_cv_func_setpwent_r'+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:5834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_setpwent_r=yes" else @@ -5797,12 +5856,12 @@ fi echo $ac_n "checking for getservent_r""... $ac_c" 1>&6 -echo "configure:5801: checking for getservent_r" >&5 +echo "configure:5860: checking for getservent_r" >&5 if eval "test \"`echo '$''{'ac_cv_func_getservent_r'+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:5888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_getservent_r=yes" else @@ -5840,7 +5899,7 @@ fi if eval "test \"`echo '$ac_cv_func_'getservent_r`\" = yes"; then echo "$ac_t""yes" 1>&6 cat > conftest.$ac_ext < @@ -5851,7 +5910,7 @@ int main() { return (0); ; return 0; } EOF -if { (eval echo configure:5855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* SERV_R_ARGS="#define SERV_R_ARGS char *buf, int buflen" @@ -5887,12 +5946,12 @@ fi echo $ac_n "checking for endservent_r""... $ac_c" 1>&6 -echo "configure:5891: checking for endservent_r" >&5 +echo "configure:5950: checking for endservent_r" >&5 if eval "test \"`echo '$''{'ac_cv_func_endservent_r'+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:5978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_endservent_r=yes" else @@ -5943,12 +6002,12 @@ fi echo $ac_n "checking for setservent_r""... $ac_c" 1>&6 -echo "configure:5947: checking for setservent_r" >&5 +echo "configure:6006: checking for setservent_r" >&5 if eval "test \"`echo '$''{'ac_cv_func_setservent_r'+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:6034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_setservent_r=yes" else @@ -6074,7 +6133,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6078: checking for $ac_word" >&5 +echo "configure:6137: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_JADE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6121,7 +6180,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6125: checking for $ac_word" >&5 +echo "configure:6184: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_TEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6163,7 +6222,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6167: checking for $ac_word" >&5 +echo "configure:6226: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PDFTEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6208,7 +6267,7 @@ done SGMLDIR="" echo $ac_n "checking for SGML files""... $ac_c" 1>&6 -echo "configure:6212: checking for SGML files" >&5 +echo "configure:6271: checking for SGML files" >&5 for d in /usr/pkg/share/sgml /usr/local/share/sgml do if test -f $d/docbook/dsssl/modular/html/docbook.dsl @@ -6233,7 +6292,7 @@ fi XGMLDIR="" echo $ac_n "checking for XML files""... $ac_c" 1>&6 -echo "configure:6237: checking for XML files" >&5 +echo "configure:6296: checking for XML files" >&5 for d in /usr/pkg/share/xml /usr/local/share/xml do if test -f $d/dtd/docbook/docbookx.dtd diff --git a/lib/bind/configure.in b/lib/bind/configure.in index 868f6a5508..64131093b8 100644 --- a/lib/bind/configure.in +++ b/lib/bind/configure.in @@ -18,7 +18,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl esyscmd([sed "s/^/# /" COPYRIGHT])dnl AC_DIVERT_POP()dnl -AC_REVISION($Revision: 1.11 $) +AC_REVISION($Revision: 1.12 $) AC_INIT(resolv/herror.c) AC_PREREQ(2.13) @@ -1382,6 +1382,24 @@ AC_SUBST(GROUP_R_SET_RESULT) AC_SUBST(GROUP_R_SET_RETURN) AC_CHECK_FUNC(gethostbyname_r, +AC_TRY_COMPILE( +[ +#include +struct hostent *gethostbyname_r + (const char *, struct hostent *, char *, int, int *h_errnop) {} +], +[return (0);] +[ +HOST_R_ARGS="#define HOST_R_ARGS char *buf, int buflen, int *h_errnop" +HOST_R_BAD="#define HOST_R_BAD NULL" +HOST_R_COPY="#define HOST_R_COPY buf, buflen" +HOST_R_COPY_ARGS="#define HOST_R_COPY_ARGS char *buf, int buflen" +HOST_R_ERRNO="#define HOST_R_ERRNO *h_errnop = h_errno" +HOST_R_OK="#define HOST_R_OK hptr" +HOST_R_RETURN="#define HOST_R_RETURN struct hostent *" +] +, +) , HOST_R_ARGS="#define HOST_R_ARGS char *buf, int buflen, int *h_errnop" HOST_R_BAD="#define HOST_R_BAD NULL" @@ -1467,6 +1485,25 @@ AC_SUBST(NGR_R_SET_RETURN) AC_CHECK_FUNC(getprotoent_r, +AC_TRY_COMPILE( +[ +#include +struct protoent *getprotoent_r(struct protoent *result, + char *buffer, int buflen) {} +] +, +[return (0);] +, +[ +PROTO_R_ARGS="#define PROTO_R_ARGS char *buf, int buflen" +PROTO_R_BAD="#define PROTO_R_BAD NULL" +PROTO_R_COPY="#define PROTO_R_COPY buf, buflen" +PROTO_R_COPY_ARGS="#define PROTO_R_COPY_ARGS PROTO_R_ARGS" +PROTO_R_OK="#define PROTO_R_OK pptr" +PROTO_R_RETURN="#define PROTO_R_RETURN struct protoent *" +] +, +) , PROTO_R_ARGS="#define PROTO_R_ARGS char *buf, int buflen" PROTO_R_BAD="#define PROTO_R_BAD NULL" diff --git a/lib/bind/irs/getnetent.c b/lib/bind/irs/getnetent.c index 8d57869888..d344ecdc73 100644 --- a/lib/bind/irs/getnetent.c +++ b/lib/bind/irs/getnetent.c @@ -16,7 +16,7 @@ */ #if !defined(LINT) && !defined(CODECENTER) -static const char rcsid[] = "$Id: getnetent.c,v 1.3 2001/04/03 06:42:26 marka Exp $"; +static const char rcsid[] = "$Id: getnetent.c,v 1.4 2001/04/03 07:33:07 marka Exp $"; #endif /* Imports */ @@ -263,7 +263,7 @@ fakeaddr(const char *name, int af, struct net_data *net_data) { !isdigit((unsigned char)(name[0]))) return (NULL); for (cp = name; *cp; ++cp) - if (!isascii(*cp) || (!isdigit(*cp) && *cp != '.')) + if (!isascii(*cp) || (!isdigit((unsigned char)*cp) && *cp != '.')) return (NULL); if (*--cp == '.') return (NULL);