From: eck Date: Mon, 9 Apr 1990 17:03:58 +0000 (+0000) Subject: timezone info should not end up in rom X-Git-Tag: release-5-5~1747 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=dd5ef3905f9c2f12b08169e62578ae06f08ecf9f;p=ack.git timezone info should not end up in rom --- diff --git a/lang/cem/libcc.ansi/time/misc.c b/lang/cem/libcc.ansi/time/misc.c index d5bae4bc8..e7cc1a485 100644 --- a/lang/cem/libcc.ansi/time/misc.c +++ b/lang/cem/libcc.ansi/time/misc.c @@ -36,14 +36,21 @@ void _ftime(struct timeb *bp); #include "loc_incl.h" -/* The following define of TZ_LEN must match the number of characters - * of the elements of tzname. - */ -#define TZ_LEN 10 #define RULE_LEN 120 +#define TZ_LEN 10 + +/* Make sure that the strings do not end up in ROM. + */ +static char ntstr[TZ_LEN + 1] = "MET"; /* string for normal time */ +static char dststr[TZ_LEN + 1] = "MDT"; /* string for daylight saving */ + +long _timezone = -1 * 60 * 60; +long _dst_off = 60 * 60; +int _daylight = -1; +char *_tzname[2] = {ntstr, dststr}; #if defined(__USG) || defined(_POSIX_SOURCE) -char *tzname[2] = {"MET\0\0\0\0\0\0\0", "MDT\0\0\0\0\0\0\0"}; +char *tzname[2] = {ntstr, dststr}; #if defined(__USG) long timezone = -1 * 60 * 60; @@ -51,11 +58,6 @@ int daylight = 1; #endif #endif -long _timezone = -1 * 60 * 60; -long _dst_off = 60 * 60; -int _daylight = -1; -char *_tzname[2] = {"MET\0\0\0\0\0\0\0", "MDT\0\0\0\0\0\0\0"}; - static struct dsttype { char ds_type; /* Unknown, Julian, Zero-based or M */ int ds_date[3]; /* months, weeks, days */