>>>> "Max" == Max Matveev <makc(a)sgi.com>
writes:
>>>> "MB" == Martin Buchholz
<martin(a)xemacs.org> writes:
MB> /* map old file into the address space. */
MB> - if ( (old_base = (caddr_t) mmap ((caddr_t) 0, stat_buf.st_size,
MB> - PROT_READ, MAP_SHARED, old_file, 0)) < 0 )
MB> + old_base = (caddr_t) mmap ((caddr_t) 0, stat_buf.st_size,
MB> + PROT_READ, MAP_SHARED, old_file, 0);
MB> + if (old_base == (caddr_t) MAP_FAILED)
MB> fatal ("Can't mmap (%s): errno %d\n", old_name, errno);
MB> old_file_h = (ElfW(Ehdr) *) old_base;
MB> Max, could you take a look at this?
MB> It's possible I messed up.
Max> Strange - from the patch, it looks Ok for me. Perhaps it has something
Max> to do with the way PROT_READ etc are expandned. It would be
Max> interesting to see the output of preprocessor on the unmodified file.
I think it was unhappy with the construct
char *p;
if (p < 0) ...
which is admittedly dubious.
Max, you likely have access to various versions of MipsPro cc. You
might want to try that with very new and rather old compiler versions.
Martin