Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
felixmoebius
libc
Commits
1914ae89
Commit
1914ae89
authored
5 years ago
by
Marco A L Barbosa
Browse files
Options
Downloads
Patches
Plain Diff
Add qsort, qsort_r and bsearch
parent
8a7b02cc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/unix/linux_like/linux/gnu/mod.rs
+13
-0
13 additions, 0 deletions
src/unix/linux_like/linux/gnu/mod.rs
src/unix/mod.rs
+17
-0
17 additions, 0 deletions
src/unix/mod.rs
with
30 additions
and
0 deletions
src/unix/linux_like/linux/gnu/mod.rs
+
13
−
0
View file @
1914ae89
...
...
@@ -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
,
...
...
This diff is collapsed.
Click to expand it.
src/unix/mod.rs
+
17
−
0
View file @
1914ae89
...
...
@@ -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"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment