aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/i386
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-01-09 16:49:17 -0500
committerUlrich Drepper <drepper@gmail.com>2011-01-09 16:49:17 -0500
commitf257bbd77dfcfdf9fa305e220b295e4ad57f405d (patch)
tree37d451738cd8feb3fdda5945149822015f282bd5 /sysdeps/i386
parentfa9c15cb83a256da27f8ab99207b752e598c4937 (diff)
downloadglibc-f257bbd77dfcfdf9fa305e220b295e4ad57f405d.tar
glibc-f257bbd77dfcfdf9fa305e220b295e4ad57f405d.tar.gz
glibc-f257bbd77dfcfdf9fa305e220b295e4ad57f405d.tar.bz2
glibc-f257bbd77dfcfdf9fa305e220b295e4ad57f405d.zip
Clean up some bits/select.h headers.
Diffstat (limited to 'sysdeps/i386')
-rw-r--r--sysdeps/i386/bits/select.h33
1 files changed, 8 insertions, 25 deletions
diff --git a/sysdeps/i386/bits/select.h b/sysdeps/i386/bits/select.h
index 972bfb685a..ab9aa3d10e 100644
--- a/sysdeps/i386/bits/select.h
+++ b/sysdeps/i386/bits/select.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2001, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,6 @@
#if defined __GNUC__ && __GNUC__ >= 2
-
# define __FD_ZERO(fdsp) \
do { \
int __d0, __d1; \
@@ -34,26 +33,6 @@
: "memory"); \
} while (0)
-# define __FD_SET(fd, fdsp) \
- __asm__ __volatile__ ("btsl %1,%0" \
- : "=m" (__FDS_BITS (fdsp)[__FDELT (fd)]) \
- : "r" (((int) (fd)) % __NFDBITS) \
- : "cc","memory")
-# define __FD_CLR(fd, fdsp) \
- __asm__ __volatile__ ("btrl %1,%0" \
- : "=m" (__FDS_BITS (fdsp)[__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" (__FDS_BITS (fdsp)[__FDELT (fd)]) \
- : "cc"); \
- __result; }))
-
#else /* ! GNU CC */
/* We don't use `memset' because this would require a prototype and
@@ -65,8 +44,12 @@
for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \
__FDS_BITS (__arr)[__i] = 0; \
} while (0)
-# 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 */
+
+#define __FD_SET(d, set) \
+ ((void) (__FDS_BITS (set)[__FDELT (d)] |= __FDMASK (d)))
+#define __FD_CLR(d, set) \
+ ((void) (__FDS_BITS (set)[__FDELT (d)] &= ~__FDMASK (d)))
+#define __FD_ISSET(d, set) \
+ ((__FDS_BITS (set)[__FDELT (d)] & __FDMASK (d)) != 0)