Module Name: src
Committed By: uebayasi
Date: Sat May 4 06:26:44 UTC 2013
Modified Files:
src/bin/test: test.c
Log Message:
test(1): Compare timestamp in nsec scale in -nt/-ot.
To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/bin/test/test.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/bin/test/test.c
diff -u src/bin/test/test.c:1.39 src/bin/test/test.c:1.40
--- src/bin/test/test.c:1.39 Thu Mar 15 02:02:21 2012
+++ src/bin/test/test.c Sat May 4 06:26:44 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: test.c,v 1.39 2012/03/15 02:02:21 joerg Exp $ */
+/* $NetBSD: test.c,v 1.40 2013/05/04 06:26:44 uebayasi Exp $ */
/*
* test(1); version 7-like -- author Erik Baalbergen
@@ -12,7 +12,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: test.c,v 1.39 2012/03/15 02:02:21 joerg Exp $");
+__RCSID("$NetBSD: test.c,v 1.40 2013/05/04 06:26:44 uebayasi Exp $");
#endif
#include <sys/stat.h>
@@ -694,7 +694,7 @@ newerf(const char *f1, const char *f2)
return (stat(f1, &b1) == 0 &&
stat(f2, &b2) == 0 &&
- b1.st_mtime > b2.st_mtime);
+ timespeccmp(&b1.st_mtim, &b2.st_mtim, >));
}
static int
@@ -704,7 +704,7 @@ olderf(const char *f1, const char *f2)
return (stat(f1, &b1) == 0 &&
stat(f2, &b2) == 0 &&
- b1.st_mtime < b2.st_mtime);
+ timespeccmp(&b1.st_mtim, &b2.st_mtim, <));
}
static int