File tree Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Expand file tree Collapse file tree 3 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -205,6 +205,7 @@ fn test_apple(target: &str) {
205
205
"errno.h" ,
206
206
"execinfo.h" ,
207
207
"fcntl.h" ,
208
+ "fnmatch.h" ,
208
209
"getopt.h" ,
209
210
"glob.h" ,
210
211
"grp.h" ,
@@ -482,6 +483,7 @@ fn test_openbsd(target: &str) {
482
483
"errno.h" ,
483
484
"execinfo.h" ,
484
485
"fcntl.h" ,
486
+ "fnmatch.h" ,
485
487
"getopt.h" ,
486
488
"libgen.h" ,
487
489
"limits.h" ,
@@ -793,6 +795,7 @@ fn test_redox(target: &str) {
793
795
"dlfcn.h" ,
794
796
"errno.h" ,
795
797
"fcntl.h" ,
798
+ "fnmatch.h" ,
796
799
"grp.h" ,
797
800
"limits.h" ,
798
801
"locale.h" ,
@@ -852,6 +855,7 @@ fn test_solarish(target: &str) {
852
855
"errno.h" ,
853
856
"execinfo.h" ,
854
857
"fcntl.h" ,
858
+ "fnmatch.h" ,
855
859
"getopt.h" ,
856
860
"glob.h" ,
857
861
"grp.h" ,
@@ -1092,6 +1096,7 @@ fn test_netbsd(target: &str) {
1092
1096
"elf.h" ,
1093
1097
"errno.h" ,
1094
1098
"fcntl.h" ,
1099
+ "fnmatch.h" ,
1095
1100
"getopt.h" ,
1096
1101
"libgen.h" ,
1097
1102
"limits.h" ,
@@ -1308,6 +1313,7 @@ fn test_dragonflybsd(target: &str) {
1308
1313
"errno.h" ,
1309
1314
"execinfo.h" ,
1310
1315
"fcntl.h" ,
1316
+ "fnmatch.h" ,
1311
1317
"getopt.h" ,
1312
1318
"glob.h" ,
1313
1319
"grp.h" ,
@@ -1531,6 +1537,7 @@ fn test_wasi(target: &str) {
1531
1537
"dirent.h" ,
1532
1538
"errno.h" ,
1533
1539
"fcntl.h" ,
1540
+ "fnmatch.h" ,
1534
1541
"langinfo.h" ,
1535
1542
"limits.h" ,
1536
1543
"locale.h" ,
@@ -1646,6 +1653,7 @@ fn test_android(target: &str) {
1646
1653
"elf.h" ,
1647
1654
"errno.h" ,
1648
1655
"fcntl.h" ,
1656
+ "fnmatch.h" ,
1649
1657
"getopt.h" ,
1650
1658
"grp.h" ,
1651
1659
"ifaddrs.h" ,
@@ -2145,6 +2153,7 @@ fn test_freebsd(target: &str) {
2145
2153
"errno.h" ,
2146
2154
"execinfo.h" ,
2147
2155
"fcntl.h" ,
2156
+ "fnmatch.h" ,
2148
2157
"getopt.h" ,
2149
2158
"glob.h" ,
2150
2159
"grp.h" ,
@@ -2762,6 +2771,7 @@ fn test_emscripten(target: &str) {
2762
2771
"dlfcn.h" ,
2763
2772
"errno.h" ,
2764
2773
"fcntl.h" ,
2774
+ "fnmatch.h" ,
2765
2775
"glob.h" ,
2766
2776
"grp.h" ,
2767
2777
"ifaddrs.h" ,
@@ -3030,6 +3040,7 @@ fn test_neutrino(target: &str) {
3030
3040
"dlfcn.h" ,
3031
3041
"sys/elf.h" ,
3032
3042
"fcntl.h" ,
3043
+ "fnmatch.h" ,
3033
3044
"glob.h" ,
3034
3045
"grp.h" ,
3035
3046
"iconv.h" ,
@@ -3427,6 +3438,7 @@ fn test_linux(target: &str) {
3427
3438
"dlfcn.h" ,
3428
3439
"elf.h" ,
3429
3440
"fcntl.h" ,
3441
+ "fnmatch.h" ,
3430
3442
"getopt.h" ,
3431
3443
"glob.h" ,
3432
3444
[ gnu] : "gnu/libc-version.h" ,
Original file line number Diff line number Diff line change @@ -132,6 +132,11 @@ FD_ZERO
132
132
FILE
133
133
FIOCLEX
134
134
FIONBIO
135
+ FNM_CASEFOLD
136
+ FNM_NOESCAPE
137
+ FNM_NOMATCH
138
+ FNM_PATHNAME
139
+ FNM_PERIOD
135
140
F_DUPFD
136
141
F_DUPFD_CLOEXEC
137
142
F_GETFD
@@ -525,6 +530,7 @@ fgetpos
525
530
fgets
526
531
fileno
527
532
flock
533
+ fnmatch
528
534
fopen
529
535
fork
530
536
fpathconf
Original file line number Diff line number Diff line change @@ -313,6 +313,24 @@ pub const ATF_PERM: ::c_int = 0x04;
313
313
pub const ATF_PUBL : :: c_int = 0x08 ;
314
314
pub const ATF_USETRAILERS : :: c_int = 0x10 ;
315
315
316
+ pub const FNM_PERIOD : c_int = 1 << 2 ;
317
+ pub const FNM_CASEFOLD : c_int = 1 << 4 ;
318
+ pub const FNM_NOMATCH : c_int = 1 ;
319
+
320
+ cfg_if ! {
321
+ if #[ cfg( any(
322
+ target_os = "macos" ,
323
+ target_os = "freebsd" ,
324
+ target_os = "android" ,
325
+ ) ) ] {
326
+ pub const FNM_PATHNAME : c_int = 1 << 1 ;
327
+ pub const FNM_NOESCAPE : c_int = 1 << 0 ;
328
+ } else {
329
+ pub const FNM_PATHNAME : c_int = 1 << 0 ;
330
+ pub const FNM_NOESCAPE : c_int = 1 << 1 ;
331
+ }
332
+ }
333
+
316
334
extern "C" {
317
335
pub static in6addr_loopback: in6_addr ;
318
336
pub static in6addr_any: in6_addr ;
@@ -1580,6 +1598,10 @@ cfg_if! {
1580
1598
}
1581
1599
}
1582
1600
1601
+ extern "C" {
1602
+ pub fn fnmatch ( pattern : * const c_char , name : * const c_char , flags : c_int ) -> c_int ;
1603
+ }
1604
+
1583
1605
cfg_if ! {
1584
1606
if #[ cfg( target_env = "newlib" ) ] {
1585
1607
mod newlib;
You can’t perform that action at this time.
0 commit comments