diff options
Diffstat (limited to 'usr.bin/dig/lib/isc/unix')
| -rw-r--r-- | usr.bin/dig/lib/isc/unix/include/isc/time.h | 22 | ||||
| -rw-r--r-- | usr.bin/dig/lib/isc/unix/time.c | 20 |
2 files changed, 2 insertions, 40 deletions
diff --git a/usr.bin/dig/lib/isc/unix/include/isc/time.h b/usr.bin/dig/lib/isc/unix/include/isc/time.h index ef3bb36b6bf..9215c8cc972 100644 --- a/usr.bin/dig/lib/isc/unix/include/isc/time.h +++ b/usr.bin/dig/lib/isc/unix/include/isc/time.h @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: time.h,v 1.12 2020/02/16 21:09:32 florian Exp $ */ +/* $Id: time.h,v 1.13 2020/02/16 21:10:07 florian Exp $ */ #ifndef ISC_TIME_H #define ISC_TIME_H 1 @@ -25,12 +25,6 @@ #include <time.h> #include <isc/types.h> -/* - * ISC_FORMATHTTPTIMESTAMP_SIZE needs to be 30 in C locale and potentially - * more for other locales to handle longer national abbreviations when - * expanding strftime's %a and %b. - */ -#define ISC_FORMATHTTPTIMESTAMP_SIZE 50 /*** *** Absolute Times @@ -66,18 +60,4 @@ isc_time_microdiff(const struct timespec *t1, const struct timespec *t2); *\li The difference of t1 - t2, or 0 if t1 <= t2. */ -void -isc_time_formathttptimestamp(const struct timespec *t, char *buf, unsigned int len); -/*%< - * Format the time 't' into the buffer 'buf' of length 'len', - * using a format like "Mon, 30 Aug 2000 04:06:47 GMT" - * If the text does not fit in the buffer, the result is indeterminate, - * but is always guaranteed to be null terminated. - * - * Requires: - *\li 'len' > 0 - *\li 'buf' points to an array of at least len chars - * - */ - #endif /* ISC_TIME_H */ diff --git a/usr.bin/dig/lib/isc/unix/time.c b/usr.bin/dig/lib/isc/unix/time.c index bdc2ea89c0a..34b3115a9dc 100644 --- a/usr.bin/dig/lib/isc/unix/time.c +++ b/usr.bin/dig/lib/isc/unix/time.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: time.c,v 1.15 2020/02/16 21:09:32 florian Exp $ */ +/* $Id: time.c,v 1.16 2020/02/16 21:10:07 florian Exp $ */ /*! \file */ @@ -66,21 +66,3 @@ isc_time_microdiff(const struct timespec *t1, const struct timespec *t2) { return ((res.tv_sec * NS_PER_S + res.tv_nsec) / NS_PER_US); } - -void -isc_time_formathttptimestamp(const struct timespec *t, char *buf, unsigned int len) { - unsigned int flen; - - REQUIRE(t != NULL); - INSIST(t->tv_nsec < NS_PER_S); - REQUIRE(buf != NULL); - REQUIRE(len > 0); - - /* - * 5 spaces, 1 comma, 3 GMT, 2 %d, 4 %Y, 8 %H:%M:%S, 3+ %a, 3+ %b (29+) - */ - - flen = strftime(buf, len, "%a, %d %b %Y %H:%M:%S GMT", - gmtime(&t->tv_sec)); - INSIST(flen < len); -} |
