@@ -104,6 +104,7 @@ pub use libc::funcs::posix88::unistd::*;
104
104
105
105
pub use libc:: funcs:: posix01:: stat_:: * ;
106
106
pub use libc:: funcs:: posix01:: unistd:: * ;
107
+ pub use libc:: funcs:: posix01:: glob:: * ;
107
108
pub use libc:: funcs:: posix08:: unistd:: * ;
108
109
109
110
pub use libc:: funcs:: bsd44:: * ;
@@ -210,7 +211,21 @@ pub mod types {
210
211
#[ cfg( target_os = "android" ) ]
211
212
pub mod os {
212
213
pub mod common {
213
- pub mod posix01 { }
214
+ pub mod posix01 {
215
+ use libc:: types:: common:: c95:: { c_void} ;
216
+ use libc:: types:: os:: arch:: c95:: { c_char, size_t} ;
217
+ pub struct glob_t {
218
+ gl_pathc : size_t ,
219
+ gl_pathv : * * c_char ,
220
+ gl_offs : size_t ,
221
+
222
+ __unused1 : * c_void ,
223
+ __unused2 : * c_void ,
224
+ __unused3 : * c_void ,
225
+ __unused4 : * c_void ,
226
+ __unused5 : * c_void ,
227
+ }
228
+ }
214
229
}
215
230
216
231
#[ cfg( target_arch = "x86" ) ]
@@ -369,7 +384,25 @@ pub mod types {
369
384
#[ cfg( target_os = "freebsd" ) ]
370
385
pub mod os {
371
386
pub mod common {
372
- pub mod posix01 { }
387
+ pub mod posix01 {
388
+ use libc:: types:: common:: c95:: { c_void} ;
389
+ use libc:: types:: os:: arch:: c95:: { c_char, c_int, size_t} ;
390
+ pub struct glob_t {
391
+ gl_pathc : size_t ,
392
+ __unused1 : size_t ,
393
+ gl_offs : size_t ,
394
+ __unused2 : c_int ,
395
+ gl_pathv : * * c_char ,
396
+
397
+ __unused3 : * c_void ,
398
+
399
+ __unused4 : * c_void ,
400
+ __unused5 : * c_void ,
401
+ __unused6 : * c_void ,
402
+ __unused7 : * c_void ,
403
+ __unused8 : * c_void ,
404
+ }
405
+ }
373
406
}
374
407
375
408
#[ cfg( target_arch = "x86_64" ) ]
@@ -571,6 +604,23 @@ pub mod types {
571
604
pub mod os {
572
605
pub mod common {
573
606
pub mod posix01 {
607
+ use libc:: types:: common:: c95:: { c_void} ;
608
+ use libc:: types:: os:: arch:: c95:: { c_char, c_int, size_t} ;
609
+ pub struct glob_t {
610
+ gl_pathc : size_t ,
611
+ __unused1 : c_int ,
612
+ gl_offs : size_t ,
613
+ __unused2 : c_int ,
614
+ gl_pathv : * * c_char ,
615
+
616
+ __unused3 : * c_void ,
617
+
618
+ __unused4 : * c_void ,
619
+ __unused5 : * c_void ,
620
+ __unused6 : * c_void ,
621
+ __unused7 : * c_void ,
622
+ __unused8 : * c_void ,
623
+ }
574
624
}
575
625
}
576
626
@@ -877,6 +927,18 @@ pub mod consts {
877
927
}
878
928
pub mod posix01 {
879
929
pub static SIGTRAP : int = 5 ;
930
+
931
+ pub static GLOB_ERR : int = 1 << 0 ;
932
+ pub static GLOB_MARK : int = 1 << 1 ;
933
+ pub static GLOB_NOSORT : int = 1 << 2 ;
934
+ pub static GLOB_DOOFFS : int = 1 << 3 ;
935
+ pub static GLOB_NOCHECK : int = 1 << 4 ;
936
+ pub static GLOB_APPEND : int = 1 << 5 ;
937
+ pub static GLOB_NOESCAPE : int = 1 << 6 ;
938
+
939
+ pub static GLOB_NOSPACE : int = 1 ;
940
+ pub static GLOB_ABORTED : int = 2 ;
941
+ pub static GLOB_NOMATCH : int = 3 ;
880
942
}
881
943
pub mod posix08 {
882
944
}
@@ -956,6 +1018,18 @@ pub mod consts {
956
1018
}
957
1019
pub mod posix01 {
958
1020
pub static SIGTRAP : int = 5 ;
1021
+
1022
+ pub static GLOB_APPEND : int = 0x0001 ;
1023
+ pub static GLOB_DOOFFS : int = 0x0002 ;
1024
+ pub static GLOB_ERR : int = 0x0004 ;
1025
+ pub static GLOB_MARK : int = 0x0008 ;
1026
+ pub static GLOB_NOCHECK : int = 0x0010 ;
1027
+ pub static GLOB_NOSORT : int = 0x0020 ;
1028
+ pub static GLOB_NOESCAPE : int = 0x2000 ;
1029
+
1030
+ pub static GLOB_NOSPACE : int = -1 ;
1031
+ pub static GLOB_ABORTED : int = -2 ;
1032
+ pub static GLOB_NOMATCH : int = -3 ;
959
1033
}
960
1034
pub mod posix08 {
961
1035
}
@@ -1036,6 +1110,18 @@ pub mod consts {
1036
1110
}
1037
1111
pub mod posix01 {
1038
1112
pub static SIGTRAP : int = 5 ;
1113
+
1114
+ pub static GLOB_APPEND : int = 0x0001 ;
1115
+ pub static GLOB_DOOFFS : int = 0x0002 ;
1116
+ pub static GLOB_ERR : int = 0x0004 ;
1117
+ pub static GLOB_MARK : int = 0x0008 ;
1118
+ pub static GLOB_NOCHECK : int = 0x0010 ;
1119
+ pub static GLOB_NOSORT : int = 0x0020 ;
1120
+ pub static GLOB_NOESCAPE : int = 0x2000 ;
1121
+
1122
+ pub static GLOB_NOSPACE : int = -1 ;
1123
+ pub static GLOB_ABORTED : int = -2 ;
1124
+ pub static GLOB_NOMATCH : int = -3 ;
1039
1125
}
1040
1126
pub mod posix08 {
1041
1127
}
@@ -1606,6 +1692,21 @@ pub mod funcs {
1606
1692
-> pid_t ;
1607
1693
}
1608
1694
}
1695
+
1696
+ #[ nolink]
1697
+ #[ abi = "cdecl" ]
1698
+ pub mod glob {
1699
+ use libc:: types:: common:: c95:: { c_void} ;
1700
+ use libc:: types:: os:: arch:: c95:: { c_char, c_int} ;
1701
+ use libc:: types:: os:: common:: posix01:: { glob_t} ;
1702
+
1703
+ pub extern {
1704
+ unsafe fn glob ( pattern : * c_char , flags : c_int ,
1705
+ errfunc : * c_void , // XXX callback
1706
+ pglob : * mut glob_t ) ;
1707
+ unsafe fn globfree ( pglob : * mut glob_t ) ;
1708
+ }
1709
+ }
1609
1710
}
1610
1711
1611
1712
#[ cfg( target_os = "win32" ) ]
@@ -1615,6 +1716,9 @@ pub mod funcs {
1615
1716
1616
1717
pub mod unistd {
1617
1718
}
1719
+
1720
+ pub mod glob {
1721
+ }
1618
1722
}
1619
1723
1620
1724
0 commit comments