(__fd_set): Define element as fds_bits only is __USE_XOPEN. Otherwise
authorUlrich Drepper <drepper@redhat.com>
Sun, 25 Oct 1998 09:10:44 +0000 (09:10 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sun, 25 Oct 1998 09:10:44 +0000 (09:10 +0000)
use __fds_bits.

sysdeps/unix/sysv/linux/alpha/bits/types.h
sysdeps/unix/sysv/linux/mips/bits/types.h
sysdeps/unix/sysv/sysv4/solaris2/bits/types.h

index d4f2217..aee9d04 100644 (file)
@@ -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 <bits/pthreadtypes.h>
+#if defined __USE_POSIX199506 || defined __USE_UNIX98
+# include <bits/pthreadtypes.h>
+#endif
 
 #endif /* bits/types.h */
index c716d57..e32dadf 100644 (file)
@@ -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 <bits/pthreadtypes.h>
+#if defined __USE_POSIX199506 || defined __USE_UNIX98
+# include <bits/pthreadtypes.h>
+#endif
 
 #endif /* bits/types.h */
index e25dec9..aa73ebc 100644 (file)
@@ -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;