mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2026-05-06 22:48:54 +00:00
Port to x32 by fixing type incompatibility with POSIX.
Reported by Elliott Hughes in <http://mm.icann.org/pipermail/tz/2013-September/020376.html>. * localtime.c (timezone) [USG_COMPAT]: (altzone) [ALTZONE]: Now long, not time_t. * strftime.c (_fmt): Use long, not int, to store timezone. * NEWS: Document this.
This commit is contained in:
10
NEWS
10
NEWS
@@ -13,6 +13,16 @@ Unreleased, experimental changes
|
|||||||
|
|
||||||
Palestine will fall back at 00:00, not 01:00. (Thanks to Steffen Thorsen.)
|
Palestine will fall back at 00:00, not 01:00. (Thanks to Steffen Thorsen.)
|
||||||
|
|
||||||
|
Changes affecting API
|
||||||
|
|
||||||
|
The types of the global variables 'timezone' and 'altzone' (if present)
|
||||||
|
have been changed back to 'long'. This is required for 'timezone'
|
||||||
|
by POSIX, and for 'altzone' by common practice, e.g., Solaris 11.
|
||||||
|
These variables were originally 'long' in the tz code, but were
|
||||||
|
mistakenly changed to 'time_t' in 1987; nobody reported the
|
||||||
|
incompatibility until now. The difference matters on x32, where
|
||||||
|
'long' is 32 bits and 'time_t' is 64. (Thanks to Elliott Hughes.)
|
||||||
|
|
||||||
Changes affecting the build procedure
|
Changes affecting the build procedure
|
||||||
|
|
||||||
Avoid long strings in leapseconds.awk to work around a mawk bug.
|
Avoid long strings in leapseconds.awk to work around a mawk bug.
|
||||||
|
|||||||
@@ -215,12 +215,12 @@ char * tzname[2] = {
|
|||||||
static struct tm tm;
|
static struct tm tm;
|
||||||
|
|
||||||
#ifdef USG_COMPAT
|
#ifdef USG_COMPAT
|
||||||
time_t timezone = 0;
|
long timezone = 0;
|
||||||
int daylight = 0;
|
int daylight = 0;
|
||||||
#endif /* defined USG_COMPAT */
|
#endif /* defined USG_COMPAT */
|
||||||
|
|
||||||
#ifdef ALTZONE
|
#ifdef ALTZONE
|
||||||
time_t altzone = 0;
|
long altzone = 0;
|
||||||
#endif /* defined ALTZONE */
|
#endif /* defined ALTZONE */
|
||||||
|
|
||||||
static int_fast32_t
|
static int_fast32_t
|
||||||
|
|||||||
@@ -492,7 +492,7 @@ label:
|
|||||||
continue;
|
continue;
|
||||||
case 'z':
|
case 'z':
|
||||||
{
|
{
|
||||||
int diff;
|
long diff;
|
||||||
char const * sign;
|
char const * sign;
|
||||||
|
|
||||||
if (t->tm_isdst < 0)
|
if (t->tm_isdst < 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user