diff options
| author | Thomas Martitz <kugel@rockbox.org> | 2010-05-06 21:04:40 +0000 |
|---|---|---|
| committer | Thomas Martitz <kugel@rockbox.org> | 2010-05-06 21:04:40 +0000 |
| commit | 50a6ca39ad4ed01922aa4f755f0ca579788226cf (patch) | |
| tree | c7881b015b220558167310345b162324c96be15a /firmware/libc/include/time.h | |
| parent | adb506df14aded06ed6e9ebf8540e6fd383ffd6a (diff) | |
| download | rockbox-50a6ca39ad4ed01922aa4f755f0ca579788226cf.zip rockbox-50a6ca39ad4ed01922aa4f755f0ca579788226cf.tar.gz rockbox-50a6ca39ad4ed01922aa4f755f0ca579788226cf.tar.bz2 rockbox-50a6ca39ad4ed01922aa4f755f0ca579788226cf.tar.xz | |
Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes).
This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
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 0000000..912fafe --- /dev/null +++ b/firmware/libc/include/time.h @@ -0,0 +1,49 @@ +/* + * time.h + * + * Struct declaration for dealing with time. + */ + +#ifndef _TIME_H_ +#define _TIME_H_ + +#ifdef WPSEDITOR +#include "inttypes.h" +#include <time.h> +#endif + +struct tm +{ + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; + int tm_year; + int tm_wday; + int tm_yday; + int tm_isdst; +}; + +#if !defined(_TIME_T_DEFINED) && !defined(_TIME_T_DECLARED) +typedef long time_t; + +/* this define below is used by the mingw headers to prevent duplicate + typedefs */ +#define _TIME_T_DEFINED +#define _TIME_T_DECLARED +time_t time(time_t *t); +struct tm *localtime(const time_t *timep); +time_t mktime(struct tm *t); + +#endif /* SIMULATOR */ + +#ifdef __PCTOOL__ +/* this time.h does not define struct timespec, + so tell sys/stat.h not to use it */ +#undef __USE_MISC +#endif + +#endif /* _TIME_H_ */ + + |