PATCH: /dlls/ntdll/cdrom.c -- portability breakage
Gerald Pfeifer
pfeifer at dbai.tuwien.ac.at
Tue Apr 1 03:46:41 CST 2003
On Wed, 26 Mar 2003, Eric Pouech wrote:
> Alexandre Julliard wrote:
>> I think the code is wrong, we shouldn't store a Linux-only define in a
>> Windows structure, we should use a Windows define. Any one knows what
>> the right value should be?
> the code is wrong (evil cut & paste IMO). we should use
> IOCTL_CDROM_CURRENT_POSITION in FormatCode
Is anyone going to patch this?
CDROM_SeekAudioMSF() still fails to compile on FreeBSD (and is
incorrect anyway, according to Alexandre and Eric) due to the use of
cp->FormatCode = CDROM_MSF
(Until this is fixed, it would be nice to have the following patch in,
perhaps enhanced by a FIXME to make FreeBSD at least buildable again.)
Thanks,
Gerald
Index: cdrom.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/cdrom.c,v
retrieving revision 1.27
diff -u -3 -p -r1.27 cdrom.c
--- cdrom.c 20 Mar 2003 21:59:50 -0000 1.27
+++ cdrom.c 1 Apr 2003 09:46:05 -0000
@@ -1045,7 +1045,9 @@ static DWORD CDROM_SeekAudioMSF(int dev,
if (i <= toc.FirstTrack || i > toc.LastTrack+1)
return STATUS_INVALID_PARAMETER;
i--;
- cp->FormatCode = CDROM_MSF;
+#ifdef CDROM_MSF
+ cp->FormatCode = CDROM_MSF;
+#endif
cp->Control = toc.TrackData[i-toc.FirstTrack].Control;
cp->ADR = toc.TrackData[i-toc.FirstTrack].Adr;
cp->TrackNumber = toc.TrackData[i-toc.FirstTrack].TrackNumber;
More information about the wine-devel
mailing list