File tree 1 file changed +17
-0
lines changed
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,14 @@ use libloading::Library;
8
8
9
9
static mut GCC_S : Option < Library > = None ;
10
10
11
+ #[ cfg( not( windows) ) ]
11
12
fn gcc_s ( ) -> & ' static Library {
13
+ #[ cfg( not( target_os = "macos" ) ) ]
14
+ const LIBGCC_S : & ' static = "libgcc_s.so.1" ;
15
+
16
+ #[ cfg( target_os = "macos" ) ]
17
+ const LIBGCC_S : & ' static = "libgcc_s.1.dylib" ;
18
+
12
19
unsafe {
13
20
static INIT : Once = ONCE_INIT ;
14
21
@@ -19,6 +26,16 @@ fn gcc_s() -> &'static Library {
19
26
}
20
27
}
21
28
29
+ #[ cfg( windows) ]
30
+ macro_rules! declare {
31
+ ( $symbol: ident: fn ( $( $i: ty) ,+) -> $o: ty) => {
32
+ pub fn $symbol( ) -> Option <unsafe extern fn ( $( $i) ,+) -> $o> {
33
+ None
34
+ }
35
+ }
36
+ }
37
+
38
+ #[ cfg( not( windows) ) ]
22
39
macro_rules! declare {
23
40
( $symbol: ident: fn ( $( $i: ty) ,+) -> $o: ty) => {
24
41
pub fn $symbol( ) -> Option <unsafe extern fn ( $( $i) ,+) -> $o> {
You can’t perform that action at this time.
0 commit comments