From owner-freebsd-gnome@FreeBSD.ORG Mon Aug 8 19:18:58 2005 Return-Path: X-Original-To: gnome@freebsd.org Delivered-To: freebsd-gnome@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F0D3316A41F for ; Mon, 8 Aug 2005 19:18:58 +0000 (GMT) (envelope-from mi+mx@aldan.algebra.com) Received: from mail26.sea5.speakeasy.net (mail26.sea5.speakeasy.net [69.17.117.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id E12FE43D45 for ; Mon, 8 Aug 2005 19:18:57 +0000 (GMT) (envelope-from mi+mx@aldan.algebra.com) Received: (qmail 31433 invoked from network); 8 Aug 2005 19:18:57 -0000 Received: from aldan.algebra.com ([216.254.65.224]) (envelope-sender ) by mail26.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 8 Aug 2005 19:18:56 -0000 Received: from corbulon.video-collage.com (static-151-204-231-237.bos.east.verizon.net [151.204.231.237]) by aldan.algebra.com (8.13.1/8.13.1) with ESMTP id j78JIp5q079254 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 8 Aug 2005 15:18:53 -0400 (EDT) (envelope-from mi+mx@aldan.algebra.com) Received: from mteterin.us.murex.com (195-11.customer.cloud9.net [168.100.195.11]) by corbulon.video-collage.com (8.13.4/8.13.1) with ESMTP id j78JIiAa008588 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Mon, 8 Aug 2005 15:18:45 -0400 (EDT) (envelope-from mi+mx@aldan.algebra.com) From: Mikhail Teterin Organization: Virtual Estates, Inc. To: citric@cubicone.tmetic.com Date: Mon, 8 Aug 2005 15:18:38 -0400 User-Agent: KMail/1.8.1 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_OA79CdzJI7+9oGa" Message-Id: <200508081518.38403.mi+mx@aldan.algebra.com> X-Virus-Scanned: ClamAV devel-20050525/1008/Sun Aug 7 18:59:27 2005 on corbulon.video-collage.com X-Virus-Status: Clean X-Scanned-By: MIMEDefang 2.43 Cc: gnome@freebsd.org, portmgr@freebsd.org Subject: fixing lang/spidermonkey X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Aug 2005 19:18:59 -0000 --Boundary-00=_OA79CdzJI7+9oGa Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello! The attachment contains an upgrade to lang/spidermonkey. The benefits are: . build on amd64 at all and _properly_ on all other platforms (-fPIC -DPIC should be used for shared objects everywhere); . do not build vendor's own version of libm (fdlibm) -- FreeBSD's -lm provides sufficient functionality (mozilla, firefox contain the same foolishness, BTW); . uses -lreadline instead of building vendor's own "editline"; . unless WITHOUT_TESTS is set, download, patch and run the vendor's set of self-tests; . patch to compile cleanly with '-Wall -Werror'. Mozilla people indicate, that they plan to make a new release of spidermonkey, when Firefox-1.5 ships (circa September): https://bugzilla.mozilla.org/show_bug.cgi?id=303857 When that takes place, spidermonkey can be used _instead_ of browsers' own snapshots of js thus reducing the porting effort, cutting build-times, and providing a single place for patches. Considering that, on one hand, the port is marked broken on amd64 since March 2004 (a tier-1 platform), and, on the other, nothing depends on it (no new possible new breakage), I ask portmgr to also allow me to merge these fixes before release -- unless the maintainer objects in a few days. Thanks! -mi --Boundary-00=_OA79CdzJI7+9oGa Content-Type: text/x-diff; charset="us-ascii"; name="spidermonkey.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="spidermonkey.diff" Index: Makefile =================================================================== RCS file: /meow/ncvs/ports/lang/spidermonkey/Makefile,v retrieving revision 1.9 diff -U2 -r1.9 Makefile --- Makefile 21 Jul 2005 15:28:12 -0000 1.9 +++ Makefile 8 Aug 2005 18:34:11 -0000 @@ -7,8 +7,10 @@ PORTNAME= spidermonkey DISTVERSION= 1.5-rc6a +PORTREVISION= 1 CATEGORIES= lang MASTER_SITES= ${MASTER_SITE_MOZILLA} MASTER_SITE_SUBDIR= js DISTNAME= js-${DISTVERSION} +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= citric@cubicone.tmetic.com @@ -17,26 +19,57 @@ CONFLICTS= njs-* +.if !defined(WITHOUT_TEST) +USE_PERL5_BUILD=test harness +PATCHFILES= spidermonkey-patch-tests-ecma.bz2 spidermonkey-patch-tests-js.bz2 +PATCH_SITES= http://virtual-estates.net/~mi/port-stuff/ +BUILD_DEPENDS+= ${SITE_PERL}/Getopt/Mixed.pm:${PORTSDIR}/devel/p5-Getopt-Mixed +DISTFILES+= js-tests-20021118${EXTRACT_SUFX} +post-build: test +post-patch: + # + # Removing known bad tests: + # https://bugzilla.mozilla.org/show_bug.cgi?id=10278 + # https://bugzilla.mozilla.org/show_bug.cgi?id=101964 + # + cd ${WRKDIR}/tests && ${RM} js1_3/regress/function-001-n.js \ + js1_2/function/function-001-n.js \ + js1_3/Script/function-001-n.js \ + js1_5/Array/regress-101964.js + +.endif + USE_GMAKE= YES +MAKEFILE= Makefile.ref +ALL_TARGET= ${OPSYS}`${UNAME} -r`_DBG.OBJ/js +MAKE_ENV+= CC="${CC}" CCC="${CXX}" INSTALLS_SHLIB= YES +SRC_DIR= js/src +WRKSRC= ${WRKDIR}/${SRC_DIR} +EXTRACT_AFTER_ARGS=| ${TAR} -xf - \ + --exclude js/jsd \ + --exclude ${SRC_DIR}/editline \ + --exclude ${SRC_DIR}/fdlibm \ + --exclude ${SRC_DIR}/liveconnect \ + --exclude ${SRC_DIR}/perlconnect + +test: + cd ${WRKDIR}/tests && ${SETENV} \ + LD_LIBRARY_PATH=${WRKSRC}/${OPSYS}`${UNAME} -r`_DBG.OBJ \ + ${PERL5} jsDriver.pl \ + --shellpath ${WRKSRC}/${OPSYS}`${UNAME} -r`_DBG.OBJ/js \ + --engine smdebug --confail --trace --list ecma* js1_* .include -.if ${ARCH} == "amd64" || ${ARCH} == "ia64" -BROKEN= "Does not compile on amd64 or ia64 (missing -fPIC)" -.endif - -post-extract: - ${MV} ${WRKDIR}/js/src ${WRKSRC} && \ - ${RM} -rf js && \ +do-configure: ${CP} ${WRKSRC}/config/Linux_All.mk \ - ${WRKSRC}/config/`uname -s``uname -r`.mk && \ - ${CP} ${WRKSRC}/Makefile.ref ${WRKSRC}/Makefile + ${WRKSRC}/config/${OPSYS}`${UNAME} -r`.mk && \ do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/`uname -s``uname -r`_DBG.OBJ/js \ + ${INSTALL_PROGRAM} ${WRKSRC}/${OPSYS}`${UNAME} -r`_DBG.OBJ/js \ ${PREFIX}/bin - ${INSTALL_PROGRAM} ${WRKSRC}/`uname -s``uname -r`_DBG.OBJ/libjs.so \ + ${INSTALL_PROGRAM} ${WRKSRC}/${OPSYS}`${UNAME} -r`_DBG.OBJ/libjs.so \ ${PREFIX}/lib - ${CP} ${WRKSRC}/`uname -s``uname -r`_DBG.OBJ/jsautocfg.h ${WRKSRC} + ${CP} ${WRKSRC}/${OPSYS}`${UNAME} -r`_DBG.OBJ/jsautocfg.h ${WRKSRC} .for jsh in jsapi.h jsautocfg.h jscompat.h jslong.h jsosdep.h jsotypes.h jspubtd.h jstypes.h @${INSTALL_DATA} ${WRKSRC}/${jsh} ${PREFIX}/include/ Index: distinfo =================================================================== RCS file: /meow/ncvs/ports/lang/spidermonkey/distinfo,v retrieving revision 1.5 diff -U2 -r1.5 distinfo --- distinfo 21 Jul 2005 15:28:12 -0000 1.5 +++ distinfo 8 Aug 2005 18:31:09 -0000 @@ -1,2 +1,8 @@ MD5 (js-1.5-rc6a.tar.gz) = 25e1d1dd2674d85883391b6b42a7b02f SIZE (js-1.5-rc6a.tar.gz) = 1058911 +MD5 (js-tests-20021118.tar.gz) = df89464084e583a075a782ad66da5370 +SIZE (js-tests-20021118.tar.gz) = 803198 +MD5 (spidermonkey-patch-tests-ecma.bz2) = 73ec1e37821deff69e68eac2192a2cd2 +SIZE (spidermonkey-patch-tests-ecma.bz2) = 5702 +MD5 (spidermonkey-patch-tests-js.bz2) = 20770d4e82fff61c1bbb5ff91d2551ec +SIZE (spidermonkey-patch-tests-js.bz2) = 3685 Index: files/patch-config =================================================================== RCS file: files/patch-config diff -N files/patch-config --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-config 8 Aug 2005 18:40:51 -0000 @@ -0,0 +1,75 @@ +--- Makefile.ref Fri Nov 14 19:10:55 2003 ++++ Makefile.ref Sat Aug 6 12:25:36 2005 +@@ -56,6 +56,4 @@ + ifdef USE_MSVC + OTHER_LIBS += fdlibm/$(OBJDIR)/fdlibm.lib +-else +-OTHER_LIBS += -Lfdlibm/$(OBJDIR) -lfdm + endif + +@@ -242,10 +240,6 @@ + $(NULL) + +-PREDIRS += fdlibm +- + ifdef USE_MSVC + FDLIBM_LIBRARY = fdlibm/$(OBJDIR)/fdlibm.lib +-else +-FDLIBM_LIBRARY = fdlibm/$(OBJDIR)/libfdm.a + endif + JSMATH_PRELINK = $(OBJDIR)/jsmathtemp.o +@@ -301,6 +295,6 @@ + link.exe -out:"$@" $(EXE_LINK_FLAGS) $^ + else +-$(PROGRAM): $(PROG_OBJS) $(LIBRARY) $(FDLIBM_LIBRARY) +- $(CC) -o $@ $(CFLAGS) $(PROG_OBJS) $(LIBRARY) $(LDFLAGS) $(OTHER_LIBS) \ ++$(PROGRAM): $(PROG_OBJS) $(SHARED_LIBRARY) $(FDLIBM_LIBRARY) ++ $(CC) -o $@ $(CFLAGS) $(PROG_OBJS) -L$(OBJDIR) -ljs $(LDFLAGS) $(OTHER_LIBS) \ + $(PROG_LIBS) + endif +--- config/Linux_All.mk Thu May 15 20:21:08 2003 ++++ config/Linux_All.mk Sat Aug 6 17:24:10 2005 +@@ -37,7 +37,7 @@ + # + +-CC = gcc +-CCC = g++ +-CFLAGS += -Wall -Wno-format ++CC ?= gcc ++CCC ?= g++ ++CFLAGS += -Wall -Werror # XXX do these work with non-gcc and non-icc? + OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DHAVE_LOCALTIME_R + +@@ -70,5 +70,5 @@ + GFX_ARCH = x + +-OS_LIBS = -lm -lc ++OS_LIBS = -lm + + ASFLAGS += -x assembler-with-cpp +@@ -84,15 +84,7 @@ + + # Use the editline library to provide line-editing support. +-JS_EDITLINE = 1 ++JS_READLINE = 1 + +-ifeq ($(CPU_ARCH),x86_64) +-# Use VA_COPY() standard macro on x86-64 +-# FIXME: better use it everywhere + OS_CFLAGS += -DHAVE_VA_COPY +-endif + +-ifeq ($(CPU_ARCH),x86_64) +-# We need PIC code for shared libraries +-# FIXME: better patch rules.mk & fdlibm/Makefile* + OS_CFLAGS += -DPIC -fPIC +-endif +--- rules.mk Fri Nov 14 19:11:04 2003 ++++ rules.mk Mon Aug 8 14:40:36 2005 +@@ -59,5 +59,5 @@ + TARGETS += $(SHARED_LIBRARY) $(PROGRAM) # it is now + else +-TARGETS += $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM) ++TARGETS += $(SHARED_LIBRARY) $(PROGRAM) + endif + Index: files/patch-warnings =================================================================== RCS file: files/patch-warnings diff -N files/patch-warnings --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-warnings 8 Aug 2005 06:37:39 -0000 @@ -0,0 +1,355 @@ +--- jspubtd.h Thu Apr 7 15:54:07 2005 ++++ jspubtd.h Thu Aug 4 23:52:12 2005 +@@ -517,5 +517,5 @@ + (* JS_DLL_CALLBACK JSArgumentFormatter)(JSContext *cx, const char *format, + JSBool fromJS, jsval **vpp, +- va_list *app); ++ va_list app); + #endif + +--- jsdhash.c Wed Jan 14 21:00:53 2004 ++++ jsdhash.c Fri Aug 5 00:15:04 2005 +@@ -92,5 +92,5 @@ + JS_DHashVoidPtrKeyStub(JSDHashTable *table, const void *key) + { +- return (JSDHashNumber)key >> 2; ++ return (JSDHashNumber)(uintptr_t)key >> 2; + } + +--- jsstr.c Fri Jun 3 15:07:49 2005 ++++ jsstr.c Fri Aug 5 01:31:08 2005 +@@ -2596,5 +2596,5 @@ + js_hash_string_pointer(const void *key) + { +- return (JSHashNumber)key >> JSVAL_TAGBITS; ++ return (JSHashNumber)(uintptr_t)key >> JSVAL_TAGBITS; + } + +--- jsobj.h Wed Sep 1 17:33:16 2004 ++++ jsobj.h Fri Aug 5 01:16:56 2005 +@@ -238,12 +238,12 @@ + }; + +-#define SHARP_BIT ((jsatomid) 1) +-#define BUSY_BIT ((jsatomid) 2) ++#define SHARP_BIT ((uintptr_t) 1) ++#define BUSY_BIT ((uintptr_t) 2) + #define SHARP_ID_SHIFT 2 +-#define IS_SHARP(he) ((jsatomid)(he)->value & SHARP_BIT) +-#define MAKE_SHARP(he) ((he)->value = (void*)((jsatomid)(he)->value|SHARP_BIT)) +-#define IS_BUSY(he) ((jsatomid)(he)->value & BUSY_BIT) +-#define MAKE_BUSY(he) ((he)->value = (void*)((jsatomid)(he)->value|BUSY_BIT)) +-#define CLEAR_BUSY(he) ((he)->value = (void*)((jsatomid)(he)->value&~BUSY_BIT)) ++#define IS_SHARP(he) ((uintptr_t)(he)->value & SHARP_BIT) ++#define MAKE_SHARP(he) ((he)->value = (void*)((uintptr_t)(he)->value|SHARP_BIT)) ++#define IS_BUSY(he) ((uintptr_t)(he)->value & BUSY_BIT) ++#define MAKE_BUSY(he) ((he)->value = (void*)((uintptr_t)(he)->value|BUSY_BIT)) ++#define CLEAR_BUSY(he) ((he)->value = (void*)((uintptr_t)(he)->value&~BUSY_BIT)) + + extern JSHashEntry * +--- jstypes.h Fri Nov 14 19:11:04 2003 ++++ jstypes.h Thu Aug 4 23:54:13 2005 +@@ -378,6 +378,7 @@ + ** A JSWord is an integer that is the same size as a void* + */ ++#include +-typedef long JSWord; +-typedef unsigned long JSUword; ++typedef intptr_t JSWord; ++typedef uintptr_t JSUword; + + #include "jsotypes.h" +--- jsosdep.h Fri Nov 14 19:10:59 2003 ++++ jsosdep.h Fri Aug 5 00:50:44 2005 +@@ -102,5 +102,5 @@ + #define JS_HAVE_LONG_LONG + +-#elif defined(FREEBSD) ++#elif defined(FREEBSD) || defined(__FreeBSD__) + #define JS_HAVE_LONG_LONG + +--- jsdtoa.c Sat Apr 3 17:11:11 2004 ++++ jsdtoa.c Fri Aug 5 00:28:15 2005 +@@ -258,5 +258,5 @@ + #define set_word1(x, y) JSDOUBLE_SET_LO32(x, y) + +-#define Storeinc(a,b,c) (*(a)++ = (b) << 16 | (c) & 0xffff) ++#define Storeinc(a,b,c) (*(a)++ = (b) << 16 | ((c) & 0xffff)) + + /* #define P DBL_MANT_DIG */ +@@ -990,5 +990,6 @@ + { + register Long L; +- double a; ++ double a = 0.; /* only need to initialize to calm the compiler. ++ * set_word0 and set_word1 set a, but in two stages */ + + L = (word0(x) & Exp_mask) - (P-1)*Exp_msk1; +@@ -1021,5 +1022,5 @@ + ULong *xa, *xa0, w, y, z; + int32 k; +- double d; ++ double d = 0.; + #define d0 word0(d) + #define d1 word1(d) +@@ -1837,4 +1838,5 @@ + #ifdef Avoid_Underflow + if (scale) { ++ rv0 = 0.; /* calm the compiler warning */ + set_word0(rv0, Exp_1 - P*Exp_msk1); + set_word1(rv0, 0); +--- jsatom.h Wed Feb 11 02:21:59 2004 ++++ jsatom.h Fri Aug 5 01:21:44 2005 +@@ -96,5 +96,5 @@ + + #define ALE_ATOM(ale) ((JSAtom *) (ale)->entry.key) +-#define ALE_INDEX(ale) ((jsatomid) (ale)->entry.value) ++#define ALE_INDEX(ale) ((jsatomid)(uintptr_t)(ale)->entry.value) + #define ALE_JSOP(ale) ((JSOp) (ale)->entry.value) + #define ALE_VALUE(ale) ((jsval) (ale)->entry.value) +--- jsatom.c Tue Jul 6 03:49:18 2004 ++++ jsatom.c Fri Aug 5 01:23:29 2005 +@@ -137,5 +137,5 @@ + #endif + +-#define HASH_OBJECT(o) ((JSHashNumber)(o) >> JSVAL_TAGBITS) ++#define HASH_OBJECT(o) ((JSHashNumber)(uintptr_t)(o) >> JSVAL_TAGBITS) + #define HASH_INT(i) ((JSHashNumber)(i)) + #define HASH_DOUBLE(dp) ((JSHashNumber)(JSDOUBLE_HI32(*dp) ^ JSDOUBLE_LO32(*dp))) +@@ -834,5 +834,5 @@ + } + +- ALE_SET_INDEX(ale, al->count++); ++ ALE_SET_INDEX(ale, (intptr_t)al->count++); + } + return ale; +--- jsscript.c Fri Jul 8 21:48:08 2005 ++++ jsscript.c Fri Aug 5 01:29:26 2005 +@@ -322,5 +322,5 @@ + if (!JS_XDRUint32(xdr, &index)) + return JS_FALSE; +- ALE_SET_INDEX(ale, index); ++ ALE_SET_INDEX(ale, (uintptr_t)index); + + if (!JS_XDRValue(xdr, &value)) +@@ -338,5 +338,5 @@ + { + uint32 length; +- uintN i; ++ uintptr_t i; + JSBool ok; + +--- jsinterp.c Fri Jun 4 21:39:32 2004 ++++ jsinterp.c Sat Aug 6 18:56:29 2005 +@@ -1382,9 +1382,9 @@ + jsbytecode *pc, *pc2, *endpc; + JSOp op, op2; +- const JSCodeSpec *cs; ++ const JSCodeSpec *cs = NULL; + JSAtom *atom; + uintN argc, slot, attrs; + jsval *vp, lval, rval, ltmp, rtmp; +- jsid id; ++ jsid id = -1L; /* initialize to something awful */ + JSObject *withobj, *origobj, *propobj; + jsval iter_state; +@@ -1398,5 +1398,5 @@ + JSType type; + #ifdef DEBUG +- FILE *tracefp; ++ FILE *tracefp = NULL; + #endif + #if JS_HAS_EXPORT_IMPORT +@@ -1475,4 +1475,5 @@ + JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_OVER_RECURSED); + ok = JS_FALSE; ++ sp = NULL; + goto out; + } +@@ -1484,4 +1485,5 @@ + if (!newsp) { + ok = JS_FALSE; ++ sp = NULL; + goto out; + } +@@ -1517,5 +1519,5 @@ + } + } +- fprintf(tracefp, " @ %d\n", sp - fp->spbase); ++ fprintf(tracefp, " @ %td\n", sp - fp->spbase); + } + } +@@ -4209,5 +4211,5 @@ + } + } +- fprintf(tracefp, " @ %d\n", sp - fp->spbase); ++ fprintf(tracefp, " @ %td\n", sp - fp->spbase); + } + fprintf(tracefp, " stack: "); +--- jsobj.c Wed Jun 2 17:20:56 2004 ++++ jsobj.c Sat Aug 6 19:08:39 2005 +@@ -378,5 +378,5 @@ + js_hash_object(const void *key) + { +- return (JSHashNumber)key >> JSVAL_TAGBITS; ++ return (JSHashNumber)(uintptr_t)key >> JSVAL_TAGBITS; + } + +@@ -407,5 +407,5 @@ + if (!he) { + sharpid = 0; +- he = JS_HashTableRawAdd(table, hep, hash, obj, (void *)sharpid); ++ he = JS_HashTableRawAdd(table, hep, hash, obj, (void *)(uintptr_t)sharpid); + if (!he) { + JS_ReportOutOfMemory(cx); +@@ -461,8 +461,8 @@ + return NULL; + } else { +- sharpid = (jsatomid) he->value; ++ sharpid = (jsatomid)(uintptr_t)he->value; + if (sharpid == 0) { + sharpid = ++map->sharpgen << SHARP_ID_SHIFT; +- he->value = (void *) sharpid; ++ he->value = (void *)(uintptr_t)sharpid; + } + ida = NULL; +@@ -505,5 +505,5 @@ + if (!he) + goto bad; +- JS_ASSERT((((jsatomid) he->value) & SHARP_BIT) == 0); ++ JS_ASSERT((((uintptr_t)he->value) & SHARP_BIT) == 0); + if (!idap) { + JS_DestroyIdArray(cx, ida); +@@ -534,5 +534,5 @@ + } + +- sharpid = (jsatomid) he->value; ++ sharpid = (jsatomid)(uintptr_t)he->value; + if (sharpid == 0) { + *sp = NULL; +@@ -1104,5 +1104,5 @@ + const JSResolvingKey *key = (const JSResolvingKey *)ptr; + +- return ((JSDHashNumber)key->obj >> JSVAL_TAGBITS) ^ key->id; ++ return ((JSDHashNumber)(uintptr_t)key->obj >> JSVAL_TAGBITS) ^ key->id; + } + +--- jsopcode.c Thu Jun 10 00:33:52 2004 ++++ jsopcode.c Sat Aug 6 19:13:50 2005 +@@ -181,5 +181,5 @@ + case JOF_JUMPX: + off = GetJumpOffset(pc, pc); +- fprintf(fp, " %u (%d)", loc + off, off); ++ fprintf(fp, " %tu (%td)", loc + off, off); + break; + +@@ -216,8 +216,8 @@ + high = GET_JUMP_OFFSET(pc2); + pc2 += JUMP_OFFSET_LEN; +- fprintf(fp, " defaultOffset %d low %d high %d", off, low, high); ++ fprintf(fp, " defaultOffset %td low %d high %d", off, low, high); + for (i = low; i <= high; i++) { + off = GetJumpOffset(pc, pc2); +- fprintf(fp, "\n\t%d: %d", i, off); ++ fprintf(fp, "\n\t%d: %td", i, off); + pc2 += jmplen; + } +@@ -230,5 +230,5 @@ + { + jsbytecode *pc2; +- jsint npairs; ++ int npairs; + + jmplen = (type == JOF_LOOKUPSWITCH) ? JUMP_OFFSET_LEN +@@ -237,7 +237,7 @@ + off = GetJumpOffset(pc, pc2); + pc2 += jmplen; +- npairs = (jsint) GET_ATOM_INDEX(pc2); ++ npairs = GET_ATOM_INDEX(pc2); + pc2 += ATOM_INDEX_LEN; +- fprintf(fp, " offset %d npairs %u", off, (uintN) npairs); ++ fprintf(fp, " offset %td npairs %d", off, npairs); + while (npairs) { + atom = GET_ATOM(cx, script, pc2); +@@ -253,5 +253,5 @@ + if (!cstr) + return 0; +- fprintf(fp, "\n\t%s: %d", cstr, off); ++ fprintf(fp, "\n\t%s: %td", cstr, off); + JS_free(cx, cstr); + npairs--; +--- jsparse.c Mon Mar 29 22:20:03 2004 ++++ jsparse.c Sat Aug 6 19:15:27 2005 +@@ -876,5 +876,5 @@ + return NULL; + } +- ALE_SET_JSOP(ale, tc->topStmt ? JSOP_CLOSURE : JSOP_DEFFUN); ++ ALE_SET_JSOP(ale, (uintptr_t)(tc->topStmt ? JSOP_CLOSURE : JSOP_DEFFUN)); + + #if JS_HAS_LEXICAL_CLOSURE +--- jsprf.c Wed Feb 25 08:33:42 2004 ++++ jsprf.c Sat Aug 6 19:18:26 2005 +@@ -56,5 +56,5 @@ + */ + #ifdef HAVE_VA_COPY +-#define VARARGS_ASSIGN(foo, bar) VA_COPY(foo,bar) ++#define VARARGS_ASSIGN(foo, bar) va_copy(foo,bar) + #elif defined(HAVE_VA_LIST_AS_ARRAY) + #define VARARGS_ASSIGN(foo, bar) foo[0] = bar[0] +--- js.c Wed Feb 11 02:21:59 2004 ++++ js.c Sat Aug 6 19:23:09 2005 +@@ -921,5 +921,5 @@ + delta = SN_DELTA(sn); + offset += delta; +- fprintf(gOutFile, "%3u: %5u [%4u] %-8s", ++ fprintf(gOutFile, "%3tu: %5u [%4u] %-8s", + PTRDIFF(sn, notes, jssrcnote), offset, delta, + js_SrcNoteSpec[SN_TYPE(sn)].name); +@@ -1006,5 +1006,5 @@ + fprintf(gOutFile, "\nException table:\nstart\tend\tcatch\n"); + while (tn->start && tn->catchStart) { +- fprintf(gOutFile, " %d\t%d\t%d\n", ++ fprintf(gOutFile, " %td\t%td\t%td\n", + tn->start, tn->start + tn->length, tn->catchStart); + tn++; +@@ -1222,6 +1222,6 @@ + #undef DUMP_ATTR + +- fprintf(fp, " slot %lu flags %x shortid %d\n", +- sprop->slot, sprop->flags, sprop->shortid); ++ fprintf(fp, " slot %u flags %x shortid %d\n", ++ (unsigned)sprop->slot, (int)sprop->flags, (int)sprop->shortid); + } + } +--- jsapi.c Wed Jun 16 17:42:39 2004 ++++ jsapi.c Mon Aug 8 02:32:15 2005 +@@ -126,5 +126,5 @@ + static JSBool + TryArgumentFormatter(JSContext *cx, const char **formatp, JSBool fromJS, +- jsval **vpp, va_list *app) ++ jsval **vpp, va_list app) + { + const char *format; +@@ -264,6 +264,5 @@ + default: + format--; +- if (!TryArgumentFormatter(cx, &format, JS_TRUE, &sp, +- JS_ADDRESSOF_VA_LIST(ap))) { ++ if (!TryArgumentFormatter(cx, &format, JS_TRUE, &sp, ap)) { + return JS_FALSE; + } +@@ -367,6 +366,5 @@ + default: + format--; +- if (!TryArgumentFormatter(cx, &format, JS_FALSE, &sp, +- JS_ADDRESSOF_VA_LIST(ap))) { ++ if (!TryArgumentFormatter(cx, &format, JS_FALSE, &sp, ap)) { + goto bad; + } +@@ -2190,5 +2188,5 @@ + + if (attrs & JSPROP_INDEX) { +- id = INT_TO_JSVAL((jsint)name); ++ id = INT_TO_JSVAL(name); + atom = NULL; + attrs &= ~JSPROP_INDEX; --Boundary-00=_OA79CdzJI7+9oGa--