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
, size_t extra
,
27 extern int __tzfile_compute
__P ((time_t timer
, int use_localtime
,
28 long int *leap_correct
, int *leap_hit
,
30 extern void __tzfile_default
__P ((const char *std
, const char *dst
,
31 long int stdoff
, long int dstoff
));
33 /* Subroutine of `mktime'. Return the `time_t' representation of TP and
34 normalize TP, given that a `struct tm *' maps to a `time_t' as performed
35 by FUNC. Keep track of next guess for time_t offset in *OFFSET. */
36 extern time_t __mktime_internal
__P ((struct tm
*__tp
,
37 struct tm
*(*__func
) (const time_t *,
40 extern struct tm
*__localtime_r
__P ((__const
time_t *__timer
,
43 /* Compute the `struct tm' representation of *T,
44 offset OFFSET seconds east of UTC,
45 and store year, yday, mon, mday, wday, hour, min, sec into *TP.
46 Return nonzero if successful. */
47 extern int __offtime
__P ((__const
time_t *__timer
,
51 extern char *__asctime_r
__P ((__const
struct tm
*__tp
, char *__buf
));
52 extern void __tzset
__P ((void));
54 /* Prototype for the internal function to get information based on TZ. */
55 extern struct tm
*__tz_convert
__P ((const time_t *timer
, int use_localtime
, struct tm
*tp
));
57 /* Return the maximum length of a timezone name.
58 This is what `sysconf (_SC_TZNAME_MAX)' does. */
59 extern long int __tzname_max
__P ((void));
61 extern int __nanosleep
__P ((__const
struct timespec
*__requested_time
,
62 struct timespec
*__remaining
));
63 extern int __getdate_r
__P ((__const
char *__string
, struct tm
*__resbufp
));