gl: clear w, h on reinit
[libpicofe.git] / posix.h
1 #ifndef LIBPICOFE_POSIX_H
2 #define LIBPICOFE_POSIX_H
3
4 /* define POSIX stuff: dirent, scandir, getcwd, mkdir */
5 #if defined(__linux__) || defined(__MINGW32__)
6
7 #include <dirent.h>
8 #include <unistd.h>
9 #include <sys/stat.h>
10 #include <sys/types.h>
11
12 #ifdef __MINGW32__
13 #warning hacks!
14 #define mkdir(pathname,mode) mkdir(pathname)
15 #define d_type d_ino
16 #define DT_REG 0
17 #define DT_DIR 0
18 #endif
19
20 #else
21
22 #error "must provide posix"
23
24 #endif
25
26 #endif // LIBPICOFE_POSIX_H