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.2 by schorsch, Fri Jun 6 16:38:47 2003 UTC vs.
Revision 3.6 by schorsch, Mon Jun 30 19:58:37 2003 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines