input: in_gp2x refactoring
[libpicofe.git] / common / posix.h
index 9100141..33ca96c 100644 (file)
@@ -1,12 +1,22 @@
-/* define POSIX stuff: dirent, scandir, getcwd */
-#if defined(__linux__)
+/* 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 define dirent"
+#error "must provide posix"
 
 #endif