Mercurial > mplayer.hg
changeset 15689:80494fefb7ea
mingw gcc 4.1 support patch by Gianluigi Tiesi <mplayer at netfarm.it>
author | faust3 |
---|---|
date | Tue, 07 Jun 2005 13:36:21 +0000 |
parents | 1349827012a9 |
children | 1b3f0f7aa994 |
files | libmpdvdkit2/device.c libmpdvdkit2/ioctl.h |
diffstat | 2 files changed, 10 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdvdkit2/device.c Tue Jun 07 11:34:19 2005 +0000 +++ b/libmpdvdkit2/device.c Tue Jun 07 13:36:21 2005 +0000 @@ -273,14 +273,14 @@ * won't send back the right result). * (See Microsoft Q241374: Read and Write Access Required for SCSI * Pass Through Requests) */ - (HANDLE) dvdcss->i_fd = + dvdcss->i_fd = (int) CreateFile( psz_dvd, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_RANDOM_ACCESS, NULL ); if( (HANDLE) dvdcss->i_fd == INVALID_HANDLE_VALUE ) - (HANDLE) dvdcss->i_fd = + dvdcss->i_fd = (int) CreateFile( psz_dvd, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_RANDOM_ACCESS, NULL ); @@ -302,8 +302,8 @@ DWORD dwSupportInfo; struct w32_aspidev *fd; int i, j, i_hostadapters; - long (*lpGetSupport)( void ); - long (*lpSendCommand)( void* ); + GETASPI32SUPPORTINFO lpGetSupport; + SENDASPI32COMMAND lpSendCommand; char c_drive = psz_device[0]; /* load aspi and init w32_aspidev structure */ @@ -314,8 +314,8 @@ return -1; } - (FARPROC) lpGetSupport = GetProcAddress( hASPI, "GetASPI32SupportInfo" ); - (FARPROC) lpSendCommand = GetProcAddress( hASPI, "SendASPI32Command" ); + lpGetSupport = (GETASPI32SUPPORTINFO) GetProcAddress( hASPI, "GetASPI32SupportInfo" ); + lpSendCommand = (SENDASPI32COMMAND) GetProcAddress( hASPI, "SendASPI32Command" ); if(lpGetSupport == NULL || lpSendCommand == NULL ) {
--- a/libmpdvdkit2/ioctl.h Tue Jun 07 11:34:19 2005 +0000 +++ b/libmpdvdkit2/ioctl.h Tue Jun 07 13:36:21 2005 +0000 @@ -318,6 +318,9 @@ * win32 aspi specific *****************************************************************************/ +typedef WINAPI DWORD (*GETASPI32SUPPORTINFO)(VOID); +typedef WINAPI DWORD (*SENDASPI32COMMAND)(LPVOID); + #define WIN2K ( GetVersion() < 0x80000000 ) #define ASPI_HAID 0 #define ASPI_TARGET 0 @@ -339,7 +342,7 @@ long hASPI; short i_sid; int i_blocks; - long (*lpSendCommand)( void* ); + SENDASPI32COMMAND lpSendCommand; }; #pragma pack(1)