4 |
|
*/ |
5 |
|
#ifndef _RAD_PLATFORM_H_ |
6 |
|
#define _RAD_PLATFORM_H_ |
7 |
– |
#ifdef __cplusplus |
8 |
– |
extern "C" { |
9 |
– |
#endif |
7 |
|
|
8 |
|
#ifdef _WIN32 |
9 |
|
|
11 |
|
typedef long off_t; |
12 |
|
|
13 |
|
#include <stdio.h> |
14 |
< |
#define popen _popen |
18 |
< |
#define pclose _pclose |
14 |
> |
#define snprintf _snprintf |
15 |
|
|
16 |
|
#include <windows.h> |
17 |
|
#define sleep(s) Sleep(s*1000) |
36 |
|
#define NON_POSIX |
37 |
|
#else |
38 |
|
/* assumedly posix systems */ |
39 |
< |
#define RHAS_GETPWNAM |
39 |
> |
#include <unistd.h> |
40 |
|
#define RHAS_STAT |
41 |
|
#define RHAS_FORK_EXEC |
42 |
|
#endif |
50 |
|
|
51 |
|
#endif /* _WIN32 */ |
52 |
|
|
53 |
+ |
#ifdef __cplusplus |
54 |
+ |
extern "C" { |
55 |
+ |
#endif |
56 |
+ |
|
57 |
+ |
/* nothing to protect yet */ |
58 |
|
|
59 |
|
#ifdef __cplusplus |
60 |
|
} |