Define macro DO_ELF_MACHINE_REL_RELATIVE for 'elf_machine_rel_relative'. (elf_dynamic...
[glibc.git] / include / time.h
blobb57b7be1b48b3cf9b083914341d6e6767279edb9
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 extern __typeof (strftime_l) __strftime_l;
8 extern __typeof (strptime_l) __strptime_l;
10 libc_hidden_proto (time)
11 libc_hidden_proto (asctime)
12 libc_hidden_proto (mktime)
13 libc_hidden_proto (timelocal)
14 libc_hidden_proto (localtime)
15 libc_hidden_proto (strftime)
16 libc_hidden_proto (strptime)
18 /* Now define the internal interfaces. */
19 struct tm;
21 /* Defined in mktime.c. */
22 extern const unsigned short int __mon_yday[2][13] attribute_hidden;
24 /* Defined in localtime.c. */
25 extern struct tm _tmbuf attribute_hidden;
27 /* Defined in tzset.c. */
28 extern char *__tzstring (const char *string);
30 /* Defined in tzset.c. */
31 extern size_t __tzname_cur_max attribute_hidden;
34 extern int __use_tzfile attribute_hidden;
36 extern void __tzfile_read (const char *file, size_t extra,
37 char **extrap);
38 extern int __tzfile_compute (time_t timer, int use_localtime,
39 long int *leap_correct, int *leap_hit,
40 struct tm *tp);
41 extern void __tzfile_default (const char *std, const char *dst,
42 long int stdoff, long int dstoff);
44 /* Subroutine of `mktime'. Return the `time_t' representation of TP and
45 normalize TP, given that a `struct tm *' maps to a `time_t' as performed
46 by FUNC. Keep track of next guess for time_t offset in *OFFSET. */
47 extern time_t __mktime_internal (struct tm *__tp,
48 struct tm *(*__func) (const time_t *,
49 struct tm *),
50 time_t *__offset);
51 extern struct tm *__localtime_r (__const time_t *__timer,
52 struct tm *__tp) attribute_hidden;
54 extern struct tm *__gmtime_r (__const time_t *__restrict __timer,
55 struct tm *__restrict __tp);
56 libc_hidden_proto (__gmtime_r)
58 /* Compute the `struct tm' representation of *T,
59 offset OFFSET seconds east of UTC,
60 and store year, yday, mon, mday, wday, hour, min, sec into *TP.
61 Return nonzero if successful. */
62 extern int __offtime (__const time_t *__timer,
63 long int __offset,
64 struct tm *__tp);
66 extern char *__asctime_r (__const struct tm *__tp, char *__buf);
67 extern void __tzset (void);
69 /* Prototype for the internal function to get information based on TZ. */
70 extern struct tm *__tz_convert (const time_t *timer, int use_localtime, struct tm *tp);
72 /* Return the maximum length of a timezone name.
73 This is what `sysconf (_SC_TZNAME_MAX)' does. */
74 extern long int __tzname_max (void);
76 extern int __nanosleep (__const struct timespec *__requested_time,
77 struct timespec *__remaining);
78 extern int __getdate_r (__const char *__string, struct tm *__resbufp);
81 /* Determine CLK_TCK value. */
82 extern int __getclktck (void);
83 #endif
84 #endif