aboutsummaryrefslogtreecommitdiff
path: root/bits/select.h
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 /bits/select.h
parentc70ca1fa69c9a95108664b4132b7188a686cc9e4 (diff)
downloadglibc-6e2cc2c14732fc3e5f3d8b8e86c23c32899fbb76.zip
glibc-6e2cc2c14732fc3e5f3d8b8e86c23c32899fbb76.tar.gz
glibc-6e2cc2c14732fc3e5f3d8b8e86c23c32899fbb76.tar.bz2
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 'bits/select.h')
-rw-r--r--bits/select.h23
1 files changed, 5 insertions, 18 deletions
diff --git a/bits/select.h b/bits/select.h
index f886aec..1025532 100644
--- a/bits/select.h
+++ b/bits/select.h
@@ -23,26 +23,13 @@
/* We don't use `memset' because this would require a prototype and
the array isn't too big. */
-#ifdef __USE_XOPEN
-# define __FD_ZERO(s) \
+#define __FD_ZERO(s) \
do { \
unsigned int __i; \
__fd_set *__arr = (s); \
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, s) ((s)->fds_bits[__FDELT(d)] |= __FDMASK(d))
-# define __FD_CLR(d, s) ((s)->fds_bits[__FDELT(d)] &= ~__FDMASK(d))
-# define __FD_ISSET(d, s) (((s)->fds_bits[__FDELT(d)] & __FDMASK(d)) != 0)
-#else
-# define __FD_ZERO(s) \
- do { \
- unsigned int __i; \
- __fd_set *__arr = (s); \
- for (__i = 0; __i < sizeof (__fd_set) / sizeof (__fd_mask); ++__i) \
- __arr->__fds_bits[__i] = '\0'; \
- } while (0)
-# define __FD_SET(d, s) ((s)->__fds_bits[__FDELT(d)] |= __FDMASK(d))
-# define __FD_CLR(d, s) ((s)->__fds_bits[__FDELT(d)] &= ~__FDMASK(d))
-# define __FD_ISSET(d, s) (((s)->__fds_bits[__FDELT(d)] & __FDMASK(d)) != 0)
-#endif
+#define __FD_SET(d, s) (__FDS_BITS (s)[__FDELT(d)] |= __FDMASK(d))
+#define __FD_CLR(d, s) (__FDS_BITS (s)[__FDELT(d)] &= ~__FDMASK(d))
+#define __FD_ISSET(d, s) ((__FDS_BITS (s)[__FDELT(d)] & __FDMASK(d)) != 0)