mirror of
https://github.com/RaySollium99/libpicofe.git
synced 2025-09-04 14:37:46 -04:00
Using PSP as posix
This commit is contained in:
parent
7cddc27acc
commit
fa4a662a34
1 changed files with 1 additions and 16 deletions
17
posix.h
17
posix.h
|
@ -2,7 +2,7 @@
|
|||
#define LIBPICOFE_POSIX_H
|
||||
|
||||
/* define POSIX stuff: dirent, scandir, getcwd, mkdir */
|
||||
#if defined(__MACH__) || defined(__linux__) || defined(__MINGW32__)
|
||||
#if defined(__MACH__) || defined(__linux__) || defined(__MINGW32__) || defined(__PSP__) || defined(__PS2__)
|
||||
|
||||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
|
@ -17,21 +17,6 @@
|
|||
#define DT_DIR 0
|
||||
#endif
|
||||
|
||||
#elif defined(__PSP__)
|
||||
|
||||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifndef DT_DIR
|
||||
/* map PSP names to posix. needs special scandir() function to mask rwx bits */
|
||||
#define d_type d_stat.st_attr
|
||||
#define DT_LNK FIO_SO_IFLNK
|
||||
#define DT_DIR FIO_SO_IFDIR
|
||||
#define DT_REG FIO_SO_IFREG
|
||||
#define DT_UNKNOWN 0
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#error "must provide posix"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue