2002-06-18 09:41:28 +00:00
|
|
|
/*
|
|
|
|
* time.h
|
|
|
|
*
|
2003-12-06 23:22:05 +00:00
|
|
|
* Struct declaration for dealing with time.
|
2002-06-18 09:41:28 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _TIME_H_
|
|
|
|
#define _TIME_H_
|
|
|
|
|
2008-08-29 21:08:38 +00:00
|
|
|
#ifdef WPSEDITOR
|
2010-05-06 21:04:40 +00:00
|
|
|
#include "inttypes.h"
|
2008-08-29 21:08:38 +00:00
|
|
|
#include <time.h>
|
|
|
|
#endif
|
|
|
|
|
2002-06-18 09:41:28 +00:00
|
|
|
struct tm
|
|
|
|
{
|
2010-02-22 21:24:09 +00:00
|
|
|
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;
|
2002-06-18 09:41:28 +00:00
|
|
|
};
|
|
|
|
|
2006-10-19 09:42:58 +00:00
|
|
|
#if !defined(_TIME_T_DEFINED) && !defined(_TIME_T_DECLARED)
|
2005-02-18 13:47:17 +00:00
|
|
|
typedef long time_t;
|
|
|
|
|
|
|
|
/* this define below is used by the mingw headers to prevent duplicate
|
|
|
|
typedefs */
|
|
|
|
#define _TIME_T_DEFINED
|
2006-03-02 13:07:11 +00:00
|
|
|
#define _TIME_T_DECLARED
|
2005-02-18 13:47:17 +00:00
|
|
|
time_t time(time_t *t);
|
2005-02-18 14:41:42 +00:00
|
|
|
struct tm *localtime(const time_t *timep);
|
2010-05-06 21:04:40 +00:00
|
|
|
time_t mktime(struct tm *t);
|
2005-02-18 13:47:17 +00:00
|
|
|
|
2005-02-18 14:41:42 +00:00
|
|
|
#endif /* SIMULATOR */
|
2005-02-18 13:47:17 +00:00
|
|
|
|
2008-12-15 23:42:19 +00:00
|
|
|
#ifdef __PCTOOL__
|
|
|
|
/* this time.h does not define struct timespec,
|
|
|
|
so tell sys/stat.h not to use it */
|
|
|
|
#undef __USE_MISC
|
|
|
|
#endif
|
|
|
|
|
2002-06-18 09:41:28 +00:00
|
|
|
#endif /* _TIME_H_ */
|
|
|
|
|
2008-08-29 21:08:38 +00:00
|
|
|
|