This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
A patch for __fd_set
- To: drepper@cygnus.com (Ulrich Drepper)
- Subject: A patch for __fd_set
- From: hjl@lucon.org (H.J. Lu)
- Date: Sat, 24 Oct 1998 18:36:27 -0700 (PDT)
- Cc: libc-hacker@cygnus.com (GNU C Library)
This will get rid of another name pollution.
Thanks.
--
H.J. Lu (hjl@gnu.org)
---
Sat Oct 24 18:33:47 1998 H.J. Lu <hjl@gnu.org>
* sysdeps/generic/bits/types.h (__fd_set): Protect with
__USE_XOPEN, __USE_MISC and __USE_GNU.
* sysdeps/unix/sysv/linux/alpha/bits/types.h (__fd_set):
Likewise.
* sysdeps/unix/sysv/linux/mips/bits/types.h (__fd_set):
Likewise.
* misc/sys/select.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h (__fd_set):
Likewise.
* sysdeps/unix/sysv/linux/bits/types.h (__fd_set): Likewise.
* sysdeps/unix/sysv/sysv4/solaris2/bits/types.h (__fd_set):
Likewise.
Index: sysdeps/generic/bits/types.h
===================================================================
RCS file: /home/work/cvs/gnu/glibc/sysdeps/generic/bits/types.h,v
retrieving revision 1.1.1.7
diff -u -r1.1.1.7 types.h
--- types.h 1998/09/14 14:46:15 1.1.1.7
+++ types.h 1998/10/19 21:21:32
@@ -95,13 +95,14 @@
#define __FDELT(d) ((d) / __NFDBITS)
#define __FDMASK(d) ((unsigned long int) 1 << ((d) % __NFDBITS))
+#if defined __USE_XOPEN || defined __USE_MISC || defined __USE_GNU
/* fd_set for select and pselect. */
typedef struct
{
/* XPG4.2 requires this member name. */
__fd_mask fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS];
} __fd_set;
-
+#endif
/* Types from the Large File Support interface. */
Index: sysdeps/unix/sysv/linux/alpha/bits/types.h
===================================================================
RCS file: /home/work/cvs/gnu/glibc/sysdeps/unix/sysv/linux/alpha/bits/types.h,v
retrieving revision 1.1.1.7
diff -u -r1.1.1.7 types.h
--- types.h 1998/07/15 00:23:42 1.1.1.7
+++ types.h 1998/10/22 03:01:55
@@ -99,12 +99,14 @@
#define __FDELT(d) ((d) / __NFDBITS)
#define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS))
+#if defined __USE_XOPEN || defined __USE_MISC || defined __USE_GNU
/* fd_set for select and pselect. */
typedef struct
{
/* XPG4.2 requires this member name. */
__fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
} __fd_set;
+#endif
/* Used in XTI. */
typedef int __t_scalar_t;
Index: sysdeps/unix/sysv/linux/mips/bits/types.h
===================================================================
RCS file: /home/work/cvs/gnu/glibc/sysdeps/unix/sysv/linux/mips/bits/types.h,v
retrieving revision 1.1.1.5
diff -u -r1.1.1.5 types.h
--- types.h 1998/10/08 15:14:55 1.1.1.5
+++ types.h 1998/10/22 03:02:02
@@ -96,13 +96,14 @@
#define __FDELT(d) ((d) / __NFDBITS)
#define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS))
+#if defined __USE_XOPEN || defined __USE_MISC || defined __USE_GNU
/* fd_set for select and pselect. */
typedef struct
{
/* XPG4.2 requires this member name. */
__fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
} __fd_set;
-
+#endif
typedef int __key_t;
Index: misc/sys/select.h
===================================================================
RCS file: /home/work/cvs/gnu/glibc/misc/sys/select.h,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 select.h
--- select.h 1998/08/11 22:30:17 1.1.1.4
+++ select.h 1998/10/21 21:35:53
@@ -24,6 +24,8 @@
#include <features.h>
+#if defined __USE_XOPEN || defined __USE_MISC || defined __USE_GNU
+
/* Get definition of needed basic types. */
#include <bits/types.h>
@@ -75,14 +77,13 @@
__fd_set *__writefds, __fd_set *__exceptfds,
struct timeval *__timeout));
-#ifdef __USE_POSIX
/* Same as above only that the TIMEOUT value is given with higher
resolution. This version should be used. */
extern int pselect __P ((int __nfds, __fd_set *__readfds,
__fd_set *__writefds, __fd_set *__exceptfds,
struct timespec *__timeout));
-#endif
-
__END_DECLS
+
+#endif
#endif /* sys/select.h */
Index: sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h
===================================================================
RCS file: /home/work/cvs/gnu/glibc/sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h,v
retrieving revision 1.1.1.9
diff -u -r1.1.1.9 types.h
--- types.h 1998/07/15 00:24:13 1.1.1.9
+++ types.h 1998/10/19 21:16:34
@@ -90,13 +90,14 @@
#define __FDELT(d) ((d) / __NFDBITS)
#define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS))
+#if defined __USE_XOPEN || defined __USE_MISC || defined __USE_GNU
/* fd_set for select and pselect. */
typedef struct
{
/* XPG4.2 requires this member name. */
__fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
} __fd_set;
-
+#endif
typedef int __key_t;
Index: sysdeps/unix/sysv/linux/bits/types.h
===================================================================
RCS file: /home/work/cvs/gnu/glibc/sysdeps/unix/sysv/linux/bits/types.h,v
retrieving revision 1.1.1.9
diff -u -r1.1.1.9 types.h
--- types.h 1998/10/08 15:14:42 1.1.1.9
+++ types.h 1998/10/19 21:16:58
@@ -96,13 +96,14 @@
#define __FDELT(d) ((d) / __NFDBITS)
#define __FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS))
+#if defined __USE_XOPEN || defined __USE_MISC || defined __USE_GNU
/* fd_set for select and pselect. */
typedef struct
{
/* XPG4.2 requires this member name. */
__fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
} __fd_set;
-
+#endif
typedef int __key_t;
Index: sysdeps/unix/sysv/sysv4/solaris2/bits/types.h
===================================================================
RCS file: /home/work/cvs/gnu/glibc/sysdeps/unix/sysv/sysv4/solaris2/bits/types.h,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 types.h
--- types.h 1998/07/15 00:24:18 1.1.1.2
+++ types.h 1998/10/19 21:17:43
@@ -88,11 +88,13 @@
#define __FDELT(d) ((d) / __NFDBITS)
#define __FDMASK(d) ((unsigned long int) 1 << ((d) % __NFDBITS))
+#if defined __USE_XOPEN || defined __USE_MISC || defined __USE_GNU
typedef struct
{
/* XPG4.2 requires this member name. */
unsigned long int fds_bits[(__FD_SETSIZE + (__NFDBITS - 1)) / __NFDBITS];
} __fd_set;
+#endif
typedef unsigned long int __fd_mask;