summaryrefslogtreecommitdiff
path: root/arscan.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>1999-07-22 04:31:11 +0000
committerPaul Smith <psmith@gnu.org>1999-07-22 04:31:11 +0000
commit6d2984e0b28ce83a2c675ac03c0fd19d6a353a11 (patch)
tree52630c9e2f9becc568b165bae3807c4261a57e78 /arscan.c
parentec50fe2a2baf518181896a0cc5f376eb4d47ff0a (diff)
downloadgunmake-6d2984e0b28ce83a2c675ac03c0fd19d6a353a11.tar.gz
* Fix backward incompatibility in new function implementation.
* Add support for ARFZMAG archive formats.
Diffstat (limited to 'arscan.c')
-rw-r--r--arscan.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/arscan.c b/arscan.c
index 0632ddb..b1b7d10 100644
--- a/arscan.c
+++ b/arscan.c
@@ -517,8 +517,20 @@ ar_scan (archive, function, arg)
break;
if (nread != AR_HDR_SIZE
-#ifdef ARFMAG
- || bcmp (member_header.ar_fmag, ARFMAG, 2)
+#if defined(ARFMAG) || defined(ARFZMAG)
+ || (
+# ifdef ARFMAG
+ bcmp (member_header.ar_fmag, ARFMAG, 2)
+# else
+ 1
+# endif
+ &&
+# ifdef ARFZMAG
+ bcmp (member_header.ar_fmag, ARFZMAG, 2)
+# else
+ 1
+# endif
+ )
#endif
)
{
@@ -768,7 +780,7 @@ ar_member_touch (arname, memname)
#else
fstat (fd, &statbuf);
#endif
-#if defined(ARFMAG) || defined(AIAMAG)
+#if defined(ARFMAG) || defined(ARFZMAG) || defined(AIAMAG)
/* Advance member's time to that time */
for (i = 0; i < sizeof ar_hdr.ar_date; i++)
ar_hdr.ar_date[i] = ' ';