glibc/sysdeps/unix
Lukasz Majewski f072671cf5 y2038: linux: Provide __futimes64 implementation
This patch provides new __futimes64 explicit 64 bit function for setting file's
64 bit attributes for access and modification time (by specifying file
descriptor number).

Internally, the __utimensat64_helper function is used. This patch is necessary
for having architectures with __WORDSIZE == 32 Y2038 safe.

Moreover, a 32 bit version - __futimes has been refactored to internally use
__futimes64.

The __futimes is now supposed to be used on systems still supporting 32
bit time (__TIMESIZE != 64) - hence the necessary conversion of struct timeval
to 64 bit struct __timeval64.

The check if struct timevals' usec fields are in the range between 0 and 1000000
has been removed as Linux kernel performs it internally in the implementation
of utimensat (the conversion between struct __timeval64 and __timespec64 is not
relevant for this particular check).

Last but not least, checks for tvp{64} not being NULL have been preserved from
the original code as some legacy user space programs may rely on it.

Build tests:
./src/scripts/build-many-glibcs.py glibcs

Run-time tests:
- Run specific tests on ARM/x86 32bit systems (qemu):
  https://github.com/lmajewski/meta-y2038 and run tests:
  https://github.com/lmajewski/y2038-tests/commits/master

Above tests were performed with Y2038 redirection applied as well as without to
test the proper usage of both __futimes64 and __futimes.
2020-03-09 10:26:46 +01:00
..
alpha alpha: Refactor syscall and Use Linux kABI for syscall return 2020-02-14 21:09:12 -03:00
arm linux: Consolidate INLINE_SYSCALL 2020-02-14 21:09:12 -03:00
bsd Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
i386 Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
inet Remove obsolete, never-implemented XSI STREAMS declarations 2019-03-14 15:44:15 +01:00
mips linux: Consolidate INLINE_SYSCALL 2020-02-14 21:09:12 -03:00
powerpc Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
sh linux: Consolidate INLINE_SYSCALL 2020-02-14 21:09:12 -03:00
sysv/linux y2038: linux: Provide __futimes64 implementation 2020-03-09 10:26:46 +01:00
x86_64 linux: Consolidate INLINE_SYSCALL 2020-02-14 21:09:12 -03:00
confstr.h
get_child_max.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
getlogin_r.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
getlogin.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
getpagesize.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
grantpt.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
ifreq.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Implies
make-syscalls.sh Remove vDSO support from make-syscall.sh 2020-01-03 10:02:05 -03:00
Makefile Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
pt-fcntl.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
s-proto-cancel.S * sysdeps/unix/Makefile: Include $(common-objpfx)s-proto-cancel.d. 2002-12-30 00:12:56 +00:00
s-proto.S
setxid.h Update. 2004-11-12 01:27:04 +00:00
sockatmark.c Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
syscall-template.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
syscall.S Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
syscalls.list Use clock_gettime to implement gettimeofday. 2019-10-30 17:11:10 -03:00
sysdep.h linux: Remove INTERNAL_SYSCALL_DECL 2020-02-14 21:12:45 -03:00