summaryrefslogtreecommitdiff
path: root/lib/tzset.c
Commit message (Collapse)AuthorAgeFilesLines
* all: prefer https: URLsPaul Eggert2017-09-131-1/+1
|
* tzset: Expand comment about TZ problem on native Windows.Bruno Haible2017-05-091-3/+22
| | | | | | | | | | * lib/tzset.c (tzset): Elaborate comment, based on explanations by Paul Eggert. * lib/ctime.c (rpl_ctime): Likewise. * lib/localtime.c (rpl_localtime): Likewise. * lib/mktime.c (mktime): Likewise. * lib/strftime-fixes.c (rpl_strftime): Likewise. * lib/wcsftime.c (rpl_wcsftime): Likewise.
* tzset: Work around TZ problem on native Windows.Bruno Haible2017-05-011-0/+16
| | | | | | | | | | | | * m4/tzset.m4 (gl_FUNC_TZSET): Require AC_CANONICAL_HOST. On native Windows, set REPLACE_TZSET to 1. * lib/tzset.c (tzset): On native Windows, fix TZ if necessary, and invoke '_tzset' instead of 'tzset'. * doc/posix-functions/tzset.texi: Mention the native Windows workaround. * modules/time_rz (Depends-on): Add tzset. * lib/time_rz.c (tzset): Remove fallback definition. * m4/time_rz.m4 (gl_TIME_RZ): Don't test for tzset.
* New module 'localtime-buffer', split off from module 'gettimeofday'.Bruno Haible2017-05-011-0/+48
* lib/localtime-buffer.h: New file. * lib/localtime-buffer.c: New file, extracted from lib/gettimeofday.c. * lib/time.in.h (tzset): New declaration. (localtime, gmtime): Don't test GNULIB_GETTIMEOFDAY. * lib/tzset.c: New file, extracted from lib/gettimeofday.c. * lib/gettimeofday.c: Include localtime-buffer.h. Remove code that was moved to lib/localtime-buffer.c or lib/tzset.c. * m4/localtime-buffer.m4: New file. * m4/time_h.m4 (gl_HEADER_TIME_H_DEFAULTS): Initialize GNULIB_TZSET, HAVE_TZSET, REPLACE_TZSET. * m4/tzset.m4 (gl_FUNC_TZSET): Move code from m4/gettimeofday.m4 to here, with modifications. Set HAVE_TZSET, REPLACE_TZSET. Invoke gl_LOCALTIME_BUFFER_NEEDED. (gl_FUNC_TZSET_CLOBBER): Don't require gl_HEADER_SYS_TIME_H; not needed since 2007-01-18. * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Remove code that deals with tzset. (gl_FUNC_GETTIMEOFDAY_CLOBBER): Require gl_LOCALTIME_BUFFER_DEFAULTS. Invoke gl_LOCALTIME_BUFFER_NEEDED instead of gl_GETTIMEOFDAY_REPLACE_LOCALTIME. (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Remove macro. * modules/localtime-buffer: New file. * modules/time (Depends-on): Remove 'gettimeofday'. (Makefile.am): Substitute GNULIB_TZSET, HAVE_TZSET, REPLACE_TZSET. Don't substitute GNULIB_GETTIMEOFDAY. * modules/tzset (Description): Enable hyperlink to POSIX spec. (Files): Add lib/tzset.c. (Depends-on): Remove gettimeofday. Add localtime-buffer, time. (configure.ac): Arrange to conditionally compile lib/tzset.c. Invoke gl_TIME_MODULE_INDICATOR. * modules/gettimeofday (Depends-on): Add localtime-buffer.