author | Rich Felker <dalias@aerifal.cx> | 2011年09月23日 22:24:33 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011年09月23日 22:24:33 -0400 |
commit | c41a76f58ce0238172effe982f2cee7bbd2a60a4 (patch) | |
tree | d5786c6de0e3dbc3929c81ae6221d8737918ceb4 /include/sys | |
parent | 1587224ed60aa38b7a26c5eaf692f1f1ab525afd (diff) | |
download | musl-c41a76f58ce0238172effe982f2cee7bbd2a60a4.tar.gz |
-rw-r--r-- | include/sys/select.h | 2 |
diff --git a/include/sys/select.h b/include/sys/select.h index cbe35a4f..47d195f4 100644 --- a/include/sys/select.h +++ b/include/sys/select.h @@ -25,7 +25,7 @@ typedef struct #define FD_ZERO(s) do { int __i; unsigned long *__b=(s)->fds_bits; for(__i=sizeof (fd_set)/sizeof (long); __i; __i--) *__b++=0; } while(0) #define FD_SET(d, s) ((s)->fds_bits[(d)/(8*sizeof(long))] |= (1UL<<((d)%(8*sizeof(long))))) #define FD_CLR(d, s) ((s)->fds_bits[(d)/(8*sizeof(long))] &= ~(1UL<<((d)%(8*sizeof(long))))) -#define FD_ISSET(d, s) ((s)->fds_bits[(d)/(8*sizeof(long))] & (1UL<<((d)%(8*sizeof(long))))) +#define FD_ISSET(d, s) !!((s)->fds_bits[(d)/(8*sizeof(long))] & (1UL<<((d)%(8*sizeof(long))))) int select (int, fd_set *, fd_set *, fd_set *, struct timeval *); int pselect (int, fd_set *, fd_set *, fd_set *, const struct timespec *, const sigset_t *); |