From 607c351a149e23617e14c8fd583fcb4f4e9d2aeb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 6 May 1999 23:17:13 +0000 Subject: [PATCH] Update. 1999-05-06 Ulrich Drepper * nss/digits_dots.c: Correct return value interpretation of inet_ntoa. Fix PR libc/1109. --- ChangeLog | 5 +++++ nss/digits_dots.c | 8 ++++---- sysdeps/generic/configure | 2 +- sysdeps/unix/common/configure | 6 +++--- sysdeps/unix/configure | 2 +- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index b1dc547..59400bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1999-05-06 Ulrich Drepper + + * nss/digits_dots.c: Correct return value interpretation of + inet_ntoa. Fix PR libc/1109. + 1999-05-06 Zack Weinberg * sysdeps/sparc/sparc32/sparcv9/Dist: New file. diff --git a/nss/digits_dots.c b/nss/digits_dots.c index ecc49c1..28a3397 100644 --- a/nss/digits_dots.c +++ b/nss/digits_dots.c @@ -98,7 +98,7 @@ { if (!*cp) { - int not_ok; + int ok; if (*--cp == '.') break; @@ -108,13 +108,13 @@ 255.255.255.255? The test below will succeed spuriously... ??? */ if (af == AF_INET) - not_ok = inet_aton (name, (struct in_addr *) host_addr); + ok = inet_aton (name, (struct in_addr *) host_addr); else { assert (af == AF_INET6); - not_ok = (inet_pton (af, name, host_addr) <= 0); + ok = (inet_pton (af, name, host_addr) > 0); } - if (not_ok) + if (! ok) { __set_h_errno (HOST_NOT_FOUND); #ifndef HAVE_LOOKUP_BUFFER diff --git a/sysdeps/generic/configure b/sysdeps/generic/configure index ddfa2cf..574808f 100755 --- a/sysdeps/generic/configure +++ b/sysdeps/generic/configure @@ -32,7 +32,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:36: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:36: \"$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 diff --git a/sysdeps/unix/common/configure b/sysdeps/unix/common/configure index 9e26b27..acd4ef2 100755 --- a/sysdeps/unix/common/configure +++ b/sysdeps/unix/common/configure @@ -15,7 +15,7 @@ int main() { extern char *sys_siglist[]; puts(*sys_siglist); ; return 0; } EOF -if { (eval echo configure:19: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:19: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_check_symbol_sys_siglist=yes else @@ -48,7 +48,7 @@ int main() { extern char *_sys_siglist[]; puts(*_sys_siglist); ; return 0; } EOF -if { (eval echo configure:52: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:52: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_check_symbol__sys_siglist=yes else @@ -85,7 +85,7 @@ int main() { $ctype[13]; ; return 0; } EOF -if { (eval echo configure:89: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:89: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* libc_cv_ctype_glue="$ctype"; break else diff --git a/sysdeps/unix/configure b/sysdeps/unix/configure index 6398735..b7eff03 100755 --- a/sysdeps/unix/configure +++ b/sysdeps/unix/configure @@ -33,7 +33,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:37: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:37: \"$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 -- 2.7.4