PR27725, better objcopy -p times
authorAlan Modra <amodra@gmail.com>
Wed, 14 Apr 2021 15:06:42 +0000 (00:36 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 15 Apr 2021 08:21:17 +0000 (17:51 +0930)
commit985e026451640c880e13827454aa31b7a636d1bc
tree2a034beb448ef79b8b57e9d207f2e0722e38cda5
parentd0ecdcddc363ad7f05fc50cf1eee4028fa7f8964
PR27725, better objcopy -p times

Nanosecond rather than second resolution.

PR 27725
* configure.ac: Check for sys/time.h and utimensat.  Use standard
checks for mkstemp and mkdtemp.  Whitespace.  Check for nanosecond
members of struct stat.
* rename.c: Prefer sys/time.h for utimes over utime.h for utime.
(STAT_TIMESPEC, STAT_TIMESPEC_NS): Define
(get_stat_atime_ns, get_stat_mtime_ns): New inline functions.
(get_stat_atime, get_stat_mtime): Likewise.
(set_times): Choose first available of utimensat, utimes, utime.
Use above inline functions to set timespec and timeval values.
* configure: Regenerate.
* config.in: Regenerate.
* testsuite/binutils-all/objcopy.exp (objcopy_test): Add test of
file timestamp when --preserve-dates is used.
binutils/ChangeLog
binutils/config.in
binutils/configure
binutils/configure.ac
binutils/rename.c
binutils/testsuite/binutils-all/objcopy.exp
This page took 0.025807 seconds and 4 git commands to generate.