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