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

Comparing ray/src/common/platform.h (file contents):
Revision 3.6 by schorsch, Mon Jun 30 19:58:37 2003 UTC vs.
Revision 3.11 by schorsch, Mon Oct 27 10:19:31 2003 UTC

# Line 4 | Line 4
4   */
5   #ifndef _RAD_PLATFORM_H_
6   #define _RAD_PLATFORM_H_
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
7  
8   #ifdef _WIN32
9  
10 +  #include <io.h>     /* _setmode() and stuff from unistd.h */
11 +  typedef long off_t;
12 +
13    #include <stdio.h>
14 <  #define popen _popen
15 <  #define pclose _pclose
14 >  #define snprintf _snprintf
15  
16 +  #include <windows.h>
17 +  #define sleep(s) Sleep(s*1000)
18 +
19    #define NON_POSIX
20  
21    #include <sys/types.h>
# Line 23 | Line 25 | extern "C" {
25    #define W_IFDIR _S_IFDIR
26  
27    #include <fcntl.h>  /* _O_BINARY, _O_TEXT */
26  #include <io.h>     /* _setmode() */
28    #include <stdlib.h> /* _fmode */
29    #define SET_DEFAULT_BINARY() _fmode = _O_BINARY
30    #define SET_FILE_BINARY(fp) _setmode(fileno(fp),_O_BINARY)
# Line 35 | Line 36 | extern "C" {
36      #define NON_POSIX
37    #else
38      /* assumedly posix systems */
39 <    #define RHAS_GETPWNAM
39 >        #include <unistd.h>
40      #define RHAS_STAT
41      #define RHAS_FORK_EXEC
42    #endif
# Line 49 | Line 50 | extern "C" {
50  
51   #endif /* _WIN32 */
52  
53 + #ifdef __cplusplus
54 + extern "C" {
55 + #endif
56 +
57 + /* nothing to protect yet */
58  
59   #ifdef __cplusplus
60   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines