Integrate the PerlCE (WinCE Perl) port;
[p5sagit/p5-mst-13.2.git] / wince / include / time.h
1 #ifndef TIME_H\r
2 #define TIME_H 1\r
3 \r
4 #include <celib_defs.h>\r
5 #include <sys/types.h>\r
6 \r
7 #ifdef  __cplusplus\r
8 extern "C" {\r
9 #endif\r
10 \r
11 extern long _timezone;\r
12 extern int _daylight;\r
13 extern long _dstbias;\r
14 extern char *_tzname[];\r
15 extern const char __dnames[];\r
16 extern const char __mnames[];\r
17 extern int _days[];\r
18 extern int _lpdays[];\r
19 \r
20 #define _DAY_SEC           (24L * 60L * 60L)    /* secs in a day */\r
21 #define _YEAR_SEC          (365L * _DAY_SEC)    /* secs in a year */\r
22 #define _FOUR_YEAR_SEC     (1461L * _DAY_SEC)   /* secs in a 4 year interval */\r
23 #define _DEC_SEC           315532800L           /* secs in 1970-1979 */\r
24 #define _BASE_YEAR         70L                  /* 1970 is the base year */\r
25 #define _BASE_DOW          4                    /* 01-01-70 was a Thursday */\r
26 #define _LEAP_YEAR_ADJUST  17L                  /* Leap years 1900 - 1970 */\r
27 #define _MAX_YEAR          138L                 /* 2038 is the max year */\r
28 \r
29 struct tm {\r
30   int tm_sec;     /* seconds after the minute - [0,59] */\r
31   int tm_min;     /* minutes after the hour - [0,59] */\r
32   int tm_hour;    /* hours since midnight - [0,23] */\r
33   int tm_mday;    /* day of the month - [1,31] */\r
34   int tm_mon;     /* months since January - [0,11] */\r
35   int tm_year;    /* years since 1900 */\r
36   int tm_wday;    /* days since Sunday - [0,6] */\r
37   int tm_yday;    /* days since January 1 - [0,365] */\r
38   int tm_isdst;   /* daylight savings time flag */\r
39 };\r
40 \r
41 XCE_EXPORT struct tm * xcegmtime(const time_t *timp);\r
42 XCE_EXPORT struct tm *xcelocaltime (const time_t *ptime);\r
43 XCE_EXPORT char *xceasctime (const struct tm *tb);\r
44 XCE_EXPORT int xceutime (const char *fname, struct _utimbuf *times);\r
45 XCE_EXPORT int xcefutime (int fh, struct _utimbuf *times);\r
46 XCE_EXPORT void xceftime (struct _timeb *tp);\r
47 XCE_EXPORT void xcegettimeofday (struct timeval *tv, struct timezone *tz);\r
48 XCE_EXPORT char *xcectime(const time_t *timp);\r
49 XCE_EXPORT void xceftime (struct _timeb *tp);\r
50 XCE_EXPORT time_t xcemktime (struct tm *tb);\r
51 XCE_EXPORT time_t xcetime (time_t *timeptr);\r
52 XCE_EXPORT void _xcetzset(void);\r
53 \r
54 #ifdef  __cplusplus\r
55 };\r
56 #endif\r
57 \r
58 #endif\r