msvcrt: Implement freopen_s.
This commit is contained in:
parent
09202ee949
commit
ba5b0c34a8
|
@ -1469,7 +1469,7 @@
|
||||||
@ stub fread_s
|
@ stub fread_s
|
||||||
@ cdecl free(ptr) msvcrt.free
|
@ cdecl free(ptr) msvcrt.free
|
||||||
@ cdecl freopen(str str ptr) msvcrt.freopen
|
@ cdecl freopen(str str ptr) msvcrt.freopen
|
||||||
@ stub freopen_s
|
@ cdecl freopen_s(ptr str str ptr) msvcrt.freopen_s
|
||||||
@ cdecl frexp(double ptr) msvcrt.frexp
|
@ cdecl frexp(double ptr) msvcrt.frexp
|
||||||
@ varargs fscanf(ptr str) msvcrt.fscanf
|
@ varargs fscanf(ptr str) msvcrt.fscanf
|
||||||
@ varargs fscanf_s(ptr str) msvcrt.fscanf_s
|
@ varargs fscanf_s(ptr str) msvcrt.fscanf_s
|
||||||
|
|
|
@ -1325,7 +1325,7 @@
|
||||||
@ stub fread_s
|
@ stub fread_s
|
||||||
@ cdecl free(ptr) msvcrt.free
|
@ cdecl free(ptr) msvcrt.free
|
||||||
@ cdecl freopen(str str ptr) msvcrt.freopen
|
@ cdecl freopen(str str ptr) msvcrt.freopen
|
||||||
@ stub freopen_s
|
@ cdecl freopen_s(ptr str str ptr) msvcrt.freopen_s
|
||||||
@ cdecl frexp(double ptr) msvcrt.frexp
|
@ cdecl frexp(double ptr) msvcrt.frexp
|
||||||
@ varargs fscanf(ptr str) msvcrt.fscanf
|
@ varargs fscanf(ptr str) msvcrt.fscanf
|
||||||
@ varargs fscanf_s(ptr str) msvcrt.fscanf_s
|
@ varargs fscanf_s(ptr str) msvcrt.fscanf_s
|
||||||
|
|
|
@ -1326,7 +1326,7 @@
|
||||||
@ stub fread_s
|
@ stub fread_s
|
||||||
@ cdecl free(ptr) msvcrt.free
|
@ cdecl free(ptr) msvcrt.free
|
||||||
@ cdecl freopen(str str ptr) msvcrt.freopen
|
@ cdecl freopen(str str ptr) msvcrt.freopen
|
||||||
@ stub freopen_s
|
@ cdecl freopen_s(ptr str str ptr) msvcrt.freopen_s
|
||||||
@ cdecl frexp(double ptr) msvcrt.frexp
|
@ cdecl frexp(double ptr) msvcrt.frexp
|
||||||
@ varargs fscanf(ptr str) msvcrt.fscanf
|
@ varargs fscanf(ptr str) msvcrt.fscanf
|
||||||
@ varargs fscanf_s(ptr str) msvcrt.fscanf_s
|
@ varargs fscanf_s(ptr str) msvcrt.fscanf_s
|
||||||
|
|
|
@ -3299,6 +3299,25 @@ MSVCRT_FILE* CDECL MSVCRT_freopen(const char *path, const char *mode, MSVCRT_FIL
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
* freopen_s (MSVCRT.@)
|
||||||
|
*/
|
||||||
|
int CDECL MSVCRT_freopen_s(MSVCRT_FILE** pFile,
|
||||||
|
const char *path, const char *mode, MSVCRT_FILE* file)
|
||||||
|
{
|
||||||
|
if (!MSVCRT_CHECK_PMT(pFile != NULL) || !MSVCRT_CHECK_PMT(path != NULL) ||
|
||||||
|
!MSVCRT_CHECK_PMT(mode != NULL) || !MSVCRT_CHECK_PMT(file != NULL)) {
|
||||||
|
*MSVCRT__errno() = MSVCRT_EINVAL;
|
||||||
|
return MSVCRT_EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
*pFile = MSVCRT_freopen(path, mode, file);
|
||||||
|
|
||||||
|
if(!*pFile)
|
||||||
|
return *MSVCRT__errno();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
* fsetpos (MSVCRT.@)
|
* fsetpos (MSVCRT.@)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1269,7 +1269,7 @@
|
||||||
@ cdecl fread(ptr long long ptr) MSVCRT_fread
|
@ cdecl fread(ptr long long ptr) MSVCRT_fread
|
||||||
@ cdecl free(ptr) MSVCRT_free
|
@ cdecl free(ptr) MSVCRT_free
|
||||||
@ cdecl freopen(str str ptr) MSVCRT_freopen
|
@ cdecl freopen(str str ptr) MSVCRT_freopen
|
||||||
# stub freopen_s(ptr str str ptr)
|
@ cdecl freopen_s(ptr str str ptr) MSVCRT_freopen_s
|
||||||
@ cdecl frexp(double ptr) MSVCRT_frexp
|
@ cdecl frexp(double ptr) MSVCRT_frexp
|
||||||
@ cdecl -arch=x86_64 frexpf(float ptr) MSVCRT_frexpf
|
@ cdecl -arch=x86_64 frexpf(float ptr) MSVCRT_frexpf
|
||||||
@ varargs fscanf(ptr str) MSVCRT_fscanf
|
@ varargs fscanf(ptr str) MSVCRT_fscanf
|
||||||
|
|
Loading…
Reference in New Issue