Skip to content

Commit 7fd1f9d

Browse files
committed
Auto merge of rust-lang#733 - Susurrus:fexecve, r=alexcrichton
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.
2 parents 24155b1 + e41975a commit 7fd1f9d

File tree

6 files changed

+15
-3
lines changed

6 files changed

+15
-3
lines changed

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,6 +1107,9 @@ extern {
11071107
timeout: *const ::timespec,
11081108
sigmask: *const sigset_t) -> ::c_int;
11091109
pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int;
1110+
pub fn fexecve(fd: ::c_int, argv: *const *const ::c_char,
1111+
envp: *const *const ::c_char)
1112+
-> ::c_int;
11101113
}
11111114

11121115
cfg_if! {

src/unix/bsd/netbsdlike/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,9 @@ extern {
622622
groups: *mut ::gid_t,
623623
ngroups: *mut ::c_int) -> ::c_int;
624624
pub fn initgroups(name: *const ::c_char, basegid: ::gid_t) -> ::c_int;
625+
pub fn fexecve(fd: ::c_int, argv: *const *const ::c_char,
626+
envp: *const *const ::c_char)
627+
-> ::c_int;
625628
}
626629

627630
cfg_if! {

src/unix/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -479,9 +479,6 @@ extern {
479479
-> ::c_int;
480480
pub fn execvp(c: *const c_char,
481481
argv: *const *const c_char) -> ::c_int;
482-
pub fn fexecve(fd: ::c_int, argv: *const *const c_char,
483-
envp: *const *const c_char)
484-
-> ::c_int;
485482
pub fn fork() -> pid_t;
486483
pub fn fpathconf(filedes: ::c_int, name: ::c_int) -> c_long;
487484
pub fn getcwd(buf: *mut c_char, size: ::size_t) -> *mut c_char;

src/unix/newlib/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,9 @@ extern {
586586
serv: *mut ::c_char, servlen: socklen_t,
587587
flags: ::c_int) -> ::c_int;
588588
pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
589+
pub fn fexecve(fd: ::c_int, argv: *const *const ::c_char,
590+
envp: *const *const ::c_char)
591+
-> ::c_int;
589592
}
590593

591594
cfg_if! {

src/unix/notbsd/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,6 +1062,9 @@ extern {
10621062
winp: *const ::winsize) -> ::pid_t;
10631063
pub fn execvpe(file: *const ::c_char, argv: *const *const ::c_char,
10641064
envp: *const *const ::c_char) -> ::c_int;
1065+
pub fn fexecve(fd: ::c_int, argv: *const *const ::c_char,
1066+
envp: *const *const ::c_char)
1067+
-> ::c_int;
10651068
}
10661069

10671070
cfg_if! {

src/unix/solaris/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,4 +1278,7 @@ extern {
12781278
pub fn port_getn(port: ::c_int, pe_list: *mut port_event, max: ::c_uint,
12791279
nget: *mut ::c_uint, timeout: *const ::timespec)
12801280
-> ::c_int;
1281+
pub fn fexecve(fd: ::c_int, argv: *const *const ::c_char,
1282+
envp: *const *const ::c_char)
1283+
-> ::c_int;
12811284
}

0 commit comments

Comments
 (0)