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) {
199
199
"errno.h" ,
200
200
"execinfo.h" ,
201
201
"fcntl.h" ,
202
+ "getopt.h" ,
202
203
"glob.h" ,
203
204
"grp.h" ,
204
205
"iconv.h" ,
@@ -421,6 +422,7 @@ fn test_openbsd(target: &str) {
421
422
"errno.h" ,
422
423
"execinfo.h" ,
423
424
"fcntl.h" ,
425
+ "getopt.h" ,
424
426
"libgen.h" ,
425
427
"limits.h" ,
426
428
"link.h" ,
@@ -769,6 +771,7 @@ fn test_solarish(target: &str) {
769
771
"errno.h" ,
770
772
"execinfo.h" ,
771
773
"fcntl.h" ,
774
+ "getopt.h" ,
772
775
"glob.h" ,
773
776
"grp.h" ,
774
777
"ifaddrs.h" ,
@@ -997,6 +1000,7 @@ fn test_netbsd(target: &str) {
997
1000
"elf.h" ,
998
1001
"errno.h" ,
999
1002
"fcntl.h" ,
1003
+ "getopt.h" ,
1000
1004
"libgen.h" ,
1001
1005
"limits.h" ,
1002
1006
"link.h" ,
@@ -1208,6 +1212,7 @@ fn test_dragonflybsd(target: &str) {
1208
1212
"errno.h" ,
1209
1213
"execinfo.h" ,
1210
1214
"fcntl.h" ,
1215
+ "getopt.h" ,
1211
1216
"glob.h" ,
1212
1217
"grp.h" ,
1213
1218
"ifaddrs.h" ,
@@ -1511,6 +1516,7 @@ fn test_android(target: &str) {
1511
1516
"elf.h" ,
1512
1517
"errno.h" ,
1513
1518
"fcntl.h" ,
1519
+ "getopt.h" ,
1514
1520
"grp.h" ,
1515
1521
"ifaddrs.h" ,
1516
1522
"libgen.h" ,
@@ -1884,6 +1890,7 @@ fn test_freebsd(target: &str) {
1884
1890
"errno.h" ,
1885
1891
"execinfo.h" ,
1886
1892
"fcntl.h" ,
1893
+ "getopt.h" ,
1887
1894
"glob.h" ,
1888
1895
"grp.h" ,
1889
1896
"iconv.h" ,
@@ -2804,6 +2811,7 @@ fn test_linux(target: &str) {
2804
2811
"dlfcn.h" ,
2805
2812
"elf.h" ,
2806
2813
"fcntl.h" ,
2814
+ "getopt.h" ,
2807
2815
"glob.h" ,
2808
2816
[ gnu] : "gnu/libc-version.h" ,
2809
2817
"grp.h" ,
Original file line number Diff line number Diff line change @@ -3026,6 +3026,7 @@ getline
3026
3026
getlogin
3027
3027
getnameinfo
3028
3028
getopt
3029
+ getopt_long
3029
3030
getpeername
3030
3031
getpgid
3031
3032
getpgrp
@@ -3594,4 +3595,4 @@ wmemchr
3594
3595
write
3595
3596
writev
3596
3597
dirname
3597
- basename
3598
+ basename
Original file line number Diff line number Diff line change @@ -1895,6 +1895,7 @@ getline
1895
1895
getloadavg
1896
1896
getmntinfo
1897
1897
getnameinfo
1898
+ getopt_long
1898
1899
getpeereid
1899
1900
getpriority
1900
1901
getprogname
@@ -2228,4 +2229,4 @@ waitid
2228
2229
xsw_usage
2229
2230
xucred
2230
2231
dirname
2231
- basename
2232
+ basename
Original file line number Diff line number Diff line change @@ -1294,6 +1294,7 @@ getlastlogx
1294
1294
getline
1295
1295
getloadavg
1296
1296
getnameinfo
1297
+ getopt_long
1297
1298
getpeereid
1298
1299
getpriority
1299
1300
getprogname
Original file line number Diff line number Diff line change @@ -1617,6 +1617,7 @@ getline
1617
1617
getloadavg
1618
1618
getlocalbase
1619
1619
getnameinfo
1620
+ getopt_long
1620
1621
getpagesize
1621
1622
getpagesizes
1622
1623
getpeereid
Original file line number Diff line number Diff line change @@ -2967,6 +2967,7 @@ getifaddrs
2967
2967
getline
2968
2968
getmntent
2969
2969
getnameinfo
2970
+ getopt_long
2970
2971
getpriority
2971
2972
getpwent
2972
2973
getresgid
Original file line number Diff line number Diff line change @@ -1254,6 +1254,7 @@ getlastlogx
1254
1254
getline
1255
1255
getloadavg
1256
1256
getnameinfo
1257
+ getopt_long
1257
1258
getpeereid
1258
1259
getpriority
1259
1260
getprogname
Original file line number Diff line number Diff line change @@ -1040,6 +1040,7 @@ getline
1040
1040
getloadavg
1041
1041
getmntinfo
1042
1042
getnameinfo
1043
+ getopt_long
1043
1044
getpeereid
1044
1045
getpriority
1045
1046
getprogname
@@ -1232,4 +1233,4 @@ utrace
1232
1233
wait4
1233
1234
xucred
1234
1235
dirname
1235
- basename
1236
+ basename
Original file line number Diff line number Diff line change @@ -115,6 +115,13 @@ s! {
115
115
pub rm_so: regoff_t,
116
116
pub rm_eo: regoff_t,
117
117
}
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
+ }
118
125
}
119
126
120
127
s_no_extra_traits ! {
@@ -885,6 +892,13 @@ extern "C" {
885
892
pub fn srand48 ( seed : :: c_long ) ;
886
893
pub fn seed48 ( xseed : * mut :: c_ushort ) -> * mut :: c_ushort ;
887
894
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 ;
888
902
}
889
903
890
904
cfg_if ! {
Original file line number Diff line number Diff line change @@ -430,6 +430,13 @@ s! {
430
430
pub key: * mut :: c_char,
431
431
pub data: * mut :: c_void,
432
432
}
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
+ }
433
440
}
434
441
435
442
s_no_extra_traits ! {
@@ -1971,7 +1978,13 @@ extern "C" {
1971
1978
attr : * mut posix_spawnattr_t ,
1972
1979
sigmask : * const :: sigset_t ,
1973
1980
) -> :: 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 ;
1975
1988
}
1976
1989
1977
1990
#[ link( name = "bsd" ) ]
You can’t perform that action at this time.
0 commit comments