From fdd80a8cd0bf1febc6d941f098fb202f22b1d55f Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 7 Feb 2018 14:43:42 +0100 Subject: [PATCH] Revert "mingw: work around incorrect standard handles" Let's try this differently. This reverts commit 868c7ceca349efb1b94ac21627a736f8bfecb833. --- compat/mingw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compat/mingw.c b/compat/mingw.c index 9b3a19875204f1..b7a61d3455c86d 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -1662,12 +1662,12 @@ static pid_t mingw_spawnve_fd(const char *cmd, const char **argv, char **deltaen si.StartupInfo.hStdError = winansi_get_osfhandle(fherr); /* The list of handles cannot contain duplicates */ - if ((intptr_t)si.StartupInfo.hStdInput >= 0) + if (si.StartupInfo.hStdInput != INVALID_HANDLE_VALUE) stdhandles[stdhandles_count++] = si.StartupInfo.hStdInput; - if ((intptr_t)si.StartupInfo.hStdOutput >= 0 && + if (si.StartupInfo.hStdOutput != INVALID_HANDLE_VALUE && si.StartupInfo.hStdOutput != si.StartupInfo.hStdInput) stdhandles[stdhandles_count++] = si.StartupInfo.hStdOutput; - if ((intptr_t)si.StartupInfo.hStdError >= 0 && + if (si.StartupInfo.hStdError != INVALID_HANDLE_VALUE && si.StartupInfo.hStdError != si.StartupInfo.hStdInput && si.StartupInfo.hStdError != si.StartupInfo.hStdOutput) stdhandles[stdhandles_count++] = si.StartupInfo.hStdError;