[PATCH] Y2038: provide kernel support indication

Joseph Myers joseph@codesourcery.com
Wed Dec 5 13:18:00 GMT 2018


On Wed, 5 Dec 2018, Albert ARIBAUD wrote:

> - on 64-bit architectures, GLIBC will set __ASSUME_KERNEL_Y2038_SUPPORT
>   once the minimal kernel supported version for these architectures
>   provides the 'new' syscall symbols.
> 
> - on all architectures, if __ASSUME_KERNEL_Y2038_SUPPORT is defined,
>   then GLIBC assumes the 'new' syscall symbols exist and can be used.
> 
> - on all architectures, if __ASSUME_KERNEL_Y2038_SUPPORT is NOT defined,
>   then GLIBC will try to use new syscalls for which a _NR symbol is
>   provided by the build-time kernel, and on ENOSYS, will fallback to old
>   syscalls.

There should be *no* new code in the glibc compiled for 64-bit 
architectures - no ENOSYS fallback, because none is needed.  __ASSUME_* is 
always about features to assume to be present in the kernel used at 
runtime, not about what __NR_* symbols are defined (however, the kernel 
headers used for compiling glibc must always be at least as recent as the 
specified --enable-kernel version).

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list