diff options
Diffstat (limited to 'time/time.h')
-rw-r--r-- | time/time.h | 146 |
1 files changed, 146 insertions, 0 deletions
diff --git a/time/time.h b/time/time.h index 3bf206be0b..ac11ce7db4 100644 --- a/time/time.h +++ b/time/time.h @@ -74,13 +74,37 @@ extern clock_t clock (void) __THROW; /* Return the current time and put it in *TIMER if TIMER is not NULL. */ extern time_t time (time_t *__timer) __THROW; +#ifdef __USE_TIME_BITS64 +# if defined(__REDIRECT_NTH) +extern time_t __REDIRECT_NTH (time, (time_t *__timer), __time64); +# else +# define time __time64 +# endif +#endif + /* Return the difference between TIME1 and TIME0. */ extern double difftime (time_t __time1, time_t __time0) __THROW __attribute__ ((__const__)); +#ifdef __USE_TIME_BITS64 +# if defined(__REDIRECT_NTH) +extern double __REDIRECT_NTH (difftime, (time_t __time1, time_t __time0), + __difftime64); +# else +# define difftime __difftime64 +# endif +#endif + /* Return the `time_t' representation of TP and normalize TP. */ extern time_t mktime (struct tm *__tp) __THROW; +#ifdef __USE_TIME_BITS64 +# if defined(__REDIRECT_NTH) +extern time_t __REDIRECT_NTH (mktime, (struct tm *__tp), __mktime64); +# else +# define mktime __mktime64 +# endif +#endif /* Format TP into S according to FORMAT. Write no more than MAXSIZE characters and return the number @@ -118,6 +142,14 @@ extern char *strptime_l (const char *__restrict __s, in Universal Coordinated Time (aka Greenwich Mean Time). */ extern struct tm *gmtime (const time_t *__timer) __THROW; +#ifdef __USE_TIME_BITS64 +# if defined(__REDIRECT_NTH) +extern struct tm*__REDIRECT_NTH (gmtime, (const time_t *__timer), __gmtime64); +# else +# define gmtime __gmtime64 +# endif +#endif + /* Return the `struct tm' representation of *TIMER in the local timezone. */ extern struct tm *localtime (const time_t *__timer) __THROW; @@ -128,6 +160,16 @@ extern struct tm *localtime (const time_t *__timer) __THROW; extern struct tm *gmtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) __THROW; +#ifdef __USE_TIME_BITS64 +# if defined(__REDIRECT_NTH) +extern struct tm*__REDIRECT_NTH (gmtime_r, (const time_t *__restrict __timer, + struct tm *__restrict __tp), + __gmtime64_r); +# else +# define gmtime_r __gmtime64_r +# endif +#endif + /* Return the `struct tm' representation of *TIMER in local time, using *TP to store the result. */ extern struct tm *localtime_r (const time_t *__restrict __timer, @@ -141,6 +183,14 @@ extern char *asctime (const struct tm *__tp) __THROW; /* Equivalent to `asctime (localtime (timer))'. */ extern char *ctime (const time_t *__timer) __THROW; +#ifdef __USE_TIME_BITS64 +# if defined(__REDIRECT_NTH) +extern char *__REDIRECT_NTH (ctime, (const time_t *__timer), __ctime64); +# else +# define ctime __ctime64 +# endif +#endif + #if defined __USE_POSIX || __GLIBC_USE (ISOC2X) /* Reentrant versions of the above functions. */ @@ -152,6 +202,16 @@ extern char *asctime_r (const struct tm *__restrict __tp, /* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */ extern char *ctime_r (const time_t *__restrict __timer, char *__restrict __buf) __THROW; + +#ifdef __USE_TIME_BITS64 +# if defined(__REDIRECT_NTH) +extern char *__REDIRECT_NTH (ctime_r, (const time_t *__restrict __timer, + char *__restrict __buf), __ctime64_r); +# else +# define ctime_r __ctime64_r +# endif +#endif + #endif /* POSIX || C2X */ @@ -189,6 +249,14 @@ extern long int timezone; /* Like `mktime', but for TP represents Universal Time, not local time. */ extern time_t timegm (struct tm *__tp) __THROW; +#ifdef __USE_TIME_BITS64 +# if defined(__REDIRECT_NTH) +extern time_t __REDIRECT_NTH (timegm, (struct tm *__tp), __timegm64); +# else +# define timegm __timegm64 +# endif +#endif + /* Another name for `mktime'. */ extern time_t timelocal (struct tm *__tp) __THROW; @@ -205,17 +273,54 @@ extern int dysize (int __year) __THROW __attribute__ ((__const__)); extern int nanosleep (const struct timespec *__requested_time, struct timespec *__remaining); +# ifdef __USE_TIME_BITS64 +# if defined(__REDIRECT) +extern int __REDIRECT (nanosleep, (const struct timespec *__requested_time, + struct timespec *__remaining), + __nanosleep64); +# else +# define nanosleep __nanosleep64 +# endif +# endif /* Get resolution of clock CLOCK_ID. */ extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __THROW; +#ifdef __USE_TIME_BITS64 +# if defined(__REDIRECT_NTH) +extern int __REDIRECT_NTH (clock_getres, (clockid_t __clock_id, + struct timespec *__res), + __clock_getres64); +# else +# define clock_getres __clock_getres64 +# endif +#endif + /* Get current value of clock CLOCK_ID and store it in TP. */ extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW; +#ifdef __USE_TIME_BITS64 +# if defined(__REDIRECT_NTH) +extern int __REDIRECT_NTH (clock_gettime, (clockid_t __clock_id, struct + timespec *__tp), __clock_gettime64); +# else +# define clock_gettime __clock_gettime64 +# endif +#endif + /* Set clock CLOCK_ID to value TP. */ extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp) __THROW; +#ifdef __USE_TIME_BITS64 +# if defined(__REDIRECT_NTH) +extern int __REDIRECT_NTH (clock_settime, (clockid_t __clock_id, const struct + timespec *__tp), __clock_settime64); +# else +# define clock_settime __clock_settime64 +# endif +#endif + # ifdef __USE_XOPEN2K /* High-resolution sleep with the specified clock. @@ -225,6 +330,17 @@ extern int clock_nanosleep (clockid_t __clock_id, int __flags, const struct timespec *__req, struct timespec *__rem); +#ifdef __USE_TIME_BITS64 +# if defined(__REDIRECT) +extern int __REDIRECT (clock_nanosleep, (clockid_t __clock_id, int __flags, + const struct timespec *__req, + struct timespec *__rem), + __clock_nanosleep_time64); +# else +# define clock_nanosleep __clock_nanosleep_time64 +# endif +#endif + /* Return clock ID for CPU-time clock. */ extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW; # endif @@ -243,10 +359,31 @@ extern int timer_settime (timer_t __timerid, int __flags, const struct itimerspec *__restrict __value, struct itimerspec *__restrict __ovalue) __THROW; +#ifdef __USE_TIME_BITS64 +# if defined(__REDIRECT_NTH) +extern int __REDIRECT_NTH (timer_settime, (timer_t __timerid, int __flags, + const struct itimerspec *__restrict __value, + struct itimerspec *__restrict __ovalue), + __timer_settime64); +# else +# define timer_settime __timer_settime64 +# endif +#endif + /* Get current value of timer TIMERID and store it in VALUE. */ extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) __THROW; +#ifdef __USE_TIME_BITS64 +# if defined(__REDIRECT_NTH) +extern int __REDIRECT_NTH (timer_gettime, (timer_t __timerid, + struct itimerspec *__value), + __timer_gettime64) __nonnull ((1)); +# else +# define timer_gettime __timer_gettime64 +# endif +#endif + /* Get expiration overrun for timer TIMERID. */ extern int timer_getoverrun (timer_t __timerid) __THROW; #endif @@ -256,6 +393,15 @@ extern int timer_getoverrun (timer_t __timerid) __THROW; /* Set TS to calendar time based in time base BASE. */ extern int timespec_get (struct timespec *__ts, int __base) __THROW __nonnull ((1)); + +# ifdef __USE_TIME_BITS64 +# if defined(__REDIRECT_NTH) +extern int __REDIRECT_NTH (timespec_get, (struct timespec *__ts, int __base), + __timespec_get64); +# else +# define timespec_get __timespec_get64 +# endif +# endif #endif |