WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
UNCONFIRMED
51977
Detection of timegm() is incorrect for LSB compilers
https://bugs.webkit.org/show_bug.cgi?id=51977
Summary
Detection of timegm() is incorrect for LSB compilers
Craig Scott
Reported
2011-01-05 18:14:38 PST
In JavaScriptCore/wtf/Platform.h the detection for availability of timegm() is as follows: #if !OS(WINDOWS) && !OS(SOLARIS) && !OS(QNX) \ && !OS(SYMBIAN) && !OS(HAIKU) && !OS(RVCT) \ && !OS(ANDROID) && !PLATFORM(BREWMP) #define HAVE_TM_GMTOFF 1 #define HAVE_TM_ZONE 1 #define HAVE_TIMEGM 1 #endif However, under linux with LSB compilers, there is no timegm() either. Therefore, an additional !defined(__LSB_VERSION__) needs to be added to the #if condition.
Attachments
Add attachment
proposed patch, testcase, etc.
Craig Scott
Comment 1
2011-01-05 18:22:36 PST
Sorry, not quite right. The corrected version of the code should be this: #if !OS(WINDOWS) && !OS(SOLARIS) && !OS(QNX) \ && !OS(SYMBIAN) && !OS(HAIKU) && !OS(RVCT) \ && !OS(ANDROID) && !PLATFORM(BREWMP) #define HAVE_TM_GMTOFF 1 #define HAVE_TM_ZONE 1 #if !defined(__LSB_VERSION__) #define HAVE_TIMEGM 1 #endif #endif The LSB spec *does* have tm_gmtoff and tm_zone in the tm data structure since LSB 1.2, which basically all linux distributions would adhere to by now.
Patrick R. Gansterer
Comment 2
2011-01-06 12:04:41 PST
Can you provide a patch for this? See
http://webkit.org/coding/contributing.html
Laszlo Gombos
Comment 3
2012-08-05 17:15:42 PDT
It would be beneficial to understand the extent of changes required to build webkit with LSB compilers. Is this the only change required ? Reference to the Qt bug -
https://bugreports.qt-project.org/browse/QTBUG-16336?focusedCommentId=136479&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
. Reference to LSB -
http://www.linuxbase.org/navigator/browse/int_single.php?cmd=list-by-name&Ilibrary=libc&Iname=timegm
Craig Scott
Comment 4
2012-08-07 21:14:36 PDT
There were three LSB-related bugs that I filed around the same time. These arose from building the webkit part within Qt. I do not work on webkit directly as it stands outside of the Qt code base. I've also since changed companies, so I can't commit time to these issues currently. For reference, the other two LSB-related bugs were
bug 51974
and
bug 51972
. None of the three bugs should require more than the trivial changes mentioned in each bug report.
Craig Scott
Comment 5
2012-08-07 21:18:43 PDT
FWIW, if you want to know what breaks when building webkit with LSB compilers, just download the LSB SDK and use the lsbcc and lsbc++ compilers instead of gcc and g++ respectively. The compilers will soon tell you if something breaks. ;)
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug