Displaying 2 results from an estimated 2 matches for "have_st_mtim".
2019 Jan 25
0
[klibc:update-dash] builtin: Greater resolution in test -nt / test -ot
...| 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/usr/dash/bltin/test.c b/usr/dash/bltin/test.c
index 58c05fec..d1458df3 100644
--- a/usr/dash/bltin/test.c
+++ b/usr/dash/bltin/test.c
@@ -476,9 +476,17 @@ newerf (const char *f1, const char *f2)
{
struct stat b1, b2;
+#ifdef HAVE_ST_MTIM
+ return (stat (f1, &b1) == 0 &&
+ stat (f2, &b2) == 0 &&
+ ( b1.st_mtim.tv_sec > b2.st_mtim.tv_sec ||
+ (b1.st_mtim.tv_sec == b2.st_mtim.tv_sec && (b1.st_mtim.tv_nsec > b2.st_mtim.tv_nsec )))
+ );
+#else
return (stat (f1, &b1) == 0 &&
stat...
2020 Mar 28
0
[klibc:update-dash] dash: builtin: Greater resolution in test -nt / test -ot
...| 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/usr/dash/bltin/test.c b/usr/dash/bltin/test.c
index 58c05fec..d1458df3 100644
--- a/usr/dash/bltin/test.c
+++ b/usr/dash/bltin/test.c
@@ -476,9 +476,17 @@ newerf (const char *f1, const char *f2)
{
struct stat b1, b2;
+#ifdef HAVE_ST_MTIM
+ return (stat (f1, &b1) == 0 &&
+ stat (f2, &b2) == 0 &&
+ ( b1.st_mtim.tv_sec > b2.st_mtim.tv_sec ||
+ (b1.st_mtim.tv_sec == b2.st_mtim.tv_sec && (b1.st_mtim.tv_nsec > b2.st_mtim.tv_nsec )))
+ );
+#else
return (stat (f1, &b1) == 0 &&
stat...