summaryrefslogtreecommitdiff
path: root/lib/parse-datetime.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-01-20 17:11:55 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2017-01-20 18:04:56 -0800
commit4e6e16b3f43ce96302b1e52e48730c1f15e18c14 (patch)
treed47518b53eb2f92d8cdf91a49ce54620d1dece85 /lib/parse-datetime.h
parentdd7a8712b81e3b31906ae57490f052f1655d5435 (diff)
downloadgnulib-4e6e16b3f43ce96302b1e52e48730c1f15e18c14.tar.gz
parse-datetime: handle timezones reentrantly
This API change was prompted by a report by Pádraig Brady in: https://bug.debian.org/851934#10 To help fix the bug, make parse_datetime2 more reentrant. * NEWS: Document this incompatible change. * lib/parse-datetime.h, lib/parse-datetime.y (parse_datetime2): Add two arguments, the timezone and the timezone name. All callers changed. If TZ="..." is specified, use it for calculating defaults. * lib/parse-datetime.y: Don't include xalloc.h or use xmalloc, as this code should be usable in a library. (mktime_ok, get_effective_timezone): Accept timezone arg too. All callers changed. (get_tz): Remove. (get_effective_timezone): Check for failures. * modules/parse-datetime: Add time_r, time_rz. Remove xalloc.
Diffstat (limited to 'lib/parse-datetime.h')
-rw-r--r--lib/parse-datetime.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/parse-datetime.h b/lib/parse-datetime.h
index fa6a9a3769..2be5faa837 100644
--- a/lib/parse-datetime.h
+++ b/lib/parse-datetime.h
@@ -26,4 +26,4 @@ bool parse_datetime (struct timespec *, char const *, struct timespec const *);
/* same as above, supporting additional flags */
bool parse_datetime2 (struct timespec *, char const *, struct timespec const *,
- unsigned int flags);
+ unsigned int flags, timezone_t, char const *);