summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-02-20 08:13:29 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-02-20 08:13:29 +0000
commit98ef0f38ea54c86274aff1618f61ee6a2de39054 (patch)
tree649a7e884b32931c958d01f7b80b0df2a4503831 /lib
parent7a86488bf7607f5935c36a391f40743cbb32106a (diff)
downloadpaxutils-98ef0f38ea54c86274aff1618f61ee6a2de39054.tar.gz
* lib/DISTFILES: Add system-ioctl.h.
* lib/system.h: Move the MTIO* stuff into.... * lib/system-ioctl.h: New file. That way, the symbols defined by these includes won't collide with the symbols defined by <sys/filio.h> on Solaris when compiling misc.c. * lib/rtapelib.c: Include system-ioctl.h. * paxlib/rtape.c: Likewise. * rmt/rmt.c: Likewise.
Diffstat (limited to 'lib')
-rw-r--r--lib/DISTFILES1
-rw-r--r--lib/rtapelib.c6
-rw-r--r--lib/system-ioctl.h55
-rw-r--r--lib/system.h42
4 files changed, 62 insertions, 42 deletions
diff --git a/lib/DISTFILES b/lib/DISTFILES
index 65bab61..6d310f4 100644
--- a/lib/DISTFILES
+++ b/lib/DISTFILES
@@ -1,3 +1,4 @@
rmt.h
rtapelib.c
system.h
+system-ioctl.h
diff --git a/lib/rtapelib.c b/lib/rtapelib.c
index b352762..3466a7c 100644
--- a/lib/rtapelib.c
+++ b/lib/rtapelib.c
@@ -1,7 +1,7 @@
/* Functions for communicating with a remote tape drive.
- Copyright 1988, 1992, 1994, 1996, 1997, 1999, 2000, 2001, 2004,
- 2005 Free Software Foundation, Inc.
+ Copyright (C) 1988, 1992, 1994, 1996, 1997, 1999, 2000, 2001, 2004,
+ 2005, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -33,6 +33,8 @@
code, courtesy of Dan Kegel. */
#include "system.h"
+#include "system-ioctl.h"
+
#include <safe-read.h>
#include <full-write.h>
diff --git a/lib/system-ioctl.h b/lib/system-ioctl.h
new file mode 100644
index 0000000..a61c5fd
--- /dev/null
+++ b/lib/system-ioctl.h
@@ -0,0 +1,55 @@
+/* System dependent definitions for GNU tar's use of ioctl macros.
+
+ Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003,
+ 2004, 2005, 2006 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* This is a real challenge to properly get MTIO* symbols :-(. ISC uses
+ <sys/gentape.h>. SCO and BSDi uses <sys/tape.h>; BSDi also requires
+ <sys/tprintf.h> and <sys/device.h> for defining tp_dev and tpr_t. It
+ seems that the rest use <sys/mtio.h>, which itself requires other files,
+ depending on systems. Pyramid defines _IOW in <sgtty.h>, for example. */
+
+#if HAVE_SYS_GENTAPE_H
+# include <sys/gentape.h>
+#else
+# if HAVE_SYS_TAPE_H
+# if HAVE_SYS_DEVICE_H
+# include <sys/device.h>
+# endif
+# if HAVE_SYS_PARAM_H
+# include <sys/param.h>
+# endif
+# if HAVE_SYS_BUF_H
+# include <sys/buf.h>
+# endif
+# if HAVE_SYS_TPRINTF_H
+# include <sys/tprintf.h>
+# endif
+# include <sys/tape.h>
+# else
+# if HAVE_SYS_MTIO_H
+# include <sys/ioctl.h>
+# if HAVE_SGTTY_H
+# include <sgtty.h>
+# endif
+# if HAVE_SYS_IO_TRIOCTL_H
+# include <sys/io/trioctl.h>
+# endif
+# include <sys/mtio.h>
+# endif
+# endif
+#endif
diff --git a/lib/system.h b/lib/system.h
index a36e061..9d31f60 100644
--- a/lib/system.h
+++ b/lib/system.h
@@ -1,7 +1,7 @@
/* System dependent definitions for GNU tar.
Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003,
- 2004, 2005 Free Software Foundation, Inc.
+ 2004, 2005, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -15,8 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*/
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#if HAVE_CONFIG_H
# include <config.h>
@@ -392,43 +391,6 @@ extern int errno;
#define ST_NBLOCKSIZE 512
#endif
-/* This is a real challenge to properly get MTIO* symbols :-(. ISC uses
- <sys/gentape.h>. SCO and BSDi uses <sys/tape.h>; BSDi also requires
- <sys/tprintf.h> and <sys/device.h> for defining tp_dev and tpr_t. It
- seems that the rest use <sys/mtio.h>, which itself requires other files,
- depending on systems. Pyramid defines _IOW in <sgtty.h>, for example. */
-
-#if HAVE_SYS_GENTAPE_H
-# include <sys/gentape.h>
-#else
-# if HAVE_SYS_TAPE_H
-# if HAVE_SYS_DEVICE_H
-# include <sys/device.h>
-# endif
-# if HAVE_SYS_PARAM_H
-# include <sys/param.h>
-# endif
-# if HAVE_SYS_BUF_H
-# include <sys/buf.h>
-# endif
-# if HAVE_SYS_TPRINTF_H
-# include <sys/tprintf.h>
-# endif
-# include <sys/tape.h>
-# else
-# if HAVE_SYS_MTIO_H
-# include <sys/ioctl.h>
-# if HAVE_SGTTY_H
-# include <sgtty.h>
-# endif
-# if HAVE_SYS_IO_TRIOCTL_H
-# include <sys/io/trioctl.h>
-# endif
-# include <sys/mtio.h>
-# endif
-# endif
-#endif
-
/* Declare standard functions. */
#if STDC_HEADERS