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