Index: JavaScript-0.55/JavaScript.xs --- JavaScript-0.55/JavaScript.xs.orig 2005-06-29 21:07:06 +0200 +++ JavaScript-0.55/JavaScript.xs 2006-03-06 22:39:04 +0100 @@ -6,7 +6,7 @@ #else #include #endif -#include +#include #define _IS_UNDEF(a) (SvANY(a) == SvANY(&PL_sv_undef)) Index: JavaScript-0.55/Makefile.PL --- JavaScript-0.55/Makefile.PL.orig 2005-06-28 23:49:03 +0200 +++ JavaScript-0.55/Makefile.PL 2006-03-06 22:39:04 +0100 @@ -10,30 +10,13 @@ $define .= " -DXP_UNIX"; } -my $inc = ''; - -if(-f "/etc/gentoo-release") { - # Gentoo puts libjs in a slightly hidden spot. - $inc = '-I/usr/lib/MozillaFirefox/include/js/ -I/usr/lib/MozillaFirefox/'; -} - -#test for debian type include files... -if (-f "/usr/include/smjs/jsapi.h" or -f "/usr/local/include/smjs/jsapi.h") { - $define .= " -DINCLUDES_IN_SMJS" -} +my $inc = '-I../js/src'; if($ENV{JS_THREADSAFE}) { $define .= " -DJS_THREADSAFE"; } -my $lib = "-ljs"; -#test for debian type libsmjs -#this could probably be done better, but I'm not sure how to -#get this platform independant -if (-f "/usr/lib/libsmjs.so" or -f "/usr/local/lib/libsmjs.so") { - $lib = "-lsmjs"; -} - +my $lib = "-L../js/src -ljs"; WriteMakefile( 'NAME' => 'JavaScript', Index: JavaScript-SpiderMonkey-0.16/Makefile.PL --- JavaScript-SpiderMonkey-0.16/Makefile.PL.orig 2006-02-28 18:13:08 +0100 +++ JavaScript-SpiderMonkey-0.16/Makefile.PL 2006-03-06 22:39:27 +0100 @@ -108,7 +108,6 @@ 'NAME' => 'JavaScript::SpiderMonkey', 'VERSION_FROM' => 'SpiderMonkey.pm', # finds $VERSION 'PREREQ_PM' => { - 'Log::Log4perl' => 0, 'Data::Dumper' => 0, }, # e.g., Module::Name => 1.1 ($] >= 5.005 ? ## Add these new keywords supported since 5.005 Index: JavaScript-SpiderMonkey-0.16/SpiderMonkey.pm --- JavaScript-SpiderMonkey-0.16/SpiderMonkey.pm.orig 2006-03-06 17:48:27 +0100 +++ JavaScript-SpiderMonkey-0.16/SpiderMonkey.pm 2006-03-06 22:39:04 +0100 @@ -75,7 +75,6 @@ use strict; use warnings; use Data::Dumper; -use Log::Log4perl qw(:easy); require Exporter; require DynaLoader; @@ -555,14 +554,7 @@ ################################################## sub debug_enabled { ################################################## - my $logger = Log::Log4perl::get_logger("JavaScript::SpiderMonkey"); - if(Log::Log4perl->initialized() and $logger->is_debug()) { - # print "DEBUG IS ENABLED\n"; - return 1; - } else { - # print "DEBUG IS DISABLED\n"; - return 0; - } + return 0; } 1; Index: js/src/jsapi.c --- js/src/jsapi.c.orig 2005-10-22 12:19:14 +0200 +++ js/src/jsapi.c 2006-03-06 22:39:04 +0100 @@ -125,7 +125,7 @@ static JSBool TryArgumentFormatter(JSContext *cx, const char **formatp, JSBool fromJS, - jsval **vpp, va_list *app) + jsval **vpp, va_list app) { const char *format; JSArgumentFormatMap *map; @@ -263,8 +263,7 @@ break; 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; } /* NB: the formatter already updated sp, so we continue here. */ @@ -366,8 +365,7 @@ break; default: format--; - if (!TryArgumentFormatter(cx, &format, JS_FALSE, &sp, - JS_ADDRESSOF_VA_LIST(ap))) { + if (!TryArgumentFormatter(cx, &format, JS_FALSE, &sp, ap)) { goto bad; } /* NB: the formatter already updated sp, so we continue here. */ @@ -2211,7 +2209,7 @@ JSAtom *atom; if (attrs & JSPROP_INDEX) { - id = INT_TO_JSVAL((jsint)name); + id = INT_TO_JSVAL(name); atom = NULL; attrs &= ~JSPROP_INDEX; } else { Index: js/src/jscntxt.c --- js/src/jscntxt.c.orig 2004-08-19 19:57:36 +0200 +++ js/src/jscntxt.c 2006-03-06 22:39:04 +0100 @@ -334,7 +334,7 @@ { const JSResolvingKey *key = (const JSResolvingKey *)ptr; - return ((JSDHashNumber)key->obj >> JSVAL_TAGBITS) ^ key->id; + return ((JSDHashNumber)JS_PTR_TO_UINT32(key->obj) >> JSVAL_TAGBITS) ^ key->id; } JS_PUBLIC_API(JSBool) Index: js/src/jsdtoa.c --- js/src/jsdtoa.c.orig 2004-04-04 00:11:11 +0200 +++ js/src/jsdtoa.c 2006-03-06 22:39:04 +0100 @@ -257,7 +257,7 @@ #define word1(x) JSDOUBLE_LO32(x) #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 */ /* Ten_pmax = floor(P*log(2)/log(5)) */ @@ -989,7 +989,8 @@ static double ulp(double x) { 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; #ifndef Sudden_Underflow @@ -1020,7 +1021,7 @@ { ULong *xa, *xa0, w, y, z; int32 k; - double d; + double d = 0.; #define d0 word0(d) #define d1 word1(d) #define set_d0(x) set_word0(d, x) @@ -1836,6 +1837,7 @@ } #ifdef Avoid_Underflow if (scale) { + rv0 = 0.; /* calm the compiler warning */ set_word0(rv0, Exp_1 - P*Exp_msk1); set_word1(rv0, 0); if ((word0(rv) & Exp_mask) <= P*Exp_msk1 Index: js/src/jsinterp.c --- js/src/jsinterp.c.orig 2004-09-24 04:16:49 +0200 +++ js/src/jsinterp.c 2006-03-06 22:39:04 +0100 @@ -1741,11 +1741,11 @@ void *mark; 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; JSProperty *prop; @@ -1757,7 +1757,7 @@ JSFunction *fun; JSType type; #ifdef DEBUG - FILE *tracefp; + FILE *tracefp = NULL; #endif #if JS_HAS_EXPORT_IMPORT JSIdArray *ida; @@ -1834,6 +1834,7 @@ !JS_CHECK_STACK_SIZE(cx, stackDummy)) { JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_OVER_RECURSED); ok = JS_FALSE; + sp = NULL; goto out; } @@ -1843,6 +1844,7 @@ newsp = js_AllocRawStack(cx, (uintN)(2 * depth), &mark); if (!newsp) { ok = JS_FALSE; + sp = NULL; goto out; } sp = newsp + depth; Index: js/src/jsosdep.h --- js/src/jsosdep.h.orig 2003-11-15 01:10:59 +0100 +++ js/src/jsosdep.h 2006-03-06 22:39:04 +0100 @@ -101,7 +101,7 @@ #elif defined(SOLARIS) #define JS_HAVE_LONG_LONG -#elif defined(FREEBSD) +#elif defined(FREEBSD) || defined(__FreeBSD__) #define JS_HAVE_LONG_LONG #elif defined(SUNOS4) Index: js/src/jspubtd.h --- js/src/jspubtd.h.orig 2004-06-15 18:38:43 +0200 +++ js/src/jspubtd.h 2006-03-06 22:39:04 +0100 @@ -531,7 +531,7 @@ typedef JSBool (* JS_DLL_CALLBACK JSArgumentFormatter)(JSContext *cx, const char *format, JSBool fromJS, jsval **vpp, - va_list *app); + va_list app); #endif typedef JSBool Index: js/src/jstypes.h --- js/src/jstypes.h.orig 2003-11-15 01:11:04 +0100 +++ js/src/jstypes.h 2006-03-06 22:39:04 +0100 @@ -203,6 +203,19 @@ #define JS_BITMASK(n) (JS_BIT(n) - 1) /*********************************************************************** +** MACROS: JS_PTR_TO_INT32 +** JS_PTR_TO_UINT32 +** JS_INT32_TO_PTR +** JS_UINT32_TO_PTR +** DESCRIPTION: +** Integer to pointer and pointer to integer conversion macros. +***********************************************************************/ +#define JS_PTR_TO_INT32(x) ((jsint)((char *)(x) - (char *)0)) +#define JS_PTR_TO_UINT32(x) ((jsuint)((char *)(x) - (char *)0)) +#define JS_INT32_TO_PTR(x) ((void *)((char *)0 + (jsint)(x))) +#define JS_UINT32_TO_PTR(x) ((void *)((char *)0 + (jsuint)(x))) + +/*********************************************************************** ** MACROS: JS_HOWMANY ** JS_ROUNDUP ** JS_MIN Index: js/src/perlconnect/JS.xs --- js/src/perlconnect/JS.xs.orig 2005-02-12 21:10:34 +0100 +++ js/src/perlconnect/JS.xs 2006-03-06 22:39:04 +0100 @@ -61,7 +61,7 @@ #include #include "jsperlpvt.h" -#include +#include /* __REMOVE__ */ /* #include */ Index: js/src/rules.mk --- js/src/rules.mk.orig 2003-11-15 01:11:04 +0100 +++ js/src/rules.mk 2006-03-06 22:39:04 +0100 @@ -58,7 +58,7 @@ # TARGETS = $(LIBRARY) # $(PROGRAM) not supported for MSVC yet TARGETS += $(SHARED_LIBRARY) $(PROGRAM) # it is now else -TARGETS += $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM) +TARGETS += $(LIBRARY) $(PROGRAM) endif all: Index: js/src/config/SunOS5.10_i86pc.mk --- js/src/config/SunOS5.10_i86pc.mk.orig 2006-06-06 14:24:18.124955215 +0200 +++ js/src/config/SunOS5.10_i86pc.mk 2006-06-06 14:24:07.034374207 +0200 @@ -0,0 +1,16 @@ + +CC = gcc +LD = ld +CCC = g++ +CFLAGS += -Wall -Wno-format +MKSHLIB = $(LD) -shared $(XMKSHLIBOPTS) +RANLIB = echo +CPU_ARCH = $(shell uname -m) +GFX_ARCH = x +OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -DSOLARIS -DHAVE_LOCALTIME_R -DHAVE_VA_COPY -DVA_COPY=va_copy -DPIC -fPIC +OS_LIBS = -lsocket -lnsl -ldl +LDFLAGS = +NOSUCHFILE = /solaris-rm-f-sucks +JS_EDITLINE = 1 +OS_TEST = i86pc + Index: js/src/config.mk --- js/src/config.mk.orig 2003-11-15 01:10:55.000000000 +0100 +++ js/src/config.mk 2006-06-06 14:32:09.769085477 +0200 @@ -114,7 +114,7 @@ ifdef BUILD_OPT OPTIMIZER = -O -DEFINES += -UDEBUG -DNDEBUG -UDEBUG_$(shell whoami) +DEFINES += -UDEBUG -DNDEBUG OBJDIR_TAG = _OPT else ifdef USE_MSVC @@ -122,7 +122,7 @@ else OPTIMIZER = -g endif -DEFINES += -DDEBUG -DDEBUG_$(shell whoami) +DEFINES += -DDEBUG OBJDIR_TAG = _DBG endif