diff options
Diffstat (limited to 'firmware/libc/include/time.h')
-rw-r--r-- | firmware/libc/include/time.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/firmware/libc/include/time.h b/firmware/libc/include/time.h new file mode 100644 index 0000000000..912fafe7ca --- /dev/null +++ b/firmware/libc/include/time.h | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * time.h | ||
3 | * | ||
4 | * Struct declaration for dealing with time. | ||
5 | */ | ||
6 | |||
7 | #ifndef _TIME_H_ | ||
8 | #define _TIME_H_ | ||
9 | |||
10 | #ifdef WPSEDITOR | ||
11 | #include "inttypes.h" | ||
12 | #include <time.h> | ||
13 | #endif | ||
14 | |||
15 | struct tm | ||
16 | { | ||
17 | int tm_sec; | ||
18 | int tm_min; | ||
19 | int tm_hour; | ||
20 | int tm_mday; | ||
21 | int tm_mon; | ||
22 | int tm_year; | ||
23 | int tm_wday; | ||
24 | int tm_yday; | ||
25 | int tm_isdst; | ||
26 | }; | ||
27 | |||
28 | #if !defined(_TIME_T_DEFINED) && !defined(_TIME_T_DECLARED) | ||
29 | typedef long time_t; | ||
30 | |||
31 | /* this define below is used by the mingw headers to prevent duplicate | ||
32 | typedefs */ | ||
33 | #define _TIME_T_DEFINED | ||
34 | #define _TIME_T_DECLARED | ||
35 | time_t time(time_t *t); | ||
36 | struct tm *localtime(const time_t *timep); | ||
37 | time_t mktime(struct tm *t); | ||
38 | |||
39 | #endif /* SIMULATOR */ | ||
40 | |||
41 | #ifdef __PCTOOL__ | ||
42 | /* this time.h does not define struct timespec, | ||
43 | so tell sys/stat.h not to use it */ | ||
44 | #undef __USE_MISC | ||
45 | #endif | ||
46 | |||
47 | #endif /* _TIME_H_ */ | ||
48 | |||
49 | |||