File tree 4 files changed +11
-2
lines changed 4 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ mod posix {
88
88
target_os = "redox" ,
89
89
target_os = "nto" ,
90
90
target_os = "hurd" ,
91
+ target_os = "cygwin" ,
91
92
) ) ] {
92
93
pub ( super ) const RTLD_LAZY : c_int = 1 ;
93
94
} else {
@@ -127,6 +128,7 @@ mod posix {
127
128
target_os = "redox" ,
128
129
target_os = "nto" ,
129
130
target_os = "hurd" ,
131
+ target_os = "cygwin" ,
130
132
) ) ] {
131
133
pub ( super ) const RTLD_NOW : c_int = 2 ;
132
134
} else if #[ cfg( all( target_os = "android" , target_pointer_width = "32" ) ) ] {
@@ -150,6 +152,7 @@ mod posix {
150
152
target_env = "uclibc" ,
151
153
all( target_os = "linux" , target_arch = "mips" ) ,
152
154
all( target_os = "linux" , target_arch = "mips64" ) ,
155
+ target_os = "cygwin" ,
153
156
) ) ] {
154
157
pub ( super ) const RTLD_GLOBAL : c_int = 4 ;
155
158
} else if #[ cfg( any(
@@ -224,6 +227,7 @@ mod posix {
224
227
target_os = "fuchsia" ,
225
228
target_os = "redox" ,
226
229
target_os = "hurd" ,
230
+ target_os = "cygwin" ,
227
231
) ) ] {
228
232
pub ( super ) const RTLD_LOCAL : c_int = 0 ;
229
233
} else {
Original file line number Diff line number Diff line change @@ -278,7 +278,8 @@ impl Library {
278
278
target_os = "solaris" ,
279
279
target_os = "illumos" ,
280
280
target_os = "redox" ,
281
- target_os = "fuchsia"
281
+ target_os = "fuchsia" ,
282
+ target_os = "cygwin" ,
282
283
) ) ] {
283
284
self . get_singlethreaded( symbol)
284
285
} else {
Original file line number Diff line number Diff line change @@ -191,6 +191,8 @@ fn test_static_ptr() {
191
191
// the target. Especially since it is very unlikely to be fixed given the state of support its
192
192
// support.
193
193
#[ cfg( not( all( target_arch = "x86" , target_os = "windows" , target_env = "gnu" ) ) ) ]
194
+ // Cygwin returns errors on `close`.
195
+ #[ cfg( not( target_os = "cygwin" ) ) ]
194
196
fn manual_close_many_times ( ) {
195
197
make_helpers ( ) ;
196
198
let join_handles: Vec < _ > = ( 0 ..16 )
@@ -224,6 +226,8 @@ fn library_this_get() {
224
226
. get:: <unsafe extern "C" fn ( ) >( b"test_identity_u32" )
225
227
. is_err( ) ) ;
226
228
// Something obscure from libc...
229
+ // Cygwin behaves like Windows so ignore it.
230
+ #[ cfg( not( target_os = "cygwin" ) ) ]
227
231
assert ! ( this. get:: <unsafe extern "C" fn ( ) >( b"freopen" ) . is_ok( ) ) ;
228
232
}
229
233
}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ extern crate libloading;
2
2
use libloading:: library_filename;
3
3
use std:: path:: Path ;
4
4
5
- #[ cfg( target_os = "windows" ) ]
5
+ #[ cfg( any ( target_os = "windows" , target_os = "cygwin" ) ) ]
6
6
const EXPECTED : & str = "audioengine.dll" ;
7
7
#[ cfg( target_os = "linux" ) ]
8
8
const EXPECTED : & str = "libaudioengine.so" ;
You can’t perform that action at this time.
0 commit comments