X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=posix.h;h=6ab9a7f173483e254f0f07d9c117af692f741f21;hb=HEAD;hp=33ca96ccbb04c6164cff63e122dfb0215355c8f5;hpb=a86e9a3e58f55bf49d99dfd5e5d6413e17149593;p=libpicofe.git diff --git a/posix.h b/posix.h index 33ca96c..8351def 100644 --- 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 #include @@ -11,7 +14,10 @@ #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