X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Ftime%2F__tz.c;h=3e2fcdcbb6a48d000497e2bd36234a2e9c88f0cf;hb=937822abb6ac48880939be3c60e6b57bddf62cf6;hp=51e665141b53209ae645be010cc636b5a69aeaa1;hpb=5f12ffe1239a5e4f8d4e98e2dff4e191a71f4693;p=musl diff --git a/src/time/__tz.c b/src/time/__tz.c index 51e66514..3e2fcdcb 100644 --- a/src/time/__tz.c +++ b/src/time/__tz.c @@ -4,8 +4,15 @@ #include #include #include +#include #include "libc.h" #include "lock.h" +#include "fork_impl.h" + +#define malloc __libc_malloc +#define calloc undef +#define realloc undef +#define free undef long __timezone = 0; int __daylight = 0; @@ -30,6 +37,7 @@ static char *old_tz = old_tz_buf; static size_t old_tz_size = sizeof old_tz_buf; static volatile int lock[1]; +volatile int *const __timezone_lockptr = lock; static int getint(const char **p) { @@ -86,15 +94,15 @@ static void getname(char *d, const char **p) int i; if (**p == '<') { ++*p; - for (i=0; (*p)[i]!='>' && i 4 && map[4]=='2') { + if (map[4]!='1') { size_t skip = zi_dotprod(zi+20, VEC(1,1,8,5,6,1), 6); trans = zi+skip+44+44; scale++; @@ -194,7 +215,6 @@ static void do_tzset() const unsigned char *p; __tzname[0] = __tzname[1] = 0; __daylight = __timezone = dst_off = 0; - for (i=0; i<5; i++) r0[i] = r1[i] = 0; for (p=types; p