2 #if defined __need_time_t || defined __need_clock_t || defined __need_timespec
3 # include <time/time.h>
5 # include <time/time.h>
7 /* Now define the internal interfaces. */
10 /* Defined in mktime.c. */
11 extern const unsigned short int __mon_yday
[2][13];
13 /* Defined in localtime.c. */
14 extern struct tm _tmbuf
;
16 /* Defined in tzset.c. */
17 extern char *__tzstring
__P ((const char *string
));
19 /* Defined in tzset.c. */
20 extern size_t __tzname_cur_max
;
23 extern int __use_tzfile
;
25 extern void __tzfile_read
__P ((const char *file
));extern int __tzfile_compute
__P ((time_t timer
, int use_localtime
,
26 long int *leap_correct
, int *leap_hit
,
28 extern void __tzfile_default
__P ((const char *std
, const char *dst
,
29 long int stdoff
, long int dstoff
));
31 /* Subroutine of `mktime'. Return the `time_t' representation of TP and
32 normalize TP, given that a `struct tm *' maps to a `time_t' as performed
33 by FUNC. Keep track of next guess for time_t offset in *OFFSET. */
34 extern time_t __mktime_internal
__P ((struct tm
*__tp
,
35 struct tm
*(*__func
) (const time_t *,
38 extern struct tm
*__localtime_r
__P ((__const
time_t *__timer
,
41 /* Compute the `struct tm' representation of *T,
42 offset OFFSET seconds east of UTC,
43 and store year, yday, mon, mday, wday, hour, min, sec into *TP.
44 Return nonzero if successful. */
45 extern int __offtime
__P ((__const
time_t *__timer
,
49 extern char *__asctime_r
__P ((__const
struct tm
*__tp
, char *__buf
));
50 extern void __tzset
__P ((void));
52 /* Prototype for the internal function to get information based on TZ. */
53 extern struct tm
*__tz_convert
__P ((const time_t *timer
, int use_localtime
, struct tm
*tp
));
55 /* Return the maximum length of a timezone name.
56 This is what `sysconf (_SC_TZNAME_MAX)' does. */
57 extern long int __tzname_max
__P ((void));
59 extern int __nanosleep
__P ((__const
struct timespec
*__requested_time
,
60 struct timespec
*__remaining
));
61 extern int __getdate_r
__P ((__const
char *__string
, struct tm
*__resbufp
));