ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/selcall.h
Revision: 3.3
Committed: Fri Oct 31 14:49:37 1997 UTC (26 years, 6 months ago) by gregl
Content type: text/plain
Branch: MAIN
Changes since 3.2: +1 -0 lines
Log Message:
added missing #endif

File Contents

# Content
1 /* Copyright (c) 1997 Silicon Graphics, Inc. */
2
3 /* SCCSid "$SunId$ SGI" */
4
5 /*
6 * header file for select call compatibility
7 */
8
9 #include <sys/types.h>
10 #include <sys/time.h>
11 #ifdef INCL_SEL_H
12 #include <sys/select.h>
13 #endif
14
15 #ifndef FD_SETSIZE
16 #include <sys/param.h>
17 #define FD_SETSIZE NOFILE /* maximum # select file descriptors */
18 #endif
19 #ifndef FD_SET
20 #ifndef NFDBITS
21 #define NFDBITS (8*sizeof(int)) /* number of bits per fd_mask */
22 #endif
23 #define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
24 #define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
25 #define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
26 #ifdef BSD
27 #define FD_ZERO(p) bzero((char *)(p), sizeof(*(p)))
28 #else
29 #define FD_ZERO(p) memset((char *)(p), 0, sizeof(*(p)))
30 #endif
31 #endif