Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | pmbaty | 1 | #ifndef HARNESS_OS_H |
2 | #define HARNESS_OS_H |
||
3 | |||
4 | #include <stdint.h> |
||
5 | #include <stdio.h> |
||
6 | |||
7 | #if defined(_WIN32) || defined(_WIN64) |
||
8 | #include <direct.h> |
||
9 | #include <io.h> |
||
10 | #define getcwd _getcwd |
||
11 | #define chdir _chdir |
||
12 | #define access _access |
||
13 | #define F_OK 0 |
||
14 | #define strcasecmp _stricmp |
||
15 | #define strncasecmp _strnicmp |
||
16 | |||
17 | #if _MSC_VER < 1900 |
||
18 | #define snprintf _snprintf |
||
19 | #define vsnprintf _vsnprintf |
||
20 | #endif |
||
21 | |||
22 | #else |
||
23 | #include <unistd.h> |
||
24 | #endif |
||
25 | |||
26 | // Optional: install a handler to print stack trace during a crash |
||
27 | void OS_InstallSignalHandler(char* program_name); |
||
28 | |||
29 | FILE* OS_fopen(const char* pathname, const char* mode); |
||
30 | |||
31 | size_t OS_ConsoleReadPassword(char* pBuffer, size_t pBufferLen); |
||
32 | |||
33 | char* OS_Dirname(const char* path); |
||
34 | |||
35 | char* OS_Basename(const char* path); |
||
36 | |||
37 | #endif |