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.1 by schorsch, Thu Jun 5 19:29:34 2003 UTC vs.
Revision 3.5 by schorsch, Mon Jun 30 14:59:11 2003 UTC

# Line 2 | Line 2
2   /*
3   *  platform.h - header file for platform specific definitions
4   */
5
6 #include "copyright.h"
7
8
5   #ifndef _RAD_PLATFORM_H_
6   #define _RAD_PLATFORM_H_
7 + #ifdef __cplusplus
8 + extern "C" {
9 + #endif
10  
12
11   #ifdef _WIN32
12  
13 < #include <stdio.h>  /* fileno() */
14 < #include <fcntl.h>  /* _O_BINARY, _O_TEXT */
15 < #include <io.h>     /* _setmode() */
16 < #include <stdlib.h> /* _fmode */
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 */
19  
20 < #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)
20 >  #define NON_POSIX
21 >  #define RHAS_ACCESS
22  
23 +  #define SET_DEFAULT_BINARY() _fmode = _O_BINARY
24 +  #define SET_FILE_BINARY(fp) _setmode(fileno(fp),_O_BINARY)
25 +  #define SET_FD_BINARY(fd) _setmode(fd,_O_BINARY)
26  
25
26
27
28
29
27   #else /* _WIN32 */
28  
29 < /* NOPs on unix */
30 < #define SET_DEFAULT_BINARY()
31 < #define SET_FILE_BINARY(fp)
32 < #define SET_FD_BINARY(fd)
29 >  #ifdef AMIGA
30 >    #define NON_POSIX
31 >  #else
32 >    /* assumedly posix systems */
33 >    #define RHAS_GETPWNAM
34 >    #define RHAS_ACCESS
35 >    #define RHAS_FORK_EXEC
36 >  #endif
37  
38 +  /* everybody except Windows */
39  
40 +  /* NOPs */
41 +  #define SET_DEFAULT_BINARY()
42 +  #define SET_FILE_BINARY(fp)
43 +  #define SET_FD_BINARY(fd)
44  
39
40
41
42
45   #endif /* _WIN32 */
46  
47 +
48 + #ifdef __cplusplus
49 + }
50 + #endif
51   #endif /* _RAD_PLATFORM_H_ */
52  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines