PATCH: _open_osfhandle() has incorrect default for text/binary mode

Adam Gundy arg at cyberscience.com
Thu May 8 09:11:32 CDT 2003


The _open_osfhandle() function in MSVCRT is expected to take the absence
of either _O_TEXT or _O_BINARY to mean _O_BINARY. Currently it defaults to
_O_TEXT.

An example of this is MFC's CStdioFile::Open in binary mode - it passes flags
of 0 when it wants to write a binary file - under WINE we do text mode conversions!

The attached patch ensures that _O_BINARY is set if neither is set in the passed-in
flags.


Seeya,
 Adam
--
Real Programmers don't comment their code. If it was hard to write,
it should be hard to read, and even harder to modify.
These are all my own opinions.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-binary.pat
Type: application/octet-stream
Size: 1090 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20030508/06f66279/wine-binary.obj


More information about the wine-patches mailing list