[all-commits] [llvm/llvm-project] b2a6da: [libc] Remove 32-bit time_t support (#200426)
Jeff Bailey via All-commits
all-commits at lists.llvm.org
Fri Jun 5 06:33:40 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b2a6da6197daabfc5bda2f4b2a5880aae10fc1a9
https://github.com/llvm/llvm-project/commit/b2a6da6197daabfc5bda2f4b2a5880aae10fc1a9
Author: Jeff Bailey <jbailey at raspberryginger.com>
Date: 2026-06-05 (Fri, 05 Jun 2026)
Changed paths:
M libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
M libc/cmake/modules/LLVMLibCFlagRules.cmake
M libc/config/config.json
M libc/include/llvm-libc-types/CMakeLists.txt
M libc/include/llvm-libc-types/struct_timespec.h
M libc/include/llvm-libc-types/suseconds_t.h
M libc/include/llvm-libc-types/time_t.h
R libc/include/llvm-libc-types/time_t_32.h
M libc/src/__support/OSUtil/linux/syscall_wrappers/utimensat.h
M libc/src/__support/threads/linux/futex_utils.h
M libc/src/__support/threads/linux/futex_word.h
M libc/src/__support/time/linux/clock_gettime.cpp
M libc/src/__support/time/linux/clock_settime.cpp
M libc/src/poll/linux/poll.cpp
M libc/src/sched/linux/sched_rr_get_interval.cpp
M libc/src/sys/select/linux/select.cpp
M libc/src/sys/time/linux/getitimer.cpp
M libc/src/sys/time/linux/setitimer.cpp
M libc/src/sys/time/linux/utimes.cpp
M libc/src/time/linux/nanosleep.cpp
M libc/src/time/time_constants.h
M libc/src/time/time_utils.cpp
M libc/test/src/__support/time/linux/timeout_test.cpp
M libc/test/src/sys/time/utimes_test.cpp
M libc/test/src/time/asctime_test.cpp
M libc/test/src/time/gmtime_r_test.cpp
M libc/test/src/time/gmtime_test.cpp
M libc/test/src/time/mktime_test.cpp
Log Message:
-----------
[libc] Remove 32-bit time_t support (#200426)
Removed time_t_32.h and forced time_t to 64-bit (__INT64_TYPE__) on all
platforms.
Forced tv_nsec in struct timespec and tv_usec in struct timeval to
64-bit. This ensures struct timespec matches the kernel layout of struct
__kernel_timespec, allowing direct casting in syscall wrappers. Note
that under C23, tv_nsec is allowed to be any signed integer type capable
of representing [0, 999999999], making this 64-bit definition fully
compliant.
Updated syscall wrappers to prefer 64-bit time syscalls:
* clock_gettime64
* clock_settime64
* clock_nanosleep_time64
* pselect6_time64
* utimensat_time64
* futex_time64
Added static_asserts to legacy fallback paths to prevent compiling on
32-bit platforms that lack 64-bit time support.
Removed obsolete Y2038 overflow tests from mktime and other time tests.
Assisted-by: Automated tooling, human reviewed.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list