Skip to content

Commit

Permalink
Auto merge of rust-lang#733 - Susurrus:fexecve, r=alexcrichton
Browse files Browse the repository at this point in the history
Remove fexecvpe from Haiku and MacOS/IOS where it's not implemented

I was going to remove the skip-check from `build.rs` to see if we might be able to enable the function check on at least some platforms, but I'll assume it doesn't work on any as has been suggested.

Closes rust-lang#732.
  • Loading branch information
bors committed Aug 17, 2017
2 parents 24155b1 + e41975a commit 7fd1f9d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/unix/bsd/freebsdlike/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,9 @@ extern {
timeout: *const ::timespec,
sigmask: *const sigset_t) -> ::c_int;
pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int;
pub fn fexecve(fd: ::c_int, argv: *const *const ::c_char,
envp: *const *const ::c_char)
-> ::c_int;
}

cfg_if! {
Expand Down
3 changes: 3 additions & 0 deletions src/unix/bsd/netbsdlike/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,9 @@ extern {
groups: *mut ::gid_t,
ngroups: *mut ::c_int) -> ::c_int;
pub fn initgroups(name: *const ::c_char, basegid: ::gid_t) -> ::c_int;
pub fn fexecve(fd: ::c_int, argv: *const *const ::c_char,
envp: *const *const ::c_char)
-> ::c_int;
}

cfg_if! {
Expand Down
3 changes: 0 additions & 3 deletions src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -479,9 +479,6 @@ extern {
-> ::c_int;
pub fn execvp(c: *const c_char,
argv: *const *const c_char) -> ::c_int;
pub fn fexecve(fd: ::c_int, argv: *const *const c_char,
envp: *const *const c_char)
-> ::c_int;
pub fn fork() -> pid_t;
pub fn fpathconf(filedes: ::c_int, name: ::c_int) -> c_long;
pub fn getcwd(buf: *mut c_char, size: ::size_t) -> *mut c_char;
Expand Down
3 changes: 3 additions & 0 deletions src/unix/newlib/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,9 @@ extern {
serv: *mut ::c_char, servlen: socklen_t,
flags: ::c_int) -> ::c_int;
pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
pub fn fexecve(fd: ::c_int, argv: *const *const ::c_char,
envp: *const *const ::c_char)
-> ::c_int;
}

cfg_if! {
Expand Down
3 changes: 3 additions & 0 deletions src/unix/notbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,9 @@ extern {
winp: *const ::winsize) -> ::pid_t;
pub fn execvpe(file: *const ::c_char, argv: *const *const ::c_char,
envp: *const *const ::c_char) -> ::c_int;
pub fn fexecve(fd: ::c_int, argv: *const *const ::c_char,
envp: *const *const ::c_char)
-> ::c_int;
}

cfg_if! {
Expand Down
3 changes: 3 additions & 0 deletions src/unix/solaris/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1278,4 +1278,7 @@ extern {
pub fn port_getn(port: ::c_int, pe_list: *mut port_event, max: ::c_uint,
nget: *mut ::c_uint, timeout: *const ::timespec)
-> ::c_int;
pub fn fexecve(fd: ::c_int, argv: *const *const ::c_char,
envp: *const *const ::c_char)
-> ::c_int;
}

0 comments on commit 7fd1f9d

Please sign in to comment.