in_sdl: give names to gamepad buttons
[libpicofe.git] / posix.h
diff --git a/posix.h b/posix.h
index 33ca96c..8351def 100644 (file)
--- a/posix.h
+++ b/posix.h
@@ -1,5 +1,8 @@
+#ifndef LIBPICOFE_POSIX_H
+#define LIBPICOFE_POSIX_H
+
 /* define POSIX stuff: dirent, scandir, getcwd, mkdir */
-#if defined(__linux__) || defined(__MINGW32__)
+#if defined(__FreeBSD__) || defined(__MACH__) || defined(__linux__) || defined(__MINGW32__) || defined(__PSP__) || defined(__PS2__)
 
 #include <dirent.h>
 #include <unistd.h>
 #define mkdir(pathname,mode) mkdir(pathname)
 #define d_type d_ino
 #define DT_REG 0
-#define DT_DIR 0
+#define DT_DIR 1
+#define DT_LNK 2
+#define DT_UNKNOWN -1
+#define readlink(p,d,s)                -1
 #endif
 
 #else
@@ -20,4 +26,4 @@
 
 #endif
 
-
+#endif // LIBPICOFE_POSIX_H