summaryrefslogtreecommitdiff
path: root/src/time.c
diff options
context:
space:
mode:
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