Skip to content

Two small fixes #209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cbits/posix/posix_spawn.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#if !defined(HAVE_POSIX_SPAWNP)
ProcHandle
do_spawn_posix (char *const args[],
const char *workingDirectory, const char **environment,
char *workingDirectory, char **environment,
struct std_handle *stdInHdl,
struct std_handle *stdOutHdl,
struct std_handle *stdErrHdl,
Expand Down Expand Up @@ -208,4 +208,4 @@ do_spawn_posix (char *const args[],
return ret;
}

#endif
#endif
5 changes: 2 additions & 3 deletions test/main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ import System.IO (hClose, openBinaryTempFile, hGetContents)
import qualified Data.ByteString as S
import qualified Data.ByteString.Char8 as S8
import System.Directory (getTemporaryDirectory, removeFile)
import System.Info (os)

ifWindows :: IO () -> IO ()
ifWindows action
| os /= "windows" = return ()
| otherwise = action
| not isWindows = return ()
| otherwise = action

isWindows :: Bool
#if WINDOWS
Expand Down