diff --git a/include/aio.h b/include/aio.h index 19bc28a9b19e0d5c3aa90fcf1aa8a36745dcf259..453c41b7489f3d2f27a545db8a9ab072e9ea75d0 100644 --- a/include/aio.h +++ b/include/aio.h @@ -62,6 +62,10 @@ int lio_listio(int, struct aiocb *__restrict const *__restrict, int, struct sige #define off64_t off_t #endif +#if _REDIR_TIME64 +__REDIR(aio_suspend, __aio_suspend_time64); +#endif + #ifdef __cplusplus } #endif diff --git a/include/features.h b/include/features.h index f4d651efcd0a39b021fec66cdf1469b941654a5a..85cfb72a0d427de18f5732c7fd320310cbe8843d 100644 --- a/include/features.h +++ b/include/features.h @@ -35,4 +35,6 @@ #define _Noreturn #endif +#define __REDIR(x,y) __typeof__(x) x __asm__(#y) + #endif diff --git a/include/mqueue.h b/include/mqueue.h index f5cbe79656b3ab2fdcfc18c91229649e77a2c82e..0c807ea0cbb26e6a5d46df5cdb0be6bb8c84ba42 100644 --- a/include/mqueue.h +++ b/include/mqueue.h @@ -30,6 +30,11 @@ ssize_t mq_timedreceive(mqd_t, char *__restrict, size_t, unsigned *__restrict, c int mq_timedsend(mqd_t, const char *, size_t, unsigned, const struct timespec *); int mq_unlink(const char *); +#if _REDIR_TIME64 +__REDIR(mq_timedreceive, __mq_timedreceive_time64); +__REDIR(mq_timedsend, __mq_timedsend_time64); +#endif + #ifdef __cplusplus } #endif diff --git a/include/poll.h b/include/poll.h index daccc760bb26a821ce00424cb1d61f8764cc83c3..472e4b8470bae3904100963200ac3dcfb7e34879 100644 --- a/include/poll.h +++ b/include/poll.h @@ -44,6 +44,12 @@ int poll (struct pollfd *, nfds_t, int); int ppoll(struct pollfd *, nfds_t, const struct timespec *, const sigset_t *); #endif +#if _REDIR_TIME64 +#ifdef _GNU_SOURCE +__REDIR(ppoll, __ppoll_time64); +#endif +#endif + #ifdef __cplusplus } #endif diff --git a/include/pthread.h b/include/pthread.h index e238321b9caf14af72d7f216a1e7c82bbc830471..984db68064185aafc2620843fbea21aea2e36b2f 100644 --- a/include/pthread.h +++ b/include/pthread.h @@ -224,6 +224,16 @@ int pthread_tryjoin_np(pthread_t, void **); int pthread_timedjoin_np(pthread_t, void **, const struct timespec *); #endif +#if _REDIR_TIME64 +__REDIR(pthread_mutex_timedlock, __pthread_mutex_timedlock_time64); +__REDIR(pthread_cond_timedwait, __pthread_cond_timedwait_time64); +__REDIR(pthread_rwlock_timedrdlock, __pthread_rwlock_timedrdlock_time64); +__REDIR(pthread_rwlock_timedwrlock, __pthread_rwlock_timedwrlock_time64); +#ifdef _GNU_SOURCE +__REDIR(pthread_timedjoin_np, __pthread_timedjoin_np_time64); +#endif +#endif + #ifdef __cplusplus } #endif diff --git a/include/sched.h b/include/sched.h index 7e470d3a133ffdb19e0f05cb48627acbda345f08..c3a8d49a1aaa7ea54230c9e178f7a526e279fd54 100644 --- a/include/sched.h +++ b/include/sched.h @@ -133,6 +133,10 @@ __CPU_op_func_S(XOR, ^) #endif +#if _REDIR_TIME64 +__REDIR(sched_rr_get_interval, __sched_rr_get_interval_time64); +#endif + #ifdef __cplusplus } #endif diff --git a/include/semaphore.h b/include/semaphore.h index 277c47d6f7425b9a8dc5578b3850c5b7c4847a9f..3690f49609d16026db882032ec7d7e2363e5eaa0 100644 --- a/include/semaphore.h +++ b/include/semaphore.h @@ -29,6 +29,10 @@ int sem_trywait(sem_t *); int sem_unlink(const char *); int sem_wait(sem_t *); +#if _REDIR_TIME64 +__REDIR(sem_timedwait, __sem_timedwait_time64); +#endif + #ifdef __cplusplus } #endif diff --git a/include/signal.h b/include/signal.h index 5c48cb838fab75faea60d2433d47be2088d786d9..fbdf667b2f202ab2f1375952ce9d4cf636ef1ce0 100644 --- a/include/signal.h +++ b/include/signal.h @@ -271,6 +271,14 @@ typedef int sig_atomic_t; void (*signal(int, void (*)(int)))(int); int raise(int); +#if _REDIR_TIME64 +#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ + || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ + || defined(_BSD_SOURCE) +__REDIR(sigtimedwait, __sigtimedwait_time64); +#endif +#endif + #ifdef __cplusplus } #endif diff --git a/include/sys/resource.h b/include/sys/resource.h index 70d793d563f588469f74e670ac6a993aa528a407..e0c86ae33c3e183df9b32387bd8a4bc4a897911c 100644 --- a/include/sys/resource.h +++ b/include/sys/resource.h @@ -104,6 +104,10 @@ int prlimit(pid_t, int, const struct rlimit *, struct rlimit *); #define rlim64_t rlim_t #endif +#if _REDIR_TIME64 +__REDIR(getrusage, __getrusage_time64); +#endif + #ifdef __cplusplus } #endif diff --git a/include/sys/select.h b/include/sys/select.h index d34cbf10d9cc9cbdee6534611726fb93d002a40d..b3bab1d57b492700b27ed27eba96407baa1bdf74 100644 --- a/include/sys/select.h +++ b/include/sys/select.h @@ -35,6 +35,11 @@ int pselect (int, fd_set *__restrict, fd_set *__restrict, fd_set *__restrict, co #define NFDBITS (8*(int)sizeof(long)) #endif +#if _REDIR_TIME64 +__REDIR(select, __select_time64); +__REDIR(pselect, __pselect_time64); +#endif + #ifdef __cplusplus } #endif diff --git a/include/sys/sem.h b/include/sys/sem.h index e6161e51d15b217a9edf379a92259d9c3767f4a5..a747784ede9e0d0a04d96b80c29bc8f847e3b3c7 100644 --- a/include/sys/sem.h +++ b/include/sys/sem.h @@ -60,6 +60,12 @@ int semop(int, struct sembuf *, size_t); int semtimedop(int, struct sembuf *, size_t, const struct timespec *); #endif +#if _REDIR_TIME64 +#ifdef _GNU_SOURCE +__REDIR(semtimedop, __semtimedop_time64); +#endif +#endif + #ifdef __cplusplus } #endif diff --git a/include/sys/socket.h b/include/sys/socket.h index 8692efa7ad6474a7ce6dc1dc850f2e1097a2300d..318a98ef66ffd2dde881ab564c98ff7d5144b142 100644 --- a/include/sys/socket.h +++ b/include/sys/socket.h @@ -350,6 +350,12 @@ int setsockopt (int, int, int, const void *, socklen_t); int sockatmark (int); +#if _REDIR_TIME64 +#ifdef _GNU_SOURCE +__REDIR(recvmmsg, __recvmmsg_time64); +#endif +#endif + #ifdef __cplusplus } #endif diff --git a/include/sys/stat.h b/include/sys/stat.h index 9d096624bcfa44594c71d47591944adae0d9e742..10d446c463eca4862b6bb8d394d52c13d27c4cf9 100644 --- a/include/sys/stat.h +++ b/include/sys/stat.h @@ -110,6 +110,15 @@ int lchmod(const char *, mode_t); #define off64_t off_t #endif +#if _REDIR_TIME64 +__REDIR(stat, __stat_time64); +__REDIR(fstat, __fstat_time64); +__REDIR(lstat, __lstat_time64); +__REDIR(fstatat, __fstatat_time64); +__REDIR(futimens, __futimens_time64); +__REDIR(utimensat, __utimensat_time64); +#endif + #ifdef __cplusplus } #endif diff --git a/include/sys/time.h b/include/sys/time.h index c5cab814c0d112d493d75d1a35c98bb338195687..cdc67ef650fe3cd758b579052df907f8b56baab6 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -56,6 +56,20 @@ int adjtime (const struct timeval *, struct timeval *); (void)0 ) #endif +#if _REDIR_TIME64 +__REDIR(gettimeofday, __gettimeofday_time64); +__REDIR(getitimer, __getitimer_time64); +__REDIR(setitimer, __setitimer_time64); +__REDIR(utimes, __utimes_time64); +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +__REDIR(futimes, __futimes_time64); +__REDIR(futimesat, __futimesat_time64); +__REDIR(lutimes, __lutimes_time64); +__REDIR(settimeofday, __settimeofday_time64); +__REDIR(adjtime, __adjtime64); +#endif +#endif + #ifdef __cplusplus } #endif diff --git a/include/sys/timeb.h b/include/sys/timeb.h index 108c1f5ccbbd45d484ac79062cbc5104c01b02cc..628239b7ed9342ad8f19a655c290b4be2c6ba213 100644 --- a/include/sys/timeb.h +++ b/include/sys/timeb.h @@ -4,6 +4,8 @@ extern "C" { #endif +#include + #define __NEED_time_t #include @@ -16,6 +18,10 @@ struct timeb { int ftime(struct timeb *); +#if _REDIR_TIME64 +__REDIR(ftime, __ftime64); +#endif + #ifdef __cplusplus } #endif diff --git a/include/sys/timerfd.h b/include/sys/timerfd.h index 2794d36a6c2b2b37e8f7f2d4f28c02e85223de06..1b832cdd8f8faed5423cdc7d33060ed1f1cd73e3 100644 --- a/include/sys/timerfd.h +++ b/include/sys/timerfd.h @@ -20,6 +20,11 @@ int timerfd_create(int, int); int timerfd_settime(int, int, const struct itimerspec *, struct itimerspec *); int timerfd_gettime(int, struct itimerspec *); +#if _REDIR_TIME64 +__REDIR(timerfd_settime, __timerfd_settime64); +__REDIR(timerfd_gettime, __timerfd_gettime64); +#endif + #ifdef __cplusplus } #endif diff --git a/include/sys/timex.h b/include/sys/timex.h index 2e688880a8b2d71e905091161efa63a32601d53e..8b417e1be258c3a342646c3ba4528c1b6f8a7e10 100644 --- a/include/sys/timex.h +++ b/include/sys/timex.h @@ -91,6 +91,11 @@ struct timex { int adjtimex(struct timex *); int clock_adjtime(clockid_t, struct timex *); +#if _REDIR_TIME64 +__REDIR(adjtimex, __adjtimex_time64); +__REDIR(clock_adjtime, __clock_adjtime64); +#endif + #ifdef __cplusplus } #endif diff --git a/include/sys/wait.h b/include/sys/wait.h index 50c5c709a6beaa5575f9ab56e24bd115abf77c5d..d9adbdec827f17844839f3e0a3eab19136926722 100644 --- a/include/sys/wait.h +++ b/include/sys/wait.h @@ -53,6 +53,13 @@ pid_t wait4 (pid_t, int *, int, struct rusage *); #define WIFSIGNALED(s) (((s)&0xffff)-1U < 0xffu) #define WIFCONTINUED(s) ((s) == 0xffff) +#if _REDIR_TIME64 +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +__REDIR(wait3, __wait3_time64); +__REDIR(wait4, __wait4_time64); +#endif +#endif + #ifdef __cplusplus } #endif diff --git a/include/threads.h b/include/threads.h index 8122b3b1df5e5a931b98eb688d227800934a126b..52ec3100eb9e2ebf3523123ba51021582361b855 100644 --- a/include/threads.h +++ b/include/threads.h @@ -80,6 +80,12 @@ void tss_delete(tss_t); int tss_set(tss_t, void *); void *tss_get(tss_t); +#if _REDIR_TIME64 +__REDIR(thrd_sleep, __thrd_sleep_time64); +__REDIR(mtx_timedlock, __mtx_timedlock_time64); +__REDIR(cnd_timedwait, __cnd_timedwait_time64); +#endif + #ifdef __cplusplus } #endif diff --git a/include/time.h b/include/time.h index 672b3fc3ee23d144ef3f605e7c20533db97cd1a8..5494df183673388e64e8305182131a58022530b5 100644 --- a/include/time.h +++ b/include/time.h @@ -130,6 +130,34 @@ int stime(const time_t *); time_t timegm(struct tm *); #endif +#if _REDIR_TIME64 +__REDIR(time, __time64); +__REDIR(difftime, __difftime64); +__REDIR(mktime, __mktime64); +__REDIR(gmtime, __gmtime64); +__REDIR(localtime, __localtime64); +__REDIR(ctime, __ctime64); +__REDIR(timespec_get, __timespec_get_time64); +#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ + || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ + || defined(_BSD_SOURCE) +__REDIR(gmtime_r, __gmtime64_r); +__REDIR(localtime_r, __localtime64_r); +__REDIR(ctime_r, __ctime64_r); +__REDIR(nanosleep, __nanosleep_time64); +__REDIR(clock_getres, __clock_getres_time64); +__REDIR(clock_gettime, __clock_gettime64); +__REDIR(clock_settime, __clock_settime64); +__REDIR(clock_nanosleep, __clock_nanosleep_time64); +__REDIR(timer_settime, __timer_settime64); +__REDIR(timer_gettime, __timer_gettime64); +#endif +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +__REDIR(stime, __stime64); +__REDIR(timegm, __timegm_time64); +#endif +#endif + #ifdef __cplusplus } #endif diff --git a/include/utime.h b/include/utime.h index dd5ff927c25d1ec82475c569a0d4c09f3c1fce29..5755bd53ee866ebf7a1b73768bad7837a2de5f70 100644 --- a/include/utime.h +++ b/include/utime.h @@ -5,6 +5,8 @@ extern "C" { #endif +#include + #define __NEED_time_t #include @@ -16,6 +18,10 @@ struct utimbuf { int utime (const char *, const struct utimbuf *); +#if _REDIR_TIME64 +__REDIR(utime, __utime64); +#endif + #ifdef __cplusplus } #endif