From 45e726de6b22b01735ddca65cfb80a5f3d755a34 Mon Sep 17 00:00:00 2001 From: Harco de Hilster <harcoh@caos.kun.nl> Date: Wed, 25 Aug 1999 13:47:04 +0000 Subject: [PATCH] fixed mingw32 problem. Now correctly deals with egcs / <=gcc-2.8 issue. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/timercmn.cpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/common/timercmn.cpp b/src/common/timercmn.cpp index 862c1c05f1..b4142eac9c 100644 --- a/src/common/timercmn.cpp +++ b/src/common/timercmn.cpp @@ -141,22 +141,18 @@ bool wxGetLocalTime(long *timeZone, int *dstObserved) struct tm *tp; time(&t0); tp = localtime(&t0); - *timeZone = _timezone; // tp->tm_gmtoff; // ??? - *dstObserved = tp->tm_isdst; -#elif 0 - /* HH: This code apparently was needed by very old Mingw-gcc versions - * Modern mingw's don't need it. Since old gcc isn't supported anyway, - * I think this stuff can go */ - time_t t0; - struct tm *tp; - time(&t0); - tp = localtime(&t0); +# if __GNUC__ == 2 && __GNUC_MINOR__ <= 8 + // gcc 2.8.x or earlier timeb tz; ftime(& tz); *timeZone = tz._timezone; +# else + // egcs or gcc 2.95 + *timeZone = _timezone; // tp->tm_gmtoff; // ??? +# endif *dstObserved = tp->tm_isdst; #else - +// not mingw32... #if (((defined(__SYSV__) && !defined(__HPUX__)) || defined(__MSDOS__) || defined(__WXMSW__) || defined(__WXPM__)) \ && !defined(__GNUWIN32__) && !defined(__MWERKS__) ) # if defined(__BORLANDC__) -- 2.47.2