summaryrefslogtreecommitdiff
path: root/firmware/include
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/include')
-rw-r--r--firmware/include/dir.h4
-rw-r--r--firmware/include/stdio.h9
-rw-r--r--firmware/include/time.h11
3 files changed, 22 insertions, 2 deletions
diff --git a/firmware/include/dir.h b/firmware/include/dir.h
index 8dcbb8e900..12ec724692 100644
--- a/firmware/include/dir.h
+++ b/firmware/include/dir.h
@@ -22,8 +22,6 @@
22#include <stdbool.h> 22#include <stdbool.h>
23#include <file.h> 23#include <file.h>
24 24
25#ifndef DIRENT_DEFINED
26
27#define ATTR_READ_ONLY 0x01 25#define ATTR_READ_ONLY 0x01
28#define ATTR_HIDDEN 0x02 26#define ATTR_HIDDEN 0x02
29#define ATTR_SYSTEM 0x04 27#define ATTR_SYSTEM 0x04
@@ -32,6 +30,8 @@
32#define ATTR_ARCHIVE 0x20 30#define ATTR_ARCHIVE 0x20
33#define ATTR_VOLUME 0x40 /* this is a volume, not a real directory */ 31#define ATTR_VOLUME 0x40 /* this is a volume, not a real directory */
34 32
33#ifndef DIRENT_DEFINED
34
35struct dirent { 35struct dirent {
36 unsigned char d_name[MAX_PATH]; 36 unsigned char d_name[MAX_PATH];
37 int attribute; 37 int attribute;
diff --git a/firmware/include/stdio.h b/firmware/include/stdio.h
index b98f01c729..968bd59aab 100644
--- a/firmware/include/stdio.h
+++ b/firmware/include/stdio.h
@@ -36,4 +36,13 @@
36int snprintf (char *buf, size_t size, const char *fmt, ...); 36int snprintf (char *buf, size_t size, const char *fmt, ...);
37int vsnprintf (char *buf, int size, const char *fmt, __VALIST ap); 37int vsnprintf (char *buf, int size, const char *fmt, __VALIST ap);
38 38
39#ifdef SIMULATOR
40typedef void FILE;
41int vfprintf(FILE *stream, const char *format, __VALIST ap);
42#ifdef WIN32
43#define FILENAME_MAX 260 /* ugly hard-coded value of a limit that is set
44 in file.h */
45#endif
46#endif
47
39#endif /* _STDIO_H_ */ 48#endif /* _STDIO_H_ */
diff --git a/firmware/include/time.h b/firmware/include/time.h
index 5213468662..267face71b 100644
--- a/firmware/include/time.h
+++ b/firmware/include/time.h
@@ -20,5 +20,16 @@ struct tm
20 int tm_isdst; 20 int tm_isdst;
21}; 21};
22 22
23#if defined(SIMULATOR) && !defined(_TIME_T_DEFINED)
24/* for non-win32 simulators */
25typedef long time_t;
26
27/* this define below is used by the mingw headers to prevent duplicate
28 typedefs */
29#define _TIME_T_DEFINED
30time_t time(time_t *t);
31
32#endif
33
23#endif /* _TIME_H_ */ 34#endif /* _TIME_H_ */
24 35