msvcrt: SEEK_* macros from GLIBC should be replaced with safer MSVCRT_SEEK_* macros
Carlo Bramini
carlo.bramix at libero.it
Tue Aug 18 05:55:12 CDT 2015
In dlls/msvcrt/file.c, MSVCRT uses the macros SEEK_SET/SEEK_CUR/SEEK_END from
GLIBC.
That code also assumes that:
SEEK_SET = FILE_BEGIN
SEEK_CUR = FILE_CURRENT
SEEK_END = FILE_END
It would be better, for providing better portability since the real values of
the various SEEK_* macros is unknown, to declare some MSVCRT_SEEK_* macros for
this purpose, as it has been already done for others.
So, according to the above assumptions, the values to be assigned to the new
MSVCRT_SEEK_* macros have been taken from here:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365541%28v=vs.85%29.
aspx
Attached patch implements this change (although there are not real changes in
the code itself).
Sincerely,
Carlo Bramini.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: msvcrt-seek.txt
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20150818/fb649555/attachment.txt>
More information about the wine-patches
mailing list