diff options
Diffstat (limited to 'firmware/include')
-rw-r--r-- | firmware/include/dbgcheck.h | 4 | ||||
-rw-r--r-- | firmware/include/dir_uncached.h | 6 | ||||
-rw-r--r-- | firmware/include/dircache.h | 2 | ||||
-rw-r--r-- | firmware/include/file.h | 5 |
4 files changed, 9 insertions, 8 deletions
diff --git a/firmware/include/dbgcheck.h b/firmware/include/dbgcheck.h index e1f7aefbdb..0b38627d11 100644 --- a/firmware/include/dbgcheck.h +++ b/firmware/include/dbgcheck.h | |||
@@ -4,7 +4,7 @@ | |||
4 | #include <stdbool.h> | 4 | #include <stdbool.h> |
5 | 5 | ||
6 | #ifdef DEBUG | 6 | #ifdef DEBUG |
7 | #ifndef SIMULATOR | 7 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) |
8 | /* check whether a function is inside the valid memory location */ | 8 | /* check whether a function is inside the valid memory location */ |
9 | #define IS_FUNCPTR(fp) ({/ | 9 | #define IS_FUNCPTR(fp) ({/ |
10 | extern char _text[];/ | 10 | extern char _text[];/ |
@@ -21,4 +21,4 @@ | |||
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | 23 | ||
24 | #endif // #ifndef __DBGCHECK_H__ \ No newline at end of file | 24 | #endif // #ifndef __DBGCHECK_H__ |
diff --git a/firmware/include/dir_uncached.h b/firmware/include/dir_uncached.h index 4e5acf34d1..f225cf8e39 100644 --- a/firmware/include/dir_uncached.h +++ b/firmware/include/dir_uncached.h | |||
@@ -32,7 +32,7 @@ | |||
32 | #define ATTR_ARCHIVE 0x20 | 32 | #define ATTR_ARCHIVE 0x20 |
33 | #define ATTR_VOLUME 0x40 /* this is a volume, not a real directory */ | 33 | #define ATTR_VOLUME 0x40 /* this is a volume, not a real directory */ |
34 | 34 | ||
35 | #ifdef SIMULATOR | 35 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) |
36 | #define dirent_uncached sim_dirent | 36 | #define dirent_uncached sim_dirent |
37 | #define DIR_UNCACHED SIM_DIR | 37 | #define DIR_UNCACHED SIM_DIR |
38 | #define opendir_uncached sim_opendir | 38 | #define opendir_uncached sim_opendir |
@@ -57,7 +57,7 @@ struct dirent_uncached { | |||
57 | #include "fat.h" | 57 | #include "fat.h" |
58 | 58 | ||
59 | typedef struct { | 59 | typedef struct { |
60 | #ifndef SIMULATOR | 60 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) |
61 | bool busy; | 61 | bool busy; |
62 | long startcluster; | 62 | long startcluster; |
63 | struct fat_dir fatdir; | 63 | struct fat_dir fatdir; |
@@ -66,7 +66,7 @@ typedef struct { | |||
66 | int volumecounter; /* running counter for faked volume entries */ | 66 | int volumecounter; /* running counter for faked volume entries */ |
67 | #endif | 67 | #endif |
68 | #else | 68 | #else |
69 | /* simulator: */ | 69 | /* simulator/application: */ |
70 | void *dir; /* actually a DIR* dir */ | 70 | void *dir; /* actually a DIR* dir */ |
71 | char *name; | 71 | char *name; |
72 | #endif | 72 | #endif |
diff --git a/firmware/include/dircache.h b/firmware/include/dircache.h index 9fd55fab6f..4472d5fbe0 100644 --- a/firmware/include/dircache.h +++ b/firmware/include/dircache.h | |||
@@ -36,7 +36,7 @@ struct travel_data { | |||
36 | struct dircache_entry *first; | 36 | struct dircache_entry *first; |
37 | struct dircache_entry *ce; | 37 | struct dircache_entry *ce; |
38 | struct dircache_entry *down_entry; | 38 | struct dircache_entry *down_entry; |
39 | #ifdef SIMULATOR | 39 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) |
40 | DIR_UNCACHED *dir, *newdir; | 40 | DIR_UNCACHED *dir, *newdir; |
41 | struct dirent_uncached *entry; | 41 | struct dirent_uncached *entry; |
42 | #else | 42 | #else |
diff --git a/firmware/include/file.h b/firmware/include/file.h index f66cc6c60e..9502f5999a 100644 --- a/firmware/include/file.h +++ b/firmware/include/file.h | |||
@@ -26,6 +26,7 @@ | |||
26 | #define MAX_PATH 260 | 26 | #define MAX_PATH 260 |
27 | 27 | ||
28 | #include <sys/types.h> | 28 | #include <sys/types.h> |
29 | #include "config.h" | ||
29 | #include "_ansi.h" | 30 | #include "_ansi.h" |
30 | 31 | ||
31 | #define MAX_OPEN_FILES 11 | 32 | #define MAX_OPEN_FILES 11 |
@@ -49,7 +50,7 @@ | |||
49 | #define O_TRUNC 0x10 | 50 | #define O_TRUNC 0x10 |
50 | #endif | 51 | #endif |
51 | 52 | ||
52 | #if defined(SIMULATOR) && !defined(PLUGIN) && !defined(CODEC) | 53 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) && !defined(PLUGIN) && !defined(CODEC) |
53 | #define open(x, ...) sim_open(x, __VA_ARGS__) | 54 | #define open(x, ...) sim_open(x, __VA_ARGS__) |
54 | #define creat(x,m) sim_creat(x,m) | 55 | #define creat(x,m) sim_creat(x,m) |
55 | #define remove(x) sim_remove(x) | 56 | #define remove(x) sim_remove(x) |
@@ -78,7 +79,7 @@ extern int fsync(int fd); | |||
78 | extern ssize_t read(int fd, void *buf, size_t count); | 79 | extern ssize_t read(int fd, void *buf, size_t count); |
79 | extern off_t lseek(int fildes, off_t offset, int whence); | 80 | extern off_t lseek(int fildes, off_t offset, int whence); |
80 | extern int file_creat(const char *pathname); | 81 | extern int file_creat(const char *pathname); |
81 | #ifndef SIMULATOR | 82 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) |
82 | /* posix compatibility function */ | 83 | /* posix compatibility function */ |
83 | static inline int creat(const char *pathname, mode_t mode) | 84 | static inline int creat(const char *pathname, mode_t mode) |
84 | { | 85 | { |