diff options
| author | Thomas Martitz <kugel@rockbox.org> | 2014-02-11 15:27:23 +0100 |
|---|---|---|
| committer | Thomas Martitz <kugel@rockbox.org> | 2014-02-23 20:23:52 +0100 |
| commit | 0f928f87850153a38c7e6cfafd283ce4f52a0666 (patch) | |
| tree | 55bbb19b5a17cd6e30a29bb3c2446a6e4c02738a /firmware/include/file.h | |
| parent | cbc57af0f3192093177d90861df72c4074566cf8 (diff) | |
| download | rockbox-0f928f87850153a38c7e6cfafd283ce4f52a0666.zip rockbox-0f928f87850153a38c7e6cfafd283ce4f52a0666.tar.gz rockbox-0f928f87850153a38c7e6cfafd283ce4f52a0666.tar.bz2 rockbox-0f928f87850153a38c7e6cfafd283ce4f52a0666.tar.xz | |
RaaA: Move directory related stuff from filesystem-unix.c into rbpaths.c.
Part of this change is to align sdlapp builds to other application targets
in that the sim_* wrappers are not used anymore (except for sim_read/write).
Path mangling is now done in rbpaths.c as well.
Change-Id: I9726da73b50a83d9e1a1840288de16ec01ea029d
Diffstat (limited to 'firmware/include/file.h')
| -rw-r--r-- | firmware/include/file.h | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/firmware/include/file.h b/firmware/include/file.h index 4ba9c50..9b7f123 100644 --- a/firmware/include/file.h +++ b/firmware/include/file.h @@ -38,33 +38,27 @@ #if !defined(PLUGIN) && !defined(CODEC) #if defined(APPLICATION) && !defined(__PCTOOL__) -# define open(x, ...) app_open(x, __VA_ARGS__) -# define creat(x,m) app_creat(x, m) -# define remove(x) app_remove(x) -# define rename(x,y) app_rename(x,y) -extern int app_open(const char *name, int o, ...); -extern int app_creat(const char *name, mode_t mode); -extern int app_remove(const char* pathname); -extern int app_rename(const char* path, const char* newname); +#include "rbpaths.h" +# define open(x, ...) app_open(x, __VA_ARGS__) +# define creat(x,m) app_creat(x, m) +# define remove(x) app_remove(x) +# define rename(x,y) app_rename(x,y) # if (CONFIG_PLATFORM & (PLATFORM_SDL|PLATFORM_MAEMO|PLATFORM_PANDORA)) -# define fsync(x) sim_fsync(x) -# define ftruncate(x,y) sim_ftruncate(x,y) -# define lseek(x,y,z) sim_lseek(x,y,z) -# define read(x,y,z) sim_read(x,y,z) -# define write(x,y,z) sim_write(x,y,z) -# define close(x) sim_close(x) +/* SDL overrides a few more */ +# define read(x,y,z) sim_read(x,y,z) +# define write(x,y,z) sim_write(x,y,z) # endif #elif defined(SIMULATOR) || defined(DBTOOL) -# define open(x, ...) sim_open(x, __VA_ARGS__) -# define creat(x,m) sim_creat(x,m) -# define remove(x) sim_remove(x) -# define rename(x,y) sim_rename(x,y) -# define fsync(x) sim_fsync(x) -# define ftruncate(x,y) sim_ftruncate(x,y) -# define lseek(x,y,z) sim_lseek(x,y,z) -# define read(x,y,z) sim_read(x,y,z) -# define write(x,y,z) sim_write(x,y,z) -# define close(x) sim_close(x) +# define open(x, ...) sim_open(x, __VA_ARGS__) +# define creat(x,m) sim_creat(x,m) +# define remove(x) sim_remove(x) +# define rename(x,y) sim_rename(x,y) +# define fsync(x) sim_fsync(x) +# define ftruncate(x,y) sim_ftruncate(x,y) +# define lseek(x,y,z) sim_lseek(x,y,z) +# define read(x,y,z) sim_read(x,y,z) +# define write(x,y,z) sim_write(x,y,z) +# define close(x) sim_close(x) extern int sim_open(const char *name, int o, ...); extern int sim_creat(const char *name, mode_t mode); #endif |