File tree Expand file tree Collapse file tree 13 files changed +89
-4
lines changed Expand file tree Collapse file tree 13 files changed +89
-4
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,7 @@ fn test_apple(target: &str) {
199199 "errno.h" ,
200200 "execinfo.h" ,
201201 "fcntl.h" ,
202+ "getopt.h" ,
202203 "glob.h" ,
203204 "grp.h" ,
204205 "iconv.h" ,
@@ -421,6 +422,7 @@ fn test_openbsd(target: &str) {
421422 "errno.h" ,
422423 "execinfo.h" ,
423424 "fcntl.h" ,
425+ "getopt.h" ,
424426 "libgen.h" ,
425427 "limits.h" ,
426428 "link.h" ,
@@ -769,6 +771,7 @@ fn test_solarish(target: &str) {
769771 "errno.h" ,
770772 "execinfo.h" ,
771773 "fcntl.h" ,
774+ "getopt.h" ,
772775 "glob.h" ,
773776 "grp.h" ,
774777 "ifaddrs.h" ,
@@ -997,6 +1000,7 @@ fn test_netbsd(target: &str) {
9971000 "elf.h" ,
9981001 "errno.h" ,
9991002 "fcntl.h" ,
1003+ "getopt.h" ,
10001004 "libgen.h" ,
10011005 "limits.h" ,
10021006 "link.h" ,
@@ -1208,6 +1212,7 @@ fn test_dragonflybsd(target: &str) {
12081212 "errno.h" ,
12091213 "execinfo.h" ,
12101214 "fcntl.h" ,
1215+ "getopt.h" ,
12111216 "glob.h" ,
12121217 "grp.h" ,
12131218 "ifaddrs.h" ,
@@ -1511,6 +1516,7 @@ fn test_android(target: &str) {
15111516 "elf.h" ,
15121517 "errno.h" ,
15131518 "fcntl.h" ,
1519+ "getopt.h" ,
15141520 "grp.h" ,
15151521 "ifaddrs.h" ,
15161522 "libgen.h" ,
@@ -1884,6 +1890,7 @@ fn test_freebsd(target: &str) {
18841890 "errno.h" ,
18851891 "execinfo.h" ,
18861892 "fcntl.h" ,
1893+ "getopt.h" ,
18871894 "glob.h" ,
18881895 "grp.h" ,
18891896 "iconv.h" ,
@@ -2803,6 +2810,7 @@ fn test_linux(target: &str) {
28032810 "dlfcn.h" ,
28042811 "elf.h" ,
28052812 "fcntl.h" ,
2813+ "getopt.h" ,
28062814 "glob.h" ,
28072815 [ gnu] : "gnu/libc-version.h" ,
28082816 "grp.h" ,
Original file line number Diff line number Diff line change @@ -3026,6 +3026,7 @@ getline
30263026getlogin
30273027getnameinfo
30283028getopt
3029+ getopt_long
30293030getpeername
30303031getpgid
30313032getpgrp
@@ -3594,4 +3595,4 @@ wmemchr
35943595write
35953596writev
35963597dirname
3597- basename
3598+ basename
Original file line number Diff line number Diff line change @@ -1895,6 +1895,7 @@ getline
18951895getloadavg
18961896getmntinfo
18971897getnameinfo
1898+ getopt_long
18981899getpeereid
18991900getpriority
19001901getprogname
@@ -2228,4 +2229,4 @@ waitid
22282229xsw_usage
22292230xucred
22302231dirname
2231- basename
2232+ basename
Original file line number Diff line number Diff line change @@ -1294,6 +1294,7 @@ getlastlogx
12941294getline
12951295getloadavg
12961296getnameinfo
1297+ getopt_long
12971298getpeereid
12981299getpriority
12991300getprogname
Original file line number Diff line number Diff line change @@ -1599,6 +1599,7 @@ getline
15991599getloadavg
16001600getlocalbase
16011601getnameinfo
1602+ getopt_long
16021603getpagesize
16031604getpagesizes
16041605getpeereid
Original file line number Diff line number Diff line change @@ -2967,6 +2967,7 @@ getifaddrs
29672967getline
29682968getmntent
29692969getnameinfo
2970+ getopt_long
29702971getpriority
29712972getpwent
29722973getresgid
Original file line number Diff line number Diff line change @@ -1254,6 +1254,7 @@ getlastlogx
12541254getline
12551255getloadavg
12561256getnameinfo
1257+ getopt_long
12571258getpeereid
12581259getpriority
12591260getprogname
Original file line number Diff line number Diff line change @@ -1040,6 +1040,7 @@ getline
10401040getloadavg
10411041getmntinfo
10421042getnameinfo
1043+ getopt_long
10431044getpeereid
10441045getpriority
10451046getprogname
@@ -1232,4 +1233,4 @@ utrace
12321233wait4
12331234xucred
12341235dirname
1235- basename
1236+ basename
Original file line number Diff line number Diff line change @@ -115,6 +115,13 @@ s! {
115115 pub rm_so: regoff_t,
116116 pub rm_eo: regoff_t,
117117 }
118+
119+ pub struct option {
120+ pub name: * const :: c_char,
121+ pub has_arg: :: c_int,
122+ pub flag: * mut :: c_int,
123+ pub val: :: c_int,
124+ }
118125}
119126
120127s_no_extra_traits ! {
@@ -885,6 +892,13 @@ extern "C" {
885892 pub fn srand48 ( seed : :: c_long ) ;
886893 pub fn seed48 ( xseed : * mut :: c_ushort ) -> * mut :: c_ushort ;
887894 pub fn lcong48 ( p : * mut :: c_ushort ) ;
895+ pub fn getopt_long (
896+ argc : :: c_int ,
897+ argv : * const * mut c_char ,
898+ optstring : * const c_char ,
899+ longopts : * const option ,
900+ longindex : * mut :: c_int ,
901+ ) -> :: c_int ;
888902}
889903
890904cfg_if ! {
Original file line number Diff line number Diff line change @@ -430,6 +430,13 @@ s! {
430430 pub key: * mut :: c_char,
431431 pub data: * mut :: c_void,
432432 }
433+
434+ pub struct option {
435+ pub name: * const :: c_char,
436+ pub has_arg: :: c_int,
437+ pub flag: * mut :: c_int,
438+ pub val: :: c_int,
439+ }
433440}
434441
435442s_no_extra_traits ! {
@@ -1971,7 +1978,13 @@ extern "C" {
19711978 attr : * mut posix_spawnattr_t ,
19721979 sigmask : * const :: sigset_t ,
19731980 ) -> :: c_int ;
1974-
1981+ pub fn getopt_long (
1982+ argc : :: c_int ,
1983+ argv : * const * mut c_char ,
1984+ optstring : * const c_char ,
1985+ longopts : * const option ,
1986+ longindex : * mut :: c_int ,
1987+ ) -> :: c_int ;
19751988}
19761989
19771990#[ link( name = "bsd" ) ]
You can’t perform that action at this time.
0 commit comments