aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-06-28 12:43:04 +0000
committerUlrich Drepper <drepper@redhat.com>1999-06-28 12:43:04 +0000
commit738d1a5a43e97ee81d7b62a3c7a5f754f5b51b82 (patch)
treebc18f398e0681d23de9f337fc065fffdad6c20bb
parent419505579c2befc057e2687f6d7b948c417bae2c (diff)
downloadglibc-738d1a5a43e97ee81d7b62a3c7a5f754f5b51b82.zip
glibc-738d1a5a43e97ee81d7b62a3c7a5f754f5b51b82.tar.gz
glibc-738d1a5a43e97ee81d7b62a3c7a5f754f5b51b82.tar.bz2
Update.
1999-06-28 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/gethostid.c: Test for gethostbyname_r function correctly. * sunrpc/getrpcport.c: Test for gethostbyname_r function correctly. * sunrpc/clnt_simp.c: Test for gethostbyname_r function correctly. * sunrpc/clnt_gen.c: Test for gethostbyname_r and getprotobyname_r functions correctly. * inet/rexec.c (rexec): Test for gethostbyname_r result correctly. * inet/rcmd.c: Test for gethostbyname_r result correctly. Optimize file reading a bit. * sysdeps/generic/glob.c: Test for getpwnam_r result correctly. 1999-06-28 Andreas Jaeger <aj@arthur.rhein-neckar.de> * manual/string.texi (Copying and Concatenation): Mention that strndup is a GNU extension. 1999-06-28 Andreas Jaeger <aj@arthur.rhein-neckar.de> * pwd/getpw.c (__getpw): Fix check for error return.
-rw-r--r--ChangeLog29
-rw-r--r--inet/rcmd.c8
-rw-r--r--inet/rexec.c2
-rw-r--r--manual/string.texi2
-rw-r--r--pwd/getpw.c4
-rw-r--r--sunrpc/clnt_gen.c5
-rw-r--r--sunrpc/clnt_simp.c2
-rw-r--r--sunrpc/getrpcport.c3
-rw-r--r--sysdeps/generic/glob.c5
-rw-r--r--sysdeps/unix/sysv/linux/gethostid.c4
10 files changed, 47 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index e910a50..2c8874b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,32 @@
+1999-06-28 Ulrich Drepper <drepper@cygnus.com>
+
+ * sysdeps/unix/sysv/linux/gethostid.c: Test for gethostbyname_r
+ function correctly.
+
+ * sunrpc/getrpcport.c: Test for gethostbyname_r function
+ correctly.
+
+ * sunrpc/clnt_simp.c: Test for gethostbyname_r function correctly.
+
+ * sunrpc/clnt_gen.c: Test for gethostbyname_r and getprotobyname_r
+ functions correctly.
+
+ * inet/rexec.c (rexec): Test for gethostbyname_r result correctly.
+
+ * inet/rcmd.c: Test for gethostbyname_r result correctly. Optimize
+ file reading a bit.
+
+ * sysdeps/generic/glob.c: Test for getpwnam_r result correctly.
+
+1999-06-28 Andreas Jaeger <aj@arthur.rhein-neckar.de>
+
+ * manual/string.texi (Copying and Concatenation): Mention that
+ strndup is a GNU extension.
+
+1999-06-28 Andreas Jaeger <aj@arthur.rhein-neckar.de>
+
+ * pwd/getpw.c (__getpw): Fix check for error return.
+
1999-06-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
* elf/dl-deps.c (_dl_map_object_deps): When looking for the next
diff --git a/inet/rcmd.c b/inet/rcmd.c
index 6d196b7..d8235da 100644
--- a/inet/rcmd.c
+++ b/inet/rcmd.c
@@ -80,7 +80,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
hstbuflen = 1024;
tmphstbuf = __alloca (hstbuflen);
while (__gethostbyname_r (*ahost, &hostbuf, tmphstbuf, hstbuflen,
- &hp, &herr) < 0)
+ &hp, &herr) != 0)
if (herr != NETDB_INTERNAL || errno != ERANGE)
{
__set_h_errno (herr);
@@ -469,7 +469,7 @@ __icheckhost (raddr, lhost, rhost)
buffer = __alloca (buflen);
save_errno = errno;
while (__gethostbyname_r (lhost, &hostbuf, buffer, buflen, &hp, &herr)
- < 0)
+ != 0)
if (herr != NETDB_INTERNAL || errno != ERANGE)
return (0);
else {
@@ -563,10 +563,10 @@ __ivaliduser2(hostf, raddr, luser, ruser, rhost)
/* Skip lines that are too long. */
if (strchr (p, '\n') == NULL) {
- int ch = getc (hostf);
+ int ch = getc_unlocked (hostf);
while (ch != '\n' && ch != EOF)
- ch = getc (hostf);
+ ch = getc_unlocked (hostf);
continue;
}
diff --git a/inet/rexec.c b/inet/rexec.c
index 4032c82..6ba7d20 100644
--- a/inet/rexec.c
+++ b/inet/rexec.c
@@ -64,7 +64,7 @@ rexec(ahost, rport, name, pass, cmd, fd2p)
hstbuflen = 1024;
hsttmpbuf = __alloca (hstbuflen);
while (__gethostbyname_r (*ahost, &hostbuf, hsttmpbuf, hstbuflen,
- &hp, &herr) < 0)
+ &hp, &herr) != 0)
if (herr != NETDB_INTERNAL || errno != ERANGE)
{
__set_h_errno (herr);
diff --git a/manual/string.texi b/manual/string.texi
index 943cb09..45b2bc8 100644
--- a/manual/string.texi
+++ b/manual/string.texi
@@ -372,6 +372,8 @@ terminated.
This function is different to @code{strncpy} in that it always
terminates the destination string.
+
+@code{strndup} is a GNU extension.
@end deftypefun
@comment string.h
diff --git a/pwd/getpw.c b/pwd/getpw.c
index 52c3db7..8bfb02e 100644
--- a/pwd/getpw.c
+++ b/pwd/getpw.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1996, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1996, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -47,7 +47,7 @@ __getpw (uid, buf)
buflen = __sysconf (_SC_GETPW_R_SIZE_MAX);
tmpbuf = alloca (buflen);
- if (__getpwuid_r (uid, &resbuf, tmpbuf, buflen, &p) < 0)
+ if (__getpwuid_r (uid, &resbuf, tmpbuf, buflen, &p) != 0)
return -1;
if (sprintf (buf, "%s:%s:%lu:%lu:%s:%s:%s", p->pw_name, p->pw_passwd,
diff --git a/sunrpc/clnt_gen.c b/sunrpc/clnt_gen.c
index 1a2cc91..e8656ee 100644
--- a/sunrpc/clnt_gen.c
+++ b/sunrpc/clnt_gen.c
@@ -78,7 +78,7 @@ clnt_create (const char *hostname, u_long prog, u_long vers,
hstbuflen = 1024;
hsttmpbuf = __alloca (hstbuflen);
while (__gethostbyname_r (hostname, &hostbuf, hsttmpbuf, hstbuflen,
- &h, &herr) < 0)
+ &h, &herr) != 0)
if (herr != NETDB_INTERNAL || errno != ERANGE)
{
rpc_createerr.cf_stat = RPC_UNKNOWNHOST;
@@ -107,8 +107,7 @@ clnt_create (const char *hostname, u_long prog, u_long vers,
prtbuflen = 1024;
prttmpbuf = __alloca (prtbuflen);
- while (__getprotobyname_r (proto, &protobuf, prttmpbuf, prtbuflen, &p)
- < 0)
+ while (__getprotobyname_r (proto, &protobuf, prttmpbuf, prtbuflen, &p) != 0)
if (errno != ERANGE)
{
rpc_createerr.cf_stat = RPC_UNKNOWNPROTO;
diff --git a/sunrpc/clnt_simp.c b/sunrpc/clnt_simp.c
index bf9f690..41d106e 100644
--- a/sunrpc/clnt_simp.c
+++ b/sunrpc/clnt_simp.c
@@ -105,7 +105,7 @@ callrpc (const char *host, u_long prognum, u_long versnum, u_long procnum,
buflen = 1024;
buffer = __alloca (buflen);
while (__gethostbyname_r (host, &hostbuf, buffer, buflen,
- &hp, &herr) < 0)
+ &hp, &herr) != 0)
if (herr != NETDB_INTERNAL || errno != ERANGE)
return (int) RPC_UNKNOWNHOST;
else
diff --git a/sunrpc/getrpcport.c b/sunrpc/getrpcport.c
index df48dc6..188c668 100644
--- a/sunrpc/getrpcport.c
+++ b/sunrpc/getrpcport.c
@@ -56,8 +56,7 @@ getrpcport (const char *host, u_long prognum, u_long versnum, u_int proto)
buflen = 1024;
buffer = __alloca (buflen);
- while (__gethostbyname_r (host, &hostbuf, buffer, buflen, &hp, &herr)
- < 0)
+ while (__gethostbyname_r (host, &hostbuf, buffer, buflen, &hp, &herr) != 0)
if (herr != NETDB_INTERNAL || errno != ERANGE)
return 0;
else
diff --git a/sysdeps/generic/glob.c b/sysdeps/generic/glob.c
index fe09f50..b48dd7c 100644
--- a/sysdeps/generic/glob.c
+++ b/sysdeps/generic/glob.c
@@ -651,7 +651,8 @@ glob (pattern, flags, errfunc, pglob)
pwtmpbuf = (char *) __alloca (pwbuflen);
success = 1;
- while (getpwnam_r (name, &pwbuf, pwtmpbuf, pwbuflen, &p) < 0)
+ while (getpwnam_r (name, &pwbuf, pwtmpbuf, pwbuflen, &p)
+ != 0)
{
if (errno != ERANGE)
{
@@ -735,7 +736,7 @@ glob (pattern, flags, errfunc, pglob)
buflen = 1024;
pwtmpbuf = (char *) __alloca (buflen);
- while (getpwnam_r (user_name, &pwbuf, pwtmpbuf, buflen, &p) < 0)
+ while (getpwnam_r (user_name, &pwbuf, pwtmpbuf, buflen, &p) != 0)
{
if (errno != ERANGE)
{
diff --git a/sysdeps/unix/sysv/linux/gethostid.c b/sysdeps/unix/sysv/linux/gethostid.c
index 3ef6ac6..f2ebbf2 100644
--- a/sysdeps/unix/sysv/linux/gethostid.c
+++ b/sysdeps/unix/sysv/linux/gethostid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -91,7 +91,7 @@ gethostid ()
/* To get the IP address we need to know the host name. */
while (__gethostbyname_r (hostname, &hostbuf, buffer, buflen, &hp, &herr)
- < 0)
+ != 0)
if (herr != NETDB_INTERNAL || errno != ERANGE)
return 0;
else