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 @@ -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" ,
@@ -2709,6 +2718,7 @@ fn test_emscripten(target: &str) {
2709
2718
"dlfcn.h" ,
2710
2719
"errno.h" ,
2711
2720
"fcntl.h" ,
2721
+ "fnmatch.h" ,
2712
2722
"glob.h" ,
2713
2723
"grp.h" ,
2714
2724
"ifaddrs.h" ,
@@ -2977,6 +2987,7 @@ fn test_neutrino(target: &str) {
2977
2987
"dlfcn.h" ,
2978
2988
"sys/elf.h" ,
2979
2989
"fcntl.h" ,
2990
+ "fnmatch.h" ,
2980
2991
"glob.h" ,
2981
2992
"grp.h" ,
2982
2993
"iconv.h" ,
@@ -3371,6 +3382,7 @@ fn test_linux(target: &str) {
3371
3382
"dlfcn.h" ,
3372
3383
"elf.h" ,
3373
3384
"fcntl.h" ,
3385
+ "fnmatch.h" ,
3374
3386
"getopt.h" ,
3375
3387
"glob.h" ,
3376
3388
[ 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
@@ -526,6 +531,7 @@ fgetpos
526
531
fgets
527
532
fileno
528
533
flock
534
+ fnmatch
529
535
fopen
530
536
fork
531
537
fpathconf
Original file line number Diff line number Diff line change @@ -320,6 +320,24 @@ 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(
329
+ target_os = "macos" ,
330
+ target_os = "freebsd" ,
331
+ target_os = "android" ,
332
+ ) ) ] {
333
+ pub const FNM_PATHNAME : c_int = 1 << 1 ;
334
+ pub const FNM_NOESCAPE : c_int = 1 << 0 ;
335
+ } else {
336
+ pub const FNM_PATHNAME : c_int = 1 << 0 ;
337
+ pub const FNM_NOESCAPE : c_int = 1 << 1 ;
338
+ }
339
+ }
340
+
323
341
extern "C" {
324
342
pub static in6addr_loopback: in6_addr ;
325
343
pub static in6addr_any: in6_addr ;
@@ -1573,6 +1591,10 @@ cfg_if! {
1573
1591
}
1574
1592
}
1575
1593
1594
+ extern "C" {
1595
+ pub fn fnmatch ( pattern : * const c_char , name : * const c_char , flags : c_int ) -> c_int ;
1596
+ }
1597
+
1576
1598
cfg_if ! {
1577
1599
if #[ cfg( target_env = "newlib" ) ] {
1578
1600
mod newlib;
You can’t perform that action at this time.
0 commit comments