-
Notifications
You must be signed in to change notification settings - Fork 785
Add support for x86_64-unknown-uefi #787
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -100,14 +100,14 @@ impl sealed::Sealed for SystemRandom {} | |
| target_os = "macos", | ||
| target_os = "ios", | ||
| target_os = "fuchsia", | ||
| windows | ||
| target_os = "windows" | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How should |
||
| )) | ||
| ))] | ||
| use self::urandom::fill as fill_impl; | ||
|
|
||
| #[cfg(any( | ||
| all(target_os = "linux", not(feature = "dev_urandom_fallback")), | ||
| windows | ||
| target_os = "windows", | ||
| ))] | ||
| use self::sysrand::fill as fill_impl; | ||
|
|
||
|
|
@@ -158,7 +158,7 @@ mod sysrand_chunk { | |
| } | ||
| } | ||
|
|
||
| #[cfg(windows)] | ||
| #[cfg(target_os = "windows")] | ||
| mod sysrand_chunk { | ||
| use crate::{error, polyfill}; | ||
| use core; | ||
|
|
@@ -183,7 +183,7 @@ mod sysrand_chunk { | |
| } | ||
| } | ||
|
|
||
| #[cfg(any(target_os = "linux", windows))] | ||
| #[cfg(any(target_os = "linux", target_os = "windows"))] | ||
| mod sysrand { | ||
| use super::sysrand_chunk::chunk; | ||
| use crate::error; | ||
|
|
@@ -198,13 +198,13 @@ mod sysrand { | |
| } | ||
| } | ||
|
|
||
| // Keep the `cfg` conditions in sync with the conditions in lib.rs. | ||
| #[cfg(all( | ||
| feature = "use_heap", | ||
| any(target_os = "redox", unix), | ||
| not(any(target_os = "macos", target_os = "ios")), | ||
| not(all(target_os = "linux", not(feature = "dev_urandom_fallback"))), | ||
| not(any(target_os = "fuchsia")), | ||
| not(target_os = "macos"), | ||
| not(target_os = "ios"), | ||
| not(target_os = "fuchsia"), | ||
| not(target_os = "windows"), | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am planning to switch this to a whitelist approach because I want to avoid using |
||
| ))] | ||
| mod urandom { | ||
| use crate::error; | ||
|
|
@@ -215,7 +215,7 @@ mod urandom { | |
|
|
||
| #[cfg(target_os = "redox")] | ||
| static RANDOM_PATH: &str = "rand:"; | ||
| #[cfg(unix)] | ||
| #[cfg(not(target_os = "redox"))] | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What was wrong with |
||
| static RANDOM_PATH: &str = "/dev/urandom"; | ||
|
|
||
| lazy_static! { | ||
|
|
@@ -233,7 +233,6 @@ mod urandom { | |
| } | ||
| } | ||
|
|
||
| // Keep the `cfg` conditions in sync with the conditions in lib.rs. | ||
| #[cfg(all(target_os = "linux", feature = "dev_urandom_fallback"))] | ||
| mod sysrand_or_urandom { | ||
| use crate::error; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment here isn't necessary since it's just duplicating the code, so let's remove it.