[RFC 2/6] y2038: stat: {f}stat{at}64_time64 redirection to be used on Y2038 systems

Joseph Myers joseph@codesourcery.com
Sat Dec 5 00:04:14 GMT 2020


On Sat, 5 Dec 2020, Lukasz Majewski wrote:

> --- a/io/Versions
> +++ b/io/Versions
> @@ -148,5 +148,9 @@ libc {
>      __fstat64;
>      __ppoll64;
>      __utime64;
> +    __stat64_time64;
> +    __fstat64_time64;
> +    __lstat64_time64;
> +    __fstatat64_time64;

This is adding to GLIBC_PRIVATE.

> --- a/io/sys/stat.h
> +++ b/io/sys/stat.h
> @@ -210,20 +210,45 @@ extern int stat (const char *__restrict __file,
>  extern int fstat (int __fd, struct stat *__buf) __THROW __nonnull ((2));
>  #else
>  # ifdef __REDIRECT_NTH
> +#  ifdef __USE_TIME_BITS64
> +extern int __REDIRECT_NTH (stat, (const char *__restrict __file,
> +                                    struct stat *__restrict __buf),
> +                           __stat64_time64) __nonnull ((1, 2));
> +extern int __REDIRECT_NTH (fstat, (int __fd, struct stat *__buf),
> +                           __fstat64_time64) __nonnull ((2));

And this is changing an installed header.

An installed header should never reference a GLIBC_PRIVATE symbol.  The 
commit that adds a redirection to a new symbol for 64-bit time_t must 
either be the same commit that adds that symbol to a *public* symbol 
version, or a subsequent commit.  The commit adding it to a public symbol 
version must be the same commit that updates all relevant ABI test 
baselines so that ABI tests pass after every commit.

The same comments apply to other patches in this series.

-- 
Joseph S. Myers
joseph@codesourcery.com


More information about the Libc-alpha mailing list