diff options
author | Ulrich Drepper <drepper@redhat.com> | 1997-09-09 01:45:55 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1997-09-09 01:45:55 +0000 |
commit | 801c353ac5392a1ff6749a3ea1ef1fe619cbc25d (patch) | |
tree | e30fed3adcbcc619ae2f8319b147b4f93934b46d /sysdeps/i386/selectbits.h | |
parent | b0486b1cbdc8c1fca9a70c4c3cb8b774fc8c57e4 (diff) | |
download | glibc-801c353ac5392a1ff6749a3ea1ef1fe619cbc25d.tar glibc-801c353ac5392a1ff6749a3ea1ef1fe619cbc25d.tar.gz glibc-801c353ac5392a1ff6749a3ea1ef1fe619cbc25d.tar.bz2 glibc-801c353ac5392a1ff6749a3ea1ef1fe619cbc25d.zip |
Change for 2.0.5bglibc-2.0.5bcvs/glibc-2_0_5b
Diffstat (limited to 'sysdeps/i386/selectbits.h')
-rw-r--r-- | sysdeps/i386/selectbits.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sysdeps/i386/selectbits.h b/sysdeps/i386/selectbits.h index 9855e9308f..7ecc0232e0 100644 --- a/sysdeps/i386/selectbits.h +++ b/sysdeps/i386/selectbits.h @@ -22,29 +22,30 @@ #if defined __GNUC__ && __GNUC__ >= 2 # define __FD_ZERO(fdsetp) \ - __asm__ __volatile__ ("cld ; rep ; stosl" \ - : "=m" (*(__fd_set *) (fdsetp)) \ + __asm__ __volatile__ ("cld; rep; stosl" \ + : "=m" (((__fd_mask *) \ + (fdsetp))[__FDELT (__FD_SETSIZE)]) \ : "a" (0), "c" (sizeof (__fd_set) \ / sizeof (__fd_mask)), \ - "D" ((__fd_set *) (fdsetp)) \ + "D" ((__fd_mask *) (fdsetp)) \ :"cx","di") # define __FD_SET(fd, fdsetp) \ __asm__ __volatile__ ("btsl %1,%0" \ - : "=m" (((__fd_set *) (fdsetp))[__FDELT (fd)]) \ + : "=m" (((__fd_mask *) (fdsetp))[__FDELT (fd)]) \ : "r" (((int) (fd)) % __NFDBITS) \ : "cc") # define __FD_CLR(fd, fdsetp) \ __asm__ __volatile__ ("btrl %1,%0" \ - : "=m" (((__fd_set *) (fdsetp))[__FDELT (fd)]) \ + : "=m" (((__fd_mask *) (fdsetp))[__FDELT (fd)]) \ : "r" (((int) (fd)) % __NFDBITS) \ : "cc") # define __FD_ISSET(fd, fdsetp) \ (__extension__ \ - ({unsigned int __result; \ - __asm__ __volatile__ ("btl %1,%2 ; setcb %b0; andl $1,%0" \ + ({register char __result; \ + __asm__ __volatile__ ("btl %1,%2 ; setcb %b0" \ : "=q" (__result) \ : "r" (((int) (fd)) % __NFDBITS), \ - "m" (((__fd_set *) (fdsetp))[__FDELT (fd)]) \ + "m" (((__fd_mask *) (fdsetp))[__FDELT (fd)]) \ : "cc"); \ __result; })) |