Max, could you take a look at this?
It's possible I messed up.
Paul, we supposedly tested this an SGI running Irix 6.2, with gcc and
MispPro cc.
Paul, can you try this completely untested patch:
Index: unexelfsgi.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/unexelfsgi.c,v
retrieving revision 1.8.2.4
diff -u -w -r1.8.2.4 unexelfsgi.c
--- unexelfsgi.c 2000/11/17 10:42:25 1.8.2.4
+++ unexelfsgi.c 2000/12/05 10:53:28
@@ -226,8 +226,9 @@
fatal ("Can't fstat (%s): errno %d\n", old_name, errno);
/* map old file into the address space. */
- if ( (old_base = (caddr_t) mmap ((caddr_t) 0, stat_buf.st_size,
- PROT_READ, MAP_SHARED, old_file, 0)) < 0 )
+ old_base = (caddr_t) mmap ((caddr_t) 0, stat_buf.st_size,
+ PROT_READ, MAP_SHARED, old_file, 0);
+ if (old_base == (caddr_t) MAP_FAILED)
fatal ("Can't mmap (%s): errno %d\n", old_name, errno);
old_file_h = (ElfW(Ehdr) *) old_base;