Skip to content
Snippets Groups Projects
Commit 1914ae89 authored by Marco A L Barbosa's avatar Marco A L Barbosa
Browse files

Add qsort, qsort_r and bsearch

parent 8a7b02cc
No related branches found
No related tags found
No related merge requests found
......@@ -894,6 +894,19 @@ cfg_if! {
pub const PTHREAD_MUTEX_ADAPTIVE_NP: ::c_int = 3;
extern "C" {
pub fn qsort_r(
base: *mut ::c_void,
num: ::size_t,
size: ::size_t,
compar: ::Option<
unsafe extern "C" fn(
*const ::c_void,
*const ::c_void,
*mut ::c_void,
) -> ::c_int,
>,
arg: *mut ::c_void,
);
pub fn sendmmsg(
sockfd: ::c_int,
msgvec: *mut ::mmsghdr,
......
......@@ -388,6 +388,23 @@ extern "C" {
pub fn isblank(c: c_int) -> c_int;
pub fn tolower(c: c_int) -> c_int;
pub fn toupper(c: c_int) -> c_int;
pub fn qsort(
base: *mut c_void,
num: size_t,
size: size_t,
compar: ::Option<
unsafe extern "C" fn(*const c_void, *const c_void) -> c_int,
>,
);
pub fn bsearch(
key: *const c_void,
base: *const c_void,
num: size_t,
size: size_t,
compar: ::Option<
unsafe extern "C" fn(*const c_void, *const c_void) -> c_int,
>,
) -> *mut c_void;
#[cfg_attr(
all(target_os = "macos", target_arch = "x86"),
link_name = "fopen$UNIX2003"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment