diff options
author | cinap_lenrek <cinap_lenrek@centraldogma> | 2011-06-04 21:44:21 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@centraldogma> | 2011-06-04 21:44:21 +0000 |
commit | 546cd2bea2dafe3104b1647c6a5db1b3af0353d0 (patch) | |
tree | d08afad9d37740bb9960e9f18a7e973c46f193ce /sys/src/ape | |
parent | ff0bd4e552b2d4ec9aae874a54236955f73d63ea (diff) |
ape: fix symbol name collision for by renaming static timezone struct to tz
Diffstat (limited to 'sys/src/ape')
-rw-r--r-- | sys/src/ape/lib/ap/plan9/ctime.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/sys/src/ape/lib/ap/plan9/ctime.c b/sys/src/ape/lib/ap/plan9/ctime.c index 34a0b12a5..ce56c2d0f 100644 --- a/sys/src/ape/lib/ap/plan9/ctime.c +++ b/sys/src/ape/lib/ap/plan9/ctime.c @@ -64,7 +64,7 @@ struct long stdiff; long dldiff; long dlpairs[TZSIZE]; -} timezone; +} tz; char* ctime(const time_t *t) @@ -151,14 +151,14 @@ localtime_r(const time_t *timp, struct tm *result) int i, dlflag; tim = *timp; - if(timezone.stname[0] == 0) + if(tz.stname[0] == 0) readtimezone(); - t = tim + timezone.stdiff; + t = tim + tz.stdiff; dlflag = 0; - for(p = timezone.dlpairs; *p; p += 2) + for(p = tz.dlpairs; *p; p += 2) if(t >= p[0]) if(t < p[1]) { - t = tim + timezone.dldiff; + t = tim + tz.dldiff; dlflag++; break; } @@ -242,25 +242,25 @@ readtimezone(void) goto error; close(i); p = buf; - if(rd_name(&p, timezone.stname)) + if(rd_name(&p, tz.stname)) goto error; - if(rd_long(&p, &timezone.stdiff)) + if(rd_long(&p, &tz.stdiff)) goto error; - if(rd_name(&p, timezone.dlname)) + if(rd_name(&p, tz.dlname)) goto error; - if(rd_long(&p, &timezone.dldiff)) + if(rd_long(&p, &tz.dldiff)) goto error; for(i=0; i<TZSIZE; i++) { - if(rd_long(&p, &timezone.dlpairs[i])) + if(rd_long(&p, &tz.dlpairs[i])) goto error; - if(timezone.dlpairs[i] == 0) + if(tz.dlpairs[i] == 0) return; } error: - timezone.stdiff = 0; - strcpy(timezone.stname, "GMT"); - timezone.dlpairs[0] = 0; + tz.stdiff = 0; + strcpy(tz.stname, "GMT"); + tz.dlpairs[0] = 0; } static |