]> Savannah Git Hosting - gnulib.git/commit
parse-datetime: handle timezones reentrantly
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 21 Jan 2017 01:11:55 +0000 (17:11 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 21 Jan 2017 02:04:56 +0000 (18:04 -0800)
commit4e6e16b3f43ce96302b1e52e48730c1f15e18c14
treed47518b53eb2f92d8cdf91a49ce54620d1dece85
parentdd7a8712b81e3b31906ae57490f052f1655d5435
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.
ChangeLog
NEWS
lib/parse-datetime.h
lib/parse-datetime.y
modules/parse-datetime