From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Mar 3 17:10:01 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FE771065697 for ; Tue, 3 Mar 2009 17:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 38F5B8FC13 for ; Tue, 3 Mar 2009 17:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n23HA1W2052088 for ; Tue, 3 Mar 2009 17:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n23HA1GK052087; Tue, 3 Mar 2009 17:10:01 GMT (envelope-from gnats) Resent-Date: Tue, 3 Mar 2009 17:10:01 GMT Resent-Message-Id: <200903031710.n23HA1GK052087@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Vitaly Magerya Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50FB510656E1 for ; Tue, 3 Mar 2009 17:05:17 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 3B5B08FC23 for ; Tue, 3 Mar 2009 17:05:17 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n23H5HL7004593 for ; Tue, 3 Mar 2009 17:05:17 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n23H5HUG004592; Tue, 3 Mar 2009 17:05:17 GMT (envelope-from nobody) Message-Id: <200903031705.n23H5HUG004592@www.freebsd.org> Date: Tue, 3 Mar 2009 17:05:17 GMT From: Vitaly Magerya To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/132287: [patch] unbreak lang/qscheme with GCC 4.2 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2009 17:10:02 -0000 >Number: 132287 >Category: ports >Synopsis: [patch] unbreak lang/qscheme with GCC 4.2 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Mar 03 17:10:00 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Vitaly Magerya >Release: FreeBSD 7.1-STABLE i386 >Organization: >Environment: FreeBSD landmine.tx97.net 7.1-STABLE FreeBSD 7.1-STABLE #7: Sun Jan 11 20:33:22 EET 2009 magv@landmine.tx97.net:/usr/obj/usr/src/sys/T40 i386 >Description: lang/qscheme was marked broken with GCC 4.2 more than a year ago; the attached patch makes it buildable again (and bumps the PORTVERSION). >How-To-Repeat: >Fix: Patch attached with submission follows: diff -ruN qscheme.orig/Makefile qscheme/Makefile --- qscheme.orig/Makefile 2007-10-04 18:47:28.000000000 +0300 +++ qscheme/Makefile 2009-03-03 18:35:42.000000000 +0200 @@ -7,7 +7,7 @@ PORTNAME= qscheme PORTVERSION= 0.5.1 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= lang scheme MASTER_SITES= http://www.sof.ch/dan/qscheme/files/ @@ -40,10 +40,6 @@ .include -.if ${OSVERSION} >= 700042 -BROKEN= Does not compile with GCC 4.2 -.endif - .if ${ARCH} == "ia64" || ${ARCH} == "amd64" BROKEN= Does not build on amd64 or ia64 .endif diff -ruN qscheme.orig/files/patch-Makefile.in qscheme/files/patch-Makefile.in --- qscheme.orig/files/patch-Makefile.in 2004-11-01 23:59:34.000000000 +0200 +++ qscheme/files/patch-Makefile.in 2009-03-03 18:31:07.000000000 +0200 @@ -1,5 +1,5 @@ ---- Makefile.in.orig Thu Jun 22 19:10:21 2000 -+++ Makefile.in Fri Oct 29 10:07:48 2004 +--- Makefile.in.orig 2000-06-23 02:10:21.000000000 +0300 ++++ Makefile.in 2009-03-03 18:30:51.000000000 +0200 @@ -111,7 +111,7 @@ EXTRA_DIST = mkoptable mkwhatis $(modsrc) $(scmsrc) CHANGES LICENCE_EXCEPTION @@ -9,9 +9,12 @@ noinst_LIBRARIES = libqs.a -@@ -580,10 +580,10 @@ +@@ -578,12 +578,12 @@ + $(COMPILE) -o $@ -shared -fPIC -I$(incpcre) $(srcdir)/regex.c $(PCRE_LIB) + %.x:%.i - mkoptable $< > $@ +- mkoptable $< > $@ ++ ./mkoptable $< > $@ -sproto.h: $(libqs_src) - @cfunctions $(libqs_src) \ diff -ruN qscheme.orig/files/patch-chr.c qscheme/files/patch-chr.c --- qscheme.orig/files/patch-chr.c 1970-01-01 03:00:00.000000000 +0300 +++ qscheme/files/patch-chr.c 2009-03-03 16:51:29.000000000 +0200 @@ -0,0 +1,14 @@ +--- chr.c.orig 2009-03-03 16:47:01.000000000 +0200 ++++ chr.c 2009-03-03 16:47:09.000000000 +0200 +@@ -15,11 +15,6 @@ + + #define BSLASH '\134' + +-struct CHR_SYM { +- char *str; +- char chr; +-}; +- + struct CHR_SYM csym[] = { + { "null", 0 }, + { "bell", '\a' }, diff -ruN qscheme.orig/files/patch-file.c qscheme/files/patch-file.c --- qscheme.orig/files/patch-file.c 1970-01-01 03:00:00.000000000 +0300 +++ qscheme/files/patch-file.c 2009-03-03 17:41:11.000000000 +0200 @@ -0,0 +1,27 @@ +--- file.c.orig 2009-03-03 17:38:43.000000000 +0200 ++++ file.c 2009-03-03 17:40:53.000000000 +0200 +@@ -7,11 +7,13 @@ + + #define SCM_FILE(x) (FILE *)(SCM_AUX(x)) + #define SCM_FILEP(x) (SCM_OBJTYPE(x) == SOBJ_T_FILE) ++#define SCM_FILE_SET SCM_AUX_SET + + SOBJ scm_file_new(FILE *fp) + { + SOBJ new = scm_newcell(SOBJ_T_FILE); +- SCM_FILE(new) = fp; ++ /*SCM_FILE(new) = fp;*/ ++ SCM_FILE_SET(new, fp); + return(new); + } + +@@ -77,7 +79,8 @@ + int r; + if (!SCM_FILEP(x)) SCM_ERR("bad file", x); + r = fclose(SCM_FILE(x)); +- SCM_FILE(x) = NULL; ++ /*SCM_FILE_SET(x) = NULL;*/ ++ SCM_FILE_SET(x, NULL); + return(SCM_MKINUM(r)); + } + diff -ruN qscheme.orig/files/patch-number.i qscheme/files/patch-number.i --- qscheme.orig/files/patch-number.i 1970-01-01 03:00:00.000000000 +0300 +++ qscheme/files/patch-number.i 2009-03-03 17:04:35.000000000 +0200 @@ -0,0 +1,42 @@ +--- number.i.orig 2000-06-10 01:41:00.000000000 +0300 ++++ number.i 2009-03-03 17:04:01.000000000 +0200 +@@ -562,7 +562,8 @@ + Prim(plus1, "1+", 1) + { + if (SCM_INUMP(TOS) && (SCM_INUM(TOS) < SOBJ_INUM_MAX)) { +- (long)TOS += (1 << SOBJ_INUM_SHIFT); ++ /*(long)TOS += (1 << SOBJ_INUM_SHIFT);*/ ++ TOS = (long)TOS + (long)(1 << SOBJ_INUM_SHIFT); + NEXT; + } + TOS = scm_add2(SCM_MKINUM(1), TOS); +@@ -574,7 +575,8 @@ + Prim(plus2, "2+", 1) + { + if (SCM_INUMP(TOS) && (SCM_INUM(TOS) < SOBJ_INUM_MAX)) { +- (long)TOS += (2 << SOBJ_INUM_SHIFT); ++ /*(long)TOS += (2 << SOBJ_INUM_SHIFT);*/ ++ TOS = (long)TOS + (long)(2 << SOBJ_INUM_SHIFT); + NEXT; + } + TOS = scm_add2(SCM_MKINUM(2), TOS); +@@ -586,7 +588,8 @@ + Prim(minus1, "1-", 1) + { + if (SCM_INUMP(TOS) && (SCM_INUM(TOS) > SOBJ_INUM_MIN)) { +- (long)TOS += (-1 << SOBJ_INUM_SHIFT); ++ /*(long)TOS += (-1 << SOBJ_INUM_SHIFT);*/ ++ TOS = (long)TOS + (long)(-1 << SOBJ_INUM_SHIFT); + NEXT; + } + TOS = scm_sub2(TOS, SCM_MKINUM(1)); +@@ -598,7 +601,8 @@ + Prim(minus2, "2-", 1) + { + if (SCM_INUMP(TOS) && (SCM_INUM(TOS) > SOBJ_INUM_MIN)) { +- (long)TOS += (-2 << SOBJ_INUM_SHIFT); ++ /*(long)TOS += (-2 << SOBJ_INUM_SHIFT);*/ ++ TOS = (long)TOS + (long)(-2 << SOBJ_INUM_SHIFT); + NEXT; + } + TOS = scm_sub2(TOS, SCM_MKINUM(2)); diff -ruN qscheme.orig/files/patch-object.c qscheme/files/patch-object.c --- qscheme.orig/files/patch-object.c 1970-01-01 03:00:00.000000000 +0300 +++ qscheme/files/patch-object.c 2009-03-03 17:58:22.000000000 +0200 @@ -0,0 +1,107 @@ +--- object.c.orig 2009-03-03 17:41:46.000000000 +0200 ++++ object.c 2009-03-03 17:58:19.000000000 +0200 +@@ -20,8 +20,10 @@ + SOBJ scm_mkobjdef(int ndefs) + { + SOBJ new = scm_newcell(SOBJ_T_OBJDEF); +- SCM_OBJDEF_AUX(new) = +- scm_must_alloc(sizeof(SCM_ObjDefAux) + ((ndefs - 1) * sizeof(SCM_ObjDef))); ++ /*SCM_OBJDEF_AUX(new) = ++ scm_must_alloc(sizeof(SCM_ObjDefAux) + ((ndefs - 1) * sizeof(SCM_ObjDef)));*/ ++ SCM_OBJDEF_AUX_SET(new, ++ scm_must_alloc(sizeof(SCM_ObjDefAux) + ((ndefs - 1) * sizeof(SCM_ObjDef)))); + + SCM_OBJDEF_AUX(new)->ndefs = ndefs; + return(new); +@@ -43,7 +45,8 @@ + { + if (SCM_OBJDEF_AUX(x)) { + scm_free(SCM_OBJDEF_AUX(x)); +- SCM_OBJDEF_AUX(x) = NULL; ++ /*SCM_OBJDEF_AUX(x) = NULL;*/ ++ SCM_OBJDEF_AUX_SET(x, NULL); + } + } + +@@ -64,9 +67,12 @@ + { + SOBJ new = scm_newcell(SOBJ_T_OBJECT); + +- SCM_OBJECT_DEF(new) = def; ++ /*SCM_OBJECT_DEF(new) = def; + SCM_OBJECT_VAL(new) = +- scm_must_alloc(sizeof(SCM_ObjVal) + ((nslots - 1) * sizeof(SOBJ))); ++ scm_must_alloc(sizeof(SCM_ObjVal) + ((nslots - 1) * sizeof(SOBJ)));*/ ++ SCM_OBJECT_DEF_SET(new, def); ++ SCM_OBJECT_VAL_SET(new, ++ scm_must_alloc(sizeof(SCM_ObjVal) + ((nslots - 1) * sizeof(SOBJ)))); + + SCM_OBJECT_VAL(new)->nslots = nslots; + return(new); +@@ -237,7 +243,8 @@ + int nslots; + + if (SCM_OBJECT_VAL(obj) == NULL) { +- SCM_OBJECT_VAL(obj) = scm_must_alloc(offsetof(SCM_ObjVal, slot[1])); ++ /*SCM_OBJECT_VAL(obj) = scm_must_alloc(offsetof(SCM_ObjVal, slot[1]));*/ ++ SCM_OBJECT_VAL_SET(obj, scm_must_alloc(offsetof(SCM_ObjVal, slot[1]))); + SCM_OBJECT_VAL(obj)->nslots = 1; + return(0); + } +@@ -246,7 +253,9 @@ + memcpy(ov, SCM_OBJECT_VAL(obj), offsetof(SCM_ObjVal, slot[nslots])); + ov->nslots++; + ov->slot[nslots] = NULL; +- scm_free(SCM_OBJECT_VAL(obj)); SCM_OBJECT_VAL(obj) = ov; ++ scm_free(SCM_OBJECT_VAL(obj)); ++ /*SCM_OBJECT_VAL(obj) = ov;*/ ++ SCM_OBJECT_VAL_SET(obj, ov); + return(nslots); + } + +@@ -284,11 +293,13 @@ + int nslots, size; + SOBJ new = scm_newcell(SOBJ_T_OBJECT); + +- SCM_OBJECT_DEF(new) = SCM_OBJECT_DEF(obj); ++ /*SCM_OBJECT_DEF(new) = SCM_OBJECT_DEF(obj);*/ ++ SCM_OBJECT_DEF_SET(new, SCM_OBJECT_DEF(obj)); + + nslots = SCM_OBJECT_VAL(obj)->nslots; + size = offsetof(SCM_ObjVal, slot[nslots]); +- SCM_OBJECT_VAL(new) = scm_must_alloc(size); ++ /*SCM_OBJECT_VAL(new) = scm_must_alloc(size);*/ ++ SCM_OBJECT_VAL_SET(new, scm_must_alloc(size)); + memcpy(SCM_OBJECT_VAL(new), SCM_OBJECT_VAL(obj), size); + return(new); + } +@@ -377,7 +388,8 @@ + /* make a new objdef with space for 2 more defs */ + newdef = scm_newcell(SOBJ_T_OBJDEF); + d = objdef_append_fields(SCM_OBJDEF_AUX(olddef), 2); +- SCM_OBJDEF_AUX(newdef) = d; ++ /*SCM_OBJDEF_AUX(newdef) = d;*/ ++ SCM_OBJDEF_AUX_SET(newdef, d); + + /* prepare atom for the set! name */ + i = strlen(SCM_ATOM_NAME(name)); +@@ -414,7 +426,8 @@ + if ((olddef = SCM_OBJECT_DEF(obj)) == NULL) SCM_ERR("bad objdef for object",obj); + newdef = scm_newcell(SOBJ_T_OBJDEF); + d = objdef_append_fields(SCM_OBJDEF_AUX(olddef), 1); +- SCM_OBJDEF_AUX(newdef) = d; ++ /*SCM_OBJDEF_AUX_SET(newdef) = d;*/ ++ SCM_OBJDEF_AUX_SET(newdef, d); + + slotnr = object_new_slot(obj); /* alloc new slot and get index */ + +@@ -424,7 +437,8 @@ + d->def[i].type = type; + d->def[i].index= slotnr; + +- SCM_OBJECT_DEF(obj) = newdef; /* adjust object def pointer */ ++ /*SCM_OBJECT_DEF(obj) = newdef;*/ ++ SCM_OBJECT_DEF_SET(obj, newdef); /* adjust object def pointer */ + SCM_OBJECT_SLOT(obj,slotnr) = value; + return(obj); + } diff -ruN qscheme.orig/files/patch-object.h qscheme/files/patch-object.h --- qscheme.orig/files/patch-object.h 1970-01-01 03:00:00.000000000 +0300 +++ qscheme/files/patch-object.h 2009-03-03 17:56:29.000000000 +0200 @@ -0,0 +1,16 @@ +--- object.h.orig 2009-03-03 17:43:57.000000000 +0200 ++++ object.h 2009-03-03 17:54:10.000000000 +0200 +@@ -51,10 +51,13 @@ + + #define SCM_OBJECT_VAL(x) ((SCM_ObjVal*)(SCM_CAR(x))) + #define SCM_OBJECT_DEF(x) SCM_CDR(x) ++#define SCM_OBJECT_VAL_SET(x,v) (SCM_CAR(x)=(v)) ++#define SCM_OBJECT_DEF_SET(x,v) (SCM_CDR(x)=(v)) + + /*** Accessing objdef fields */ + + #define SCM_OBJDEF_AUX(x) ((SCM_ObjDefAux*)(SCM_AUX(x))) ++#define SCM_OBJDEF_AUX_SET SCM_AUX_SET + #define SCM_OBJDEF_NDEFS(x) SCM_OBJDEF_AUX(x)->ndefs + #define SCM_OBJDEF_DEF(x,i) (SCM_OBJDEF_AUX(x)->def + i) + diff -ruN qscheme.orig/files/patch-process.c qscheme/files/patch-process.c --- qscheme.orig/files/patch-process.c 1970-01-01 03:00:00.000000000 +0300 +++ qscheme/files/patch-process.c 2009-03-03 17:37:43.000000000 +0200 @@ -0,0 +1,20 @@ +--- process.c.orig 2000-06-01 22:30:18.000000000 +0300 ++++ process.c 2009-03-03 17:37:30.000000000 +0200 +@@ -38,6 +38,7 @@ + + #define SCM_PROCESS(x) ((SCM_ProcessAux*)SCM_AUX(x)) + #define SCM_PROCESSP(x) (SCM_OBJTYPE(x) == SOBJ_T_PROCESS) ++#define SCM_PROCESS_SET SCM_AUX_SET + + #define SCM_PROCESS_PID(x) (SCM_PROCESS(x)->pid) + #define SCM_PROCESS_PORT(x,i) (SCM_PROCESS(x)->port[i]) +@@ -153,7 +154,8 @@ + int i; + SOBJ new = scm_newcell(SOBJ_T_PROCESS); + +- SCM_PROCESS(new) = scm_must_alloc(sizeof(SCM_ProcessAux)); ++ /*SCM_PROCESS_SET(new) = scm_must_alloc(sizeof(SCM_ProcessAux));*/ ++ SCM_PROCESS_SET(new, scm_must_alloc(sizeof(SCM_ProcessAux))); + SCM_PROCESS_PID(new) = 0; + for (i = 0; i < 3; i++) + SCM_PROCESS_PORT(new, i) = NULL; diff -ruN qscheme.orig/files/patch-s.h qscheme/files/patch-s.h --- qscheme.orig/files/patch-s.h 2004-06-10 21:30:09.000000000 +0300 +++ qscheme/files/patch-s.h 2009-03-03 17:35:29.000000000 +0200 @@ -1,5 +1,5 @@ ---- s.h.orig Sun Feb 10 12:45:20 2002 -+++ s.h Sun Feb 10 12:45:32 2002 +--- s.h.orig 2000-06-16 00:15:42.000000000 +0300 ++++ s.h 2009-03-03 17:35:11.000000000 +0200 @@ -203,7 +203,7 @@ #ifdef SCM_WITH_THREADS @@ -8,3 +8,33 @@ +#define SCM_SIG_SUSPEND SIGUSR1 #define SCM_SIG_RESUME SIGXCPU #endif + +@@ -539,6 +539,7 @@ + #define SCM_CATCH_CONTEXT_UNWIND(x) SCM_CATCH_CONTEXT(x)->unwind + + #define SCM_AUX(x) SCM_VALUE(x,aux,aux) ++#define SCM_AUX_SET(x,v) SCM_VALUE(x,aux,aux)=(v); + + /*-- type predicates */ + /*#define SCM_OBJTYPE(x) (SCM_INUMP(x)?SOBJ_T_INUM:(x?SCM_OBJREF(x)->type:-1)) */ +@@ -656,6 +657,11 @@ + SCM_ERR_THROW, + SCM_ERR_MAX }; + ++struct CHR_SYM { ++ char *str; ++ char chr; ++}; ++ + #include "sproto.h" + + #define scm_sp scm_vmd()->reg.sp +@@ -668,6 +674,8 @@ + #define SCM_THREAD(x) ((SCM_VMD*)(SCM_AUX(x))) + #define SCM_MUTEX(x) ((pthread_mutex_t *)SCM_AUX(x)) + #define SCM_SEMAPHORE(x) ((sem_t *)SCM_AUX(x)) ++#define SCM_MUTEX_SET SCM_AUX_SET ++#define SCM_SEMAPHORE_SET SCM_AUX_SET + + #define SCM_THREADP(x) (SCM_OBJTYPE(x) == SOBJ_T_THREAD) + #define SCM_MUTEXP(x) (SCM_OBJTYPE(x) == SOBJ_T_MUTEX) diff -ruN qscheme.orig/files/patch-socket.c qscheme/files/patch-socket.c --- qscheme.orig/files/patch-socket.c 1970-01-01 03:00:00.000000000 +0300 +++ qscheme/files/patch-socket.c 2009-03-03 18:07:36.000000000 +0200 @@ -0,0 +1,30 @@ +--- socket.c.orig 2009-03-03 18:05:10.000000000 +0200 ++++ socket.c 2009-03-03 18:07:34.000000000 +0200 +@@ -25,6 +25,7 @@ + + #define SCM_SOCKETP(x) (SCM_OBJTYPE(x) == SOBJ_T_SOCKET) + #define SCM_SOCKET(x) ((SCM_SocketAux*)SCM_AUX(x)) ++#define SCM_SOCKET_SET SCM_AUX_SET + + /* report system error */ + static void system_error(char *msg) +@@ -39,7 +40,8 @@ + { + SOBJ new; + new = scm_newcell(SOBJ_T_SOCKET); +- SCM_SOCKET(new) = scm_must_alloc(sizeof(SCM_SocketAux)); ++ /*SCM_SOCKET(new) = scm_must_alloc(sizeof(SCM_SocketAux));*/ ++ SCM_SOCKET_SET(new, scm_must_alloc(sizeof(SCM_SocketAux))); + memset(SCM_SOCKET(new), 0, sizeof(SCM_SocketAux)); + return(new); + } +@@ -323,7 +325,8 @@ + /* scm_puts("; sweeping socket "); scm_cprint(x); */ + scm_socket_shutdown2(x, 1); + scm_free(SCM_SOCKET(x)); +- SCM_SOCKET(x) = NULL; ++ /*SCM_SOCKET(x) = NULL;*/ ++ SCM_SOCKET_SET(x, NULL); + } + } + diff -ruN qscheme.orig/files/patch-struct.c qscheme/files/patch-struct.c --- qscheme.orig/files/patch-struct.c 1970-01-01 03:00:00.000000000 +0300 +++ qscheme/files/patch-struct.c 2009-03-03 18:03:39.000000000 +0200 @@ -0,0 +1,48 @@ +--- struct.c.orig 2009-03-03 17:58:54.000000000 +0200 ++++ struct.c 2009-03-03 18:02:57.000000000 +0200 +@@ -24,8 +24,10 @@ + ptr = scm_must_alloc(size); + size |= SCM_DBLOCK_ALLOCATED; + } +- SCM_DBLOCK_ADDR(new) = ptr; +- SCM_DBLOCK_SIZE(new) = size; ++ /*SCM_DBLOCK_ADDR(new) = ptr; ++ SCM_DBLOCK_SIZE(new) = size;*/ ++ SCM_DBLOCK_ADDR_SET(new, ptr); ++ SCM_DBLOCK_SIZE_SET(new, size); + return(new); + } + +@@ -33,8 +35,10 @@ + { + if (SCM_DBLOCK_SIZE(x) & SCM_DBLOCK_ALLOCATED) { + scm_free(SCM_DBLOCK_ADDR(x)); +- SCM_DBLOCK_ADDR(x) = NULL; +- SCM_DBLOCK_SIZE(x) = 0; ++ /*SCM_DBLOCK_ADDR(x) = NULL; ++ SCM_DBLOCK_SIZE(x) = 0;*/ ++ SCM_DBLOCK_ADDR_SET(x, NULL); ++ SCM_DBLOCK_SIZE_SET(x, 0); + } + } + +@@ -136,7 +140,8 @@ + SOBJ scm_struct_def_new(int nfields) + { + SOBJ new = scm_newcell(SOBJ_T_STRUCT_DEF); +- SCM_STRUCT_DEF(new) = scm_struct_def_alloc(nfields); ++ /*SCM_STRUCT_DEF(new) = scm_struct_def_alloc(nfields);*/ ++ SCM_STRUCT_DEF_SET(new, scm_struct_def_alloc(nfields)); + return(new); + } + +@@ -156,7 +161,8 @@ + { + if (SCM_STRUCT_DEF(x)) { + scm_free(SCM_STRUCT_DEF(x)); +- SCM_STRUCT_DEF(x) = NULL; ++ /*SCM_STRUCT_DEF(x) = NULL;*/ ++ SCM_STRUCT_DEF_SET(x, NULL); + } + } + diff -ruN qscheme.orig/files/patch-struct.h qscheme/files/patch-struct.h --- qscheme.orig/files/patch-struct.h 1970-01-01 03:00:00.000000000 +0300 +++ qscheme/files/patch-struct.h 2009-03-03 18:03:47.000000000 +0200 @@ -0,0 +1,19 @@ +--- struct.h.orig 2009-03-03 17:59:24.000000000 +0200 ++++ struct.h 2009-03-03 18:02:41.000000000 +0200 +@@ -10,6 +10,8 @@ + #define SCM_DBLOCKP(x) (SCM_OBJTYPE(x) == SOBJ_T_DBLOCK) + #define SCM_DBLOCK_ADDR(x) ((void*)SCM_CAR(x)) + #define SCM_DBLOCK_SIZE(x) ((long)(SCM_CDR(x))) ++#define SCM_DBLOCK_ADDR_SET(x,v) (SCM_CAR(x)=(v)) ++#define SCM_DBLOCK_SIZE_SET(x,v) (SCM_CDR(x)=(v)) + + #define SCM_DBLOCK_ALLOCATED (1L << ((sizeof(long)*8)-1)) + #define SCM_DBLOCK_SIZE_MASK ~(SCM_DBLOCK_ALLOCATED) +@@ -34,6 +36,7 @@ + + #define SCM_STRUCT_DEFP(x) (SCM_OBJTYPE(x) == SOBJ_T_STRUCT_DEF) + #define SCM_STRUCT_DEF(x) ((SCM_StructDefAux *)SCM_AUX(x)) ++#define SCM_STRUCT_DEF_SET SCM_AUX_SET + + /*** Instance of a struct: + * - car points to struct def object, diff -ruN qscheme.orig/files/patch-thread.c qscheme/files/patch-thread.c --- qscheme.orig/files/patch-thread.c 1970-01-01 03:00:00.000000000 +0300 +++ qscheme/files/patch-thread.c 2009-03-03 17:27:00.000000000 +0200 @@ -0,0 +1,42 @@ +--- thread.c.orig 2009-03-03 17:22:45.000000000 +0200 ++++ thread.c 2009-03-03 17:26:27.000000000 +0200 +@@ -123,7 +123,8 @@ + SOBJ scm_mutex_new() + { + SOBJ new = scm_newcell(SOBJ_T_MUTEX); +- SCM_MUTEX(new) = scm_must_alloc(sizeof(pthread_mutex_t)); ++ /*SCM_MUTEX(new) = scm_must_alloc(sizeof(pthread_mutex_t));*/ ++ SCM_MUTEX_SET(new, scm_must_alloc(sizeof(pthread_mutex_t))); + pthread_mutex_init(SCM_MUTEX(new), NULL); + return(new); + } +@@ -137,7 +138,8 @@ + } else { + scm_free(SCM_MUTEX(x)); + } +- SCM_MUTEX(x) = NULL; ++ /*SCM_MUTEX(x) = NULL;*/ ++ SCM_MUTEX_SET(x, NULL); + } + } + +@@ -201,7 +203,8 @@ + { + int n = 0; + SOBJ new = scm_newcell(SOBJ_T_SEMAPHORE); +- SCM_SEMAPHORE(new) = scm_must_alloc(sizeof(sem_t)); ++ /*SCM_SEMAPHORE_SET(new) = scm_must_alloc(sizeof(sem_t));*/ ++ SCM_SEMAPHORE_SET(new, scm_must_alloc(sizeof(sem_t))); + if (nargs >= 1 && SCM_INUMP(arg[0])) { + n = SCM_INUM(n); + } +@@ -218,7 +221,8 @@ + } else { + scm_free(SCM_SEMAPHORE(x)); + } +- SCM_SEMAPHORE(x) = NULL; ++ /*SCM_SEMAPHORE(x) = NULL;*/ ++ SCM_SEMAPHORE_SET(x, NULL); + } + } + diff -ruN qscheme.orig/files/patch-unix.c qscheme/files/patch-unix.c --- qscheme.orig/files/patch-unix.c 1970-01-01 03:00:00.000000000 +0300 +++ qscheme/files/patch-unix.c 2009-03-03 18:17:24.000000000 +0200 @@ -0,0 +1,38 @@ +--- unix.c.orig 2009-03-03 18:14:22.000000000 +0200 ++++ unix.c 2009-03-03 18:17:18.000000000 +0200 +@@ -283,12 +283,14 @@ + + #define SCM_DIRP(x) (SCM_OBJTYPE(x) == SOBJ_T_DIR) + #define SCM_DIR(x) (DIR *)SCM_AUX(x) ++#define SCM_DIR_SET SCM_AUX_SET + + void scm_dir_sweep(SOBJ x) + { + if (SCM_DIR(x) != NULL) { + closedir(SCM_DIR(x)); +- SCM_DIR(x) = NULL; ++ /*SCM_DIR(x) = NULL;*/ ++ SCM_DIR_SET(x, NULL); + } + } + +@@ -300,7 +302,8 @@ + if (!SCM_STRINGP(name)) SCM_ERR("bad dir name", name); + if ((dir = opendir(SCM_STR_VALUE(name))) != NULL) { + new = scm_newcell(SOBJ_T_DIR); +- SCM_DIR(new) = dir; ++ /*SCM_DIR(new) = dir;*/ ++ SCM_DIR_SET(new, dir); + return(new); + } + return(scm_false); +@@ -312,7 +315,8 @@ + if (!SCM_DIRP(dir)) SCM_ERR("bad dir", dir); + if (SCM_DIR(dir) == NULL) SCM_ERR("already closed", dir); + r = closedir(SCM_DIR(dir)); +- SCM_DIR(dir) = NULL; ++ /*SCM_DIR(dir) = NULL;*/ ++ SCM_DIR_SET(dir, NULL); + return(SCM_MKBOOL(r == 0)); + } + diff -ruN qscheme.orig/files/patch-vm2.c qscheme/files/patch-vm2.c --- qscheme.orig/files/patch-vm2.c 2004-11-01 23:59:34.000000000 +0200 +++ qscheme/files/patch-vm2.c 2009-03-03 17:13:30.000000000 +0200 @@ -1,5 +1,5 @@ ---- vm2.c.orig Wed Oct 27 19:33:03 2004 -+++ vm2.c Wed Oct 27 19:33:16 2004 +--- vm2.c.orig 2000-06-01 17:47:00.000000000 +0300 ++++ vm2.c 2009-03-03 17:12:14.000000000 +0200 @@ -185,8 +185,8 @@ #define RETURN(value) { TOS=(value); NEXT; } @@ -11,3 +11,13 @@ /**************************************************************** +@@ -392,7 +392,8 @@ + ef = (SCM_EnvFrame*)sp; \ + /* alloc space on stack for an env object and fill it's frame and \ + next fields */ \ +- ((void*)sp) -= sizeof(Sobject); \ ++ /*((void*)sp) -= sizeof(Sobject);*/ \ ++ sp = ((void*)sp) - sizeof(Sobject); \ + SCM_ENV_FRAME((SOBJ)sp) = ef; \ + SCM_ENV_NEXT((SOBJ)sp) = nextenv; \ + env = (SOBJ)sp; \ >Release-Note: >Audit-Trail: >Unformatted: