Commit 5077d8c1 authored by Iván Matellanes's avatar Iván Matellanes Committed by Alexandre Julliard

msvcrt: Added _fseeki64_nolock implementation.

parent 50574ccf
......@@ -842,7 +842,7 @@
@ varargs _fscanf_s_l(ptr str ptr) MSVCRT__fscanf_s_l
@ stub _fseek_nolock
@ cdecl _fseeki64(ptr int64 long) MSVCRT__fseeki64
@ stub _fseeki64_nolock
@ cdecl _fseeki64_nolock(ptr int64 long) MSVCRT__fseeki64_nolock
@ cdecl _fsopen(str str long) MSVCRT__fsopen
@ cdecl _fstat32(long ptr) MSVCRT__fstat32
@ stub _fstat32i64
......
......@@ -1190,7 +1190,7 @@
@ varargs _fscanf_s_l(ptr str ptr) MSVCRT__fscanf_s_l
@ stub _fseek_nolock
@ cdecl _fseeki64(ptr int64 long) MSVCRT__fseeki64
@ stub _fseeki64_nolock
@ cdecl _fseeki64_nolock(ptr int64 long) MSVCRT__fseeki64_nolock
@ cdecl _fsopen(str str long) MSVCRT__fsopen
@ cdecl _fstat32(long ptr) MSVCRT__fstat32
@ stub _fstat32i64
......
......@@ -509,7 +509,7 @@
@ varargs _fscanf_s_l(ptr str ptr) MSVCRT__fscanf_s_l
@ stub _fseek_nolock
@ cdecl _fseeki64(ptr int64 long) MSVCRT__fseeki64
@ stub _fseeki64_nolock
@ cdecl _fseeki64_nolock(ptr int64 long) MSVCRT__fseeki64_nolock
@ cdecl _fsopen(str str long) MSVCRT__fsopen
@ cdecl _fstat32(long ptr) MSVCRT__fstat32
@ stub _fstat32i64
......
......@@ -491,7 +491,7 @@
@ varargs _fscanf_s_l(ptr str ptr) MSVCRT__fscanf_s_l
@ stub _fseek_nolock
@ cdecl _fseeki64(ptr int64 long) MSVCRT__fseeki64
@ stub _fseeki64_nolock
@ cdecl _fseeki64_nolock(ptr int64 long) MSVCRT__fseeki64_nolock
@ cdecl _fsopen(str str long) MSVCRT__fsopen
@ cdecl _fstat32(long ptr) MSVCRT__fstat32
@ stub _fstat32i64
......
......@@ -1249,13 +1249,26 @@ int CDECL MSVCRT__fseeki64(MSVCRT_FILE* file, __int64 offset, int whence)
int ret;
MSVCRT__lock_file(file);
ret = MSVCRT__fseeki64_nolock(file, offset, whence);
MSVCRT__unlock_file(file);
return ret;
}
/*********************************************************************
* _fseeki64_nolock (MSVCRT.@)
*/
int CDECL MSVCRT__fseeki64_nolock(MSVCRT_FILE* file, __int64 offset, int whence)
{
int ret;
/* Flush output if needed */
if(file->_flag & MSVCRT__IOWRT)
msvcrt_flush_buffer(file);
if(whence == SEEK_CUR && file->_flag & MSVCRT__IOREAD ) {
whence = SEEK_SET;
offset += MSVCRT__ftelli64(file);
offset += MSVCRT__ftelli64_nolock(file);
}
/* Discard buffered input */
......@@ -1269,7 +1282,6 @@ int CDECL MSVCRT__fseeki64(MSVCRT_FILE* file, __int64 offset, int whence)
file->_flag &= ~MSVCRT__IOEOF;
ret = (MSVCRT__lseeki64(file->_file,offset,whence) == -1)?-1:0;
MSVCRT__unlock_file(file);
return ret;
}
......
......@@ -919,6 +919,7 @@ int __cdecl MSVCRT_fgetc(MSVCRT_FILE*);
int __cdecl MSVCRT_ungetc(int,MSVCRT_FILE*);
MSVCRT_wint_t __cdecl MSVCRT_fgetwc(MSVCRT_FILE*);
MSVCRT_wint_t __cdecl MSVCRT_ungetwc(MSVCRT_wint_t,MSVCRT_FILE*);
int __cdecl MSVCRT__fseeki64_nolock(MSVCRT_FILE*,__int64,int);
__int64 __cdecl MSVCRT__ftelli64(MSVCRT_FILE* file);
__int64 __cdecl MSVCRT__ftelli64_nolock(MSVCRT_FILE*);
void __cdecl MSVCRT__exit(int);
......
......@@ -130,6 +130,7 @@ int __cdecl _vsprintf_p_l(char*,size_t,const char*,_locale_t,__ms_va_list);
size_t __cdecl _fread_nolock(void*,size_t,size_t,FILE*);
size_t __cdecl _fwrite_nolock(const void*,size_t,size_t,FILE*);
int __cdecl _fclose_nolock(FILE*);
int __cdecl _fseeki64_nolock(FILE*,__int64,int);
__msvcrt_long __cdecl _ftell_nolock(FILE*);
__int64 __cdecl _ftelli64_nolock(FILE*);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment