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) {
205205 "errno.h" ,
206206 "execinfo.h" ,
207207 "fcntl.h" ,
208+ "fnmatch.h" ,
208209 "getopt.h" ,
209210 "glob.h" ,
210211 "grp.h" ,
@@ -482,6 +483,7 @@ fn test_openbsd(target: &str) {
482483 "errno.h" ,
483484 "execinfo.h" ,
484485 "fcntl.h" ,
486+ "fnmatch.h" ,
485487 "getopt.h" ,
486488 "libgen.h" ,
487489 "limits.h" ,
@@ -793,6 +795,7 @@ fn test_redox(target: &str) {
793795 "dlfcn.h" ,
794796 "errno.h" ,
795797 "fcntl.h" ,
798+ "fnmatch.h" ,
796799 "grp.h" ,
797800 "limits.h" ,
798801 "locale.h" ,
@@ -852,6 +855,7 @@ fn test_solarish(target: &str) {
852855 "errno.h" ,
853856 "execinfo.h" ,
854857 "fcntl.h" ,
858+ "fnmatch.h" ,
855859 "getopt.h" ,
856860 "glob.h" ,
857861 "grp.h" ,
@@ -1092,6 +1096,7 @@ fn test_netbsd(target: &str) {
10921096 "elf.h" ,
10931097 "errno.h" ,
10941098 "fcntl.h" ,
1099+ "fnmatch.h" ,
10951100 "getopt.h" ,
10961101 "libgen.h" ,
10971102 "limits.h" ,
@@ -1308,6 +1313,7 @@ fn test_dragonflybsd(target: &str) {
13081313 "errno.h" ,
13091314 "execinfo.h" ,
13101315 "fcntl.h" ,
1316+ "fnmatch.h" ,
13111317 "getopt.h" ,
13121318 "glob.h" ,
13131319 "grp.h" ,
@@ -1531,6 +1537,7 @@ fn test_wasi(target: &str) {
15311537 "dirent.h" ,
15321538 "errno.h" ,
15331539 "fcntl.h" ,
1540+ "fnmatch.h" ,
15341541 "langinfo.h" ,
15351542 "limits.h" ,
15361543 "locale.h" ,
@@ -1646,6 +1653,7 @@ fn test_android(target: &str) {
16461653 "elf.h" ,
16471654 "errno.h" ,
16481655 "fcntl.h" ,
1656+ "fnmatch.h" ,
16491657 "getopt.h" ,
16501658 "grp.h" ,
16511659 "ifaddrs.h" ,
@@ -2145,6 +2153,7 @@ fn test_freebsd(target: &str) {
21452153 "errno.h" ,
21462154 "execinfo.h" ,
21472155 "fcntl.h" ,
2156+ "fnmatch.h" ,
21482157 "getopt.h" ,
21492158 "glob.h" ,
21502159 "grp.h" ,
@@ -2762,6 +2771,7 @@ fn test_emscripten(target: &str) {
27622771 "dlfcn.h" ,
27632772 "errno.h" ,
27642773 "fcntl.h" ,
2774+ "fnmatch.h" ,
27652775 "glob.h" ,
27662776 "grp.h" ,
27672777 "ifaddrs.h" ,
@@ -3030,6 +3040,7 @@ fn test_neutrino(target: &str) {
30303040 "dlfcn.h" ,
30313041 "sys/elf.h" ,
30323042 "fcntl.h" ,
3043+ "fnmatch.h" ,
30333044 "glob.h" ,
30343045 "grp.h" ,
30353046 "iconv.h" ,
@@ -3427,6 +3438,7 @@ fn test_linux(target: &str) {
34273438 "dlfcn.h" ,
34283439 "elf.h" ,
34293440 "fcntl.h" ,
3441+ "fnmatch.h" ,
34303442 "getopt.h" ,
34313443 "glob.h" ,
34323444 [ gnu] : "gnu/libc-version.h" ,
Original file line number Diff line number Diff line change @@ -132,6 +132,11 @@ FD_ZERO
132132FILE
133133FIOCLEX
134134FIONBIO
135+ FNM_CASEFOLD
136+ FNM_NOESCAPE
137+ FNM_NOMATCH
138+ FNM_PATHNAME
139+ FNM_PERIOD
135140F_DUPFD
136141F_DUPFD_CLOEXEC
137142F_GETFD
@@ -525,6 +530,7 @@ fgetpos
525530fgets
526531fileno
527532flock
533+ fnmatch
528534fopen
529535fork
530536fpathconf
Original file line number Diff line number Diff line change @@ -313,6 +313,24 @@ pub const ATF_PERM: ::c_int = 0x04;
313313pub const ATF_PUBL : :: c_int = 0x08 ;
314314pub const ATF_USETRAILERS : :: c_int = 0x10 ;
315315
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+
316334extern "C" {
317335 pub static in6addr_loopback: in6_addr ;
318336 pub static in6addr_any: in6_addr ;
@@ -1580,6 +1598,10 @@ cfg_if! {
15801598 }
15811599}
15821600
1601+ extern "C" {
1602+ pub fn fnmatch ( pattern : * const c_char , name : * const c_char , flags : c_int ) -> c_int ;
1603+ }
1604+
15831605cfg_if ! {
15841606 if #[ cfg( target_env = "newlib" ) ] {
15851607 mod newlib;
You can’t perform that action at this time.
0 commit comments