From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 55566 invoked by alias); 7 Sep 2017 22:42:32 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 55400 invoked by uid 89); 7 Sep 2017 22:42:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.6 required=5.0 tests=BAYES_00,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=HCc:D*fr X-HELO: smtp6-g21.free.fr From: "Albert ARIBAUD (3ADEV)" To: libc-alpha@sourceware.org Cc: "Albert ARIBAUD (3ADEV)" Subject: [RFC PATCH 00/52] Make GLIBC Y2038-proof Date: Thu, 07 Sep 2017 22:42:00 -0000 Message-Id: <20170907224219.12483-1-albert.aribaud@3adev.fr> X-SW-Source: 2017-09/txt/msg00316.txt.bz2 This series implements Y2038-proof types, implementation, internal functions, and APIs. For more information, see documentation at https://sourceware.org/glibc/wiki/Y2038ProofnessDesign Each patch in this series except the last add one type or function, with a few exception where several functions are implemented as a whole. The last patch enables the _TIME_BITS mechanism. Once this patch is applied, API header files will will use 64-bit time if _TIME_BITS is defined and equal to 64 prior to their inclusion, and conversively, will use 32-bit time if _TIME_BITS is different from 64 or does not exist. Albert ARIBAUD (3ADEV) (52): Y2038: add type __time64_t Y2038: add function __difftime64 Y2038: add functions using struct tm Y2038: add function __mktime64 (and timelocal) Y2038: add function __timegm64 Y2038: add struct __timespec64 Y2038: add function __clock_gettime64 Y2038: add function __clock_settime64 Y2038: add function __clock_getres64 Y2038: add function __clock_nanosleep64 Y2038: add function __timespec_get64 Y2038: add function __futimens64 Y2038: add function __utimensat64 Y2038: add function __sigtimedwait64 Y2038: add struct __timeval64 Y2038: add function __futimes64 Y2038: add function __lutimes64 Y2038: add struct __itimerspec64 Y2038: add function __timer_gettime64 Y2038: add function __timer_settime64 Y2038: add function __timerfd_gettime64 Y2038: add function __timerfd_settime64 Y2038: add struct __stat64_t64 Y2038: add function __fstat64_t64 (and __fxstat64_t64) Y2038: add function __stat64_t64 (and __xstat64_t64) Y2038: add function __lstat64_t64 (and __lxstat64_t64) Y2038: add function __fstatat64_t64 (and __fxstatat_t64) Y2038: add function __time_t64 Y2038: add function __stime_t64 Y2038: add function __utimes_t64 Y2038: add function __gettimeofday_t64 Y2038: add function __settimeofday_t64 Y2038: add function __mq_timedsend_t64 Y2038: add function __mq_timedreceive_t64 Y2038: add function __msgctl_t64 Y2038: add function __sched_rr_get_interval_t64 Y2038: add function __nanosleep64_t64 Y2038: add function __adjtime_t64 Y2038: add function __utime_t64 Y2038: add struct __itimerval_t64 Y2038: add function __getitimer_t64 Y2038: add function __setitimer_t64 Y2038: add functions using futexes Y2038: add function __getrusage_t64 Y2038: add struct __ntp_timeval_t64 Y2038: add function __ntp_gettime_t64 Y2038: add function __ntp_gettimex_t64 Y2038: add function __adjtimex_t64 (and __ntp_adjtime_t64) Y2038: add function pselect Y2038: add function select Y2038: add RPC functions Y2038: add _TIME_BITS==64 support bits/typesizes.h | 1 + include/features.h | 4 + include/sys/select.h | 15 + include/sys/stat.h | 35 ++ include/sys/time.h | 6 + include/time.h | 130 +++++- include/utime.h | 7 + io/Versions | 11 + io/fstat64.c | 7 + io/fstatat64.c | 7 + io/futimens.c | 9 + io/lstat64.c | 7 + io/stat64.c | 7 + io/sys/stat.h | 75 +++- io/utime.c | 16 + io/utime.h | 15 +- io/utimensat.c | 9 + misc/futimes.c | 9 + misc/lutimes.c | 8 + misc/sys/select.h | 25 ++ misc/utimes.c | 15 + nptl/Versions | 11 + nptl/lll_timedlock_wait.c | 37 ++ nptl/pthread_cond_wait.c | 285 +++++++++++++ nptl/pthread_mutex_timedlock.c | 616 +++++++++++++++++++++++++++ nptl/pthread_rwlock_common.c | 591 +++++++++++++++++++++++++ nptl/pthread_rwlock_timedrdlock.c | 19 + nptl/pthread_rwlock_timedwrlock.c | 19 + nptl/sem_timedwait.c | 18 + nptl/sem_wait.c | 24 ++ nptl/sem_waitcommon.c | 172 ++++++++ posix/Makefile | 3 +- posix/Versions | 7 + posix/bits/types.h | 3 +- posix/sched.h | 9 + posix/sched_rr_gi64.c | 51 +++ resource/Makefile | 2 +- resource/Versions | 7 + resource/getrusage64.c | 185 ++++++++ resource/sys/resource.h | 9 + rt/Makefile | 6 +- rt/Versions | 13 + rt/mq_timedreceive_t64.c | 45 ++ rt/mq_timedsend_t64.c | 44 ++ rt/mqueue.h | 22 + rt/timerfd_gettime64.c | 28 ++ rt/timerfd_settime64.c | 29 ++ signal/signal.h | 10 + signal/sigtimedwait.c | 10 + sunrpc/clnt_udp.c | 27 ++ sunrpc/pmap_rmt.c | 23 + sunrpc/rpc/clnt.h | 24 ++ sunrpc/rpc/pmap_clnt.h | 15 + sysdeps/nptl/aio_misc.h | 39 ++ sysdeps/nptl/lowlevellock.h | 17 + sysdeps/nptl/pthread.h | 41 ++ sysdeps/posix/clock_getres.c | 87 +++- sysdeps/posix/time.c | 26 ++ sysdeps/posix/utime.c | 22 + sysdeps/pthread/aio_suspend.c | 164 +++++++ sysdeps/pthread/semaphore.h | 10 + sysdeps/unix/clock_gettime.c | 46 ++ sysdeps/unix/clock_settime.c | 56 ++- sysdeps/unix/sysv/linux/Versions | 9 + sysdeps/unix/sysv/linux/adjtime.c | 124 ++++++ sysdeps/unix/sysv/linux/arm/Versions | 24 ++ sysdeps/unix/sysv/linux/arm/init-first.c | 15 + sysdeps/unix/sysv/linux/arm/libc-vdso.h | 1 + sysdeps/unix/sysv/linux/bits/msq.h | 20 + sysdeps/unix/sysv/linux/bits/stat.h | 6 +- sysdeps/unix/sysv/linux/clock_getres.c | 40 ++ sysdeps/unix/sysv/linux/clock_gettime.c | 44 ++ sysdeps/unix/sysv/linux/clock_nanosleep.c | 87 +++- sysdeps/unix/sysv/linux/clock_settime.c | 23 + sysdeps/unix/sysv/linux/futex-internal.h | 123 ++++++ sysdeps/unix/sysv/linux/futimens.c | 38 ++ sysdeps/unix/sysv/linux/futimes.c | 52 +++ sysdeps/unix/sysv/linux/fxstat64.c | 50 +++ sysdeps/unix/sysv/linux/fxstatat64.c | 54 +++ sysdeps/unix/sysv/linux/gettimeofday.c | 26 ++ sysdeps/unix/sysv/linux/lowlevellock-futex.h | 22 + sysdeps/unix/sysv/linux/lutimes.c | 53 +++ sysdeps/unix/sysv/linux/lxstat64.c | 50 +++ sysdeps/unix/sysv/linux/msgctl.c | 72 ++++ sysdeps/unix/sysv/linux/ntp_gettime.c | 25 ++ sysdeps/unix/sysv/linux/ntp_gettimex.c | 31 ++ sysdeps/unix/sysv/linux/pselect.c | 61 +++ sysdeps/unix/sysv/linux/select.c | 66 +++ sysdeps/unix/sysv/linux/settimeofday64.c | 44 ++ sysdeps/unix/sysv/linux/sigtimedwait.c | 75 ++++ sysdeps/unix/sysv/linux/stime.c | 70 +++ sysdeps/unix/sysv/linux/sys/timerfd.h | 19 + sysdeps/unix/sysv/linux/sys/timex.h | 32 +- sysdeps/unix/sysv/linux/time.c | 22 + sysdeps/unix/sysv/linux/timer_gettime.c | 24 ++ sysdeps/unix/sysv/linux/timer_settime.c | 49 +++ sysdeps/unix/sysv/linux/timerfd_gettime64.c | 44 ++ sysdeps/unix/sysv/linux/timerfd_settime64.c | 71 +++ sysdeps/unix/sysv/linux/timespec_get.c | 35 ++ sysdeps/unix/sysv/linux/utimensat.c | 36 ++ sysdeps/unix/sysv/linux/utimes.c | 31 ++ sysdeps/unix/sysv/linux/xstat64.c | 50 +++ sysvipc/sys/msg.h | 9 + time/Makefile | 4 +- time/Versions | 16 + time/adjtime.c | 10 + time/bits/types/struct_timespec.h | 17 + time/bits/types/struct_timeval.h | 9 + time/bits/types/time_t.h | 4 + time/ctime.c | 10 + time/ctime_r.c | 9 + time/difftime.c | 9 + time/getitimer64.c | 51 +++ time/gettimeofday.c | 10 + time/gmtime.c | 15 + time/localtime.c | 17 + time/mktime.c | 403 ++++++++++++++++++ time/nanosleep64.c | 61 +++ time/offtime.c | 64 +++ time/setitimer64.c | 69 +++ time/settimeofday.c | 8 + time/stime.c | 17 + time/sys/time.h | 74 ++++ time/time.c | 13 + time/time.h | 161 ++++++- time/timegm.c | 11 + time/tzfile.c | 4 +- time/tzset.c | 64 ++- 128 files changed, 6112 insertions(+), 35 deletions(-) create mode 100644 posix/sched_rr_gi64.c create mode 100644 resource/getrusage64.c create mode 100644 rt/mq_timedreceive_t64.c create mode 100644 rt/mq_timedsend_t64.c create mode 100644 rt/timerfd_gettime64.c create mode 100644 rt/timerfd_settime64.c create mode 100644 sysdeps/unix/sysv/linux/settimeofday64.c create mode 100644 sysdeps/unix/sysv/linux/stime.c create mode 100644 sysdeps/unix/sysv/linux/timerfd_gettime64.c create mode 100644 sysdeps/unix/sysv/linux/timerfd_settime64.c create mode 100644 time/getitimer64.c create mode 100644 time/nanosleep64.c create mode 100644 time/setitimer64.c -- 2.11.0