This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Y2038: provide kernel support indication
On Tue, 25 Sep 2018, Albert ARIBAUD wrote:
> So, assuming V is the version at which 64-bit-time kernel support is
> introduced for all architectures at the same time:
>
> - if the minimal kernel version supported by glibc for a given
> architecture is less than V, then __ASSUME_KERNEL_Y2038_SUPPORT should
> be undefined and glibc should check dynamically whether the actual
> kernel it is running on has 64-bit-time support or not;
>
> - if the minimal kernel version supported by glibc for a given
> architecture is V or greater, then __ASSUME_KERNEL_Y2038_SUPPORT
> should be defined and glibc checks for support should be turned
> into constants so that 64-bit-time syscalls are systematically
> called.
>
> Correct?
Yes, subject to the question of what's appropriate on 64-bit architectures
where time_t always has been 64-bit and the existing names of syscalls,
not the new ones, are used for all time-related syscalls. If
__ASSUME_KERNEL_Y2038_SUPPORT means the syscalls with the new names are
guaranteed to be present, then it should be undefined in that case because
only the old names will be present (but also the variable etc. relating to
runtime tests for support should not be declared at all, so if any code
with such tests is - wrongly - compiled on such an architecture, it will
fail to compile).
--
Joseph S. Myers
joseph@codesourcery.com