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 |
16 |
|
|
17 |
+ |
#include <windows.h> |
18 |
+ |
#define sleep(s) Sleep(s*1000) |
19 |
+ |
|
20 |
|
#define NON_POSIX |
21 |
|
|
22 |
|
#include <sys/types.h> |
26 |
|
#define W_IFDIR _S_IFDIR |
27 |
|
|
28 |
|
#include <fcntl.h> /* _O_BINARY, _O_TEXT */ |
26 |
– |
#include <io.h> /* _setmode() */ |
29 |
|
#include <stdlib.h> /* _fmode */ |
30 |
|
#define SET_DEFAULT_BINARY() _fmode = _O_BINARY |
31 |
|
#define SET_FILE_BINARY(fp) _setmode(fileno(fp),_O_BINARY) |
51 |
|
|
52 |
|
#endif /* _WIN32 */ |
53 |
|
|
54 |
+ |
#ifdef __cplusplus |
55 |
+ |
extern "C" { |
56 |
+ |
#endif |
57 |
+ |
|
58 |
+ |
/* nothing to protect yet */ |
59 |
|
|
60 |
|
#ifdef __cplusplus |
61 |
|
} |