summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2012-12-03 21:46:55 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-12 09:22:38 +0100
commit6eff4c3b26d92b51ed15e1341c3e57a5fbe47c04 (patch)
tree910b8d40c42a3b59e7cefbab579fbad7c43f5f8d
parent73e263c556f8220ba20ac3fe5dfe4b6a746f93e6 (diff)
purge ce-compat references
adapted from WebKit changes 125004 & 125018. Change-Id: Id051375924ece634acf2c0564a39c2d4b1cebe3c Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog14
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri2
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/runtime/DateConversion.cpp14
3 files changed, 28 insertions, 2 deletions
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
index 5ab23e6..00d3499 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
@@ -1,3 +1,17 @@
+2012-08-08 Patrick Gansterer <paroga@webkit.org>
+
+ [WIN] Use GetTimeZoneInformation() for getting the timezone name
+ https://bugs.webkit.org/show_bug.cgi?id=91936
+
+ Reviewed by Ryosuke Niwa.
+
+ The MS CRT implementation of strftime calls the same functions in the background.
+ Using them directly avoids the overhead of parsing the format string and removes
+ the dependency on strftime() for WinCE where this function does not exist.
+
+ * runtime/DateConversion.cpp:
+ (JSC::formatTime):
+
2010-07-08 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
index 0671e87..29dea36 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
@@ -63,8 +63,6 @@ contains(JAVASCRIPTCORE_JIT,no) {
}
wince* {
- INCLUDEPATH += $$QT.core.sources/../3rdparty/ce-compat
- SOURCES += $$QT.core.sources/../3rdparty/ce-compat/ce_time.c
DEFINES += WINCEBASIC
}
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DateConversion.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DateConversion.cpp
index f129407..2ca70ff 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DateConversion.cpp
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DateConversion.cpp
@@ -48,6 +48,10 @@
#include <wtf/DateMath.h>
#include <wtf/StringExtras.h>
+#if OS(WINDOWS)
+#include <windows.h>
+#endif
+
using namespace WTF;
namespace JSC {
@@ -79,12 +83,22 @@ void formatDateUTCVariant(const GregorianDateTime &t, DateConversionBuffer& buff
void formatTime(const GregorianDateTime &t, DateConversionBuffer& buffer)
{
int offset = abs(gmtoffset(t));
+#if OS(WINDOWS)
+ TIME_ZONE_INFORMATION timeZoneInformation;
+ GetTimeZoneInformation(&timeZoneInformation);
+ const WCHAR* timeZoneName = t.isDST ? timeZoneInformation.DaylightName : timeZoneInformation.StandardName;
+#else
char timeZoneName[70];
struct tm gtm = t;
strftime(timeZoneName, sizeof(timeZoneName), "%Z", &gtm);
+#endif
if (timeZoneName[0]) {
+#if OS(WINDOWS)
+ snprintf(buffer, DateConversionBufferSize, "%02d:%02d:%02d GMT%c%02d%02d (%S)",
+#else
snprintf(buffer, DateConversionBufferSize, "%02d:%02d:%02d GMT%c%02d%02d (%s)",
+#endif
t.hour, t.minute, t.second,
gmtoffset(t) < 0 ? '-' : '+', offset / (60*60), (offset / 60) % 60, timeZoneName);
} else {