build(ariadne): vendor clap
This commit was merged in pull request #30.
This commit is contained in:
39
third_party/crates/windows-link-0.2.1/src/lib.rs
vendored
Normal file
39
third_party/crates/windows-link-0.2.1/src/lib.rs
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
#![doc = include_str!("../readme.md")]
|
||||
#![no_std]
|
||||
|
||||
/// Defines an external function to import.
|
||||
#[cfg(all(windows, target_arch = "x86"))]
|
||||
#[macro_export]
|
||||
macro_rules! link {
|
||||
($library:literal $abi:literal $($link_name:literal)? fn $($function:tt)*) => (
|
||||
#[link(name = $library, kind = "raw-dylib", modifiers = "+verbatim", import_name_type = "undecorated")]
|
||||
extern $abi {
|
||||
$(#[link_name=$link_name])?
|
||||
pub fn $($function)*;
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
/// Defines an external function to import.
|
||||
#[cfg(all(windows, not(target_arch = "x86")))]
|
||||
#[macro_export]
|
||||
macro_rules! link {
|
||||
($library:literal $abi:literal $($link_name:literal)? fn $($function:tt)*) => (
|
||||
#[link(name = $library, kind = "raw-dylib", modifiers = "+verbatim")]
|
||||
extern $abi {
|
||||
$(#[link_name=$link_name])?
|
||||
pub fn $($function)*;
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
/// Defines an external function to import.
|
||||
#[cfg(not(windows))]
|
||||
#[macro_export]
|
||||
macro_rules! link {
|
||||
($library:literal $abi:literal $($link_name:literal)? fn $($function:tt)*) => (
|
||||
extern $abi {
|
||||
pub fn $($function)*;
|
||||
}
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user