OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   29-Jan-2006 22:19:32
  Branch: HEAD                             Handle: 2006012921193101

  Modified files:
    openpkg-src/js          js.patch js.pc js.spec

  Log:
    add a bunch of patches from the FreeBSD ports tree (fixes 64-bit
    architectures and warnings)

  Summary:
    Revision    Changes     Path
    1.3         +182 -1     openpkg-src/js/js.patch
    1.3         +1  -1      openpkg-src/js/js.pc
    1.9         +1  -1      openpkg-src/js/js.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/js/js.patch
  ============================================================================
  $ cvs diff -u -r1.2 -r1.3 js.patch
  --- openpkg-src/js/js.patch   25 Oct 2005 06:39:40 -0000      1.2
  +++ openpkg-src/js/js.patch   29 Jan 2006 21:19:31 -0000      1.3
  @@ -1,6 +1,187 @@
  +Index: jsapi.c
  +--- jsapi.c.orig     2005-10-22 12:19:14 +0200
  ++++ jsapi.c  2006-01-29 22:17:08 +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: jscntxt.c
  +--- jscntxt.c.orig   2004-08-19 19:57:36 +0200
  ++++ jscntxt.c        2006-01-29 22:17:08 +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: jsdtoa.c
  +--- jsdtoa.c.orig    2004-04-04 00:11:11 +0200
  ++++ jsdtoa.c 2006-01-29 22:17:08 +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: jsinterp.c
  +--- jsinterp.c.orig  2004-09-24 04:16:49 +0200
  ++++ jsinterp.c       2006-01-29 22:17:08 +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: jsosdep.h
  +--- jsosdep.h.orig   2003-11-15 01:10:59 +0100
  ++++ jsosdep.h        2006-01-29 22:17:08 +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: jspubtd.h
  +--- jspubtd.h.orig   2004-06-15 18:38:43 +0200
  ++++ jspubtd.h        2006-01-29 22:17:08 +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: jstypes.h
  +--- jstypes.h.orig   2003-11-15 01:11:04 +0100
  ++++ jstypes.h        2006-01-29 22:17:08 +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: rules.mk
   --- rules.mk.orig    2003-11-15 01:11:04 +0100
  -+++ rules.mk 2004-06-27 13:54:04 +0200
  ++++ rules.mk 2006-01-29 22:17:08 +0100
   @@ -58,7 +58,7 @@
    # TARGETS = $(LIBRARY)   # $(PROGRAM) not supported for MSVC yet
    TARGETS += $(SHARED_LIBRARY) $(PROGRAM)  # it is now
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/js/js.pc
  ============================================================================
  $ cvs diff -u -r1.2 -r1.3 js.pc
  --- openpkg-src/js/js.pc      27 Jun 2004 12:09:23 -0000      1.2
  +++ openpkg-src/js/js.pc      29 Jan 2006 21:19:32 -0000      1.3
  @@ -4,7 +4,7 @@
   includedir=${prefix}/include/js
   
   Name: js
  -Description: JavaScript (JS) Library
  +Description: Mozilla JavaScript (JS) Library
   Version: @version@
   Libs: -L${libdir} -ljs -ljsfdlibm -lm
   Cflags: -DXP_UNIX -I${includedir}
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/js/js.spec
  ============================================================================
  $ cvs diff -u -r1.8 -r1.9 js.spec
  --- openpkg-src/js/js.spec    1 Jan 2006 13:15:07 -0000       1.8
  +++ openpkg-src/js/js.spec    29 Jan 2006 21:19:32 -0000      1.9
  @@ -33,7 +33,7 @@
   Group:        Language
   License:      MPL/GPL/LGPL
   Version:      1.5
  -Release:      20051025
  +Release:      20060129
   
   #   package options
   %option       with_perl  no
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to