ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/selcall.h
Revision: 3.5
Committed: Tue Feb 25 02:47:22 2003 UTC (21 years, 2 months ago) by greg
Content type: text/plain
Branch: MAIN
CVS Tags: rad3R5
Changes since 3.4: +2 -57 lines
Log Message:
Replaced inline copyright notice with #include "copyright.h"

File Contents

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