1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#![allow(non_upper_case_globals)]
#[allow(unused_macros)]
macro_rules! cfg_if {
($(
if #[cfg($($meta:meta),*)] { $($it:item)* }
) else * else {
$($it2:item)*
}) => {
cfg_if! {
@__items
() ;
$( ( ($($meta),*) ($($it)*) ), )*
( () ($($it2)*) ),
}
};
(
if #[cfg($($i_met:meta),*)] { $($i_it:item)* }
$(
else if #[cfg($($e_met:meta),*)] { $($e_it:item)* }
)*
) => {
cfg_if! {
@__items
() ;
( ($($i_met),*) ($($i_it)*) ),
$( ( ($($e_met),*) ($($e_it)*) ), )*
( () () ),
}
};
(@__items ($($not:meta,)*) ; ) => {};
(@__items ($($not:meta,)*) ; ( ($($m:meta),*) ($($it:item)*) ),
$($rest:tt)*) => {
cfg_if! { @__apply cfg(all($($m,)* not(any($($not),*)))), $($it)* }
cfg_if! { @__items ($($not,)* $($m,)*) ; $($rest)* }
};
(@__apply $m:meta, $($it:item)*) => {
$(#[$m] $it)*
};
}
#[macro_use]
cfg_if! {
if #[cfg(windows)] {
extern "C" {fn dllmain();}
#[cfg_attr(target_os = "windows", link_section = ".CRT$XCU")]
pub static init: extern "C" fn() = {
extern "C" fn initer() {
unsafe{dllmain()};
} initer
};
} else{
pub fn init(){}
}
}