From b227d2e7ebf9d73b26b94e342444ac9c023695ca Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 25 Oct 1998 09:10:44 +0000 Subject: [PATCH] (__fd_set): Define element as fds_bits only is __USE_XOPEN. Otherwise use __fds_bits. --- sysdeps/unix/sysv/linux/alpha/bits/types.h | 11 +++++++++-- sysdeps/unix/sysv/linux/mips/bits/types.h | 11 +++++++++-- sysdeps/unix/sysv/sysv4/solaris2/bits/types.h | 7 ++++++- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/types.h b/sysdeps/unix/sysv/linux/alpha/bits/types.h index d4f2217..aee9d04 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/types.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/types.h @@ -102,8 +102,13 @@ typedef unsigned long int __fd_mask; /* fd_set for select and pselect. */ typedef struct { - /* XPG4.2 requires this member name. */ + /* XPG4.2 requires this member name. Otherwise avoid the name + from the user namespace. */ +#ifdef __USE_XOPEN __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; +#else + __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS]; +#endif } __fd_set; /* Used in XTI. */ @@ -115,6 +120,8 @@ typedef long int __intptr_t; /* Now add the thread types. */ -#include +#if defined __USE_POSIX199506 || defined __USE_UNIX98 +# include +#endif #endif /* bits/types.h */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/types.h b/sysdeps/unix/sysv/linux/mips/bits/types.h index c716d57..e32dadf 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types.h @@ -99,8 +99,13 @@ typedef unsigned long int __fd_mask; /* fd_set for select and pselect. */ typedef struct { - /* XPG4.2 requires this member name. */ + /* XPG4.2 requires this member name. Otherwise avoid the name + from the user namespace. */ +#ifdef __USE_XOPEN __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; +#else + __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS]; +#endif } __fd_set; @@ -139,6 +144,8 @@ typedef int __intptr_t; /* Now add the thread types. */ -#include +#if defined __USE_POSIX199506 || defined __USE_UNIX98 +# include +#endif #endif /* bits/types.h */ diff --git a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h index e25dec9..aa73ebc 100644 --- a/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h +++ b/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h @@ -90,8 +90,13 @@ typedef int __key_t; /* Type of an IPC key */ typedef struct { - /* XPG4.2 requires this member name. */ + /* XPG4.2 requires this member name. Otherwise avoid the name + from the user namespace. */ +#ifdef __USE_XOPEN unsigned long int fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS]; +#else + unsigned long int __fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS]; +#endif } __fd_set; typedef unsigned long int __fd_mask; -- 2.7.4