On Sat, 4 Feb 2006, Alexandre Julliard wrote:
Please add configure checks instead of #ifdef __FreeBSD__.
Like so?
Tested on SUSE Linux 10.0 and FreeBSD 4.10.
Gerald
ChangeLog: Use struct mtget.mt_blksiz on systems featuring this. Work around using struct mtget.mt_gstat on systems lacking this.
Index: configure.ac =================================================================== RCS file: /home/wine/wine/configure.ac,v retrieving revision 1.425 diff -u -p -r1.425 configure.ac --- configure.ac 26 Jan 2006 12:47:07 -0000 1.425 +++ configure.ac 4 Feb 2006 23:05:54 -0000 @@ -1427,6 +1427,16 @@ AC_CHECK_MEMBERS([scsireq_t.cmd, sg_io_h dnl Check for siginfo_t members AC_CHECK_MEMBERS([siginfo_t.si_fd],,,[#include <signal.h>])
+dnl Check for struct mtget members +AC_CHECK_MEMBERS([struct mtget.mt_blksiz],,, +[#ifdef HAVE_SYS_MTIO_H +#include <sys/mtio.h> +#endif]) +AC_CHECK_MEMBERS([struct mtget.mt_gstat],,, +[#ifdef HAVE_SYS_MTIO_H +#include <sys/mtio.h> +#endif]) + dnl Check for struct option AC_CHECK_MEMBERS([struct option.name],,, [#ifdef HAVE_GETOPT_H Index: dlls/ntdll/tape.c =================================================================== RCS file: /home/wine/wine/dlls/ntdll/tape.c,v retrieving revision 1.3 diff -u -p -r1.3 tape.c --- dlls/ntdll/tape.c 31 Jan 2006 12:08:47 -0000 1.3 +++ dlls/ntdll/tape.c 4 Feb 2006 23:05:54 -0000 @@ -177,7 +177,11 @@ static NTSTATUS TAPE_GetDriveParams( int data->Compression = FALSE; data->DataPadding = FALSE; data->ReportSetmarks = FALSE; +#ifdef HAVE_STRUCT_MTGET_MT_BLKSIZ + data->DefaultBlockSize = get.mt_blksiz; +#else data->DefaultBlockSize = get.mt_dsreg & MT_ST_BLKSIZE_MASK; +#endif data->MaximumBlockSize = data->DefaultBlockSize; data->MinimumBlockSize = data->DefaultBlockSize; data->MaximumPartitionCount = 1; @@ -208,9 +212,17 @@ static NTSTATUS TAPE_GetMediaParams( int
data->Capacity.u.LowPart = 1024 * 1024 * 1024; data->Remaining.u.LowPart = 1024 * 1024 * 1024; +#ifdef HAVE_STRUCT_MTGET_MT_BLKSIZ + data->BlockSize = get.mt_blksiz; +#else data->BlockSize = get.mt_dsreg & MT_ST_BLKSIZE_MASK; +#endif data->PartitionCount = 1; +#ifdef HAVE_STRUCT_MTGET_GSTAT data->WriteProtected = GMT_WR_PROT(get.mt_gstat); +#else + data->WriteProtected = 0; +#endif
return status; #else