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
redox-os
relibc
Commits
257040e1
Verified
Commit
257040e1
authored
6 years ago
by
jD91mZM2
Browse files
Options
Downloads
Patches
Plain Diff
Fix a few stat-related things
parent
ad324a0e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!146
Add the few last things to get gcc_complete working
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
include/bits/inttypes.h
+5
-0
5 additions, 0 deletions
include/bits/inttypes.h
include/bits/stat.h
+11
-0
11 additions, 0 deletions
include/bits/stat.h
src/sys_stat/cbindgen.toml
+1
-0
1 addition, 0 deletions
src/sys_stat/cbindgen.toml
src/sys_stat/src/lib.rs
+28
-28
28 additions, 28 deletions
src/sys_stat/src/lib.rs
with
45 additions
and
28 deletions
include/bits/inttypes.h
+
5
−
0
View file @
257040e1
#ifndef _BITS_INTTYPE_H
#define _BITS_INTTYPE_H
#define PRId8 "i"
#define PRId16 "i"
#define PRId32 "i"
...
...
@@ -188,3 +191,5 @@
#define SCNoPTR "to"
#define SCNuPTR "tu"
#define SCNxPTR "tx"
#endif
This diff is collapsed.
Click to expand it.
include/bits/stat.h
0 → 100644
+
11
−
0
View file @
257040e1
#ifndef _BITS_STAT_H
#define _BITS_STAT_H
#define S_ISDIR(mode) mode & S_IFMT == S_IFDIR
#define S_ISCHR(mode) mode & S_IFMT == S_IFCHR
#define S_ISBLK(mode) mode & S_IFMT == S_IFBLK
#define S_ISREG(mode) mode & S_IFMT == S_IFREG
#define S_ISIFO(mode) mode & S_IFMT == S_IFIFO
#define S_ISLNK(mode) mode & S_IFMT == S_IFLNK
#endif
This diff is collapsed.
Click to expand it.
src/sys_stat/cbindgen.toml
+
1
−
0
View file @
257040e1
sys_includes
=
[
"sys/types.h"
]
include_guard
=
"_SYS_STAT_H"
trailer
=
"#include <bits/stat.h>"
language
=
"C"
style
=
"Tag"
...
...
This diff is collapsed.
Click to expand it.
src/sys_stat/src/lib.rs
+
28
−
28
View file @
257040e1
...
...
@@ -6,31 +6,31 @@ extern crate platform;
use
platform
::
types
::
*
;
pub
const
S_IFMT
:
c_int
=
00170000
;
pub
const
S_IFBLK
:
c_int
=
0060000
;
pub
const
S_IFCHR
:
c_int
=
0020000
;
pub
const
S_IFIFO
:
c_int
=
0010000
;
pub
const
S_IFREG
:
c_int
=
0100000
;
pub
const
S_IFDIR
:
c_int
=
0040000
;
pub
const
S_IFLNK
:
c_int
=
0120000
;
pub
const
S_IRWXU
:
c_int
=
00700
;
pub
const
S_IRUSR
:
c_int
=
00400
;
pub
const
S_IWUSR
:
c_int
=
00200
;
pub
const
S_IXUSR
:
c_int
=
00100
;
pub
const
S_IRWXG
:
c_int
=
00070
;
pub
const
S_IRGRP
:
c_int
=
00040
;
pub
const
S_IWGRP
:
c_int
=
00020
;
pub
const
S_IXGRP
:
c_int
=
00010
;
pub
const
S_IRWXO
:
c_int
=
00007
;
pub
const
S_IROTH
:
c_int
=
00004
;
pub
const
S_IWOTH
:
c_int
=
00002
;
pub
const
S_IXOTH
:
c_int
=
00001
;
pub
const
S_ISUID
:
c_int
=
04000
;
pub
const
S_ISGID
:
c_int
=
02000
;
pub
const
S_ISVTX
:
c_int
=
01000
;
pub
const
S_IFMT
:
c_int
=
0
o
0170000
;
pub
const
S_IFBLK
:
c_int
=
0
o
060000
;
pub
const
S_IFCHR
:
c_int
=
0
o
020000
;
pub
const
S_IFIFO
:
c_int
=
0
o
010000
;
pub
const
S_IFREG
:
c_int
=
0
o
100000
;
pub
const
S_IFDIR
:
c_int
=
0
o
040000
;
pub
const
S_IFLNK
:
c_int
=
0
o
120000
;
pub
const
S_IRWXU
:
c_int
=
0
o
0700
;
pub
const
S_IRUSR
:
c_int
=
0
o
0400
;
pub
const
S_IWUSR
:
c_int
=
0
o
0200
;
pub
const
S_IXUSR
:
c_int
=
0
o
0100
;
pub
const
S_IRWXG
:
c_int
=
0
o
0070
;
pub
const
S_IRGRP
:
c_int
=
0
o
0040
;
pub
const
S_IWGRP
:
c_int
=
0
o
0020
;
pub
const
S_IXGRP
:
c_int
=
0
o
0010
;
pub
const
S_IRWXO
:
c_int
=
0
o
0007
;
pub
const
S_IROTH
:
c_int
=
0
o
0004
;
pub
const
S_IWOTH
:
c_int
=
0
o
0002
;
pub
const
S_IXOTH
:
c_int
=
0
o
0001
;
pub
const
S_ISUID
:
c_int
=
0
o
4000
;
pub
const
S_ISGID
:
c_int
=
0
o
2000
;
pub
const
S_ISVTX
:
c_int
=
0
o
1000
;
#[repr(C)]
pub
struct
stat
{
...
...
@@ -43,9 +43,9 @@ pub struct stat {
pub
st_rdev
:
dev_t
,
pub
st_size
:
off_t
,
pub
st_blksize
:
blksize_t
,
pub
st_atim
:
time_t
,
pub
st_mtim
:
time_t
,
pub
st_ctim
:
time_t
,
pub
st_atim
e
:
time_t
,
pub
st_mtim
e
:
time_t
,
pub
st_ctim
e
:
time_t
,
pub
st_blocks
:
blkcnt_t
,
}
...
...
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