summaryrefslogtreecommitdiff
path: root/firmware/include
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/include')
-rw-r--r--firmware/include/file.h29
1 files changed, 9 insertions, 20 deletions
diff --git a/firmware/include/file.h b/firmware/include/file.h
index a9d1d05a11..7799f3d625 100644
--- a/firmware/include/file.h
+++ b/firmware/include/file.h
@@ -25,31 +25,19 @@
25#include <sys/types.h> 25#include <sys/types.h>
26#include "config.h" 26#include "config.h"
27#include "gcc_extensions.h" 27#include "gcc_extensions.h"
28#include <fcntl.h>
29#ifdef WIN32
30/* this has SEEK_SET et al */
31#include <stdio.h>
32#endif
33
28 34
29#undef MAX_PATH /* this avoids problems when building simulator */ 35#undef MAX_PATH /* this avoids problems when building simulator */
30#define MAX_PATH 260 36#define MAX_PATH 260
31#define MAX_OPEN_FILES 11 37#define MAX_OPEN_FILES 11
32 38
33#ifndef SEEK_SET 39#if !defined(PLUGIN) && !defined(CODEC)
34#define SEEK_SET 0 40#if (CONFIG_PLATFORM & PLATFORM_HOSTED)
35#endif
36#ifndef SEEK_CUR
37#define SEEK_CUR 1
38#endif
39#ifndef SEEK_END
40#define SEEK_END 2
41#endif
42
43#ifndef O_RDONLY
44#define O_RDONLY 0
45#define O_WRONLY 1
46#define O_RDWR 2
47#define O_CREAT 4
48#define O_APPEND 8
49#define O_TRUNC 0x10
50#endif
51
52#if (CONFIG_PLATFORM & PLATFORM_HOSTED) && !defined(PLUGIN) && !defined(CODEC)
53#define open(x, ...) sim_open(x, __VA_ARGS__) 41#define open(x, ...) sim_open(x, __VA_ARGS__)
54#define creat(x,m) sim_creat(x,m) 42#define creat(x,m) sim_creat(x,m)
55#define remove(x) sim_remove(x) 43#define remove(x) sim_remove(x)
@@ -96,4 +84,5 @@ extern int ftruncate(int fd, off_t length);
96extern off_t filesize(int fd); 84extern off_t filesize(int fd);
97extern int release_files(int volume); 85extern int release_files(int volume);
98int fdprintf (int fd, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3); 86int fdprintf (int fd, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3);
87#endif /* !CODEC && !PLUGIN */
99#endif 88#endif