Update.
authorUlrich Drepper <drepper@redhat.com>
Mon, 28 Jun 1999 12:43:04 +0000 (12:43 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 28 Jun 1999 12:43:04 +0000 (12:43 +0000)
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.

ChangeLog
inet/rcmd.c
inet/rexec.c
manual/string.texi
pwd/getpw.c
sunrpc/clnt_gen.c
sunrpc/clnt_simp.c
sunrpc/getrpcport.c
sysdeps/generic/glob.c
sysdeps/unix/sysv/linux/gethostid.c

index e910a50..2c8874b 100644 (file)
--- 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
index 6d196b7..d8235da 100644 (file)
@@ -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;
        }
 
index 4032c82..6ba7d20 100644 (file)
@@ -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);
index 943cb09..45b2bc8 100644 (file)
@@ -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
index 52c3db7..8bfb02e 100644 (file)
@@ -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,
index 1a2cc91..e8656ee 100644 (file)
@@ -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;
index bf9f690..41d106e 100644 (file)
@@ -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
index df48dc6..188c668 100644 (file)
@@ -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
index fe09f50..b48dd7c 100644 (file)
@@ -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)
                  {
index 3ef6ac6..f2ebbf2 100644 (file)
@@ -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