diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2020-02-13 17:08:23 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2020-02-13 17:08:23 -0500 |
commit | 1ca8b4d9e81bfe7bed51fa6b858d59b721143054 (patch) | |
tree | 2f5347c32bb5e9e7685a18bbcbf8ffe4ab3d1ddf /util.h | |
parent | 95f862fdd82a99e30bbf2c43009ec9a51e416804 (diff) | |
download | bfs-1ca8b4d9e81bfe7bed51fa6b858d59b721143054.tar.xz |
time: Split out time-related functions from util
Diffstat (limited to 'util.h')
-rw-r--r-- | util.h | 47 |
1 files changed, 0 insertions, 47 deletions
@@ -27,7 +27,6 @@ #include <regex.h> #include <stdbool.h> #include <sys/types.h> -#include <time.h> // Some portability concerns @@ -160,52 +159,6 @@ int pipe_cloexec(int pipefd[2]); char *xregerror(int err, const regex_t *regex); /** - * localtime_r() wrapper that calls tzset() first. - * - * @param timep - * The time_t to convert. - * @param result - * Buffer to hold the result. - * @return 0 on success, -1 on failure. - */ -int xlocaltime(const time_t *timep, struct tm *result); - -/** - * gmtime_r() wrapper that calls tzset() first. - * - * @param timep - * The time_t to convert. - * @param result - * Buffer to hold the result. - * @return 0 on success, -1 on failure. - */ -int xgmtime(const time_t *timep, struct tm *result); - -/** - * mktime() wrapper that reports errors more reliably. - * - * @param[in,out] tm - * The struct tm to convert. - * @param[out] timep - * Where to store the result. - * @return - * 0 on success, -1 on failure. - */ -int xmktime(struct tm *tm, time_t *timep); - -/** - * A portable timegm(), the inverse of gmtime(). - * - * @param[in,out] tm - * The struct tm to convert. - * @param[out] timep - * Where to store the result. - * @return - * 0 on success, -1 on failure. - */ -int xtimegm(struct tm *tm, time_t *timep); - -/** * Format a mode like ls -l (e.g. -rw-r--r--). * * @param mode |