Module Name: src
Committed By: matt
Date: Fri Dec 18 06:12:25 UTC 2009
Modified Files:
src/bin/pax [matt-nb5-mips64]: Makefile ar_io.c
Log Message:
Make this compile on snow leopard.
To generate a diff of this commit:
cvs rdiff -u -r1.37.12.1 -r1.37.12.2 src/bin/pax/Makefile
cvs rdiff -u -r1.48.22.1 -r1.48.22.2 src/bin/pax/ar_io.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/bin/pax/Makefile
diff -u src/bin/pax/Makefile:1.37.12.1 src/bin/pax/Makefile:1.37.12.2
--- src/bin/pax/Makefile:1.37.12.1 Tue Dec 15 19:53:21 2009
+++ src/bin/pax/Makefile Fri Dec 18 06:12:25 2009
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.37.12.1 2009/12/15 19:53:21 matt Exp $
+# $NetBSD: Makefile,v 1.37.12.2 2009/12/18 06:12:25 matt Exp $
# @(#)Makefile 8.1 (Berkeley) 5/31/93
.include <bsd.own.mk>
@@ -29,7 +29,7 @@
CPPFLAGS+= -DHOSTPROG
.else # { ! HOSTPROG
# XXX: Interix does not have it; we need a conditional for it.
-CPPFLAGS+= -DHAVE_MTIO_H
+CPPFLAGS+= -DHAVE_SYS_MTIO_H
LINKS+= ${BINDIR}/pax ${BINDIR}/tar
SYMLINKS+=${BINDIR}/tar /usr/bin/tar
Index: src/bin/pax/ar_io.c
diff -u src/bin/pax/ar_io.c:1.48.22.1 src/bin/pax/ar_io.c:1.48.22.2
--- src/bin/pax/ar_io.c:1.48.22.1 Tue Dec 15 19:53:21 2009
+++ src/bin/pax/ar_io.c Fri Dec 18 06:12:25 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: ar_io.c,v 1.48.22.1 2009/12/15 19:53:21 matt Exp $ */
+/* $NetBSD: ar_io.c,v 1.48.22.2 2009/12/18 06:12:25 matt Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)ar_io.c 8.2 (Berkeley) 4/18/94";
#else
-__RCSID("$NetBSD: ar_io.c,v 1.48.22.1 2009/12/15 19:53:21 matt Exp $");
+__RCSID("$NetBSD: ar_io.c,v 1.48.22.2 2009/12/18 06:12:25 matt Exp $");
#endif
#endif /* not lint */
@@ -99,7 +99,7 @@
time_t starttime; /* time the run started */
int force_one_volume; /* 1 if we ignore volume changes */
-#ifdef HAVE_MTIO_H
+#ifdef HAVE_SYS_MTIO_H
static int get_phys(void);
#endif
extern sigset_t s_mask;
@@ -129,7 +129,7 @@
int
ar_open(const char *name)
{
-#ifdef HAVE_MTIO_H
+#ifdef HAVE_SYS_MTIO_H
struct mtget mb;
#endif
@@ -220,7 +220,7 @@
}
if (S_ISCHR(arsb.st_mode)) {
-#ifdef HAVE_MTIO_H
+#ifdef HAVE_SYS_MTIO_H
artyp = ioctl(arfd, MTIOCGET, &mb) ? ISCHR : ISTAPE;
#else
tty_warn(1, "System does not have tape support");
@@ -452,7 +452,7 @@
/* mimic cpio's block count first */
if (frmt && strcmp(NM_CPIO, argv0) == 0) {
(void)fprintf(listf, OFFT_F " blocks\n",
- (rdcnt ? rdcnt : wrcnt) / 5120);
+ (OFFT_T)(rdcnt ? rdcnt : wrcnt) / 5120);
}
ar_summary(0);
@@ -941,7 +941,7 @@
long fsbz;
off_t cpos;
off_t mpos;
-#ifdef HAVE_MTIO_H
+#ifdef HAVE_SYS_MTIO_H
struct mtop mb;
#endif
@@ -965,7 +965,7 @@
case ISRMT:
#endif /* SUPPORT_RMT */
case ISTAPE:
-#ifdef HAVE_MTIO_H
+#ifdef HAVE_SYS_MTIO_H
/*
* if the last i/o was a successful data transfer, we assume
* the fault is just a bad record on the tape that we are now
@@ -1109,7 +1109,7 @@
ar_rev(off_t sksz)
{
off_t cpos;
-#ifdef HAVE_MTIO_H
+#ifdef HAVE_SYS_MTIO_H
int phyblk;
struct mtop mb;
#endif
@@ -1180,7 +1180,7 @@
#ifdef SUPPORT_RMT
case ISRMT:
#endif /* SUPPORT_RMT */
-#ifdef HAVE_MTIO_H
+#ifdef HAVE_SYS_MTIO_H
/*
* Calculate and move the proper number of PHYSICAL tape
* blocks. If the sksz is not an even multiple of the physical
@@ -1242,7 +1242,7 @@
return 0;
}
-#ifdef HAVE_MTIO_H
+#ifdef HAVE_SYS_MTIO_H
/*
* get_phys()
* Determine the physical block size on a tape drive. We need the physical