about summary refs log tree commit diff
path: root/sysdeps/i386/bits
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-10-28 14:41:59 +0000
committerUlrich Drepper <drepper@redhat.com>1998-10-28 14:41:59 +0000
commit6e2cc2c14732fc3e5f3d8b8e86c23c32899fbb76 (patch)
tree308634e4598dc78e096fa0efc4c2507bc6a94e97 /sysdeps/i386/bits
parentc70ca1fa69c9a95108664b4132b7188a686cc9e4 (diff)
downloadglibc-6e2cc2c14732fc3e5f3d8b8e86c23c32899fbb76.tar.gz
glibc-6e2cc2c14732fc3e5f3d8b8e86c23c32899fbb76.tar.xz
glibc-6e2cc2c14732fc3e5f3d8b8e86c23c32899fbb76.zip
Update.
1998-10-27  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de> 
 
	* string/bits/string2.h: __USE_GNU already implies __USE_MISC. 
 
1998-10-27  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de> 

	* sysdeps/generic/bits/types.h (__FDS_BITS): New macro to access 
	fds_bits member. 
	* sysdeps/unix/sysv/linux/alpha/bits/types.h (__FDS_BITS): Likewise. 
	* sysdeps/unix/sysv/linux/bits/types.h (__FDS_BITS): Likewise. 
	* sysdeps/unix/sysv/linux/mips/bits/types.h (__FDS_BITS): Likewise. 
	* sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h (__FDS_BITS): 
	Likewise. 
	* sysdeps/unix/sysv/sysv4/solaris2/bits/types.h (__FDS_BITS): 
	Likewise. 
	* sysdeps/generic/bits/select.h (__FD_ZERO, __FD_SET, __FD_CLR, 
	__FD_ISSET): Use it. 
	* sysdeps/i386/bits/select.h (__FD_ZERO, __FD_SET, __FD_CLR, 
	__FD_ISSET): Likewise. 
Diffstat (limited to 'sysdeps/i386/bits')
-rw-r--r--sysdeps/i386/bits/select.h74
1 files changed, 14 insertions, 60 deletions
diff --git a/sysdeps/i386/bits/select.h b/sysdeps/i386/bits/select.h
index 2e31f3bc59..d31792d852 100644
--- a/sysdeps/i386/bits/select.h
+++ b/sysdeps/i386/bits/select.h
@@ -23,97 +23,51 @@
 
 #if defined __GNUC__ && __GNUC__ >= 2
 
-# ifdef __USE_XOPEN
-#  define __FD_ZERO(fdsp) \
+# define __FD_ZERO(fdsp) \
   do {									      \
     int __d0, __d1;							      \
     __asm__ __volatile__ ("cld; rep; stosl"				      \
-			  : "=m" ((fdsp)->fds_bits[__FDELT (__FD_SETSIZE)]),  \
+			  : "=m" (__FDS_BITS (fdsp)[__FDELT (__FD_SETSIZE)]), \
 			    "=&c" (__d0), "=&D" (__d1)			      \
 			  : "a" (0), "1" (sizeof (__fd_set)		      \
 					  / sizeof (__fd_mask)),	      \
-			    "2" (&(fdsp)->fds_bits[0])			      \
+			    "2" (&__FDS_BITS (fdsp)[0])			      \
 			  : "memory");					      \
   } while (0)
 
-#  define __FD_SET(fd, fdsp) \
+# define __FD_SET(fd, fdsp) \
   __asm__ __volatile__ ("btsl %1,%0"					      \
-			: "=m" ((fdsp)->fds_bits[__FDELT (fd)])		      \
+			: "=m" (__FDS_BITS (fdsp)[__FDELT (fd)])	      \
 			: "r" (((int) (fd)) % __NFDBITS)		      \
 			: "cc","memory")
-#  define __FD_CLR(fd, fdsp) \
+# define __FD_CLR(fd, fdsp) \
   __asm__ __volatile__ ("btrl %1,%0"					      \
-			: "=m" ((fdsp)->fds_bits[__FDELT (fd)])		      \
+			: "=m" (__FDS_BITS (fdsp)[__FDELT (fd)])	      \
 			: "r" (((int) (fd)) % __NFDBITS)		      \
 			: "cc","memory")
-#  define __FD_ISSET(fd, fdsp) \
+# define __FD_ISSET(fd, fdsp) \
   (__extension__							      \
    ({register char __result;						      \
      __asm__ __volatile__ ("btl %1,%2 ; setcb %b0"			      \
 			   : "=q" (__result)				      \
 			   : "r" (((int) (fd)) % __NFDBITS),		      \
-			     "m" ((fdsp)->fds_bits[__FDELT (fd)])	      \
+			     "m" (__FDS_BITS (fdsp)[__FDELT (fd)])	      \
 			   : "cc");					      \
      __result; }))
-# else
-#  define __FD_ZERO(fdsp) \
-  do {									      \
-    int __d0, __d1;							      \
-    __asm__ __volatile__ ("cld; rep; stosl"				      \
-			  : "=m" ((fdsp)->__fds_bits[__FDELT (__FD_SETSIZE)]),\
-			    "=&c" (__d0), "=&D" (__d1)			      \
-			  : "a" (0), "1" (sizeof (__fd_set)		      \
-					  / sizeof (__fd_mask)),	      \
-			    "2" (&(fdsp)->__fds_bits[0])		      \
-			  : "memory");					      \
-  } while (0)
-
-#  define __FD_SET(fd, fdsp) \
-  __asm__ __volatile__ ("btsl %1,%0"					      \
-			: "=m" ((fdsp)->__fds_bits[__FDELT (fd)])	      \
-			: "r" (((int) (fd)) % __NFDBITS)		      \
-			: "cc","memory")
-#  define __FD_CLR(fd, fdsp) \
-  __asm__ __volatile__ ("btrl %1,%0"					      \
-			: "=m" ((fdsp)->__fds_bits[__FDELT (fd)])	      \
-			: "r" (((int) (fd)) % __NFDBITS)		      \
-			: "cc","memory")
-#  define __FD_ISSET(fd, fdsp) \
-  (__extension__							      \
-   ({register char __result;						      \
-     __asm__ __volatile__ ("btl %1,%2 ; setcb %b0"			      \
-			   : "=q" (__result)				      \
-			   : "r" (((int) (fd)) % __NFDBITS),		      \
-			     "m" ((fdsp)->__fds_bits[__FDELT (fd)])	      \
-			   : "cc");					      \
-     __result; }))
-# endif
 
 #else	/* ! GNU CC */
 
 /* We don't use `memset' because this would require a prototype and
    the array isn't too big.  */
-# ifdef __USE_XOPEN
-#  define __FD_ZERO(set)  \
-  do {									      \
-    unsigned int __i;							      \
-    __fd_set *__arr = (set);						      \
-    for (__i = 0; __i < sizeof (__fd_set) / sizeof (__fd_mask); ++__i)	      \
-      __arr->fds_bits[__i] = 0;						      \
-  } while (0)
-#  define __FD_SET(d, set)    ((set)->fds_bits[__FDELT (d)] |= __FDMASK (d))
-#  define __FD_CLR(d, set)    ((set)->fds_bits[__FDELT (d)] &= ~__FDMASK (d))
-#  define __FD_ISSET(d, set)  ((set)->fds_bits[__FDELT (d)] & __FDMASK (d))
-# else
+# define __FD_ZERO(set)  \
   do {									      \
     unsigned int __i;							      \
     __fd_set *__arr = (set);						      \
     for (__i = 0; __i < sizeof (__fd_set) / sizeof (__fd_mask); ++__i)	      \
-      __arr->__fds_bits[__i] = 0;					      \
+      __FDS_BITS (__arr)[__i] = 0;					      \
   } while (0)
-#  define __FD_SET(d, set)    ((set)->__fds_bits[__FDELT (d)] |= __FDMASK (d))
-#  define __FD_CLR(d, set)    ((set)->__fds_bits[__FDELT (d)] &= ~__FDMASK (d))
-#  define __FD_ISSET(d, set)  ((set)->__fds_bits[__FDELT (d)] & __FDMASK (d))
-# endif
+# define __FD_SET(d, set)    (__FDS_BITS (set)[__FDELT (d)] |= __FDMASK (d))
+# define __FD_CLR(d, set)    (__FDS_BITS (set)[__FDELT (d)] &= ~__FDMASK (d))
+# define __FD_ISSET(d, set)  (__FDS_BITS (set)[__FDELT (d)] & __FDMASK (d))
 
 #endif	/* GNU CC */