linux: Fix generic struct_stat for 64 bit time (BZ# 29657)
commit7a6ca82f8007ddbd43e2b8fce806ba7101ee47f5
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 19 Oct 2022 22:14:04 +0000 (19 19:14 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 25 Oct 2022 18:53:19 +0000 (25 15:53 -0300)
treeab97df12d534b21940d0349c05b7d5cc4ded8551
parenta35c960dbb1d7c7cf25905514f5f9d5e99cf6160
linux: Fix generic struct_stat for 64 bit time (BZ# 29657)

The generic Linux struct_stat misses the conditionals to use
bits/struct_stat_time64_helper.h in the __USE_TIME_BITS64 for
architecture that uses __TIMESIZE == 32 (currently csky and nios2).

Since newer ports should not support 32 bit time_t, the generic
implementation should be used as default.

For arm, hppa, and sh a copy of default struct_stat is added,
while for csky and nios a new one based on generic is used, along
with conditionals to use bits/struct_stat_time64_helper.h.

The default struct_stat is also replaced with the generic one.

Checked on aarch64-linux-gnu and arm-linux-gnueabihf.
sysdeps/unix/sysv/linux/arm/bits/struct_stat.h [copied from sysdeps/unix/sysv/linux/bits/struct_stat.h with 99% similarity]
sysdeps/unix/sysv/linux/bits/struct_stat.h [copied from sysdeps/unix/sysv/linux/generic/bits/struct_stat.h with 100% similarity]
sysdeps/unix/sysv/linux/csky/bits/struct_stat.h [copied from sysdeps/unix/sysv/linux/generic/bits/struct_stat.h with 92% similarity]
sysdeps/unix/sysv/linux/hppa/bits/struct_stat.h [copied from sysdeps/unix/sysv/linux/bits/struct_stat.h with 99% similarity]
sysdeps/unix/sysv/linux/nios2/bits/struct_stat.h [moved from sysdeps/unix/sysv/linux/generic/bits/struct_stat.h with 92% similarity]
sysdeps/unix/sysv/linux/sh/bits/struct_stat.h [copied from sysdeps/unix/sysv/linux/bits/struct_stat.h with 99% similarity]