X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=sbr%2Fdtime.c;h=aa346216d274e009b13a86c8493808f02c3c85e3;hb=4548981fb45fbc917cc2c26b7c96b31cfa14bc9b;hp=7ec75511a38928b7c635ffeb86ebd88185aa0e75;hpb=6a68057d8ef48bef3ee752741a53a629a2840e68;p=mmh diff --git a/sbr/dtime.c b/sbr/dtime.c index 7ec7551..aa34621 100644 --- a/sbr/dtime.c +++ b/sbr/dtime.c @@ -12,16 +12,6 @@ #include #include -#if !defined(HAVE_STRUCT_TM_TM_GMTOFF) -extern int daylight; -extern long timezone; -extern char *tzname[]; -#endif - -#ifndef abs -# define abs(a) (a >= 0 ? a : -a) -#endif - /* * The number of days in the year, accounting for leap years */ @@ -109,14 +99,8 @@ dlocaltime (time_t *clock) if (tm->tm_isdst) tw.tw_flags |= TW_DST; -#ifdef HAVE_STRUCT_TM_TM_GMTOFF - tw.tw_zone = tm->tm_gmtoff / 60; - if (tm->tm_isdst) /* if DST is in effect */ - tw.tw_zone -= 60; /* reset to normal offset */ -#else tzset(); tw.tw_zone = -(timezone / 60); -#endif tw.tw_flags &= ~TW_SDAY; tw.tw_flags |= TW_SEXP;