version 1.10, 1998/05/11 20:20:55 |
version 1.11, 1999/05/10 16:14:07 |
|
|
#include <string.h> |
#include <string.h> |
#include <ctype.h> |
#include <ctype.h> |
#include <err.h> |
#include <err.h> |
|
#include "byte.c" |
|
|
#ifdef MID_MACHINE_OVERRIDE |
#ifdef MID_MACHINE_OVERRIDE |
#undef MID_MACHINE |
#undef MID_MACHINE |
|
|
return(1); |
return(1); |
} |
} |
|
|
if (N_BADMAG(exec_head)) { |
if (BAD_OBJECT(exec_head)) { |
if (!ignore_bad_archive_entries) { |
if (!ignore_bad_archive_entries) { |
warnx("%s: bad format", name); |
warnx("%s: bad format", name); |
rval = 1; |
rval = 1; |
} |
} |
} else if (N_GETMID(exec_head) != MID_MACHINE) { |
|
if (!ignore_bad_archive_entries) { |
|
warnx("%s: wrong architecture", name); |
|
rval = 1; |
|
} |
|
} else { |
} else { |
(void)fseek(fp, (long)-sizeof(exec_head), |
(void)fseek(fp, (long)-sizeof(exec_head), |
SEEK_CUR); |
SEEK_CUR); |
|
|
return(1); |
return(1); |
} |
} |
|
|
if (N_BADMAG(head)) { |
if (BAD_OBJECT(head)) { |
warnx("%s: bad format", name); |
warnx("%s: bad format", name); |
return(1); |
return(1); |
} |
} |
|
|
if (N_GETMID(head) && N_GETMID(head) != MID_MACHINE) { |
fix_header_order(&head); |
warnx("%s: wrong architecture", name); |
|
return(1); |
|
} |
|
|
|
if (first) { |
if (first) { |
first = 0; |
first = 0; |