Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3cf8372

Browse files
committedMar 7, 2025·
Unify cygwin & horizon random impl
1 parent bc680af commit 3cf8372

File tree

4 files changed

+5
-16
lines changed

4 files changed

+5
-16
lines changed
 

‎library/std/src/random.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ use crate::sys::random as sys;
3737
/// Solaris | [`arc4random_buf`](https://docs.oracle.com/cd/E88353_01/html/E37843/arc4random-3c.html)
3838
/// Vita | `arc4random_buf`
3939
/// Hermit | `read_entropy`
40-
/// Horizon | `getrandom` shim
40+
/// Horizon, Cygwin | `getrandom`
4141
/// AIX, Hurd, L4Re, QNX | `/dev/urandom`
4242
/// Redox | `/scheme/rand`
4343
/// RTEMS | [`arc4random_buf`](https://docs.rtems.org/branches/master/bsp-howto/getentropy.html)

‎library/std/src/sys/random/cygwin.rs

-8
This file was deleted.
File renamed without changes.

‎library/std/src/sys/random/mod.rs

+4-7
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ cfg_if::cfg_if! {
66
} else if #[cfg(target_os = "windows")] {
77
mod windows;
88
pub use windows::fill_bytes;
9-
} else if #[cfg(target_os = "cygwin")] {
10-
mod cygwin;
11-
pub use cygwin::fill_bytes;
129
} else if #[cfg(target_vendor = "apple")] {
1310
mod apple;
1411
pub use apple::fill_bytes;
@@ -38,10 +35,10 @@ cfg_if::cfg_if! {
3835
} else if #[cfg(target_os = "hermit")] {
3936
mod hermit;
4037
pub use hermit::fill_bytes;
41-
} else if #[cfg(target_os = "horizon")] {
42-
// FIXME: add arc4random_buf to shim-3ds
43-
mod horizon;
44-
pub use horizon::fill_bytes;
38+
} else if #[cfg(any(target_os = "horizon", target_os = "cygwin"))] {
39+
// FIXME(horizon): add arc4random_buf to shim-3ds
40+
mod getrandom;
41+
pub use getrandom::fill_bytes;
4542
} else if #[cfg(any(
4643
target_os = "aix",
4744
target_os = "hurd",

0 commit comments

Comments
 (0)
Please sign in to comment.