summaryrefslogtreecommitdiff
path: root/src/time.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-05-16 16:33:34 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-05-16 16:33:34 +0200
commit92fd2382d9959ad6e11b26a4c7703d9336d75243 (patch)
tree3c93f2c8fe52626c61083812c728435252e59608 /src/time.c
parent246015cb71b7f0a599d1870185d73f2326adb911 (diff)
parent6d36bb20f860c069631bc50dce7e332c80a54730 (diff)
Merge branch 'feature/upstream' into develop
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