Subversion Repositories Projects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
169 dhylands 1
Squeak creates a function called clone which is used in the VM. Unfortunately,
2
uClibc also declares a function called clone. This patch causes squeak to
3
rename it's clone to something else that doesn't conflict.
4
 
5
Index: Squeak-3.6-3/src/vm/interp.c
6
===================================================================
7
--- Squeak-3.6-3/src/vm/interp.c        2008-01-10 21:55:51.000000000 -0800
8
+++ Squeak-3.6-3/src/vm/interp.c        2008-01-10 21:50:28.000000000 -0800
9
@@ -1063,7 +1063,7 @@
10
 int classSmallInteger(void);
11
 int classString(void);
12
 int cleanUpContexts(void);
13
-int clone(int oop);
14
+int sq_clone(int oop);
15
 int commonAt(int stringy);
16
 int commonAtPut(int stringy);
17
 int commonVariableatcacheIndex(int rcvr, int index, int atIx);
18
@@ -2423,7 +2423,7 @@
19
 /*     Return a shallow copy of the given object. */
20
 /*     Assume: Oop is a real object, not a small integer. */
21
 
22
-int clone(int oop) {
23
+int sq_clone(int oop) {
24
 register struct foo * foo = &fum;
25
     int remappedOop;
26
     int fromIndex;
27
@@ -11831,7 +11831,7 @@
28
     int newCopy;
29
     int sp;
30
 
31
-       newCopy = clone(longAt(foo->stackPointer));
32
+       newCopy = sq_clone(longAt(foo->stackPointer));
33
        /* begin pop:thenPush: */
34
        longAtput(sp = foo->stackPointer - ((1 - 1) * 4), newCopy);
35
        foo->stackPointer = sp;
36
Index: Squeak-3.6-3/platforms/Cross/vm/sqVirtualMachine.c
37
===================================================================
38
--- Squeak-3.6-3/platforms/Cross/vm/sqVirtualMachine.c  2008-01-10 21:49:09.000000000 -0800
39
+++ Squeak-3.6-3/platforms/Cross/vm/sqVirtualMachine.c  2008-01-10 21:49:55.000000000 -0800
40
@@ -104,7 +104,7 @@
41
 
42
 
43
 /* InterpreterProxy methodsFor: 'instance creation' */
44
-int clone(int oop);
45
+int sq_clone(int oop);
46
 int instantiateClassindexableSize(int classPointer, int size);
47
 int makePointwithxValueyValue(int xValue, int yValue);
48
 int popRemappableOop(void);
49
@@ -251,7 +251,7 @@
50
 
51
 
52
        /* InterpreterProxy methodsFor: 'instance creation' */
53
-       VM->clone = clone;
54
+       VM->clone = sq_clone;
55
        VM->instantiateClassindexableSize = instantiateClassindexableSize;
56
        VM->makePointwithxValueyValue = makePointwithxValueyValue;
57
        VM->popRemappableOop = popRemappableOop;