1
0
Fork 0
forked from len0rd/rockbox

fat.c includes time.h so we need this

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1062 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Daniel Stenberg 2002-06-18 09:41:28 +00:00
parent 49ed3e921e
commit c5d24c6702

88
firmware/include/time.h Normal file
View file

@ -0,0 +1,88 @@
/*
* time.h
*
* Struct and function declarations for dealing with time.
*/
#ifndef _TIME_H_
#define _TIME_H_
#include "_ansi.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifndef NULL
#define NULL 0
#endif
#ifndef _CLOCKS_PER_SEC_
#define _CLOCKS_PER_SEC_ 1000
#endif
#define CLOCKS_PER_SEC _CLOCKS_PER_SEC_
#define CLK_TCK CLOCKS_PER_SEC
#define __need_size_t
#include <stddef.h>
#include <sys/types.h>
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;
};
clock_t _EXFUN(clock, (void));
double _EXFUN(difftime, (time_t _time2, time_t _time1));
time_t _EXFUN(mktime, (struct tm *_timeptr));
time_t _EXFUN(time, (time_t *_timer));
#ifndef _REENT_ONLY
char *_EXFUN(asctime, (const struct tm *_tblock));
char *_EXFUN(ctime, (const time_t *_time));
struct tm *_EXFUN(gmtime, (const time_t *_timer));
struct tm *_EXFUN(localtime,(const time_t *_timer));
#endif
size_t _EXFUN(strftime, (char *_s, size_t _maxsize, const char *_fmt, const struct tm *_t));
char *_EXFUN(asctime_r, (const struct tm *, char *));
char *_EXFUN(ctime_r, (const time_t *, char *));
struct tm *_EXFUN(gmtime_r, (const time_t *, struct tm *));
struct tm *_EXFUN(localtime_r, (const time_t *, struct tm *));
#ifdef __CYGWIN__
#ifndef __STRICT_ANSI__
extern __IMPORT time_t _timezone;
extern __IMPORT int _daylight;
extern __IMPORT char *_tzname[2];
/* defines for the opengroup specifications Derived from Issue 1 of the SVID. */
#ifndef tzname
#define tzname _tzname
#endif
#ifndef daylight
#define daylight _daylight
#endif
#if timezonevar
#ifndef timezone
#define timezone ((long int) _timezone)
#endif
#else
char *_EXFUN(timezone, (void));
#endif
void _EXFUN(tzset, (void));
#endif
#endif /* __CYGWIN__ */
#ifdef __cplusplus
}
#endif
#endif /* _TIME_H_ */