summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1993-12-16 23:24:39 +0000
committerRoland McGrath <roland@redhat.com>1993-12-16 23:24:39 +0000
commita0ab37fcd61ee7199b99b5ed916cc4205d8e9093 (patch)
tree2108df224e6bf5d28a1e61ba3dbb4a24aa7baca8
parent65b80562036bd9e72cdecf3c4c63d16d92cacee3 (diff)
downloadgunmake-a0ab37fcd61ee7199b99b5ed916cc4205d8e9093.tar.gz
Formerly arscan.c.~32~
-rw-r--r--arscan.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/arscan.c b/arscan.c
index 7352785..f3bb3ce 100644
--- a/arscan.c
+++ b/arscan.c
@@ -25,6 +25,11 @@
#ifndef NO_ARCHIVES
+/* SCO Unix's compiler defines both of these. */
+#ifdef M_UNIX
+#undef M_XENIX
+#endif
+
/* On the sun386i and in System V rel 3, ar.h defines two different archive
formats depending upon whether you have defined PORTAR (normal) or PORT5AR
(System V Release 1). There is no default, one or the other must be defined
@@ -32,8 +37,15 @@
#if (!defined (PORTAR) || PORTAR == 0) && (!defined (PORT5AR) || PORT5AR == 0)
#undef PORTAR
+#ifdef M_XENIX
+/* According to Jim Sievert <jas1@rsvl.unisys.com>, for SCO XENIX defining
+ PORTAR to 1 gets the wrong archive format, and defining it to 0 gets the
+ right one. */
+#define PORTAR 0
+#else
#define PORTAR 1
#endif
+#endif
#include <ar.h>
@@ -41,11 +53,6 @@
#ifndef AR_HDR_SIZE
#define AR_HDR_SIZE (sizeof (struct ar_hdr))
#endif
-
-/* SCO Unix's compiler defines both of these. */
-#ifdef M_UNIX
-#undef M_XENIX
-#endif
/* Takes three arguments ARCHIVE, FUNCTION and ARG.