diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2017-01-20 17:11:55 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2017-01-20 18:04:56 -0800 |
commit | 4e6e16b3f43ce96302b1e52e48730c1f15e18c14 (patch) | |
tree | d47518b53eb2f92d8cdf91a49ce54620d1dece85 /modules/parse-datetime | |
parent | dd7a8712b81e3b31906ae57490f052f1655d5435 (diff) | |
download | gnulib-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 'modules/parse-datetime')
-rw-r--r-- | modules/parse-datetime | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/parse-datetime b/modules/parse-datetime index 20d4236417..5d10137425 100644 --- a/modules/parse-datetime +++ b/modules/parse-datetime @@ -20,9 +20,10 @@ setenv strftime unsetenv time +time_r +time_rz timegm verify -xalloc configure.ac: gl_PARSE_DATETIME |