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