S390: Move utf8-utf32-z9.c to multiarch folder and use s390_libc_ifunc_expr macro.
[glibc.git] / include / time.h
blob6badf0e5578b0c23a0b4d154aff7a50ea01affa3
1 #ifndef _TIME_H
2 #include <time/time.h>
4 #ifndef _ISOMAC
5 # include <xlocale.h>
7 __BEGIN_DECLS
9 extern __typeof (strftime_l) __strftime_l;
10 libc_hidden_proto (__strftime_l)
11 extern __typeof (strptime_l) __strptime_l;
13 libc_hidden_proto (time)
14 libc_hidden_proto (asctime)
15 libc_hidden_proto (mktime)
16 libc_hidden_proto (timelocal)
17 libc_hidden_proto (localtime)
18 libc_hidden_proto (strftime)
19 libc_hidden_proto (strptime)
21 extern __typeof (clock_getres) __clock_getres;
22 extern __typeof (clock_gettime) __clock_gettime;
23 libc_hidden_proto (__clock_gettime)
24 extern __typeof (clock_settime) __clock_settime;
25 extern __typeof (clock_nanosleep) __clock_nanosleep;
26 extern __typeof (clock_getcpuclockid) __clock_getcpuclockid;
28 /* Now define the internal interfaces. */
29 struct tm;
31 /* Defined in mktime.c. */
32 extern const unsigned short int __mon_yday[2][13] attribute_hidden;
34 /* Defined in localtime.c. */
35 extern struct tm _tmbuf attribute_hidden;
37 /* Defined in tzset.c. */
38 extern char *__tzstring (const char *string);
40 extern int __use_tzfile attribute_hidden;
42 extern void __tzfile_read (const char *file, size_t extra,
43 char **extrap);
44 extern void __tzfile_compute (time_t timer, int use_localtime,
45 long int *leap_correct, int *leap_hit,
46 struct tm *tp);
47 extern void __tzfile_default (const char *std, const char *dst,
48 long int stdoff, long int dstoff);
49 extern void __tzset_parse_tz (const char *tz);
50 extern void __tz_compute (time_t timer, struct tm *tm, int use_localtime)
51 __THROW internal_function;
53 /* Subroutine of `mktime'. Return the `time_t' representation of TP and
54 normalize TP, given that a `struct tm *' maps to a `time_t' as performed
55 by FUNC. Keep track of next guess for time_t offset in *OFFSET. */
56 extern time_t __mktime_internal (struct tm *__tp,
57 struct tm *(*__func) (const time_t *,
58 struct tm *),
59 time_t *__offset);
60 extern struct tm *__localtime_r (const time_t *__timer,
61 struct tm *__tp) attribute_hidden;
63 extern struct tm *__gmtime_r (const time_t *__restrict __timer,
64 struct tm *__restrict __tp);
65 libc_hidden_proto (__gmtime_r)
67 /* Compute the `struct tm' representation of *T,
68 offset OFFSET seconds east of UTC,
69 and store year, yday, mon, mday, wday, hour, min, sec into *TP.
70 Return nonzero if successful. */
71 extern int __offtime (const time_t *__timer,
72 long int __offset,
73 struct tm *__tp);
75 extern char *__asctime_r (const struct tm *__tp, char *__buf);
76 extern void __tzset (void);
78 /* Prototype for the internal function to get information based on TZ. */
79 extern struct tm *__tz_convert (const time_t *timer, int use_localtime, struct tm *tp);
81 extern int __nanosleep (const struct timespec *__requested_time,
82 struct timespec *__remaining);
83 libc_hidden_proto (__nanosleep)
84 extern int __nanosleep_nocancel (const struct timespec *__requested_time,
85 struct timespec *__remaining)
86 attribute_hidden;
87 extern int __getdate_r (const char *__string, struct tm *__resbufp);
90 /* Determine CLK_TCK value. */
91 extern int __getclktck (void);
94 /* strptime support. */
95 extern char * __strptime_internal (const char *rp, const char *fmt,
96 struct tm *tm, void *statep,
97 __locale_t locparam)
98 internal_function;
100 extern double __difftime (time_t time1, time_t time0);
103 /* Use in the clock_* functions. Size of the field representing the
104 actual clock ID. */
105 #define CLOCK_IDFIELD_SIZE 3
107 __END_DECLS
109 #endif
110 #endif