diff options
author | joerg <joerg@pkgsrc.org> | 2015-09-08 18:53:46 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2015-09-08 18:53:46 +0000 |
commit | 3ec72e6d1fc24808e552b55a7860db2d20d81818 (patch) | |
tree | 911bc03f5537ab8dabf872337ba67a915d33d6da /lang | |
parent | 38d4cb3ec8070f8bf884f8ac9929f20e2e02dcbb (diff) | |
download | pkgsrc-3ec72e6d1fc24808e552b55a7860db2d20d81818.tar.gz |
Replace left-shift with multiplication, it is sometimes called with
negative values. Bump revision.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/spidermonkey/Makefile | 4 | ||||
-rw-r--r-- | lang/spidermonkey/distinfo | 3 | ||||
-rw-r--r-- | lang/spidermonkey/patches/patch-jsapi.h | 15 |
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)) |