diff options
| author | Stefan Lankes <slankes@eonerc.rwth-aachen.de> | 2020-03-30 06:43:49 +0200 |
|---|---|---|
| committer | Stefan Lankes <slankes@eonerc.rwth-aachen.de> | 2020-03-30 06:49:17 +0200 |
| commit | 415aff0516fd90fb11fc7f01743480f22460a3f7 (patch) | |
| tree | e7ba91b51de74de18d63044e9f4ceb22a080385e /src/libstd/sys | |
| parent | 285519d412ef9c65df3bcd2de2b1a3d6ca16a255 (diff) | |
| download | rust-415aff0516fd90fb11fc7f01743480f22460a3f7.tar.gz rust-415aff0516fd90fb11fc7f01743480f22460a3f7.zip | |
move OS constants to platform crate
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/hermit/fs.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/libstd/sys/hermit/fs.rs b/src/libstd/sys/hermit/fs.rs index 37ac5984eee..9d2fe5e1f60 100644 --- a/src/libstd/sys/hermit/fs.rs +++ b/src/libstd/sys/hermit/fs.rs @@ -6,6 +6,8 @@ use crate::io::{IoSlice, IoSliceMut, SeekFrom}; use crate::path::{Path, PathBuf}; use crate::sys::cvt; use crate::sys::hermit::abi; +use crate::sys::hermit::abi::{O_RDONLY, O_WRONLY, O_RDWR,O_CREAT, + O_EXCL, O_TRUNC, O_APPEND}; use crate::sys::hermit::fd::FileDesc; use crate::sys::time::SystemTime; use crate::sys::{unsupported, Void}; @@ -17,14 +19,6 @@ pub use crate::sys_common::fs::copy; fn cstr(path: &Path) -> io::Result<CString> { Ok(CString::new(path.as_os_str().as_bytes())?) } -//const O_ACCMODE: i32 = 00000003; -const O_RDONLY: i32 = 00000000; -const O_WRONLY: i32 = 00000001; -const O_RDWR: i32 = 00000002; -const O_CREAT: i32 = 00000100; -const O_EXCL: i32 = 00000200; -const O_TRUNC: i32 = 00001000; -const O_APPEND: i32 = 00002000; #[derive(Debug)] pub struct File(FileDesc); |
