[Y2038] Replacement of struct timespec with struct __timespec64 in glibc internal code
Joseph Myers
joseph@codesourcery.com
Wed Jun 3 17:28:38 GMT 2020
On Wed, 3 Jun 2020, Lukasz Majewski wrote:
> To do it I could:
> - Replace its occurences in relevant directories - like ./nptl or
> ./sysdeps/pthread - i.e. rename all occurrences in a single directory
>
> - Replace them in functions (tests) and use explicit conversion
> functions - like valid_timespec_to_timespec64() before passing struct
> __timespec64 arguments (like ones for futex_time64 for nptl).
>
> - Replace _all_ occurrences in glibc tree of struct timespec with struct
> __timespec64 at once with using sed on the glibc tree.
Using sed obviously won't work, since external interfaces need different
handling from purely internal uses. I think you need to change things bit
by bit, in sufficiently small patches for convenient review.
Regarding tests, I expect many tests of time-related interfaces should end
up being built and run twice on systems that currently use 32-bit time,
once to test the interfaces with 32-bit time and once to test the
interfaces with 64-bit time. Also, tests can't generally use 64-bit time
interfaces from libc until _TIME_BITS=64 support is actually implemented.
So I think tests would be one of the last places to change (and similarly
installed executables). Whereas any internal use of time in a function in
the libraries that does not involve time in its interface can be updated
more or less independently of any other such use, provided the relevant
internal interfaces using 64-bit time are now available.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-help
mailing list