Skip to content

Commit

Permalink
haiku
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylvain78 committed Sep 24, 2024
1 parent aeed649 commit abc1395
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 3 additions & 1 deletion otherlibs/stdune/src/proc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ let restore_cwd_and_execve prog argv ~env =
(* run at_exit before changing the working directory *)
Stdlib.do_at_exit ();
Sys.chdir (Path.External.to_string Path.External.initial_cwd);
if Sys.win32
let os_haiku = Sys.os_type == "BeOS" || (try ignore(Sys.getenv "BE_HOST_CPU");true with Not_found -> false)
in
if Sys.win32 || os_haiku
then (
let pid = Unix.create_process_env prog argv env Unix.stdin Unix.stdout Unix.stderr in
match snd (Unix.waitpid [] pid) with
Expand Down
12 changes: 6 additions & 6 deletions vendor/opam/src/core/custom_opamStubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,20 @@ CAMLprim value OPAMW_GetArchitecture(value unit)

#else

static char * unavailable_message =
"Windows stubs are only allowed to be called on Windows.";
static void fail ()
{
caml_failwith("Windows stubs are only allowed to be called on Windows.");
}


CAMLprim value OPAMW_GetWindowsVersion(value unit)
{
(void)unit;
caml_failwith(unavailable_message);
fail ();
}

CAMLprim value OPAMW_GetArchitecture(value unit)
{
(void)unit;
caml_failwith(unavailable_message);
fail ();
}

#endif
1 change: 0 additions & 1 deletion vendor/spawn/src/spawn_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@ static void subprocess(int failure_fd, struct spawn_info *info)
}

pthread_sigmask(SIG_SETMASK, &info->child_sigmask, NULL);

execve(info->prog, info->argv, info->env);
subprocess_failure(failure_fd, "execve", PROG);
}
Expand Down

0 comments on commit abc1395

Please sign in to comment.