diff options
| author | Cy Schubert <cy@FreeBSD.org> | 2023-06-26 22:56:52 +0000 |
|---|---|---|
| committer | Cy Schubert <cy@FreeBSD.org> | 2023-06-26 22:56:52 +0000 |
| commit | b6a943f7197af1a5eb6bb028b9b808ec5016e30c (patch) | |
| tree | cfbb91e940dd89d0e1d46095f43c228d7d079fa0 /lib/roken/parse_time.c | |
| parent | 6f4e10db3298f6d65e1e646fe52aaafc3682b788 (diff) | |
heimdal: Vendor import f62e2f278vendor/heimdal/7.8.0-2023-06-10-f62e2f278vendor/heimdal
Heimdal 7.8.0 does not support OpenSSL 3.0. 7.9.0 will but it hasn't
been released yet. We are importing f62e2f278 for its OpenSSL 3.0
support.
Diffstat (limited to 'lib/roken/parse_time.c')
| -rw-r--r-- | lib/roken/parse_time.c | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/lib/roken/parse_time.c b/lib/roken/parse_time.c index febd6a5d2bf6..f5a99e31a84b 100644 --- a/lib/roken/parse_time.c +++ b/lib/roken/parse_time.c @@ -50,20 +50,20 @@ static struct units time_units[] = { {NULL, 0}, }; -ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL +ROKEN_LIB_FUNCTION int64_t ROKEN_LIB_CALL parse_time (const char *s, const char *def_unit) { return parse_units (s, time_units, def_unit); } ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL -unparse_time (int t, char *s, size_t len) +unparse_time(int64_t t, char *s, size_t len) { return unparse_units (t, time_units, s, len); } ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL -unparse_time_approx (int t, char *s, size_t len) +unparse_time_approx(int64_t t, char *s, size_t len) { return unparse_units_approx (t, time_units, s, len); } @@ -73,3 +73,32 @@ print_time_table (FILE *f) { print_units_table (time_units, f); } + +#undef parse_time +#undef unparse_time +#undef unparse_time_approx +#undef print_time_table + +ROKEN_LIB_FUNCTION int64_t ROKEN_LIB_CALL +parse_time(const char *s, const char *def_unit) +{ + return rk_parse_units(s, time_units, def_unit); +} + +ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL +unparse_time(int64_t t, char *s, size_t len) +{ + return rk_unparse_units(t, time_units, s, len); +} + +ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL +unparse_time_approx(int64_t t, char *s, size_t len) +{ + return rk_unparse_units_approx(t, time_units, s, len); +} + +ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL +print_time_table(FILE *f) +{ + rk_print_units_table(time_units, f); +} |
