summaryrefslogtreecommitdiff
path: root/src/unix/haiku
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2022-11-30 00:02:38 +0000
committerDavid Carlier <devnexen@gmail.com>2022-12-01 12:34:38 +0000
commit27cc898f59e64579b51fae82a381c99566810e05 (patch)
treef4b5e49e623c4531fb314f0f358da2fb21aba071 /src/unix/haiku
parente4b8fd4f59a87346c870295c8125469c672998aa (diff)
downloadrust-libc-27cc898f59e64579b51fae82a381c99566810e05.tar.gz
adding getopt_long for unixes.
Diffstat (limited to 'src/unix/haiku')
-rw-r--r--src/unix/haiku/mod.rs15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/unix/haiku/mod.rs b/src/unix/haiku/mod.rs
index bb2e0351bf..005b1d9df5 100644
--- a/src/unix/haiku/mod.rs
+++ b/src/unix/haiku/mod.rs
@@ -430,6 +430,13 @@ s! {
pub key: *mut ::c_char,
pub data: *mut ::c_void,
}
+
+ pub struct option {
+ pub name: *const ::c_char,
+ pub has_arg: ::c_int,
+ pub flag: *mut ::c_int,
+ pub val: ::c_int,
+ }
}
s_no_extra_traits! {
@@ -1971,7 +1978,13 @@ extern "C" {
attr: *mut posix_spawnattr_t,
sigmask: *const ::sigset_t,
) -> ::c_int;
-
+ pub fn getopt_long(
+ argc: ::c_int,
+ argv: *const *mut c_char,
+ optstring: *const c_char,
+ longopts: *const option,
+ longindex: *mut ::c_int,
+ ) -> ::c_int;
}
#[link(name = "bsd")]