Skip to content

Commit 572dc6d

Browse files
committed
Auto merge of #683 - ndusart:af_const, r=alexcrichton
Add missing flags to Linux and Android
2 parents 57413b8 + a7ba0e8 commit 572dc6d

23 files changed

+34
-3
lines changed

src/unix/notbsd/android/b32/arm.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ pub type wchar_t = u32;
44
pub const O_DIRECT: ::c_int = 0x10000;
55
pub const O_DIRECTORY: ::c_int = 0x4000;
66
pub const O_NOFOLLOW: ::c_int = 0x8000;
7+
pub const O_LARGEFILE: ::c_int = 0o400000;

src/unix/notbsd/android/b32/x86.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ pub type wchar_t = i32;
44
pub const O_DIRECT: ::c_int = 0x4000;
55
pub const O_DIRECTORY: ::c_int = 0x10000;
66
pub const O_NOFOLLOW: ::c_int = 0x20000;
7+
pub const O_LARGEFILE: ::c_int = 0o0100000;
78

89
pub const MAP_32BIT: ::c_int = 0x40;

src/unix/notbsd/android/b64/aarch64.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ s! {
5252
pub const O_DIRECT: ::c_int = 0x10000;
5353
pub const O_DIRECTORY: ::c_int = 0x4000;
5454
pub const O_NOFOLLOW: ::c_int = 0x8000;
55+
pub const O_LARGEFILE: ::c_int = 0o400000;
5556

5657
pub const SYS_gettid: ::c_long = 178;
5758

src/unix/notbsd/android/b64/x86_64.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ s! {
4646
pub const O_DIRECT: ::c_int = 0x4000;
4747
pub const O_DIRECTORY: ::c_int = 0x10000;
4848
pub const O_NOFOLLOW: ::c_int = 0x20000;
49+
pub const O_LARGEFILE: ::c_int = 0o0100000;
4950

5051
pub const SYS_gettid: ::c_long = 186;
5152

src/unix/notbsd/android/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ s! {
149149
}
150150

151151
pub const O_TRUNC: ::c_int = 512;
152-
153152
pub const O_CLOEXEC: ::c_int = 0x80000;
154153

155154
pub const EBFONT: ::c_int = 59;

src/unix/notbsd/linux/mips/mips32.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,8 @@ pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
231231
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
232232
pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
233233

234+
pub const O_LARGEFILE: ::c_int = 0x2000;
235+
234236
pub const RLIM_INFINITY: ::rlim_t = 0x7fffffff;
235237

236238
pub const SYS_gettid: ::c_long = 4222; // Valid for O32

src/unix/notbsd/linux/mips/mips64.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@ pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
217217
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
218218
pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
219219

220+
pub const O_LARGEFILE: ::c_int = 0;
221+
220222
pub const RLIM_INFINITY: ::rlim_t = 0xffff_ffff_ffff_ffff;
221223

222224
pub const SYS_gettid: ::c_long = 5178; // Valid for n64

src/unix/notbsd/linux/mips/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ pub const NCCS: usize = 32;
3333

3434
pub const O_TRUNC: ::c_int = 512;
3535

36+
pub const O_NOATIME: ::c_int = 0o1000000;
3637
pub const O_CLOEXEC: ::c_int = 0x80000;
38+
pub const O_PATH: ::c_int = 0o10000000;
3739

3840
pub const EBFONT: ::c_int = 59;
3941
pub const ENOSTR: ::c_int = 60;

src/unix/notbsd/linux/musl/b32/arm.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ pub const O_DIRECT: ::c_int = 0x4000;
113113
pub const O_DIRECTORY: ::c_int = 0x10000;
114114
pub const O_NOFOLLOW: ::c_int = 0x20000;
115115
pub const O_ASYNC: ::c_int = 0x2000;
116+
pub const O_LARGEFILE: ::c_int = 0o400000;
116117

117118
pub const FIOCLEX: ::c_int = 0x5451;
118119
pub const FIONBIO: ::c_int = 0x5421;

src/unix/notbsd/linux/musl/b32/mips.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ pub const O_DIRECT: ::c_int = 0o100000;
121121
pub const O_DIRECTORY: ::c_int = 0o200000;
122122
pub const O_NOFOLLOW: ::c_int = 0o400000;
123123
pub const O_ASYNC: ::c_int = 0o10000;
124+
pub const O_LARGEFILE: ::c_int = 0x2000;
124125

125126
pub const FIOCLEX: ::c_int = 0x6601;
126127
pub const FIONBIO: ::c_int = 0x667E;

src/unix/notbsd/linux/musl/b32/x86.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ pub const O_DIRECT: ::c_int = 0x4000;
126126
pub const O_DIRECTORY: ::c_int = 0x10000;
127127
pub const O_NOFOLLOW: ::c_int = 0x20000;
128128
pub const O_ASYNC: ::c_int = 0x2000;
129+
pub const O_LARGEFILE: ::c_int = 0o0100000;
129130

130131
pub const FIOCLEX: ::c_int = 0x5451;
131132
pub const FIONBIO: ::c_int = 0x5421;

src/unix/notbsd/linux/musl/b64/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ pub const O_DIRECT: ::c_int = 0x4000;
141141
pub const O_DIRECTORY: ::c_int = 0x10000;
142142
pub const O_NOFOLLOW: ::c_int = 0x20000;
143143
pub const O_ASYNC: ::c_int = 0x2000;
144+
pub const O_LARGEFILE: ::c_int = 0;
144145

145146
pub const FIOCLEX: ::c_int = 0x5451;
146147
pub const FIONBIO: ::c_int = 0x5421;

src/unix/notbsd/linux/musl/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ pub const SFD_CLOEXEC: ::c_int = 0x080000;
9292
pub const NCCS: usize = 32;
9393

9494
pub const O_TRUNC: ::c_int = 512;
95-
95+
pub const O_NOATIME: ::c_int = 0o1000000;
9696
pub const O_CLOEXEC: ::c_int = 0x80000;
9797

9898
pub const EBFONT: ::c_int = 59;

src/unix/notbsd/linux/other/b32/arm.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ s! {
7575
pub const O_DIRECT: ::c_int = 0x10000;
7676
pub const O_DIRECTORY: ::c_int = 0x4000;
7777
pub const O_NOFOLLOW: ::c_int = 0x8000;
78+
pub const O_LARGEFILE: ::c_int = 0o400000;
7879

7980
pub const MAP_LOCKED: ::c_int = 0x02000;
8081
pub const MAP_NORESERVE: ::c_int = 0x04000;
@@ -88,6 +89,7 @@ pub const SO_SNDLOWAT: ::c_int = 19;
8889
pub const SO_RCVTIMEO: ::c_int = 20;
8990
pub const SO_SNDTIMEO: ::c_int = 21;
9091
pub const SO_SNDBUFFORCE: ::c_int = 32;
92+
pub const SO_RCVBUFFORCE: ::c_int = 33;
9193

9294
pub const FIOCLEX: ::c_ulong = 0x5451;
9395
pub const FIONBIO: ::c_ulong = 0x5421;

src/unix/notbsd/linux/other/b32/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ pub const O_SYNC: ::c_int = 1052672;
7979
pub const O_RSYNC: ::c_int = 1052672;
8080
pub const O_DSYNC: ::c_int = 4096;
8181
pub const O_FSYNC: ::c_int = 0x101000;
82+
pub const O_NOATIME: ::c_int = 0o1000000;
83+
pub const O_PATH: ::c_int = 0o10000000;
8284

8385
pub const MAP_GROWSDOWN: ::c_int = 0x0100;
8486

src/unix/notbsd/linux/other/b32/powerpc.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ s! {
7575
pub const O_DIRECT: ::c_int = 0x20000;
7676
pub const O_DIRECTORY: ::c_int = 0x4000;
7777
pub const O_NOFOLLOW: ::c_int = 0x8000;
78+
pub const O_LARGEFILE: ::c_int = 0o200000;
7879

7980
pub const MAP_LOCKED: ::c_int = 0x00080;
8081
pub const MAP_NORESERVE: ::c_int = 0x00040;

src/unix/notbsd/linux/other/b32/x86.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ s! {
174174
pub const O_DIRECT: ::c_int = 0x4000;
175175
pub const O_DIRECTORY: ::c_int = 0x10000;
176176
pub const O_NOFOLLOW: ::c_int = 0x20000;
177+
pub const O_LARGEFILE: ::c_int = 0o0100000;
177178

178179
pub const MAP_LOCKED: ::c_int = 0x02000;
179180
pub const MAP_NORESERVE: ::c_int = 0x04000;

src/unix/notbsd/linux/other/b64/aarch64.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ pub const O_SYNC: ::c_int = 1052672;
9898
pub const O_RSYNC: ::c_int = 1052672;
9999
pub const O_DSYNC: ::c_int = 4096;
100100
pub const O_FSYNC: ::c_int = 0x101000;
101+
pub const O_NOATIME: ::c_int = 0o1000000;
102+
pub const O_PATH: ::c_int = 0o10000000;
101103

102104
pub const MAP_GROWSDOWN: ::c_int = 0x0100;
103105

src/unix/notbsd/linux/other/b64/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ s! {
4949
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
5050
pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
5151

52+
pub const O_LARGEFILE: ::c_int = 0;
53+
5254
cfg_if! {
5355
if #[cfg(target_arch = "aarch64")] {
5456
mod aarch64;

src/unix/notbsd/linux/other/b64/powerpc64.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ pub const O_SYNC: ::c_int = 1052672;
9696
pub const O_RSYNC: ::c_int = 1052672;
9797
pub const O_DSYNC: ::c_int = 4096;
9898
pub const O_FSYNC: ::c_int = 0x101000;
99+
pub const O_NOATIME: ::c_int = 0o1000000;
100+
pub const O_PATH: ::c_int = 0o10000000;
99101

100102
pub const MAP_GROWSDOWN: ::c_int = 0x0100;
101103

src/unix/notbsd/linux/other/b64/sparc64.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ pub const O_SYNC: ::c_int = 0x802000;
9898
pub const O_RSYNC: ::c_int = 0x802000;
9999
pub const O_DSYNC: ::c_int = 0x2000;
100100
pub const O_FSYNC: ::c_int = 0x802000;
101+
pub const O_NOATIME: ::c_int = 0x200000;
102+
pub const O_PATH: ::c_int = 0x1000000;
101103

102104
pub const MAP_GROWSDOWN: ::c_int = 0x0200;
103105

src/unix/notbsd/linux/other/b64/x86_64.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ pub const O_SYNC: ::c_int = 1052672;
199199
pub const O_RSYNC: ::c_int = 1052672;
200200
pub const O_DSYNC: ::c_int = 4096;
201201
pub const O_FSYNC: ::c_int = 0x101000;
202+
pub const O_NOATIME: ::c_int = 0o1000000;
203+
pub const O_PATH: ::c_int = 0o10000000;
202204

203205
pub const MAP_GROWSDOWN: ::c_int = 0x0100;
204206

src/unix/notbsd/linux/s390x.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,10 @@ pub const SFD_CLOEXEC: ::c_int = 0x080000;
279279
pub const NCCS: usize = 32;
280280

281281
pub const O_TRUNC: ::c_int = 512;
282-
282+
pub const O_LARGEFILE: ::c_int = 0o0100000;
283+
pub const O_NOATIME: ::c_int = 0o1000000;
283284
pub const O_CLOEXEC: ::c_int = 0x80000;
285+
pub const O_PATH: ::c_int = 0o10000000;
284286

285287
pub const EBFONT: ::c_int = 59;
286288
pub const ENOSTR: ::c_int = 60;

0 commit comments

Comments
 (0)