Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
relibc
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Limkilde Svendsen
relibc
Commits
996fad70
Commit
996fad70
authored
7 years ago
by
Jeremy Soller
Browse files
Options
Downloads
Patches
Plain Diff
Fix fcntl header constants
parent
1d6115fd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/fcntl/cbindgen.toml
+4
-0
4 additions, 0 deletions
src/fcntl/cbindgen.toml
src/fcntl/src/lib.rs
+46
-6
46 additions, 6 deletions
src/fcntl/src/lib.rs
src/fcntl/src/linux.rs
+0
-8
0 additions, 8 deletions
src/fcntl/src/linux.rs
src/fcntl/src/redox.rs
+0
-20
0 additions, 20 deletions
src/fcntl/src/redox.rs
with
50 additions
and
34 deletions
src/fcntl/cbindgen.toml
+
4
−
0
View file @
996fad70
...
@@ -3,5 +3,9 @@ include_guard = "_FCNTL_H"
...
@@ -3,5 +3,9 @@ include_guard = "_FCNTL_H"
trailer
=
"#include <bits/fcntl.h>"
trailer
=
"#include <bits/fcntl.h>"
language
=
"C"
language
=
"C"
[defines]
"target_os
=
linux"
=
"__linux__"
"target_os
=
redox"
=
"__redox__"
[enum]
[enum]
prefix_with_name
=
true
prefix_with_name
=
true
This diff is collapsed.
Click to expand it.
src/fcntl/src/lib.rs
+
46
−
6
View file @
996fad70
...
@@ -6,15 +6,55 @@ extern crate platform;
...
@@ -6,15 +6,55 @@ extern crate platform;
use
platform
::
types
::
*
;
use
platform
::
types
::
*
;
pub
use
sys
::
*
;
#[cfg(target_os
=
"linux"
)]
#[cfg(target_os
=
"linux"
)]
#[path
=
"linux.rs"
]
pub
const
O_RDONLY
:
c_int
=
0x0000
;
pub
mod
sys
;
#[cfg(target_os
=
"linux"
)]
pub
const
O_WRONLY
:
c_int
=
0x0001
;
#[cfg(target_os
=
"linux"
)]
pub
const
O_RDWR
:
c_int
=
0x0002
;
#[cfg(target_os
=
"linux"
)]
pub
const
O_CREAT
:
c_int
=
0x0040
;
#[cfg(target_os
=
"linux"
)]
pub
const
O_TRUNC
:
c_int
=
0x0200
;
#[cfg(target_os
=
"linux"
)]
pub
const
O_ACCMODE
:
c_int
=
O_RDONLY
|
O_WRONLY
|
O_RDWR
;
#[cfg(target_os
=
"redox"
)]
#[cfg(target_os
=
"redox"
)]
#[path
=
"redox.rs"
]
pub
const
O_RDONLY
:
c_int
=
0x0001_0000
;
pub
mod
sys
;
#[cfg(target_os
=
"redox"
)]
pub
const
O_WRONLY
:
c_int
=
0x0002_0000
;
#[cfg(target_os
=
"redox"
)]
pub
const
O_RDWR
:
c_int
=
0x0003_0000
;
#[cfg(target_os
=
"redox"
)]
pub
const
O_NONBLOCK
:
c_int
=
0x0004_0000
;
#[cfg(target_os
=
"redox"
)]
pub
const
O_APPEND
:
c_int
=
0x0008_0000
;
#[cfg(target_os
=
"redox"
)]
pub
const
O_SHLOCK
:
c_int
=
0x0010_0000
;
#[cfg(target_os
=
"redox"
)]
pub
const
O_EXLOCK
:
c_int
=
0x0020_0000
;
#[cfg(target_os
=
"redox"
)]
pub
const
O_ASYNC
:
c_int
=
0x0040_0000
;
#[cfg(target_os
=
"redox"
)]
pub
const
O_FSYNC
:
c_int
=
0x0080_0000
;
#[cfg(target_os
=
"redox"
)]
pub
const
O_CLOEXEC
:
c_int
=
0x0100_0000
;
#[cfg(target_os
=
"redox"
)]
pub
const
O_CREAT
:
c_int
=
0x0200_0000
;
#[cfg(target_os
=
"redox"
)]
pub
const
O_TRUNC
:
c_int
=
0x0400_0000
;
#[cfg(target_os
=
"redox"
)]
pub
const
O_EXCL
:
c_int
=
0x0800_0000
;
#[cfg(target_os
=
"redox"
)]
pub
const
O_DIRECTORY
:
c_int
=
0x1000_0000
;
#[cfg(target_os
=
"redox"
)]
pub
const
O_STAT
:
c_int
=
0x2000_0000
;
#[cfg(target_os
=
"redox"
)]
pub
const
O_SYMLINK
:
c_int
=
0x4000_0000
;
#[cfg(target_os
=
"redox"
)]
pub
const
O_NOFOLLOW
:
c_int
=
0x8000_0000
;
#[cfg(target_os
=
"redox"
)]
pub
const
O_ACCMODE
:
c_int
=
O_RDONLY
|
O_WRONLY
|
O_RDWR
;
pub
const
F_DUPFD
:
c_int
=
0
;
pub
const
F_DUPFD
:
c_int
=
0
;
pub
const
F_GETFD
:
c_int
=
1
;
pub
const
F_GETFD
:
c_int
=
1
;
...
...
This diff is collapsed.
Click to expand it.
src/fcntl/src/linux.rs
deleted
100644 → 0
+
0
−
8
View file @
1d6115fd
use
platform
::
types
::
*
;
pub
const
O_RDONLY
:
c_int
=
0x0000
;
pub
const
O_WRONLY
:
c_int
=
0x0001
;
pub
const
O_RDWR
:
c_int
=
0x0002
;
pub
const
O_CREAT
:
c_int
=
0x0040
;
pub
const
O_TRUNC
:
c_int
=
0x0200
;
pub
const
O_ACCMODE
:
c_int
=
O_RDONLY
|
O_WRONLY
|
O_RDWR
;
This diff is collapsed.
Click to expand it.
src/fcntl/src/redox.rs
deleted
100644 → 0
+
0
−
20
View file @
1d6115fd
use
platform
::
types
::
*
;
pub
const
O_RDONLY
:
c_int
=
0x0001_0000
;
pub
const
O_WRONLY
:
c_int
=
0x0002_0000
;
pub
const
O_RDWR
:
c_int
=
0x0003_0000
;
pub
const
O_NONBLOCK
:
c_int
=
0x0004_0000
;
pub
const
O_APPEND
:
c_int
=
0x0008_0000
;
pub
const
O_SHLOCK
:
c_int
=
0x0010_0000
;
pub
const
O_EXLOCK
:
c_int
=
0x0020_0000
;
pub
const
O_ASYNC
:
c_int
=
0x0040_0000
;
pub
const
O_FSYNC
:
c_int
=
0x0080_0000
;
pub
const
O_CLOEXEC
:
c_int
=
0x0100_0000
;
pub
const
O_CREAT
:
c_int
=
0x0200_0000
;
pub
const
O_TRUNC
:
c_int
=
0x0400_0000
;
pub
const
O_EXCL
:
c_int
=
0x0800_0000
;
pub
const
O_DIRECTORY
:
c_int
=
0x1000_0000
;
pub
const
O_STAT
:
c_int
=
0x2000_0000
;
pub
const
O_SYMLINK
:
c_int
=
0x4000_0000
;
pub
const
O_NOFOLLOW
:
c_int
=
0x8000_0000
;
pub
const
O_ACCMODE
:
c_int
=
O_RDONLY
|
O_WRONLY
|
O_RDWR
;
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