libredox: reference syscall::flag::O_CLOEXEC instead of duplicating

O_CLOEXEC was defined in both libredox (0x0100_0000) and syscall
(0x0100_0000). Per the Single Source of Truth principle (and the
Local Fork Supremacy Policy: 'never version-string-duplicate a
Cat 2 fork crate'), a primitive constant should be defined once
in the most-primitive crate that has it (syscall) and re-exported
by higher-level crates (libredox).

Change: libredox::flag::O_CLOEXEC is now
'syscall::flag::O_CLOEXEC' instead of a literal 0x0100_0000. The
F_DUPFD_CLOEXEC constant stays as a literal since syscall does not
define it (it's a Linux-specific fcntl flag that Redox may not need).
This commit is contained in:
2026-07-27 18:17:28 +09:00
parent 5bb745ec6f
commit 65889dbd92
+1 -1
View File
@@ -1188,6 +1188,6 @@ pub mod protocol {
}
}
pub const O_CLOEXEC: usize = 0x0100_0000;
pub const O_CLOEXEC: usize = syscall::flag::O_CLOEXEC;
pub const F_DUPFD_CLOEXEC: usize = 5;
}