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.4 by greg, Fri Jun 27 06:53:21 2003 UTC vs.
Revision 3.7 by schorsch, Thu Jul 3 22:41:44 2003 UTC

# Line 10 | Line 10 | extern "C" {
10  
11   #ifdef _WIN32
12  
13 < #include <stdio.h>
14 < #define popen _popen
15 < #define pclose _pclose
16 < #include <fcntl.h>  /* _O_BINARY, _O_TEXT */
17 < #include <io.h>     /* _setmode() */
18 < #include <stdlib.h> /* _fmode */
13 >  #include <io.h>     /* _setmode() and stuff from unistd.h */
14 >  typedef long off_t;
15  
16 < #define SET_DEFAULT_BINARY() _fmode = _O_BINARY
17 < #define SET_FILE_BINARY(fp) _setmode(fileno(fp),_O_BINARY)
18 < #define SET_FD_BINARY(fd) _setmode(fd,_O_BINARY)
16 >  #include <stdio.h>
17 >  #define popen _popen
18 >  #define pclose _pclose
19  
20 +  #include <windows.h>
21 +  #define sleep(s) Sleep(s*1000)
22  
23 +  #define NON_POSIX
24  
25 +  #include <sys/types.h>
26 +  #include <sys/stat.h>
27 +  #define RHAS_STAT
28 +  #define S_IFREG _S_IFREG
29 +  #define W_IFDIR _S_IFDIR
30  
31 +  #include <fcntl.h>  /* _O_BINARY, _O_TEXT */
32 +  #include <stdlib.h> /* _fmode */
33 +  #define SET_DEFAULT_BINARY() _fmode = _O_BINARY
34 +  #define SET_FILE_BINARY(fp) _setmode(fileno(fp),_O_BINARY)
35 +  #define SET_FD_BINARY(fd) _setmode(fd,_O_BINARY)
36  
28
29
37   #else /* _WIN32 */
38  
39 < /* NOPs on unix */
40 < #define SET_DEFAULT_BINARY()
41 < #define SET_FILE_BINARY(fp)
42 < #define SET_FD_BINARY(fd)
39 >  #ifdef AMIGA
40 >    #define NON_POSIX
41 >  #else
42 >    /* assumedly posix systems */
43 >    #define RHAS_GETPWNAM
44 >    #define RHAS_STAT
45 >    #define RHAS_FORK_EXEC
46 >  #endif
47  
48 +  /* everybody except Windows */
49  
50 <
51 <
52 <
53 <
50 >  /* NOPs */
51 >  #define SET_DEFAULT_BINARY()
52 >  #define SET_FILE_BINARY(fp)
53 >  #define SET_FD_BINARY(fd)
54  
55   #endif /* _WIN32 */
56  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines