[2/2] msvcr90: Implement fread_s.
Piotr Caban
piotr.caban at gmail.com
Thu Dec 22 05:50:07 CST 2011
On 12/22/11 12:08, Kusanagi Kouichi wrote:
> It might be my fault. I can mix them normally. But even if the test do only
>
> fopen()
> fread_s()
I've send a simple test to test bot. It doesn't crash there, it also
shows when read_s should succeed and fails with your implementation.
https://testbot.winehq.org/JobDetails.pl?Key=16116
>> It should be easy to add a proper implementation of _fclose_nolock.
Something like this should work (it's a copy of implementation that is
in msvcrt):
int CDECL _fclose_nolock(FILE *file)
{
int r, flag;
flag = file->_flag;
free(file->_tmpfname);
file->_tmpfname = NULL;
/* flush stdio buffers */
if(file->_flag & _IOWRT)
fflush(file);
if(file->_flag & _IOMYBUF)
free(file->_base);
r=_close(file->_file);
file->_flag = 0;
return ((r == -1) || (flag & _IOERR) ? EOF : 0);
}
It's also not needed to check for functions existence in tests.
More information about the wine-devel
mailing list