Commit | Line | Data |
---|---|---|
7bf7acb6 GI |
1 | #ifndef LIBPICOFE_POSIX_H |
2 | #define LIBPICOFE_POSIX_H | |
3 | ||
f15ca4db | 4 | /* define POSIX stuff: dirent, scandir, getcwd, mkdir */ |
babe4580 | 5 | #if defined(__FreeBSD__) || defined(__MACH__) || defined(__linux__) || defined(__MINGW32__) || defined(__PSP__) || defined(__PS2__) |
049a6b3e | 6 | |
7 | #include <dirent.h> | |
8 | #include <unistd.h> | |
f15ca4db | 9 | #include <sys/stat.h> |
10 | #include <sys/types.h> | |
049a6b3e | 11 | |
8ced8d2b | 12 | #ifdef __MINGW32__ |
13 | #warning hacks! | |
14 | #define mkdir(pathname,mode) mkdir(pathname) | |
15 | #define d_type d_ino | |
16 | #define DT_REG 0 | |
9fba90ac | 17 | #define DT_DIR 1 |
18 | #define DT_LNK 2 | |
19 | #define DT_UNKNOWN -1 | |
20 | #define readlink(p,d,s) -1 | |
8ced8d2b | 21 | #endif |
22 | ||
049a6b3e | 23 | #else |
24 | ||
f15ca4db | 25 | #error "must provide posix" |
049a6b3e | 26 | |
27 | #endif | |
28 | ||
7bf7acb6 | 29 | #endif // LIBPICOFE_POSIX_H |