pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/archivers/pax/files Update pax to work on AIX. Use ta...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/af0bc499e06a
branches:  trunk
changeset: 464269:af0bc499e06a
user:      erh <erh%pkgsrc.org@localhost>
date:      Fri Dec 05 16:35:54 2003 +0000

description:
Update pax to work on AIX.  Use tape.h with appropriate fixups since
there's no mtio.h

diffstat:

 archivers/pax/files/ar_io.c        |   8 +++++-
 archivers/pax/files/config.h.in    |   3 ++
 archivers/pax/files/configure      |   2 +-
 archivers/pax/files/configure.ac   |   2 +-
 archivers/pax/files/tape_h_fixup.h |  44 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 55 insertions(+), 4 deletions(-)

diffs (114 lines):

diff -r 4c4adc7374d1 -r af0bc499e06a archivers/pax/files/ar_io.c
--- a/archivers/pax/files/ar_io.c       Fri Dec 05 16:34:32 2003 +0000
+++ b/archivers/pax/files/ar_io.c       Fri Dec 05 16:35:54 2003 +0000
@@ -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 @@
 #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 -r 4c4adc7374d1 -r af0bc499e06a archivers/pax/files/config.h.in
--- a/archivers/pax/files/config.h.in   Fri Dec 05 16:34:32 2003 +0000
+++ b/archivers/pax/files/config.h.in   Fri Dec 05 16:35:54 2003 +0000
@@ -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 -r 4c4adc7374d1 -r af0bc499e06a archivers/pax/files/configure
--- a/archivers/pax/files/configure     Fri Dec 05 16:34:32 2003 +0000
+++ b/archivers/pax/files/configure     Fri Dec 05 16:35:54 2003 +0000
@@ -2946,7 +2946,7 @@
 
 
 
-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 -r 4c4adc7374d1 -r af0bc499e06a archivers/pax/files/configure.ac
--- a/archivers/pax/files/configure.ac  Fri Dec 05 16:34:32 2003 +0000
+++ b/archivers/pax/files/configure.ac  Fri Dec 05 16:35:54 2003 +0000
@@ -15,7 +15,7 @@
 # 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 -r 4c4adc7374d1 -r af0bc499e06a archivers/pax/files/tape_h_fixup.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/archivers/pax/files/tape_h_fixup.h        Fri Dec 05 16:35:54 2003 +0000
@@ -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



Home | Main Index | Thread Index | Old Index