mirror of
https://github.com/mirror/make.git
synced 2025-03-29 21:50:30 +08:00
Fix GCC compile warning declaration-after-statement on Windows
* src/w32/w32os.c (check_io_state): Move the HANDLE declarations.
This commit is contained in:
parent
b2bf660abc
commit
363bdaef8c
@ -35,6 +35,7 @@ unsigned int
|
|||||||
check_io_state ()
|
check_io_state ()
|
||||||
{
|
{
|
||||||
static unsigned int state = IO_UNKNOWN;
|
static unsigned int state = IO_UNKNOWN;
|
||||||
|
HANDLE outfd, errfd;
|
||||||
|
|
||||||
/* We only need to compute this once per process. */
|
/* We only need to compute this once per process. */
|
||||||
if (state != IO_UNKNOWN)
|
if (state != IO_UNKNOWN)
|
||||||
@ -42,8 +43,8 @@ check_io_state ()
|
|||||||
|
|
||||||
/* Could have used GetHandleInformation, but that isn't supported
|
/* Could have used GetHandleInformation, but that isn't supported
|
||||||
on Windows 9X. */
|
on Windows 9X. */
|
||||||
HANDLE outfd = (HANDLE)_get_osfhandle (fileno (stdout));
|
outfd = (HANDLE)_get_osfhandle (fileno (stdout));
|
||||||
HANDLE errfd = (HANDLE)_get_osfhandle (fileno (stderr));
|
errfd = (HANDLE)_get_osfhandle (fileno (stderr));
|
||||||
|
|
||||||
if ((HANDLE)_get_osfhandle (fileno (stdin)) != INVALID_HANDLE_VALUE)
|
if ((HANDLE)_get_osfhandle (fileno (stdin)) != INVALID_HANDLE_VALUE)
|
||||||
state |= IO_STDIN_OK;
|
state |= IO_STDIN_OK;
|
||||||
|
Loading…
Reference in New Issue
Block a user