[arch-commits] Commit in js60/trunk (PKGBUILD bug1415202.patch)
Jan Steffens
heftig at archlinux.org
Fri Mar 8 10:02:41 UTC 2019
Date: Friday, March 8, 2019 @ 10:02:40
Author: heftig
Revision: 347437
60.5.2-1
Modified:
js60/trunk/PKGBUILD
js60/trunk/bug1415202.patch
------------------+
PKGBUILD | 6 -
bug1415202.patch | 162 ++++++++++++++++++++++++++---------------------------
2 files changed, 83 insertions(+), 85 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-03-08 09:21:58 UTC (rev 347436)
+++ PKGBUILD 2019-03-08 10:02:40 UTC (rev 347437)
@@ -1,8 +1,8 @@
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
pkgname=js60
-pkgver=60.4.0
-pkgrel=2
+pkgver=60.5.2
+pkgrel=1
_ffver=${pkgver%%.*}
pkgdesc="JavaScript interpreter and libraries - Version $_ffver"
arch=(x86_64)
@@ -16,7 +16,7 @@
mozjs60-fix-soname.patch
mozjs52-include-configure-script.patch)
sha256sums=('SKIP'
- '9f316ab46d1c45b0051b43579e80d0d622c58d74230877a53b170c56e6aa0193'
+ '0b410aa6ebd0236cd3ea524340c2da2235973a42cd0eaa90f7f394cd5bcbab95'
'c792837930defe27355941080e9b80ec1d45003c097e4707860acc13d43bc519'
'd91a89acd88bfc747a255050757a0c17139bf5c3508c2e1c3c6bb2056786a344')
Modified: bug1415202.patch
===================================================================
--- bug1415202.patch 2019-03-08 09:21:58 UTC (rev 347436)
+++ bug1415202.patch 2019-03-08 10:02:40 UTC (rev 347437)
@@ -9,118 +9,116 @@
diff --git a/js/src/jsdate.cpp b/js/src/jsdate.cpp
--- a/js/src/jsdate.cpp
+++ b/js/src/jsdate.cpp
-@@ -2636,22 +2636,26 @@ ToPRMJTime(double localTime, double utcT
+@@ -2348,22 +2348,26 @@ static PRMJTime ToPRMJTime(double localT
+ prtm.tm_isdst = (DaylightSavingTA(utcTime) != 0);
- return prtm;
+ return prtm;
}
- static size_t
- FormatTime(char* buf, int buflen, const char* fmt, double utcTime, double localTime)
- {
- PRMJTime prtm = ToPRMJTime(localTime, utcTime);
-- int eqivalentYear = IsRepresentableAsTime32(utcTime)
-- ? prtm.tm_year
-- : EquivalentYearForDST(prtm.tm_year);
+ static size_t FormatTime(char* buf, int buflen, const char* fmt, double utcTime,
+ double localTime) {
+ PRMJTime prtm = ToPRMJTime(localTime, utcTime);
+- int eqivalentYear = IsRepresentableAsTime32(utcTime)
+
-+ // If an equivalent year was used to compute the date/time components, use
-+ // the same equivalent year to determine the time zone name and offset in
-+ // PRMJ_FormatTime(...).
-+ int timeZoneYear = IsRepresentableAsTime32(utcTime)
-+ ? prtm.tm_year
-+ : EquivalentYearForDST(prtm.tm_year);
- int offsetInSeconds = (int) floor((localTime - utcTime) / msPerSecond);
++ // If an equivalent year was used to compute the date/time components, use
++ // the same equivalent year to determine the time zone name and offset in
++ // PRMJ_FormatTime(...).
++ int timeZoneYear = IsRepresentableAsTime32(utcTime)
+ ? prtm.tm_year
+ : EquivalentYearForDST(prtm.tm_year);
+ int offsetInSeconds = (int)floor((localTime - utcTime) / msPerSecond);
-- return PRMJ_FormatTime(buf, buflen, fmt, &prtm, eqivalentYear, offsetInSeconds);
-+ return PRMJ_FormatTime(buf, buflen, fmt, &prtm, timeZoneYear, offsetInSeconds);
+- return PRMJ_FormatTime(buf, buflen, fmt, &prtm, eqivalentYear,
++ return PRMJ_FormatTime(buf, buflen, fmt, &prtm, timeZoneYear,
+ offsetInSeconds);
}
- enum class FormatSpec {
- DateTime,
- Date,
- Time
- };
+ enum class FormatSpec { DateTime, Date, Time };
+ static bool FormatDate(JSContext* cx, double utcTime, FormatSpec format,
+ MutableHandleValue rval) {
+ JSString* str;
diff --git a/js/src/vm/Time.cpp b/js/src/vm/Time.cpp
--- a/js/src/vm/Time.cpp
+++ b/js/src/vm/Time.cpp
-@@ -257,17 +257,17 @@ PRMJ_InvalidParameterHandler(const wchar
- {
- /* empty */
+@@ -242,17 +242,17 @@ static void PRMJ_InvalidParameterHandler
+ const wchar_t* file, unsigned int line,
+ uintptr_t pReserved) {
+ /* empty */
}
#endif
/* Format a time value into a buffer. Same semantics as strftime() */
- size_t
- PRMJ_FormatTime(char* buf, int buflen, const char* fmt, const PRMJTime* prtm,
-- int equivalentYear, int offsetInSeconds)
-+ int timeZoneYear, int offsetInSeconds)
- {
- size_t result = 0;
+ size_t PRMJ_FormatTime(char* buf, int buflen, const char* fmt,
+- const PRMJTime* prtm, int equivalentYear,
++ const PRMJTime* prtm, int timeZoneYear,
+ int offsetInSeconds) {
+ size_t result = 0;
#if defined(XP_UNIX) || defined(XP_WIN)
- struct tm a;
+ struct tm a;
#ifdef XP_WIN
- _invalid_parameter_handler oldHandler;
+ _invalid_parameter_handler oldHandler;
#ifndef __MINGW32__
- int oldReportMode;
-@@ -290,39 +290,33 @@ PRMJ_FormatTime(char* buf, int buflen, c
+ int oldReportMode;
+@@ -275,39 +275,33 @@ size_t PRMJ_FormatTime(char* buf, int bu
+ */
+ #if defined(HAVE_LOCALTIME_R) && defined(HAVE_TM_ZONE_TM_GMTOFF)
+ char emptyTimeZoneId[] = "";
+ {
+ /*
+ * Fill out |td| to the time represented by |prtm|, leaving the
+ * timezone fields zeroed out. localtime_r will then fill in the
+ * timezone fields for that local time according to the system's
+- * timezone parameters.
++ * timezone parameters. Use |timeZoneYear| for the year to ensure the
++ * time zone name matches the time zone offset used by the caller.
*/
- #if defined(HAVE_LOCALTIME_R) && defined(HAVE_TM_ZONE_TM_GMTOFF)
- char emptyTimeZoneId[] = "";
- {
- /*
- * Fill out |td| to the time represented by |prtm|, leaving the
- * timezone fields zeroed out. localtime_r will then fill in the
- * timezone fields for that local time according to the system's
-- * timezone parameters.
-+ * timezone parameters. Use |timeZoneYear| for the year to ensure the
-+ * time zone name matches the time zone offset used by the caller.
- */
- struct tm td;
- memset(&td, 0, sizeof(td));
- td.tm_sec = prtm->tm_sec;
- td.tm_min = prtm->tm_min;
- td.tm_hour = prtm->tm_hour;
- td.tm_mday = prtm->tm_mday;
- td.tm_mon = prtm->tm_mon;
- td.tm_wday = prtm->tm_wday;
-- td.tm_year = prtm->tm_year - 1900;
-+ td.tm_year = timeZoneYear - 1900;
- td.tm_yday = prtm->tm_yday;
- td.tm_isdst = prtm->tm_isdst;
+ struct tm td;
+ memset(&td, 0, sizeof(td));
+ td.tm_sec = prtm->tm_sec;
+ td.tm_min = prtm->tm_min;
+ td.tm_hour = prtm->tm_hour;
+ td.tm_mday = prtm->tm_mday;
+ td.tm_mon = prtm->tm_mon;
+ td.tm_wday = prtm->tm_wday;
+- td.tm_year = prtm->tm_year - 1900;
++ td.tm_year = timeZoneYear - 1900;
+ td.tm_yday = prtm->tm_yday;
+ td.tm_isdst = prtm->tm_isdst;
- time_t t = mktime(&td);
+ time_t t = mktime(&td);
-- // If |prtm| cannot be represented in |time_t| the year is probably
-- // out of range, try again with the DST equivalent year.
-- if (t == static_cast<time_t>(-1)) {
-- td.tm_year = equivalentYear - 1900;
-- t = mktime(&td);
-- }
+- // If |prtm| cannot be represented in |time_t| the year is probably
+- // out of range, try again with the DST equivalent year.
+- if (t == static_cast<time_t>(-1)) {
+- td.tm_year = equivalentYear - 1900;
+- t = mktime(&td);
+- }
-
- // If either mktime or localtime_r failed, fill in the fallback time
- // zone offset |offsetInSeconds| and set the time zone identifier to
- // the empty string.
- if (t != static_cast<time_t>(-1) && localtime_r(&t, &td)) {
- a.tm_gmtoff = td.tm_gmtoff;
- a.tm_zone = td.tm_zone;
- } else {
- a.tm_gmtoff = offsetInSeconds;
+ // If either mktime or localtime_r failed, fill in the fallback time
+ // zone offset |offsetInSeconds| and set the time zone identifier to
+ // the empty string.
+ if (t != static_cast<time_t>(-1) && localtime_r(&t, &td)) {
+ a.tm_gmtoff = td.tm_gmtoff;
+ a.tm_zone = td.tm_zone;
+ } else {
+ a.tm_gmtoff = offsetInSeconds;
diff --git a/js/src/vm/Time.h b/js/src/vm/Time.h
--- a/js/src/vm/Time.h
+++ b/js/src/vm/Time.h
-@@ -50,17 +50,17 @@ PRMJ_NowShutdown();
+@@ -44,17 +44,17 @@ inline void PRMJ_NowInit() {}
+ #ifdef XP_WIN
+ extern void PRMJ_NowShutdown();
#else
- inline void
- PRMJ_NowShutdown() {}
+ inline void PRMJ_NowShutdown() {}
#endif
/* Format a time value into a buffer. Same semantics as strftime() */
- extern size_t
- PRMJ_FormatTime(char* buf, int buflen, const char* fmt, const PRMJTime* tm,
-- int equivalentYear, int offsetInSeconds);
-+ int timeZoneYear, int offsetInSeconds);
+ extern size_t PRMJ_FormatTime(char* buf, int buflen, const char* fmt,
+- const PRMJTime* tm, int equivalentYear,
++ const PRMJTime* tm, int timeZoneYear,
+ int offsetInSeconds);
-
/**
* Requesting the number of cycles from the CPU.
*
More information about the arch-commits
mailing list