eject: Enable compilation with long types.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Eric Pouech 2022-02-04 09:56:26 +01:00 committed by Alexandre Julliard
parent a7f8adb5e3
commit ed875d65e4
2 changed files with 3 additions and 4 deletions

View File

@ -1,4 +1,3 @@
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = eject.exe MODULE = eject.exe
EXTRADLLFLAGS = -mconsole EXTRADLLFLAGS = -mconsole

View File

@ -70,16 +70,16 @@ static BOOL eject_cd( WCHAR drive )
WINE_TRACE( "ejecting %c:\n", (char)drive ); WINE_TRACE( "ejecting %c:\n", (char)drive );
if (!DeviceIoControl( handle, FSCTL_DISMOUNT_VOLUME, NULL, 0, NULL, 0, &result, NULL )) if (!DeviceIoControl( handle, FSCTL_DISMOUNT_VOLUME, NULL, 0, NULL, 0, &result, NULL ))
WINE_WARN( "FSCTL_DISMOUNT_VOLUME failed with err %d\n", GetLastError() ); WINE_WARN( "FSCTL_DISMOUNT_VOLUME failed with err %ld\n", GetLastError() );
removal.PreventMediaRemoval = FALSE; removal.PreventMediaRemoval = FALSE;
if (!DeviceIoControl( handle, IOCTL_STORAGE_MEDIA_REMOVAL, &removal, sizeof(removal), NULL, 0, &result, NULL )) if (!DeviceIoControl( handle, IOCTL_STORAGE_MEDIA_REMOVAL, &removal, sizeof(removal), NULL, 0, &result, NULL ))
WINE_WARN( "IOCTL_STORAGE_MEDIA_REMOVAL failed with err %d\n", GetLastError() ); WINE_WARN( "IOCTL_STORAGE_MEDIA_REMOVAL failed with err %ld\n", GetLastError() );
if (!unmount_only) if (!unmount_only)
{ {
if (!DeviceIoControl( handle, IOCTL_STORAGE_EJECT_MEDIA, NULL, 0, NULL, 0, &result, NULL )) if (!DeviceIoControl( handle, IOCTL_STORAGE_EJECT_MEDIA, NULL, 0, NULL, 0, &result, NULL ))
WINE_WARN( "IOCTL_STORAGE_EJECT_MEDIA failed with err %d\n", GetLastError() ); WINE_WARN( "IOCTL_STORAGE_EJECT_MEDIA failed with err %ld\n", GetLastError() );
} }
CloseHandle( handle ); CloseHandle( handle );