File tree Expand file tree Collapse file tree 3 files changed +237
-97
lines changed Expand file tree Collapse file tree 3 files changed +237
-97
lines changed Original file line number Diff line number Diff line change @@ -3307,6 +3307,20 @@ fn test_neutrino(target: &str) {
33073307 assert ! ( target. contains( "nto-qnx" ) ) ;
33083308
33093309 let mut cfg = ctest_cfg ( ) ;
3310+ if target. ends_with ( "_iosock" ) {
3311+ let qnx_target_val = std:: env:: var ( "QNX_TARGET" )
3312+ . unwrap_or_else ( |_| "QNX_TARGET_not_set_please_source_qnxsdp" . into ( ) ) ;
3313+
3314+ cfg. include ( qnx_target_val + "/usr/include/io-sock" ) ;
3315+ headers ! { cfg:
3316+ "io-sock.h" ,
3317+ "sys/types.h" ,
3318+ "sys/socket.h" ,
3319+ "sys/sysctl.h" ,
3320+ "net/if.h" ,
3321+ "net/if_arp.h"
3322+ }
3323+ }
33103324
33113325 headers ! { cfg:
33123326 "ctype.h" ,
@@ -3464,6 +3478,9 @@ fn test_neutrino(target: &str) {
34643478 // Does not exist in Neutrino
34653479 "locale_t" => true ,
34663480
3481+ // FIXME: "'__uint128' undeclared" in C
3482+ "__uint128" => true ,
3483+
34673484 _ => false ,
34683485 }
34693486 } ) ;
@@ -3527,6 +3544,9 @@ fn test_neutrino(target: &str) {
35273544 // stack unwinding bug.
35283545 "__my_thread_exit" => true ,
35293546
3547+ // Wrong const-ness
3548+ "dl_iterate_phdr" => true ,
3549+
35303550 _ => false ,
35313551 }
35323552 } ) ;
Original file line number Diff line number Diff line change @@ -334,7 +334,13 @@ pub const ATF_PERM: c_int = 0x04;
334334pub const ATF_PUBL : c_int = 0x08 ;
335335pub const ATF_USETRAILERS : c_int = 0x10 ;
336336
337- pub const FNM_PERIOD : c_int = 1 << 2 ;
337+ cfg_if ! {
338+ if #[ cfg( target_os = "nto" ) ] {
339+ pub const FNM_PERIOD : c_int = 1 << 1 ;
340+ } else {
341+ pub const FNM_PERIOD : c_int = 1 << 2 ;
342+ }
343+ }
338344pub const FNM_NOMATCH : c_int = 1 ;
339345
340346cfg_if ! {
@@ -354,9 +360,22 @@ cfg_if! {
354360 target_os = "cygwin" ,
355361 ) ) ] {
356362 pub const FNM_PATHNAME : c_int = 1 << 1 ;
357- pub const FNM_NOESCAPE : c_int = 1 << 0 ;
358363 } else {
359364 pub const FNM_PATHNAME : c_int = 1 << 0 ;
365+ }
366+ }
367+
368+ cfg_if ! {
369+ if #[ cfg( any(
370+ target_os = "macos" ,
371+ target_os = "freebsd" ,
372+ target_os = "android" ,
373+ target_os = "openbsd" ,
374+ ) ) ] {
375+ pub const FNM_NOESCAPE : c_int = 1 << 0 ;
376+ } else if #[ cfg( target_os = "nto" ) ] {
377+ pub const FNM_NOESCAPE : c_int = 1 << 2 ;
378+ } else {
360379 pub const FNM_NOESCAPE : c_int = 1 << 1 ;
361380 }
362381}
You can’t perform that action at this time.
0 commit comments