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
e7fc2370
Commit
e7fc2370
authored
Jun 10, 2015
by
Piotr Caban
Committed by
Alexandre Julliard
Jun 11, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Don't use MSVCRT_fdend in msvcrt_create_io_inherit_block.
parent
417b6056
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
file.c
dlls/msvcrt/file.c
+10
-5
No files found.
dlls/msvcrt/file.c
View file @
e7fc2370
...
...
@@ -548,12 +548,17 @@ static int msvcrt_init_fp(MSVCRT_FILE* file, int fd, unsigned stream_flags)
*/
unsigned
msvcrt_create_io_inherit_block
(
WORD
*
size
,
BYTE
**
block
)
{
int
fd
;
int
fd
,
last_fd
;
char
*
wxflag_ptr
;
HANDLE
*
handle_ptr
;
ioinfo
*
fdinfo
;
*
size
=
sizeof
(
unsigned
)
+
(
sizeof
(
char
)
+
sizeof
(
HANDLE
))
*
MSVCRT_fdend
;
for
(
last_fd
=
MSVCRT_MAX_FILES
-
1
;
last_fd
>=
0
;
last_fd
--
)
if
(
get_ioinfo_nolock
(
last_fd
)
->
handle
!=
INVALID_HANDLE_VALUE
)
break
;
last_fd
++
;
*
size
=
sizeof
(
unsigned
)
+
(
sizeof
(
char
)
+
sizeof
(
HANDLE
))
*
last_fd
;
*
block
=
MSVCRT_calloc
(
*
size
,
1
);
if
(
!*
block
)
{
...
...
@@ -561,10 +566,10 @@ unsigned msvcrt_create_io_inherit_block(WORD *size, BYTE **block)
return
FALSE
;
}
wxflag_ptr
=
(
char
*
)
*
block
+
sizeof
(
unsigned
);
handle_ptr
=
(
HANDLE
*
)(
wxflag_ptr
+
MSVCRT_fdend
*
sizeof
(
char
)
);
handle_ptr
=
(
HANDLE
*
)(
wxflag_ptr
+
last_fd
);
*
(
unsigned
*
)
*
block
=
MSVCRT_fden
d
;
for
(
fd
=
0
;
fd
<
MSVCRT_fden
d
;
fd
++
)
*
(
unsigned
*
)
*
block
=
last_f
d
;
for
(
fd
=
0
;
fd
<
last_f
d
;
fd
++
)
{
/* to be inherited, we need it to be open, and that DONTINHERIT isn't set */
fdinfo
=
get_ioinfo
(
fd
);
...
...
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