[RFC 1/7] y2038: Introduce struct __timespec64

Joseph Myers joseph@codesourcery.com
Thu Mar 28 16:20:00 GMT 2019


On Thu, 28 Mar 2019, Lukasz Majewski wrote:

> Ok. I've looked into the ./bits/stat.h source code:
> 
> #ifndef __USE_FILE_OFFSET64
>     __ino_t st_ino;             /* File serial number.  */
> #else
>     __ino64_t st_ino;           /* File serial number.  */
> #endif
> 
> In this case explicit 64 bit type is used (__ino64_t).

Yes, consistency with that is an argument for having __time64_t in the 
installed headers (__ino_t and __ino64_t always exist, and their types 
don't depend on _FILE_OFFSET_BITS, but which one is used to define ino_t 
does depend on _FILE_OFFSET_BITS - so consistency with that approach would 
suggest __time64_t in installed headers even if no __timespec64 in 
installed headers, with __time_t continuing to have the same type it has 
at present).

There should not, however, be a public interface time64_t (or 
corresponding non-reserved function names), to avoid excess complexity 
around having explicit 64-bit-time public interfaces for each function as 
well as the _TIME_BITS=64 interfaces.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list