Re: msvcrt/file.c: file mode T (temporary file) (try 2)
On 02/25/2012 05:30 AM, Robert van Herk wrote:
Try 2 fixes some blatant memory bug in the conformance test ---------------------------------------------------------------------------
Windows fopen has some fancy file modes 'T' and 'D'. Currently, wine wrongly interprets 'T' as 't'. They should be interpreted differently though: 't' is text file, and 'T' is temporary file.
I've fixed this, and added a conformance test.
+ case 'T': + FIXME("Implement T flag (temporary file, i.e. delete on close, don't flush to disk if possible)"); + break; So what actually prevents you from properly implementing this? Especially that Wine already supports temporary files. Search for MSVCRT__O_TEMPORARY
Vitaliy.
+ case 'T': + FIXME("Implement T flag (temporary file, i.e. delete on close, don't flush to disk if possible)"); + break; So what actually prevents you from properly implementing this? Especially that Wine already supports temporary files. Search for MSVCRT__O_TEMPORARY
My lack of knowledge of what was already implemented, I guess :-). Plus: I was already so happy that my Win32 application didn't crash any more :-). But OK, I try implementing it properly. Then I'll map as follows: 'T' -> MSVCRT__O_SHORT_LIVED 'D' -> MSVCRT__O_TEMPORARY I'll try to send a new version (try 3) tomorrow. By the way, 'R' also doesn't follow the MS spec: 'R' is supposed to mean "_O_RANDOM_" but the current Wine implementation maps it like 'r', which is "read". I find it scary to blindly change that, cause there may be some risky cases like "R+", etc. If I have time I'll try to investigate that too, but it'll have to go in a later patch... Regards, Robert
participants (2)
-
Robert van Herk -
Vitaliy Margolen