MSVCRT: implement _chsize

Hans Leidekker hans at it.vu.nl
Thu Mar 31 04:00:25 CST 2005


As suggested by Alexandre, use _lseek instead of using
SetFilePointer directly. Fixes the cornercase where the file
pointer equals 0xffffffff (INVALID_SET_FILE_POINTER).

----

Now with improved coding style. Thank you Dmitry.

----

This one restores the filepointer (test to confirm included)
and includes a shy attempt at being thread safe. It uses the 
existing lock but that one only seems to protect operations
on fd's and it's not even used consequently in all functions
(I smell a janitorial ;).

-----

This should fix apps built with MinGW (bug report 2826).

 -Hans

Changelog:
  Implement and test _chsize.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: msvcrt_file_c_03.diff
Type: text/x-diff
Size: 3533 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20050331/0058694c/msvcrt_file_c_03.bin


More information about the wine-patches mailing list