diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2011-07-26 19:08:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-26 19:49:43 -0400 |
commit | 5296f6d315bdd8f1dc97348b788638327a6ab192 (patch) | |
tree | 311668f20565389a8dacaf1acdfc7c6406e649a4 | |
parent | 99b64567486716d18b2156cad188d86478816e4f (diff) |
h8300/m68k/xtensa: __FD_ISSET should return 0/1
Harmonise these return values with other architectures. In some cases
this affects all compilers and in other cases non-gcc compilers only.
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Chris Zankel <chris@zankel.net>
Cc: Ulrich Drepper <drepper@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/h8300/include/asm/posix_types.h | 2 | ||||
-rw-r--r-- | arch/m68k/include/asm/posix_types.h | 2 | ||||
-rw-r--r-- | arch/xtensa/include/asm/posix_types.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/arch/h8300/include/asm/posix_types.h b/arch/h8300/include/asm/posix_types.h index 5c553927fc53..6f833a16f694 100644 --- a/arch/h8300/include/asm/posix_types.h +++ b/arch/h8300/include/asm/posix_types.h | |||
@@ -50,7 +50,7 @@ typedef struct { | |||
50 | #define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d)) | 50 | #define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d)) |
51 | 51 | ||
52 | #undef __FD_ISSET | 52 | #undef __FD_ISSET |
53 | #define __FD_ISSET(d, set) ((set)->fds_bits[__FDELT(d)] & __FDMASK(d)) | 53 | #define __FD_ISSET(d, set) (!!((set)->fds_bits[__FDELT(d)] & __FDMASK(d))) |
54 | 54 | ||
55 | #undef __FD_ZERO | 55 | #undef __FD_ZERO |
56 | #define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp))) | 56 | #define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp))) |
diff --git a/arch/m68k/include/asm/posix_types.h b/arch/m68k/include/asm/posix_types.h index 63cdcc142d93..98d0970d9bad 100644 --- a/arch/m68k/include/asm/posix_types.h +++ b/arch/m68k/include/asm/posix_types.h | |||
@@ -51,7 +51,7 @@ typedef struct { | |||
51 | #define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d)) | 51 | #define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d)) |
52 | 52 | ||
53 | #undef __FD_ISSET | 53 | #undef __FD_ISSET |
54 | #define __FD_ISSET(d, set) ((set)->fds_bits[__FDELT(d)] & __FDMASK(d)) | 54 | #define __FD_ISSET(d, set) (!!((set)->fds_bits[__FDELT(d)] & __FDMASK(d))) |
55 | 55 | ||
56 | #undef __FD_ZERO | 56 | #undef __FD_ZERO |
57 | #define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp))) | 57 | #define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp))) |
diff --git a/arch/xtensa/include/asm/posix_types.h b/arch/xtensa/include/asm/posix_types.h index 43f9dd1126a4..6b2190c35882 100644 --- a/arch/xtensa/include/asm/posix_types.h +++ b/arch/xtensa/include/asm/posix_types.h | |||
@@ -58,7 +58,7 @@ typedef struct { | |||
58 | 58 | ||
59 | #define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d)) | 59 | #define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d)) |
60 | #define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d)) | 60 | #define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d)) |
61 | #define __FD_ISSET(d, set) ((set)->fds_bits[__FDELT(d)] & __FDMASK(d)) | 61 | #define __FD_ISSET(d, set) (!!((set)->fds_bits[__FDELT(d)] & __FDMASK(d))) |
62 | #define __FD_ZERO(set) \ | 62 | #define __FD_ZERO(set) \ |
63 | ((void) memset ((void *) (set), 0, sizeof (__kernel_fd_set))) | 63 | ((void) memset ((void *) (set), 0, sizeof (__kernel_fd_set))) |
64 | 64 | ||