This patch fixes compilation bugs in 'dlls/ntdll/cdrom.c'. Most look very much like simple typos from someone who tried to modify the FreeBSD code without having access to a FreeBSD machine to check that it compiles. If that's what happened then it's all fine, and the person doing the changes it to be thanked for taking care of the FreeBSD code. If the compilation errors result from differences between FreeBSD 4.4 and FreeBSD 5 or NetBSD, then the attached fix may not be so good and there may be more work involved. Changelog: * dlls/ntdll/cdrom.c Fix compilation errors on FreeBSD -- Francois Gouget fgouget@free.fr http://fgouget.free.fr/ Linux: Because rebooting is for adding new hardware
Index: dlls/ntdll/cdrom.c =================================================================== RCS file: /home/wine/wine/dlls/ntdll/cdrom.c,v retrieving revision 1.1 diff -u -r1.1 cdrom.c --- dlls/ntdll/cdrom.c 2002/01/13 01:44:00 1.1 +++ dlls/ntdll/cdrom.c 2002/01/14 02:07:37 @@ -169,7 +169,7 @@ #if defined(linux) return CDROM_GetStatusCode(ioctl(dev, CDROM_LOCKDOOR, val)); #elif defined(__FreeBSD__) || defined(__NetBSD__) - return CDROM_GetStatusCode(ioctl(dev, (val) ? CDIOPREVENT : CDIOCALLOW, NULL)); + return CDROM_GetStatusCode(ioctl(dev, (val) ? CDIOCPREVENT : CDIOCALLOW, NULL)); #else return STATUS_NOT_SUPPORTED; #endif @@ -411,7 +411,7 @@ break; case IOCTL_CDROM_TRACK_ISRC: read_sc.data_format = CD_TRACK_INFO; - sc.track_info.track_number = data->TrackIsrc.Track; + sc.what.track_info.track_number = data->TrackIsrc.Track; break; } io = ioctl(dev, CDIOCREADSUBCHANNEL, &read_sc); @@ -435,9 +435,9 @@ hdr->AudioStatus = AUDIO_STATUS_IN_PROGRESS; break; case CD_AS_PLAY_PAUSED: - hdr->AudioStatus = AUDIO_STATUS_IN_PAUSED; + hdr->AudioStatus = AUDIO_STATUS_PAUSED; break; - case CD_AS_PLAY_AUDIO_COMPLETED: + case CD_AS_PLAY_COMPLETED: hdr->AudioStatus = AUDIO_STATUS_PLAY_COMPLETE; break; case CD_AS_PLAY_ERROR: @@ -450,32 +450,32 @@ { case IOCTL_CDROM_CURRENT_POSITION: size = sizeof(SUB_Q_CURRENT_POSITION); - data->CurrentPosition.FormatCode = sc.position.data_format; - data->CurrentPosition.Control = sc.position.control; - data->CurrentPosition.ADR = sc.position.addr_type; - data->CurrentPosition.TrackNumber = sc.position.track_number; - data->CurrentPosition.IndexNumber = sc.position.index_number; + data->CurrentPosition.FormatCode = sc.what.position.data_format; + data->CurrentPosition.Control = sc.what.position.control; + data->CurrentPosition.ADR = sc.what.position.addr_type; + data->CurrentPosition.TrackNumber = sc.what.position.track_number; + data->CurrentPosition.IndexNumber = sc.what.position.index_number; data->CurrentPosition.AbsoluteAddress[0] = 0; - data->CurrentPosition.AbsoluteAddress[1] = sc.position.absaddr.msf.minute; - data->CurrentPosition.AbsoluteAddress[2] = sc.position.absaddr.msf.second; - data->CurrentPosition.AbsoluteAddress[3] = sc.position.absaddr.msf.frame; + data->CurrentPosition.AbsoluteAddress[1] = sc.what.position.absaddr.msf.minute; + data->CurrentPosition.AbsoluteAddress[2] = sc.what.position.absaddr.msf.second; + data->CurrentPosition.AbsoluteAddress[3] = sc.what.position.absaddr.msf.frame; data->CurrentPosition.TrackRelativeAddress[0] = 0; - data->CurrentPosition.TrackRelativeAddress[1] = sc.position.reladdr.msf.minute; - data->CurrentPosition.TrackRelativeAddress[2] = sc.position.reladdr.msf.second; - data->CurrentPosition.TrackRelativeAddress[3] = sc.position.reladdr.msf.frame; + data->CurrentPosition.TrackRelativeAddress[1] = sc.what.position.reladdr.msf.minute; + data->CurrentPosition.TrackRelativeAddress[2] = sc.what.position.reladdr.msf.second; + data->CurrentPosition.TrackRelativeAddress[3] = sc.what.position.reladdr.msf.frame; break; case IOCTL_CDROM_MEDIA_CATALOG: size = sizeof(SUB_Q_MEDIA_CATALOG_NUMBER); data->MediaCatalog.FormatCode = IOCTL_CDROM_MEDIA_CATALOG; - data->MediaCatalog.FormatCode = sc.media_catalog.data_format; - data->MediaCatalog.Mcval = sc.media_catalog.mc_valid; - memcpy(data->MediaCatalog.MediaCatalog, sc.media_catalog.mc_number, 15); + data->MediaCatalog.FormatCode = sc.what.media_catalog.data_format; + data->MediaCatalog.Mcval = sc.what.media_catalog.mc_valid; + memcpy(data->MediaCatalog.MediaCatalog, sc.what.media_catalog.mc_number, 15); break; case IOCTL_CDROM_TRACK_ISRC: size = sizeof(SUB_Q_CURRENT_POSITION); - data->TrackIsrc.Tcval = sc.track_info.ti_valid; - memcpy(data->TrackIsrc.TrackIsrc, sc.track_info.ti_number, 15); + data->TrackIsrc.Tcval = sc.what.track_info.ti_valid; + memcpy(data->TrackIsrc.TrackIsrc, sc.what.track_info.ti_number, 15); break; }