Skip to content

Commit 42b57da

Browse files
committed
Update Fuchsia open flags
1 parent f7f9be3 commit 42b57da

File tree

4 files changed

+22
-30
lines changed

4 files changed

+22
-30
lines changed

src/fuchsia/aarch64.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,6 @@ s! {
6262
}
6363
}
6464

65-
pub const O_DIRECT: ::c_int = 0x10000;
66-
pub const O_DIRECTORY: ::c_int = 0x4000;
67-
pub const O_LARGEFILE: ::c_int = 0x20000;
68-
pub const O_NOFOLLOW: ::c_int = 0x8000;
69-
7065
pub const MINSIGSTKSZ: ::size_t = 6144;
7166
pub const SIGSTKSZ: ::size_t = 12288;
7267

src/fuchsia/mod.rs

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3311,10 +3311,10 @@ pub const SFD_CLOEXEC: ::c_int = 0x080000;
33113311

33123312
pub const NCCS: usize = 32;
33133313

3314-
pub const O_TRUNC: ::c_int = 512;
3315-
pub const O_NOATIME: ::c_int = 0o1000000;
3316-
pub const O_CLOEXEC: ::c_int = 0x80000;
3317-
pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY;
3314+
pub const O_TRUNC: ::c_int = 0x00040000;
3315+
pub const O_NOATIME: ::c_int = 0x00002000;
3316+
pub const O_CLOEXEC: ::c_int = 0x00000100;
3317+
pub const O_TMPFILE: ::c_int = 0x00004000;
33183318

33193319
pub const EBFONT: ::c_int = 59;
33203320
pub const ENOSTR: ::c_int = 60;
@@ -3343,10 +3343,10 @@ pub const EFD_CLOEXEC: ::c_int = 0x80000;
33433343
pub const BUFSIZ: ::c_uint = 1024;
33443344
pub const TMP_MAX: ::c_uint = 10000;
33453345
pub const FOPEN_MAX: ::c_uint = 1000;
3346-
pub const O_PATH: ::c_int = 0o10000000;
3347-
pub const O_EXEC: ::c_int = 0o10000000;
3348-
pub const O_SEARCH: ::c_int = 0o10000000;
3349-
pub const O_ACCMODE: ::c_int = 0o10000003;
3346+
pub const O_PATH: ::c_int = 0x00400000;
3347+
pub const O_EXEC: ::c_int = O_PATH;
3348+
pub const O_SEARCH: ::c_int = O_PATH;
3349+
pub const O_ACCMODE: ::c_int = (03 | O_SEARCH);
33503350
pub const O_NDELAY: ::c_int = O_NONBLOCK;
33513351
pub const NI_MAXHOST: ::socklen_t = 255;
33523352
pub const PTHREAD_STACK_MIN: ::size_t = 2048;
@@ -3674,7 +3674,7 @@ s! {
36743674
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
36753675
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
36763676

3677-
pub const O_ASYNC: ::c_int = 0x2000;
3677+
pub const O_ASYNC: ::c_int = 0x00000400;
36783678

36793679
pub const FIOCLEX: ::c_int = 0x5451;
36803680
pub const FIONBIO: ::c_int = 0x5421;
@@ -3685,14 +3685,14 @@ pub const RLIMIT_AS: ::c_int = 9;
36853685
pub const RLIMIT_NPROC: ::c_int = 6;
36863686
pub const RLIMIT_MEMLOCK: ::c_int = 8;
36873687

3688-
pub const O_APPEND: ::c_int = 1024;
3689-
pub const O_CREAT: ::c_int = 64;
3690-
pub const O_EXCL: ::c_int = 128;
3691-
pub const O_NOCTTY: ::c_int = 256;
3692-
pub const O_NONBLOCK: ::c_int = 2048;
3693-
pub const O_SYNC: ::c_int = 1052672;
3694-
pub const O_RSYNC: ::c_int = 1052672;
3695-
pub const O_DSYNC: ::c_int = 4096;
3688+
pub const O_APPEND: ::c_int = 0x00100000;
3689+
pub const O_CREAT: ::c_int = 0x00010000;
3690+
pub const O_EXCL: ::c_int = 0x00020000;
3691+
pub const O_NOCTTY: ::c_int = 0x00000200;
3692+
pub const O_NONBLOCK: ::c_int = 0x00000010;
3693+
pub const O_SYNC: ::c_int = (0x00000040 | O_DSYNC);
3694+
pub const O_RSYNC: ::c_int = O_SYNC;
3695+
pub const O_DSYNC: ::c_int = 0x00000020;
36963696

36973697
pub const SOCK_NONBLOCK: ::c_int = 2048;
36983698

@@ -3930,3 +3930,8 @@ cfg_if! {
39303930
// Unknown target_arch
39313931
}
39323932
}
3933+
3934+
pub const O_DIRECTORY: ::c_int = 0x00080000;
3935+
pub const O_DIRECT: ::c_int = 0x00000800;
3936+
pub const O_LARGEFILE: ::c_int = 0x00001000;
3937+
pub const O_NOFOLLOW: ::c_int = 0x00000080;

src/fuchsia/powerpc64.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@ pub const SYS_perf_event_open: ::c_long = 319;
6666
pub const SYS_memfd_create: ::c_long = 360;
6767

6868
pub const MAP_32BIT: ::c_int = 0x0040;
69-
pub const O_DIRECT: ::c_int = 0x4000;
70-
pub const O_DIRECTORY: ::c_int = 0x10000;
71-
pub const O_LARGEFILE: ::c_int = 0;
72-
pub const O_NOFOLLOW: ::c_int = 0x20000;
7369

7470
pub const SIGSTKSZ: ::size_t = 8192;
7571
pub const MINSIGSTKSZ: ::size_t = 2048;

src/fuchsia/x86_64.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -437,10 +437,6 @@ pub const FS: ::c_int = 25;
437437
pub const GS: ::c_int = 26;
438438

439439
pub const MAP_32BIT: ::c_int = 0x0040;
440-
pub const O_DIRECT: ::c_int = 0x4000;
441-
pub const O_DIRECTORY: ::c_int = 0x10000;
442-
pub const O_LARGEFILE: ::c_int = 0;
443-
pub const O_NOFOLLOW: ::c_int = 0x20000;
444440

445441
pub const SIGSTKSZ: ::size_t = 8192;
446442
pub const MINSIGSTKSZ: ::size_t = 2048;

0 commit comments

Comments
 (0)