File tree 2 files changed +31
-0
lines changed
2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -191,6 +191,7 @@ fn test_apple(target: &str) {
191
191
"errno.h" ,
192
192
"execinfo.h" ,
193
193
"fcntl.h" ,
194
+ "fnmatch.h" ,
194
195
"getopt.h" ,
195
196
"glob.h" ,
196
197
"grp.h" ,
@@ -454,6 +455,7 @@ fn test_openbsd(target: &str) {
454
455
"errno.h" ,
455
456
"execinfo.h" ,
456
457
"fcntl.h" ,
458
+ "fnmatch.h" ,
457
459
"getopt.h" ,
458
460
"libgen.h" ,
459
461
"limits.h" ,
@@ -731,6 +733,7 @@ fn test_redox(target: &str) {
731
733
"dlfcn.h" ,
732
734
"errno.h" ,
733
735
"fcntl.h" ,
736
+ "fnmatch.h" ,
734
737
"grp.h" ,
735
738
"limits.h" ,
736
739
"locale.h" ,
@@ -790,6 +793,7 @@ fn test_solarish(target: &str) {
790
793
"errno.h" ,
791
794
"execinfo.h" ,
792
795
"fcntl.h" ,
796
+ "fnmatch.h" ,
793
797
"getopt.h" ,
794
798
"glob.h" ,
795
799
"grp.h" ,
@@ -1030,6 +1034,7 @@ fn test_netbsd(target: &str) {
1030
1034
"elf.h" ,
1031
1035
"errno.h" ,
1032
1036
"fcntl.h" ,
1037
+ "fnmatch.h" ,
1033
1038
"getopt.h" ,
1034
1039
"libgen.h" ,
1035
1040
"limits.h" ,
@@ -1244,6 +1249,7 @@ fn test_dragonflybsd(target: &str) {
1244
1249
"errno.h" ,
1245
1250
"execinfo.h" ,
1246
1251
"fcntl.h" ,
1252
+ "fnmatch.h" ,
1247
1253
"getopt.h" ,
1248
1254
"glob.h" ,
1249
1255
"grp.h" ,
@@ -1464,6 +1470,7 @@ fn test_wasi(target: &str) {
1464
1470
"dirent.h" ,
1465
1471
"errno.h" ,
1466
1472
"fcntl.h" ,
1473
+ "fnmatch.h" ,
1467
1474
"langinfo.h" ,
1468
1475
"limits.h" ,
1469
1476
"locale.h" ,
@@ -1579,6 +1586,7 @@ fn test_android(target: &str) {
1579
1586
"elf.h" ,
1580
1587
"errno.h" ,
1581
1588
"fcntl.h" ,
1589
+ "fnmatch.h" ,
1582
1590
"getopt.h" ,
1583
1591
"grp.h" ,
1584
1592
"ifaddrs.h" ,
@@ -2087,6 +2095,7 @@ fn test_freebsd(target: &str) {
2087
2095
"errno.h" ,
2088
2096
"execinfo.h" ,
2089
2097
"fcntl.h" ,
2098
+ "fnmatch.h" ,
2090
2099
"getopt.h" ,
2091
2100
"glob.h" ,
2092
2101
"grp.h" ,
@@ -2706,6 +2715,7 @@ fn test_emscripten(target: &str) {
2706
2715
"dlfcn.h" ,
2707
2716
"errno.h" ,
2708
2717
"fcntl.h" ,
2718
+ "fnmatch.h" ,
2709
2719
"glob.h" ,
2710
2720
"grp.h" ,
2711
2721
"ifaddrs.h" ,
@@ -2974,6 +2984,7 @@ fn test_neutrino(target: &str) {
2974
2984
"dlfcn.h" ,
2975
2985
"sys/elf.h" ,
2976
2986
"fcntl.h" ,
2987
+ "fnmatch.h" ,
2977
2988
"glob.h" ,
2978
2989
"grp.h" ,
2979
2990
"iconv.h" ,
@@ -3368,6 +3379,7 @@ fn test_linux(target: &str) {
3368
3379
"dlfcn.h" ,
3369
3380
"elf.h" ,
3370
3381
"fcntl.h" ,
3382
+ "fnmatch.h" ,
3371
3383
"getopt.h" ,
3372
3384
"glob.h" ,
3373
3385
[ gnu] : "gnu/libc-version.h" ,
Original file line number Diff line number Diff line change @@ -320,6 +320,21 @@ pub const ATF_PERM: ::c_int = 0x04;
320
320
pub const ATF_PUBL : :: c_int = 0x08 ;
321
321
pub const ATF_USETRAILERS : :: c_int = 0x10 ;
322
322
323
+ pub const FNM_PERIOD : c_int = 1 << 2 ;
324
+ pub const FNM_CASEFOLD : c_int = 1 << 4 ;
325
+ pub const FNM_NOMATCH : c_int = 1 ;
326
+
327
+ cfg_if ! {
328
+ if #[ cfg( any( target_os = "macos" ) ) ] {
329
+ pub const FNM_PATHNAME : c_int = 1 << 1 ;
330
+ pub const FNM_NOESCAPE : c_int = 1 << 0 ;
331
+
332
+ } else {
333
+ pub const FNM_PATHNAME : c_int = 1 << 0 ;
334
+ pub const FNM_NOESCAPE : c_int = 1 << 1 ;
335
+ }
336
+ }
337
+
323
338
extern "C" {
324
339
pub static in6addr_loopback: in6_addr ;
325
340
pub static in6addr_any: in6_addr ;
@@ -1570,6 +1585,10 @@ cfg_if! {
1570
1585
}
1571
1586
}
1572
1587
1588
+ extern "C" {
1589
+ pub fn fnmatch ( pattern : * const c_char , name : * const c_char , flags : c_int ) -> c_int ;
1590
+ }
1591
+
1573
1592
cfg_if ! {
1574
1593
if #[ cfg( target_env = "newlib" ) ] {
1575
1594
mod newlib;
You can’t perform that action at this time.
0 commit comments