msvcrt: Added _wfopen_s implementation.

This commit is contained in:
Piotr Caban 2010-04-20 21:38:33 +02:00 committed by Alexandre Julliard
parent f54fd9ac86
commit 2ff04b9d57
4 changed files with 22 additions and 3 deletions

View File

@ -1146,7 +1146,7 @@
@ stub _wfindnext64 @ stub _wfindnext64
@ stub _wfindnext64i32 @ stub _wfindnext64i32
@ cdecl _wfopen(wstr wstr) msvcrt._wfopen @ cdecl _wfopen(wstr wstr) msvcrt._wfopen
@ stub _wfopen_s @ cdecl _wfopen_s(ptr wstr wstr) msvcrt._wfopen_s
@ cdecl _wfreopen(wstr wstr ptr) msvcrt._wfreopen @ cdecl _wfreopen(wstr wstr ptr) msvcrt._wfreopen
@ stub _wfreopen_s @ stub _wfreopen_s
@ cdecl _wfsopen(wstr wstr long) msvcrt._wfsopen @ cdecl _wfsopen(wstr wstr long) msvcrt._wfsopen

View File

@ -1133,7 +1133,7 @@
@ stub _wfindnext64 @ stub _wfindnext64
@ stub _wfindnext64i32 @ stub _wfindnext64i32
@ cdecl _wfopen(wstr wstr) msvcrt._wfopen @ cdecl _wfopen(wstr wstr) msvcrt._wfopen
@ stub _wfopen_s @ cdecl _wfopen_s(ptr wstr wstr) msvcrt._wfopen_s
@ cdecl _wfreopen(wstr wstr ptr) msvcrt._wfreopen @ cdecl _wfreopen(wstr wstr ptr) msvcrt._wfreopen
@ stub _wfreopen_s @ stub _wfreopen_s
@ cdecl _wfsopen(wstr wstr long) msvcrt._wfsopen @ cdecl _wfsopen(wstr wstr long) msvcrt._wfsopen

View File

@ -2707,6 +2707,25 @@ MSVCRT_FILE * CDECL MSVCRT__wfopen(const MSVCRT_wchar_t *path, const MSVCRT_wcha
return MSVCRT__wfsopen( path, mode, MSVCRT__SH_DENYNO ); return MSVCRT__wfsopen( path, mode, MSVCRT__SH_DENYNO );
} }
/*********************************************************************
* _wfopen_s (MSVCRT.@)
*/
int CDECL MSVCRT__wfopen_s(MSVCRT_FILE** pFile, const MSVCRT_wchar_t *filename,
const MSVCRT_wchar_t *mode)
{
if(!pFile) {
MSVCRT__invalid_parameter(NULL, NULL, NULL, 0, 0);
*MSVCRT__errno() = MSVCRT_EINVAL;
return MSVCRT_EINVAL;
}
*pFile = MSVCRT__wfopen(filename, mode);
if(!*pFile)
return *MSVCRT__errno();
return 0;
}
/* MSVCRT_fputc calls MSVCRT__flsbuf which calls MSVCRT_fputc */ /* MSVCRT_fputc calls MSVCRT__flsbuf which calls MSVCRT_fputc */
int CDECL MSVCRT__flsbuf(int c, MSVCRT_FILE* file); int CDECL MSVCRT__flsbuf(int c, MSVCRT_FILE* file);

View File

@ -1072,7 +1072,7 @@
# stub _wfindnext64 # stub _wfindnext64
@ cdecl _wfindnexti64(long ptr) MSVCRT__wfindnexti64 @ cdecl _wfindnexti64(long ptr) MSVCRT__wfindnexti64
@ cdecl _wfopen(wstr wstr) MSVCRT__wfopen @ cdecl _wfopen(wstr wstr) MSVCRT__wfopen
# stub _wfopen_s @ cdecl _wfopen_s(ptr wstr wstr) MSVCRT__wfopen_s
@ cdecl _wfreopen(wstr wstr ptr) MSVCRT__wfreopen @ cdecl _wfreopen(wstr wstr ptr) MSVCRT__wfreopen
# stub _wfreopen_s # stub _wfreopen_s
@ cdecl _wfsopen(wstr wstr long) MSVCRT__wfsopen @ cdecl _wfsopen(wstr wstr long) MSVCRT__wfsopen