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) {
191191 "errno.h" ,
192192 "execinfo.h" ,
193193 "fcntl.h" ,
194+ "fnmatch.h" ,
194195 "getopt.h" ,
195196 "glob.h" ,
196197 "grp.h" ,
@@ -454,6 +455,7 @@ fn test_openbsd(target: &str) {
454455 "errno.h" ,
455456 "execinfo.h" ,
456457 "fcntl.h" ,
458+ "fnmatch.h" ,
457459 "getopt.h" ,
458460 "libgen.h" ,
459461 "limits.h" ,
@@ -731,6 +733,7 @@ fn test_redox(target: &str) {
731733 "dlfcn.h" ,
732734 "errno.h" ,
733735 "fcntl.h" ,
736+ "fnmatch.h" ,
734737 "grp.h" ,
735738 "limits.h" ,
736739 "locale.h" ,
@@ -790,6 +793,7 @@ fn test_solarish(target: &str) {
790793 "errno.h" ,
791794 "execinfo.h" ,
792795 "fcntl.h" ,
796+ "fnmatch.h" ,
793797 "getopt.h" ,
794798 "glob.h" ,
795799 "grp.h" ,
@@ -1030,6 +1034,7 @@ fn test_netbsd(target: &str) {
10301034 "elf.h" ,
10311035 "errno.h" ,
10321036 "fcntl.h" ,
1037+ "fnmatch.h" ,
10331038 "getopt.h" ,
10341039 "libgen.h" ,
10351040 "limits.h" ,
@@ -1244,6 +1249,7 @@ fn test_dragonflybsd(target: &str) {
12441249 "errno.h" ,
12451250 "execinfo.h" ,
12461251 "fcntl.h" ,
1252+ "fnmatch.h" ,
12471253 "getopt.h" ,
12481254 "glob.h" ,
12491255 "grp.h" ,
@@ -1464,6 +1470,7 @@ fn test_wasi(target: &str) {
14641470 "dirent.h" ,
14651471 "errno.h" ,
14661472 "fcntl.h" ,
1473+ "fnmatch.h" ,
14671474 "langinfo.h" ,
14681475 "limits.h" ,
14691476 "locale.h" ,
@@ -1579,6 +1586,7 @@ fn test_android(target: &str) {
15791586 "elf.h" ,
15801587 "errno.h" ,
15811588 "fcntl.h" ,
1589+ "fnmatch.h" ,
15821590 "getopt.h" ,
15831591 "grp.h" ,
15841592 "ifaddrs.h" ,
@@ -2087,6 +2095,7 @@ fn test_freebsd(target: &str) {
20872095 "errno.h" ,
20882096 "execinfo.h" ,
20892097 "fcntl.h" ,
2098+ "fnmatch.h" ,
20902099 "getopt.h" ,
20912100 "glob.h" ,
20922101 "grp.h" ,
@@ -2709,6 +2718,7 @@ fn test_emscripten(target: &str) {
27092718 "dlfcn.h" ,
27102719 "errno.h" ,
27112720 "fcntl.h" ,
2721+ "fnmatch.h" ,
27122722 "glob.h" ,
27132723 "grp.h" ,
27142724 "ifaddrs.h" ,
@@ -2977,6 +2987,7 @@ fn test_neutrino(target: &str) {
29772987 "dlfcn.h" ,
29782988 "sys/elf.h" ,
29792989 "fcntl.h" ,
2990+ "fnmatch.h" ,
29802991 "glob.h" ,
29812992 "grp.h" ,
29822993 "iconv.h" ,
@@ -3371,6 +3382,7 @@ fn test_linux(target: &str) {
33713382 "dlfcn.h" ,
33723383 "elf.h" ,
33733384 "fcntl.h" ,
3385+ "fnmatch.h" ,
33743386 "getopt.h" ,
33753387 "glob.h" ,
33763388 [ 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
@@ -526,6 +531,7 @@ fgetpos
526531fgets
527532fileno
528533flock
534+ fnmatch
529535fopen
530536fork
531537fpathconf
Original file line number Diff line number Diff line change @@ -320,6 +320,24 @@ pub const ATF_PERM: ::c_int = 0x04;
320320pub const ATF_PUBL : :: c_int = 0x08 ;
321321pub const ATF_USETRAILERS : :: c_int = 0x10 ;
322322
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+
323341extern "C" {
324342 pub static in6addr_loopback: in6_addr ;
325343 pub static in6addr_any: in6_addr ;
@@ -1573,6 +1591,10 @@ cfg_if! {
15731591 }
15741592}
15751593
1594+ extern "C" {
1595+ pub fn fnmatch ( pattern : * const c_char , name : * const c_char , flags : c_int ) -> c_int ;
1596+ }
1597+
15761598cfg_if ! {
15771599 if #[ cfg( target_env = "newlib" ) ] {
15781600 mod newlib;
You can’t perform that action at this time.
0 commit comments