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
5f8f0923
Commit
5f8f0923
authored
8 years ago
by
Knight
Browse files
Options
Downloads
Patches
Plain Diff
Move struct utmpx to Linux level
parent
866c9e4c
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/notbsd/linux/other/b32/mod.rs
+0
-44
0 additions, 44 deletions
src/unix/notbsd/linux/other/b32/mod.rs
src/unix/notbsd/linux/other/mod.rs
+58
-0
58 additions, 0 deletions
src/unix/notbsd/linux/other/mod.rs
with
58 additions
and
44 deletions
src/unix/notbsd/linux/other/b32/mod.rs
+
0
−
44
View file @
5f8f0923
...
...
@@ -83,27 +83,6 @@ s! {
pub
mem_unit
:
::
c_uint
,
pub
_f
:
[::
c_char
;
8
],
}
pub
struct
__exit_status
{
pub
e_termination
:
::
c_short
,
pub
e_exit
:
::
c_short
,
}
pub
struct
utmpx
{
pub
ut_type
:
::
c_short
,
pub
ut_pid
:
::
pid_t
,
pub
ut_line
:
[::
c_char
;
__UT_LINESIZE
],
pub
ut_id
:
[::
c_char
;
4
],
pub
ut_user
:
[::
c_char
;
__UT_NAMESIZE
],
pub
ut_host
:
[::
c_char
;
__UT_HOSTSIZE
],
pub
ut_exit
:
__exit_status
,
pub
ut_session
:
::
c_long
,
pub
ut_tv
:
::
timeval
,
pub
ut_addr_v6
:
[::
int32_t
;
4
],
__glibc_reserved
:
[::
c_char
;
20
],
}
}
pub
const
__SIZEOF_PTHREAD_CONDATTR_T
:
usize
=
4
;
...
...
@@ -118,29 +97,6 @@ pub const PTRACE_SETFPXREGS: ::c_uint = 19;
pub
const
PTRACE_GETREGS
:
::
c_uint
=
12
;
pub
const
PTRACE_SETREGS
:
::
c_uint
=
13
;
pub
const
__UT_LINESIZE
:
usize
=
32
;
pub
const
__UT_NAMESIZE
:
usize
=
32
;
pub
const
__UT_HOSTSIZE
:
usize
=
256
;
pub
const
EMPTY
:
::
c_short
=
0
;
pub
const
RUN_LVL
:
::
c_short
=
1
;
pub
const
BOOT_TIME
:
::
c_short
=
2
;
pub
const
NEW_TIME
:
::
c_short
=
3
;
pub
const
OLD_TIME
:
::
c_short
=
4
;
pub
const
INIT_PROCESS
:
::
c_short
=
5
;
pub
const
LOGIN_PROCESS
:
::
c_short
=
6
;
pub
const
USER_PROCESS
:
::
c_short
=
7
;
pub
const
DEAD_PROCESS
:
::
c_short
=
8
;
pub
const
ACCOUNTING
:
::
c_short
=
9
;
extern
{
pub
fn
getutxent
()
->
*
mut
utmpx
;
pub
fn
getutxid
(
ut
:
*
const
utmpx
)
->
*
mut
utmpx
;
pub
fn
getutxline
(
ut
:
*
const
utmpx
)
->
*
mut
utmpx
;
pub
fn
pututxline
(
ut
:
*
const
utmpx
)
->
*
mut
utmpx
;
pub
fn
setutxent
();
pub
fn
endutxent
();
}
cfg_if!
{
if
#[cfg(target_arch
=
"x86"
)]
{
mod
x86
;
...
...
This diff is collapsed.
Click to expand it.
src/unix/notbsd/linux/other/mod.rs
+
58
−
0
View file @
5f8f0923
...
...
@@ -4,6 +4,40 @@ pub type rlim_t = c_ulong;
pub
type
__priority_which_t
=
::
c_uint
;
s!
{
pub
struct
__exit_status
{
pub
e_termination
:
::
c_short
,
pub
e_exit
:
::
c_short
,
}
pub
struct
__timeval
{
pub
tv_sec
:
::
int32_t
,
pub
tv_usec
:
::
int32_t
,
}
pub
struct
utmpx
{
pub
ut_type
:
::
c_short
,
pub
ut_pid
:
::
pid_t
,
pub
ut_line
:
[::
c_char
;
__UT_LINESIZE
],
pub
ut_id
:
[::
c_char
;
4
],
pub
ut_user
:
[::
c_char
;
__UT_NAMESIZE
],
pub
ut_host
:
[::
c_char
;
__UT_HOSTSIZE
],
pub
ut_exit
:
__exit_status
,
#[cfg(any(target_arch
=
"aarch64"
,
target_pointer_width
=
"32"
))]
pub
ut_session
:
::
c_long
,
#[cfg(any(target_arch
=
"aarch64"
,
target_pointer_width
=
"32"
))]
pub
ut_tv
:
::
timeval
,
#[cfg(not(any(target_arch
=
"aarch64"
,
target_pointer_width
=
"32"
)))]
pub
ut_session
:
::
int32_t
,
#[cfg(not(any(target_arch
=
"aarch64"
,
target_pointer_width
=
"32"
)))]
pub
ut_tv
:
__timeval
,
pub
ut_addr_v6
:
[::
int32_t
;
4
],
__glibc_reserved
:
[::
c_char
;
20
],
}
pub
struct
sigaction
{
pub
sa_sigaction
:
::
sighandler_t
,
pub
sa_mask
:
::
sigset_t
,
...
...
@@ -132,6 +166,20 @@ s! {
}
}
pub
const
__UT_LINESIZE
:
usize
=
32
;
pub
const
__UT_NAMESIZE
:
usize
=
32
;
pub
const
__UT_HOSTSIZE
:
usize
=
256
;
pub
const
EMPTY
:
::
c_short
=
0
;
pub
const
RUN_LVL
:
::
c_short
=
1
;
pub
const
BOOT_TIME
:
::
c_short
=
2
;
pub
const
NEW_TIME
:
::
c_short
=
3
;
pub
const
OLD_TIME
:
::
c_short
=
4
;
pub
const
INIT_PROCESS
:
::
c_short
=
5
;
pub
const
LOGIN_PROCESS
:
::
c_short
=
6
;
pub
const
USER_PROCESS
:
::
c_short
=
7
;
pub
const
DEAD_PROCESS
:
::
c_short
=
8
;
pub
const
ACCOUNTING
:
::
c_short
=
9
;
pub
const
RLIMIT_RSS
:
::
c_int
=
5
;
pub
const
RLIMIT_NOFILE
:
::
c_int
=
7
;
pub
const
RLIMIT_AS
:
::
c_int
=
9
;
...
...
@@ -498,6 +546,16 @@ cfg_if! {
}
}
extern
{
pub
fn
utmpxname
(
file
:
*
const
::
c_char
)
->
::
c_int
;
pub
fn
getutxent
()
->
*
mut
utmpx
;
pub
fn
getutxid
(
ut
:
*
const
utmpx
)
->
*
mut
utmpx
;
pub
fn
getutxline
(
ut
:
*
const
utmpx
)
->
*
mut
utmpx
;
pub
fn
pututxline
(
ut
:
*
const
utmpx
)
->
*
mut
utmpx
;
pub
fn
setutxent
();
pub
fn
endutxent
();
}
#[link(name
=
"util"
)]
extern
{
pub
fn
sysctl
(
name
:
*
mut
::
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