summaryrefslogtreecommitdiff
path: root/src/time.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-09-10 18:47:17 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-09-10 18:47:17 +0200
commitec66c414866572fcd77a5bf7e4a444e84d8aa804 (patch)
tree50b95bea4fdc18396e581506369bd7d67bcc438b /src/time.c
parent41aba5755c9fa6082aec99c4fec6c571f8e5062a (diff)
parent4fbd529e776527e548b343a82e14d1cb7eb30764 (diff)
Merge branch 'release/experimental/3.25-1_exp1' into masterexperimental/3.25-1_exp1
Diffstat (limited to 'src/time.c')
-rw-r--r--src/time.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/time.c b/src/time.c
index 3d25042..e7eee3f 100644
--- a/src/time.c
+++ b/src/time.c
@@ -81,12 +81,6 @@ EXPORT_SYMBOL struct timespec *HX_timespec_sub(struct timespec *r,
return HX_timespec_add(r, a, HX_timespec_neg(&b2, b));
}
-EXPORT_SYMBOL void HX_diff_timespec(struct timespec *delta,
- const struct timespec *future, const struct timespec *past)
-{
- HX_timespec_sub(delta, future, past);
-}
-
EXPORT_SYMBOL struct timespec *
HX_timespec_mul(struct timespec *r, const struct timespec *a, int f)
{
@@ -141,12 +135,6 @@ EXPORT_SYMBOL struct timeval *HX_timeval_sub(struct timeval *delta,
}
return delta;
}
-
-EXPORT_SYMBOL void HX_diff_timeval(struct timeval *delta,
- const struct timeval *future, const struct timeval *past)
-{
- HX_timeval_sub(delta, future, past);
-}
#endif
EXPORT_SYMBOL long HX_time_compare(const struct stat *a,
@@ -210,6 +198,17 @@ EXPORT_SYMBOL long HX_time_compare(const struct stat *a,
return a->st_atime - b->st_atime;
else if (sel == 'c')
return a->st_ctime - b->st_ctime;
+#elif defined(HAVE_STRUCT_STAT_ST_MTIM)
+ if (sel == 'm')
+ return a->st_mtim - b->st_mtim;
+#ifdef HAVE_STRUCT_STAT_ST_OTIM
+ else if (sel == 'o')
+ return a->st_otim - b->st_otim;
+#endif
+ else if (sel == 'a')
+ return a->st_atim - b->st_atim;
+ else if (sel == 'c')
+ return a->st_ctim - b->st_ctim;
#else
# error Tis not ending well.
#endif