Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 415aff0

Browse files
committed
move OS constants to platform crate
1 parent 285519d commit 415aff0

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1372,9 +1372,9 @@ dependencies = [
13721372

13731373
[[package]]
13741374
name = "hermit-abi"
1375-
version = "0.1.1"
1375+
version = "0.1.9"
13761376
source = "registry+https://github.com/rust-lang/crates.io-index"
1377-
checksum = "f22b8f315b98f415780ddbe9163c7dbbc5a07225b6d102ace1d8aeef85775140"
1377+
checksum = "0ebe6e23502442c4c9cd80fcb8bdf867dc5f4a9e9f1d882499fa49c5ed83e559"
13781378
dependencies = [
13791379
"compiler_builtins",
13801380
"libc",

src/libstd/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ dlmalloc = { version = "0.1", features = ['rustc-dep-of-std'] }
4141
fortanix-sgx-abi = { version = "0.3.2", features = ['rustc-dep-of-std'] }
4242

4343
[target.'cfg(all(any(target_arch = "x86_64", target_arch = "aarch64"), target_os = "hermit"))'.dependencies]
44-
hermit-abi = { version = "0.1", features = ['rustc-dep-of-std'] }
44+
hermit-abi = { version = "0.1.9", features = ['rustc-dep-of-std'] }
4545

4646
[target.wasm32-wasi.dependencies]
4747
wasi = { version = "0.9.0", features = ['rustc-dep-of-std'], default-features = false }

src/libstd/sys/hermit/fs.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ use crate::io::{IoSlice, IoSliceMut, SeekFrom};
66
use crate::path::{Path, PathBuf};
77
use crate::sys::cvt;
88
use crate::sys::hermit::abi;
9+
use crate::sys::hermit::abi::{O_RDONLY, O_WRONLY, O_RDWR,O_CREAT,
10+
O_EXCL, O_TRUNC, O_APPEND};
911
use crate::sys::hermit::fd::FileDesc;
1012
use crate::sys::time::SystemTime;
1113
use crate::sys::{unsupported, Void};
@@ -17,14 +19,6 @@ pub use crate::sys_common::fs::copy;
1719
fn cstr(path: &Path) -> io::Result<CString> {
1820
Ok(CString::new(path.as_os_str().as_bytes())?)
1921
}
20-
//const O_ACCMODE: i32 = 00000003;
21-
const O_RDONLY: i32 = 00000000;
22-
const O_WRONLY: i32 = 00000001;
23-
const O_RDWR: i32 = 00000002;
24-
const O_CREAT: i32 = 00000100;
25-
const O_EXCL: i32 = 00000200;
26-
const O_TRUNC: i32 = 00001000;
27-
const O_APPEND: i32 = 00002000;
2822

2923
#[derive(Debug)]
3024
pub struct File(FileDesc);

0 commit comments

Comments
 (0)