Skip to content

Add missing flags to Linux and Android #683

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 20, 2017
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
1 change: 1 addition & 0 deletions src/unix/notbsd/android/b32/arm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ pub type wchar_t = u32;
pub const O_DIRECT: ::c_int = 0x10000;
pub const O_DIRECTORY: ::c_int = 0x4000;
pub const O_NOFOLLOW: ::c_int = 0x8000;
pub const O_LARGEFILE: ::c_int = 0o400000;
1 change: 1 addition & 0 deletions src/unix/notbsd/android/b32/x86.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ pub type wchar_t = i32;
pub const O_DIRECT: ::c_int = 0x4000;
pub const O_DIRECTORY: ::c_int = 0x10000;
pub const O_NOFOLLOW: ::c_int = 0x20000;
pub const O_LARGEFILE: ::c_int = 0o0100000;

pub const MAP_32BIT: ::c_int = 0x40;
1 change: 1 addition & 0 deletions src/unix/notbsd/android/b64/aarch64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ s! {
pub const O_DIRECT: ::c_int = 0x10000;
pub const O_DIRECTORY: ::c_int = 0x4000;
pub const O_NOFOLLOW: ::c_int = 0x8000;
pub const O_LARGEFILE: ::c_int = 0o400000;

pub const SYS_gettid: ::c_long = 178;

Expand Down
1 change: 1 addition & 0 deletions src/unix/notbsd/android/b64/x86_64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ s! {
pub const O_DIRECT: ::c_int = 0x4000;
pub const O_DIRECTORY: ::c_int = 0x10000;
pub const O_NOFOLLOW: ::c_int = 0x20000;
pub const O_LARGEFILE: ::c_int = 0o0100000;

pub const SYS_gettid: ::c_long = 186;

Expand Down
1 change: 0 additions & 1 deletion src/unix/notbsd/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ s! {
}

pub const O_TRUNC: ::c_int = 512;

pub const O_CLOEXEC: ::c_int = 0x80000;

pub const EBFONT: ::c_int = 59;
Expand Down
2 changes: 2 additions & 0 deletions src/unix/notbsd/linux/mips/mips32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;

pub const O_LARGEFILE: ::c_int = 0x2000;

pub const RLIM_INFINITY: ::rlim_t = 0x7fffffff;

pub const SYS_gettid: ::c_long = 4222; // Valid for O32
2 changes: 2 additions & 0 deletions src/unix/notbsd/linux/mips/mips64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;

pub const O_LARGEFILE: ::c_int = 0;

pub const RLIM_INFINITY: ::rlim_t = 0xffff_ffff_ffff_ffff;

pub const SYS_gettid: ::c_long = 5178; // Valid for n64
2 changes: 2 additions & 0 deletions src/unix/notbsd/linux/mips/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ pub const NCCS: usize = 32;

pub const O_TRUNC: ::c_int = 512;

pub const O_NOATIME: ::c_int = 0o1000000;
pub const O_CLOEXEC: ::c_int = 0x80000;
pub const O_PATH: ::c_int = 0o10000000;

pub const EBFONT: ::c_int = 59;
pub const ENOSTR: ::c_int = 60;
Expand Down
1 change: 1 addition & 0 deletions src/unix/notbsd/linux/musl/b32/arm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ pub const O_DIRECT: ::c_int = 0x4000;
pub const O_DIRECTORY: ::c_int = 0x10000;
pub const O_NOFOLLOW: ::c_int = 0x20000;
pub const O_ASYNC: ::c_int = 0x2000;
pub const O_LARGEFILE: ::c_int = 0o400000;

pub const FIOCLEX: ::c_int = 0x5451;
pub const FIONBIO: ::c_int = 0x5421;
Expand Down
1 change: 1 addition & 0 deletions src/unix/notbsd/linux/musl/b32/mips.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ pub const O_DIRECT: ::c_int = 0o100000;
pub const O_DIRECTORY: ::c_int = 0o200000;
pub const O_NOFOLLOW: ::c_int = 0o400000;
pub const O_ASYNC: ::c_int = 0o10000;
pub const O_LARGEFILE: ::c_int = 0x2000;

pub const FIOCLEX: ::c_int = 0x6601;
pub const FIONBIO: ::c_int = 0x667E;
Expand Down
1 change: 1 addition & 0 deletions src/unix/notbsd/linux/musl/b32/x86.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ pub const O_DIRECT: ::c_int = 0x4000;
pub const O_DIRECTORY: ::c_int = 0x10000;
pub const O_NOFOLLOW: ::c_int = 0x20000;
pub const O_ASYNC: ::c_int = 0x2000;
pub const O_LARGEFILE: ::c_int = 0o0100000;

pub const FIOCLEX: ::c_int = 0x5451;
pub const FIONBIO: ::c_int = 0x5421;
Expand Down
1 change: 1 addition & 0 deletions src/unix/notbsd/linux/musl/b64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ pub const O_DIRECT: ::c_int = 0x4000;
pub const O_DIRECTORY: ::c_int = 0x10000;
pub const O_NOFOLLOW: ::c_int = 0x20000;
pub const O_ASYNC: ::c_int = 0x2000;
pub const O_LARGEFILE: ::c_int = 0;

pub const FIOCLEX: ::c_int = 0x5451;
pub const FIONBIO: ::c_int = 0x5421;
Expand Down
2 changes: 1 addition & 1 deletion src/unix/notbsd/linux/musl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ pub const SFD_CLOEXEC: ::c_int = 0x080000;
pub const NCCS: usize = 32;

pub const O_TRUNC: ::c_int = 512;

pub const O_NOATIME: ::c_int = 0o1000000;
pub const O_CLOEXEC: ::c_int = 0x80000;

pub const EBFONT: ::c_int = 59;
Expand Down
2 changes: 2 additions & 0 deletions src/unix/notbsd/linux/other/b32/arm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ s! {
pub const O_DIRECT: ::c_int = 0x10000;
pub const O_DIRECTORY: ::c_int = 0x4000;
pub const O_NOFOLLOW: ::c_int = 0x8000;
pub const O_LARGEFILE: ::c_int = 0o400000;

pub const MAP_LOCKED: ::c_int = 0x02000;
pub const MAP_NORESERVE: ::c_int = 0x04000;
Expand All @@ -88,6 +89,7 @@ pub const SO_SNDLOWAT: ::c_int = 19;
pub const SO_RCVTIMEO: ::c_int = 20;
pub const SO_SNDTIMEO: ::c_int = 21;
pub const SO_SNDBUFFORCE: ::c_int = 32;
pub const SO_RCVBUFFORCE: ::c_int = 33;

pub const FIOCLEX: ::c_ulong = 0x5451;
pub const FIONBIO: ::c_ulong = 0x5421;
Expand Down
2 changes: 2 additions & 0 deletions src/unix/notbsd/linux/other/b32/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ pub const O_SYNC: ::c_int = 1052672;
pub const O_RSYNC: ::c_int = 1052672;
pub const O_DSYNC: ::c_int = 4096;
pub const O_FSYNC: ::c_int = 0x101000;
pub const O_NOATIME: ::c_int = 0o1000000;
pub const O_PATH: ::c_int = 0o10000000;

pub const MAP_GROWSDOWN: ::c_int = 0x0100;

Expand Down
1 change: 1 addition & 0 deletions src/unix/notbsd/linux/other/b32/powerpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ s! {
pub const O_DIRECT: ::c_int = 0x20000;
pub const O_DIRECTORY: ::c_int = 0x4000;
pub const O_NOFOLLOW: ::c_int = 0x8000;
pub const O_LARGEFILE: ::c_int = 0o200000;

pub const MAP_LOCKED: ::c_int = 0x00080;
pub const MAP_NORESERVE: ::c_int = 0x00040;
Expand Down
1 change: 1 addition & 0 deletions src/unix/notbsd/linux/other/b32/x86.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ s! {
pub const O_DIRECT: ::c_int = 0x4000;
pub const O_DIRECTORY: ::c_int = 0x10000;
pub const O_NOFOLLOW: ::c_int = 0x20000;
pub const O_LARGEFILE: ::c_int = 0o0100000;

pub const MAP_LOCKED: ::c_int = 0x02000;
pub const MAP_NORESERVE: ::c_int = 0x04000;
Expand Down
2 changes: 2 additions & 0 deletions src/unix/notbsd/linux/other/b64/aarch64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ pub const O_SYNC: ::c_int = 1052672;
pub const O_RSYNC: ::c_int = 1052672;
pub const O_DSYNC: ::c_int = 4096;
pub const O_FSYNC: ::c_int = 0x101000;
pub const O_NOATIME: ::c_int = 0o1000000;
pub const O_PATH: ::c_int = 0o10000000;

pub const MAP_GROWSDOWN: ::c_int = 0x0100;

Expand Down
2 changes: 2 additions & 0 deletions src/unix/notbsd/linux/other/b64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ s! {
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;

pub const O_LARGEFILE: ::c_int = 0;

cfg_if! {
if #[cfg(target_arch = "aarch64")] {
mod aarch64;
Expand Down
2 changes: 2 additions & 0 deletions src/unix/notbsd/linux/other/b64/powerpc64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ pub const O_SYNC: ::c_int = 1052672;
pub const O_RSYNC: ::c_int = 1052672;
pub const O_DSYNC: ::c_int = 4096;
pub const O_FSYNC: ::c_int = 0x101000;
pub const O_NOATIME: ::c_int = 0o1000000;
pub const O_PATH: ::c_int = 0o10000000;

pub const MAP_GROWSDOWN: ::c_int = 0x0100;

Expand Down
2 changes: 2 additions & 0 deletions src/unix/notbsd/linux/other/b64/sparc64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ pub const O_SYNC: ::c_int = 0x802000;
pub const O_RSYNC: ::c_int = 0x802000;
pub const O_DSYNC: ::c_int = 0x2000;
pub const O_FSYNC: ::c_int = 0x802000;
pub const O_NOATIME: ::c_int = 0x200000;
pub const O_PATH: ::c_int = 0x1000000;

pub const MAP_GROWSDOWN: ::c_int = 0x0200;

Expand Down
2 changes: 2 additions & 0 deletions src/unix/notbsd/linux/other/b64/x86_64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ pub const O_SYNC: ::c_int = 1052672;
pub const O_RSYNC: ::c_int = 1052672;
pub const O_DSYNC: ::c_int = 4096;
pub const O_FSYNC: ::c_int = 0x101000;
pub const O_NOATIME: ::c_int = 0o1000000;
pub const O_PATH: ::c_int = 0o10000000;

pub const MAP_GROWSDOWN: ::c_int = 0x0100;

Expand Down
4 changes: 3 additions & 1 deletion src/unix/notbsd/linux/s390x.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,10 @@ pub const SFD_CLOEXEC: ::c_int = 0x080000;
pub const NCCS: usize = 32;

pub const O_TRUNC: ::c_int = 512;

pub const O_LARGEFILE: ::c_int = 0o0100000;
pub const O_NOATIME: ::c_int = 0o1000000;
pub const O_CLOEXEC: ::c_int = 0x80000;
pub const O_PATH: ::c_int = 0o10000000;

pub const EBFONT: ::c_int = 59;
pub const ENOSTR: ::c_int = 60;
Expand Down