1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-10 04:43:00 +03:00
Files
gnulib/modules/parse-datetime
Paul Eggert 4e6e16b3f4 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.
2017-01-20 18:04:56 -08:00

58 lines
1.2 KiB
Plaintext

Description:
Convert a date/time string to linear time.
Files:
doc/parse-datetime.texi
lib/parse-datetime.h
lib/parse-datetime.y
m4/bison.m4
m4/tm_gmtoff.m4
m4/parse-datetime.m4
Depends-on:
c-ctype
stdbool
gettime
gettext-h
intprops
mktime
setenv
strftime
unsetenv
time
time_r
time_rz
timegm
verify
configure.ac:
gl_PARSE_DATETIME
Makefile.am:
# This rule overrides the Automake generated .y.c rule, to ensure that the
# parse-datetime.c file gets generated in the source directory, not in the
# build directory.
parse-datetime.c: parse-datetime.y
$(AM_V_GEN)$(SHELL) $(YLWRAP) $(srcdir)/parse-datetime.y \
y.tab.c parse-datetime.c \
y.tab.h parse-datetime.h \
y.output parse-datetime.output \
-- $(YACC) $(YFLAGS) $(AM_YFLAGS) && \
sed -e 's|".*/parse-datetime.y"|"parse-datetime.y"|' \
< parse-datetime.c > parse-datetime.c-t && \
mv parse-datetime.c-t $(srcdir)/parse-datetime.c
lib_SOURCES += parse-datetime.y
BUILT_SOURCES += parse-datetime.c
MOSTLYCLEANFILES += parse-datetime.c-t
MAINTAINERCLEANFILES += parse-datetime.c
EXTRA_DIST += parse-datetime.c
Include:
"parse-datetime.h"
License:
LGPLv2+
Maintainer:
Paul Eggert