Fix SH4 register-dump.h for soft-float.
[glibc.git] / include / time.h
blob684ceb812fa8228c6759ee2588afd255fde55d5e
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 /* Defined in tzset.c. */
41 extern size_t __tzname_cur_max attribute_hidden;
44 extern int __use_tzfile attribute_hidden;
46 extern void __tzfile_read (const char *file, size_t extra,
47 char **extrap);
48 extern void __tzfile_compute (time_t timer, int use_localtime,
49 long int *leap_correct, int *leap_hit,
50 struct tm *tp);
51 extern void __tzfile_default (const char *std, const char *dst,
52 long int stdoff, long int dstoff);
53 extern void __tzset_parse_tz (const char *tz);
54 extern void __tz_compute (time_t timer, struct tm *tm, int use_localtime)
55 __THROW internal_function;
57 /* Subroutine of `mktime'. Return the `time_t' representation of TP and
58 normalize TP, given that a `struct tm *' maps to a `time_t' as performed
59 by FUNC. Keep track of next guess for time_t offset in *OFFSET. */
60 extern time_t __mktime_internal (struct tm *__tp,
61 struct tm *(*__func) (const time_t *,
62 struct tm *),
63 time_t *__offset);
64 extern struct tm *__localtime_r (const time_t *__timer,
65 struct tm *__tp) attribute_hidden;
67 extern struct tm *__gmtime_r (const time_t *__restrict __timer,
68 struct tm *__restrict __tp);
69 libc_hidden_proto (__gmtime_r)
71 /* Compute the `struct tm' representation of *T,
72 offset OFFSET seconds east of UTC,
73 and store year, yday, mon, mday, wday, hour, min, sec into *TP.
74 Return nonzero if successful. */
75 extern int __offtime (const time_t *__timer,
76 long int __offset,
77 struct tm *__tp);
79 extern char *__asctime_r (const struct tm *__tp, char *__buf);
80 extern void __tzset (void);
82 /* Prototype for the internal function to get information based on TZ. */
83 extern struct tm *__tz_convert (const time_t *timer, int use_localtime, struct tm *tp);
85 /* Return the maximum length of a timezone name.
86 This is what `sysconf (_SC_TZNAME_MAX)' does. */
87 extern long int __tzname_max (void);
89 extern int __nanosleep (const struct timespec *__requested_time,
90 struct timespec *__remaining);
91 libc_hidden_proto (__nanosleep)
92 extern int __nanosleep_nocancel (const struct timespec *__requested_time,
93 struct timespec *__remaining)
94 attribute_hidden;
95 extern int __getdate_r (const char *__string, struct tm *__resbufp);
98 /* Determine CLK_TCK value. */
99 extern int __getclktck (void);
102 /* strptime support. */
103 extern char * __strptime_internal (const char *rp, const char *fmt,
104 struct tm *tm, void *statep,
105 __locale_t locparam)
106 internal_function;
108 extern double __difftime (time_t time1, time_t time0);
111 /* Use in the clock_* functions. Size of the field representing the
112 actual clock ID. */
113 #define CLOCK_IDFIELD_SIZE 3
115 __END_DECLS
117 #endif
118 #endif