Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions libc-test/semver/redox.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ B460800
B500000
B576000
B921600
BUFSIZ
DT_UNKNOWN
EADV
EBADE
Expand Down Expand Up @@ -130,10 +131,17 @@ OLCUC
O_ASYNC
O_EXLOCK
O_FSYNC
O_NOCTTY
O_PATH
O_SHLOCK
O_SYMLINK
PTHREAD_STACK_MIN
RLIM_INFINITY
RLIM_SAVED_CUR
RLIM_SAVED_MAX
RUSAGE_CHILDREN
RUSAGE_SELF
RUSAGE_THREAD
SA_RESTORER
SCM_RIGHTS
SIGIO
Expand Down Expand Up @@ -172,6 +180,9 @@ VWERASE
WEXITED
WNOWAIT
WSTOPPED
_IOFBF
_IOLBF
_IONBF
_PC_2_SYMLINKS
_PC_ALLOC_SIZE_MIN
_PC_ASYNC_IO
Expand All @@ -184,6 +195,7 @@ _PC_REC_XFER_ALIGN
_PC_SOCK_MAXBUF
_PC_SYMLINK_MAX
_PC_SYNC_IO
_POSIX_VDISABLE
_SC_LOGIN_NAME_MAX
_SC_RE_DUP_MAX
__WALL
Expand All @@ -194,6 +206,7 @@ bsearch
chroot
clearerr
difftime
dirfd
endgrent
endpwent
endservent
Expand Down
20 changes: 20 additions & 0 deletions src/unix/redox/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ pub const O_SYMLINK: c_int = 0x4000_0000;
// Negative to allow it to be used as int
// FIXME(redox): Fix negative values missing from includes
pub const O_NOFOLLOW: c_int = -0x8000_0000;
pub const O_NOCTTY: c_int = 0x00000200;

// locale.h
pub const LC_ALL: c_int = 0;
Expand Down Expand Up @@ -626,6 +627,15 @@ pub const PTHREAD_RWLOCK_INITIALIZER: crate::pthread_rwlock_t = crate::pthread_r
};
pub const PTHREAD_STACK_MIN: size_t = 4096;

// sys/resource.h
pub const RLIM_INFINITY: u64 = !0;
pub const RLIM_SAVED_CUR: u64 = RLIM_INFINITY;
pub const RLIM_SAVED_MAX: u64 = RLIM_INFINITY;
pub const RUSAGE_SELF: c_int = 0;
pub const RUSAGE_CHILDREN: c_int = -1;
pub const RUSAGE_BOTH: c_int = -2;
pub const RUSAGE_THREAD: c_int = 1;

// signal.h
pub const SIG_BLOCK: c_int = 0;
pub const SIG_UNBLOCK: c_int = 1;
Expand Down Expand Up @@ -935,6 +945,8 @@ pub const TCSANOW: c_int = 0;
pub const TCSADRAIN: c_int = 1;
pub const TCSAFLUSH: c_int = 2;

pub const _POSIX_VDISABLE: crate::cc_t = 0;

// sys/wait.h
pub const WNOHANG: c_int = 1;
pub const WUNTRACED: c_int = 2;
Expand Down Expand Up @@ -984,6 +996,11 @@ pub const R_OK: c_int = 4;
pub const W_OK: c_int = 2;
pub const X_OK: c_int = 1;

// stdio.h
pub const BUFSIZ: c_uint = 1024;
pub const _IOFBF: c_int = 0;
pub const _IOLBF: c_int = 1;
pub const _IONBF: c_int = 2;
pub const SEEK_SET: c_int = 0;
pub const SEEK_CUR: c_int = 1;
pub const SEEK_END: c_int = 2;
Expand Down Expand Up @@ -1096,6 +1113,9 @@ extern "C" {
pub fn __errno_location() -> *mut c_int;
pub fn strerror_r(errnum: c_int, buf: *mut c_char, buflen: size_t) -> c_int;

// dirent.h
pub fn dirfd(dirp: *mut crate::DIR) -> c_int;

// unistd.h
pub fn pipe2(fds: *mut c_int, flags: c_int) -> c_int;
pub fn getdtablesize() -> c_int;
Expand Down
Loading