ntdll: Fix tape.c compilation on Darwin

Phil Krylov phil at newstar.rinet.ru
Wed Feb 8 12:54:55 CST 2006


ChangeLog:

Fix dlls/ntdll/tape.c compilation on Darwin.

Patch:

Index: configure.ac
===================================================================
RCS file: /home/wine/wine/configure.ac,v
retrieving revision 1.429
diff -p -u -r1.429 configure.ac
--- configure.ac	6 Feb 2006 21:06:07 -0000	1.429
+++ configure.ac	8 Feb 2006 18:54:14 -0000
@@ -1357,7 +1357,8 @@ AC_CHECK_MEMBERS([siginfo_t.si_fd],,,[#i
 
 dnl Check for struct mtget members
 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>
 #endif])
 
Index: dlls/ntdll/tape.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/tape.c,v
retrieving revision 1.6
diff -p -u -r1.6 tape.c
--- dlls/ntdll/tape.c	7 Feb 2006 20:22:51 -0000	1.6
+++ dlls/ntdll/tape.c	8 Feb 2006 18:54:15 -0000
@@ -35,6 +35,11 @@
 #define MTCOMPRESSION MTCOMP
 #endif
 
+/* Darwin 7.9.0 has MTSETBSIZ instead of MTSETBLK */
+#if !defined(MTSETBLK) && defined(MTSETBSIZ)
+#define MTSETBLK MTSETBSIZ
+#endif
+
 #define NONAMELESSUNION
 #define NONAMELESSSTRUCT
 #include "ntstatus.h"
@@ -342,7 +347,7 @@ static NTSTATUS TAPE_Prepare( int fd, TA
  */
 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;
 
     TRACE( "fd: %d ECC: 0x%02x, compression: 0x%02x padding: 0x%02x\n",
@@ -423,6 +428,7 @@ static NTSTATUS TAPE_SetPosition( int fd
             cmd.mt_count = -data->Offset.u.LowPart;
         }
         break;
+#if defined(MTFSS) && defined(MTBSS)
     case TAPE_SPACE_SETMARKS:
         if (data->Offset.u.LowPart >= 0) {
             cmd.mt_op = MTFSS;
@@ -433,6 +439,7 @@ static NTSTATUS TAPE_SetPosition( int fd
             cmd.mt_count = -data->Offset.u.LowPart;
         }
         break;
+#endif
     case TAPE_LOGICAL_BLOCK:
     case TAPE_PSEUDO_LOGICAL_BLOCK:
     case TAPE_SPACE_RELATIVE_BLOCKS:



More information about the wine-patches mailing list