Displaying 1 result from an estimated 1 matches for "mtimecmp".
Did you mean:
utimecmp
2023 Jan 03
1
mips64el stat/time/…? problem
...d to echo 1 (false) because a is not newer than b.
The test code is roughly:
// const char *opnd1 = "a";
// const char *opnd2 = "b";
// struct stat b1, b2;
// int s;
return (test_stat(opnd1, &b1) == 0 &&
(((s = test_stat(opnd2, &b2)) == 0 &&
mtimecmp(&b1, &b2) > 0) || s < 0));
// #define st_mtimensec st_mtim.tv_nsec
// #define HAVE_ST_MTIMENSEC 1
static int
mtimecmp(const struct stat *sb1, const struct stat *sb2)
{
if (sb1->st_mtime < sb2->st_mtime)
return (-1);
if (sb1->st_mtime > sb2->st_mtime)
return (...