Problem with tm_gmtoff in kjs

Harri Porten porten at froglogic.com
Thu Jan 19 07:29:35 GMT 2006


On Thu, 19 Jan 2006, Christian Ehrlicher wrote:

> In kjs/date_object.cpp you're using tm.tm_gmtoff which isn't defined on
> win32. Afaik this member is a BSD extension and so not available
> everywhere.So my question is what to do with this:
> - define the structure with tm_gmtoff (and tm_zone) for win32 (this is
> possible because win32 sdk headers mask the definition with '#ifndef
> _TM_DEFINED')
> - mask the usage of tm_gmtoff with '#ifndef Q_OS_WIN'

Checking for _WIN32 would be preferrable as the Q_OS_* macros are not set
in kjs.

> - add a check for tm_gmtoff in bksys/unsermake and mask then with '#ifdef
> HAVE_TM_GMTOFF'

Is this with trunk or a 3.x branch?

The 3.x versions were normally working pretty well on Window. In trunk I
see this change introduced by the JavaScriptCore "merge":

 http://websvn.kde.org/branches/work/kdelibs-js/kjs/date_object.cpp?rev=478757&r1=478730&r2=478757

It removes the platform specific #ifdef's we had in before. Instead of
t.tm_gmtoff we used -timezone.

Harri.





More information about the kde-core-devel mailing list