about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--bits/select.h8
-rw-r--r--sysdeps/generic/bits/select.h8
3 files changed, 14 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 26002be3c4..805219afbb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+1998-02-17  Ulrich Drepper  <drepper@cygnus.com>
+
+	* sysdeps/generic/bits/select.h (__FD_ISSET): Compare result with
+	0 to get always an int.
+
 1998-02-17  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
 
 	* math/libm.map: Move all symbols that are new in glibc 2.1 to
@@ -19,7 +24,7 @@
 1998-02-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
 
 	* sysdeps/unix/sysv/linux/alpha/rt_sigaction.S (rt_sigreturn):
-	Make compatible with older kernels. Patch by Richard Henderson.
+	Make compatible with older kernels.  Patch by Richard Henderson.
 
 1998-02-17 15:10  Ulrich Drepper  <drepper@cygnus.com>
 
diff --git a/bits/select.h b/bits/select.h
index 0da0acbee8..98f1002b01 100644
--- a/bits/select.h
+++ b/bits/select.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998 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
@@ -30,6 +30,6 @@
     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))
+#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)) != 0)
diff --git a/sysdeps/generic/bits/select.h b/sysdeps/generic/bits/select.h
index 0da0acbee8..98f1002b01 100644
--- a/sysdeps/generic/bits/select.h
+++ b/sysdeps/generic/bits/select.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998 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
@@ -30,6 +30,6 @@
     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))
+#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)) != 0)