[uClibc-cvs] uClibc/libc/sysdeps/linux/common poll.c,1.3,1.4

Erik Andersen andersen at uclibc.org
Thu Mar 18 11:28:52 UTC 2004


Update of /var/cvs/uClibc/libc/sysdeps/linux/common
In directory nail:/tmp/cvs-serv7711/libc/sysdeps/linux/common

Modified Files:
	poll.c 
Log Message:
Based on a patch from Alexandre Oliva, remove all reference to 'bzero' (which
is not a SuSv3 symbol).  Rather than using __bzero internally per Alexandre's
original patch, use memset instead.


Index: poll.c
===================================================================
RCS file: /var/cvs/uClibc/libc/sysdeps/linux/common/poll.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- a/poll.c	11 Feb 2004 16:56:14 -0000	1.3
+++ b/poll.c	18 Mar 2004 11:28:50 -0000	1.4
@@ -62,9 +62,9 @@
 
     /* We can't call FD_ZERO, since FD_ZERO only works with sets
        of exactly __FD_SETSIZE size.  */
-    bzero (rset, bytes);
-    bzero (wset, bytes);
-    bzero (xset, bytes);
+    memset (rset, 0, bytes);
+    memset (wset, 0, bytes);
+    memset (xset, 0, bytes);
 
     for (f = fds; f < &fds[nfds]; ++f)
     {
@@ -86,9 +86,9 @@
 		nwset = alloca (nbytes);
 		nxset = alloca (nbytes);
 
-		bzero ((char *) nrset + bytes, nbytes - bytes);
-		bzero ((char *) nwset + bytes, nbytes - bytes);
-		bzero ((char *) nxset + bytes, nbytes - bytes);
+		memset ((char *) nrset + bytes, 0, nbytes - bytes);
+		memset ((char *) nwset + bytes, 0, nbytes - bytes);
+		memset ((char *) nxset + bytes, 0, nbytes - bytes);
 
 		rset = memcpy (nrset, rset, bytes);
 		wset = memcpy (nwset, wset, bytes);
@@ -126,9 +126,9 @@
 	    struct timeval sngl_tv;
 
 	    /* Clear the original set.  */
-	    bzero (rset, bytes);
-	    bzero (wset, bytes);
-	    bzero (xset, bytes);
+	    memset (rset, 0, bytes);
+	    memset (wset, 0, bytes);
+	    memset (xset, 0, bytes);
 
 	    /* This means we don't wait for input.  */
 	    sngl_tv.tv_sec = 0;
@@ -145,9 +145,9 @@
 		{
 		    int n;
 
-		    bzero (sngl_rset, bytes);
-		    bzero (sngl_wset, bytes);
-		    bzero (sngl_xset, bytes);
+		    memset (sngl_rset, 0, bytes);
+		    memset (sngl_wset, 0, bytes);
+		    memset (sngl_xset, 0, bytes);
 
 		    if (f->events & POLLIN)
 			FD_SET (f->fd, sngl_rset);




More information about the uClibc-cvs mailing list