1 $NetBSD: patch-ak,v 1.1 2006/10/12 14:14:13 joerg Exp $
3 --- src/pl-tai.c.orig 2006-07-28 09:20:12.000000000 +0000
5 @@ -38,11 +38,8 @@ long set by tzset(). Not really clean .
8 #define timezone _timezone
9 -#define daylight _daylight
11 extern char *tzname[2];
12 -extern long timezone;
17 @@ -82,8 +79,21 @@ do_tzset()
24 + time_t now = time(NULL), t_gmt, t_local;
25 + struct tm gmt, local;
29 + gmtime_r(&now, &gmt);
30 + t_gmt = mktime(&gmt);
31 + localtime_r(&now, &local);
32 + t_local = mktime(&local);
33 + diff = t_local - t_gmt;
41 @@ -312,14 +322,12 @@ PRED_IMPL("stamp_date_time", 3, stamp_da
43 ct.minute = tm.tm_min;
44 tzatom = tz_name_as_atom(tm.tm_isdst);
45 - if ( daylight ) /* from tzset() */
46 - { if ( tm.tm_isdst )
51 { dstatom = ATOM_false;
56 } else if ( alocal == ATOM_utc )
57 @@ -721,12 +729,10 @@ PRED_IMPL("format_time", 3, format_time,
58 { localtime_r(&unixt, &tb.tm);
59 tb.sec = (double)tb.tm.tm_sec + modf(tb.stamp, &ip);
60 tb.utcoff = tz_offset();
62 - { if ( tb.tm.tm_isdst )
63 + if ( tb.tm.tm_isdst )
68 tb.tzname = tz_name_as_atom(tb.tm.tm_isdst);
69 tb.flags = HAS_STAMP|HAS_WYDAY;