mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 09:50:52 +00:00
msvcrt: Added _fclose_nolock() implementation.
This commit is contained in:
parent
1e65a32e26
commit
9fda14a9d6
7 changed files with 20 additions and 7 deletions
|
@ -794,7 +794,7 @@
|
|||
@ cdecl _execvpe(str ptr ptr)
|
||||
@ cdecl _exit(long) MSVCRT__exit
|
||||
@ cdecl _expand(ptr long)
|
||||
@ stub _fclose_nolock
|
||||
@ cdecl _fclose_nolock(ptr) MSVCRT__fclose_nolock
|
||||
@ cdecl _fcloseall() MSVCRT__fcloseall
|
||||
@ cdecl _fcvt(double long ptr ptr) MSVCRT__fcvt
|
||||
@ cdecl _fcvt_s(ptr long double long ptr ptr) MSVCRT__fcvt_s
|
||||
|
|
|
@ -1142,7 +1142,7 @@
|
|||
@ cdecl _execvpe(str ptr ptr)
|
||||
@ cdecl _exit(long) MSVCRT__exit
|
||||
@ cdecl _expand(ptr long)
|
||||
@ stub _fclose_nolock
|
||||
@ cdecl _fclose_nolock(ptr) MSVCRT__fclose_nolock
|
||||
@ cdecl _fcloseall() MSVCRT__fcloseall
|
||||
@ cdecl _fcvt(double long ptr ptr) MSVCRT__fcvt
|
||||
@ cdecl _fcvt_s(ptr long double long ptr ptr) MSVCRT__fcvt_s
|
||||
|
|
|
@ -461,7 +461,7 @@
|
|||
@ cdecl _execvpe(str ptr ptr)
|
||||
@ cdecl _exit(long) MSVCRT__exit
|
||||
@ cdecl _expand(ptr long)
|
||||
@ stub _fclose_nolock
|
||||
@ cdecl _fclose_nolock(ptr) MSVCRT__fclose_nolock
|
||||
@ cdecl _fcloseall() MSVCRT__fcloseall
|
||||
@ cdecl _fcvt(double long ptr ptr) MSVCRT__fcvt
|
||||
@ cdecl _fcvt_s(ptr long double long ptr ptr) MSVCRT__fcvt_s
|
||||
|
|
|
@ -443,7 +443,7 @@
|
|||
@ cdecl _execvpe(str ptr ptr)
|
||||
@ cdecl _exit(long) MSVCRT__exit
|
||||
@ cdecl _expand(ptr long)
|
||||
@ stub _fclose_nolock
|
||||
@ cdecl _fclose_nolock(ptr) MSVCRT__fclose_nolock
|
||||
@ cdecl _fcloseall() MSVCRT__fcloseall
|
||||
@ cdecl _fcvt(double long ptr ptr) MSVCRT__fcvt
|
||||
@ cdecl _fcvt_s(ptr long double long ptr ptr) MSVCRT__fcvt_s
|
||||
|
|
|
@ -3373,9 +3373,22 @@ int CDECL MSVCRT__putw(int val, MSVCRT_FILE* file)
|
|||
*/
|
||||
int CDECL MSVCRT_fclose(MSVCRT_FILE* file)
|
||||
{
|
||||
int r, flag;
|
||||
int ret;
|
||||
|
||||
MSVCRT__lock_file(file);
|
||||
ret = MSVCRT__fclose_nolock(file);
|
||||
MSVCRT__unlock_file(file);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _fclose_nolock (MSVCRT.@)
|
||||
*/
|
||||
int CDECL MSVCRT__fclose_nolock(MSVCRT_FILE* file)
|
||||
{
|
||||
int r, flag;
|
||||
|
||||
flag = file->_flag;
|
||||
MSVCRT_free(file->_tmpfname);
|
||||
file->_tmpfname = NULL;
|
||||
|
@ -3386,9 +3399,7 @@ int CDECL MSVCRT_fclose(MSVCRT_FILE* file)
|
|||
MSVCRT_free(file->_base);
|
||||
|
||||
r=MSVCRT__close(file->_file);
|
||||
|
||||
file->_flag = 0;
|
||||
MSVCRT__unlock_file(file);
|
||||
|
||||
return ((r == -1) || (flag & MSVCRT__IOERR) ? MSVCRT_EOF : 0);
|
||||
}
|
||||
|
|
|
@ -926,6 +926,7 @@ MSVCRT_ulong* __cdecl MSVCRT___doserrno(void);
|
|||
int* __cdecl MSVCRT__errno(void);
|
||||
char* __cdecl MSVCRT_getenv(const char*);
|
||||
int __cdecl MSVCRT_fclose(MSVCRT_FILE*);
|
||||
int __cdecl MSVCRT__fclose_nolock(MSVCRT_FILE*);
|
||||
void __cdecl MSVCRT_terminate(void);
|
||||
MSVCRT_FILE* __cdecl MSVCRT__iob_func(void);
|
||||
MSVCRT_clock_t __cdecl MSVCRT_clock(void);
|
||||
|
|
|
@ -129,6 +129,7 @@ int __cdecl _vsprintf_p_l(char*,size_t,const char*,_locale_t,__ms_va_list);
|
|||
|
||||
void __cdecl clearerr(FILE*);
|
||||
int __cdecl fclose(FILE*);
|
||||
int __cdecl _fclose_nolock(FILE*);
|
||||
int __cdecl feof(FILE*);
|
||||
int __cdecl ferror(FILE*);
|
||||
int __cdecl fflush(FILE*);
|
||||
|
|
Loading…
Reference in a new issue