1 ?RCS: $Id: d_fd_set.U,v 3.0.1.3 1997/02/28 15:33:16 ram Exp $
3 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
5 ?RCS: You may redistribute only under the terms of the Artistic Licence,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic Licence; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 3.0.
11 ?RCS: $Log: d_fd_set.U,v $
12 ?RCS: Revision 3.0.1.3 1997/02/28 15:33:16 ram
13 ?RCS: patch61: added ?F: metalint hint
15 ?RCS: Revision 3.0.1.2 1994/06/20 06:57:23 ram
16 ?RCS: patch30: extended scope for fd_set checks (ADO)
18 ?RCS: Revision 3.0.1.1 1994/01/24 14:06:27 ram
19 ?RCS: patch16: comments for HAS_FD_* symbols were not consistent
21 ?RCS: Revision 3.0 1993/08/18 12:06:02 ram
22 ?RCS: Baseline for dist 3.0 netwide release.
24 ?MAKE:d_fd_set d_fd_macros d_fds_bits: Compile cat rm Oldconfig \
25 d_socket i_systime i_sysselct
26 ?MAKE: -pick add $@ %<
28 ?S: This variable contains the eventual value of the HAS_FD_SET symbol,
29 ?S: which indicates if your C compiler knows about the fd_set typedef.
32 ?S: This variable contains the eventual value of the HAS_FD_MACROS symbol,
33 ?S: which indicates if your C compiler knows about the macros which
34 ?S: manipulate an fd_set.
37 ?S: This variable contains the eventual value of the HAS_FDS_BITS symbol,
38 ?S: which indicates if your fd_set typedef contains the fds_bits member.
39 ?S: If you have an fd_set typedef, but the dweebs who installed it did
40 ?S: a half-fast job and neglected to provide the macros to manipulate
41 ?S: an fd_set, HAS_FDS_BITS will let us know how to fix the gaffe.
44 ?C: This symbol, when defined, indicates presence of the fd_set typedef
48 ?C: This symbol, when defined, indicates presence of the macros used to
49 ?C: manipulate an fd_set.
52 ?C: This symbol, when defined, indicates presence of the fds_bits member in
53 ?C: fd_set. This knowledge is useful if fd_set is available but the macros
56 ?H:#$d_fd_set HAS_FD_SET /**/
57 ?H:#$d_fd_macros HAS_FD_MACROS /**/
58 ?H:#$d_fds_bits HAS_FDS_BITS /**/
61 : check for fd_set items
64 Checking to see how well your C compiler handles fd_set and friends ...
66 ?X: The FD_SET macros can be in strange places. On some SysV-based
67 ?X: systems, they are in <sys/bsdtypes.h>, which is included (perhaps)
68 ?X: by <sys/socket.h>. We won't force people to include
69 ?X: <sys/bsdtypes.h> because it might introduce other
70 ?X: incompatibilities.
72 #$i_systime I_SYS_TIME
73 #$i_sysselct I_SYS_SELECT
75 #include <sys/types.h>
77 #include <sys/socket.h> /* Might include <sys/bsdtypes.h> */
83 #include <sys/select.h>
92 #if defined(FD_SET) && defined(FD_CLR) && defined(FD_ISSET) && defined(FD_ZERO)
100 if eval $compile; then
103 echo "Well, your system knows about the normal fd_set typedef..." >&4
105 echo "and you have the normal fd_set macros (just as I'd expect)." >&4
106 d_fd_macros="$define"
109 but not the normal fd_set macros! Gaaack! I'll have to cover for you.
115 Hmm, your compiler has some difficulty with fd_set. Checking further...
118 if eval $compile; then
121 echo "Well, your system has some sort of fd_set available..." >&4
123 echo "and you have the normal fd_set macros." >&4
124 d_fd_macros="$define"
127 but not the normal fd_set macros! Gross! More work for me...
132 echo "Well, you got zip. That's OK, I can roll my own fd_set stuff." >&4