alpha64 vs. POINTER_SIZE cleanup
authorClaus Gittinger <cg@exept.de>
Thu, 07 Jul 2005 17:02:28 +0200
changeset 1607 074a99bb9a50
parent 1606 eaf685612275
child 1608 24ec26053036
alpha64 vs. POINTER_SIZE cleanup
ObjectFileLoader.st
--- a/ObjectFileLoader.st	Thu Jun 30 00:11:11 2005 +0200
+++ b/ObjectFileLoader.st	Thu Jul 07 17:02:28 2005 +0200
@@ -49,7 +49,7 @@
 # define HAS_DL
 #endif
 
-#if defined(alpha) && defined(__osf__)
+#if defined(__alpha__) && defined(__osf__)
 # define SYSV4_DL
 # define HAS_DL
 #endif
@@ -116,7 +116,7 @@
 # endif /* a.out */
 
 # ifdef COFF
-#  ifdef mips
+#  ifdef __mips__
 #    include <sys/exec.h>
 #  else
 #    include <a.out.h>
@@ -600,7 +600,7 @@
 # if defined(SYSV4) || defined(ELF)
     RETURN ( @symbol(elf));
 # endif
-# if defined(alpha) && defined(__osf__)
+# if defined(__alpha__) && defined(__osf__)
     RETURN ( @symbol(coff));
 # endif
 # if defined(GNU_DL)
@@ -1749,7 +1749,7 @@
     extern void *dlsym();
 
     if (__bothSmallInteger(low, hi)) {
-#ifdef alpha64
+#if __POINTER_SIZE__ == 8
 	val = (__intVal(hi) << 32) + __intVal(low);
 #else
 	val = (__intVal(hi) << 16) + __intVal(low);
@@ -3113,7 +3113,7 @@
 	    fprintf(stderr, "ObjectFileLoader [info]: open %s handle = %x\n", __stringVal(pathName), handle);
 	}
 
-#ifdef alpha64
+#if __POINTER_SIZE__ == 8
 	lowHandle = (INT)handle & 0xFFFFFFFFL;
 	hiHandle = ((INT)handle >> 32) & 0xFFFFFFFFL;
 #else
@@ -3341,7 +3341,7 @@
     OBJ low = sysHandle1, hi = sysHandle2;
 
     if (__bothSmallInteger(low, hi)) {
-#ifdef alpha64
+#if __POINTER_SIZE__ == 8
 	val = (__intVal(hi) << 32) + __intVal(low);
 #else
 	val = (_intVal(hi) << 16) + _intVal(low);
@@ -3727,13 +3727,14 @@
 		prevSpace = __allocForceSpace(OLDSPACE);
 	    }
 
-#ifdef alpha
-	    if (@global(Verbose) == true)
+	    if (@global(Verbose) == true) {
+#ifdef __alpha64__
 		printf("calling initfunc %lx ...\n", addr);
 #else
-	    if (@global(Verbose) == true)
 		printf("calling initfunc %x ...\n", addr);
 #endif
+	    }
+
 	    if (special == true) {
 		if (__isSmallInteger(moduleID)) {
 		    __SET_MODULE_ID(__intVal(moduleID));
@@ -4094,7 +4095,7 @@
 !ObjectFileLoader class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/ObjectFileLoader.st,v 1.232 2005-06-21 13:10:10 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/ObjectFileLoader.st,v 1.233 2005-07-07 15:02:28 cg Exp $'
 ! !
 
 ObjectFileLoader initialize!