[PATCH] Y2038: provide kernel support indication

Joseph Myers joseph@codesourcery.com
Wed Sep 26 16:24:00 GMT 2018


On Wed, 26 Sep 2018, Albert ARIBAUD wrote:

>   #else
>     if __y2038_get_kernel_support() indicates support:
>       call new __NR_* syscall with 64-bit time(s);
>       if ENOSYS:
>         call __y2038_set_kernel_support() to indicate failure;
>         perform pre-call 64-to-32-bit time conversions if any;
>         call old __NR_* syscall with 32-bit time(s);
>         perform post-call 32-to-64-bit time conversions if any.
>     else:

This first part also needs further conditionals to disable it altogether 
if the __NR_* for the new syscall isn't defined.  (Actually it might just 
be the

>     if __y2038_get_kernel_support() indicates support:
>       call new __NR_* syscall with 64-bit time(s);
>       if ENOSYS:
>         call __y2038_set_kernel_support() to indicate failure;

that's conditional in the source code, and maybe some open/close braces, 
so that the logic for using the 32-bit syscalls only appears once.)

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list