File tree Expand file tree Collapse file tree 3 files changed +173
-263
lines changed Expand file tree Collapse file tree 3 files changed +173
-263
lines changed Original file line number Diff line number Diff line change @@ -3032,7 +3032,10 @@ fn test_neutrino(target: &str) {
3032
3032
3033
3033
let mut cfg = ctest_cfg ( ) ;
3034
3034
if target. ends_with ( "_iosock" ) {
3035
- cfg. include ( concat ! ( env!( "QNX_TARGET" ) , "/usr/include/io-sock" ) ) ;
3035
+ let qnx_target_val = std:: env:: var ( "QNX_TARGET" )
3036
+ . unwrap_or_else ( |_| "QNX_TARGET_not_set_please_source_qnxsdp" . into ( ) ) ;
3037
+
3038
+ cfg. include ( qnx_target_val + "/usr/include/io-sock" ) ;
3036
3039
headers ! { cfg:
3037
3040
"io-sock.h" ,
3038
3041
"sys/types.h" ,
Original file line number Diff line number Diff line change @@ -336,8 +336,8 @@ pub const ATF_USETRAILERS: c_int = 0x10;
336
336
337
337
cfg_if ! {
338
338
if #[ cfg( target_os = "nto" ) ] {
339
- pub const FNM_PERIOD : c_int = 1 << 1 ; }
340
- else {
339
+ pub const FNM_PERIOD : c_int = 1 << 1 ;
340
+ } else {
341
341
pub const FNM_PERIOD : c_int = 1 << 2 ;
342
342
}
343
343
}
@@ -359,12 +359,22 @@ cfg_if! {
359
359
target_os = "openbsd" ,
360
360
) ) ] {
361
361
pub const FNM_PATHNAME : c_int = 1 << 1 ;
362
- pub const FNM_NOESCAPE : c_int = 1 << 0 ;
363
362
} else {
364
363
pub const FNM_PATHNAME : c_int = 1 << 0 ;
365
- #[ cfg( target_os = "nto" ) ]
364
+ }
365
+ }
366
+
367
+ cfg_if ! {
368
+ if #[ cfg( any(
369
+ target_os = "macos" ,
370
+ target_os = "freebsd" ,
371
+ target_os = "android" ,
372
+ target_os = "openbsd" ,
373
+ ) ) ] {
374
+ pub const FNM_NOESCAPE : c_int = 1 << 0 ;
375
+ } else if #[ cfg( target_os = "nto" ) ] {
366
376
pub const FNM_NOESCAPE : c_int = 1 << 2 ;
367
- # [ cfg ( not ( target_os = "nto" ) ) ]
377
+ } else {
368
378
pub const FNM_NOESCAPE : c_int = 1 << 1 ;
369
379
}
370
380
}
You can’t perform that action at this time.
0 commit comments