diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-09-10 18:47:17 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-09-10 18:47:17 +0200 |
commit | ec66c414866572fcd77a5bf7e4a444e84d8aa804 (patch) | |
tree | 50b95bea4fdc18396e581506369bd7d67bcc438b /src/time.c | |
parent | 41aba5755c9fa6082aec99c4fec6c571f8e5062a (diff) | |
parent | 4fbd529e776527e548b343a82e14d1cb7eb30764 (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.c | 23 |
1 files changed, 11 insertions, 12 deletions
@@ -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 |