ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/platform.h
Revision: 3.2
Committed: Fri Jun 6 16:38:47 2003 UTC (20 years, 10 months ago) by schorsch
Content type: text/plain
Branch: MAIN
Changes since 3.1: +9 -5 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 schorsch 3.2 /* RCSid $Id: platform.h,v 3.1 2003/06/05 19:29:34 schorsch Exp $ */
2 schorsch 3.1 /*
3     * platform.h - header file for platform specific definitions
4     */
5     #ifndef _RAD_PLATFORM_H_
6     #define _RAD_PLATFORM_H_
7 schorsch 3.2 #ifdef __cplusplus
8     extern "C" {
9     #endif
10 schorsch 3.1
11 schorsch 3.2 #include "copyright.h"
12 schorsch 3.1
13     #ifdef _WIN32
14    
15     #include <stdio.h> /* fileno() */
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)
23    
24    
25    
26    
27    
28    
29    
30     #else /* _WIN32 */
31    
32     /* NOPs on unix */
33     #define SET_DEFAULT_BINARY()
34     #define SET_FILE_BINARY(fp)
35     #define SET_FD_BINARY(fd)
36    
37    
38    
39    
40    
41    
42    
43     #endif /* _WIN32 */
44    
45 schorsch 3.2
46     #ifdef __cplusplus
47     }
48     #endif
49 schorsch 3.1 #endif /* _RAD_PLATFORM_H_ */
50