View | Details | Raw Unified | Return to bug 132287
Collapse All | Expand All

(-)qscheme/Makefile (-5 / +1 lines)
Lines 7-13 Link Here
7
7
8
PORTNAME=	qscheme
8
PORTNAME=	qscheme
9
PORTVERSION=	0.5.1
9
PORTVERSION=	0.5.1
10
PORTREVISION=	3
10
PORTREVISION=	4
11
CATEGORIES=	lang scheme
11
CATEGORIES=	lang scheme
12
MASTER_SITES=	http://www.sof.ch/dan/qscheme/files/
12
MASTER_SITES=	http://www.sof.ch/dan/qscheme/files/
13
13
Lines 40-49 Link Here
40
40
41
.include <bsd.port.pre.mk>
41
.include <bsd.port.pre.mk>
42
42
43
.if ${OSVERSION} >= 700042
44
BROKEN=		Does not compile with GCC 4.2
45
.endif
46
47
.if ${ARCH} == "ia64" || ${ARCH} == "amd64"
43
.if ${ARCH} == "ia64" || ${ARCH} == "amd64"
48
BROKEN=		Does not build on amd64 or ia64
44
BROKEN=		Does not build on amd64 or ia64
49
.endif
45
.endif
(-)qscheme/files/patch-Makefile.in (-4 / +7 lines)
Lines 1-5 Link Here
1
--- Makefile.in.orig	Thu Jun 22 19:10:21 2000
1
--- Makefile.in.orig	2000-06-23 02:10:21.000000000 +0300
2
+++ Makefile.in	Fri Oct 29 10:07:48 2004
2
+++ Makefile.in	2009-03-03 18:30:51.000000000 +0200
3
@@ -111,7 +111,7 @@
3
@@ -111,7 +111,7 @@
4
 EXTRA_DIST = mkoptable mkwhatis $(modsrc) $(scmsrc) CHANGES LICENCE_EXCEPTION
4
 EXTRA_DIST = mkoptable mkwhatis $(modsrc) $(scmsrc) CHANGES LICENCE_EXCEPTION
5
 
5
 
Lines 9-17 Link Here
9
 
9
 
10
 noinst_LIBRARIES = libqs.a
10
 noinst_LIBRARIES = libqs.a
11
 
11
 
12
@@ -580,10 +580,10 @@
12
@@ -578,12 +578,12 @@
13
 	$(COMPILE) -o $@ -shared -fPIC -I$(incpcre) $(srcdir)/regex.c $(PCRE_LIB)
14
 
13
 %.x:%.i
15
 %.x:%.i
14
 	mkoptable $< > $@
16
-	mkoptable $< > $@
17
+	./mkoptable $< > $@
15
 
18
 
16
-sproto.h: $(libqs_src)
19
-sproto.h: $(libqs_src)
17
-	@cfunctions $(libqs_src) \
20
-	@cfunctions $(libqs_src) \
(-)qscheme/files/patch-chr.c (+14 lines)
Line 0 Link Here
1
--- chr.c.orig	2009-03-03 16:47:01.000000000 +0200
2
+++ chr.c	2009-03-03 16:47:09.000000000 +0200
3
@@ -15,11 +15,6 @@
4
 
5
 #define BSLASH	'\134'
6
 
7
-struct CHR_SYM {
8
-  char *str;
9
-  char chr;
10
-};
11
-
12
 struct CHR_SYM csym[] = {
13
   { "null", 		0 },
14
   { "bell",			'\a' }, 
(-)qscheme/files/patch-file.c (+27 lines)
Line 0 Link Here
1
--- file.c.orig	2009-03-03 17:38:43.000000000 +0200
2
+++ file.c	2009-03-03 17:40:53.000000000 +0200
3
@@ -7,11 +7,13 @@
4
 
5
 #define SCM_FILE(x)		(FILE *)(SCM_AUX(x))
6
 #define SCM_FILEP(x)	(SCM_OBJTYPE(x) == SOBJ_T_FILE)
7
+#define SCM_FILE_SET	SCM_AUX_SET
8
 
9
 SOBJ scm_file_new(FILE *fp)
10
 {
11
   SOBJ new = scm_newcell(SOBJ_T_FILE);
12
-  SCM_FILE(new) = fp;
13
+  /*SCM_FILE(new) = fp;*/
14
+  SCM_FILE_SET(new, fp);
15
   return(new);
16
 }
17
 
18
@@ -77,7 +79,8 @@
19
   int r;
20
   if (!SCM_FILEP(x))		SCM_ERR("bad file", x);
21
   r = fclose(SCM_FILE(x));
22
-  SCM_FILE(x) = NULL;
23
+  /*SCM_FILE_SET(x) = NULL;*/
24
+  SCM_FILE_SET(x, NULL);
25
   return(SCM_MKINUM(r));
26
 }
27
 
(-)qscheme/files/patch-number.i (+42 lines)
Line 0 Link Here
1
--- number.i.orig	2000-06-10 01:41:00.000000000 +0300
2
+++ number.i	2009-03-03 17:04:01.000000000 +0200
3
@@ -562,7 +562,8 @@
4
 Prim(plus1, "1+", 1)
5
 {
6
   if (SCM_INUMP(TOS) && (SCM_INUM(TOS) < SOBJ_INUM_MAX)) {
7
-	(long)TOS += (1 << SOBJ_INUM_SHIFT);
8
+	/*(long)TOS += (1 << SOBJ_INUM_SHIFT);*/
9
+	TOS = (long)TOS + (long)(1 << SOBJ_INUM_SHIFT);
10
 	NEXT;
11
   }
12
   TOS = scm_add2(SCM_MKINUM(1), TOS);
13
@@ -574,7 +575,8 @@
14
 Prim(plus2, "2+", 1)
15
 {
16
   if (SCM_INUMP(TOS) && (SCM_INUM(TOS) < SOBJ_INUM_MAX)) {
17
-	(long)TOS += (2 << SOBJ_INUM_SHIFT);
18
+	/*(long)TOS += (2 << SOBJ_INUM_SHIFT);*/
19
+	TOS = (long)TOS + (long)(2 << SOBJ_INUM_SHIFT);
20
 	NEXT;
21
   }
22
   TOS = scm_add2(SCM_MKINUM(2), TOS);
23
@@ -586,7 +588,8 @@
24
 Prim(minus1, "1-", 1)
25
 {
26
   if (SCM_INUMP(TOS) && (SCM_INUM(TOS) > SOBJ_INUM_MIN)) {
27
-	(long)TOS += (-1 << SOBJ_INUM_SHIFT);
28
+	/*(long)TOS += (-1 << SOBJ_INUM_SHIFT);*/
29
+	TOS = (long)TOS + (long)(-1 << SOBJ_INUM_SHIFT);
30
 	NEXT;
31
   }
32
   TOS = scm_sub2(TOS, SCM_MKINUM(1));
33
@@ -598,7 +601,8 @@
34
 Prim(minus2, "2-", 1)
35
 {
36
   if (SCM_INUMP(TOS) && (SCM_INUM(TOS) > SOBJ_INUM_MIN)) {
37
-	(long)TOS += (-2 << SOBJ_INUM_SHIFT);
38
+	/*(long)TOS += (-2 << SOBJ_INUM_SHIFT);*/
39
+	TOS = (long)TOS + (long)(-2 << SOBJ_INUM_SHIFT);
40
 	NEXT;
41
   }
42
   TOS = scm_sub2(TOS, SCM_MKINUM(2));
(-)qscheme/files/patch-object.c (+107 lines)
Line 0 Link Here
1
--- object.c.orig	2009-03-03 17:41:46.000000000 +0200
2
+++ object.c	2009-03-03 17:58:19.000000000 +0200
3
@@ -20,8 +20,10 @@
4
 SOBJ scm_mkobjdef(int ndefs)
5
 {
6
   SOBJ new = scm_newcell(SOBJ_T_OBJDEF);
7
-  SCM_OBJDEF_AUX(new) =
8
-	scm_must_alloc(sizeof(SCM_ObjDefAux) + ((ndefs - 1) * sizeof(SCM_ObjDef)));
9
+  /*SCM_OBJDEF_AUX(new) =
10
+	scm_must_alloc(sizeof(SCM_ObjDefAux) + ((ndefs - 1) * sizeof(SCM_ObjDef)));*/
11
+  SCM_OBJDEF_AUX_SET(new,
12
+	scm_must_alloc(sizeof(SCM_ObjDefAux) + ((ndefs - 1) * sizeof(SCM_ObjDef))));
13
 
14
   SCM_OBJDEF_AUX(new)->ndefs = ndefs;
15
   return(new);
16
@@ -43,7 +45,8 @@
17
 {
18
   if (SCM_OBJDEF_AUX(x)) {
19
 	scm_free(SCM_OBJDEF_AUX(x));
20
-	SCM_OBJDEF_AUX(x) = NULL;
21
+	/*SCM_OBJDEF_AUX(x) = NULL;*/
22
+	SCM_OBJDEF_AUX_SET(x, NULL);
23
   }
24
 }
25
 
26
@@ -64,9 +67,12 @@
27
 {
28
   SOBJ new = scm_newcell(SOBJ_T_OBJECT);
29
   
30
-  SCM_OBJECT_DEF(new) = def;
31
+  /*SCM_OBJECT_DEF(new) = def;
32
   SCM_OBJECT_VAL(new) =
33
-	scm_must_alloc(sizeof(SCM_ObjVal) + ((nslots - 1) * sizeof(SOBJ)));
34
+	scm_must_alloc(sizeof(SCM_ObjVal) + ((nslots - 1) * sizeof(SOBJ)));*/
35
+  SCM_OBJECT_DEF_SET(new, def);
36
+  SCM_OBJECT_VAL_SET(new,
37
+	scm_must_alloc(sizeof(SCM_ObjVal) + ((nslots - 1) * sizeof(SOBJ))));
38
 
39
   SCM_OBJECT_VAL(new)->nslots = nslots;
40
   return(new);
41
@@ -237,7 +243,8 @@
42
   int nslots;
43
 
44
   if (SCM_OBJECT_VAL(obj) == NULL) {
45
-	SCM_OBJECT_VAL(obj) = scm_must_alloc(offsetof(SCM_ObjVal, slot[1]));
46
+	/*SCM_OBJECT_VAL(obj) = scm_must_alloc(offsetof(SCM_ObjVal, slot[1]));*/
47
+	SCM_OBJECT_VAL_SET(obj, scm_must_alloc(offsetof(SCM_ObjVal, slot[1])));
48
 	SCM_OBJECT_VAL(obj)->nslots = 1;
49
 	return(0);
50
   }
51
@@ -246,7 +253,9 @@
52
   memcpy(ov, SCM_OBJECT_VAL(obj), offsetof(SCM_ObjVal, slot[nslots]));
53
   ov->nslots++;
54
   ov->slot[nslots] = NULL;
55
-  scm_free(SCM_OBJECT_VAL(obj));   SCM_OBJECT_VAL(obj) = ov;
56
+  scm_free(SCM_OBJECT_VAL(obj));
57
+  /*SCM_OBJECT_VAL(obj) = ov;*/
58
+  SCM_OBJECT_VAL_SET(obj, ov);
59
   return(nslots);
60
 }
61
 
62
@@ -284,11 +293,13 @@
63
   int nslots, size;
64
   SOBJ new = scm_newcell(SOBJ_T_OBJECT);
65
   
66
-  SCM_OBJECT_DEF(new) = SCM_OBJECT_DEF(obj);
67
+  /*SCM_OBJECT_DEF(new) = SCM_OBJECT_DEF(obj);*/
68
+  SCM_OBJECT_DEF_SET(new, SCM_OBJECT_DEF(obj));
69
   
70
   nslots = SCM_OBJECT_VAL(obj)->nslots;
71
   size   = offsetof(SCM_ObjVal, slot[nslots]);
72
-  SCM_OBJECT_VAL(new) = scm_must_alloc(size);
73
+  /*SCM_OBJECT_VAL(new) = scm_must_alloc(size);*/
74
+  SCM_OBJECT_VAL_SET(new, scm_must_alloc(size));
75
   memcpy(SCM_OBJECT_VAL(new), SCM_OBJECT_VAL(obj), size);
76
   return(new);
77
 }
78
@@ -377,7 +388,8 @@
79
   /* make a new objdef with space for 2 more defs */
80
   newdef = scm_newcell(SOBJ_T_OBJDEF);
81
   d = objdef_append_fields(SCM_OBJDEF_AUX(olddef), 2);
82
-  SCM_OBJDEF_AUX(newdef) = d;
83
+  /*SCM_OBJDEF_AUX(newdef) = d;*/
84
+  SCM_OBJDEF_AUX_SET(newdef, d);
85
 
86
   /* prepare atom for the set! name */
87
   i = strlen(SCM_ATOM_NAME(name));
88
@@ -414,7 +426,8 @@
89
   if ((olddef = SCM_OBJECT_DEF(obj)) == NULL) SCM_ERR("bad objdef for object",obj);
90
   newdef = scm_newcell(SOBJ_T_OBJDEF);
91
   d = objdef_append_fields(SCM_OBJDEF_AUX(olddef), 1);
92
-  SCM_OBJDEF_AUX(newdef) = d;
93
+  /*SCM_OBJDEF_AUX_SET(newdef) = d;*/
94
+  SCM_OBJDEF_AUX_SET(newdef, d);
95
 
96
   slotnr = object_new_slot(obj); /* alloc new slot and get index */
97
 
98
@@ -424,7 +437,8 @@
99
   d->def[i].type = type;
100
   d->def[i].index= slotnr;
101
 
102
-  SCM_OBJECT_DEF(obj) = newdef;	/* adjust object def pointer */
103
+  /*SCM_OBJECT_DEF(obj) = newdef;*/
104
+  SCM_OBJECT_DEF_SET(obj, newdef);	/* adjust object def pointer */
105
   SCM_OBJECT_SLOT(obj,slotnr) = value;
106
   return(obj);
107
 }
(-)qscheme/files/patch-object.h (+16 lines)
Line 0 Link Here
1
--- object.h.orig	2009-03-03 17:43:57.000000000 +0200
2
+++ object.h	2009-03-03 17:54:10.000000000 +0200
3
@@ -51,10 +51,13 @@
4
 
5
 #define SCM_OBJECT_VAL(x)		((SCM_ObjVal*)(SCM_CAR(x)))
6
 #define SCM_OBJECT_DEF(x)		SCM_CDR(x)
7
+#define SCM_OBJECT_VAL_SET(x,v)		(SCM_CAR(x)=(v))
8
+#define SCM_OBJECT_DEF_SET(x,v)		(SCM_CDR(x)=(v))
9
 
10
 /*** Accessing objdef fields */
11
 
12
 #define SCM_OBJDEF_AUX(x)		((SCM_ObjDefAux*)(SCM_AUX(x)))
13
+#define SCM_OBJDEF_AUX_SET		SCM_AUX_SET
14
 #define SCM_OBJDEF_NDEFS(x)		SCM_OBJDEF_AUX(x)->ndefs
15
 #define SCM_OBJDEF_DEF(x,i)		(SCM_OBJDEF_AUX(x)->def + i)
16
 
(-)qscheme/files/patch-process.c (+20 lines)
Line 0 Link Here
1
--- process.c.orig	2000-06-01 22:30:18.000000000 +0300
2
+++ process.c	2009-03-03 17:37:30.000000000 +0200
3
@@ -38,6 +38,7 @@
4
 
5
 #define SCM_PROCESS(x)		((SCM_ProcessAux*)SCM_AUX(x))
6
 #define SCM_PROCESSP(x)		(SCM_OBJTYPE(x) == SOBJ_T_PROCESS)
7
+#define SCM_PROCESS_SET		SCM_AUX_SET
8
 
9
 #define SCM_PROCESS_PID(x)		(SCM_PROCESS(x)->pid)
10
 #define SCM_PROCESS_PORT(x,i) 	(SCM_PROCESS(x)->port[i])
11
@@ -153,7 +154,8 @@
12
   int i;
13
   SOBJ new = scm_newcell(SOBJ_T_PROCESS);
14
 
15
-  SCM_PROCESS(new) = scm_must_alloc(sizeof(SCM_ProcessAux));
16
+  /*SCM_PROCESS_SET(new) = scm_must_alloc(sizeof(SCM_ProcessAux));*/
17
+  SCM_PROCESS_SET(new, scm_must_alloc(sizeof(SCM_ProcessAux)));
18
   SCM_PROCESS_PID(new) = 0;
19
   for (i = 0; i < 3; i++)
20
     SCM_PROCESS_PORT(new, i) = NULL;
(-)qscheme/files/patch-s.h (-2 / +32 lines)
Lines 1-5 Link Here
1
--- s.h.orig	Sun Feb 10 12:45:20 2002
1
--- s.h.orig	2000-06-16 00:15:42.000000000 +0300
2
+++ s.h	Sun Feb 10 12:45:32 2002
2
+++ s.h	2009-03-03 17:35:11.000000000 +0200
3
@@ -203,7 +203,7 @@
3
@@ -203,7 +203,7 @@
4
 
4
 
5
 #ifdef SCM_WITH_THREADS
5
 #ifdef SCM_WITH_THREADS
Lines 8-10 Link Here
8
+#define SCM_SIG_SUSPEND		SIGUSR1
8
+#define SCM_SIG_SUSPEND		SIGUSR1
9
 #define SCM_SIG_RESUME		SIGXCPU
9
 #define SCM_SIG_RESUME		SIGXCPU
10
 #endif
10
 #endif
11
 
12
@@ -539,6 +539,7 @@
13
 #define SCM_CATCH_CONTEXT_UNWIND(x)		SCM_CATCH_CONTEXT(x)->unwind
14
 
15
 #define SCM_AUX(x)					SCM_VALUE(x,aux,aux)
16
+#define SCM_AUX_SET(x,v)				SCM_VALUE(x,aux,aux)=(v);
17
 
18
 /*-- type predicates */
19
 /*#define SCM_OBJTYPE(x)	(SCM_INUMP(x)?SOBJ_T_INUM:(x?SCM_OBJREF(x)->type:-1)) */
20
@@ -656,6 +657,11 @@
21
   SCM_ERR_THROW,
22
   SCM_ERR_MAX };
23
 
24
+struct CHR_SYM {
25
+  char *str;
26
+  char chr;
27
+};
28
+
29
 #include "sproto.h"
30
 
31
 #define scm_sp			scm_vmd()->reg.sp
32
@@ -668,6 +674,8 @@
33
 #define SCM_THREAD(x)		((SCM_VMD*)(SCM_AUX(x)))
34
 #define SCM_MUTEX(x)		((pthread_mutex_t *)SCM_AUX(x))
35
 #define SCM_SEMAPHORE(x)	((sem_t *)SCM_AUX(x))
36
+#define SCM_MUTEX_SET		SCM_AUX_SET
37
+#define SCM_SEMAPHORE_SET	SCM_AUX_SET
38
 
39
 #define SCM_THREADP(x)		(SCM_OBJTYPE(x) == SOBJ_T_THREAD)
40
 #define SCM_MUTEXP(x)		(SCM_OBJTYPE(x) == SOBJ_T_MUTEX)
(-)qscheme/files/patch-socket.c (+30 lines)
Line 0 Link Here
1
--- socket.c.orig	2009-03-03 18:05:10.000000000 +0200
2
+++ socket.c	2009-03-03 18:07:34.000000000 +0200
3
@@ -25,6 +25,7 @@
4
 
5
 #define SCM_SOCKETP(x)	(SCM_OBJTYPE(x) == SOBJ_T_SOCKET)
6
 #define SCM_SOCKET(x)	((SCM_SocketAux*)SCM_AUX(x))
7
+#define SCM_SOCKET_SET	SCM_AUX_SET
8
 
9
 /* report system error */
10
 static void system_error(char *msg)
11
@@ -39,7 +40,8 @@
12
 {
13
   SOBJ new;
14
   new = scm_newcell(SOBJ_T_SOCKET);
15
-  SCM_SOCKET(new) = scm_must_alloc(sizeof(SCM_SocketAux));
16
+  /*SCM_SOCKET(new) = scm_must_alloc(sizeof(SCM_SocketAux));*/
17
+  SCM_SOCKET_SET(new, scm_must_alloc(sizeof(SCM_SocketAux)));
18
   memset(SCM_SOCKET(new), 0, sizeof(SCM_SocketAux));
19
   return(new);
20
 }
21
@@ -323,7 +325,8 @@
22
 	/*	scm_puts("; sweeping socket "); scm_cprint(x); */
23
 	scm_socket_shutdown2(x, 1);
24
 	scm_free(SCM_SOCKET(x));
25
-	SCM_SOCKET(x) = NULL;
26
+	/*SCM_SOCKET(x) = NULL;*/
27
+	SCM_SOCKET_SET(x, NULL);
28
   }
29
 }
30
 
(-)qscheme/files/patch-struct.c (+48 lines)
Line 0 Link Here
1
--- struct.c.orig	2009-03-03 17:58:54.000000000 +0200
2
+++ struct.c	2009-03-03 18:02:57.000000000 +0200
3
@@ -24,8 +24,10 @@
4
 	ptr = scm_must_alloc(size);
5
 	size |= SCM_DBLOCK_ALLOCATED;
6
   }
7
-  SCM_DBLOCK_ADDR(new) = ptr;
8
-  SCM_DBLOCK_SIZE(new) = size;
9
+  /*SCM_DBLOCK_ADDR(new) = ptr;
10
+  SCM_DBLOCK_SIZE(new) = size;*/
11
+  SCM_DBLOCK_ADDR_SET(new, ptr);
12
+  SCM_DBLOCK_SIZE_SET(new, size);
13
   return(new);
14
 }
15
 
16
@@ -33,8 +35,10 @@
17
 {
18
   if (SCM_DBLOCK_SIZE(x) & SCM_DBLOCK_ALLOCATED) {
19
 	scm_free(SCM_DBLOCK_ADDR(x));
20
-	SCM_DBLOCK_ADDR(x) = NULL;
21
-	SCM_DBLOCK_SIZE(x) = 0;
22
+	/*SCM_DBLOCK_ADDR(x) = NULL;
23
+	SCM_DBLOCK_SIZE(x) = 0;*/
24
+	SCM_DBLOCK_ADDR_SET(x, NULL);
25
+	SCM_DBLOCK_SIZE_SET(x, 0);
26
   }
27
 }
28
 
29
@@ -136,7 +140,8 @@
30
 SOBJ scm_struct_def_new(int nfields)
31
 {
32
   SOBJ new = scm_newcell(SOBJ_T_STRUCT_DEF);
33
-  SCM_STRUCT_DEF(new) = scm_struct_def_alloc(nfields);
34
+  /*SCM_STRUCT_DEF(new) = scm_struct_def_alloc(nfields);*/
35
+  SCM_STRUCT_DEF_SET(new, scm_struct_def_alloc(nfields));
36
   return(new);
37
 }
38
 
39
@@ -156,7 +161,8 @@
40
 {
41
   if (SCM_STRUCT_DEF(x)) {
42
 	scm_free(SCM_STRUCT_DEF(x));
43
-	SCM_STRUCT_DEF(x) = NULL;
44
+	/*SCM_STRUCT_DEF(x) = NULL;*/
45
+	SCM_STRUCT_DEF_SET(x, NULL);
46
   }
47
 }
48
 
(-)qscheme/files/patch-struct.h (+19 lines)
Line 0 Link Here
1
--- struct.h.orig	2009-03-03 17:59:24.000000000 +0200
2
+++ struct.h	2009-03-03 18:02:41.000000000 +0200
3
@@ -10,6 +10,8 @@
4
 #define SCM_DBLOCKP(x)			(SCM_OBJTYPE(x) == SOBJ_T_DBLOCK)
5
 #define SCM_DBLOCK_ADDR(x)		((void*)SCM_CAR(x))
6
 #define SCM_DBLOCK_SIZE(x)		((long)(SCM_CDR(x)))
7
+#define SCM_DBLOCK_ADDR_SET(x,v)	(SCM_CAR(x)=(v))
8
+#define SCM_DBLOCK_SIZE_SET(x,v)	(SCM_CDR(x)=(v))
9
 
10
 #define SCM_DBLOCK_ALLOCATED	(1L << ((sizeof(long)*8)-1))
11
 #define SCM_DBLOCK_SIZE_MASK	~(SCM_DBLOCK_ALLOCATED)
12
@@ -34,6 +36,7 @@
13
 
14
 #define SCM_STRUCT_DEFP(x)		(SCM_OBJTYPE(x) == SOBJ_T_STRUCT_DEF)
15
 #define SCM_STRUCT_DEF(x)		((SCM_StructDefAux *)SCM_AUX(x))
16
+#define SCM_STRUCT_DEF_SET		SCM_AUX_SET
17
 
18
 /*** Instance of a struct:
19
  *	- car points to struct def object,
(-)qscheme/files/patch-thread.c (+42 lines)
Line 0 Link Here
1
--- thread.c.orig	2009-03-03 17:22:45.000000000 +0200
2
+++ thread.c	2009-03-03 17:26:27.000000000 +0200
3
@@ -123,7 +123,8 @@
4
 SOBJ scm_mutex_new()
5
 {
6
   SOBJ new = scm_newcell(SOBJ_T_MUTEX);
7
-  SCM_MUTEX(new) = scm_must_alloc(sizeof(pthread_mutex_t));
8
+  /*SCM_MUTEX(new) = scm_must_alloc(sizeof(pthread_mutex_t));*/
9
+  SCM_MUTEX_SET(new, scm_must_alloc(sizeof(pthread_mutex_t)));
10
   pthread_mutex_init(SCM_MUTEX(new), NULL);
11
   return(new);
12
 }
13
@@ -137,7 +138,8 @@
14
 	} else {
15
 	  scm_free(SCM_MUTEX(x));
16
 	}
17
-	SCM_MUTEX(x) = NULL;
18
+	/*SCM_MUTEX(x) = NULL;*/
19
+	SCM_MUTEX_SET(x, NULL);
20
   }
21
 }
22
 
23
@@ -201,7 +203,8 @@
24
 {
25
   int n = 0;
26
   SOBJ new = scm_newcell(SOBJ_T_SEMAPHORE);
27
-  SCM_SEMAPHORE(new) = scm_must_alloc(sizeof(sem_t));
28
+  /*SCM_SEMAPHORE_SET(new) = scm_must_alloc(sizeof(sem_t));*/
29
+  SCM_SEMAPHORE_SET(new, scm_must_alloc(sizeof(sem_t)));
30
   if (nargs >= 1 && SCM_INUMP(arg[0])) {
31
 	n = SCM_INUM(n);
32
   }
33
@@ -218,7 +221,8 @@
34
 	} else {
35
 	  scm_free(SCM_SEMAPHORE(x));
36
 	}
37
-	SCM_SEMAPHORE(x) = NULL;
38
+	/*SCM_SEMAPHORE(x) = NULL;*/
39
+	SCM_SEMAPHORE_SET(x, NULL);
40
   }
