AIX:
    Sun uses mtio.h while IBM uses tape.h. 


HP-UX Version 9.05

     When a file opened for writing is closed, two consecutive EOF marks
     are written if, and only if, one or more writes to the file have
     occurred.  The tape is rewound unless the no-rewind mode has been
     specified, in which case the tape is positioned before the second EOF
     just written.  For QIC devices only one EOF mark is written and the
     tape is positioned after the EOF mark if the no-rewind mode has been
     specified.

     Each read(2) or write(2) call reads or writes the next record on the
     tape.  For writes, the record has the same length as the buffer given
     (within the limits of the hardware).

     During a read, the record size is passed back as the number of bytes
     read, up to the buffer size specified.  The number of bytes ignored
     (for records longer than the buffer size specified) is available in
     the mt_resid field of the mtget structure via the MTIOCGET call of
     ioctl(2).  The buffer and size might have implementation-dependent
     alignment restrictions.

     Reading an EOF mark is returned as a successful zero-length read; that
     is, the data count returned is zero and the tape is positioned after
     the EOF, enabling the next read to return the next record.


Irix 5.3
     Whenever the tape is closed after being written to, a file-mark is
     written (2 on 9 track tapes) unless the tape has been unloaded or 
     rewound just prior to the close; if the last operation before the 
     close is an MTWEOF, no additional filemarks will be written at close.

     Note that even the norewind tape devices may be rewound by
     the system, in some cases.  In particular, all tapes are
     rewound on first use after a system boot, and when detected by
     the driver, are rewound after the tape has been changed.  DAT drives
     are also rewound when the drive is switched between audio and
     data modes. This means that if you wish to append a new dataset
     to a tape that already contains datasets, you should always issue
     the 'mt feom' command AFTER loading the tape, just prior to using
     the program that will append to the tape.  One should not count 
     on a tape remaining at EOD, just because that is where it was 
     before it was removed.

     A tape is normally open for reading and/or writing, but a tape
     cannot be read and written simultaneously.  After a rewind, a
     space, an unload, or an MTAFILE ioctl, writes may follow reads
     and vice-versa, otherwise only reads, or only writes may be done
     unless the tape is first closed; performing an MTWEOF ioctl is
     considered to be a write operation in this sense; after reading,
     an MTWEOF will not be allowed unless one of the operations above
     is first executed, or the tapedrive is closed and reopened.
     



