Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
206ea48f
Commit
206ea48f
authored
Oct 09, 2014
by
Iván Matellanes
Committed by
Alexandre Julliard
Oct 13, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Added _fread_nolock() implementation.
parent
a71f25d2
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
9 deletions
+22
-9
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+1
-1
msvcr110.spec
dlls/msvcr110/msvcr110.spec
+1
-1
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+1
-1
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+1
-1
file.c
dlls/msvcrt/file.c
+14
-4
msvcrt.h
dlls/msvcrt/msvcrt.h
+1
-0
stdio.h
include/msvcrt/stdio.h
+3
-1
No files found.
dlls/msvcr100/msvcr100.spec
View file @
206ea48f
...
...
@@ -832,7 +832,7 @@
@ cdecl _fputchar(long) MSVCRT__fputchar
@ stub _fputwc_nolock
@ cdecl _fputwchar(long) MSVCRT__fputwchar
@
stub
_fread_nolock
@
cdecl _fread_nolock(ptr long long ptr) MSVCRT_
_fread_nolock
@ stub _fread_nolock_s
@ cdecl _free_locale(ptr) MSVCRT__free_locale
@ stub _freea
...
...
dlls/msvcr110/msvcr110.spec
View file @
206ea48f
...
...
@@ -1180,7 +1180,7 @@
@ cdecl _fputchar(long) MSVCRT__fputchar
@ stub _fputwc_nolock
@ cdecl _fputwchar(long) MSVCRT__fputwchar
@
stub
_fread_nolock
@
cdecl _fread_nolock(ptr long long ptr) MSVCRT_
_fread_nolock
@ stub _fread_nolock_s
@ cdecl _free_locale(ptr) MSVCRT__free_locale
@ stub _freea
...
...
dlls/msvcr80/msvcr80.spec
View file @
206ea48f
...
...
@@ -499,7 +499,7 @@
@ cdecl _fputchar(long) MSVCRT__fputchar
@ stub _fputwc_nolock
@ cdecl _fputwchar(long) MSVCRT__fputwchar
@
stub
_fread_nolock
@
cdecl _fread_nolock(ptr long long ptr) MSVCRT_
_fread_nolock
@ stub _fread_nolock_s
@ cdecl _free_locale(ptr) MSVCRT__free_locale
@ stub _freea
...
...
dlls/msvcr90/msvcr90.spec
View file @
206ea48f
...
...
@@ -481,7 +481,7 @@
@ cdecl _fputchar(long) MSVCRT__fputchar
@ stub _fputwc_nolock
@ cdecl _fputwchar(long) MSVCRT__fputwchar
@
stub
_fread_nolock
@
cdecl _fread_nolock(ptr long long ptr) MSVCRT_
_fread_nolock
@ stub _fread_nolock_s
@ cdecl _free_locale(ptr) MSVCRT__free_locale
@ stub _freea
...
...
dlls/msvcrt/file.c
View file @
206ea48f
...
...
@@ -3957,6 +3957,20 @@ int CDECL MSVCRT__fputchar(int c)
*/
MSVCRT_size_t
CDECL
MSVCRT_fread
(
void
*
ptr
,
MSVCRT_size_t
size
,
MSVCRT_size_t
nmemb
,
MSVCRT_FILE
*
file
)
{
int
ret
;
MSVCRT__lock_file
(
file
);
ret
=
MSVCRT__fread_nolock
(
ptr
,
size
,
nmemb
,
file
);
MSVCRT__unlock_file
(
file
);
return
ret
;
}
/*********************************************************************
* _fread_nolock (MSVCRT.@)
*/
MSVCRT_size_t
CDECL
MSVCRT__fread_nolock
(
void
*
ptr
,
MSVCRT_size_t
size
,
MSVCRT_size_t
nmemb
,
MSVCRT_FILE
*
file
)
{
MSVCRT_size_t
rcnt
=
size
*
nmemb
;
MSVCRT_size_t
read
=
0
;
MSVCRT_size_t
pread
=
0
;
...
...
@@ -3964,8 +3978,6 @@ MSVCRT_size_t CDECL MSVCRT_fread(void *ptr, MSVCRT_size_t size, MSVCRT_size_t nm
if
(
!
rcnt
)
return
0
;
MSVCRT__lock_file
(
file
);
/* first buffered data */
if
(
file
->
_cnt
>
0
)
{
int
pcnt
=
(
rcnt
>
file
->
_cnt
)
?
file
->
_cnt
:
rcnt
;
...
...
@@ -3979,7 +3991,6 @@ MSVCRT_size_t CDECL MSVCRT_fread(void *ptr, MSVCRT_size_t size, MSVCRT_size_t nm
if
(
file
->
_flag
&
MSVCRT__IORW
)
{
file
->
_flag
|=
MSVCRT__IOREAD
;
}
else
{
MSVCRT__unlock_file
(
file
);
return
0
;
}
}
...
...
@@ -4028,7 +4039,6 @@ MSVCRT_size_t CDECL MSVCRT_fread(void *ptr, MSVCRT_size_t size, MSVCRT_size_t nm
if
(
i
<
1
)
break
;
}
read
+=
pread
;
MSVCRT__unlock_file
(
file
);
return
read
/
size
;
}
...
...
dlls/msvcrt/msvcrt.h
View file @
206ea48f
...
...
@@ -925,6 +925,7 @@ void __cdecl MSVCRT_abort(void);
MSVCRT_ulong
*
__cdecl
MSVCRT___doserrno
(
void
);
int
*
__cdecl
MSVCRT__errno
(
void
);
char
*
__cdecl
MSVCRT_getenv
(
const
char
*
);
MSVCRT_size_t
__cdecl
MSVCRT__fread_nolock
(
void
*
,
MSVCRT_size_t
,
MSVCRT_size_t
,
MSVCRT_FILE
*
);
int
__cdecl
MSVCRT_fclose
(
MSVCRT_FILE
*
);
int
__cdecl
MSVCRT__fclose_nolock
(
MSVCRT_FILE
*
);
void
__cdecl
MSVCRT_terminate
(
void
);
...
...
include/msvcrt/stdio.h
View file @
206ea48f
...
...
@@ -127,9 +127,11 @@ int __cdecl _vsnprintf(char*,size_t,const char*,__ms_va_list);
int
__cdecl
_vsnprintf_s
(
char
*
,
size_t
,
size_t
,
const
char
*
,
__ms_va_list
);
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
*
);
int
__cdecl
_fclose_nolock
(
FILE
*
);
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
*
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment