summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoerg <joerg>2015-09-08 18:53:46 +0000
committerjoerg <joerg>2015-09-08 18:53:46 +0000
commitf04f5e06611184701994440f7eaadd8d229aa47b (patch)
tree911bc03f5537ab8dabf872337ba67a915d33d6da
parenta462326f225be8acc7dffe21391bab16273e580c (diff)
downloadpkgsrc-f04f5e06611184701994440f7eaadd8d229aa47b.tar.gz
Replace left-shift with multiplication, it is sometimes called with
negative values. Bump revision.
-rw-r--r--lang/spidermonkey/Makefile4
-rw-r--r--lang/spidermonkey/distinfo3
-rw-r--r--lang/spidermonkey/patches/patch-jsapi.h15
3 files changed, 19 insertions, 3 deletions
diff --git a/lang/spidermonkey/Makefile b/lang/spidermonkey/Makefile
index bfab8d48910..ffcdb3518c2 100644
--- a/lang/spidermonkey/Makefile
+++ b/lang/spidermonkey/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.28 2015/04/02 14:40:32 bsiegert Exp $
+# $NetBSD: Makefile,v 1.29 2015/09/08 18:53:46 joerg Exp $
DISTNAME= js-1.8.0-rc1
PKGNAME= spidermonkey-1.8.0rc1
-PKGREVISION= 4
+PKGREVISION= 5
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_MOZILLA_ALL:=js/}
diff --git a/lang/spidermonkey/distinfo b/lang/spidermonkey/distinfo
index 0ec19f82109..32ceb068187 100644
--- a/lang/spidermonkey/distinfo
+++ b/lang/spidermonkey/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.13 2011/12/07 05:16:27 yyamano Exp $
+$NetBSD: distinfo,v 1.14 2015/09/08 18:53:46 joerg Exp $
SHA1 (js-1.8.0-rc1.tar.gz) = 1577bd39a2ebd9f5e2ec90e72d9a6aa85f840564
RMD160 (js-1.8.0-rc1.tar.gz) = 27c6cba1185d34cb9095d2da67393025bfe673ca
@@ -9,3 +9,4 @@ SHA1 (patch-ac) = 554079d6e2b6ef6e84ed3fafc2631e9586f7839f
SHA1 (patch-ad) = ca651bfc31b5ad06e45010d40309121c7300807a
SHA1 (patch-ae) = c39412d59480db7c89aed7e555f2a5e7a4cea80b
SHA1 (patch-ai) = 1112dca0f459d98ab1b1a84b4c4ff7ce654b1821
+SHA1 (patch-jsapi.h) = 52d44076b9b17cd481e14cf978248e97bd5c8db4
diff --git a/lang/spidermonkey/patches/patch-jsapi.h b/lang/spidermonkey/patches/patch-jsapi.h
new file mode 100644
index 00000000000..899dbbc6a76
--- /dev/null
+++ b/lang/spidermonkey/patches/patch-jsapi.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-jsapi.h,v 1.1 2015/09/08 18:53:46 joerg Exp $
+
+Multiplication is safe, even if the input is negative. Left shift is not.
+
+--- jsapi.h.orig 2015-09-03 12:07:45.000000000 +0000
++++ jsapi.h
+@@ -103,7 +103,7 @@ JS_BEGIN_EXTERN_C
+ #define JSVAL_INT_MAX (JSVAL_INT_POW2(30) - 1)
+ #define INT_FITS_IN_JSVAL(i) ((jsuint)((i)+JSVAL_INT_MAX) <= 2*JSVAL_INT_MAX)
+ #define JSVAL_TO_INT(v) ((jsint)(v) >> 1)
+-#define INT_TO_JSVAL(i) (((jsval)(i) << 1) | JSVAL_INT)
++#define INT_TO_JSVAL(i) (((jsval)(i) * 2) | JSVAL_INT)
+
+ /* Convert between boolean and jsval. */
+ #define JSVAL_TO_BOOLEAN(v) ((JSBool)((v) >> JSVAL_TAGBITS))