41
 }
42
 
(-)qscheme/files/patch-unix.c (+38 lines)
Line 0 Link Here
1
--- unix.c.orig	2009-03-03 18:14:22.000000000 +0200
2
+++ unix.c	2009-03-03 18:17:18.000000000 +0200
3
@@ -283,12 +283,14 @@
4
 
5
 #define SCM_DIRP(x)		(SCM_OBJTYPE(x) == SOBJ_T_DIR)
6
 #define SCM_DIR(x)		(DIR *)SCM_AUX(x)
7
+#define SCM_DIR_SET		SCM_AUX_SET
8
 
9
 void scm_dir_sweep(SOBJ x)
10
 {
11
   if (SCM_DIR(x) != NULL) {
12
 	closedir(SCM_DIR(x));
13
-	SCM_DIR(x) = NULL;
14
+	/*SCM_DIR(x) = NULL;*/
15
+	SCM_DIR_SET(x, NULL);
16
   }
17
 }
18
 
19
@@ -300,7 +302,8 @@
20
   if (!SCM_STRINGP(name))	SCM_ERR("bad dir name", name);
21
   if ((dir = opendir(SCM_STR_VALUE(name))) != NULL) {
22
 	new = scm_newcell(SOBJ_T_DIR);
23
-	SCM_DIR(new) = dir;
24
+	/*SCM_DIR(new) = dir;*/
25
+	SCM_DIR_SET(new, dir);
26
 	return(new);
27
   }
28
   return(scm_false);
29
@@ -312,7 +315,8 @@
30
   if (!SCM_DIRP(dir))	SCM_ERR("bad dir", dir);
31
   if (SCM_DIR(dir) == NULL) SCM_ERR("already closed", dir);
32
   r = closedir(SCM_DIR(dir));
33
-  SCM_DIR(dir) = NULL;
34
+  /*SCM_DIR(dir) = NULL;*/
35
+  SCM_DIR_SET(dir, NULL);
36
   return(SCM_MKBOOL(r == 0));
37
 }
38
 
(-)qscheme/files/patch-vm2.c (-2 / +12 lines)
Lines 1-5 Link Here
1
--- vm2.c.orig	Wed Oct 27 19:33:03 2004
1
--- vm2.c.orig	2000-06-01 17:47:00.000000000 +0300
2
+++ vm2.c	Wed Oct 27 19:33:16 2004
2
+++ vm2.c	2009-03-03 17:12:14.000000000 +0200
3
@@ -185,8 +185,8 @@
3
@@ -185,8 +185,8 @@
4
 
4
 
5
 #define RETURN(value) { TOS=(value);  NEXT; }
5
 #define RETURN(value) { TOS=(value);  NEXT; }
Lines 11-13 Link Here
11
 
11
 
12
 
12
 
13
 /****************************************************************
13
 /****************************************************************
14
@@ -392,7 +392,8 @@
15
   ef = (SCM_EnvFrame*)sp;											\
16
   /* alloc space on stack for an env object and fill it's frame and \
17
      next fields */													\
18
-  ((void*)sp) -= sizeof(Sobject);									\
19
+  /*((void*)sp) -= sizeof(Sobject);*/									\
20
+  sp = ((void*)sp) - sizeof(Sobject);									\
21
   SCM_ENV_FRAME((SOBJ)sp) = ef;										\
22
   SCM_ENV_NEXT((SOBJ)sp) = nextenv;									\
23
   env = (SOBJ)sp;													\

Return to bug 132287