diff options
Diffstat (limited to 'library/std/src/sys/unix/weak.rs')
| -rw-r--r-- | library/std/src/sys/unix/weak.rs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/library/std/src/sys/unix/weak.rs b/library/std/src/sys/unix/weak.rs index 432fe4c33bc..cad8be6d289 100644 --- a/library/std/src/sys/unix/weak.rs +++ b/library/std/src/sys/unix/weak.rs @@ -26,8 +26,11 @@ use crate::marker; use crate::mem; use crate::sync::atomic::{self, AtomicUsize, Ordering}; -macro_rules! weak { +// Temporary null documentation to work around #57569 until the fix is beta +#[cfg_attr(bootstrap, doc = "")] +pub(crate) macro weak { (fn $name:ident($($t:ty),*) -> $ret:ty) => ( + #[allow(non_upper_case_globals)] static $name: crate::sys::weak::Weak<unsafe extern "C" fn($($t),*) -> $ret> = crate::sys::weak::Weak::new(concat!(stringify!($name), '\0')); ) @@ -100,8 +103,10 @@ unsafe fn fetch(name: &str) -> usize { libc::dlsym(libc::RTLD_DEFAULT, name.as_ptr()) as usize } +// Temporary null documentation to work around #57569 until the fix is beta +#[cfg_attr(bootstrap, doc = "")] #[cfg(not(any(target_os = "linux", target_os = "android")))] -macro_rules! syscall { +pub(crate) macro syscall { (fn $name:ident($($arg_name:ident: $t:ty),*) -> $ret:ty) => ( unsafe fn $name($($arg_name: $t),*) -> $ret { use super::os; @@ -118,10 +123,12 @@ macro_rules! syscall { ) } +#[cfg_attr(bootstrap, doc = "")] #[cfg(any(target_os = "linux", target_os = "android"))] -macro_rules! syscall { +pub(crate) macro syscall { (fn $name:ident($($arg_name:ident: $t:ty),*) -> $ret:ty) => ( unsafe fn $name($($arg_name:$t),*) -> $ret { + use weak; // This looks like a hack, but concat_idents only accepts idents // (not paths). use libc::*; |
