ntdll: Fix tape.c compilation on Darwin.

This commit is contained in:
Phil Krylov 2006-02-11 20:26:33 +01:00 committed by Alexandre Julliard
parent 06188b6d34
commit 368dab37ec
3 changed files with 11 additions and 2 deletions

6
configure vendored
View File

@ -17836,6 +17836,7 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
#include <sys/types.h>
#ifdef HAVE_SYS_MTIO_H #ifdef HAVE_SYS_MTIO_H
#include <sys/mtio.h> #include <sys/mtio.h>
#endif #endif
@ -17882,6 +17883,7 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
#include <sys/types.h>
#ifdef HAVE_SYS_MTIO_H #ifdef HAVE_SYS_MTIO_H
#include <sys/mtio.h> #include <sys/mtio.h>
#endif #endif
@ -17949,6 +17951,7 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
#include <sys/types.h>
#ifdef HAVE_SYS_MTIO_H #ifdef HAVE_SYS_MTIO_H
#include <sys/mtio.h> #include <sys/mtio.h>
#endif #endif
@ -17995,6 +17998,7 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
#include <sys/types.h>
#ifdef HAVE_SYS_MTIO_H #ifdef HAVE_SYS_MTIO_H
#include <sys/mtio.h> #include <sys/mtio.h>
#endif #endif
@ -18062,6 +18066,7 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
#include <sys/types.h>
#ifdef HAVE_SYS_MTIO_H #ifdef HAVE_SYS_MTIO_H
#include <sys/mtio.h> #include <sys/mtio.h>
#endif #endif
@ -18108,6 +18113,7 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
#include <sys/types.h>
#ifdef HAVE_SYS_MTIO_H #ifdef HAVE_SYS_MTIO_H
#include <sys/mtio.h> #include <sys/mtio.h>
#endif #endif

View File

@ -1357,7 +1357,8 @@ AC_CHECK_MEMBERS([siginfo_t.si_fd],,,[#include <signal.h>])
dnl Check for struct mtget members dnl Check for struct mtget members
AC_CHECK_MEMBERS([struct mtget.mt_blksiz, struct mtget.mt_gstat, struct mtget.mt_blkno],,, AC_CHECK_MEMBERS([struct mtget.mt_blksiz, struct mtget.mt_gstat, struct mtget.mt_blkno],,,
[#ifdef HAVE_SYS_MTIO_H [#include <sys/types.h>
#ifdef HAVE_SYS_MTIO_H
#include <sys/mtio.h> #include <sys/mtio.h>
#endif]) #endif])

View File

@ -344,7 +344,7 @@ static NTSTATUS TAPE_Prepare( int fd, TAPE_PREPARE *data )
*/ */
static NTSTATUS TAPE_SetDriveParams( int fd, TAPE_SET_DRIVE_PARAMETERS *data ) static NTSTATUS TAPE_SetDriveParams( int fd, TAPE_SET_DRIVE_PARAMETERS *data )
{ {
#ifdef HAVE_SYS_MTIO_H #if defined(HAVE_SYS_MTIO_H) && defined(MTCOMPRESSION)
struct mtop cmd; struct mtop cmd;
TRACE( "fd: %d ECC: 0x%02x, compression: 0x%02x padding: 0x%02x\n", TRACE( "fd: %d ECC: 0x%02x, compression: 0x%02x padding: 0x%02x\n",
@ -425,6 +425,7 @@ static NTSTATUS TAPE_SetPosition( int fd, TAPE_SET_POSITION *data )
cmd.mt_count = -data->Offset.u.LowPart; cmd.mt_count = -data->Offset.u.LowPart;
} }
break; break;
#if defined(MTFSS) && defined(MTBSS)
case TAPE_SPACE_SETMARKS: case TAPE_SPACE_SETMARKS:
if (data->Offset.u.LowPart >= 0) { if (data->Offset.u.LowPart >= 0) {
cmd.mt_op = MTFSS; cmd.mt_op = MTFSS;
@ -435,6 +436,7 @@ static NTSTATUS TAPE_SetPosition( int fd, TAPE_SET_POSITION *data )
cmd.mt_count = -data->Offset.u.LowPart; cmd.mt_count = -data->Offset.u.LowPart;
} }
break; break;
#endif
case TAPE_LOGICAL_BLOCK: case TAPE_LOGICAL_BLOCK:
case TAPE_PSEUDO_LOGICAL_BLOCK: case TAPE_PSEUDO_LOGICAL_BLOCK:
case TAPE_SPACE_RELATIVE_BLOCKS: case TAPE_SPACE_RELATIVE_BLOCKS: