ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/selcall.h
(Generate patch)

Comparing ray/src/common/selcall.h (file contents):
Revision 3.1 by gregl, Tue Oct 28 14:02:29 1997 UTC vs.
Revision 3.10 by schorsch, Mon Jul 14 22:23:59 2003 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1997 Silicon Graphics, Inc. */
2 <
3 < /* SCCSid "$SunId$ SGI" */
4 <
1 > /* RCSid $Id$ */
2   /*
3   * header file for select call compatibility
4   */
5 + #ifndef _RAD_SELCALL_H_
6 + #define _RAD_SELCALL_H_
7  
8 + #include <string.h>
9   #include <sys/types.h>
10 < #include <sys/time.h>
10 > #ifdef _WIN32
11 >  /*#include <winsock2.h>*/
12 > #else
13 >  #include <sys/time.h>
14 > #endif
15   #ifdef INCL_SEL_H
16   #include <sys/select.h>
17   #endif
18  
19   #ifndef FD_SETSIZE
20 < #include <sys/param.h>
20 > #ifdef _WIN32
21 > #else
22 >  #include <sys/param.h>
23 > #endif
24   #define FD_SETSIZE      NOFILE          /* maximum # select file descriptors */
25   #endif
26   #ifndef FD_SET
# Line 23 | Line 30
30   #define FD_SET(n, p)    ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
31   #define FD_CLR(n, p)    ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
32   #define FD_ISSET(n, p)  ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
33 < #ifndef BSD
27 < #define bzero(d,n)      memset(d,0,n)
33 > #define FD_ZERO(p)      memset((char *)(p), 0, sizeof(*(p)))
34   #endif
35 < #define FD_ZERO(p)      bzero((char *)(p), sizeof(*(p)))
35 >
36 > #ifdef __cplusplus
37 > extern "C" {
38   #endif
39 +
40 + /* nothing yet */
41 +
42 + #ifdef __cplusplus
43 + }
44 + #endif
45 + #endif /* _RAD_SELCALL_H_ */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines