make 6a, 6c, 6g, 6l, libmach_amd64 build on 64-bit gcc.
these guys really really want long to be 32-bits,
so ,s/long/int32/ (and then manual fixup).
still passes all tests.
(i started out looking for just those longs that
needed to be int32 instead, and it was just too hard
to track them down one by one.)
the longs were rare enough that i don't think
it will cause integration problems.
R=ken
OCL=13787
CL=13789
diff --git a/src/cmd/6l/obj.c b/src/cmd/6l/obj.c
index 41976b6..47c0280 100644
--- a/src/cmd/6l/obj.c
+++ b/src/cmd/6l/obj.c
@@ -421,7 +421,7 @@
loadlib(void)
{
int i;
- long h;
+ int32 h;
Sym *s;
loop:
@@ -453,7 +453,7 @@
void
objfile(char *file)
{
- long off, esym, cnt, l;
+ int32 off, esym, cnt, l;
int f, work;
Sym *s;
char magbuf[SARMAG];
@@ -561,7 +561,7 @@
zaddr(uchar *p, Adr *a, Sym *h[])
{
int c, t, i;
- long l;
+ int32 l;
Sym *s;
Auto *u;
@@ -579,7 +579,7 @@
if(t & T_OFFSET) {
/*
* Hack until Charles fixes the compiler.
- a->offset = (long)(p[c] | (p[c+1]<<8) | (p[c+2]<<16) | (p[c+3]<<24));
+ a->offset = (int32)(p[c] | (p[c+1]<<8) | (p[c+2]<<16) | (p[c+3]<<24));
*/
l = p[c] | (p[c+1]<<8) | (p[c+2]<<16) | (p[c+3]<<24);
a->offset = l;
@@ -707,7 +707,7 @@
}
void
-addhist(long line, int type)
+addhist(int32 line, int type)
{
Auto *u;
Sym *s;
@@ -808,14 +808,14 @@
}
void
-ldobj(int f, long c, char *pn)
+ldobj(int f, int32 c, char *pn)
{
vlong ipc;
Prog *p, *t;
uchar *bloc, *bsize, *stop;
int v, o, r, skip, mode;
Sym *h[NSYM], *s, *di;
- ulong sig;
+ uint32 sig;
static int files;
static char **filen;
char **nfilen;
@@ -1230,7 +1230,7 @@
{
Sym *s;
char *p;
- long h;
+ int32 h;
int l, c;
h = v;
@@ -1298,7 +1298,7 @@
doprof1(void)
{
Sym *s;
- long n;
+ int32 n;
Prog *p, *q;
if(debug['v'])
@@ -1487,7 +1487,7 @@
}
int
-find1(long l, int c)
+find1(int32 l, int c)
{
char *p;
int i;
@@ -1500,7 +1500,7 @@
}
int
-find2(long l, int c)
+find2(int32 l, int c)
{
short *p;
int i;
@@ -1515,11 +1515,11 @@
return 0;
}
-long
+int32
ieeedtof(Ieee *e)
{
int exp;
- long v;
+ int32 v;
if(e->h == 0)
return 0;