--- Squeak-3.9-9/platforms/Cross/vm/sqMemoryAccess.h.orig 2006-09-14 18:52:45.000000000 +0100 +++ Squeak-3.9-9/platforms/Cross/vm/sqMemoryAccess.h 2007-12-02 22:12:12.000000000 +0000 @@ -82,7 +82,7 @@ static inline sqInt longAtPointerput(char *ptr, sqInt val) { return (sqInt)(*((sqInt *)ptr)= (sqInt)val); } static inline sqInt oopAtPointer(char *ptr) { return (sqInt)(*((sqInt *)ptr)); } static inline sqInt oopAtPointerput(char *ptr, sqInt val) { return (sqInt)(*((sqInt *)ptr)= (sqInt)val); } - static inline char *pointerForOop(sqInt oop) { return sqMemoryBase + oop; } + static inline char *pointerForOop(usqInt oop) { return sqMemoryBase + oop; } static inline sqInt oopForPointer(char *ptr) { return (sqInt)(ptr - sqMemoryBase); } static inline sqInt byteAt(sqInt oop) { return byteAtPointer(pointerForOop(oop)); } static inline sqInt byteAtput(sqInt oop, int val) { return byteAtPointerput(pointerForOop(oop), val); } @@ -106,8 +106,8 @@ # define longAtPointerput(ptr, val) ((sqInt)(*((sqInt *)(ptr))= (sqInt)(val))) # define oopAtPointer(ptr) (sqInt)(*((sqInt *)ptr)) # define oopAtPointerput(ptr, val) (sqInt)(*((sqInt *)ptr)= (sqInt)val) -# define pointerForOop(oop) ((char *)(sqMemoryBase + (oop))) -# define oopForPointer(ptr) ((sqInt)(ptr)) +# define pointerForOop(oop) ((char *)(sqMemoryBase + ((usqInt)(oop)))) +# define oopForPointer(ptr) ((sqInt)(((char *)(ptr)) - (sqMemoryBase))) # define byteAt(oop) byteAtPointer(pointerForOop(oop)) # define byteAtput(oop, val) byteAtPointerput(pointerForOop(oop), (val)) # define shortAt(oop) shortAtPointer(pointerForOop(oop)) --- Squeak-3.9-9/platforms/unix/src/vm/intplugins/SocketPlugin/SocketPlugin.c.orig 2006-10-11 22:47:54.000000000 +0100 +++ Squeak-3.9-9/platforms/unix/src/vm/intplugins/SocketPlugin/SocketPlugin.c 2007-12-03 12:51:17.000000000 +0000 @@ -178,7 +178,7 @@ static sqInt netAddressToInt(unsigned char * ptrToByteArray) { sqInt sz; - sz = interpreterProxy->byteSizeOf(((sqInt)(long)(ptrToByteArray) - 4)); + sz = interpreterProxy->byteSizeOf(((usqInt)(long)((char *)ptrToByteArray - sqMemoryBase) - 4)); if (!(sz == 4)) { return interpreterProxy->primitiveFail(); } @@ -315,7 +315,7 @@ return null; } if (!(interpreterProxy->failed())) { - sz = interpreterProxy->byteSizeOf(((sqInt)(long)(name) - 4)); + sz = interpreterProxy->byteSizeOf(((usqInt)(long)((char *)name - sqMemoryBase) - 4)); sqResolverStartNameLookup(name, sz); } if (interpreterProxy->failed()) {