]>
Commit | Line | Data |
---|---|---|
6796bc80 | 1 | #ifndef _TIME_H |
05b68e14 ZW |
2 | #include <time/time.h> |
3 | ||
4 | #ifndef _ISOMAC | |
f0be25b6 | 5 | # include <bits/types/locale_t.h> |
bdbf022d | 6 | |
da4cfe38 | 7 | extern __typeof (strftime_l) __strftime_l; |
ee2a5ae8 | 8 | libc_hidden_proto (__strftime_l) |
da4cfe38 RM |
9 | extern __typeof (strptime_l) __strptime_l; |
10 | ||
c5598d47 RM |
11 | libc_hidden_proto (time) |
12 | libc_hidden_proto (asctime) | |
13 | libc_hidden_proto (mktime) | |
14 | libc_hidden_proto (timelocal) | |
15 | libc_hidden_proto (localtime) | |
16 | libc_hidden_proto (strftime) | |
17 | libc_hidden_proto (strptime) | |
18 | ||
6e6249d0 RM |
19 | extern __typeof (clock_getres) __clock_getres; |
20 | extern __typeof (clock_gettime) __clock_gettime; | |
89fb6835 | 21 | libc_hidden_proto (__clock_gettime) |
6e6249d0 RM |
22 | extern __typeof (clock_settime) __clock_settime; |
23 | extern __typeof (clock_nanosleep) __clock_nanosleep; | |
24 | extern __typeof (clock_getcpuclockid) __clock_getcpuclockid; | |
a9564ae9 | 25 | |
bdbf022d UD |
26 | /* Now define the internal interfaces. */ |
27 | struct tm; | |
28 | ||
fc79706a FW |
29 | /* time_t variant for representing time zone data, independent of |
30 | time_t. */ | |
31 | typedef __int64_t internal_time_t; | |
32 | ||
8632b240 | 33 | /* Defined in mktime.c. */ |
ab26a24a | 34 | extern const unsigned short int __mon_yday[2][13] attribute_hidden; |
8632b240 UD |
35 | |
36 | /* Defined in localtime.c. */ | |
418f1701 | 37 | extern struct tm _tmbuf attribute_hidden; |
8632b240 UD |
38 | |
39 | /* Defined in tzset.c. */ | |
b0f56784 | 40 | extern char *__tzstring (const char *string) attribute_hidden; |
8632b240 | 41 | |
418f1701 | 42 | extern int __use_tzfile attribute_hidden; |
8632b240 | 43 | |
fe559c5e | 44 | extern void __tzfile_read (const char *file, size_t extra, |
b0f56784 | 45 | char **extrap) attribute_hidden; |
fc79706a | 46 | extern void __tzfile_compute (internal_time_t timer, int use_localtime, |
38e68573 | 47 | long int *leap_correct, int *leap_hit, |
b0f56784 | 48 | struct tm *tp) attribute_hidden; |
fe559c5e | 49 | extern void __tzfile_default (const char *std, const char *dst, |
b0f56784 L |
50 | long int stdoff, long int dstoff) |
51 | attribute_hidden; | |
52 | extern void __tzset_parse_tz (const char *tz) attribute_hidden; | |
fa76dde2 | 53 | extern void __tz_compute (time_t timer, struct tm *tm, int use_localtime) |
8bcdb7e0 | 54 | __THROW attribute_hidden; |
8632b240 | 55 | |
bdbf022d UD |
56 | /* Subroutine of `mktime'. Return the `time_t' representation of TP and |
57 | normalize TP, given that a `struct tm *' maps to a `time_t' as performed | |
e1080e7e | 58 | by FUNC. Record next guess for localtime-gmtime offset in *OFFSET. */ |
fe559c5e UD |
59 | extern time_t __mktime_internal (struct tm *__tp, |
60 | struct tm *(*__func) (const time_t *, | |
61 | struct tm *), | |
e1080e7e | 62 | long int *__offset) attribute_hidden; |
a784e502 | 63 | extern struct tm *__localtime_r (const time_t *__timer, |
dff07c4b | 64 | struct tm *__tp) attribute_hidden; |
bdbf022d | 65 | |
a784e502 | 66 | extern struct tm *__gmtime_r (const time_t *__restrict __timer, |
c19559b0 | 67 | struct tm *__restrict __tp); |
230491f0 | 68 | libc_hidden_proto (__gmtime_r) |
811ba236 | 69 | |
bdbf022d UD |
70 | /* Compute the `struct tm' representation of *T, |
71 | offset OFFSET seconds east of UTC, | |
72 | and store year, yday, mon, mday, wday, hour, min, sec into *TP. | |
73 | Return nonzero if successful. */ | |
a784e502 | 74 | extern int __offtime (const time_t *__timer, |
fe559c5e | 75 | long int __offset, |
b0f56784 | 76 | struct tm *__tp) attribute_hidden; |
bdbf022d | 77 | |
b0f56784 L |
78 | extern char *__asctime_r (const struct tm *__tp, char *__buf) |
79 | attribute_hidden; | |
80 | extern void __tzset (void) attribute_hidden; | |
bdbf022d | 81 | |
8632b240 | 82 | /* Prototype for the internal function to get information based on TZ. */ |
b0f56784 L |
83 | extern struct tm *__tz_convert (const time_t *timer, int use_localtime, |
84 | struct tm *tp) attribute_hidden; | |
8632b240 | 85 | |
a784e502 | 86 | extern int __nanosleep (const struct timespec *__requested_time, |
c19559b0 | 87 | struct timespec *__remaining); |
fa872e1b | 88 | hidden_proto (__nanosleep) |
b0f56784 L |
89 | extern int __getdate_r (const char *__string, struct tm *__resbufp) |
90 | attribute_hidden; | |
25b3dd49 UD |
91 | |
92 | ||
93 | /* Determine CLK_TCK value. */ | |
b0f56784 | 94 | extern int __getclktck (void) attribute_hidden; |
4165d44d UD |
95 | |
96 | ||
ccadf7b5 | 97 | /* strptime support. */ |
ccadf7b5 | 98 | extern char * __strptime_internal (const char *rp, const char *fmt, |
fa69dc9c | 99 | struct tm *tm, void *statep, |
8bcdb7e0 | 100 | locale_t locparam) attribute_hidden; |
ccadf7b5 | 101 | |
abca9f7f | 102 | extern double __difftime (time_t time1, time_t time0); |
ccadf7b5 UD |
103 | |
104 | ||
4165d44d UD |
105 | /* Use in the clock_* functions. Size of the field representing the |
106 | actual clock ID. */ | |
31341567 | 107 | #define CLOCK_IDFIELD_SIZE 3 |
7735afa2 | 108 | |
bdbf022d | 109 | #endif |
6796bc80 | 110 | #endif |