summary refs log tree commit diff
path: root/sunrpc/bindrsvprt.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-04-15 13:54:57 +0000
committerUlrich Drepper <drepper@redhat.com>1999-04-15 13:54:57 +0000
commitf8afba91cf8bf8f8324c3c88b8c368e7c2bd5894 (patch)
treedbdd5f960cf217c76d495ba44173feafae9d184f /sunrpc/bindrsvprt.c
parenta5486962345290853d7d42ef4a799f16bd6764e2 (diff)
downloadglibc-f8afba91cf8bf8f8324c3c88b8c368e7c2bd5894.tar.gz
glibc-f8afba91cf8bf8f8324c3c88b8c368e7c2bd5894.tar.xz
glibc-f8afba91cf8bf8f8324c3c88b8c368e7c2bd5894.zip
Update.
	* Versions.def: Add GLIBC_2.1.1 to libpthread.

	* iconvdata/Makefile (modules): Add KOI8-U.
	(distribute): Add koi8-u.c.
	(gen-8bit-gap-modules): Add koi8-u.
	* iconvdata/gconv-modules: Add KOI8-U entries.
	* iconvdata/koi8-u.c: New file.

1999-04-13  Thorsten Kukuk  <kukuk@suse.de>

	* sunrpc/auth_des.c: 64bit fixes, security fixes.
	* sunrpc/auth_none.c: Pretty print.
	* sunrpc/auth_unix.c: Likewise.
	* sunrpc/authdes_prot.c: Likewise.
	* sunrpc/authuxprot.c: Likewise.
	* sunrpc/bindrsvprt.c: Likewise.
	* sunrpc/clnt_gen.c: Likewise.
	* sunrpc/rpc/xdr.h: Likewise.
	* sunrpc/rpc/auth_des.h: Add rpc_timeval struct.
	* sunrpc/rpc_cmsg.c: Don't use *long pointers.
	* sunrpc/rtime.c: Use new rpc_timeval.
	* sunrpc/svc_authux.c: Don't use *long pointers.
	* sunrpc/svcauth_des.c: Likewise + security fixes.
	* sunrpc/xdr_mem.c: Don't use *long pointers.
	* sunrpc/xdr_rec.c: Likewise.
	* sunrpc/xdr_sizeof.c: Likewise.
	* sunrpc/xdr_stdio.c: Likewise.

1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
Diffstat (limited to 'sunrpc/bindrsvprt.c')
-rw-r--r--sunrpc/bindrsvprt.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sunrpc/bindrsvprt.c b/sunrpc/bindrsvprt.c
index f646ffda70..0acfd69e09 100644
--- a/sunrpc/bindrsvprt.c
+++ b/sunrpc/bindrsvprt.c
@@ -26,17 +26,14 @@
  * 2550 Garcia Avenue
  * Mountain View, California  94043
  */
-#if !defined(lint) && defined(SCCSIDS)
-static char sccsid[] = "@(#)bindresvport.c	2.2 88/07/29 4.0 RPCSRC 1.8 88/02/08 SMI";
-#endif
 /*
  * Copyright (c) 1987 by Sun Microsystems, Inc.
  */
 
+#include <errno.h>
 #include <unistd.h>
 #include <string.h>
 #include <sys/types.h>
-#include <sys/errno.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 
@@ -49,9 +46,6 @@ bindresvport (int sd, struct sockaddr_in *sin)
   int res;
   static short port;
   struct sockaddr_in myaddr;
-#ifndef errno
-  extern int errno;
-#endif
   int i;
 
 #define STARTPORT 600
@@ -69,13 +63,15 @@ bindresvport (int sd, struct sockaddr_in *sin)
       __set_errno (EPFNOSUPPORT);
       return -1;
     }
+
   if (port == 0)
     {
       port = (__getpid () % NPORTS) + STARTPORT;
     }
   res = -1;
   __set_errno (EADDRINUSE);
-  for (i = 0; i < NPORTS && res < 0 && errno == EADDRINUSE; i++)
+
+  for (i = 0; i < NPORTS && res < 0 && errno == EADDRINUSE; ++i)
     {
       sin->sin_port = htons (port++);
       if (port > ENDPORT)
@@ -84,5 +80,6 @@ bindresvport (int sd, struct sockaddr_in *sin)
 	}
       res = bind (sd, sin, sizeof (struct sockaddr_in));
     }
+
   return res;
 }