Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
ae15a4b6
Commit
ae15a4b6
authored
13 years ago
by
Piotr Caban
Committed by
Alexandre Julliard
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
msvcrt: Make FILE->_flag reading functions thread safe.
parent
dd303022
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/msvcrt/file.c
+25
-3
25 additions, 3 deletions
dlls/msvcrt/file.c
with
25 additions
and
3 deletions
dlls/msvcrt/file.c
+
25
−
3
View file @
ae15a4b6
...
...
@@ -1198,7 +1198,10 @@ int CDECL MSVCRT__chsize(int fd, MSVCRT_long size)
void
CDECL
MSVCRT_clearerr
(
MSVCRT_FILE
*
file
)
{
TRACE
(
":file (%p) fd (%d)
\n
"
,
file
,
file
->
_file
);
MSVCRT__lock_file
(
file
);
file
->
_flag
&=
~
(
MSVCRT__IOERR
|
MSVCRT__IOEOF
);
MSVCRT__unlock_file
(
file
);
}
/*********************************************************************
...
...
@@ -1338,8 +1341,15 @@ __int64 CDECL MSVCRT__filelengthi64(int fd)
*/
int
CDECL
MSVCRT__fileno
(
MSVCRT_FILE
*
file
)
{
int
ret
;
TRACE
(
":FILE* (%p) fd (%d)
\n
"
,
file
,
file
->
_file
);
return
file
->
_file
;
MSVCRT__lock_file
(
file
);
ret
=
file
->
_file
;
MSVCRT__unlock_file
(
file
);
return
ret
;
}
/*********************************************************************
...
...
@@ -2589,7 +2599,13 @@ int CDECL MSVCRT_fclose(MSVCRT_FILE* file)
*/
int
CDECL
MSVCRT_feof
(
MSVCRT_FILE
*
file
)
{
return
file
->
_flag
&
MSVCRT__IOEOF
;
int
ret
;
MSVCRT__lock_file
(
file
);
ret
=
file
->
_flag
&
MSVCRT__IOEOF
;
MSVCRT__unlock_file
(
file
);
return
ret
;
}
/*********************************************************************
...
...
@@ -2597,7 +2613,13 @@ int CDECL MSVCRT_feof(MSVCRT_FILE* file)
*/
int
CDECL
MSVCRT_ferror
(
MSVCRT_FILE
*
file
)
{
return
file
->
_flag
&
MSVCRT__IOERR
;
int
ret
;
MSVCRT__lock_file
(
file
);
ret
=
file
->
_flag
&
MSVCRT__IOERR
;
MSVCRT__unlock_file
(
file
);
return
ret
;
}
/*********************************************************************
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment