On Fri, 10 Mar 2000, David Elliott wrote:
> Sorry about that. It is due to the header files having an ifdef linux
> around them.
Seriously, code like
#ifdef linux
/* Copy of info from 2.2.x kernel */
#define SG_MAX_SENSE 16 /* too little, unlikely to change in 2.2.x */
really seems quite bad to me! One should never just copy code from system
headers and I really think Alexandre never should have approved something
like that.
As a matter of fact I have been disappointed several times lately when
Alexandre applied patches that broke Wine on non-Linux platforms due to
typos or "there's nothing apart from Linux" coding. :-(
What's the purpose of an extremely strict development model if even the
simplest such issues are not caught during patch review?
Anyway, the patch below brings Wine back into buildworld on FreeBSD 3.4.
Gerald
Index: aspi.c
===================================================================
RCS file: /home/wine/wine/dlls/winaspi/aspi.c,v
retrieving revision 1.1
diff -c -3 -p -r1.1 aspi.c
*** aspi.c 2000/03/08 19:41:49 1.1
--- aspi.c 2000/03/13 02:14:11
*************** SCSI_OpenDevice( int h, int c, int t, in
*** 144,149 ****
--- 144,150 ----
return fd;
}
+ #ifdef linux
int
SCSI_LinuxSetTimeout( int fd, int timeout )
{
*************** SCSI_GetProcinfo()
*** 344,347 ****
RegCloseKey(hkeyScsi);
return;
}
!
--- 345,348 ----
RegCloseKey(hkeyScsi);
return;
}
! #endif
Index: winescsi.h
===================================================================
RCS file: /home/wine/wine/dlls/winaspi/winescsi.h,v
retrieving revision 1.1
diff -c -3 -p -r1.1 winescsi.h
*** winescsi.h 2000/03/08 19:41:49 1.1
--- winescsi.h 2000/03/13 02:14:11
*************** SCSI_OpenDevice( int h, int c, int t, in
*** 47,57 ****
--- 47,59 ----
int
SCSI_LinuxSetTimeout( int fd, int timeout );
+ #ifdef linux
BOOL
SCSI_LinuxDeviceIo( int fd,
struct sg_header * lpvInBuffer, DWORD cbInBuffer,
struct sg_header * lpvOutBuffer, DWORD cbOutBuffer,
LPDWORD lpcbBytesReturned );
+ #endif
BOOL
SCSI_GetDeviceName(int h, int c, int t, int d, LPSTR devstr, LPDWORD lpcbData);