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
0a64d241
Commit
0a64d241
authored
9 years ago
by
Richard Dodd
Browse files
Options
Downloads
Patches
Plain Diff
Add ioctl constants
parent
fb831890
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/unix/notbsd/android/mod.rs
+35
-6
35 additions, 6 deletions
src/unix/notbsd/android/mod.rs
src/unix/notbsd/linux/mod.rs
+32
-0
32 additions, 0 deletions
src/unix/notbsd/linux/mod.rs
with
67 additions
and
6 deletions
src/unix/notbsd/android/mod.rs
+
35
−
6
View file @
0a64d241
...
...
@@ -395,10 +395,7 @@ pub const O_NDELAY: ::c_int = 0x800;
pub
const
NI_MAXHOST
:
::
size_t
=
1025
;
pub
const
NCCS
:
usize
=
19
;
pub
const
TCXONC
:
::
c_int
=
0x540A
;
pub
const
TCFLSH
:
::
c_int
=
0x540B
;
pub
const
TCSBRKP
:
::
c_int
=
0x5425
;
pub
const
TCGETS
:
::
c_int
=
0x5401
;
pub
const
TCSANOW
:
::
c_int
=
0
;
pub
const
TCSADRAIN
:
::
c_int
=
0x1
;
pub
const
TCSAFLUSH
:
::
c_int
=
0x2
;
...
...
@@ -473,6 +470,38 @@ pub const F_GETLK: ::c_int = 5;
pub
const
F_GETOWN
:
::
c_int
=
9
;
pub
const
F_SETOWN
:
::
c_int
=
8
;
pub
const
TCGETS
:
::
c_int
=
0x5401
;
pub
const
TCSETS
:
::
c_int
=
0x5402
;
pub
const
TCSETSW
:
::
c_int
=
0x5403
;
pub
const
TCSETSF
:
::
c_int
=
0x5404
;
pub
const
TCGETA
:
::
c_int
=
0x5405
;
pub
const
TCSETA
:
::
c_int
=
0x5406
;
pub
const
TCSETAW
:
::
c_int
=
0x5407
;
pub
const
TCSETAF
:
::
c_int
=
0x5408
;
pub
const
TCSBRK
:
::
c_int
=
0x5409
;
pub
const
TCXONC
:
::
c_int
=
0x540A
;
pub
const
TCFLSH
:
::
c_int
=
0x540B
;
pub
const
TIOCGSOFTCAR
:
::
c_int
=
0x5419
;
pub
const
TIOCSSOFTCAR
:
::
c_int
=
0x541A
;
pub
const
TIOCINQ
:
::
c_int
=
0x541B
;
pub
const
TIOCLINUX
:
::
c_int
=
0x541C
;
pub
const
TIOCGSERIAL
:
::
c_int
=
0x541E
;
pub
const
TIOCEXCL
:
::
c_int
=
0x540C
;
pub
const
TIOCNXCL
:
::
c_int
=
0x540D
;
pub
const
TIOCSCTTY
:
::
c_int
=
0x540E
;
pub
const
TIOCGPGRP
:
::
c_int
=
0x540F
;
pub
const
TIOCSPGRP
:
::
c_int
=
0x5410
;
pub
const
TIOCOUTQ
:
::
c_int
=
0x5411
;
pub
const
TIOCSTI
:
::
c_int
=
0x5412
;
pub
const
TIOCGWINSZ
:
::
c_int
=
0x5413
;
pub
const
TIOCSWINSZ
:
::
c_int
=
0x5414
;
pub
const
TIOCMGET
:
::
c_int
=
0x5415
;
pub
const
TIOCMBIS
:
::
c_int
=
0x5416
;
pub
const
TIOCMBIC
:
::
c_int
=
0x5417
;
pub
const
TIOCMSET
:
::
c_int
=
0x5418
;
pub
const
FIONREAD
:
::
c_int
=
0x541B
;
pub
const
TIOCCONS
:
::
c_int
=
0x541D
;
f!
{
pub
fn
sigemptyset
(
set
:
*
mut
sigset_t
)
->
::
c_int
{
*
set
=
0
;
...
...
@@ -508,7 +537,7 @@ f! {
return
0
}
pub
fn
tcgetattr
(
fd
:
::
c_int
,
termios
:
*
mut
::
termios
)
->
::
c_int
{
ioctl
(
fd
,
TCGETS
,
termios
)
ioctl
(
fd
,
::
TCGETS
,
termios
)
}
pub
fn
tcsetattr
(
fd
:
::
c_int
,
optional_actions
:
::
c_int
,
...
...
@@ -516,10 +545,10 @@ f! {
ioctl
(
fd
,
optional_actions
,
termios
)
}
pub
fn
tcflow
(
fd
:
::
c_int
,
action
:
::
c_int
)
->
::
c_int
{
ioctl
(
fd
,
TCXONC
,
action
as
*
mut
::
c_void
)
ioctl
(
fd
,
::
TCXONC
,
action
as
*
mut
::
c_void
)
}
pub
fn
tcflush
(
fd
:
::
c_int
,
action
:
::
c_int
)
->
::
c_int
{
ioctl
(
fd
,
TCFLSH
,
action
as
*
mut
::
c_void
)
ioctl
(
fd
,
::
TCFLSH
,
action
as
*
mut
::
c_void
)
}
pub
fn
tcsendbreak
(
fd
:
::
c_int
,
duration
:
::
c_int
)
->
::
c_int
{
ioctl
(
fd
,
TCSBRKP
,
duration
as
*
mut
::
c_void
)
...
...
This diff is collapsed.
Click to expand it.
src/unix/notbsd/linux/mod.rs
+
32
−
0
View file @
0a64d241
...
...
@@ -389,6 +389,38 @@ pub const CLONE_NEWPID: ::c_uint = 0x20000000;
pub
const
CLONE_NEWNET
:
::
c_uint
=
0x40000000
;
pub
const
CLONE_IO
:
::
c_uint
=
0x80000000
;
pub
const
TCGETS
:
::
c_ulong
=
0x5401
;
pub
const
TCSETS
:
::
c_ulong
=
0x5402
;
pub
const
TCSETSW
:
::
c_ulong
=
0x5403
;
pub
const
TCSETSF
:
::
c_ulong
=
0x5404
;
pub
const
TCGETA
:
::
c_ulong
=
0x5405
;
pub
const
TCSETA
:
::
c_ulong
=
0x5406
;
pub
const
TCSETAW
:
::
c_ulong
=
0x5407
;
pub
const
TCSETAF
:
::
c_ulong
=
0x5408
;
pub
const
TCSBRK
:
::
c_ulong
=
0x5409
;
pub
const
TCXONC
:
::
c_ulong
=
0x540A
;
pub
const
TCFLSH
:
::
c_ulong
=
0x540B
;
pub
const
TIOCGSOFTCAR
:
::
c_ulong
=
0x5419
;
pub
const
TIOCSSOFTCAR
:
::
c_ulong
=
0x541A
;
pub
const
TIOCINQ
:
::
c_ulong
=
0x541B
;
pub
const
TIOCLINUX
:
::
c_ulong
=
0x541C
;
pub
const
TIOCGSERIAL
:
::
c_ulong
=
0x541E
;
pub
const
TIOCEXCL
:
::
c_ulong
=
0x540C
;
pub
const
TIOCNXCL
:
::
c_ulong
=
0x540D
;
pub
const
TIOCSCTTY
:
::
c_ulong
=
0x540E
;
pub
const
TIOCGPGRP
:
::
c_ulong
=
0x540F
;
pub
const
TIOCSPGRP
:
::
c_ulong
=
0x5410
;
pub
const
TIOCOUTQ
:
::
c_ulong
=
0x5411
;
pub
const
TIOCSTI
:
::
c_ulong
=
0x5412
;
pub
const
TIOCGWINSZ
:
::
c_ulong
=
0x5413
;
pub
const
TIOCSWINSZ
:
::
c_ulong
=
0x5414
;
pub
const
TIOCMGET
:
::
c_ulong
=
0x5415
;
pub
const
TIOCMBIS
:
::
c_ulong
=
0x5416
;
pub
const
TIOCMBIC
:
::
c_ulong
=
0x5417
;
pub
const
TIOCMSET
:
::
c_ulong
=
0x5418
;
pub
const
FIONREAD
:
::
c_ulong
=
0x541B
;
pub
const
TIOCCONS
:
::
c_ulong
=
0x541D
;
extern
{
pub
fn
shm_open
(
name
:
*
const
c_char
,
oflag
:
::
c_int
,
mode
:
mode_t
)
->
::
c_int
;
...
...
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