From 1ca8b4d9e81bfe7bed51fa6b858d59b721143054 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 13 Feb 2020 17:08:23 -0500 Subject: time: Split out time-related functions from util --- util.h | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) (limited to 'util.h') diff --git a/util.h b/util.h index ae12703..6e7c1f2 100644 --- a/util.h +++ b/util.h @@ -27,7 +27,6 @@ #include #include #include -#include // Some portability concerns @@ -159,52 +158,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--). * -- cgit v1.2.3