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
This commit is contained in:
parent
6970c7b916
commit
45e726de6b
@ -141,22 +141,18 @@ bool wxGetLocalTime(long *timeZone, int *dstObserved)
|
|||||||
struct tm *tp;
|
struct tm *tp;
|
||||||
time(&t0);
|
time(&t0);
|
||||||
tp = localtime(&t0);
|
tp = localtime(&t0);
|
||||||
*timeZone = _timezone; // tp->tm_gmtoff; // ???
|
# if __GNUC__ == 2 && __GNUC_MINOR__ <= 8
|
||||||
*dstObserved = tp->tm_isdst;
|
// gcc 2.8.x or earlier
|
||||||
#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);
|
|
||||||
timeb tz;
|
timeb tz;
|
||||||
ftime(& tz);
|
ftime(& tz);
|
||||||
*timeZone = tz._timezone;
|
*timeZone = tz._timezone;
|
||||||
|
# else
|
||||||
|
// egcs or gcc 2.95
|
||||||
|
*timeZone = _timezone; // tp->tm_gmtoff; // ???
|
||||||
|
# endif
|
||||||
*dstObserved = tp->tm_isdst;
|
*dstObserved = tp->tm_isdst;
|
||||||
#else
|
#else
|
||||||
|
// not mingw32...
|
||||||
#if (((defined(__SYSV__) && !defined(__HPUX__)) || defined(__MSDOS__) || defined(__WXMSW__) || defined(__WXPM__)) \
|
#if (((defined(__SYSV__) && !defined(__HPUX__)) || defined(__MSDOS__) || defined(__WXMSW__) || defined(__WXPM__)) \
|
||||||
&& !defined(__GNUWIN32__) && !defined(__MWERKS__) )
|
&& !defined(__GNUWIN32__) && !defined(__MWERKS__) )
|
||||||
# if defined(__BORLANDC__)
|
# if defined(__BORLANDC__)
|
||||||
|
Loading…
Reference in New Issue
Block a user