5 # include <bits/types/locale_t.h>
7 extern __typeof (strftime_l
) __strftime_l
;
8 libc_hidden_proto (__strftime_l
)
9 extern __typeof (strptime_l
) __strptime_l
;
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
)
19 extern __typeof (clock_getres
) __clock_getres
;
20 extern __typeof (clock_gettime
) __clock_gettime
;
21 libc_hidden_proto (__clock_gettime
)
22 extern __typeof (clock_settime
) __clock_settime
;
23 extern __typeof (clock_nanosleep
) __clock_nanosleep
;
24 extern __typeof (clock_getcpuclockid
) __clock_getcpuclockid
;
26 /* Now define the internal interfaces. */
29 /* Defined in mktime.c. */
30 extern const unsigned short int __mon_yday
[2][13] attribute_hidden
;
32 /* Defined in localtime.c. */
33 extern struct tm _tmbuf attribute_hidden
;
35 /* Defined in tzset.c. */
36 extern char *__tzstring (const char *string
);
38 extern int __use_tzfile attribute_hidden
;
40 extern void __tzfile_read (const char *file
, size_t extra
,
42 extern void __tzfile_compute (time_t timer
, int use_localtime
,
43 long int *leap_correct
, int *leap_hit
,
45 extern void __tzfile_default (const char *std
, const char *dst
,
46 long int stdoff
, long int dstoff
);
47 extern void __tzset_parse_tz (const char *tz
);
48 extern void __tz_compute (time_t timer
, struct tm
*tm
, int use_localtime
)
51 /* Subroutine of `mktime'. Return the `time_t' representation of TP and
52 normalize TP, given that a `struct tm *' maps to a `time_t' as performed
53 by FUNC. Keep track of next guess for time_t offset in *OFFSET. */
54 extern time_t __mktime_internal (struct tm
*__tp
,
55 struct tm
*(*__func
) (const time_t *,
58 extern struct tm
*__localtime_r (const time_t *__timer
,
59 struct tm
*__tp
) attribute_hidden
;
61 extern struct tm
*__gmtime_r (const time_t *__restrict __timer
,
62 struct tm
*__restrict __tp
);
63 libc_hidden_proto (__gmtime_r
)
65 /* Compute the `struct tm' representation of *T,
66 offset OFFSET seconds east of UTC,
67 and store year, yday, mon, mday, wday, hour, min, sec into *TP.
68 Return nonzero if successful. */
69 extern int __offtime (const time_t *__timer
,
73 extern char *__asctime_r (const struct tm
*__tp
, char *__buf
);
74 extern void __tzset (void);
76 /* Prototype for the internal function to get information based on TZ. */
77 extern struct tm
*__tz_convert (const time_t *timer
, int use_localtime
, struct tm
*tp
);
79 extern int __nanosleep (const struct timespec
*__requested_time
,
80 struct timespec
*__remaining
);
81 hidden_proto (__nanosleep
)
82 extern int __getdate_r (const char *__string
, struct tm
*__resbufp
);
85 /* Determine CLK_TCK value. */
86 extern int __getclktck (void);
89 /* strptime support. */
90 extern char * __strptime_internal (const char *rp
, const char *fmt
,
91 struct tm
*tm
, void *statep
,
94 extern double __difftime (time_t time1
, time_t time0
);
97 /* Use in the clock_* functions. Size of the field representing the
99 #define CLOCK_IDFIELD_SIZE 3