msvcrt: Implement clearerr_s.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alistair Leslie-Hughes 2017-09-25 22:30:12 +00:00 committed by Alexandre Julliard
parent b4456d0fa9
commit fae0570a88
11 changed files with 25 additions and 9 deletions

View File

@ -113,7 +113,7 @@
@ cdecl _wtmpnam(ptr) ucrtbase._wtmpnam
@ cdecl _wtmpnam_s(ptr long) ucrtbase._wtmpnam_s
@ cdecl clearerr(ptr) ucrtbase.clearerr
@ stub clearerr_s
@ cdecl clearerr_s(ptr) ucrtbase.clearerr_s
@ cdecl fclose(ptr) ucrtbase.fclose
@ cdecl feof(ptr) ucrtbase.feof
@ cdecl ferror(ptr) ucrtbase.ferror

View File

@ -1647,7 +1647,7 @@
@ cdecl ceil(double) MSVCRT_ceil
@ cdecl -arch=arm,x86_64,arm64 ceilf(float) MSVCRT_ceilf
@ cdecl clearerr(ptr) MSVCRT_clearerr
@ stub clearerr_s
@ cdecl clearerr_s(ptr) MSVCRT_clearerr_s
@ cdecl clock() MSVCRT_clock
@ cdecl cos(double) MSVCRT_cos
@ cdecl -arch=arm,x86_64,arm64 cosf(float) MSVCRT_cosf

View File

@ -2004,7 +2004,7 @@
@ cdecl ceil(double) MSVCRT_ceil
@ cdecl -arch=arm,x86_64,arm64 ceilf(float) MSVCRT_ceilf
@ cdecl clearerr(ptr) MSVCRT_clearerr
@ stub clearerr_s
@ cdecl clearerr_s(ptr) MSVCRT_clearerr_s
@ cdecl clock() MSVCRT_clock
@ cdecl cos(double) MSVCRT_cos
@ cdecl -arch=arm,x86_64,arm64 cosf(float) MSVCRT_cosf

View File

@ -2079,7 +2079,7 @@
@ stub cimagf
@ stub cimagl
@ cdecl clearerr(ptr) MSVCRT_clearerr
@ stub clearerr_s
@ cdecl clearerr_s(ptr) MSVCRT_clearerr_s
@ cdecl clock() MSVCRT_clock
@ stub clog
@ stub clog10

View File

@ -1745,7 +1745,7 @@
@ stub cimagf
@ stub cimagl
@ cdecl clearerr(ptr) msvcr120.clearerr
@ stub clearerr_s
@ cdecl clearerr_s(ptr) msvcr120.clearerr_s
@ cdecl clock() msvcr120.clock
@ stub clog
@ stub clog10

View File

@ -1329,7 +1329,7 @@
@ cdecl ceil(double) MSVCRT_ceil
@ cdecl -arch=arm,x86_64,arm64 ceilf(float) MSVCRT_ceilf
@ cdecl clearerr(ptr) MSVCRT_clearerr
@ stub clearerr_s
@ cdecl clearerr_s(ptr) MSVCRT_clearerr_s
@ cdecl clock() MSVCRT_clock
@ cdecl cos(double) MSVCRT_cos
@ cdecl -arch=arm,x86_64,arm64 cosf(float) MSVCRT_cosf

View File

@ -1302,7 +1302,7 @@
@ cdecl ceil(double) MSVCRT_ceil
@ cdecl -arch=arm,x86_64,arm64 ceilf(float) MSVCRT_ceilf
@ cdecl clearerr(ptr) MSVCRT_clearerr
@ stub clearerr_s
@ cdecl clearerr_s(ptr) MSVCRT_clearerr_s
@ cdecl clock() MSVCRT_clock
@ cdecl cos(double) MSVCRT_cos
@ cdecl cosh(double) MSVCRT_cosh

View File

@ -1466,6 +1466,21 @@ void CDECL MSVCRT_clearerr(MSVCRT_FILE* file)
MSVCRT__unlock_file(file);
}
/*********************************************************************
* clearerr_s (MSVCRT.@)
*/
int CDECL MSVCRT_clearerr_s(MSVCRT_FILE* file)
{
TRACE(":file (%p)\n",file);
if (!MSVCRT_CHECK_PMT(file != NULL)) return MSVCRT_EINVAL;
MSVCRT__lock_file(file);
file->_flag &= ~(MSVCRT__IOERR | MSVCRT__IOEOF);
MSVCRT__unlock_file(file);
return 0;
}
/*********************************************************************
* rewind (MSVCRT.@)
*/

View File

@ -1264,7 +1264,7 @@
@ cdecl ceil(double) MSVCRT_ceil
@ cdecl -arch=arm,x86_64,arm64 ceilf(float) MSVCRT_ceilf
@ cdecl clearerr(ptr) MSVCRT_clearerr
# stub clearerr_s(ptr)
@ cdecl clearerr_s(ptr) MSVCRT_clearerr_s
@ cdecl clock() MSVCRT_clock
@ cdecl cos(double) MSVCRT_cos
@ cdecl cosh(double) MSVCRT_cosh

View File

@ -2222,7 +2222,7 @@
@ stub cimagf
@ stub cimagl
@ cdecl clearerr(ptr) MSVCRT_clearerr
@ stub clearerr_s
@ cdecl clearerr_s(ptr) MSVCRT_clearerr_s
@ cdecl clock() MSVCRT_clock
@ stub clog
@ stub clog10

View File

@ -143,6 +143,7 @@ int __cdecl _putc_nolock(int,FILE*);
int __cdecl _ungetc_nolock(int,FILE*);
void __cdecl clearerr(FILE*);
errno_t __cdecl clearerr_s(FILE*);
int __cdecl fclose(FILE*);
int __cdecl feof(FILE*);
int __cdecl ferror(FILE*);