(root)/
tar-1.35/
lib/
system-ioctl.h
       1  /* System dependent definitions for GNU tar's use of ioctl macros.
       2  
       3     Copyright (C) 1994-2001, 2003-2007, 2023 Free Software Foundation, Inc.
       4  
       5     This program is free software; you can redistribute it and/or modify
       6     it under the terms of the GNU General Public License as published by
       7     the Free Software Foundation; either version 3, or (at your option)
       8     any later version.
       9  
      10     This program is distributed in the hope that it will be useful,
      11     but WITHOUT ANY WARRANTY; without even the implied warranty of
      12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      13     GNU General Public License for more details.
      14  
      15     You should have received a copy of the GNU General Public License
      16     along with this program; if not, write to the Free Software Foundation,
      17     Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
      18  
      19  /* This is a real challenge to properly get MTIO* symbols :-(.  ISC uses
      20     <sys/gentape.h>.  SCO and BSDi uses <sys/tape.h>; BSDi also requires
      21     <sys/tprintf.h> and <sys/device.h> for defining tp_dev and tpr_t.  It
      22     seems that the rest use <sys/mtio.h>, which itself requires other files,
      23     depending on systems.  Pyramid defines _IOW in <sgtty.h>, for example.  */
      24  
      25  #if HAVE_SYS_GENTAPE_H
      26  # include <sys/gentape.h>
      27  #else
      28  # if HAVE_SYS_TAPE_H
      29  #  if HAVE_SYS_DEVICE_H
      30  #   include <sys/device.h>
      31  #  endif
      32  #  if HAVE_SYS_PARAM_H
      33  #   include <sys/param.h>
      34  #  endif
      35  #  if HAVE_SYS_BUF_H
      36  #   include <sys/buf.h>
      37  #  endif
      38  #  if HAVE_SYS_TPRINTF_H
      39  #   include <sys/tprintf.h>
      40  #  endif
      41  #  include <sys/tape.h>
      42  # else
      43  #  if HAVE_SYS_MTIO_H
      44  #   include <sys/ioctl.h>
      45  #   if HAVE_SGTTY_H
      46  #    include <sgtty.h>
      47  #   endif
      48  #   if HAVE_SYS_IO_TRIOCTL_H
      49  #    include <sys/io/trioctl.h>
      50  #   endif
      51  #   include <sys/mtio.h>
      52  #  endif
      53  # endif
      54  #endif