summaryrefslogtreecommitdiff
path: root/archivers/pax
diff options
context:
space:
mode:
authorerh <erh>2003-12-05 16:35:54 +0000
committererh <erh>2003-12-05 16:35:54 +0000
commita37f649a3a4c0790d32e1b282af2b9d3957060fa (patch)
treed4fe701d7e64dd1b29285c94c09879eb6ebe04a0 /archivers/pax
parentab63fd6948a01ef653c98619fcef35e4f57a0667 (diff)
downloadpkgsrc-a37f649a3a4c0790d32e1b282af2b9d3957060fa.tar.gz
Update pax to work on AIX. Use tape.h with appropriate fixups since
there's no mtio.h
Diffstat (limited to 'archivers/pax')
-rw-r--r--archivers/pax/files/ar_io.c8
-rw-r--r--archivers/pax/files/config.h.in3
-rwxr-xr-xarchivers/pax/files/configure2
-rw-r--r--archivers/pax/files/configure.ac2
-rw-r--r--archivers/pax/files/tape_h_fixup.h44
5 files changed, 55 insertions, 4 deletions
diff --git a/archivers/pax/files/ar_io.c b/archivers/pax/files/ar_io.c
index 5ae73c6128d..8d9f8c60a2d 100644
--- a/archivers/pax/files/ar_io.c
+++ b/archivers/pax/files/ar_io.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ar_io.c,v 1.3 2003/09/23 14:37:42 grant Exp $ */
+/* $NetBSD: ar_io.c,v 1.4 2003/12/05 16:35:54 erh Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -78,7 +78,7 @@
#if 0
static char sccsid[] = "@(#)ar_io.c 8.2 (Berkeley) 4/18/94";
#else
-__RCSID("$NetBSD: ar_io.c,v 1.3 2003/09/23 14:37:42 grant Exp $");
+__RCSID("$NetBSD: ar_io.c,v 1.4 2003/12/05 16:35:54 erh Exp $");
#endif
#endif /* not lint */
@@ -94,6 +94,10 @@ __RCSID("$NetBSD: ar_io.c,v 1.3 2003/09/23 14:37:42 grant Exp $");
#if HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
+#if HAVE_SYS_TAPE_H
+#include <sys/tape.h>
+#include "tape_h_fixup.h"
+#endif
#if HAVE_SYS_MTIO_H
#include <sys/mtio.h>
#endif
diff --git a/archivers/pax/files/config.h.in b/archivers/pax/files/config.h.in
index c1b19552c26..0ab6f65972c 100644
--- a/archivers/pax/files/config.h.in
+++ b/archivers/pax/files/config.h.in
@@ -48,6 +48,9 @@
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
+/* Define to 1 if you have the <sys/tape.h> header file. */
+#undef HAVE_SYS_TAPE_H
+
/* Define to 1 if you have the <sys/mtio.h> header file. */
#undef HAVE_SYS_MTIO_H
diff --git a/archivers/pax/files/configure b/archivers/pax/files/configure
index 83f761e1a5c..436749d45ce 100755
--- a/archivers/pax/files/configure
+++ b/archivers/pax/files/configure
@@ -2946,7 +2946,7 @@ done
-for ac_header in sys/ioctl.h sys/mtio.h sys/resource.h sys/uio.h sys/wait.h
+for ac_header in sys/ioctl.h sys/tape.h sys/mtio.h sys/resource.h sys/uio.h sys/wait.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
diff --git a/archivers/pax/files/configure.ac b/archivers/pax/files/configure.ac
index 82ddc915305..d23c43442a8 100644
--- a/archivers/pax/files/configure.ac
+++ b/archivers/pax/files/configure.ac
@@ -15,7 +15,7 @@ AC_CHECK_LIB(util, fparseln)
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([ctype.h grp.h regex.h regexp.h rmt.h stdarg.h])
-AC_CHECK_HEADERS([sys/ioctl.h sys/mtio.h sys/resource.h sys/uio.h sys/wait.h])
+AC_CHECK_HEADERS([sys/ioctl.h sys/tape.h sys/mtio.h sys/resource.h sys/uio.h sys/wait.h])
# Checks for library functions.
AC_CHECK_FUNCS([getrlimit setrlimit])
diff --git a/archivers/pax/files/tape_h_fixup.h b/archivers/pax/files/tape_h_fixup.h
new file mode 100644
index 00000000000..d54d2caf773
--- /dev/null
+++ b/archivers/pax/files/tape_h_fixup.h
@@ -0,0 +1,44 @@
+/* $NetBSD: tape_h_fixup.h,v 1.1 2003/12/05 16:35:54 erh Exp $ */
+
+/*
+ * Mapping from the mtio.h defines and structures to
+ * the tape.h ones.
+ */
+
+#ifndef _TAPE_H_FIXUP
+#define _TAPE_H_FIXUP
+
+#define MTIOCTOP STIOCTOP
+#define MTIOCMD STIOCMD
+#define MTIOCHGP STIOCHGP
+#define mtop stop
+#define mt_op st_op
+#define mt_count st_count
+
+#define MTOFFL STOFFL
+#define MTREW STREW
+#define MTERASE STERASE
+#define MTRETEN STRETEN
+#define MTWEOF STWEOF
+#define MTFSF STFSF
+#define MTBSF STRSF
+#define MTFSR STFSR
+#define MTBSR STRSR
+#define MTINSRT STINSRT
+#define MTEJECT STEJECT
+#define MTDEOF STDEOF
+
+/* mtget and MTIOCGET aren't anywhere that I could find. */
+struct mtget
+{
+ short mt_type;
+ short mt_dsreg;
+ short mt_erreg;
+ daddr_t mt_resid;
+ daddr_t mt_fileno;
+ daddr_t mt_blkno;
+};
+
+#define MTIOCGET _IOR('m', 2, struct mtget)
+
+#endif