busybox/coreutils
Denys Vlasenko 79c92dbd70 touch: switch to using utimensat() and futimens()
This patch changes the functions used to update timestamps in touch.

Before, utimes() and lutimes() were used, which had certain
disadvantages.
They are unable to handle nanosecond timestamps, and implementations of
certain features like -a and -m require running stat() in a loop.

Almost all implementations of utimes() and lutimes() are wrappers for
utimensat(), this is the case for glibc, ulibc and musl libc.

function                                             old     new   delta
__futimens_time64                                      -      24     +24
__lutimes_time64                                      80       -     -80
touch_main                                           539     456     -83
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 0/1 up/down: 24/-163)          Total: -139 bytes

Signed-off-by: urmum-69 <urmum69@snopyta.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2021-04-13 11:31:46 +02:00
..
2021-02-03 20:52:40 +01:00
2021-02-03 20:52:40 +01:00
2020-12-14 20:27:57 +01:00
2021-02-03 20:52:40 +01:00
2020-12-23 02:03:04 +01:00
2021-02-03 20:52:40 +01:00
2021-02-03 20:52:40 +01:00
2021-02-03 20:52:40 +01:00
2020-12-13 19:04:19 +01:00
2021-01-04 13:28:28 +01:00
2021-02-03 20:52:40 +01:00
2020-12-13 19:04:19 +01:00
2021-02-03 20:52:40 +01:00
2021-02-03 20:52:40 +01:00
2020-12-18 04:12:51 +01:00
2020-12-18 04:12:51 +01:00
2021-02-03 20:52:40 +01:00