]> git.ipfire.org Git - thirdparty/glibc.git/blame - include/time.h
Add *-ldbl.h headers to include/bits
[thirdparty/glibc.git] / include / time.h
CommitLineData
6796bc80 1#ifndef _TIME_H
05b68e14
ZW
2#include <time/time.h>
3
4#ifndef _ISOMAC
f0be25b6 5# include <bits/types/locale_t.h>
bdbf022d 6
da4cfe38 7extern __typeof (strftime_l) __strftime_l;
ee2a5ae8 8libc_hidden_proto (__strftime_l)
da4cfe38
RM
9extern __typeof (strptime_l) __strptime_l;
10
c5598d47
RM
11libc_hidden_proto (time)
12libc_hidden_proto (asctime)
13libc_hidden_proto (mktime)
14libc_hidden_proto (timelocal)
15libc_hidden_proto (localtime)
16libc_hidden_proto (strftime)
17libc_hidden_proto (strptime)
18
6e6249d0
RM
19extern __typeof (clock_getres) __clock_getres;
20extern __typeof (clock_gettime) __clock_gettime;
89fb6835 21libc_hidden_proto (__clock_gettime)
6e6249d0
RM
22extern __typeof (clock_settime) __clock_settime;
23extern __typeof (clock_nanosleep) __clock_nanosleep;
24extern __typeof (clock_getcpuclockid) __clock_getcpuclockid;
a9564ae9 25
bdbf022d
UD
26/* Now define the internal interfaces. */
27struct tm;
28
8632b240 29/* Defined in mktime.c. */
ab26a24a 30extern const unsigned short int __mon_yday[2][13] attribute_hidden;
8632b240
UD
31
32/* Defined in localtime.c. */
418f1701 33extern struct tm _tmbuf attribute_hidden;
8632b240
UD
34
35/* Defined in tzset.c. */
b0f56784 36extern char *__tzstring (const char *string) attribute_hidden;
8632b240 37
418f1701 38extern int __use_tzfile attribute_hidden;
8632b240 39
fe559c5e 40extern void __tzfile_read (const char *file, size_t extra,
b0f56784 41 char **extrap) attribute_hidden;
d51f99ce 42extern void __tzfile_compute (__time64_t timer, int use_localtime,
38e68573 43 long int *leap_correct, int *leap_hit,
b0f56784 44 struct tm *tp) attribute_hidden;
fe559c5e 45extern void __tzfile_default (const char *std, const char *dst,
b0f56784
L
46 long int stdoff, long int dstoff)
47 attribute_hidden;
48extern void __tzset_parse_tz (const char *tz) attribute_hidden;
72b8692d 49extern void __tz_compute (__time64_t timer, struct tm *tm, int use_localtime)
8bcdb7e0 50 __THROW attribute_hidden;
8632b240 51
bdbf022d
UD
52/* Subroutine of `mktime'. Return the `time_t' representation of TP and
53 normalize TP, given that a `struct tm *' maps to a `time_t' as performed
e1080e7e 54 by FUNC. Record next guess for localtime-gmtime offset in *OFFSET. */
fe559c5e
UD
55extern time_t __mktime_internal (struct tm *__tp,
56 struct tm *(*__func) (const time_t *,
57 struct tm *),
e1080e7e 58 long int *__offset) attribute_hidden;
a784e502 59extern struct tm *__localtime_r (const time_t *__timer,
dff07c4b 60 struct tm *__tp) attribute_hidden;
bdbf022d 61
a784e502 62extern struct tm *__gmtime_r (const time_t *__restrict __timer,
c19559b0 63 struct tm *__restrict __tp);
230491f0 64libc_hidden_proto (__gmtime_r)
811ba236 65
72b8692d 66/* Compute the `struct tm' representation of T,
bdbf022d
UD
67 offset OFFSET seconds east of UTC,
68 and store year, yday, mon, mday, wday, hour, min, sec into *TP.
69 Return nonzero if successful. */
72b8692d 70extern int __offtime (__time64_t __timer,
fe559c5e 71 long int __offset,
b0f56784 72 struct tm *__tp) attribute_hidden;
bdbf022d 73
b0f56784
L
74extern char *__asctime_r (const struct tm *__tp, char *__buf)
75 attribute_hidden;
76extern void __tzset (void) attribute_hidden;
bdbf022d 77
8632b240 78/* Prototype for the internal function to get information based on TZ. */
72b8692d 79extern struct tm *__tz_convert (__time64_t timer, int use_localtime,
b0f56784 80 struct tm *tp) attribute_hidden;
8632b240 81
a784e502 82extern int __nanosleep (const struct timespec *__requested_time,
c19559b0 83 struct timespec *__remaining);
fa872e1b 84hidden_proto (__nanosleep)
b0f56784
L
85extern int __getdate_r (const char *__string, struct tm *__resbufp)
86 attribute_hidden;
25b3dd49
UD
87
88
89/* Determine CLK_TCK value. */
b0f56784 90extern int __getclktck (void) attribute_hidden;
4165d44d
UD
91
92
ccadf7b5 93/* strptime support. */
ccadf7b5 94extern char * __strptime_internal (const char *rp, const char *fmt,
fa69dc9c 95 struct tm *tm, void *statep,
8bcdb7e0 96 locale_t locparam) attribute_hidden;
ccadf7b5 97
abca9f7f 98extern double __difftime (time_t time1, time_t time0);
ccadf7b5
UD
99
100
4165d44d
UD
101/* Use in the clock_* functions. Size of the field representing the
102 actual clock ID. */
31341567 103#define CLOCK_IDFIELD_SIZE 3
7735afa2 104
bdbf022d 105#endif
6796bc80 106#endif