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
8e5bebe2
Commit
8e5bebe2
authored
Mar 05, 2013
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 05, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Rename msvcrt_alloc_fd_from to msvcrt_set_fd.
parent
895d059e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
file.c
dlls/msvcrt/file.c
+7
-7
No files found.
dlls/msvcrt/file.c
View file @
8e5bebe2
...
...
@@ -287,7 +287,7 @@ static void msvcrt_free_fd(int fd)
/* INTERNAL: Allocate an fd slot from a Win32 HANDLE, starting from fd */
/* caller must hold the files lock */
static
int
msvcrt_
alloc_fd_from
(
HANDLE
hand
,
int
flag
,
int
fd
)
static
int
msvcrt_
set_fd
(
HANDLE
hand
,
int
flag
,
int
fd
)
{
ioinfo
*
fdinfo
;
...
...
@@ -351,7 +351,7 @@ static int msvcrt_alloc_fd(HANDLE hand, int flag)
LOCK_FILES
();
TRACE
(
":handle (%p) allocating fd (%d)
\n
"
,
hand
,
MSVCRT_fdstart
);
ret
=
msvcrt_
alloc_fd_from
(
hand
,
flag
,
MSVCRT_fdstart
);
ret
=
msvcrt_
set_fd
(
hand
,
flag
,
MSVCRT_fdstart
);
UNLOCK_FILES
();
return
ret
;
}
...
...
@@ -474,7 +474,7 @@ void msvcrt_init_io(void)
for
(
i
=
0
;
i
<
count
;
i
++
)
{
if
((
*
wxflag_ptr
&
WX_OPEN
)
&&
*
handle_ptr
!=
INVALID_HANDLE_VALUE
)
msvcrt_
alloc_fd_from
(
*
handle_ptr
,
*
wxflag_ptr
,
i
);
msvcrt_
set_fd
(
*
handle_ptr
,
*
wxflag_ptr
,
i
);
wxflag_ptr
++
;
handle_ptr
++
;
}
...
...
@@ -485,15 +485,15 @@ void msvcrt_init_io(void)
fdinfo
=
msvcrt_get_ioinfo
(
MSVCRT_STDIN_FILENO
);
if
(
!
(
fdinfo
->
wxflag
&
WX_OPEN
)
||
fdinfo
->
handle
==
INVALID_HANDLE_VALUE
)
msvcrt_
alloc_fd_from
(
GetStdHandle
(
STD_INPUT_HANDLE
),
WX_OPEN
|
WX_TEXT
,
MSVCRT_STDIN_FILENO
);
msvcrt_
set_fd
(
GetStdHandle
(
STD_INPUT_HANDLE
),
WX_OPEN
|
WX_TEXT
,
MSVCRT_STDIN_FILENO
);
fdinfo
=
msvcrt_get_ioinfo
(
MSVCRT_STDOUT_FILENO
);
if
(
!
(
fdinfo
->
wxflag
&
WX_OPEN
)
||
fdinfo
->
handle
==
INVALID_HANDLE_VALUE
)
msvcrt_
alloc_fd_from
(
GetStdHandle
(
STD_OUTPUT_HANDLE
),
WX_OPEN
|
WX_TEXT
,
MSVCRT_STDOUT_FILENO
);
msvcrt_
set_fd
(
GetStdHandle
(
STD_OUTPUT_HANDLE
),
WX_OPEN
|
WX_TEXT
,
MSVCRT_STDOUT_FILENO
);
fdinfo
=
msvcrt_get_ioinfo
(
MSVCRT_STDERR_FILENO
);
if
(
!
(
fdinfo
->
wxflag
&
WX_OPEN
)
||
fdinfo
->
handle
==
INVALID_HANDLE_VALUE
)
msvcrt_
alloc_fd_from
(
GetStdHandle
(
STD_ERROR_HANDLE
),
WX_OPEN
|
WX_TEXT
,
MSVCRT_STDERR_FILENO
);
msvcrt_
set_fd
(
GetStdHandle
(
STD_ERROR_HANDLE
),
WX_OPEN
|
WX_TEXT
,
MSVCRT_STDERR_FILENO
);
TRACE
(
":handles (%p)(%p)(%p)
\n
"
,
msvcrt_get_ioinfo
(
MSVCRT_STDIN_FILENO
)
->
handle
,
msvcrt_get_ioinfo
(
MSVCRT_STDOUT_FILENO
)
->
handle
,
...
...
@@ -913,7 +913,7 @@ int CDECL MSVCRT__dup2(int od, int nd)
if
(
msvcrt_is_valid_fd
(
nd
))
MSVCRT__close
(
nd
);
ret
=
msvcrt_
alloc_fd_from
(
handle
,
wxflag
,
nd
);
ret
=
msvcrt_
set_fd
(
handle
,
wxflag
,
nd
);
if
(
ret
==
-
1
)
{
CloseHandle
(
handle
);
...
...
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