Update.
[glibc.git] / include / time.h
blobf81760e99c4e2d0dd1b9f1cc9b932449f3e85bbd
1 #ifndef _TIME_H
2 #if defined __need_time_t || defined __need_clock_t || defined __need_timespec
3 # include <time/time.h>
4 #else
5 # include <time/time.h>
7 /* Now define the internal interfaces. */
8 struct tm;
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 (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 (const char *file, size_t extra,
26 char **extrap);
27 extern int __tzfile_compute (time_t timer, int use_localtime,
28 long int *leap_correct, int *leap_hit,
29 struct tm *tp);
30 extern void __tzfile_default (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 (struct tm *__tp,
37 struct tm *(*__func) (const time_t *,
38 struct tm *),
39 time_t *__offset);
40 extern struct tm *__localtime_r (__const time_t *__timer,
41 struct tm *__tp);
43 extern struct tm *__gmtime_r (__const time_t *__restrict __timer,
44 struct tm *__restrict __tp);
46 /* Compute the `struct tm' representation of *T,
47 offset OFFSET seconds east of UTC,
48 and store year, yday, mon, mday, wday, hour, min, sec into *TP.
49 Return nonzero if successful. */
50 extern int __offtime (__const time_t *__timer,
51 long int __offset,
52 struct tm *__tp);
54 extern char *__asctime_r (__const struct tm *__tp, char *__buf);
55 extern void __tzset (void);
57 /* Prototype for the internal function to get information based on TZ. */
58 extern struct tm *__tz_convert (const time_t *timer, int use_localtime, struct tm *tp);
60 /* Return the maximum length of a timezone name.
61 This is what `sysconf (_SC_TZNAME_MAX)' does. */
62 extern long int __tzname_max (void);
64 extern int __nanosleep (__const struct timespec *__requested_time,
65 struct timespec *__remaining);
66 extern int __getdate_r (__const char *__string, struct tm *__resbufp);
69 /* Determine CLK_TCK value. */
70 extern int __getclktck (void);
71 #endif
72 #endif