зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE
This commit is contained in:
Коммит
2bf2909c46
|
@ -44,7 +44,7 @@ version = "0.2.2"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -58,7 +58,7 @@ dependencies = [
|
|||
"error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"iovec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memmap 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -78,7 +78,7 @@ dependencies = [
|
|||
"foreign-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-core 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-uds 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -94,7 +94,7 @@ dependencies = [
|
|||
"error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tokio-core 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -126,12 +126,12 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "bindgen"
|
||||
version = "0.33.1"
|
||||
version = "0.33.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cexpr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"clang-sys 0.21.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"clang-sys 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"clap 2.29.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -185,7 +185,7 @@ version = "0.3.2"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bzip2-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -194,7 +194,7 @@ version = "0.1.6"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -226,12 +226,12 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "clang-sys"
|
||||
version = "0.21.1"
|
||||
version = "0.22.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libloading 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -271,7 +271,7 @@ version = "0.5.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -279,7 +279,7 @@ name = "core-foundation-sys"
|
|||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -290,7 +290,7 @@ dependencies = [
|
|||
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"foreign-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -301,7 +301,7 @@ dependencies = [
|
|||
"core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"core-graphics 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"foreign-types 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -507,7 +507,7 @@ dependencies = [
|
|||
"gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.27 (git+https://github.com/gankro/serde?branch=deserialize_from_enums4)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -579,7 +579,7 @@ name = "flate2"
|
|||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"miniz_oxide_c_api 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -598,7 +598,7 @@ name = "freetype"
|
|||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -607,7 +607,7 @@ version = "0.4.2"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -690,7 +690,7 @@ dependencies = [
|
|||
"cssparser 0.23.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cstr 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"malloc_size_of 0.0.1",
|
||||
"nsstring 0.1.0",
|
||||
|
@ -773,7 +773,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
name = "hashglobe"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -819,7 +819,7 @@ name = "iovec"
|
|||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -840,12 +840,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
name = "js"
|
||||
version = "0.1.4"
|
||||
dependencies = [
|
||||
"bindgen 0.33.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bindgen 0.33.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mozjs_sys 0.0.0",
|
||||
"num-traits 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -887,17 +887,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.33"
|
||||
version = "0.2.39"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "libloading"
|
||||
version = "0.4.0"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -905,7 +904,7 @@ name = "libudev"
|
|||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libudev-sys 0.1.3",
|
||||
]
|
||||
|
||||
|
@ -914,7 +913,7 @@ name = "libudev-sys"
|
|||
version = "0.1.3"
|
||||
dependencies = [
|
||||
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -923,7 +922,7 @@ version = "1.0.16"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -978,7 +977,7 @@ name = "memchr"
|
|||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -988,7 +987,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
dependencies = [
|
||||
"fs2 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -1011,7 +1010,7 @@ version = "0.1.2"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"adler32 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1021,7 +1020,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
dependencies = [
|
||||
"cc 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"crc 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"miniz_oxide 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -1033,7 +1032,7 @@ dependencies = [
|
|||
"iovec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"net2 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1046,7 +1045,7 @@ name = "mio-uds"
|
|||
version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -1070,7 +1069,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
name = "mozjs_sys"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -1147,7 +1146,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
dependencies = [
|
||||
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -1233,7 +1232,7 @@ name = "num_cpus"
|
|||
version = "1.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1269,7 +1268,7 @@ version = "0.2.7"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1374,7 +1373,7 @@ dependencies = [
|
|||
name = "pulse-ffi"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1396,7 +1395,7 @@ version = "0.3.18"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"fuchsia-zircon 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1415,7 +1414,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
dependencies = [
|
||||
"crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -1467,7 +1466,7 @@ dependencies = [
|
|||
name = "rust_url_capi"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"nserror 0.1.0",
|
||||
"nsstring 0.1.0",
|
||||
"url 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1612,7 +1611,7 @@ dependencies = [
|
|||
"app_units 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"arrayvec 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bindgen 0.33.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bindgen 0.33.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1647,7 +1646,7 @@ dependencies = [
|
|||
"style_derive 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
"time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"toml 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"uluru 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-segmentation 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1689,7 +1688,7 @@ dependencies = [
|
|||
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"geckoservo 0.0.1",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"malloc_size_of 0.0.1",
|
||||
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1753,7 +1752,7 @@ version = "0.3.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -1772,7 +1771,7 @@ version = "3.1.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1795,7 +1794,7 @@ version = "0.1.38"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -1833,7 +1832,7 @@ dependencies = [
|
|||
"bytes 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"iovec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio-uds 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1843,8 +1842,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
version = "0.2.1"
|
||||
version = "0.4.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "traitobject"
|
||||
|
@ -1863,7 +1865,7 @@ dependencies = [
|
|||
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"boxfnonce 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libudev 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2072,7 +2074,7 @@ name = "which"
|
|||
version = "1.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2133,7 +2135,7 @@ dependencies = [
|
|||
name = "xpcom"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"nserror 0.1.0",
|
||||
"nsstring 0.1.0",
|
||||
"xpcom_macros 0.1.0",
|
||||
|
@ -2180,7 +2182,7 @@ dependencies = [
|
|||
"checksum base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "96434f987501f0ed4eb336a411e0631ecd1afa11574fe148587adc4ff96143c9"
|
||||
"checksum binary-space-partition 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "88ceb0d16c4fd0e42876e298d7d3ce3780dd9ebdcbe4199816a32c77e08597ff"
|
||||
"checksum bincode 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9d3fb369af639822830328794eba2501b3479652fcd021b2aeb1ed4984202afd"
|
||||
"checksum bindgen 0.33.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1657d607dd7a8e10b3181149f60f3b27ea0eac81058c09a1c791b8f6ead91f19"
|
||||
"checksum bindgen 0.33.2 (registry+https://github.com/rust-lang/crates.io-index)" = "603ed8d8392ace9581e834e26bd09799bf1e989a79bd1aedbb893e72962bdc6e"
|
||||
"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
|
||||
"checksum bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b3c30d3802dfb7281680d6285f2ccdaa8c2d8fee41f93805dba5c4cf50dc23cf"
|
||||
"checksum bitreader 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "80b13e2ab064ff3aa0bdbf1eff533f9822dc37899821f5f98c67f263eab51707"
|
||||
|
@ -2194,7 +2196,7 @@ dependencies = [
|
|||
"checksum cexpr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "393a5f0088efbe41f9d1fcd062f24e83c278608420e62109feb2c8abee07de7d"
|
||||
"checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de"
|
||||
"checksum chrono 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)" = "9213f7cd7c27e95c2b57c49f0e69b1ea65b27138da84a170133fd21b07659c00"
|
||||
"checksum clang-sys 0.21.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00048189ee171715296dfe3b2fcfd439563c7bfec0d98d3976ce3402d62c8f07"
|
||||
"checksum clang-sys 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "939a1a34310b120d26eba35c29475933128b0ec58e24b43327f8dbe6036fc538"
|
||||
"checksum clap 2.29.0 (registry+https://github.com/rust-lang/crates.io-index)" = "110d43e343eb29f4f51c1db31beb879d546db27998577e5715270a54bcf41d3f"
|
||||
"checksum cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "56d741ea7a69e577f6d06b36b7dff4738f680593dc27a701ffa8506b73ce28bb"
|
||||
"checksum cookie 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "746858cae4eae40fff37e1998320068df317bc247dc91a67c6cfa053afdc2abb"
|
||||
|
@ -2257,8 +2259,8 @@ dependencies = [
|
|||
"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73"
|
||||
"checksum lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d"
|
||||
"checksum lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce12306c4739d86ee97c23139f3a34ddf0387bbf181bc7929d287025a8c3ef6b"
|
||||
"checksum libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "5ba3df4dcb460b9dfbd070d41c94c19209620c191b0340b929ce748a2bcd42d2"
|
||||
"checksum libloading 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "be99f814beb3e9503a786a592c909692bb6d4fc5a695f6ed7987223acfbd5194"
|
||||
"checksum libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)" = "f54263ad99207254cf58b5f701ecb432c717445ea2ee8af387334bdd1a03fdff"
|
||||
"checksum libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3ad660d7cb8c5822cd83d10897b0f1f1526792737a179e73896152f85b88c2"
|
||||
"checksum libudev 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea626d3bdf40a1c5aee3bcd4f40826970cae8d80a8fec934c82a63840094dcfe"
|
||||
"checksum libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "3fdd64ef8ee652185674455c1d450b83cbc8ad895625d543b5324d923f82e4d8"
|
||||
"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
|
||||
|
@ -2343,7 +2345,7 @@ dependencies = [
|
|||
"checksum tokio-core 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "febd81b3e2ef615c6c8077347b33f3f3deec3d708ecd08194c9707b7a1eccfc9"
|
||||
"checksum tokio-io 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b4ab83e7adb5677e42e405fa4ceff75659d93c4d7d7dd22f52fcec59ee9f02af"
|
||||
"checksum tokio-uds 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "65ae5d255ce739e8537221ed2942e0445f4b3b813daebac1c0050ddaaa3587f9"
|
||||
"checksum toml 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "736b60249cb25337bc196faa43ee12c705e426f3d55c214d73a4e7be06f92cb4"
|
||||
"checksum toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a7540f4ffc193e0d3c94121edb19b055670d369f77d5804db11ae053a45b6e7e"
|
||||
"checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079"
|
||||
"checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887"
|
||||
"checksum uluru 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "519130f0ea964ba540a9d8af1373738c2226f1d465eda07e61db29feb5479db9"
|
||||
|
|
|
@ -57,6 +57,7 @@ function init_all() {
|
|||
register_module("paneContainers", gContainersPane);
|
||||
if (Services.prefs.getBoolPref("identity.fxaccounts.enabled")) {
|
||||
document.getElementById("category-sync").hidden = false;
|
||||
document.getElementById("weavePrefsDeck").removeAttribute("data-hidden-from-search");
|
||||
register_module("paneSync", gSyncPane);
|
||||
}
|
||||
register_module("paneSearchResults", gSearchResultsPane);
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
<label class="header-name" flex="1">&paneSync1.title;</label>
|
||||
</hbox>
|
||||
|
||||
<deck id="weavePrefsDeck" data-category="paneSync" hidden="true">
|
||||
<deck id="weavePrefsDeck" data-category="paneSync" hidden="true"
|
||||
data-hidden-from-search="true">
|
||||
<groupbox id="noFxaAccount">
|
||||
<hbox>
|
||||
<vbox flex="1">
|
||||
|
|
|
@ -99,6 +99,9 @@ check_and_add_gcc_warning('-Wno-error=coverage-mismatch', when='MOZ_PGO')
|
|||
# false positives depending on optimizations
|
||||
check_and_add_gcc_warning('-Wno-error=free-nonheap-object')
|
||||
|
||||
# Would be a pain to fix all occurrences, for very little gain
|
||||
check_and_add_gcc_warning('-Wno-error=multistatement-macros')
|
||||
|
||||
# catches format/argument mismatches with printf
|
||||
c_format_warning, cxx_format_warning = check_and_add_gcc_warning(
|
||||
'-Wformat', when=depends(target)(lambda t: t.kernel != 'WINNT'))
|
||||
|
|
|
@ -629,6 +629,7 @@ PaymentRequest::PaymentRequest(nsPIDOMWindowInner* aWindow, const nsAString& aIn
|
|||
, mInternalId(aInternalId)
|
||||
, mShippingAddress(nullptr)
|
||||
, mUpdating(false)
|
||||
, mRequestShipping(false)
|
||||
, mUpdateError(NS_OK)
|
||||
, mState(eCreated)
|
||||
{
|
||||
|
@ -845,7 +846,7 @@ PaymentRequest::UpdatePayment(JSContext* aCx, const PaymentDetailsUpdate& aDetai
|
|||
if (NS_WARN_IF(!manager)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
nsresult rv = manager->UpdatePayment(aCx, mInternalId, aDetails);
|
||||
nsresult rv = manager->UpdatePayment(aCx, mInternalId, aDetails, mRequestShipping);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
|
|
|
@ -137,6 +137,11 @@ public:
|
|||
void SetShippingType(const Nullable<PaymentShippingType>& aShippingType);
|
||||
Nullable<PaymentShippingType> GetShippingType() const;
|
||||
|
||||
inline void ShippingWasRequested()
|
||||
{
|
||||
mRequestShipping = true;
|
||||
}
|
||||
|
||||
IMPL_EVENT_HANDLER(shippingaddresschange);
|
||||
IMPL_EVENT_HANDLER(shippingoptionchange);
|
||||
|
||||
|
@ -173,6 +178,10 @@ protected:
|
|||
// "true" when there is a pending updateWith() call to update the payment request
|
||||
// and "false" otherwise.
|
||||
bool mUpdating;
|
||||
|
||||
// Whether shipping was requested. This models [[options]].requestShipping,
|
||||
// but we don't actually store the full [[options]] internal slot.
|
||||
bool mRequestShipping;
|
||||
// The error is set in AbortUpdate(). The value is NS_OK by default.
|
||||
nsresult mUpdateError;
|
||||
|
||||
|
|
|
@ -114,7 +114,8 @@ ConvertDetailsBase(JSContext* aCx,
|
|||
const PaymentDetailsBase& aDetails,
|
||||
nsTArray<IPCPaymentItem>& aDisplayItems,
|
||||
nsTArray<IPCPaymentShippingOption>& aShippingOptions,
|
||||
nsTArray<IPCPaymentDetailsModifier>& aModifiers)
|
||||
nsTArray<IPCPaymentDetailsModifier>& aModifiers,
|
||||
bool aRequestShipping)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aCx);
|
||||
if (aDetails.mDisplayItems.WasPassed()) {
|
||||
|
@ -124,7 +125,7 @@ ConvertDetailsBase(JSContext* aCx,
|
|||
aDisplayItems.AppendElement(displayItem);
|
||||
}
|
||||
}
|
||||
if (aDetails.mShippingOptions.WasPassed()) {
|
||||
if (aRequestShipping && aDetails.mShippingOptions.WasPassed()) {
|
||||
for (const PaymentShippingOption& option : aDetails.mShippingOptions.Value()) {
|
||||
IPCPaymentShippingOption shippingOption;
|
||||
ConvertShippingOption(option, shippingOption);
|
||||
|
@ -147,7 +148,8 @@ ConvertDetailsBase(JSContext* aCx,
|
|||
nsresult
|
||||
ConvertDetailsInit(JSContext* aCx,
|
||||
const PaymentDetailsInit& aDetails,
|
||||
IPCPaymentDetails& aIPCDetails)
|
||||
IPCPaymentDetails& aIPCDetails,
|
||||
bool aRequestShipping)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aCx);
|
||||
// Convert PaymentDetailsBase members
|
||||
|
@ -155,7 +157,7 @@ ConvertDetailsInit(JSContext* aCx,
|
|||
nsTArray<IPCPaymentShippingOption> shippingOptions;
|
||||
nsTArray<IPCPaymentDetailsModifier> modifiers;
|
||||
nsresult rv = ConvertDetailsBase(aCx, aDetails, displayItems, shippingOptions,
|
||||
modifiers);
|
||||
modifiers, aRequestShipping);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
|
@ -185,7 +187,8 @@ ConvertDetailsInit(JSContext* aCx,
|
|||
nsresult
|
||||
ConvertDetailsUpdate(JSContext* aCx,
|
||||
const PaymentDetailsUpdate& aDetails,
|
||||
IPCPaymentDetails& aIPCDetails)
|
||||
IPCPaymentDetails& aIPCDetails,
|
||||
bool aRequestShipping)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aCx);
|
||||
// Convert PaymentDetailsBase members
|
||||
|
@ -193,7 +196,7 @@ ConvertDetailsUpdate(JSContext* aCx,
|
|||
nsTArray<IPCPaymentShippingOption> shippingOptions;
|
||||
nsTArray<IPCPaymentDetailsModifier> modifiers;
|
||||
nsresult rv = ConvertDetailsBase(aCx, aDetails, displayItems, shippingOptions,
|
||||
modifiers);
|
||||
modifiers, aRequestShipping);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
|
@ -430,6 +433,7 @@ PaymentRequestManager::CreatePayment(JSContext* aCx,
|
|||
nsAutoString shippingOption;
|
||||
SetDOMStringToNull(shippingOption);
|
||||
if (aOptions.mRequestShipping) {
|
||||
request->ShippingWasRequested();
|
||||
request->SetShippingType(
|
||||
Nullable<PaymentShippingType>(aOptions.mShippingType));
|
||||
GetSelectedShippingOption(aDetails, shippingOption);
|
||||
|
@ -451,7 +455,7 @@ PaymentRequestManager::CreatePayment(JSContext* aCx,
|
|||
}
|
||||
|
||||
IPCPaymentDetails details;
|
||||
rv = ConvertDetailsInit(aCx, aDetails, details);
|
||||
rv = ConvertDetailsInit(aCx, aDetails, details, aOptions.mRequestShipping);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
|
@ -545,7 +549,8 @@ PaymentRequestManager::CompletePayment(const nsAString& aRequestId,
|
|||
nsresult
|
||||
PaymentRequestManager::UpdatePayment(JSContext* aCx,
|
||||
const nsAString& aRequestId,
|
||||
const PaymentDetailsUpdate& aDetails)
|
||||
const PaymentDetailsUpdate& aDetails,
|
||||
bool aRequestShipping)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aCx);
|
||||
RefPtr<PaymentRequest> request = GetPaymentRequestById(aRequestId);
|
||||
|
@ -560,7 +565,7 @@ PaymentRequestManager::UpdatePayment(JSContext* aCx,
|
|||
// option.
|
||||
|
||||
IPCPaymentDetails details;
|
||||
nsresult rv = ConvertDetailsUpdate(aCx, aDetails, details);
|
||||
nsresult rv = ConvertDetailsUpdate(aCx, aDetails, details, aRequestShipping);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
|
|
|
@ -56,7 +56,8 @@ public:
|
|||
const PaymentComplete& aComplete);
|
||||
nsresult UpdatePayment(JSContext* aCx,
|
||||
const nsAString& aRequestId,
|
||||
const PaymentDetailsUpdate& aDetails);
|
||||
const PaymentDetailsUpdate& aDetails,
|
||||
bool aRequestShipping);
|
||||
|
||||
nsresult RespondPayment(const IPCPaymentActionResponse& aResponse);
|
||||
nsresult ChangeShippingAddress(const nsAString& aRequestId,
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
"use strict";
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
const paymentSrv = Cc["@mozilla.org/dom/payments/payment-request-service;1"].getService(Ci.nsIPaymentRequestService);
|
||||
|
||||
function emitTestFail(message) {
|
||||
sendAsyncMessage("test-fail", message);
|
||||
}
|
||||
|
||||
const shippingAddress = Cc["@mozilla.org/dom/payments/payment-address;1"].
|
||||
createInstance(Ci.nsIPaymentAddress);
|
||||
const addressLine = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray);
|
||||
const address = Cc["@mozilla.org/supports-string;1"].createInstance(Ci.nsISupportsString);
|
||||
address.data = "Easton Ave";
|
||||
addressLine.appendElement(address);
|
||||
shippingAddress.init("", // country
|
||||
addressLine, // address line
|
||||
"", // region
|
||||
"", // city
|
||||
"", // dependent locality
|
||||
"", // postal code
|
||||
"", // sorting code
|
||||
"", // language code
|
||||
"", // organization
|
||||
"", // recipient
|
||||
""); // phone
|
||||
|
||||
const NormalUIService = {
|
||||
shippingOptionChanged: false,
|
||||
showPayment: function(requestId) {
|
||||
paymentSrv.changeShippingAddress(requestId, shippingAddress);
|
||||
},
|
||||
abortPayment: function(requestId) {
|
||||
},
|
||||
completePayment: function(requestId) {
|
||||
let completeResponse = Cc["@mozilla.org/dom/payments/payment-complete-action-response;1"].
|
||||
createInstance(Ci.nsIPaymentCompleteActionResponse);
|
||||
completeResponse.init(requestId, Ci.nsIPaymentActionResponse.COMPLETE_SUCCEEDED);
|
||||
paymentSrv.respondPayment(completeResponse.QueryInterface(Ci.nsIPaymentActionResponse));
|
||||
},
|
||||
updatePayment: function(requestId) {
|
||||
let showResponse = null;
|
||||
let payRequest = paymentSrv.getPaymentRequestById(requestId);
|
||||
|
||||
const shippingOptions = payRequest.paymentDetails.shippingOptions;
|
||||
if (shippingOptions.length != 0) {
|
||||
emitTestFail("Wrong length for shippingOptions.");
|
||||
}
|
||||
|
||||
const showResponseData = Cc["@mozilla.org/dom/payments/general-response-data;1"].
|
||||
createInstance(Ci.nsIGeneralResponseData);
|
||||
|
||||
try {
|
||||
showResponseData.initData({ paymentToken: "6880281f-0df3-4b8e-916f-66575e2457c1",});
|
||||
} catch (e) {
|
||||
emitTestFail("Fail to initialize response data with { paymentToken: \"6880281f-0df3-4b8e-916f-66575e2457c1\",}");
|
||||
}
|
||||
|
||||
showResponse = Cc["@mozilla.org/dom/payments/payment-show-action-response;1"].
|
||||
createInstance(Ci.nsIPaymentShowActionResponse);
|
||||
showResponse.init(requestId,
|
||||
Ci.nsIPaymentActionResponse.PAYMENT_ACCEPTED,
|
||||
"testing-payment-method", // payment method
|
||||
showResponseData, // payment method data
|
||||
"", // payer name
|
||||
"", // payer email
|
||||
""); // payer phone
|
||||
paymentSrv.respondPayment(showResponse.QueryInterface(Ci.nsIPaymentActionResponse));
|
||||
},
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIPaymentUIService]),
|
||||
};
|
||||
|
||||
addMessageListener("set-normal-ui-service", function() {
|
||||
paymentSrv.setTestingUIService(NormalUIService.QueryInterface(Ci.nsIPaymentUIService));
|
||||
});
|
||||
|
||||
addMessageListener("teardown", function() {
|
||||
paymentSrv.cleanup();
|
||||
paymentSrv.setTestingUIService(null);
|
||||
sendAsyncMessage('teardown-complete');
|
||||
});
|
|
@ -11,6 +11,7 @@ support-files =
|
|||
GeneralChromeScript.js
|
||||
PMIValidationChromeScript.js
|
||||
ShowPaymentChromeScript.js
|
||||
RequestShippingChromeScript.js
|
||||
|
||||
[test_abortPayment.html]
|
||||
run-if = nightly_build # Bug 1390018: Depends on the Nightly-only UI service
|
||||
|
@ -23,4 +24,5 @@ run-if = nightly_build # Bug 1390737: Depends on the Nightly-only UI service
|
|||
[test_currency_amount_validation.html]
|
||||
[test_payment-request-in-iframe.html]
|
||||
[test_pmi_validation.html]
|
||||
[test_requestShipping.html]
|
||||
[test_showPayment.html]
|
||||
|
|
|
@ -0,0 +1,178 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1436903
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 1436903</title>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript">
|
||||
|
||||
"use strict";
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
var gUrl = SimpleTest.getTestFileURL('RequestShippingChromeScript.js');
|
||||
var gScript = SpecialPowers.loadChromeScript(gUrl);
|
||||
|
||||
function testFailHandler(message) {
|
||||
ok(false, message);
|
||||
}
|
||||
gScript.addMessageListener("test-fail", testFailHandler);
|
||||
|
||||
const defaultMethods = [{
|
||||
supportedMethods: "basic-card",
|
||||
data: {
|
||||
supportedNetworks: ['unionpay', 'visa', 'mastercard', 'amex', 'discover',
|
||||
'diners', 'jcb', 'mir',
|
||||
],
|
||||
supportedTypes: ['prepaid', 'debit', 'credit'],
|
||||
},
|
||||
}, {
|
||||
supportedMethods: "testing-payment-method",
|
||||
}];
|
||||
const defaultDetails = {
|
||||
id: "test payment",
|
||||
total: {
|
||||
label: "Total",
|
||||
amount: {
|
||||
currency: "USD",
|
||||
value: "1.00"
|
||||
}
|
||||
},
|
||||
shippingOptions: [
|
||||
{
|
||||
id: "NormalShipping",
|
||||
label: "NormalShipping",
|
||||
amount: {
|
||||
currency: "USD",
|
||||
value: "10.00"
|
||||
},
|
||||
selected: false,
|
||||
},
|
||||
{
|
||||
id: "FastShipping",
|
||||
label: "FastShipping",
|
||||
amount: {
|
||||
currency: "USD",
|
||||
value: "30.00"
|
||||
},
|
||||
selected: false,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const defaultOptions = {
|
||||
requestPayerName: true,
|
||||
requestPayerEmail: false,
|
||||
reqeustPayerPhone: false,
|
||||
requestShipping: false,
|
||||
shippingType: "shipping"
|
||||
};
|
||||
|
||||
const updatedOptionDetails = {
|
||||
total: {
|
||||
label: "Total",
|
||||
amount: {
|
||||
currency: "USD",
|
||||
value: "1.00"
|
||||
}
|
||||
},
|
||||
shippingOptions: [
|
||||
{
|
||||
id: "NormalShipping",
|
||||
label: "NormalShipping",
|
||||
amount: {
|
||||
currency: "USD",
|
||||
value: "10.00"
|
||||
},
|
||||
selected: false,
|
||||
},
|
||||
{
|
||||
id: "FastShipping",
|
||||
label: "FastShipping",
|
||||
amount: {
|
||||
currency: "USD",
|
||||
value: "30.00"
|
||||
},
|
||||
selected: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const nonSupportedMethods = [{
|
||||
supportedMethods: "nonsupported-method",
|
||||
}];
|
||||
|
||||
|
||||
function updateWithShippingAddress() {
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve(defaultDetails);
|
||||
});
|
||||
}
|
||||
|
||||
function updateWithShippingOption() {
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve(updatedOptionDetails);
|
||||
});
|
||||
}
|
||||
|
||||
function testShow() {
|
||||
gScript.sendAsyncMessage("set-normal-ui-service");
|
||||
return new Promise((resolve, reject) => {
|
||||
const payRequest = new PaymentRequest(defaultMethods, defaultDetails, defaultOptions);
|
||||
payRequest.addEventListener("shippingaddresschange", event => {
|
||||
event.updateWith(updateWithShippingAddress());
|
||||
});
|
||||
payRequest.addEventListener("shippingoptionchange", event => {
|
||||
event.updateWith(updateWithShippingOption());
|
||||
});
|
||||
payRequest.show().then(response => {
|
||||
response.complete("success").then(() =>{
|
||||
resolve();
|
||||
}).catch(e => {
|
||||
ok(false, "Unexpected error: " + e.name);
|
||||
resolve();
|
||||
});
|
||||
}).catch( e => {
|
||||
ok(false, "Unexpected error: " + e.name);
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function teardown() {
|
||||
ok(true, "Mandatory assert");
|
||||
gScript.addMessageListener("teardown-complete", function teardownCompleteHandler() {
|
||||
gScript.removeMessageListener("teardown-complete", teardownCompleteHandler);
|
||||
gScript.removeMessageListener("test-fail", testFailHandler)
|
||||
gScript.destroy();
|
||||
SimpleTest.finish();
|
||||
});
|
||||
gScript.sendAsyncMessage("teardown");
|
||||
}
|
||||
|
||||
function runTests() {
|
||||
testShow()
|
||||
.then(teardown)
|
||||
.catch( e => {
|
||||
ok(false, "Unexpected error: " + e.name);
|
||||
SimpleTest.finish();
|
||||
});
|
||||
}
|
||||
|
||||
window.addEventListener('load', function() {
|
||||
SpecialPowers.pushPrefEnv({
|
||||
'set': [
|
||||
['dom.payments.request.enabled', true],
|
||||
]
|
||||
}, runTests);
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1436903">Mozilla Bug 1436903</a>
|
||||
</body>
|
||||
</html>
|
|
@ -3769,12 +3769,6 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
|||
|
||||
child->MarkAbsoluteFramesForDisplayList(aBuilder);
|
||||
|
||||
const bool differentAGR =
|
||||
buildingForChild.IsAnimatedGeometryRoot() || isPositioned;
|
||||
nsDisplayList* toList = isPositioned ? &list : aLists.BorderBackground();
|
||||
|
||||
aBuilder->BuildCompositorHitTestInfoIfNeeded(child, toList, differentAGR);
|
||||
|
||||
if (aBuilder->IsBuildingLayerEventRegions()) {
|
||||
// If this frame has a different animated geometry root than its parent,
|
||||
// make sure we accumulate event regions for its layer.
|
||||
|
@ -3799,6 +3793,9 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
|||
}
|
||||
}
|
||||
|
||||
const bool differentAGR =
|
||||
buildingForChild.IsAnimatedGeometryRoot() || isPositioned;
|
||||
|
||||
if (!awayFromCommonPath && shortcutPossible &&
|
||||
!differentAGR && !buildingForChild.MaybeAnimatedGeometryRoot()) {
|
||||
// The shortcut is available for the child for next time.
|
||||
|
@ -3810,6 +3807,10 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
|||
// Not a pseudo or real stacking context. Do the simple thing and
|
||||
// return early.
|
||||
|
||||
aBuilder->BuildCompositorHitTestInfoIfNeeded(child,
|
||||
aLists.BorderBackground(),
|
||||
differentAGR);
|
||||
|
||||
aBuilder->AdjustWindowDraggingRegion(child);
|
||||
child->BuildDisplayList(aBuilder, aLists);
|
||||
aBuilder->DisplayCaret(child, aLists.Content());
|
||||
|
@ -3824,6 +3825,11 @@ nsIFrame::BuildDisplayListForChild(nsDisplayListBuilder* aBuilder,
|
|||
// stacking context's positioned descendant list, because they might be
|
||||
// z-index:non-auto
|
||||
nsDisplayListCollection pseudoStack(aBuilder);
|
||||
|
||||
aBuilder->BuildCompositorHitTestInfoIfNeeded(child,
|
||||
pseudoStack.BorderBackground(),
|
||||
differentAGR);
|
||||
|
||||
aBuilder->AdjustWindowDraggingRegion(child);
|
||||
nsDisplayListBuilder::AutoContainerASRTracker contASRTracker(aBuilder);
|
||||
child->BuildDisplayList(aBuilder, pseudoStack);
|
||||
|
|
|
@ -3072,7 +3072,7 @@ pref("layout.css.prefixes.webkit", true);
|
|||
// Are "-webkit-{min|max}-device-pixel-ratio" media queries supported?
|
||||
// (Note: this pref has no effect if the master 'layout.css.prefixes.webkit'
|
||||
// pref is set to false.)
|
||||
pref("layout.css.prefixes.device-pixel-ratio-webkit", false);
|
||||
pref("layout.css.prefixes.device-pixel-ratio-webkit", true);
|
||||
|
||||
// Is support for the :scope selector enabled?
|
||||
pref("layout.css.scope-pseudo.enabled", true);
|
||||
|
|
|
@ -1520,12 +1520,8 @@ nsHostResolver::CompleteLookup(nsHostRecord* rec, nsresult status, AddrInfo* aNe
|
|||
}
|
||||
|
||||
if (NS_SUCCEEDED(status)) {
|
||||
if (rec->mTRRSuccess == 0) { // first one
|
||||
rec->mTrrDuration = TimeStamp::Now() - rec->mTrrStart;
|
||||
}
|
||||
rec->mTRRSuccess++;
|
||||
}
|
||||
|
||||
if (TRROutstanding()) {
|
||||
if (NS_FAILED(status)) {
|
||||
return LOOKUP_OK; // wait for outstanding
|
||||
|
@ -1579,6 +1575,12 @@ nsHostResolver::CompleteLookup(nsHostRecord* rec, nsresult status, AddrInfo* aNe
|
|||
}
|
||||
// continue
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(status) && (rec->mTRRSuccess == 1)) {
|
||||
// store the duration on first (used) TRR response
|
||||
rec->mTrrDuration = TimeStamp::Now() - rec->mTrrStart;
|
||||
}
|
||||
|
||||
} else { // native resolve completed
|
||||
if (rec->usingAnyThread) {
|
||||
mActiveAnyThreadCount--;
|
||||
|
|
|
@ -546,9 +546,8 @@ DoConnect(const char* aPath, size_t aLen, int aType)
|
|||
}
|
||||
|
||||
size_t
|
||||
SandboxBroker::ConvertToRealPath(char* aPath, size_t aBufSize, size_t aPathLen)
|
||||
SandboxBroker::RealPath(char* aPath, size_t aBufSize, size_t aPathLen)
|
||||
{
|
||||
if (strstr(aPath, "..") != nullptr) {
|
||||
char* result = realpath(aPath, nullptr);
|
||||
if (result != nullptr) {
|
||||
base::strlcpy(aPath, result, aBufSize);
|
||||
|
@ -556,7 +555,14 @@ SandboxBroker::ConvertToRealPath(char* aPath, size_t aBufSize, size_t aPathLen)
|
|||
// Size changed, but guaranteed to be 0 terminated
|
||||
aPathLen = strlen(aPath);
|
||||
}
|
||||
// ValidatePath will handle failure to translate
|
||||
return aPathLen;
|
||||
}
|
||||
|
||||
size_t
|
||||
SandboxBroker::ConvertRelativePath(char* aPath, size_t aBufSize, size_t aPathLen)
|
||||
{
|
||||
if (strstr(aPath, "..") != nullptr) {
|
||||
return RealPath(aPath, aBufSize, aPathLen);
|
||||
}
|
||||
return aPathLen;
|
||||
}
|
||||
|
@ -784,7 +790,7 @@ SandboxBroker::ThreadMain(void)
|
|||
pathLen = first_len;
|
||||
|
||||
// Look up the first pathname but first translate relative paths.
|
||||
pathLen = ConvertToRealPath(pathBuf, sizeof(pathBuf), pathLen);
|
||||
pathLen = ConvertRelativePath(pathBuf, sizeof(pathBuf), pathLen);
|
||||
perms = mPolicy->Lookup(nsDependentCString(pathBuf, pathLen));
|
||||
|
||||
// We don't have permissions on the requested dir.
|
||||
|
@ -796,11 +802,21 @@ SandboxBroker::ThreadMain(void)
|
|||
// Did we arrive from a symlink in a path that is not writable?
|
||||
// Then try to figure out the original path and see if that is
|
||||
// readable. Work on the original path, this reverses
|
||||
// ConvertToRealPath above.
|
||||
// ConvertRelative above.
|
||||
int symlinkPerms = SymlinkPermissions(recvBuf, first_len);
|
||||
if (symlinkPerms > 0) {
|
||||
perms = symlinkPerms;
|
||||
}
|
||||
if (!perms) {
|
||||
// Now try the opposite case: translate symlinks to their
|
||||
// actual destination file. Firefox always resolves symlinks,
|
||||
// and in most cases we have whitelisted fixed paths that
|
||||
// libraries will rely on and try to open. So this codepath
|
||||
// is mostly useful for Mesa which had its kernel interface
|
||||
// moved around.
|
||||
pathLen = RealPath(pathBuf, sizeof(pathBuf), pathLen);
|
||||
perms = mPolicy->Lookup(nsDependentCString(pathBuf, pathLen));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -809,7 +825,7 @@ SandboxBroker::ThreadMain(void)
|
|||
if (pathLen2 > 0) {
|
||||
// Force 0 termination.
|
||||
pathBuf2[pathLen2] = '\0';
|
||||
pathLen2 = ConvertToRealPath(pathBuf2, sizeof(pathBuf2), pathLen2);
|
||||
pathLen2 = ConvertRelativePath(pathBuf2, sizeof(pathBuf2), pathLen2);
|
||||
int perms2 = mPolicy->Lookup(nsDependentCString(pathBuf2, pathLen2));
|
||||
|
||||
// Take the intersection of the permissions for both paths.
|
||||
|
|
|
@ -145,7 +145,8 @@ class SandboxBroker final
|
|||
void AuditPermissive(int aOp, int aFlags, int aPerms, const char* aPath);
|
||||
void AuditDenial(int aOp, int aFlags, int aPerms, const char* aPath);
|
||||
// Remap relative paths to absolute paths.
|
||||
size_t ConvertToRealPath(char* aPath, size_t aBufSize, size_t aPathLen);
|
||||
size_t ConvertRelativePath(char* aPath, size_t aBufSize, size_t aPathLen);
|
||||
size_t RealPath(char* aPath, size_t aBufSize, size_t aPathLen);
|
||||
// Remap references to /tmp and friends to the content process tempdir
|
||||
size_t RemapTempDirs(char* aPath, size_t aBufSize, size_t aPathLen);
|
||||
nsCString ReverseSymlinks(const nsACString& aPath);
|
||||
|
|
|
@ -64,7 +64,7 @@ version = "0.2.3"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -86,7 +86,7 @@ source = "git+https://github.com/servo/rust-azure#29f0c063ad366b5364e06af26d3e9d
|
|||
dependencies = [
|
||||
"cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo-freetype-sys 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo-skia 0.30000013.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -100,7 +100,7 @@ dependencies = [
|
|||
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-demangle 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -111,7 +111,7 @@ version = "0.1.11"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gcc 0.3.47 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -139,12 +139,12 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "bindgen"
|
||||
version = "0.33.1"
|
||||
version = "0.33.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cexpr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"clang-sys 0.21.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"clang-sys 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"clap 2.28.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -269,7 +269,7 @@ dependencies = [
|
|||
"ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"offscreen_gl_context 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"offscreen_gl_context 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_config 0.0.1",
|
||||
"webrender 0.57.0 (git+https://github.com/servo/webrender)",
|
||||
"webrender_api 0.57.0 (git+https://github.com/servo/webrender)",
|
||||
|
@ -286,7 +286,7 @@ dependencies = [
|
|||
"malloc_size_of 0.0.1",
|
||||
"malloc_size_of_derive 0.0.1",
|
||||
"nonzero 0.0.1",
|
||||
"offscreen_gl_context 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"offscreen_gl_context 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo_config 0.0.1",
|
||||
"webrender_api 0.57.0 (git+https://github.com/servo/webrender)",
|
||||
|
@ -328,7 +328,7 @@ version = "0.2.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gleam 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -342,12 +342,12 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "clang-sys"
|
||||
version = "0.21.1"
|
||||
version = "0.22.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libloading 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -373,7 +373,7 @@ dependencies = [
|
|||
"objc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"objc-foundation 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"objc_id 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"x11-clipboard 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"x11-clipboard 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -400,7 +400,7 @@ dependencies = [
|
|||
"bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"block 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"core-graphics 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"objc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -418,7 +418,7 @@ dependencies = [
|
|||
"gleam 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"image 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"msg 0.0.1",
|
||||
"net_traits 0.0.1",
|
||||
|
@ -485,7 +485,7 @@ version = "0.5.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -493,7 +493,7 @@ name = "core-foundation-sys"
|
|||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -504,7 +504,7 @@ dependencies = [
|
|||
"bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -515,7 +515,7 @@ dependencies = [
|
|||
"core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"core-graphics 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -638,7 +638,7 @@ name = "dbus"
|
|||
version = "0.5.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libdbus-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -726,10 +726,10 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "dlib"
|
||||
version = "0.4.0"
|
||||
version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libloading 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -765,7 +765,7 @@ dependencies = [
|
|||
"gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -796,7 +796,7 @@ source = "git+https://github.com/energymon/energymon-rust.git#89daf8f37858eab96a
|
|||
dependencies = [
|
||||
"energy-monitor 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"energymon-default-sys 0.3.0 (git+https://github.com/energymon/energymon-sys.git)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -815,7 +815,7 @@ source = "git+https://github.com/energymon/energymon-sys.git#f8d77ea2906b25f9c0f
|
|||
dependencies = [
|
||||
"energymon-builder 0.3.0 (git+https://github.com/energymon/energymon-sys.git)",
|
||||
"energymon-sys 0.3.0 (git+https://github.com/energymon/energymon-sys.git)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -823,7 +823,7 @@ name = "energymon-sys"
|
|||
version = "0.3.0"
|
||||
source = "git+https://github.com/energymon/energymon-sys.git#f8d77ea2906b25f9c0fd358aa9d300a46dc3e97c"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -845,7 +845,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "error-chain"
|
||||
version = "0.10.0"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"backtrace 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -882,7 +882,7 @@ name = "flate2"
|
|||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"miniz-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -897,7 +897,7 @@ version = "0.4.0"
|
|||
source = "git+https://github.com/servo/fontsan#29e879c870348c4b3fd51086e42dbb6365171479"
|
||||
dependencies = [
|
||||
"cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"miniz-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -919,7 +919,7 @@ name = "freetype"
|
|||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo-freetype-sys 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -945,7 +945,7 @@ name = "gaol"
|
|||
version = "0.0.1"
|
||||
source = "git+https://github.com/servo/gaol#227ff0bae1eb1b44a273c6c5610debfe214991ee"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -972,7 +972,7 @@ dependencies = [
|
|||
"cssparser 0.23.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cstr 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"malloc_size_of 0.0.1",
|
||||
"nsstring 0.1.0",
|
||||
|
@ -1008,7 +1008,7 @@ dependencies = [
|
|||
"harfbuzz-sys 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"malloc_size_of 0.0.1",
|
||||
"malloc_size_of_derive 0.0.1",
|
||||
|
@ -1089,7 +1089,7 @@ dependencies = [
|
|||
"core-graphics 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"objc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"shared_library 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1105,7 +1105,7 @@ version = "0.2.3"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1125,7 +1125,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
dependencies = [
|
||||
"cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"freetype 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -1133,7 +1133,7 @@ dependencies = [
|
|||
name = "hashglobe"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -1143,7 +1143,7 @@ version = "0.4.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"heartbeats-simple-sys 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1152,7 +1152,7 @@ version = "0.4.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -1281,7 +1281,7 @@ dependencies = [
|
|||
"core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"leaky-cow 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1289,7 +1289,7 @@ name = "iovec"
|
|||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -1301,7 +1301,7 @@ dependencies = [
|
|||
"bincode 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mio 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1327,7 +1327,7 @@ version = "0.1.4"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1336,7 +1336,7 @@ version = "0.1.4"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"jemalloc-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1390,7 +1390,7 @@ dependencies = [
|
|||
"gfx_traits 0.0.1",
|
||||
"html5ever 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"malloc_size_of 0.0.1",
|
||||
"msg 0.0.1",
|
||||
|
@ -1435,7 +1435,7 @@ dependencies = [
|
|||
"layout 0.0.1",
|
||||
"layout_traits 0.0.1",
|
||||
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"malloc_size_of 0.0.1",
|
||||
"metrics 0.0.1",
|
||||
|
@ -1506,7 +1506,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.33"
|
||||
version = "0.2.39"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
|
@ -1519,12 +1519,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "libloading"
|
||||
version = "0.4.0"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1574,7 +1573,7 @@ version = "1.0.18"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -1610,7 +1609,7 @@ name = "malloc_buf"
|
|||
version = "0.0.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1675,7 +1674,7 @@ name = "memchr"
|
|||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1683,7 +1682,7 @@ name = "memmap"
|
|||
version = "0.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -1750,7 +1749,7 @@ version = "0.1.9"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gcc 0.3.47 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1761,7 +1760,7 @@ dependencies = [
|
|||
"iovec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"net2 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1801,7 +1800,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
dependencies = [
|
||||
"cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mozjs_sys 0.50.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1812,7 +1811,7 @@ name = "mozjs_sys"
|
|||
version = "0.50.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -1888,7 +1887,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
dependencies = [
|
||||
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -1986,7 +1985,7 @@ name = "num_cpus"
|
|||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2017,7 +2016,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "offscreen_gl_context"
|
||||
version = "0.15.0"
|
||||
version = "0.15.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cgl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2026,7 +2025,7 @@ dependencies = [
|
|||
"gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libloading 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"objc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2060,7 +2059,7 @@ dependencies = [
|
|||
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl-sys 0.9.22 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -2070,7 +2069,7 @@ version = "0.9.22"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"cc 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -2125,7 +2124,7 @@ version = "0.2.7"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2229,7 +2228,7 @@ dependencies = [
|
|||
"influent 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"jemalloc-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"profile_traits 0.0.1",
|
||||
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2282,7 +2281,7 @@ name = "rand"
|
|||
version = "0.3.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2311,7 +2310,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
dependencies = [
|
||||
"crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num_cpus 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -2358,12 +2357,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "rust-webvr"
|
||||
version = "0.9.9"
|
||||
version = "0.9.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gvr-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libloading 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ovr-mobile-sys 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rust-webvr-api 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2454,7 +2453,7 @@ dependencies = [
|
|||
"ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"jstraceable_derive 0.0.1",
|
||||
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"malloc_size_of 0.0.1",
|
||||
"malloc_size_of_derive 0.0.1",
|
||||
|
@ -2467,7 +2466,7 @@ dependencies = [
|
|||
"msg 0.0.1",
|
||||
"net_traits 0.0.1",
|
||||
"num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"offscreen_gl_context 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"offscreen_gl_context 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2516,7 +2515,7 @@ dependencies = [
|
|||
"gfx_traits 0.0.1",
|
||||
"html5ever 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"malloc_size_of 0.0.1",
|
||||
"malloc_size_of_derive 0.0.1",
|
||||
|
@ -2569,7 +2568,7 @@ dependencies = [
|
|||
"hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hyper_serde 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"malloc_size_of 0.0.1",
|
||||
"malloc_size_of_derive 0.0.1",
|
||||
"msg 0.0.1",
|
||||
|
@ -2690,7 +2689,7 @@ name = "servo-egl"
|
|||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2698,7 +2697,7 @@ name = "servo-fontconfig"
|
|||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo-fontconfig-sys 4.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -2734,7 +2733,7 @@ dependencies = [
|
|||
"glutin 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"glx 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"io-surface 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo-egl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo-fontconfig-sys 4.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"servo-freetype-sys 4.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2763,7 +2762,7 @@ version = "0.0.1"
|
|||
dependencies = [
|
||||
"jemallocator 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2855,7 +2854,7 @@ version = "0.1.5"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2944,7 +2943,7 @@ dependencies = [
|
|||
"app_units 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"arrayvec 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bindgen 0.33.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bindgen 0.33.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2986,7 +2985,7 @@ dependencies = [
|
|||
"style_derive 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
"time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"toml 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"uluru 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-bidi 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-segmentation 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3053,7 +3052,7 @@ dependencies = [
|
|||
"env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"geckoservo 0.0.1",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"malloc_size_of 0.0.1",
|
||||
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3121,7 +3120,7 @@ version = "2.2.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3142,7 +3141,7 @@ name = "termion"
|
|||
version = "1.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -3161,7 +3160,7 @@ version = "3.1.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -3189,7 +3188,7 @@ version = "0.1.37"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"redox_syscall 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -3200,7 +3199,7 @@ version = "3.0.4"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gcc 0.3.47 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -3210,8 +3209,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "toml"
|
||||
version = "0.2.1"
|
||||
version = "0.4.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"serde 1.0.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "traitobject"
|
||||
|
@ -3376,7 +3378,7 @@ version = "0.12.5"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"token_store 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wayland-scanner 0.12.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wayland-sys 0.12.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3388,7 +3390,7 @@ version = "0.13.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"dlib 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"dlib 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wayland-client 0.12.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3418,7 +3420,7 @@ name = "wayland-sys"
|
|||
version = "0.12.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"dlib 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"dlib 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -3526,7 +3528,7 @@ dependencies = [
|
|||
"ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"msg 0.0.1",
|
||||
"rust-webvr 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rust-webvr 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"script_traits 0.0.1",
|
||||
"servo_config 0.0.1",
|
||||
"webvr_traits 0.0.1",
|
||||
|
@ -3547,7 +3549,7 @@ name = "which"
|
|||
version = "1.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -3589,7 +3591,7 @@ dependencies = [
|
|||
"core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"core-graphics 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"objc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"percent-encoding 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"wayland-client 0.12.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3629,17 +3631,17 @@ name = "x11"
|
|||
version = "2.17.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "x11-clipboard"
|
||||
version = "0.2.0"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xcb 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"xcb 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -3648,17 +3650,17 @@ version = "2.17.3"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "xcb"
|
||||
version = "0.8.1"
|
||||
version = "0.8.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -3709,7 +3711,7 @@ dependencies = [
|
|||
"checksum base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "96434f987501f0ed4eb336a411e0631ecd1afa11574fe148587adc4ff96143c9"
|
||||
"checksum binary-space-partition 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "88ceb0d16c4fd0e42876e298d7d3ce3780dd9ebdcbe4199816a32c77e08597ff"
|
||||
"checksum bincode 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9a6301db0b49fb63551bc15b5ae348147101cdf323242b93ec7546d5002ff1af"
|
||||
"checksum bindgen 0.33.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1657d607dd7a8e10b3181149f60f3b27ea0eac81058c09a1c791b8f6ead91f19"
|
||||
"checksum bindgen 0.33.2 (registry+https://github.com/rust-lang/crates.io-index)" = "603ed8d8392ace9581e834e26bd09799bf1e989a79bd1aedbb893e72962bdc6e"
|
||||
"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5"
|
||||
"checksum bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f5cde24d1b2e2216a726368b2363a273739c91f4e3eb4e0dd12d672d396ad989"
|
||||
"checksum bitreader 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "80b13e2ab064ff3aa0bdbf1eff533f9822dc37899821f5f98c67f263eab51707"
|
||||
|
@ -3728,7 +3730,7 @@ dependencies = [
|
|||
"checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de"
|
||||
"checksum cgl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "86765cb42c2a2c497e142af72517c1b4d7ae5bb2f25dfa77a5c69642f2342d89"
|
||||
"checksum chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c20ebe0b2b08b0aeddba49c609fe7957ba2e33449882cb186a180bc60682fa9"
|
||||
"checksum clang-sys 0.21.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00048189ee171715296dfe3b2fcfd439563c7bfec0d98d3976ce3402d62c8f07"
|
||||
"checksum clang-sys 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "939a1a34310b120d26eba35c29475933128b0ec58e24b43327f8dbe6036fc538"
|
||||
"checksum clap 2.28.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dc34bf7d5d66268b466b9852bca925ec1d2650654dab4da081e63fd230145c2e"
|
||||
"checksum clipboard 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "b9b4623b47d8637fc9d47564583d4cc01eb8c8e34e26b2bf348bf4b036acb657"
|
||||
"checksum clipboard-win 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "14cc3e6c075926b96490d5f90d4a5af7be8012a4d8a8698e619655085a7641a3"
|
||||
|
@ -3755,7 +3757,7 @@ dependencies = [
|
|||
"checksum debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9a032eac705ca39214d169f83e3d3da290af06d8d1d344d1baad2fd002dca4b3"
|
||||
"checksum deflate 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ebb02aaf4b775afc96684b8402510a338086974e38570a1f65bea8c202eb77a7"
|
||||
"checksum device 0.0.1 (git+https://github.com/servo/devices)" = "<none>"
|
||||
"checksum dlib 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "95518d8f88d556e62c9b3014629f21bdad97a9fdfee85c68a185e3980af29e7c"
|
||||
"checksum dlib 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "77e51249a9d823a4cb79e3eca6dcd756153e8ed0157b6c04775d04bf1b13b76a"
|
||||
"checksum dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "80c8b71fd71146990a9742fc06dcbbde19161a267e0ad4e572c35162f4578c90"
|
||||
"checksum dtoa-short 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fe6f727b406462fd57c95fed84d1b0dbfb5f0136fcac005adba9ea0367c05cc8"
|
||||
"checksum dwrote 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b26e30aaa6bf31ec830db15fec14ed04f0f2ecfcc486ecfce88c55d3389b237f"
|
||||
|
@ -3768,7 +3770,7 @@ dependencies = [
|
|||
"checksum energymon-sys 0.3.0 (git+https://github.com/energymon/energymon-sys.git)" = "<none>"
|
||||
"checksum enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "be4551092f4d519593039259a9ed8daedf0da12e5109c5280338073eaeb81180"
|
||||
"checksum env_logger 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3ddf21e73e016298f5cb37d6ef8e8da8e39f91f9ec8b0df44b7deb16a9f8cd5b"
|
||||
"checksum error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9435d864e017c3c6afeac1654189b06cdb491cf2ff73dbf0d73b0f292f42ff8"
|
||||
"checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3"
|
||||
"checksum euclid 0.17.2 (registry+https://github.com/rust-lang/crates.io-index)" = "adfe67a9343519c1449d208da5998c6de582de698f7a39c4ac82ffba23d131a5"
|
||||
"checksum expat-sys 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c470ccb972f2088549b023db8029ed9da9426f5affbf9b62efff7009ab8ed5b1"
|
||||
"checksum flate2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9fac2277e84e5e858483756647a9d0aa8d9a2b7cba517fd84325a0aaa69a0909"
|
||||
|
@ -3821,9 +3823,9 @@ dependencies = [
|
|||
"checksum lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce12306c4739d86ee97c23139f3a34ddf0387bbf181bc7929d287025a8c3ef6b"
|
||||
"checksum leak 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bd100e01f1154f2908dfa7d02219aeab25d0b9c7fa955164192e3245255a0c73"
|
||||
"checksum leaky-cow 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40a8225d44241fd324a8af2806ba635fc7c8a7e9a7de4d5cf3ef54e71f5926fc"
|
||||
"checksum libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "5ba3df4dcb460b9dfbd070d41c94c19209620c191b0340b929ce748a2bcd42d2"
|
||||
"checksum libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)" = "f54263ad99207254cf58b5f701ecb432c717445ea2ee8af387334bdd1a03fdff"
|
||||
"checksum libdbus-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8720f9274907052cb50313f91201597868da9d625f8dd125f2aca5bddb7e83a1"
|
||||
"checksum libloading 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "be99f814beb3e9503a786a592c909692bb6d4fc5a695f6ed7987223acfbd5194"
|
||||
"checksum libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3ad660d7cb8c5822cd83d10897b0f1f1526792737a179e73896152f85b88c2"
|
||||
"checksum libz-sys 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "87f737ad6cc6fd6eefe3d9dc5412f1573865bded441300904d2f42269e140f16"
|
||||
"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
|
||||
"checksum log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89f010e843f2b1a31dbd316b3b8d443758bc634bed37aabade59c686d644e0a2"
|
||||
|
@ -3858,7 +3860,7 @@ dependencies = [
|
|||
"checksum objc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "877f30f37acef6749b1841cceab289707f211aecfc756553cd63976190e6cc2e"
|
||||
"checksum objc-foundation 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9"
|
||||
"checksum objc_id 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e4730aa1c64d722db45f7ccc4113a3e2c465d018de6db4d3e7dfe031e8c8a297"
|
||||
"checksum offscreen_gl_context 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f7698545d3c6db6a9f748cfd399880893d8876c3b980fa57c52b5a99b105abce"
|
||||
"checksum offscreen_gl_context 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b0daacb4e8c5760ab0addb80938f6bde4cd23b71b39a84d90080ae0c7215716a"
|
||||
"checksum ogg 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7137bf02687385302f4c0aecd77cfce052b69f5b4ee937be778e125c62f67e30"
|
||||
"checksum ogg_metadata 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fc665717454399cba557c55ad226148996e9266ee291f8a37a98bb2cded0a490"
|
||||
"checksum openssl 0.9.22 (registry+https://github.com/rust-lang/crates.io-index)" = "419ef26bb651d72b6c5a603bcc4e4856a362460e62352dfffa53de91d2e81181"
|
||||
|
@ -3893,7 +3895,7 @@ dependencies = [
|
|||
"checksum ref_slice 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "825740057197b7d43025e7faf6477eaabc03434e153233da02d1f44602f71527"
|
||||
"checksum regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1731164734096285ec2a5ec7fea5248ae2f5485b3feeb0115af4fda2183b2d1b"
|
||||
"checksum regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad890a5eef7953f55427c50575c680c42841653abd2b028b68cd223d157f62db"
|
||||
"checksum rust-webvr 0.9.9 (registry+https://github.com/rust-lang/crates.io-index)" = "68867bd48d6ce112476beaf5f5aa63b1182f53bb95928462442a9e9601dc116e"
|
||||
"checksum rust-webvr 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)" = "9629ce5b5c3cda05259d225e639851daf39c55c170358d3056205dd205deaab2"
|
||||
"checksum rust-webvr-api 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "712e22ba3c03a7075b40842ae91029a0ab96a81f95e97c0cf623800ec0cbac07"
|
||||
"checksum rustc-demangle 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3058a43ada2c2d0b92b3ae38007a2d0fa5e9db971be260e0171408a4ff471c95"
|
||||
"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda"
|
||||
|
@ -3944,7 +3946,7 @@ dependencies = [
|
|||
"checksum time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "ffd7ccbf969a892bf83f1e441126968a07a3941c24ff522a26af9f9f4585d1a3"
|
||||
"checksum tinyfiledialogs 3.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d92a5f7395a9e2895a2361c3121d4a0be0f8dac3be7d91841a5c1c5291b1c6dc"
|
||||
"checksum token_store 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a686838375fc11103b9c1529c6508320b7bd5e2401cd62831ca51b3e82e61849"
|
||||
"checksum toml 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "736b60249cb25337bc196faa43ee12c705e426f3d55c214d73a4e7be06f92cb4"
|
||||
"checksum toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a7540f4ffc193e0d3c94121edb19b055670d369f77d5804db11ae053a45b6e7e"
|
||||
"checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079"
|
||||
"checksum truetype 0.26.0 (registry+https://github.com/rust-lang/crates.io-index)" = "acec30350633d6dac9dc1a625786b6cbe9150664be941aac2c35ad7199eab877"
|
||||
"checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887"
|
||||
|
@ -3987,9 +3989,9 @@ dependencies = [
|
|||
"checksum ws 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "04614a58714f3fd4a8b1da4bcae9f031c532d35988c3d39627619248113f8be8"
|
||||
"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e"
|
||||
"checksum x11 2.17.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e5c4ac579b5d324dc4add02312b5d0e3e0218521e2d5779d526ac39ee4bb171"
|
||||
"checksum x11-clipboard 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "78a35cd979d17b95e0706ab1f3425ecc98565d3873902bd5944b9f5f388327d1"
|
||||
"checksum x11-clipboard 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2e7374c7699210cca7084ca61d57e09640fc744d1391808cb9ae2fe4ca9bd1df"
|
||||
"checksum x11-dl 2.17.3 (registry+https://github.com/rust-lang/crates.io-index)" = "29e78a65a3239e5511ffe2c832edb9224982ebf67bcaabc218ef1b07d8494b3e"
|
||||
"checksum xcb 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "400cebeaedeca931825f11606874080f18aa51370dd3d7e11bc08d5aac8b3142"
|
||||
"checksum xcb 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5e917a3f24142e9ff8be2414e36c649d47d6cc2ba81f16201cdef96e533e02de"
|
||||
"checksum xdg 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a66b7c2281ebde13cf4391d70d4c7e5946c3c25e72a7b859ca8f677dcd0b0c61"
|
||||
"checksum xi-unicode 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "12ea8eda4b1eb72f02d148402e23832d56a33f55d8c1b2d5bcdde91d79d47cb1"
|
||||
"checksum xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c1cb601d29fe2c2ac60a2b2e5e293994d87a1f6fa9687a31a15270f909be9c2"
|
||||
|
|
|
@ -78,7 +78,7 @@ kernel32-sys = "0.2"
|
|||
[build-dependencies]
|
||||
lazy_static = "1"
|
||||
log = "0.3"
|
||||
bindgen = { version = "0.33.1", optional = true, default-features = false }
|
||||
bindgen = { version = "0.33.2", optional = true, default-features = false }
|
||||
regex = {version = "0.2", optional = true}
|
||||
walkdir = "1.0"
|
||||
toml = {version = "0.2.1", optional = true, default-features = false}
|
||||
toml = {version = "0.4.5", optional = true, default-features = false}
|
||||
|
|
|
@ -43,42 +43,32 @@ mod bindings {
|
|||
use super::common::*;
|
||||
use super::super::PYTHON;
|
||||
use toml;
|
||||
use toml::value::Table;
|
||||
|
||||
const STRUCTS_FILE: &'static str = "structs.rs";
|
||||
const BINDINGS_FILE: &'static str = "bindings.rs";
|
||||
|
||||
fn read_config(path: &PathBuf) -> toml::Table {
|
||||
fn read_config(path: &PathBuf) -> Table {
|
||||
println!("cargo:rerun-if-changed={}", path.to_str().unwrap());
|
||||
update_last_modified(&path);
|
||||
|
||||
let mut contents = String::new();
|
||||
File::open(path).expect("Failed to open config file")
|
||||
.read_to_string(&mut contents).expect("Failed to read config file");
|
||||
let mut parser = toml::Parser::new(&contents);
|
||||
if let Some(result) = parser.parse() {
|
||||
result
|
||||
} else {
|
||||
use std::fmt::Write;
|
||||
let mut reason = String::from("Failed to parse config file:");
|
||||
for err in parser.errors.iter() {
|
||||
let parsed = &contents[..err.lo];
|
||||
write!(&mut reason, "\n* line {} column {}: {}",
|
||||
parsed.lines().count(),
|
||||
parsed.lines().last().map_or(0, |l| l.len()),
|
||||
err).unwrap();
|
||||
}
|
||||
panic!(reason)
|
||||
match toml::from_str::<toml::value::Table>(&contents) {
|
||||
Ok(result) => result,
|
||||
Err(e) => panic!("Failed to parse config file: {}", e)
|
||||
}
|
||||
}
|
||||
|
||||
lazy_static! {
|
||||
static ref CONFIG: toml::Table = {
|
||||
static ref CONFIG: Table = {
|
||||
// Load Gecko's binding generator config from the source tree.
|
||||
let path = PathBuf::from(env::var_os("MOZ_SRC").unwrap())
|
||||
.join("layout/style/ServoBindings.toml");
|
||||
read_config(&path)
|
||||
};
|
||||
static ref BUILD_CONFIG: toml::Table = {
|
||||
static ref BUILD_CONFIG: Table = {
|
||||
// Load build-specific config overrides.
|
||||
// FIXME: We should merge with CONFIG above instead of
|
||||
// forcing callers to do it.
|
||||
|
@ -169,7 +159,7 @@ mod bindings {
|
|||
fn mutable_borrowed_type(self, ty: &str) -> Builder;
|
||||
}
|
||||
|
||||
fn add_clang_args(mut builder: Builder, config: &toml::Table, matched_os: &mut bool) -> Builder {
|
||||
fn add_clang_args(mut builder: Builder, config: &Table, matched_os: &mut bool) -> Builder {
|
||||
fn add_args(mut builder: Builder, values: &[toml::Value]) -> Builder {
|
||||
for item in values.iter() {
|
||||
builder = builder.clang_arg(item.as_str().expect("Expect string in list"));
|
||||
|
@ -178,7 +168,7 @@ mod bindings {
|
|||
}
|
||||
for (k, v) in config.iter() {
|
||||
if k == "args" {
|
||||
builder = add_args(builder, v.as_slice().unwrap());
|
||||
builder = add_args(builder, v.as_array().unwrap().as_slice());
|
||||
continue;
|
||||
}
|
||||
let equal_idx = k.find('=').expect(&format!("Invalid key: {}", k));
|
||||
|
@ -324,11 +314,11 @@ mod bindings {
|
|||
|
||||
struct BuilderWithConfig<'a> {
|
||||
builder: Builder,
|
||||
config: &'a toml::Table,
|
||||
config: &'a Table,
|
||||
used_keys: HashSet<&'static str>,
|
||||
}
|
||||
impl<'a> BuilderWithConfig<'a> {
|
||||
fn new(builder: Builder, config: &'a toml::Table) -> Self {
|
||||
fn new(builder: Builder, config: &'a Table) -> Self {
|
||||
BuilderWithConfig {
|
||||
builder, config,
|
||||
used_keys: HashSet::new(),
|
||||
|
@ -342,7 +332,7 @@ mod bindings {
|
|||
let mut used_keys = self.used_keys;
|
||||
if let Some(list) = config.get(key) {
|
||||
used_keys.insert(key);
|
||||
builder = func(builder, list.as_slice().unwrap().iter());
|
||||
builder = func(builder, list.as_array().unwrap().as_slice().iter());
|
||||
}
|
||||
BuilderWithConfig { builder, config, used_keys }
|
||||
}
|
||||
|
@ -355,7 +345,9 @@ mod bindings {
|
|||
self.handle_items(key, |b, item| func(b, item.as_str().unwrap()))
|
||||
}
|
||||
fn handle_table_items<F>(self, key: &'static str, mut func: F) -> BuilderWithConfig<'a>
|
||||
where F: FnMut(Builder, &'a toml::Table) -> Builder {
|
||||
where
|
||||
F: FnMut(Builder, &'a Table) -> Builder
|
||||
{
|
||||
self.handle_items(key, |b, item| func(b, item.as_table().unwrap()))
|
||||
}
|
||||
fn handle_common(self, fixups: &mut Vec<Fixup>) -> BuilderWithConfig<'a> {
|
||||
|
@ -419,7 +411,7 @@ mod bindings {
|
|||
for item in iter {
|
||||
let item = item.as_table().unwrap();
|
||||
let name = item["enum"].as_str().unwrap();
|
||||
let variants = item["variants"].as_slice().unwrap().iter()
|
||||
let variants = item["variants"].as_array().unwrap().as_slice().iter()
|
||||
.map(|item| item.as_str().unwrap());
|
||||
map.insert(name.into(), RegexSet::new(variants).unwrap());
|
||||
}
|
||||
|
|
|
@ -139,7 +139,7 @@ that you didn't find it here so it can be added :)
|
|||
[stylo]: https://public.etherpad-mozilla.org/p/stylo
|
||||
[selector-impl]: http://doc.servo.org/selectors/parser/trait.SelectorImpl.html
|
||||
[selector-impl-ext]: http://doc.servo.org/style/selector_parser/trait.SelectorImplExt.html
|
||||
[servo-selector-impl]: http://doc.servo.org/style/servo_selector_parser/struct.SelectorImpl.html
|
||||
[servo-selector-impl]: http://doc.servo.org/style/servo/selector_parser/struct.SelectorImpl.html
|
||||
[tree-structural-pseudo-classes]: https://www.w3.org/TR/selectors4/#structural-pseudos
|
||||
[style-dom-traits]: http://doc.servo.org/style/dom/index.html
|
||||
[layout-wrapper]: http://doc.servo.org/layout/wrapper/index.html
|
||||
|
@ -149,9 +149,9 @@ that you didn't find it here so it can be added :)
|
|||
[mdn-pseudo-after]: https://developer.mozilla.org/en/docs/Web/CSS/::after
|
||||
[mdn-pseudo-selection]: https://developer.mozilla.org/en/docs/Web/CSS/::selection
|
||||
[stylist]: http://doc.servo.org/style/stylist/struct.Stylist.html
|
||||
[selectors-selectormap]: http://doc.servo.org/selectors/matching/struct.SelectorMap.html
|
||||
[selectors-rule]: http://doc.servo.org/selectors/matching/struct.Rule.html
|
||||
[per-pseudo-selectormap]: http://doc.servo.org/style/stylist/struct.PerPseudoElementSelectorMap.html
|
||||
[selectors-selectormap]: http://doc.servo.org/style/selector_map/struct.SelectorMap.html
|
||||
[selectors-rule]: http://doc.servo.org/style/stylist/struct.Rule.html
|
||||
[per-pseudo-selectormap]: http://doc.servo.org/style/selector_parser/struct.PerPseudoElementMap.html
|
||||
[per-origin-selectormap]: http://doc.servo.org/style/stylist/struct.PerOriginSelectorMap.html
|
||||
[docs-pipeline]: https://github.com/servo/servo/blob/master/docs/glossary.md#pipeline
|
||||
[properties-module]: http://doc.servo.org/style/properties/index.html
|
||||
|
|
|
@ -25,7 +25,7 @@ job-defaults:
|
|||
treeherder:
|
||||
platform: linux64/opt
|
||||
kind: build
|
||||
tier: 3
|
||||
tier: 2
|
||||
worker-type: aws-provisioner-v1/gecko-{level}-b-linux
|
||||
worker:
|
||||
implementation: docker-worker
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"files":{"Cargo.toml":"88154517e146758d019c015d3f194f364be77e927686c8018f0ff766cff9a756","build.rs":"032a1c51963894a421b0535f9227796d88768ac5f665a81d2edced69dc6d106a","src/callbacks.rs":"a8b6c8cc227d5a01406a431109520c0a0467777bae430c4b769a1305b820926c","src/clang.rs":"c816d5291ccdc1d4ba028ae817ef385048e1fb8443911d026af5c721a6d57854","src/codegen/bitfield_unit.rs":"bd1a19701f1766d0bae3bcb97d7c3cb3881d4b182c56b8f4dfd24b7cc87b5338","src/codegen/bitfield_unit_tests.rs":"2073ac6a36e0bc9afaef5b1207966817c8fb7a1a9f6368c3b1b8f79822efbfba","src/codegen/error.rs":"2613af1d833377fd4a70719f4a09951d9d45dc9227827b9a2a938a1bcaaea2dd","src/codegen/helpers.rs":"bcb951f320fd0948e341d8eabdb58567296d77bf1ae5040c05d967e6435a15d5","src/codegen/impl_debug.rs":"e2ffd5b6ed936698aa4b9e7e3459d353383792707ad51f829a18a822f69cab0e","src/codegen/impl_partialeq.rs":"e86050b98f57fa4496dbde0beea319a89e46290309d274f626361779549b95bd","src/codegen/mod.rs":"e154f6e30b29ce8fd075813a0052de363157a975446013b4032d4080dfd65cf3","src/codegen/struct_layout.rs":"3c4b2b4543c6aa1da03f7522ad7f831e95dc146cf5edd08ebd5facb1305daddb","src/extra_assertions.rs":"449549c4a7a50c3f0b06332452b2fb6c9b23f31ca8e5e1656fe6c7f21e8ef7fa","src/features.rs":"8c2148a6f922ca9cb0de2dd3ad77c4dd5734c4c219a5bea9d6b22c4367acb187","src/ir/analysis/derive_copy.rs":"14b53c53b337be00d59424371c07c6712d7cfc9a6735f9d913cda043fddce797","src/ir/analysis/derive_debug.rs":"1d6621c0fa5d899310cc175cb99703606ed34fd7f7ad77bb60f012f25ba504af","src/ir/analysis/derive_default.rs":"4fac04fc3019562cd213586680ecdcf8a3b3544ca3a5c5117f68e5c26e7ee0d9","src/ir/analysis/derive_hash.rs":"a50e849b4388115264c2d6afef5ab07e309d2469f4c3342fb683c799451e9e19","src/ir/analysis/derive_partialeq_or_partialord.rs":"46611c7f3caa0fe78243187742c4a36003dbc266de4c4390642e136bb889c43f","src/ir/analysis/has_destructor.rs":"d9aaaceba580b48eb0df4e5537b34b417c51ccdfeb8f6b72484f3bf4992317fe","src/ir/analysis/has_float.rs":"2a0465503d2c8247eaf916bd6a03594f3dc0370533d9a7c58cc5afb86693816c","src/ir/analysis/has_type_param_in_array.rs":"fcb1c78b6000f1f5eb8d8147e2afdaba9eb0e3a81b61e72537048dfdbeea7bcd","src/ir/analysis/has_vtable.rs":"37765e954ef792e369a58ccfe1d827a00fe9bce680466da1d6523671b94b6c92","src/ir/analysis/mod.rs":"ea5ace45c77e855674bb565ba0fef556f60e3293b0ddcf11d3a5a6ec15ab0648","src/ir/analysis/sizedness.rs":"3d3c8bde40604d53bb64273a3cbd8c55936a7dfe1de9b2ba92fc2c45572624b4","src/ir/analysis/template_params.rs":"5c6ee7a251a321ef5733e2e7ac3264621b4181268babcc008b69dbfc37691fb1","src/ir/annotations.rs":"ef106afcbe6084c18bd13a37ee3c1cdc9596bfb055db8c773d81f8f15fec3208","src/ir/comment.rs":"36f2a1d3970fdbf3d72c1f094043902747cde395215bdf7e9103926d9df011fd","src/ir/comp.rs":"d6811204a5cf68b4e9f1ef1dac80c7178394a18bc5165765e479925921671fa4","src/ir/context.rs":"7d28388430ad0587fab282ba50d3c536e58c53d84746ab557fe6d9dc0e917a01","src/ir/derive.rs":"1fd6ad621e3c60b950acbd51fbe386d1f0fadb7c1889c723245afff45e42e143","src/ir/dot.rs":"eca03a493a7fe48044b832c37c71d51f1bd4e8689feb6f1cb8bc0422541c7284","src/ir/enum_ty.rs":"05bfe0bc9abfee0f9692a443a9493b45b20ebf8275d15b1b4cba5c9cb63182b9","src/ir/function.rs":"a3ecac28cc75a61926a62f2082999c0ffe6ffeef2beb157367ade865cd899a9a","src/ir/int.rs":"1f61a472288afe489d9320bc8b13920333ece57891ae8570b4c4f25ab50688e6","src/ir/item.rs":"527b9a006dd1865cb77bac7e0e3826904c71b3b77679bcf7cd4ea63791dfa5ec","src/ir/item_kind.rs":"13048962657436a757ff9483d96f2ce351ec5f827ecab4921ed643f6f115c497","src/ir/layout.rs":"e3d1adf1ad2fa5bd96530cdd5097db3d9cc7b44d33ec23a04fcfccecd9cf4469","src/ir/mod.rs":"2eae90f207fad2e45957ec9287064992a419e3fc916aba84faff2ea25cbeb5ee","src/ir/module.rs":"c4d90bf38fe3672e01923734ccbdb7951ea929949d5f413a9c2aee12395a5094","src/ir/objc.rs":"05068c4fbf42429c4ac2a233c874f18ffcf7dc1744398e400a5a48d0e7a972f2","src/ir/template.rs":"bcd750450a4df0200a6e7958f9c96a09b91e3ccd29c60712f2b9d3458f1234aa","src/ir/traversal.rs":"a108f2b2a1b3d2e679274eead8cf6f8fc78454e88943527d56bb30b5f071f104","src/ir/ty.rs":"4d5f1b2e11f6fb7df3348bdab7775cdfa209e136afe84a7b0e862068e53e7183","src/ir/var.rs":"96cca085d33d75493ae2b4465272a044d96a0e98f7732f13456313af3cf5beb8","src/lib.rs":"8a2a28797d2c7a014082a48a91361ed8090941de204e786ac107f2adae5d9cda","src/log_stubs.rs":"6dfdd908b7c6453da416cf232893768f9480e551ca4add0858ef88bf71ee6ceb","src/main.rs":"e519053bcdde6bc88f60f955246a02d53b3db1cc5ccd1612e6675b790b7460b0","src/options.rs":"54b9fb74c8a998e3b3272f282493214371fbf42a9af6a54455824ef8b76d2445","src/parse.rs":"be7d13cc84fae79ec7b3aa9e77063fa475a48d74a854423e2c72d75006a25202","src/regex_set.rs":"a55241f2117f15729d174790f386e255fcb224b692325bbe6716dbb1d6874881","src/time.rs":"a02befb48d10dcc31e3f9571b2fa1c40f97fafe6f6ae7d7fc4f8fd01f1a169ba"},"package":"1657d607dd7a8e10b3181149f60f3b27ea0eac81058c09a1c791b8f6ead91f19"}
|
||||
{"files":{"Cargo.toml":"d2d15d8518f87e50143184b13e14139095b0a6aa627d4d5d3a2d12893e765f50","build.rs":"032a1c51963894a421b0535f9227796d88768ac5f665a81d2edced69dc6d106a","src/callbacks.rs":"49f382ebdb94c8f0aba5496f5283ae3cdcf6666a5c41c604e6356e674f9a072b","src/clang.rs":"33d94fa699f052b52a2804b85f49fa5de3a2404ae05801ef9eae16016bc841f1","src/codegen/bitfield_unit.rs":"bd1a19701f1766d0bae3bcb97d7c3cb3881d4b182c56b8f4dfd24b7cc87b5338","src/codegen/bitfield_unit_tests.rs":"2073ac6a36e0bc9afaef5b1207966817c8fb7a1a9f6368c3b1b8f79822efbfba","src/codegen/error.rs":"2613af1d833377fd4a70719f4a09951d9d45dc9227827b9a2a938a1bcaaea2dd","src/codegen/helpers.rs":"bcb951f320fd0948e341d8eabdb58567296d77bf1ae5040c05d967e6435a15d5","src/codegen/impl_debug.rs":"e2ffd5b6ed936698aa4b9e7e3459d353383792707ad51f829a18a822f69cab0e","src/codegen/impl_partialeq.rs":"e86050b98f57fa4496dbde0beea319a89e46290309d274f626361779549b95bd","src/codegen/mod.rs":"74e818d857fb5147f623e9287632d23c4bd0cf87de840034809992b74ff88bdc","src/codegen/struct_layout.rs":"698ed7340242d1cbedd38d400c7c83c32e2fa043c35dbc9a2eea4022251ffdb0","src/extra_assertions.rs":"449549c4a7a50c3f0b06332452b2fb6c9b23f31ca8e5e1656fe6c7f21e8ef7fa","src/features.rs":"8c2148a6f922ca9cb0de2dd3ad77c4dd5734c4c219a5bea9d6b22c4367acb187","src/ir/analysis/derive_copy.rs":"14b53c53b337be00d59424371c07c6712d7cfc9a6735f9d913cda043fddce797","src/ir/analysis/derive_debug.rs":"1d6621c0fa5d899310cc175cb99703606ed34fd7f7ad77bb60f012f25ba504af","src/ir/analysis/derive_default.rs":"4fac04fc3019562cd213586680ecdcf8a3b3544ca3a5c5117f68e5c26e7ee0d9","src/ir/analysis/derive_hash.rs":"a50e849b4388115264c2d6afef5ab07e309d2469f4c3342fb683c799451e9e19","src/ir/analysis/derive_partialeq_or_partialord.rs":"46611c7f3caa0fe78243187742c4a36003dbc266de4c4390642e136bb889c43f","src/ir/analysis/has_destructor.rs":"d9aaaceba580b48eb0df4e5537b34b417c51ccdfeb8f6b72484f3bf4992317fe","src/ir/analysis/has_float.rs":"2a0465503d2c8247eaf916bd6a03594f3dc0370533d9a7c58cc5afb86693816c","src/ir/analysis/has_type_param_in_array.rs":"fcb1c78b6000f1f5eb8d8147e2afdaba9eb0e3a81b61e72537048dfdbeea7bcd","src/ir/analysis/has_vtable.rs":"37765e954ef792e369a58ccfe1d827a00fe9bce680466da1d6523671b94b6c92","src/ir/analysis/mod.rs":"ea5ace45c77e855674bb565ba0fef556f60e3293b0ddcf11d3a5a6ec15ab0648","src/ir/analysis/sizedness.rs":"3d3c8bde40604d53bb64273a3cbd8c55936a7dfe1de9b2ba92fc2c45572624b4","src/ir/analysis/template_params.rs":"5c6ee7a251a321ef5733e2e7ac3264621b4181268babcc008b69dbfc37691fb1","src/ir/annotations.rs":"ef106afcbe6084c18bd13a37ee3c1cdc9596bfb055db8c773d81f8f15fec3208","src/ir/comment.rs":"36f2a1d3970fdbf3d72c1f094043902747cde395215bdf7e9103926d9df011fd","src/ir/comp.rs":"b24e6ab76235b46bb5a262e3a3f2fc685c26bd7482aea113231a942eeffd0cf5","src/ir/context.rs":"ccd99c814f1a8ba1f3a30667a8d90db13a50adc26620be08f907283d1c5f08a3","src/ir/derive.rs":"1fd6ad621e3c60b950acbd51fbe386d1f0fadb7c1889c723245afff45e42e143","src/ir/dot.rs":"d01f1621ab67e368d854a82bd6bb0b8dd52f3c2c733de8eaf81aece9543818cb","src/ir/enum_ty.rs":"98a4aa58e598b31e4dc2c052c90029f37b53b5c5cfcbd216d4b0e8c73454813f","src/ir/function.rs":"cce97e7cd6ffb7d5ae40e6be1b82e7ae899d9ea9cf7c8f97380486ac7cc120e6","src/ir/int.rs":"1f61a472288afe489d9320bc8b13920333ece57891ae8570b4c4f25ab50688e6","src/ir/item.rs":"03477f4f4abfebc92ce4c9a202e33c86615dfffe3e6d1e0a201d2e85eecb9917","src/ir/item_kind.rs":"dbeae8c4fd0e5c9485d325aea040e056a1f2cd6d43fc927dee8fe1c0c59a7197","src/ir/layout.rs":"e3d1adf1ad2fa5bd96530cdd5097db3d9cc7b44d33ec23a04fcfccecd9cf4469","src/ir/mod.rs":"2eae90f207fad2e45957ec9287064992a419e3fc916aba84faff2ea25cbeb5ee","src/ir/module.rs":"c4d90bf38fe3672e01923734ccbdb7951ea929949d5f413a9c2aee12395a5094","src/ir/objc.rs":"05068c4fbf42429c4ac2a233c874f18ffcf7dc1744398e400a5a48d0e7a972f2","src/ir/template.rs":"bcd750450a4df0200a6e7958f9c96a09b91e3ccd29c60712f2b9d3458f1234aa","src/ir/traversal.rs":"da73d3fafa594fb12c13136f5c9d6e6ee0d6c7fa4b6e57863638d4ba5ef55dfa","src/ir/ty.rs":"7d16711a053f1b4e9d11d3c5665062a58278a869b196a24b7b2a62227eb3a38f","src/ir/var.rs":"57c8aa9f834c6f06418f7d471b1771bbb915821ef0d194b383be60092edca5f7","src/lib.rs":"99ed57a26e794ce724e434af0bf4f72b199bd0e1c42833324beb939acda9af33","src/log_stubs.rs":"6dfdd908b7c6453da416cf232893768f9480e551ca4add0858ef88bf71ee6ceb","src/main.rs":"e519053bcdde6bc88f60f955246a02d53b3db1cc5ccd1612e6675b790b7460b0","src/options.rs":"3df0214f428c221604420f8eb511b1c1e6d9326d1c6d3d2dea48278f833f9b77","src/parse.rs":"be7d13cc84fae79ec7b3aa9e77063fa475a48d74a854423e2c72d75006a25202","src/regex_set.rs":"a55241f2117f15729d174790f386e255fcb224b692325bbe6716dbb1d6874881","src/time.rs":"a02befb48d10dcc31e3f9571b2fa1c40f97fafe6f6ae7d7fc4f8fd01f1a169ba"},"package":"603ed8d8392ace9581e834e26bd09799bf1e989a79bd1aedbb893e72962bdc6e"}
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
[package]
|
||||
name = "bindgen"
|
||||
version = "0.33.1"
|
||||
version = "0.33.2"
|
||||
authors = ["Jyun-Yan You <jyyou.tw@gmail.com>", "Emilio Cobos Álvarez <emilio@crisal.io>", "Nick Fitzgerald <fitzgen@gmail.com>", "The Servo project developers"]
|
||||
build = "build.rs"
|
||||
include = ["Cargo.toml", "build.rs", "src/*.rs", "src/**/*.rs"]
|
||||
|
@ -38,7 +38,7 @@ version = "0.2"
|
|||
version = "0.1.0"
|
||||
|
||||
[dependencies.clang-sys]
|
||||
version = "0.21.0"
|
||||
version = "0.22.0"
|
||||
features = ["runtime", "clang_3_9"]
|
||||
|
||||
[dependencies.clap]
|
||||
|
|
|
@ -36,14 +36,23 @@ pub trait ParseCallbacks: fmt::Debug + UnwindSafe {
|
|||
}
|
||||
|
||||
/// This function should return whether, given the a given enum variant
|
||||
/// name, and value, returns whether this enum variant will forcibly be a
|
||||
/// constant.
|
||||
/// name, and value, this enum variant will forcibly be a constant.
|
||||
fn enum_variant_behavior(
|
||||
&self,
|
||||
_enum_name: Option<&str>,
|
||||
_variant_name: &str,
|
||||
_original_variant_name: &str,
|
||||
_variant_value: EnumVariantValue,
|
||||
) -> Option<EnumVariantCustomBehavior> {
|
||||
None
|
||||
}
|
||||
|
||||
/// Allows to rename an enum variant, replacing `_original_variant_name`.
|
||||
fn enum_variant_name(
|
||||
&self,
|
||||
_enum_name: Option<&str>,
|
||||
_original_variant_name: &str,
|
||||
_variant_value: EnumVariantValue,
|
||||
) -> Option<String> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
|
|
@ -903,8 +903,8 @@ impl Type {
|
|||
/// have a valid layout.
|
||||
pub fn fallible_layout(&self) -> Result<::ir::layout::Layout, LayoutError> {
|
||||
use ir::layout::Layout;
|
||||
let size = try!(self.fallible_size());
|
||||
let align = try!(self.fallible_align());
|
||||
let size = self.fallible_size()?;
|
||||
let align = self.fallible_align()?;
|
||||
Ok(Layout::new(size, align))
|
||||
}
|
||||
|
||||
|
|
|
@ -2228,7 +2228,7 @@ impl<'a> EnumBuilder<'a> {
|
|||
self,
|
||||
ctx: &BindgenContext,
|
||||
variant: &EnumVariant,
|
||||
mangling_prefix: Option<&String>,
|
||||
mangling_prefix: Option<&str>,
|
||||
rust_ty: quote::Tokens,
|
||||
result: &mut CodegenResult<'b>,
|
||||
) -> Self {
|
||||
|
@ -2548,9 +2548,9 @@ impl CodeGenerator for Enum {
|
|||
|
||||
let constant_mangling_prefix = if ctx.options().prepend_enum_name {
|
||||
if enum_ty.name().is_none() {
|
||||
parent_canonical_name.as_ref().map(|n| &*n)
|
||||
parent_canonical_name.as_ref().map(|n| &**n)
|
||||
} else {
|
||||
Some(&name)
|
||||
Some(&*name)
|
||||
}
|
||||
} else {
|
||||
None
|
||||
|
|
|
@ -155,10 +155,7 @@ impl<'a> StructLayoutTracker<'a> {
|
|||
field_ty: &Type,
|
||||
field_offset: Option<usize>,
|
||||
) -> Option<quote::Tokens> {
|
||||
let mut field_layout = match field_ty.layout(self.ctx) {
|
||||
Some(l) => l,
|
||||
None => return None,
|
||||
};
|
||||
let mut field_layout = field_ty.layout(self.ctx)?;
|
||||
|
||||
if let TypeKind::Array(inner, len) =
|
||||
*field_ty.canonical_type(self.ctx).kind()
|
||||
|
|
|
@ -1169,7 +1169,7 @@ impl CompInfo {
|
|||
}
|
||||
}
|
||||
|
||||
let kind = try!(kind);
|
||||
let kind = kind?;
|
||||
|
||||
debug!("CompInfo::from_ty({:?}, {:?})", kind, cursor);
|
||||
|
||||
|
|
|
@ -475,13 +475,13 @@ impl<'ctx> Iterator for WhitelistedItemsTraversal<'ctx> {
|
|||
|
||||
fn next(&mut self) -> Option<ItemId> {
|
||||
loop {
|
||||
match self.traversal.next() {
|
||||
None => return None,
|
||||
Some(id) if self.ctx.resolve_item(id).is_blacklisted(self.ctx) => {
|
||||
let id = self.traversal.next()?;
|
||||
|
||||
if self.ctx.resolve_item(id).is_blacklisted(self.ctx) {
|
||||
continue
|
||||
}
|
||||
Some(id) => return Some(id),
|
||||
}
|
||||
|
||||
return Some(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1009,11 +1009,9 @@ impl BindgenContext {
|
|||
let comp_item_ids: Vec<ItemId> = self.items
|
||||
.iter()
|
||||
.filter_map(|(id, item)| {
|
||||
if let Some(ty) = item.kind().as_type() {
|
||||
if let Some(_comp) = ty.as_comp() {
|
||||
if item.kind().as_type()?.is_comp() {
|
||||
return Some(id);
|
||||
}
|
||||
}
|
||||
None
|
||||
})
|
||||
.cloned()
|
||||
|
@ -1062,6 +1060,7 @@ impl BindgenContext {
|
|||
match *ty.kind() {
|
||||
TypeKind::Comp(..) |
|
||||
TypeKind::TemplateAlias(..) |
|
||||
TypeKind::Enum(..) |
|
||||
TypeKind::Alias(..) => {}
|
||||
_ => continue,
|
||||
}
|
||||
|
@ -1673,10 +1672,7 @@ impl BindgenContext {
|
|||
}
|
||||
clang_sys::CXCursor_TemplateRef => {
|
||||
let (template_decl_cursor, template_decl_id, num_expected_template_args) =
|
||||
match self.get_declaration_info_for_template_instantiation(child) {
|
||||
Some(info) => info,
|
||||
None => return None,
|
||||
};
|
||||
self.get_declaration_info_for_template_instantiation(child)?;
|
||||
|
||||
if num_expected_template_args == 0 ||
|
||||
child.has_at_least_num_children(
|
||||
|
@ -2065,7 +2061,7 @@ impl BindgenContext {
|
|||
|
||||
/// Has the item with the given `name` and `id` been replaced by another
|
||||
/// type?
|
||||
pub fn is_replaced_type<Id: Into<ItemId>>(&self, path: &[String], id: Id) -> bool {
|
||||
fn is_replaced_type<Id: Into<ItemId>>(&self, path: &[String], id: Id) -> bool {
|
||||
let id = id.into();
|
||||
match self.replacements.get(path) {
|
||||
Some(replaced_by) if *replaced_by != id => true,
|
||||
|
|
|
@ -25,16 +25,16 @@ pub fn write_dot_file<P>(ctx: &BindgenContext, path: P) -> io::Result<()>
|
|||
where
|
||||
P: AsRef<Path>,
|
||||
{
|
||||
let file = try!(File::create(path));
|
||||
let file = File::create(path)?;
|
||||
let mut dot_file = io::BufWriter::new(file);
|
||||
try!(writeln!(&mut dot_file, "digraph {{"));
|
||||
writeln!(&mut dot_file, "digraph {{")?;
|
||||
|
||||
let mut err: Option<io::Result<_>> = None;
|
||||
|
||||
for (id, item) in ctx.items() {
|
||||
let is_whitelisted = ctx.whitelisted_items().contains(id);
|
||||
|
||||
try!(writeln!(
|
||||
writeln!(
|
||||
&mut dot_file,
|
||||
r#"{} [fontname="courier", color={}, label=< <table border="0" align="left">"#,
|
||||
id.as_usize(),
|
||||
|
@ -43,9 +43,9 @@ where
|
|||
} else {
|
||||
"gray"
|
||||
}
|
||||
));
|
||||
try!(item.dot_attributes(ctx, &mut dot_file));
|
||||
try!(writeln!(&mut dot_file, r#"</table> >];"#));
|
||||
)?;
|
||||
item.dot_attributes(ctx, &mut dot_file)?;
|
||||
writeln!(&mut dot_file, r#"</table> >];"#)?;
|
||||
|
||||
item.trace(
|
||||
ctx,
|
||||
|
@ -79,16 +79,16 @@ where
|
|||
|
||||
if let Some(module) = item.as_module() {
|
||||
for child in module.children() {
|
||||
try!(writeln!(
|
||||
writeln!(
|
||||
&mut dot_file,
|
||||
"{} -> {} [style=dotted, color=gray]",
|
||||
item.id().as_usize(),
|
||||
child.as_usize()
|
||||
));
|
||||
)?;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try!(writeln!(&mut dot_file, "}}"));
|
||||
writeln!(&mut dot_file, "}}")?;
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
@ -98,22 +98,31 @@ impl Enum {
|
|||
};
|
||||
if let Some(val) = value {
|
||||
let name = cursor.spelling();
|
||||
let annotations = Annotations::new(&cursor);
|
||||
let custom_behavior = ctx.parse_callbacks()
|
||||
.and_then(
|
||||
|t| t.enum_variant_behavior(type_name, &name, val),
|
||||
)
|
||||
.and_then(|callbacks| {
|
||||
callbacks.enum_variant_behavior(type_name, &name, val)
|
||||
})
|
||||
.or_else(|| {
|
||||
Annotations::new(&cursor).and_then(
|
||||
|anno| if anno.hide() {
|
||||
let annotations = annotations.as_ref()?;
|
||||
if annotations.hide() {
|
||||
Some(EnumVariantCustomBehavior::Hide)
|
||||
} else if anno.constify_enum_variant() {
|
||||
} else if annotations.constify_enum_variant() {
|
||||
Some(EnumVariantCustomBehavior::Constify)
|
||||
} else {
|
||||
None
|
||||
},
|
||||
)
|
||||
}
|
||||
});
|
||||
|
||||
let name = ctx.parse_callbacks()
|
||||
.and_then(|callbacks| {
|
||||
callbacks.enum_variant_name(type_name, &name, val)
|
||||
})
|
||||
.or_else(|| {
|
||||
annotations.as_ref()?.use_instead_of()?.last().cloned()
|
||||
})
|
||||
.unwrap_or(name);
|
||||
|
||||
let comment = cursor.raw_comment();
|
||||
variants.push(EnumVariant::new(
|
||||
name,
|
||||
|
|
|
@ -151,11 +151,11 @@ impl DotAttributes for Function {
|
|||
if let Some(ref mangled) = self.mangled_name {
|
||||
let mangled: String =
|
||||
mangled.chars().flat_map(|c| c.escape_default()).collect();
|
||||
try!(writeln!(
|
||||
writeln!(
|
||||
out,
|
||||
"<tr><td>mangled name</td><td>{}</td></tr>",
|
||||
mangled
|
||||
));
|
||||
)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
@ -422,11 +422,11 @@ impl FunctionSig {
|
|||
let ty_ret_type = if cursor.kind() == CXCursor_ObjCInstanceMethodDecl ||
|
||||
cursor.kind() == CXCursor_ObjCClassMethodDecl
|
||||
{
|
||||
try!(ty.ret_type().or_else(|| cursor.ret_type()).ok_or(
|
||||
ty.ret_type().or_else(|| cursor.ret_type()).ok_or(
|
||||
ParseError::Continue,
|
||||
))
|
||||
)?
|
||||
} else {
|
||||
try!(ty.ret_type().ok_or(ParseError::Continue))
|
||||
ty.ret_type().ok_or(ParseError::Continue)?
|
||||
};
|
||||
let ret = Item::from_ty_or_ref(ty_ret_type, cursor, None, ctx);
|
||||
let call_conv = ty.call_conv();
|
||||
|
@ -521,7 +521,7 @@ impl ClangSubItemParser for Function {
|
|||
|
||||
// Grab the signature using Item::from_ty.
|
||||
let sig =
|
||||
try!(Item::from_ty(&cursor.cur_type(), cursor, None, context));
|
||||
Item::from_ty(&cursor.cur_type(), cursor, None, context)?;
|
||||
|
||||
let mut name = cursor.spelling();
|
||||
assert!(!name.is_empty(), "Empty function name?");
|
||||
|
|
|
@ -1089,13 +1089,13 @@ impl DotAttributes for Item {
|
|||
where
|
||||
W: io::Write,
|
||||
{
|
||||
try!(writeln!(
|
||||
writeln!(
|
||||
out,
|
||||
"<tr><td>{:?}</td></tr>
|
||||
<tr><td>name</td><td>{}</td></tr>",
|
||||
self.id,
|
||||
self.name(ctx).get()
|
||||
));
|
||||
)?;
|
||||
|
||||
if self.is_opaque(ctx, &()) {
|
||||
writeln!(out, "<tr><td>opaque</td><td>true</td></tr>")?;
|
||||
|
|
|
@ -135,11 +135,11 @@ impl DotAttributes for ItemKind {
|
|||
where
|
||||
W: io::Write,
|
||||
{
|
||||
try!(writeln!(
|
||||
writeln!(
|
||||
out,
|
||||
"<tr><td>kind</td><td>{}</td></tr>",
|
||||
self.kind_name()
|
||||
));
|
||||
)?;
|
||||
|
||||
match *self {
|
||||
ItemKind::Module(ref module) => module.dot_attributes(ctx, out),
|
||||
|
|
|
@ -469,10 +469,7 @@ where
|
|||
type Item = ItemId;
|
||||
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
let id = match self.queue.next() {
|
||||
None => return None,
|
||||
Some(id) => id,
|
||||
};
|
||||
let id = self.queue.next()?;
|
||||
|
||||
let newly_discovered = self.seen.add(None, id);
|
||||
debug_assert!(
|
||||
|
|
|
@ -423,20 +423,20 @@ impl DotAttributes for Type {
|
|||
W: io::Write,
|
||||
{
|
||||
if let Some(ref layout) = self.layout {
|
||||
try!(writeln!(
|
||||
writeln!(
|
||||
out,
|
||||
"<tr><td>size</td><td>{}</td></tr>
|
||||
<tr><td>align</td><td>{}</td></tr>",
|
||||
layout.size,
|
||||
layout.align
|
||||
));
|
||||
)?;
|
||||
if layout.packed {
|
||||
try!(writeln!(out, "<tr><td>packed</td><td>true</td></tr>"));
|
||||
writeln!(out, "<tr><td>packed</td><td>true</td></tr>")?;
|
||||
}
|
||||
}
|
||||
|
||||
if self.is_const {
|
||||
try!(writeln!(out, "<tr><td>const</td><td>true</td></tr>"));
|
||||
writeln!(out, "<tr><td>const</td><td>true</td></tr>")?;
|
||||
}
|
||||
|
||||
self.kind.dot_attributes(ctx, out)
|
||||
|
@ -818,7 +818,7 @@ impl Type {
|
|||
// trying to see if it has a valid return type.
|
||||
if ty.ret_type().is_some() {
|
||||
let signature =
|
||||
try!(FunctionSig::from_ty(ty, &location, ctx));
|
||||
FunctionSig::from_ty(ty, &location, ctx)?;
|
||||
TypeKind::Function(signature)
|
||||
// Same here, with template specialisations we can safely
|
||||
// assume this is a Comp(..)
|
||||
|
@ -1122,7 +1122,7 @@ impl Type {
|
|||
CXType_FunctionNoProto |
|
||||
CXType_FunctionProto => {
|
||||
let signature =
|
||||
try!(FunctionSig::from_ty(ty, &location, ctx));
|
||||
FunctionSig::from_ty(ty, &location, ctx)?;
|
||||
TypeKind::Function(signature)
|
||||
}
|
||||
CXType_Typedef => {
|
||||
|
|
|
@ -98,15 +98,15 @@ impl DotAttributes for Var {
|
|||
W: io::Write,
|
||||
{
|
||||
if self.is_const {
|
||||
try!(writeln!(out, "<tr><td>const</td><td>true</td></tr>"));
|
||||
writeln!(out, "<tr><td>const</td><td>true</td></tr>")?;
|
||||
}
|
||||
|
||||
if let Some(ref mangled) = self.mangled_name {
|
||||
try!(writeln!(
|
||||
writeln!(
|
||||
out,
|
||||
"<tr><td>mangled name</td><td>{}</td></tr>",
|
||||
mangled
|
||||
));
|
||||
)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
@ -307,10 +307,7 @@ fn parse_macro(
|
|||
) -> Option<(Vec<u8>, cexpr::expr::EvalResult)> {
|
||||
use cexpr::{expr, nom};
|
||||
|
||||
let mut cexpr_tokens = match cursor.cexpr_tokens() {
|
||||
None => return None,
|
||||
Some(tokens) => tokens,
|
||||
};
|
||||
let mut cexpr_tokens = cursor.cexpr_tokens()?;
|
||||
|
||||
let parser = expr::IdentifierParser::new(ctx.parsed_macros());
|
||||
|
||||
|
@ -327,9 +324,7 @@ fn parse_macro(
|
|||
// See:
|
||||
// https://bugs.llvm.org//show_bug.cgi?id=9069
|
||||
// https://reviews.llvm.org/D26446
|
||||
if cexpr_tokens.pop().is_none() {
|
||||
return None;
|
||||
}
|
||||
cexpr_tokens.pop()?;
|
||||
|
||||
match parser.macro_definition(&cexpr_tokens) {
|
||||
nom::IResult::Done(_, (id, val)) => Some((id.into(), val)),
|
||||
|
@ -341,10 +336,7 @@ fn parse_int_literal_tokens(cursor: &clang::Cursor) -> Option<i64> {
|
|||
use cexpr::{expr, nom};
|
||||
use cexpr::expr::EvalResult;
|
||||
|
||||
let cexpr_tokens = match cursor.cexpr_tokens() {
|
||||
None => return None,
|
||||
Some(tokens) => tokens,
|
||||
};
|
||||
let cexpr_tokens = cursor.cexpr_tokens()?;
|
||||
|
||||
// TODO(emilio): We can try to parse other kinds of literals.
|
||||
match expr::expr(&cexpr_tokens) {
|
||||
|
|
|
@ -147,13 +147,13 @@ impl Default for CodegenConfig {
|
|||
/// use bindgen::builder;
|
||||
///
|
||||
/// // Configure and generate bindings.
|
||||
/// let bindings = try!(builder().header("path/to/input/header")
|
||||
/// let bindings = builder().header("path/to/input/header")
|
||||
/// .whitelisted_type("SomeCoolClass")
|
||||
/// .whitelisted_function("do_some_cool_thing")
|
||||
/// .generate());
|
||||
/// .generate()?;
|
||||
///
|
||||
/// // Write the generated bindings to an output file.
|
||||
/// try!(bindings.write_to_file("path/to/output.rs"));
|
||||
/// bindings.write_to_file("path/to/output.rs")?;
|
||||
/// ```
|
||||
#[derive(Debug, Default)]
|
||||
pub struct Builder {
|
||||
|
@ -673,7 +673,7 @@ impl Builder {
|
|||
|
||||
/// Hide the given type from the generated bindings. Regular expressions are
|
||||
/// supported.
|
||||
#[deprecated = "Use blacklist_type instead"]
|
||||
#[deprecated(note = "Use blacklist_type instead")]
|
||||
pub fn hide_type<T: AsRef<str>>(self, arg: T) -> Builder {
|
||||
self.blacklist_type(arg)
|
||||
}
|
||||
|
@ -695,7 +695,7 @@ impl Builder {
|
|||
/// Whitelist the given type so that it (and all types that it transitively
|
||||
/// refers to) appears in the generated bindings. Regular expressions are
|
||||
/// supported.
|
||||
#[deprecated = "use whitelist_type instead"]
|
||||
#[deprecated(note = "use whitelist_type instead")]
|
||||
pub fn whitelisted_type<T: AsRef<str>>(self, arg: T) -> Builder {
|
||||
self.whitelist_type(arg)
|
||||
}
|
||||
|
@ -719,7 +719,7 @@ impl Builder {
|
|||
/// Whitelist the given function.
|
||||
///
|
||||
/// Deprecated: use whitelist_function instead.
|
||||
#[deprecated = "use whitelist_function instead"]
|
||||
#[deprecated(note = "use whitelist_function instead")]
|
||||
pub fn whitelisted_function<T: AsRef<str>>(self, arg: T) -> Builder {
|
||||
self.whitelist_function(arg)
|
||||
}
|
||||
|
@ -735,7 +735,7 @@ impl Builder {
|
|||
/// Whitelist the given variable.
|
||||
///
|
||||
/// Deprecated: use whitelist_var instead.
|
||||
#[deprecated = "use whitelist_var instead"]
|
||||
#[deprecated(note = "use whitelist_var instead")]
|
||||
pub fn whitelisted_var<T: AsRef<str>>(self, arg: T) -> Builder {
|
||||
self.whitelist_var(arg)
|
||||
}
|
||||
|
@ -1648,7 +1648,7 @@ impl Bindings {
|
|||
{
|
||||
let _t = time::Timer::new("parse")
|
||||
.with_output(time_phases);
|
||||
try!(parse(&mut context));
|
||||
parse(&mut context)?;
|
||||
}
|
||||
|
||||
let (items, options) = codegen::codegen(context);
|
||||
|
|
|
@ -545,7 +545,7 @@ where
|
|||
}
|
||||
|
||||
let output = if let Some(path) = matches.value_of("output") {
|
||||
let file = try!(File::create(path));
|
||||
let file = File::create(path)?;
|
||||
Box::new(io::BufWriter::new(file)) as Box<io::Write>
|
||||
} else {
|
||||
Box::new(io::BufWriter::new(io::stdout())) as Box<io::Write>
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"files":{".travis.yml":"136bc7c0b31a2317ca827c49b25aac46ae685e0c401a783a9b0505bb1405b30b","CHANGELOG.md":"ceef7978611ef048a460d1f0adf7d0691c79b5633896f119b7a772141805a0c4","CONTRIBUTING.md":"4e2a45992604f07a37030bb1fc598c6f54a1785747c4f37a15a37481bbdecce8","Cargo.toml":"4bc5eb5d8417ec3803017855be3b927844c998fbd1ad38e336a1ea0f79dd939e","LICENSE.txt":"cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30","README.md":"3f0af7f23c53b744eb9725149c5619fdac5d2cd127baec23dc7ec9bbea6bd541","appveyor.yml":"c9ab8ab1ab028b27d2be176e994a0d6a255cf8bcc36e15868472b6b8abf33fac","build.rs":"acc5929fb75a7a84f18c8beb804dfe7c5c585a3be492e988938df07c54a1b37b","ci/before_install.sh":"711c9d0539fa0372980c3a288d9482a0e46d3ba0fb8f7c7c110d6488a8ec4de5","ci/install.bat":"828b814fbbda1c0df09de728913f2cd438f3006f2574dc79a857459ab49d38c2","ci/script.sh":"1bb1cd29bd9635cc126cdcbd6c02f3500620a231a86726bf2165a4b74baaf433","ci/test_script.bat":"73462f51aaa9a1c14ce9f55c41dc3672df64faa9789725384ae4f28d8ba3c90b","clippy.toml":"acef14b9acffa18d1069ae08a4e8fe824a614f91b0bc71a6b1c68e4d885397e6","src/lib.rs":"8cb04fe36afba7bff961e18bbfd228c3253af8683949237b563f8f9125313706","src/link.rs":"9ba06ee65e445ca30b43844e654302565f023afb310e8a37f08a5150451ce76e","src/support.rs":"9929cdf5ad0896248938282d0e621be34855bca9a1eb6b7a02a174ace58a9d86","tests/header.h":"b1cf564b21d76db78529d1934e1481a5f0452fdedc6e32954608293c310498b6","tests/lib.rs":"e5e8a60bcaec3b5d043fde4a993d397adb56454d0b2a6adaa15df0535246f909"},"package":"00048189ee171715296dfe3b2fcfd439563c7bfec0d98d3976ce3402d62c8f07"}
|
||||
{"files":{".travis.yml":"d5c89494c836e00ec8c3c02c9e228bf5dc34aabff203c37662a248e2da4bda05","CHANGELOG.md":"2d6ade5cd80d388392915d24f4712e8fd604579c7b26d48aa99908499e08817d","CONTRIBUTING.md":"4e2a45992604f07a37030bb1fc598c6f54a1785747c4f37a15a37481bbdecce8","Cargo.toml":"c2256b278d66bf80e6b62e58efa62a5fb98665c8c23dec68829b2c9fc2191962","LICENSE.txt":"cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30","README.md":"dff1b472fe1edbc6059ff5a96e595fa8dab9e9e133d10fd761cf5dfdcc80f4c6","appveyor.yml":"c9ab8ab1ab028b27d2be176e994a0d6a255cf8bcc36e15868472b6b8abf33fac","build.rs":"e6cf2ec64466b21f3e6eb8aaf7327ccdfcc77a2067e0e19ee5e2a6f57117c09b","ci/before_install.sh":"711c9d0539fa0372980c3a288d9482a0e46d3ba0fb8f7c7c110d6488a8ec4de5","ci/install.bat":"fb636c3511ba038ccf805755ef6542237cc595e905edcd61d56abd7163321f76","ci/script.sh":"1bb1cd29bd9635cc126cdcbd6c02f3500620a231a86726bf2165a4b74baaf433","ci/test_script.bat":"73462f51aaa9a1c14ce9f55c41dc3672df64faa9789725384ae4f28d8ba3c90b","clippy.toml":"acef14b9acffa18d1069ae08a4e8fe824a614f91b0bc71a6b1c68e4d885397e6","src/lib.rs":"a0410d2e23f808ba441e7bebe84785e85582c8130613e49c7b3b98e0aaf55b66","src/link.rs":"7323c3ddcd8038b899c21f7087666628f88e9cb430900549855ea78717824e6f","src/support.rs":"ecd0489662caad0a13ea468cbbbec3ca62ba9796a6e24aabb392978a3455ebfd","tests/header.h":"b1cf564b21d76db78529d1934e1481a5f0452fdedc6e32954608293c310498b6","tests/lib.rs":"e5e8a60bcaec3b5d043fde4a993d397adb56454d0b2a6adaa15df0535246f909"},"package":"939a1a34310b120d26eba35c29475933128b0ec58e24b43327f8dbe6036fc538"}
|
|
@ -9,7 +9,6 @@ addons:
|
|||
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
|
||||
rust: stable
|
||||
|
||||
|
@ -17,12 +16,6 @@ env:
|
|||
- LLVM_VERSION=3.5 CLANG_VERSION=clang_3_5
|
||||
- LLVM_VERSION=5.0 CLANG_VERSION=clang_5_0
|
||||
|
||||
# FIXME: I have no idea why this build is failing.
|
||||
matrix:
|
||||
allow_failures:
|
||||
- os: osx
|
||||
env: LLVM_VERSION=5.0 CLANG_VERSION=clang_5_0
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.cargo
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
## [0.22.0] - 2018-03-11
|
||||
|
||||
### Added
|
||||
- Added support for `clang` 6.0.x
|
||||
- Bumped `libc` version to `0.2.39`
|
||||
- Bumped `libloading` version to `0.5.0`
|
||||
|
||||
## [0.21.2] - 2018-02-17
|
||||
|
||||
### Changed
|
||||
- Added original errors to error messages
|
||||
- Added support for searching for libraries in `LD_LIBRARY_PATH` directories
|
||||
|
||||
## [0.21.1] - 2017-11-24
|
||||
|
||||
### Changed
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
[package]
|
||||
name = "clang-sys"
|
||||
version = "0.21.1"
|
||||
version = "0.22.0"
|
||||
authors = ["Kyle Mayes <kyle@mayeses.com>"]
|
||||
build = "build.rs"
|
||||
links = "clang"
|
||||
|
@ -29,10 +29,10 @@ optional = true
|
|||
version = "0.2.11"
|
||||
|
||||
[dependencies.libc]
|
||||
version = "0.2.14"
|
||||
version = "0.2.39"
|
||||
|
||||
[dependencies.libloading]
|
||||
version = "0.4.0"
|
||||
version = "0.5.0"
|
||||
optional = true
|
||||
[build-dependencies.clippy]
|
||||
version = "0.0.*"
|
||||
|
@ -49,11 +49,13 @@ clang_3_8 = ["gte_clang_3_6", "gte_clang_3_7", "gte_clang_3_8"]
|
|||
clang_3_9 = ["gte_clang_3_6", "gte_clang_3_7", "gte_clang_3_8", "gte_clang_3_9"]
|
||||
clang_4_0 = ["gte_clang_3_6", "gte_clang_3_7", "gte_clang_3_8", "gte_clang_3_9", "gte_clang_4_0"]
|
||||
clang_5_0 = ["gte_clang_3_6", "gte_clang_3_7", "gte_clang_3_8", "gte_clang_3_9", "gte_clang_4_0", "gte_clang_5_0"]
|
||||
clang_6_0 = ["gte_clang_3_6", "gte_clang_3_7", "gte_clang_3_8", "gte_clang_3_9", "gte_clang_4_0", "gte_clang_5_0", "gte_clang_6_0"]
|
||||
gte_clang_3_6 = []
|
||||
gte_clang_3_7 = []
|
||||
gte_clang_3_8 = []
|
||||
gte_clang_3_9 = []
|
||||
gte_clang_4_0 = []
|
||||
gte_clang_5_0 = []
|
||||
gte_clang_6_0 = []
|
||||
runtime = ["libloading"]
|
||||
static = []
|
||||
|
|
|
@ -33,6 +33,8 @@ To target a version of `libclang`, enable one of the following Cargo features:
|
|||
([Documentation](https://kylemayes.github.io/clang-sys/4_0/clang_sys))
|
||||
* `clang_5_0` - requires `libclang` 5.0 or later
|
||||
([Documentation](https://kylemayes.github.io/clang-sys/5_0/clang_sys))
|
||||
* `clang_6_0` - requires `libclang` 6.0 or later
|
||||
([Documentation](https://kylemayes.github.io/clang-sys/6_0/clang_sys))
|
||||
|
||||
If you do not enable one of these features, the API provided by `libclang` 3.5 will be available by
|
||||
default.
|
||||
|
@ -70,12 +72,12 @@ build it from source.
|
|||
The following environment variables, if set, are used by this crate to find the required libraries
|
||||
and executables:
|
||||
|
||||
* `LLVM_CONFIG_PATH` **(compile time)** - provides a path to an `llvm-config` executable
|
||||
* `LIBCLANG_PATH` **(compile time)** - provides a path to a directory containing a `libclang` shared
|
||||
* `LLVM_CONFIG_PATH` **(compiletime)** - provides a path to an `llvm-config` executable
|
||||
* `LIBCLANG_PATH` **(compiletime)** - provides a path to a directory containing a `libclang` shared
|
||||
library
|
||||
* `LIBCLANG_STATIC_PATH` **(compile time)** - provides a path to a directory containing LLVM and
|
||||
* `LIBCLANG_STATIC_PATH` **(compiletime)** - provides a path to a directory containing LLVM and
|
||||
Clang static libraries
|
||||
* `CLANG_PATH` **(run time)** - provides a path to a `clang` executable
|
||||
* `CLANG_PATH` **(runtime)** - provides a path to a `clang` executable
|
||||
|
||||
## Linking
|
||||
|
||||
|
@ -83,8 +85,9 @@ and executables:
|
|||
|
||||
First, the `libclang` shared library will be searched for in the directory provided by the
|
||||
`LIBCLANG_PATH` environment variable if it was set. If this fails, the directory returned by
|
||||
`llvm-config --libdir` will be searched. If neither of these approaches is successful, a list of
|
||||
likely directories will be searched (e.g., `/usr/local/lib` on Linux).
|
||||
`llvm-config --libdir` will be searched. Failing that, the directories in the `LD_LIBRARY_PATH`
|
||||
environment variable will be searched. If none of these approaches is successful, a list of likely
|
||||
directories will be searched (e.g., `/usr/local/lib` on Linux).
|
||||
|
||||
On Linux, running an executable that has been dynamically linked to `libclang` may require you to
|
||||
add a path to `libclang.so` to the `LD_LIBRARY_PATH` environment variable. The same is true on OS
|
||||
|
|
|
@ -214,6 +214,13 @@ fn find(library: Library, files: &[String], env: &str) -> Result<PathBuf, String
|
|||
}
|
||||
}
|
||||
|
||||
// Search the `LD_LIBRARY_PATH` directories.
|
||||
if let Ok(path) = env::var("LD_LIBRARY_PATH") {
|
||||
for directory in path.split(":").map(Path::new) {
|
||||
search_directory!(directory);
|
||||
}
|
||||
}
|
||||
|
||||
// Search the backup directories.
|
||||
let search = if cfg!(any(target_os="freebsd", target_os="linux")) {
|
||||
SEARCH_LINUX
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
curl -sSf https://static.rust-lang.org/dist/rust-1.22.1-i686-pc-windows-msvc.exe -o rust.exe
|
||||
curl -sSf https://static.rust-lang.org/dist/rust-1.24.0-i686-pc-windows-msvc.exe -o rust.exe
|
||||
rust.exe /VERYSILENT /NORESTART /DIR="C:\Rust"
|
||||
set PATH=%PATH%;C:\Rust\bin
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
//! * 3.9 - [Documentation](https://kylemayes.github.io/clang-sys/3_9/clang_sys)
|
||||
//! * 4.0 - [Documentation](https://kylemayes.github.io/clang-sys/4_0/clang_sys)
|
||||
//! * 5.0 - [Documentation](https://kylemayes.github.io/clang-sys/5_0/clang_sys)
|
||||
//! * 6.0 - [Documentation](https://kylemayes.github.io/clang-sys/6_0/clang_sys)
|
||||
|
||||
#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)]
|
||||
|
||||
|
@ -44,6 +45,8 @@ mod link;
|
|||
use std::mem;
|
||||
|
||||
use libc::{c_char, c_int, c_longlong, c_uint, c_ulong, c_ulonglong, c_void, time_t};
|
||||
#[cfg(feature="gte_clang_6_0")]
|
||||
use libc::{size_t};
|
||||
|
||||
pub type CXClientData = *mut c_void;
|
||||
pub type CXCursorVisitor = extern fn(CXCursor, CXCursor, CXClientData) -> CXChildVisitResult;
|
||||
|
@ -653,6 +656,15 @@ cenum! {
|
|||
}
|
||||
}
|
||||
|
||||
cenum! {
|
||||
#[cfg(feature="gte_clang_6_0")]
|
||||
enum CXTLSKind {
|
||||
const CXTLS_None = 0,
|
||||
const CXTLS_Dynamic = 1,
|
||||
const CXTLS_Static = 2,
|
||||
}
|
||||
}
|
||||
|
||||
cenum! {
|
||||
enum CXTUResourceUsageKind {
|
||||
const CXTUResourceUsage_AST = 1,
|
||||
|
@ -734,6 +746,8 @@ cenum! {
|
|||
const CXType_Float128 = 30,
|
||||
/// Only produced by `libclang` 5.0 and later.
|
||||
const CXType_Half = 31,
|
||||
/// Only produced by `libclang` 6.0 and later.
|
||||
const CXType_Float16 = 32,
|
||||
const CXType_Complex = 100,
|
||||
const CXType_Pointer = 101,
|
||||
const CXType_BlockPointer = 102,
|
||||
|
@ -1458,6 +1472,8 @@ link! {
|
|||
pub fn clang_CXCursorSet_insert(set: CXCursorSet, cursor: CXCursor) -> c_uint;
|
||||
pub fn clang_CXIndex_getGlobalOptions(index: CXIndex) -> CXGlobalOptFlags;
|
||||
pub fn clang_CXIndex_setGlobalOptions(index: CXIndex, flags: CXGlobalOptFlags);
|
||||
#[cfg(feature="gte_clang_6_0")]
|
||||
pub fn clang_CXIndex_setInvocationEmissionPathOption(index: CXIndex, path: *const c_char);
|
||||
#[cfg(feature="gte_clang_3_9")]
|
||||
pub fn clang_CXXConstructor_isConvertingConstructor(cursor: CXCursor) -> c_uint;
|
||||
#[cfg(feature="gte_clang_3_9")]
|
||||
|
@ -1474,6 +1490,8 @@ link! {
|
|||
pub fn clang_CXXMethod_isPureVirtual(cursor: CXCursor) -> c_uint;
|
||||
pub fn clang_CXXMethod_isStatic(cursor: CXCursor) -> c_uint;
|
||||
pub fn clang_CXXMethod_isVirtual(cursor: CXCursor) -> c_uint;
|
||||
#[cfg(feature="gte_clang_6_0")]
|
||||
pub fn clang_CXXRecord_isAbstract(cursor: CXCursor) -> c_uint;
|
||||
pub fn clang_CompilationDatabase_dispose(database: CXCompilationDatabase);
|
||||
pub fn clang_CompilationDatabase_fromDirectory(directory: *const c_char, error: *mut CXCompilationDatabase_Error) -> CXCompilationDatabase;
|
||||
pub fn clang_CompilationDatabase_getAllCompileCommands(database: CXCompilationDatabase) -> CXCompileCommands;
|
||||
|
@ -1504,6 +1522,8 @@ link! {
|
|||
#[cfg(feature="gte_clang_3_6")]
|
||||
pub fn clang_Cursor_getNumTemplateArguments(cursor: CXCursor) -> c_int;
|
||||
pub fn clang_Cursor_getObjCDeclQualifiers(cursor: CXCursor) -> CXObjCDeclQualifierKind;
|
||||
#[cfg(feature="gte_clang_6_0")]
|
||||
pub fn clang_Cursor_getObjCManglings(cursor: CXCursor) -> *mut CXStringSet;
|
||||
pub fn clang_Cursor_getObjCPropertyAttributes(cursor: CXCursor, reserved: c_uint) -> CXObjCPropertyAttrKind;
|
||||
pub fn clang_Cursor_getObjCSelectorIndex(cursor: CXCursor) -> c_int;
|
||||
#[cfg(feature="gte_clang_3_7")]
|
||||
|
@ -1684,6 +1704,8 @@ link! {
|
|||
pub fn clang_getCursorResultType(cursor: CXCursor) -> CXType;
|
||||
pub fn clang_getCursorSemanticParent(cursor: CXCursor) -> CXCursor;
|
||||
pub fn clang_getCursorSpelling(cursor: CXCursor) -> CXString;
|
||||
#[cfg(feature="gte_clang_6_0")]
|
||||
pub fn clang_getCursorTLSKind(cursor: CXCursor) -> CXTLSKind;
|
||||
pub fn clang_getCursorType(cursor: CXCursor) -> CXType;
|
||||
pub fn clang_getCursorUSR(cursor: CXCursor) -> CXString;
|
||||
#[cfg(feature="gte_clang_3_8")]
|
||||
|
@ -1713,6 +1735,8 @@ link! {
|
|||
pub fn clang_getExpansionLocation(location: CXSourceLocation, file: *mut CXFile, line: *mut c_uint, column: *mut c_uint, offset: *mut c_uint);
|
||||
pub fn clang_getFieldDeclBitWidth(cursor: CXCursor) -> c_int;
|
||||
pub fn clang_getFile(tu: CXTranslationUnit, file: *const c_char) -> CXFile;
|
||||
#[cfg(feature="gte_clang_6_0")]
|
||||
pub fn clang_getFileContents(tu: CXTranslationUnit, file: CXFile, size: *mut size_t) -> *const c_char;
|
||||
pub fn clang_getFileLocation(location: CXSourceLocation, file: *mut CXFile, line: *mut c_uint, column: *mut c_uint, offset: *mut c_uint);
|
||||
pub fn clang_getFileName(file: CXFile) -> CXString;
|
||||
pub fn clang_getFileTime(file: CXFile) -> time_t;
|
||||
|
|
|
@ -118,8 +118,8 @@ macro_rules! link {
|
|||
mod build;
|
||||
|
||||
let file = try!(build::find_shared_library());
|
||||
let library = libloading::Library::new(&file).map_err(|_| {
|
||||
format!("the `libclang` shared library could not be opened: {}", file.display())
|
||||
let library = libloading::Library::new(&file).map_err(|e| {
|
||||
format!("the `libclang` shared library at {} could not be opened: {}", file.display(), e)
|
||||
});
|
||||
let mut library = SharedLibrary::new(try!(library));
|
||||
$(load::$name(&mut library);)+
|
||||
|
|
|
@ -148,7 +148,7 @@ fn run(executable: &str, arguments: &[&str]) -> Result<(String, String), String>
|
|||
let stdout = String::from_utf8_lossy(&o.stdout).into_owned();
|
||||
let stderr = String::from_utf8_lossy(&o.stderr).into_owned();
|
||||
(stdout, stderr)
|
||||
}).map_err(|_| format!("could not run executable: `{}`", executable))
|
||||
}).map_err(|e| format!("could not run executable `{}`: {}", executable, e))
|
||||
}
|
||||
|
||||
/// Runs `clang`, returning the `stdout` and `stderr` output.
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -53,7 +53,8 @@ matrix:
|
|||
- env: TARGET=arm-unknown-linux-musleabihf
|
||||
- env: TARGET=aarch64-unknown-linux-gnu
|
||||
- env: TARGET=aarch64-unknown-linux-musl
|
||||
rust: beta
|
||||
# FIXME(#856)
|
||||
rust: 1.22.1
|
||||
- os: osx
|
||||
osx_image: xcode8.2
|
||||
env: TARGET=i386-apple-ios
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
[package]
|
||||
name = "libc"
|
||||
version = "0.2.33"
|
||||
version = "0.2.39"
|
||||
authors = ["The Rust Project Developers"]
|
||||
description = "A library for types and bindings to native C functions often found in libc or\nother common platform libraries.\n"
|
||||
homepage = "https://github.com/rust-lang/libc"
|
||||
|
@ -25,8 +25,8 @@ repository = "https://github.com/rust-lang/libc"
|
|||
default = ["use_std"]
|
||||
use_std = []
|
||||
[badges.appveyor]
|
||||
repository = "rust-lang/libc"
|
||||
project_name = "rust-lang-libs/libc"
|
||||
repository = "rust-lang/libc"
|
||||
|
||||
[badges.travis-ci]
|
||||
repository = "rust-lang/libc"
|
||||
|
|
|
@ -24,4 +24,5 @@ build: false
|
|||
|
||||
test_script:
|
||||
- cargo test --target %TARGET%
|
||||
- cargo test --no-default-features --target %TARGET%
|
||||
- cargo test --manifest-path libc-test/Cargo.toml --target %TARGET%
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM ubuntu:17.04
|
||||
FROM ubuntu:18.04
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
gcc-multilib libc6-dev ca-certificates
|
||||
|
|
|
@ -1,12 +1,18 @@
|
|||
FROM ubuntu:17.10
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
gcc libc6-dev qemu-user ca-certificates \
|
||||
gcc-s390x-linux-gnu libc6-dev-s390x-cross
|
||||
curl ca-certificates \
|
||||
gcc libc6-dev \
|
||||
gcc-s390x-linux-gnu libc6-dev-s390x-cross \
|
||||
qemu-system-s390x \
|
||||
cpio
|
||||
|
||||
COPY linux-s390x.sh /
|
||||
RUN bash /linux-s390x.sh
|
||||
|
||||
COPY test-runner-linux /
|
||||
|
||||
ENV CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_LINKER=s390x-linux-gnu-gcc \
|
||||
# TODO: in theory we should execute this, but qemu segfaults immediately :(
|
||||
# CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_RUNNER="qemu-s390x -L /usr/s390x-linux-gnu" \
|
||||
CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_RUNNER=true \
|
||||
CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_RUNNER="/test-runner-linux s390x" \
|
||||
CC_s390x_unknown_linux_gnu=s390x-linux-gnu-gcc \
|
||||
PATH=$PATH:/rust/bin
|
||||
|
|
|
@ -1,14 +1,18 @@
|
|||
# link fails on 17.10
|
||||
FROM ubuntu:17.04
|
||||
FROM debian:stretch
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
gcc libc6-dev qemu-user ca-certificates \
|
||||
gcc-sparc64-linux-gnu libc6-dev-sparc64-cross
|
||||
curl ca-certificates \
|
||||
gcc libc6-dev \
|
||||
gcc-sparc64-linux-gnu libc6-dev-sparc64-cross \
|
||||
qemu-system-sparc64 openbios-sparc seabios ipxe-qemu \
|
||||
p7zip-full cpio
|
||||
|
||||
COPY linux-sparc64.sh /
|
||||
RUN bash /linux-sparc64.sh
|
||||
|
||||
COPY test-runner-linux /
|
||||
|
||||
ENV CARGO_TARGET_SPARC64_UNKNOWN_LINUX_GNU_LINKER=sparc64-linux-gnu-gcc \
|
||||
# TODO: in theory we should execute this, but qemu segfaults immediately
|
||||
# see https://github.com/rust-lang/libc/issues/822
|
||||
# CARGO_TARGET_SPARC64_UNKNOWN_LINUX_GNU_RUNNER="qemu-sparc64 -L /usr/sparc64-linux-gnu" \
|
||||
CARGO_TARGET_SPARC64_UNKNOWN_LINUX_GNU_RUNNER=true \
|
||||
CARGO_TARGET_SPARC64_UNKNOWN_LINUX_GNU_RUNNER="/test-runner-linux sparc64" \
|
||||
CC_sparc64_unknown_linux_gnu=sparc64-linux-gnu-gcc \
|
||||
PATH=$PATH:/rust/bin
|
||||
|
|
|
@ -7,5 +7,9 @@ shift
|
|||
dir=$(dirname $me)
|
||||
file=$(basename $me)
|
||||
|
||||
if echo $file | grep -q wasm; then
|
||||
exit 0 # FIXME(rust-lang/cargo#4750)
|
||||
fi
|
||||
|
||||
cd $dir
|
||||
exec node $file "$@"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM ubuntu:17.04
|
||||
FROM ubuntu:18.04
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
gcc libc6-dev ca-certificates
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM ubuntu:17.04
|
||||
FROM ubuntu:18.04
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
gcc-multilib libc6-dev ca-certificates
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# Copyright 2017 The Rust Project Developers. See the COPYRIGHT
|
||||
# file at the top-level directory of this distribution and at
|
||||
# http://rust-lang.org/COPYRIGHT.
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
set -ex
|
||||
|
||||
mkdir -m 777 /qemu
|
||||
cd /qemu
|
||||
|
||||
curl -LO https://github.com/qemu/qemu/raw/master/pc-bios/s390-ccw.img
|
||||
curl -LO http://ftp.debian.org/debian/dists/testing/main/installer-s390x/20170828/images/generic/kernel.debian
|
||||
curl -LO http://ftp.debian.org/debian/dists/testing/main/installer-s390x/20170828/images/generic/initrd.debian
|
||||
|
||||
mv kernel.debian kernel
|
||||
mv initrd.debian initrd.gz
|
||||
|
||||
mkdir init
|
||||
cd init
|
||||
gunzip -c ../initrd.gz | cpio -id
|
||||
rm ../initrd.gz
|
||||
cp /usr/s390x-linux-gnu/lib/libgcc_s.so.1 usr/lib/
|
||||
chmod a+w .
|
|
@ -0,0 +1,17 @@
|
|||
set -ex
|
||||
|
||||
mkdir -m 777 /qemu
|
||||
cd /qemu
|
||||
|
||||
curl -LO https://cdimage.debian.org/cdimage/ports/debian-9.0-sparc64-NETINST-1.iso
|
||||
7z e debian-9.0-sparc64-NETINST-1.iso boot/initrd.gz
|
||||
7z e debian-9.0-sparc64-NETINST-1.iso boot/sparc64
|
||||
mv sparc64 kernel
|
||||
rm debian-9.0-sparc64-NETINST-1.iso
|
||||
|
||||
mkdir init
|
||||
cd init
|
||||
gunzip -c ../initrd.gz | cpio -id
|
||||
rm ../initrd.gz
|
||||
cp /usr/sparc64-linux-gnu/lib/libgcc_s.so.1 usr/lib/
|
||||
chmod a+w .
|
|
@ -41,7 +41,11 @@ if [ "$QEMU" != "" ]; then
|
|||
|
||||
# Do the standard rigamarole of cross-compiling an executable and then the
|
||||
# script to run just executes the binary.
|
||||
cargo build --manifest-path libc-test/Cargo.toml --target $TARGET --tests
|
||||
cargo build \
|
||||
--manifest-path libc-test/Cargo.toml \
|
||||
--target $TARGET \
|
||||
--test main
|
||||
rm $CARGO_TARGET_DIR/$TARGET/debug/main-*.d
|
||||
cp $CARGO_TARGET_DIR/$TARGET/debug/main-* $tmpdir/mount/libc-test
|
||||
echo 'exec $1/libc-test' > $tmpdir/mount/run.sh
|
||||
|
||||
|
@ -75,4 +79,5 @@ if [ "$TARGET" = "x86_64-unknown-linux-gnux32" ]; then
|
|||
opt="--release"
|
||||
fi
|
||||
|
||||
cargo test $opt --no-default-features --manifest-path libc-test/Cargo.toml --target $TARGET
|
||||
exec cargo test $opt --manifest-path libc-test/Cargo.toml --target $TARGET
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
arch=$1
|
||||
prog=$2
|
||||
|
||||
cd /qemu/init
|
||||
cp -f $2 prog
|
||||
find . | cpio --create --format='newc' --quiet | gzip > ../initrd.gz
|
||||
cd ..
|
||||
|
||||
timeout 30s qemu-system-$arch \
|
||||
-m 1024 \
|
||||
-nographic \
|
||||
-kernel kernel \
|
||||
-initrd initrd.gz \
|
||||
-append init=/prog > output || true
|
||||
|
||||
# remove kernel messages
|
||||
tr -d '\r' < output | egrep -v '^\['
|
||||
|
||||
grep PASSED output > /dev/null
|
|
@ -0,0 +1,4 @@
|
|||
pub type c_char = u8;
|
||||
pub type c_long = i64;
|
||||
pub type c_ulong = u64;
|
||||
pub type wchar_t = u32;
|
|
@ -0,0 +1,4 @@
|
|||
pub type c_char = u8;
|
||||
pub type c_long = i32;
|
||||
pub type c_ulong = u32;
|
||||
pub type wchar_t = u32;
|
|
@ -0,0 +1,166 @@
|
|||
pub type in_addr_t = u32;
|
||||
pub type in_port_t = u16;
|
||||
pub type pthread_key_t = usize;
|
||||
pub type pthread_t = usize;
|
||||
pub type sa_family_t = u8;
|
||||
pub type socklen_t = usize;
|
||||
pub type time_t = i64;
|
||||
|
||||
s! {
|
||||
pub struct addrinfo {
|
||||
pub ai_flags: ::c_int,
|
||||
pub ai_family: ::c_int,
|
||||
pub ai_socktype: ::c_int,
|
||||
pub ai_protocol: ::c_int,
|
||||
pub ai_addrlen: ::socklen_t,
|
||||
pub ai_addr: *mut ::sockaddr,
|
||||
pub ai_canonname: *mut ::c_char,
|
||||
pub ai_next: *mut addrinfo,
|
||||
}
|
||||
|
||||
pub struct in_addr {
|
||||
pub s_addr: in_addr_t,
|
||||
}
|
||||
|
||||
pub struct in6_addr {
|
||||
pub s6_addr: [u8; 16],
|
||||
}
|
||||
|
||||
pub struct pthread_attr_t {
|
||||
__detachstate: ::c_int,
|
||||
__stacksize: usize,
|
||||
}
|
||||
|
||||
pub struct sockaddr {
|
||||
pub sa_family: sa_family_t,
|
||||
pub sa_data: [::c_char; 0],
|
||||
}
|
||||
|
||||
pub struct sockaddr_in {
|
||||
pub sin_family: ::sa_family_t,
|
||||
pub sin_port: ::in_port_t,
|
||||
pub sin_addr: ::in_addr,
|
||||
}
|
||||
|
||||
pub struct sockaddr_in6 {
|
||||
pub sin6_family: sa_family_t,
|
||||
pub sin6_port: ::in_port_t,
|
||||
pub sin6_flowinfo: u32,
|
||||
pub sin6_addr: ::in6_addr,
|
||||
pub sin6_scope_id: u32,
|
||||
}
|
||||
|
||||
pub struct sockaddr_storage {
|
||||
pub ss_family: ::sa_family_t,
|
||||
__ss_data: [u8; 32],
|
||||
}
|
||||
}
|
||||
|
||||
pub const _SC_NPROCESSORS_ONLN: ::c_int = 52;
|
||||
pub const _SC_PAGESIZE: ::c_int = 54;
|
||||
|
||||
pub const AF_INET: ::c_int = 1;
|
||||
pub const AF_INET6: ::c_int = 2;
|
||||
|
||||
pub const EACCES: ::c_int = 2;
|
||||
pub const EADDRINUSE: ::c_int = 3;
|
||||
pub const EADDRNOTAVAIL: ::c_int = 4;
|
||||
pub const EAGAIN: ::c_int = 6;
|
||||
pub const ECONNABORTED: ::c_int = 13;
|
||||
pub const ECONNREFUSED: ::c_int = 14;
|
||||
pub const ECONNRESET: ::c_int = 15;
|
||||
pub const EEXIST: ::c_int = 20;
|
||||
pub const EINTR: ::c_int = 27;
|
||||
pub const EINVAL: ::c_int = 28;
|
||||
pub const ENOENT: ::c_int = 44;
|
||||
pub const ENOTCONN: ::c_int = 53;
|
||||
pub const EPERM: ::c_int = 63;
|
||||
pub const EPIPE: ::c_int = 64;
|
||||
pub const ETIMEDOUT: ::c_int = 73;
|
||||
pub const EWOULDBLOCK: ::c_int = EAGAIN;
|
||||
|
||||
pub const EAI_SYSTEM: ::c_int = 9;
|
||||
|
||||
pub const EXIT_FAILURE: ::c_int = 1;
|
||||
pub const EXIT_SUCCESS: ::c_int = 0;
|
||||
|
||||
pub const PTHREAD_STACK_MIN: ::size_t = 1024;
|
||||
|
||||
pub const SOCK_DGRAM: ::c_int = 128;
|
||||
pub const SOCK_STREAM: ::c_int = 130;
|
||||
|
||||
extern {
|
||||
pub fn arc4random_buf(buf: *const ::c_void, len: ::size_t);
|
||||
pub fn freeaddrinfo(res: *mut addrinfo);
|
||||
pub fn gai_strerror(errcode: ::c_int) -> *const ::c_char;
|
||||
pub fn getaddrinfo(
|
||||
node: *const c_char,
|
||||
service: *const c_char,
|
||||
hints: *const addrinfo,
|
||||
res: *mut *mut addrinfo,
|
||||
) -> ::c_int;
|
||||
pub fn getsockopt(
|
||||
sockfd: ::c_int,
|
||||
level: ::c_int,
|
||||
optname: ::c_int,
|
||||
optval: *mut ::c_void,
|
||||
optlen: *mut ::socklen_t,
|
||||
) -> ::c_int;
|
||||
pub fn posix_memalign(
|
||||
memptr: *mut *mut ::c_void,
|
||||
align: ::size_t,
|
||||
size: ::size_t,
|
||||
) -> ::c_int;
|
||||
pub fn pthread_attr_destroy(attr: *mut ::pthread_attr_t) -> ::c_int;
|
||||
pub fn pthread_attr_init(attr: *mut ::pthread_attr_t) -> ::c_int;
|
||||
pub fn pthread_attr_setstacksize(
|
||||
attr: *mut ::pthread_attr_t,
|
||||
stack_size: ::size_t,
|
||||
) -> ::c_int;
|
||||
pub fn pthread_create(
|
||||
native: *mut ::pthread_t,
|
||||
attr: *const ::pthread_attr_t,
|
||||
f: extern fn(*mut ::c_void) -> *mut ::c_void,
|
||||
value: *mut ::c_void,
|
||||
) -> ::c_int;
|
||||
pub fn pthread_detach(thread: ::pthread_t) -> ::c_int;
|
||||
pub fn pthread_getspecific(key: pthread_key_t) -> *mut ::c_void;
|
||||
pub fn pthread_join(
|
||||
native: ::pthread_t,
|
||||
value: *mut *mut ::c_void,
|
||||
) -> ::c_int;
|
||||
pub fn pthread_key_create(
|
||||
key: *mut pthread_key_t,
|
||||
dtor: Option<unsafe extern fn(*mut ::c_void)>,
|
||||
) -> ::c_int;
|
||||
pub fn pthread_key_delete(key: pthread_key_t) -> ::c_int;
|
||||
pub fn pthread_setspecific(
|
||||
key: pthread_key_t,
|
||||
value: *const ::c_void,
|
||||
) -> ::c_int;
|
||||
pub fn send(
|
||||
socket: ::c_int,
|
||||
buf: *const ::c_void,
|
||||
len: ::size_t,
|
||||
flags: ::c_int,
|
||||
) -> ::ssize_t;
|
||||
pub fn sysconf(name: ::c_int) -> ::c_long;
|
||||
}
|
||||
|
||||
cfg_if! {
|
||||
if #[cfg(target_arch = "aarch64")] {
|
||||
mod aarch64;
|
||||
pub use self::aarch64::*;
|
||||
} else if #[cfg(any(target_arch = "arm"))] {
|
||||
mod arm;
|
||||
pub use self::arm::*;
|
||||
} else if #[cfg(any(target_arch = "x86"))] {
|
||||
mod x86;
|
||||
pub use self::x86::*;
|
||||
} else if #[cfg(any(target_arch = "x86_64"))] {
|
||||
mod x86_64;
|
||||
pub use self::x86_64::*;
|
||||
} else {
|
||||
// Unknown target_arch
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
pub type c_char = i8;
|
||||
pub type c_long = i32;
|
||||
pub type c_ulong = u32;
|
||||
pub type wchar_t = i32;
|
|
@ -0,0 +1,4 @@
|
|||
pub type c_char = i8;
|
||||
pub type c_long = i64;
|
||||
pub type c_ulong = u64;
|
||||
pub type wchar_t = i32;
|
|
@ -146,5 +146,6 @@ mod imp {
|
|||
|
||||
pub mod mem {
|
||||
pub fn size_of_val<T>(_: &T) -> usize { 4 }
|
||||
pub fn size_of<T>(_: &T) -> usize { 4 }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,336 @@
|
|||
pub type c_char = u8;
|
||||
pub type __u64 = ::c_ulonglong;
|
||||
pub type wchar_t = u32;
|
||||
pub type nlink_t = u32;
|
||||
pub type blksize_t = ::c_int;
|
||||
|
||||
s! {
|
||||
pub struct stat {
|
||||
pub st_dev: ::dev_t,
|
||||
pub st_ino: ::ino_t,
|
||||
pub st_mode: ::mode_t,
|
||||
pub st_nlink: ::nlink_t,
|
||||
pub st_uid: ::uid_t,
|
||||
pub st_gid: ::gid_t,
|
||||
pub st_rdev: ::dev_t,
|
||||
__pad0: ::c_ulong,
|
||||
pub st_size: ::off_t,
|
||||
pub st_blksize: ::blksize_t,
|
||||
__pad1: ::c_int,
|
||||
pub st_blocks: ::blkcnt_t,
|
||||
pub st_atime: ::time_t,
|
||||
pub st_atime_nsec: ::c_long,
|
||||
pub st_mtime: ::time_t,
|
||||
pub st_mtime_nsec: ::c_long,
|
||||
pub st_ctime: ::time_t,
|
||||
pub st_ctime_nsec: ::c_long,
|
||||
__unused: [::c_uint; 2],
|
||||
}
|
||||
|
||||
pub struct stat64 {
|
||||
pub st_dev: ::dev_t,
|
||||
pub st_ino: ::ino_t,
|
||||
pub st_mode: ::mode_t,
|
||||
pub st_nlink: ::nlink_t,
|
||||
pub st_uid: ::uid_t,
|
||||
pub st_gid: ::gid_t,
|
||||
pub st_rdev: ::dev_t,
|
||||
__pad0: ::c_ulong,
|
||||
pub st_size: ::off_t,
|
||||
pub st_blksize: ::blksize_t,
|
||||
__pad1: ::c_int,
|
||||
pub st_blocks: ::blkcnt_t,
|
||||
pub st_atime: ::time_t,
|
||||
pub st_atime_nsec: ::c_long,
|
||||
pub st_mtime: ::time_t,
|
||||
pub st_mtime_nsec: ::c_long,
|
||||
pub st_ctime: ::time_t,
|
||||
pub st_ctime_nsec: ::c_long,
|
||||
__unused: [::c_uint; 2],
|
||||
}
|
||||
|
||||
pub struct ipc_perm {
|
||||
pub __ipc_perm_key: ::key_t,
|
||||
pub uid: ::uid_t,
|
||||
pub gid: ::gid_t,
|
||||
pub cuid: ::uid_t,
|
||||
pub cgid: ::gid_t,
|
||||
pub mode: ::mode_t,
|
||||
pub __seq: ::c_ushort,
|
||||
__unused1: ::c_ulong,
|
||||
__unused2: ::c_ulong,
|
||||
}
|
||||
}
|
||||
|
||||
pub const MINSIGSTKSZ: ::size_t = 6144;
|
||||
pub const SIGSTKSZ: ::size_t = 12288;
|
||||
|
||||
#[doc(hidden)]
|
||||
pub const PF_MAX: ::c_int = 43;
|
||||
#[doc(hidden)]
|
||||
pub const AF_MAX: ::c_int = PF_MAX;
|
||||
|
||||
pub const SYS_io_setup: ::c_long = 0;
|
||||
pub const SYS_io_destroy: ::c_long = 1;
|
||||
pub const SYS_io_submit: ::c_long = 2;
|
||||
pub const SYS_io_cancel: ::c_long = 3;
|
||||
pub const SYS_io_getevents: ::c_long = 4;
|
||||
pub const SYS_setxattr: ::c_long = 5;
|
||||
pub const SYS_lsetxattr: ::c_long = 6;
|
||||
pub const SYS_fsetxattr: ::c_long = 7;
|
||||
pub const SYS_getxattr: ::c_long = 8;
|
||||
pub const SYS_lgetxattr: ::c_long = 9;
|
||||
pub const SYS_fgetxattr: ::c_long = 10;
|
||||
pub const SYS_listxattr: ::c_long = 11;
|
||||
pub const SYS_llistxattr: ::c_long = 12;
|
||||
pub const SYS_flistxattr: ::c_long = 13;
|
||||
pub const SYS_removexattr: ::c_long = 14;
|
||||
pub const SYS_lremovexattr: ::c_long = 15;
|
||||
pub const SYS_fremovexattr: ::c_long = 16;
|
||||
pub const SYS_getcwd: ::c_long = 17;
|
||||
pub const SYS_lookup_dcookie: ::c_long = 18;
|
||||
pub const SYS_eventfd2: ::c_long = 19;
|
||||
pub const SYS_epoll_create1: ::c_long = 20;
|
||||
pub const SYS_epoll_ctl: ::c_long = 21;
|
||||
pub const SYS_epoll_pwait: ::c_long = 22;
|
||||
pub const SYS_dup: ::c_long = 23;
|
||||
pub const SYS_dup3: ::c_long = 24;
|
||||
pub const SYS_inotify_init1: ::c_long = 26;
|
||||
pub const SYS_inotify_add_watch: ::c_long = 27;
|
||||
pub const SYS_inotify_rm_watch: ::c_long = 28;
|
||||
pub const SYS_ioctl: ::c_long = 29;
|
||||
pub const SYS_ioprio_set: ::c_long = 30;
|
||||
pub const SYS_ioprio_get: ::c_long = 31;
|
||||
pub const SYS_flock: ::c_long = 32;
|
||||
pub const SYS_mknodat: ::c_long = 33;
|
||||
pub const SYS_mkdirat: ::c_long = 34;
|
||||
pub const SYS_unlinkat: ::c_long = 35;
|
||||
pub const SYS_symlinkat: ::c_long = 36;
|
||||
pub const SYS_linkat: ::c_long = 37;
|
||||
pub const SYS_renameat: ::c_long = 38;
|
||||
pub const SYS_umount2: ::c_long = 39;
|
||||
pub const SYS_mount: ::c_long = 40;
|
||||
pub const SYS_pivot_root: ::c_long = 41;
|
||||
pub const SYS_nfsservctl: ::c_long = 42;
|
||||
pub const SYS_fallocate: ::c_long = 47;
|
||||
pub const SYS_faccessat: ::c_long = 48;
|
||||
pub const SYS_chdir: ::c_long = 49;
|
||||
pub const SYS_fchdir: ::c_long = 50;
|
||||
pub const SYS_chroot: ::c_long = 51;
|
||||
pub const SYS_fchmod: ::c_long = 52;
|
||||
pub const SYS_fchmodat: ::c_long = 53;
|
||||
pub const SYS_fchownat: ::c_long = 54;
|
||||
pub const SYS_fchown: ::c_long = 55;
|
||||
pub const SYS_openat: ::c_long = 56;
|
||||
pub const SYS_close: ::c_long = 57;
|
||||
pub const SYS_vhangup: ::c_long = 58;
|
||||
pub const SYS_pipe2: ::c_long = 59;
|
||||
pub const SYS_quotactl: ::c_long = 60;
|
||||
pub const SYS_getdents64: ::c_long = 61;
|
||||
pub const SYS_read: ::c_long = 63;
|
||||
pub const SYS_write: ::c_long = 64;
|
||||
pub const SYS_readv: ::c_long = 65;
|
||||
pub const SYS_writev: ::c_long = 66;
|
||||
pub const SYS_pread64: ::c_long = 67;
|
||||
pub const SYS_pwrite64: ::c_long = 68;
|
||||
pub const SYS_preadv: ::c_long = 69;
|
||||
pub const SYS_pwritev: ::c_long = 70;
|
||||
pub const SYS_pselect6: ::c_long = 72;
|
||||
pub const SYS_ppoll: ::c_long = 73;
|
||||
pub const SYS_signalfd4: ::c_long = 74;
|
||||
pub const SYS_vmsplice: ::c_long = 75;
|
||||
pub const SYS_splice: ::c_long = 76;
|
||||
pub const SYS_tee: ::c_long = 77;
|
||||
pub const SYS_readlinkat: ::c_long = 78;
|
||||
pub const SYS_sync: ::c_long = 81;
|
||||
pub const SYS_fsync: ::c_long = 82;
|
||||
pub const SYS_fdatasync: ::c_long = 83;
|
||||
pub const SYS_sync_file_range: ::c_long = 84;
|
||||
pub const SYS_timerfd_create: ::c_long = 85;
|
||||
pub const SYS_timerfd_settime: ::c_long = 86;
|
||||
pub const SYS_timerfd_gettime: ::c_long = 87;
|
||||
pub const SYS_utimensat: ::c_long = 88;
|
||||
pub const SYS_acct: ::c_long = 89;
|
||||
pub const SYS_capget: ::c_long = 90;
|
||||
pub const SYS_capset: ::c_long = 91;
|
||||
pub const SYS_personality: ::c_long = 92;
|
||||
pub const SYS_exit: ::c_long = 93;
|
||||
pub const SYS_exit_group: ::c_long = 94;
|
||||
pub const SYS_waitid: ::c_long = 95;
|
||||
pub const SYS_set_tid_address: ::c_long = 96;
|
||||
pub const SYS_unshare: ::c_long = 97;
|
||||
pub const SYS_futex: ::c_long = 98;
|
||||
pub const SYS_set_robust_list: ::c_long = 99;
|
||||
pub const SYS_get_robust_list: ::c_long = 100;
|
||||
pub const SYS_nanosleep: ::c_long = 101;
|
||||
pub const SYS_getitimer: ::c_long = 102;
|
||||
pub const SYS_setitimer: ::c_long = 103;
|
||||
pub const SYS_kexec_load: ::c_long = 104;
|
||||
pub const SYS_init_module: ::c_long = 105;
|
||||
pub const SYS_delete_module: ::c_long = 106;
|
||||
pub const SYS_timer_create: ::c_long = 107;
|
||||
pub const SYS_timer_gettime: ::c_long = 108;
|
||||
pub const SYS_timer_getoverrun: ::c_long = 109;
|
||||
pub const SYS_timer_settime: ::c_long = 110;
|
||||
pub const SYS_timer_delete: ::c_long = 111;
|
||||
pub const SYS_clock_settime: ::c_long = 112;
|
||||
pub const SYS_clock_gettime: ::c_long = 113;
|
||||
pub const SYS_clock_getres: ::c_long = 114;
|
||||
pub const SYS_clock_nanosleep: ::c_long = 115;
|
||||
pub const SYS_syslog: ::c_long = 116;
|
||||
pub const SYS_ptrace: ::c_long = 117;
|
||||
pub const SYS_sched_setparam: ::c_long = 118;
|
||||
pub const SYS_sched_setscheduler: ::c_long = 119;
|
||||
pub const SYS_sched_getscheduler: ::c_long = 120;
|
||||
pub const SYS_sched_getparam: ::c_long = 121;
|
||||
pub const SYS_sched_setaffinity: ::c_long = 122;
|
||||
pub const SYS_sched_getaffinity: ::c_long = 123;
|
||||
pub const SYS_sched_yield: ::c_long = 124;
|
||||
pub const SYS_sched_get_priority_max: ::c_long = 125;
|
||||
pub const SYS_sched_get_priority_min: ::c_long = 126;
|
||||
pub const SYS_sched_rr_get_interval: ::c_long = 127;
|
||||
pub const SYS_restart_syscall: ::c_long = 128;
|
||||
pub const SYS_kill: ::c_long = 129;
|
||||
pub const SYS_tkill: ::c_long = 130;
|
||||
pub const SYS_tgkill: ::c_long = 131;
|
||||
pub const SYS_sigaltstack: ::c_long = 132;
|
||||
pub const SYS_rt_sigsuspend: ::c_long = 133;
|
||||
pub const SYS_rt_sigaction: ::c_long = 134;
|
||||
pub const SYS_rt_sigprocmask: ::c_long = 135;
|
||||
pub const SYS_rt_sigpending: ::c_long = 136;
|
||||
pub const SYS_rt_sigtimedwait: ::c_long = 137;
|
||||
pub const SYS_rt_sigqueueinfo: ::c_long = 138;
|
||||
pub const SYS_rt_sigreturn: ::c_long = 139;
|
||||
pub const SYS_setpriority: ::c_long = 140;
|
||||
pub const SYS_getpriority: ::c_long = 141;
|
||||
pub const SYS_reboot: ::c_long = 142;
|
||||
pub const SYS_setregid: ::c_long = 143;
|
||||
pub const SYS_setgid: ::c_long = 144;
|
||||
pub const SYS_setreuid: ::c_long = 145;
|
||||
pub const SYS_setuid: ::c_long = 146;
|
||||
pub const SYS_setresuid: ::c_long = 147;
|
||||
pub const SYS_getresuid: ::c_long = 148;
|
||||
pub const SYS_setresgid: ::c_long = 149;
|
||||
pub const SYS_getresgid: ::c_long = 150;
|
||||
pub const SYS_setfsuid: ::c_long = 151;
|
||||
pub const SYS_setfsgid: ::c_long = 152;
|
||||
pub const SYS_times: ::c_long = 153;
|
||||
pub const SYS_setpgid: ::c_long = 154;
|
||||
pub const SYS_getpgid: ::c_long = 155;
|
||||
pub const SYS_getsid: ::c_long = 156;
|
||||
pub const SYS_setsid: ::c_long = 157;
|
||||
pub const SYS_getgroups: ::c_long = 158;
|
||||
pub const SYS_setgroups: ::c_long = 159;
|
||||
pub const SYS_uname: ::c_long = 160;
|
||||
pub const SYS_sethostname: ::c_long = 161;
|
||||
pub const SYS_setdomainname: ::c_long = 162;
|
||||
pub const SYS_getrlimit: ::c_long = 163;
|
||||
pub const SYS_setrlimit: ::c_long = 164;
|
||||
pub const SYS_getrusage: ::c_long = 165;
|
||||
pub const SYS_umask: ::c_long = 166;
|
||||
pub const SYS_prctl: ::c_long = 167;
|
||||
pub const SYS_getcpu: ::c_long = 168;
|
||||
pub const SYS_gettimeofday: ::c_long = 169;
|
||||
pub const SYS_settimeofday: ::c_long = 170;
|
||||
pub const SYS_adjtimex: ::c_long = 171;
|
||||
pub const SYS_getpid: ::c_long = 172;
|
||||
pub const SYS_getppid: ::c_long = 173;
|
||||
pub const SYS_getuid: ::c_long = 174;
|
||||
pub const SYS_geteuid: ::c_long = 175;
|
||||
pub const SYS_getgid: ::c_long = 176;
|
||||
pub const SYS_getegid: ::c_long = 177;
|
||||
pub const SYS_gettid: ::c_long = 178;
|
||||
pub const SYS_sysinfo: ::c_long = 179;
|
||||
pub const SYS_mq_open: ::c_long = 180;
|
||||
pub const SYS_mq_unlink: ::c_long = 181;
|
||||
pub const SYS_mq_timedsend: ::c_long = 182;
|
||||
pub const SYS_mq_timedreceive: ::c_long = 183;
|
||||
pub const SYS_mq_notify: ::c_long = 184;
|
||||
pub const SYS_mq_getsetattr: ::c_long = 185;
|
||||
pub const SYS_msgget: ::c_long = 186;
|
||||
pub const SYS_msgctl: ::c_long = 187;
|
||||
pub const SYS_msgrcv: ::c_long = 188;
|
||||
pub const SYS_msgsnd: ::c_long = 189;
|
||||
pub const SYS_semget: ::c_long = 190;
|
||||
pub const SYS_semctl: ::c_long = 191;
|
||||
pub const SYS_semtimedop: ::c_long = 192;
|
||||
pub const SYS_semop: ::c_long = 193;
|
||||
pub const SYS_shmget: ::c_long = 194;
|
||||
pub const SYS_shmctl: ::c_long = 195;
|
||||
pub const SYS_shmat: ::c_long = 196;
|
||||
pub const SYS_shmdt: ::c_long = 197;
|
||||
pub const SYS_socket: ::c_long = 198;
|
||||
pub const SYS_socketpair: ::c_long = 199;
|
||||
pub const SYS_bind: ::c_long = 200;
|
||||
pub const SYS_listen: ::c_long = 201;
|
||||
pub const SYS_accept: ::c_long = 202;
|
||||
pub const SYS_connect: ::c_long = 203;
|
||||
pub const SYS_getsockname: ::c_long = 204;
|
||||
pub const SYS_getpeername: ::c_long = 205;
|
||||
pub const SYS_sendto: ::c_long = 206;
|
||||
pub const SYS_recvfrom: ::c_long = 207;
|
||||
pub const SYS_setsockopt: ::c_long = 208;
|
||||
pub const SYS_getsockopt: ::c_long = 209;
|
||||
pub const SYS_shutdown: ::c_long = 210;
|
||||
pub const SYS_sendmsg: ::c_long = 211;
|
||||
pub const SYS_recvmsg: ::c_long = 212;
|
||||
pub const SYS_readahead: ::c_long = 213;
|
||||
pub const SYS_brk: ::c_long = 214;
|
||||
pub const SYS_munmap: ::c_long = 215;
|
||||
pub const SYS_mremap: ::c_long = 216;
|
||||
pub const SYS_add_key: ::c_long = 217;
|
||||
pub const SYS_request_key: ::c_long = 218;
|
||||
pub const SYS_keyctl: ::c_long = 219;
|
||||
pub const SYS_clone: ::c_long = 220;
|
||||
pub const SYS_execve: ::c_long = 221;
|
||||
pub const SYS_swapon: ::c_long = 224;
|
||||
pub const SYS_swapoff: ::c_long = 225;
|
||||
pub const SYS_mprotect: ::c_long = 226;
|
||||
pub const SYS_msync: ::c_long = 227;
|
||||
pub const SYS_mlock: ::c_long = 228;
|
||||
pub const SYS_munlock: ::c_long = 229;
|
||||
pub const SYS_mlockall: ::c_long = 230;
|
||||
pub const SYS_munlockall: ::c_long = 231;
|
||||
pub const SYS_mincore: ::c_long = 232;
|
||||
pub const SYS_madvise: ::c_long = 233;
|
||||
pub const SYS_remap_file_pages: ::c_long = 234;
|
||||
pub const SYS_mbind: ::c_long = 235;
|
||||
pub const SYS_get_mempolicy: ::c_long = 236;
|
||||
pub const SYS_set_mempolicy: ::c_long = 237;
|
||||
pub const SYS_migrate_pages: ::c_long = 238;
|
||||
pub const SYS_move_pages: ::c_long = 239;
|
||||
pub const SYS_rt_tgsigqueueinfo: ::c_long = 240;
|
||||
pub const SYS_perf_event_open: ::c_long = 241;
|
||||
pub const SYS_accept4: ::c_long = 242;
|
||||
pub const SYS_recvmmsg: ::c_long = 243;
|
||||
pub const SYS_wait4: ::c_long = 260;
|
||||
pub const SYS_prlimit64: ::c_long = 261;
|
||||
pub const SYS_fanotify_init: ::c_long = 262;
|
||||
pub const SYS_fanotify_mark: ::c_long = 263;
|
||||
pub const SYS_name_to_handle_at: ::c_long = 264;
|
||||
pub const SYS_open_by_handle_at: ::c_long = 265;
|
||||
pub const SYS_clock_adjtime: ::c_long = 266;
|
||||
pub const SYS_syncfs: ::c_long = 267;
|
||||
pub const SYS_setns: ::c_long = 268;
|
||||
pub const SYS_sendmmsg: ::c_long = 269;
|
||||
pub const SYS_process_vm_readv: ::c_long = 270;
|
||||
pub const SYS_process_vm_writev: ::c_long = 271;
|
||||
pub const SYS_kcmp: ::c_long = 272;
|
||||
pub const SYS_finit_module: ::c_long = 273;
|
||||
pub const SYS_sched_setattr: ::c_long = 274;
|
||||
pub const SYS_sched_getattr: ::c_long = 275;
|
||||
pub const SYS_renameat2: ::c_long = 276;
|
||||
pub const SYS_seccomp: ::c_long = 277;
|
||||
pub const SYS_getrandom: ::c_long = 278;
|
||||
pub const SYS_memfd_create: ::c_long = 279;
|
||||
pub const SYS_bpf: ::c_long = 280;
|
||||
pub const SYS_execveat: ::c_long = 281;
|
||||
pub const SYS_userfaultfd: ::c_long = 282;
|
||||
pub const SYS_membarrier: ::c_long = 283;
|
||||
pub const SYS_mlock2: ::c_long = 284;
|
||||
pub const SYS_copy_file_range: ::c_long = 285;
|
||||
pub const SYS_preadv2: ::c_long = 286;
|
||||
pub const SYS_pwritev2: ::c_long = 287;
|
||||
pub const SYS_pkey_mprotect: ::c_long = 288;
|
||||
pub const SYS_pkey_alloc: ::c_long = 289;
|
||||
pub const SYS_pkey_free: ::c_long = 290;
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,79 @@
|
|||
pub type c_char = u8;
|
||||
pub type wchar_t = i32;
|
||||
pub type __u64 = ::c_ulong;
|
||||
pub type nlink_t = u64;
|
||||
pub type blksize_t = ::c_long;
|
||||
|
||||
s! {
|
||||
pub struct stat {
|
||||
pub st_dev: ::dev_t,
|
||||
pub st_ino: ::ino_t,
|
||||
pub st_nlink: ::nlink_t,
|
||||
pub st_mode: ::mode_t,
|
||||
pub st_uid: ::uid_t,
|
||||
pub st_gid: ::gid_t,
|
||||
__pad0: ::c_int,
|
||||
pub st_rdev: ::dev_t,
|
||||
pub st_size: ::off_t,
|
||||
pub st_blksize: ::blksize_t,
|
||||
pub st_blocks: ::blkcnt_t,
|
||||
pub st_atime: ::time_t,
|
||||
pub st_atime_nsec: ::c_long,
|
||||
pub st_mtime: ::time_t,
|
||||
pub st_mtime_nsec: ::c_long,
|
||||
pub st_ctime: ::time_t,
|
||||
pub st_ctime_nsec: ::c_long,
|
||||
__unused: [::c_long; 3],
|
||||
}
|
||||
|
||||
pub struct stat64 {
|
||||
pub st_dev: ::dev_t,
|
||||
pub st_ino: ::ino64_t,
|
||||
pub st_nlink: ::nlink_t,
|
||||
pub st_mode: ::mode_t,
|
||||
pub st_uid: ::uid_t,
|
||||
pub st_gid: ::gid_t,
|
||||
__pad0: ::c_int,
|
||||
pub st_rdev: ::dev_t,
|
||||
pub st_size: ::off_t,
|
||||
pub st_blksize: ::blksize_t,
|
||||
pub st_blocks: ::blkcnt64_t,
|
||||
pub st_atime: ::time_t,
|
||||
pub st_atime_nsec: ::c_long,
|
||||
pub st_mtime: ::time_t,
|
||||
pub st_mtime_nsec: ::c_long,
|
||||
pub st_ctime: ::time_t,
|
||||
pub st_ctime_nsec: ::c_long,
|
||||
__reserved: [::c_long; 3],
|
||||
}
|
||||
|
||||
pub struct ipc_perm {
|
||||
pub __ipc_perm_key: ::key_t,
|
||||
pub uid: ::uid_t,
|
||||
pub gid: ::gid_t,
|
||||
pub cuid: ::uid_t,
|
||||
pub cgid: ::gid_t,
|
||||
pub mode: ::mode_t,
|
||||
pub __seq: ::c_int,
|
||||
__unused1: ::c_long,
|
||||
__unused2: ::c_long
|
||||
}
|
||||
}
|
||||
|
||||
pub const SYS_pivot_root: ::c_long = 203;
|
||||
pub const SYS_gettid: ::c_long = 207;
|
||||
pub const SYS_perf_event_open: ::c_long = 319;
|
||||
pub const SYS_memfd_create: ::c_long = 360;
|
||||
|
||||
pub const MAP_32BIT: ::c_int = 0x0040;
|
||||
|
||||
pub const SIGSTKSZ: ::size_t = 8192;
|
||||
pub const MINSIGSTKSZ: ::size_t = 2048;
|
||||
|
||||
#[doc(hidden)]
|
||||
pub const AF_MAX: ::c_int = 42;
|
||||
#[doc(hidden)]
|
||||
pub const PF_MAX: ::c_int = AF_MAX;
|
||||
|
||||
// Syscall table
|
||||
pub const SYS_renameat2: ::c_long = 357;
|
|
@ -0,0 +1,447 @@
|
|||
pub type c_char = i8;
|
||||
pub type wchar_t = i32;
|
||||
pub type nlink_t = u64;
|
||||
pub type blksize_t = ::c_long;
|
||||
pub type __u64 = ::c_ulonglong;
|
||||
|
||||
s! {
|
||||
pub struct stat {
|
||||
pub st_dev: ::dev_t,
|
||||
pub st_ino: ::ino_t,
|
||||
pub st_nlink: ::nlink_t,
|
||||
pub st_mode: ::mode_t,
|
||||
pub st_uid: ::uid_t,
|
||||
pub st_gid: ::gid_t,
|
||||
__pad0: ::c_int,
|
||||
pub st_rdev: ::dev_t,
|
||||
pub st_size: ::off_t,
|
||||
pub st_blksize: ::blksize_t,
|
||||
pub st_blocks: ::blkcnt_t,
|
||||
pub st_atime: ::time_t,
|
||||
pub st_atime_nsec: ::c_long,
|
||||
pub st_mtime: ::time_t,
|
||||
pub st_mtime_nsec: ::c_long,
|
||||
pub st_ctime: ::time_t,
|
||||
pub st_ctime_nsec: ::c_long,
|
||||
__unused: [::c_long; 3],
|
||||
}
|
||||
|
||||
pub struct stat64 {
|
||||
pub st_dev: ::dev_t,
|
||||
pub st_ino: ::ino64_t,
|
||||
pub st_nlink: ::nlink_t,
|
||||
pub st_mode: ::mode_t,
|
||||
pub st_uid: ::uid_t,
|
||||
pub st_gid: ::gid_t,
|
||||
__pad0: ::c_int,
|
||||
pub st_rdev: ::dev_t,
|
||||
pub st_size: ::off_t,
|
||||
pub st_blksize: ::blksize_t,
|
||||
pub st_blocks: ::blkcnt64_t,
|
||||
pub st_atime: ::time_t,
|
||||
pub st_atime_nsec: ::c_long,
|
||||
pub st_mtime: ::time_t,
|
||||
pub st_mtime_nsec: ::c_long,
|
||||
pub st_ctime: ::time_t,
|
||||
pub st_ctime_nsec: ::c_long,
|
||||
__reserved: [::c_long; 3],
|
||||
}
|
||||
|
||||
pub struct mcontext_t {
|
||||
__private: [u64; 32],
|
||||
}
|
||||
|
||||
pub struct ucontext_t {
|
||||
pub uc_flags: ::c_ulong,
|
||||
pub uc_link: *mut ucontext_t,
|
||||
pub uc_stack: ::stack_t,
|
||||
pub uc_mcontext: mcontext_t,
|
||||
pub uc_sigmask: ::sigset_t,
|
||||
__private: [u8; 512],
|
||||
}
|
||||
|
||||
pub struct ipc_perm {
|
||||
pub __ipc_perm_key: ::key_t,
|
||||
pub uid: ::uid_t,
|
||||
pub gid: ::gid_t,
|
||||
pub cuid: ::uid_t,
|
||||
pub cgid: ::gid_t,
|
||||
pub mode: ::mode_t,
|
||||
pub __seq: ::c_int,
|
||||
__unused1: ::c_long,
|
||||
__unused2: ::c_long
|
||||
}
|
||||
}
|
||||
|
||||
// Syscall table
|
||||
|
||||
pub const SYS_read: ::c_long = 0;
|
||||
pub const SYS_write: ::c_long = 1;
|
||||
pub const SYS_open: ::c_long = 2;
|
||||
pub const SYS_close: ::c_long = 3;
|
||||
pub const SYS_stat: ::c_long = 4;
|
||||
pub const SYS_fstat: ::c_long = 5;
|
||||
pub const SYS_lstat: ::c_long = 6;
|
||||
pub const SYS_poll: ::c_long = 7;
|
||||
pub const SYS_lseek: ::c_long = 8;
|
||||
pub const SYS_mmap: ::c_long = 9;
|
||||
pub const SYS_mprotect: ::c_long = 10;
|
||||
pub const SYS_munmap: ::c_long = 11;
|
||||
pub const SYS_brk: ::c_long = 12;
|
||||
pub const SYS_rt_sigaction: ::c_long = 13;
|
||||
pub const SYS_rt_sigprocmask: ::c_long = 14;
|
||||
pub const SYS_rt_sigreturn: ::c_long = 15;
|
||||
pub const SYS_ioctl: ::c_long = 16;
|
||||
pub const SYS_pread64: ::c_long = 17;
|
||||
pub const SYS_pwrite64: ::c_long = 18;
|
||||
pub const SYS_readv: ::c_long = 19;
|
||||
pub const SYS_writev: ::c_long = 20;
|
||||
pub const SYS_access: ::c_long = 21;
|
||||
pub const SYS_pipe: ::c_long = 22;
|
||||
pub const SYS_select: ::c_long = 23;
|
||||
pub const SYS_sched_yield: ::c_long = 24;
|
||||
pub const SYS_mremap: ::c_long = 25;
|
||||
pub const SYS_msync: ::c_long = 26;
|
||||
pub const SYS_mincore: ::c_long = 27;
|
||||
pub const SYS_madvise: ::c_long = 28;
|
||||
pub const SYS_shmget: ::c_long = 29;
|
||||
pub const SYS_shmat: ::c_long = 30;
|
||||
pub const SYS_shmctl: ::c_long = 31;
|
||||
pub const SYS_dup: ::c_long = 32;
|
||||
pub const SYS_dup2: ::c_long = 33;
|
||||
pub const SYS_pause: ::c_long = 34;
|
||||
pub const SYS_nanosleep: ::c_long = 35;
|
||||
pub const SYS_getitimer: ::c_long = 36;
|
||||
pub const SYS_alarm: ::c_long = 37;
|
||||
pub const SYS_setitimer: ::c_long = 38;
|
||||
pub const SYS_getpid: ::c_long = 39;
|
||||
pub const SYS_sendfile: ::c_long = 40;
|
||||
pub const SYS_socket: ::c_long = 41;
|
||||
pub const SYS_connect: ::c_long = 42;
|
||||
pub const SYS_accept: ::c_long = 43;
|
||||
pub const SYS_sendto: ::c_long = 44;
|
||||
pub const SYS_recvfrom: ::c_long = 45;
|
||||
pub const SYS_sendmsg: ::c_long = 46;
|
||||
pub const SYS_recvmsg: ::c_long = 47;
|
||||
pub const SYS_shutdown: ::c_long = 48;
|
||||
pub const SYS_bind: ::c_long = 49;
|
||||
pub const SYS_listen: ::c_long = 50;
|
||||
pub const SYS_getsockname: ::c_long = 51;
|
||||
pub const SYS_getpeername: ::c_long = 52;
|
||||
pub const SYS_socketpair: ::c_long = 53;
|
||||
pub const SYS_setsockopt: ::c_long = 54;
|
||||
pub const SYS_getsockopt: ::c_long = 55;
|
||||
pub const SYS_clone: ::c_long = 56;
|
||||
pub const SYS_fork: ::c_long = 57;
|
||||
pub const SYS_vfork: ::c_long = 58;
|
||||
pub const SYS_execve: ::c_long = 59;
|
||||
pub const SYS_exit: ::c_long = 60;
|
||||
pub const SYS_wait4: ::c_long = 61;
|
||||
pub const SYS_kill: ::c_long = 62;
|
||||
pub const SYS_uname: ::c_long = 63;
|
||||
pub const SYS_semget: ::c_long = 64;
|
||||
pub const SYS_semop: ::c_long = 65;
|
||||
pub const SYS_semctl: ::c_long = 66;
|
||||
pub const SYS_shmdt: ::c_long = 67;
|
||||
pub const SYS_msgget: ::c_long = 68;
|
||||
pub const SYS_msgsnd: ::c_long = 69;
|
||||
pub const SYS_msgrcv: ::c_long = 70;
|
||||
pub const SYS_msgctl: ::c_long = 71;
|
||||
pub const SYS_fcntl: ::c_long = 72;
|
||||
pub const SYS_flock: ::c_long = 73;
|
||||
pub const SYS_fsync: ::c_long = 74;
|
||||
pub const SYS_fdatasync: ::c_long = 75;
|
||||
pub const SYS_truncate: ::c_long = 76;
|
||||
pub const SYS_ftruncate: ::c_long = 77;
|
||||
pub const SYS_getdents: ::c_long = 78;
|
||||
pub const SYS_getcwd: ::c_long = 79;
|
||||
pub const SYS_chdir: ::c_long = 80;
|
||||
pub const SYS_fchdir: ::c_long = 81;
|
||||
pub const SYS_rename: ::c_long = 82;
|
||||
pub const SYS_mkdir: ::c_long = 83;
|
||||
pub const SYS_rmdir: ::c_long = 84;
|
||||
pub const SYS_creat: ::c_long = 85;
|
||||
pub const SYS_link: ::c_long = 86;
|
||||
pub const SYS_unlink: ::c_long = 87;
|
||||
pub const SYS_symlink: ::c_long = 88;
|
||||
pub const SYS_readlink: ::c_long = 89;
|
||||
pub const SYS_chmod: ::c_long = 90;
|
||||
pub const SYS_fchmod: ::c_long = 91;
|
||||
pub const SYS_chown: ::c_long = 92;
|
||||
pub const SYS_fchown: ::c_long = 93;
|
||||
pub const SYS_lchown: ::c_long = 94;
|
||||
pub const SYS_umask: ::c_long = 95;
|
||||
pub const SYS_gettimeofday: ::c_long = 96;
|
||||
pub const SYS_getrlimit: ::c_long = 97;
|
||||
pub const SYS_getrusage: ::c_long = 98;
|
||||
pub const SYS_sysinfo: ::c_long = 99;
|
||||
pub const SYS_times: ::c_long = 100;
|
||||
pub const SYS_ptrace: ::c_long = 101;
|
||||
pub const SYS_getuid: ::c_long = 102;
|
||||
pub const SYS_syslog: ::c_long = 103;
|
||||
pub const SYS_getgid: ::c_long = 104;
|
||||
pub const SYS_setuid: ::c_long = 105;
|
||||
pub const SYS_setgid: ::c_long = 106;
|
||||
pub const SYS_geteuid: ::c_long = 107;
|
||||
pub const SYS_getegid: ::c_long = 108;
|
||||
pub const SYS_setpgid: ::c_long = 109;
|
||||
pub const SYS_getppid: ::c_long = 110;
|
||||
pub const SYS_getpgrp: ::c_long = 111;
|
||||
pub const SYS_setsid: ::c_long = 112;
|
||||
pub const SYS_setreuid: ::c_long = 113;
|
||||
pub const SYS_setregid: ::c_long = 114;
|
||||
pub const SYS_getgroups: ::c_long = 115;
|
||||
pub const SYS_setgroups: ::c_long = 116;
|
||||
pub const SYS_setresuid: ::c_long = 117;
|
||||
pub const SYS_getresuid: ::c_long = 118;
|
||||
pub const SYS_setresgid: ::c_long = 119;
|
||||
pub const SYS_getresgid: ::c_long = 120;
|
||||
pub const SYS_getpgid: ::c_long = 121;
|
||||
pub const SYS_setfsuid: ::c_long = 122;
|
||||
pub const SYS_setfsgid: ::c_long = 123;
|
||||
pub const SYS_getsid: ::c_long = 124;
|
||||
pub const SYS_capget: ::c_long = 125;
|
||||
pub const SYS_capset: ::c_long = 126;
|
||||
pub const SYS_rt_sigpending: ::c_long = 127;
|
||||
pub const SYS_rt_sigtimedwait: ::c_long = 128;
|
||||
pub const SYS_rt_sigqueueinfo: ::c_long = 129;
|
||||
pub const SYS_rt_sigsuspend: ::c_long = 130;
|
||||
pub const SYS_sigaltstack: ::c_long = 131;
|
||||
pub const SYS_utime: ::c_long = 132;
|
||||
pub const SYS_mknod: ::c_long = 133;
|
||||
pub const SYS_uselib: ::c_long = 134;
|
||||
pub const SYS_personality: ::c_long = 135;
|
||||
pub const SYS_ustat: ::c_long = 136;
|
||||
pub const SYS_statfs: ::c_long = 137;
|
||||
pub const SYS_fstatfs: ::c_long = 138;
|
||||
pub const SYS_sysfs: ::c_long = 139;
|
||||
pub const SYS_getpriority: ::c_long = 140;
|
||||
pub const SYS_setpriority: ::c_long = 141;
|
||||
pub const SYS_sched_setparam: ::c_long = 142;
|
||||
pub const SYS_sched_getparam: ::c_long = 143;
|
||||
pub const SYS_sched_setscheduler: ::c_long = 144;
|
||||
pub const SYS_sched_getscheduler: ::c_long = 145;
|
||||
pub const SYS_sched_get_priority_max: ::c_long = 146;
|
||||
pub const SYS_sched_get_priority_min: ::c_long = 147;
|
||||
pub const SYS_sched_rr_get_interval: ::c_long = 148;
|
||||
pub const SYS_mlock: ::c_long = 149;
|
||||
pub const SYS_munlock: ::c_long = 150;
|
||||
pub const SYS_mlockall: ::c_long = 151;
|
||||
pub const SYS_munlockall: ::c_long = 152;
|
||||
pub const SYS_vhangup: ::c_long = 153;
|
||||
pub const SYS_modify_ldt: ::c_long = 154;
|
||||
pub const SYS_pivot_root: ::c_long = 155;
|
||||
pub const SYS__sysctl: ::c_long = 156;
|
||||
pub const SYS_prctl: ::c_long = 157;
|
||||
pub const SYS_arch_prctl: ::c_long = 158;
|
||||
pub const SYS_adjtimex: ::c_long = 159;
|
||||
pub const SYS_setrlimit: ::c_long = 160;
|
||||
pub const SYS_chroot: ::c_long = 161;
|
||||
pub const SYS_sync: ::c_long = 162;
|
||||
pub const SYS_acct: ::c_long = 163;
|
||||
pub const SYS_settimeofday: ::c_long = 164;
|
||||
pub const SYS_mount: ::c_long = 165;
|
||||
pub const SYS_umount2: ::c_long = 166;
|
||||
pub const SYS_swapon: ::c_long = 167;
|
||||
pub const SYS_swapoff: ::c_long = 168;
|
||||
pub const SYS_reboot: ::c_long = 169;
|
||||
pub const SYS_sethostname: ::c_long = 170;
|
||||
pub const SYS_setdomainname: ::c_long = 171;
|
||||
pub const SYS_iopl: ::c_long = 172;
|
||||
pub const SYS_ioperm: ::c_long = 173;
|
||||
pub const SYS_create_module: ::c_long = 174;
|
||||
pub const SYS_init_module: ::c_long = 175;
|
||||
pub const SYS_delete_module: ::c_long = 176;
|
||||
pub const SYS_get_kernel_syms: ::c_long = 177;
|
||||
pub const SYS_query_module: ::c_long = 178;
|
||||
pub const SYS_quotactl: ::c_long = 179;
|
||||
pub const SYS_nfsservctl: ::c_long = 180;
|
||||
pub const SYS_getpmsg: ::c_long = 181;
|
||||
pub const SYS_putpmsg: ::c_long = 182;
|
||||
pub const SYS_afs_syscall: ::c_long = 183;
|
||||
pub const SYS_tuxcall: ::c_long = 184;
|
||||
pub const SYS_security: ::c_long = 185;
|
||||
pub const SYS_gettid: ::c_long = 186;
|
||||
pub const SYS_readahead: ::c_long = 187;
|
||||
pub const SYS_setxattr: ::c_long = 188;
|
||||
pub const SYS_lsetxattr: ::c_long = 189;
|
||||
pub const SYS_fsetxattr: ::c_long = 190;
|
||||
pub const SYS_getxattr: ::c_long = 191;
|
||||
pub const SYS_lgetxattr: ::c_long = 192;
|
||||
pub const SYS_fgetxattr: ::c_long = 193;
|
||||
pub const SYS_listxattr: ::c_long = 194;
|
||||
pub const SYS_llistxattr: ::c_long = 195;
|
||||
pub const SYS_flistxattr: ::c_long = 196;
|
||||
pub const SYS_removexattr: ::c_long = 197;
|
||||
pub const SYS_lremovexattr: ::c_long = 198;
|
||||
pub const SYS_fremovexattr: ::c_long = 199;
|
||||
pub const SYS_tkill: ::c_long = 200;
|
||||
pub const SYS_time: ::c_long = 201;
|
||||
pub const SYS_futex: ::c_long = 202;
|
||||
pub const SYS_sched_setaffinity: ::c_long = 203;
|
||||
pub const SYS_sched_getaffinity: ::c_long = 204;
|
||||
pub const SYS_set_thread_area: ::c_long = 205;
|
||||
pub const SYS_io_setup: ::c_long = 206;
|
||||
pub const SYS_io_destroy: ::c_long = 207;
|
||||
pub const SYS_io_getevents: ::c_long = 208;
|
||||
pub const SYS_io_submit: ::c_long = 209;
|
||||
pub const SYS_io_cancel: ::c_long = 210;
|
||||
pub const SYS_get_thread_area: ::c_long = 211;
|
||||
pub const SYS_lookup_dcookie: ::c_long = 212;
|
||||
pub const SYS_epoll_create: ::c_long = 213;
|
||||
pub const SYS_epoll_ctl_old: ::c_long = 214;
|
||||
pub const SYS_epoll_wait_old: ::c_long = 215;
|
||||
pub const SYS_remap_file_pages: ::c_long = 216;
|
||||
pub const SYS_getdents64: ::c_long = 217;
|
||||
pub const SYS_set_tid_address: ::c_long = 218;
|
||||
pub const SYS_restart_syscall: ::c_long = 219;
|
||||
pub const SYS_semtimedop: ::c_long = 220;
|
||||
pub const SYS_fadvise64: ::c_long = 221;
|
||||
pub const SYS_timer_create: ::c_long = 222;
|
||||
pub const SYS_timer_settime: ::c_long = 223;
|
||||
pub const SYS_timer_gettime: ::c_long = 224;
|
||||
pub const SYS_timer_getoverrun: ::c_long = 225;
|
||||
pub const SYS_timer_delete: ::c_long = 226;
|
||||
pub const SYS_clock_settime: ::c_long = 227;
|
||||
pub const SYS_clock_gettime: ::c_long = 228;
|
||||
pub const SYS_clock_getres: ::c_long = 229;
|
||||
pub const SYS_clock_nanosleep: ::c_long = 230;
|
||||
pub const SYS_exit_group: ::c_long = 231;
|
||||
pub const SYS_epoll_wait: ::c_long = 232;
|
||||
pub const SYS_epoll_ctl: ::c_long = 233;
|
||||
pub const SYS_tgkill: ::c_long = 234;
|
||||
pub const SYS_utimes: ::c_long = 235;
|
||||
pub const SYS_vserver: ::c_long = 236;
|
||||
pub const SYS_mbind: ::c_long = 237;
|
||||
pub const SYS_set_mempolicy: ::c_long = 238;
|
||||
pub const SYS_get_mempolicy: ::c_long = 239;
|
||||
pub const SYS_mq_open: ::c_long = 240;
|
||||
pub const SYS_mq_unlink: ::c_long = 241;
|
||||
pub const SYS_mq_timedsend: ::c_long = 242;
|
||||
pub const SYS_mq_timedreceive: ::c_long = 243;
|
||||
pub const SYS_mq_notify: ::c_long = 244;
|
||||
pub const SYS_mq_getsetattr: ::c_long = 245;
|
||||
pub const SYS_kexec_load: ::c_long = 246;
|
||||
pub const SYS_waitid: ::c_long = 247;
|
||||
pub const SYS_add_key: ::c_long = 248;
|
||||
pub const SYS_request_key: ::c_long = 249;
|
||||
pub const SYS_keyctl: ::c_long = 250;
|
||||
pub const SYS_ioprio_set: ::c_long = 251;
|
||||
pub const SYS_ioprio_get: ::c_long = 252;
|
||||
pub const SYS_inotify_init: ::c_long = 253;
|
||||
pub const SYS_inotify_add_watch: ::c_long = 254;
|
||||
pub const SYS_inotify_rm_watch: ::c_long = 255;
|
||||
pub const SYS_migrate_pages: ::c_long = 256;
|
||||
pub const SYS_openat: ::c_long = 257;
|
||||
pub const SYS_mkdirat: ::c_long = 258;
|
||||
pub const SYS_mknodat: ::c_long = 259;
|
||||
pub const SYS_fchownat: ::c_long = 260;
|
||||
pub const SYS_futimesat: ::c_long = 261;
|
||||
pub const SYS_newfstatat: ::c_long = 262;
|
||||
pub const SYS_unlinkat: ::c_long = 263;
|
||||
pub const SYS_renameat: ::c_long = 264;
|
||||
pub const SYS_linkat: ::c_long = 265;
|
||||
pub const SYS_symlinkat: ::c_long = 266;
|
||||
pub const SYS_readlinkat: ::c_long = 267;
|
||||
pub const SYS_fchmodat: ::c_long = 268;
|
||||
pub const SYS_faccessat: ::c_long = 269;
|
||||
pub const SYS_pselect6: ::c_long = 270;
|
||||
pub const SYS_ppoll: ::c_long = 271;
|
||||
pub const SYS_unshare: ::c_long = 272;
|
||||
pub const SYS_set_robust_list: ::c_long = 273;
|
||||
pub const SYS_get_robust_list: ::c_long = 274;
|
||||
pub const SYS_splice: ::c_long = 275;
|
||||
pub const SYS_tee: ::c_long = 276;
|
||||
pub const SYS_sync_file_range: ::c_long = 277;
|
||||
pub const SYS_vmsplice: ::c_long = 278;
|
||||
pub const SYS_move_pages: ::c_long = 279;
|
||||
pub const SYS_utimensat: ::c_long = 280;
|
||||
pub const SYS_epoll_pwait: ::c_long = 281;
|
||||
pub const SYS_signalfd: ::c_long = 282;
|
||||
pub const SYS_timerfd_create: ::c_long = 283;
|
||||
pub const SYS_eventfd: ::c_long = 284;
|
||||
pub const SYS_fallocate: ::c_long = 285;
|
||||
pub const SYS_timerfd_settime: ::c_long = 286;
|
||||
pub const SYS_timerfd_gettime: ::c_long = 287;
|
||||
pub const SYS_accept4: ::c_long = 288;
|
||||
pub const SYS_signalfd4: ::c_long = 289;
|
||||
pub const SYS_eventfd2: ::c_long = 290;
|
||||
pub const SYS_epoll_create1: ::c_long = 291;
|
||||
pub const SYS_dup3: ::c_long = 292;
|
||||
pub const SYS_pipe2: ::c_long = 293;
|
||||
pub const SYS_inotify_init1: ::c_long = 294;
|
||||
pub const SYS_preadv: ::c_long = 295;
|
||||
pub const SYS_pwritev: ::c_long = 296;
|
||||
pub const SYS_rt_tgsigqueueinfo: ::c_long = 297;
|
||||
pub const SYS_perf_event_open: ::c_long = 298;
|
||||
pub const SYS_recvmmsg: ::c_long = 299;
|
||||
pub const SYS_fanotify_init: ::c_long = 300;
|
||||
pub const SYS_fanotify_mark: ::c_long = 301;
|
||||
pub const SYS_prlimit64: ::c_long = 302;
|
||||
pub const SYS_name_to_handle_at: ::c_long = 303;
|
||||
pub const SYS_open_by_handle_at: ::c_long = 304;
|
||||
pub const SYS_clock_adjtime: ::c_long = 305;
|
||||
pub const SYS_syncfs: ::c_long = 306;
|
||||
pub const SYS_sendmmsg: ::c_long = 307;
|
||||
pub const SYS_setns: ::c_long = 308;
|
||||
pub const SYS_getcpu: ::c_long = 309;
|
||||
pub const SYS_process_vm_readv: ::c_long = 310;
|
||||
pub const SYS_process_vm_writev: ::c_long = 311;
|
||||
pub const SYS_kcmp: ::c_long = 312;
|
||||
pub const SYS_finit_module: ::c_long = 313;
|
||||
pub const SYS_sched_setattr: ::c_long = 314;
|
||||
pub const SYS_sched_getattr: ::c_long = 315;
|
||||
pub const SYS_renameat2: ::c_long = 316;
|
||||
pub const SYS_seccomp: ::c_long = 317;
|
||||
pub const SYS_getrandom: ::c_long = 318;
|
||||
pub const SYS_memfd_create: ::c_long = 319;
|
||||
pub const SYS_kexec_file_load: ::c_long = 320;
|
||||
pub const SYS_bpf: ::c_long = 321;
|
||||
pub const SYS_execveat: ::c_long = 322;
|
||||
pub const SYS_userfaultfd: ::c_long = 323;
|
||||
pub const SYS_membarrier: ::c_long = 324;
|
||||
pub const SYS_mlock2: ::c_long = 325;
|
||||
pub const SYS_copy_file_range: ::c_long = 326;
|
||||
pub const SYS_preadv2: ::c_long = 327;
|
||||
pub const SYS_pwritev2: ::c_long = 328;
|
||||
// FIXME syscalls 329-331 have been added in musl 1.16
|
||||
// See discussion https://github.com/rust-lang/libc/pull/699
|
||||
|
||||
// offsets in user_regs_structs, from sys/reg.h
|
||||
pub const R15: ::c_int = 0;
|
||||
pub const R14: ::c_int = 1;
|
||||
pub const R13: ::c_int = 2;
|
||||
pub const R12: ::c_int = 3;
|
||||
pub const RBP: ::c_int = 4;
|
||||
pub const RBX: ::c_int = 5;
|
||||
pub const R11: ::c_int = 6;
|
||||
pub const R10: ::c_int = 7;
|
||||
pub const R9: ::c_int = 8;
|
||||
pub const R8: ::c_int = 9;
|
||||
pub const RAX: ::c_int = 10;
|
||||
pub const RCX: ::c_int = 11;
|
||||
pub const RDX: ::c_int = 12;
|
||||
pub const RSI: ::c_int = 13;
|
||||
pub const RDI: ::c_int = 14;
|
||||
pub const ORIG_RAX: ::c_int = 15;
|
||||
pub const RIP: ::c_int = 16;
|
||||
pub const CS: ::c_int = 17;
|
||||
pub const EFLAGS: ::c_int = 18;
|
||||
pub const RSP: ::c_int = 19;
|
||||
pub const SS: ::c_int = 20;
|
||||
pub const FS_BASE: ::c_int = 21;
|
||||
pub const GS_BASE: ::c_int = 22;
|
||||
pub const DS: ::c_int = 23;
|
||||
pub const ES: ::c_int = 24;
|
||||
pub const FS: ::c_int = 25;
|
||||
pub const GS: ::c_int = 26;
|
||||
|
||||
pub const MAP_32BIT: ::c_int = 0x0040;
|
||||
|
||||
pub const SIGSTKSZ: ::size_t = 8192;
|
||||
pub const MINSIGSTKSZ: ::size_t = 2048;
|
||||
|
||||
#[doc(hidden)]
|
||||
pub const AF_MAX: ::c_int = 42;
|
||||
#[doc(hidden)]
|
||||
pub const PF_MAX: ::c_int = AF_MAX;
|
|
@ -100,50 +100,58 @@ extern crate std as core;
|
|||
#[macro_use] mod macros;
|
||||
mod dox;
|
||||
|
||||
// Use repr(u8) as LLVM expects `void*` to be the same as `i8*` to help enable
|
||||
// more optimization opportunities around it recognizing things like
|
||||
// malloc/free.
|
||||
#[repr(u8)]
|
||||
pub enum c_void {
|
||||
cfg_if! {
|
||||
if #[cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))] {
|
||||
// empty ...
|
||||
} else {
|
||||
|
||||
// Use repr(u8) as LLVM expects `void*` to be the same as `i8*` to help enable
|
||||
// more optimization opportunities around it recognizing things like
|
||||
// malloc/free.
|
||||
#[repr(u8)]
|
||||
pub enum c_void {
|
||||
// Two dummy variants so the #[repr] attribute can be used.
|
||||
#[doc(hidden)]
|
||||
__variant1,
|
||||
#[doc(hidden)]
|
||||
__variant2,
|
||||
}
|
||||
}
|
||||
|
||||
pub type int8_t = i8;
|
||||
pub type int16_t = i16;
|
||||
pub type int32_t = i32;
|
||||
pub type int64_t = i64;
|
||||
pub type uint8_t = u8;
|
||||
pub type uint16_t = u16;
|
||||
pub type uint32_t = u32;
|
||||
pub type uint64_t = u64;
|
||||
pub type int8_t = i8;
|
||||
pub type int16_t = i16;
|
||||
pub type int32_t = i32;
|
||||
pub type int64_t = i64;
|
||||
pub type uint8_t = u8;
|
||||
pub type uint16_t = u16;
|
||||
pub type uint32_t = u32;
|
||||
pub type uint64_t = u64;
|
||||
|
||||
pub type c_schar = i8;
|
||||
pub type c_uchar = u8;
|
||||
pub type c_short = i16;
|
||||
pub type c_ushort = u16;
|
||||
pub type c_int = i32;
|
||||
pub type c_uint = u32;
|
||||
pub type c_float = f32;
|
||||
pub type c_double = f64;
|
||||
pub type c_longlong = i64;
|
||||
pub type c_ulonglong = u64;
|
||||
pub type intmax_t = i64;
|
||||
pub type uintmax_t = u64;
|
||||
pub type c_schar = i8;
|
||||
pub type c_uchar = u8;
|
||||
pub type c_short = i16;
|
||||
pub type c_ushort = u16;
|
||||
pub type c_int = i32;
|
||||
pub type c_uint = u32;
|
||||
pub type c_float = f32;
|
||||
pub type c_double = f64;
|
||||
pub type c_longlong = i64;
|
||||
pub type c_ulonglong = u64;
|
||||
pub type intmax_t = i64;
|
||||
pub type uintmax_t = u64;
|
||||
|
||||
pub type size_t = usize;
|
||||
pub type ptrdiff_t = isize;
|
||||
pub type intptr_t = isize;
|
||||
pub type uintptr_t = usize;
|
||||
pub type ssize_t = isize;
|
||||
pub type size_t = usize;
|
||||
pub type ptrdiff_t = isize;
|
||||
pub type intptr_t = isize;
|
||||
pub type uintptr_t = usize;
|
||||
pub type ssize_t = isize;
|
||||
|
||||
pub enum FILE {}
|
||||
pub enum fpos_t {} // TODO: fill this out with a struct
|
||||
pub enum FILE {}
|
||||
pub enum fpos_t {} // TODO: fill this out with a struct
|
||||
|
||||
extern {
|
||||
pub const INT_MIN: c_int = -2147483648;
|
||||
pub const INT_MAX: c_int = 2147483647;
|
||||
|
||||
extern {
|
||||
pub fn isalnum(c: c_int) -> c_int;
|
||||
pub fn isalpha(c: c_int) -> c_int;
|
||||
pub fn iscntrl(c: c_int) -> c_int;
|
||||
|
@ -259,17 +267,19 @@ extern {
|
|||
pub fn memcpy(dest: *mut c_void, src: *const c_void, n: size_t) -> *mut c_void;
|
||||
pub fn memmove(dest: *mut c_void, src: *const c_void, n: size_t) -> *mut c_void;
|
||||
pub fn memset(dest: *mut c_void, c: c_int, n: size_t) -> *mut c_void;
|
||||
}
|
||||
}
|
||||
|
||||
// These are all inline functions on android, so they end up just being entirely
|
||||
// missing on that platform.
|
||||
#[cfg(not(target_os = "android"))]
|
||||
extern {
|
||||
// These are all inline functions on android, so they end up just being entirely
|
||||
// missing on that platform.
|
||||
#[cfg(not(target_os = "android"))]
|
||||
extern {
|
||||
pub fn abs(i: c_int) -> c_int;
|
||||
pub fn atof(s: *const c_char) -> c_double;
|
||||
pub fn labs(i: c_long) -> c_long;
|
||||
pub fn rand() -> c_int;
|
||||
pub fn srand(seed: c_uint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cfg_if! {
|
||||
|
@ -279,6 +289,12 @@ cfg_if! {
|
|||
} else if #[cfg(target_os = "redox")] {
|
||||
mod redox;
|
||||
pub use redox::*;
|
||||
} else if #[cfg(target_os = "cloudabi")] {
|
||||
mod cloudabi;
|
||||
pub use cloudabi::*;
|
||||
} else if #[cfg(target_os = "fuchsia")] {
|
||||
mod fuchsia;
|
||||
pub use fuchsia::*;
|
||||
} else if #[cfg(unix)] {
|
||||
mod unix;
|
||||
pub use unix::*;
|
||||
|
|
|
@ -41,6 +41,13 @@ s! {
|
|||
pub ifi_reserved1: u32,
|
||||
pub ifi_reserved2: u32,
|
||||
}
|
||||
|
||||
pub struct bpf_hdr {
|
||||
pub bh_tstamp: ::timeval,
|
||||
pub bh_caplen: ::uint32_t,
|
||||
pub bh_datalen: ::uint32_t,
|
||||
pub bh_hdrlen: ::c_ushort,
|
||||
}
|
||||
}
|
||||
|
||||
pub const __PTHREAD_MUTEX_SIZE__: usize = 40;
|
||||
|
|
|
@ -46,6 +46,13 @@ s! {
|
|||
pub ifi_reserved1: u32,
|
||||
pub ifi_reserved2: u32,
|
||||
}
|
||||
|
||||
pub struct bpf_hdr {
|
||||
pub bh_tstamp: ::timeval32,
|
||||
pub bh_caplen: ::uint32_t,
|
||||
pub bh_datalen: ::uint32_t,
|
||||
pub bh_hdrlen: ::c_ushort,
|
||||
}
|
||||
}
|
||||
|
||||
pub const __PTHREAD_MUTEX_SIZE__: usize = 56;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
//!
|
||||
//! This covers *-apple-* triples currently
|
||||
|
||||
pub type c_char = i8;
|
||||
pub type clock_t = c_ulong;
|
||||
pub type time_t = c_long;
|
||||
pub type suseconds_t = i32;
|
||||
|
@ -23,6 +24,14 @@ pub type nl_item = ::c_int;
|
|||
pub type id_t = ::c_uint;
|
||||
pub type sem_t = ::c_int;
|
||||
pub type idtype_t = ::c_uint;
|
||||
pub type integer_t = ::c_int;
|
||||
pub type cpu_type_t = integer_t;
|
||||
pub type cpu_subtype_t = integer_t;
|
||||
pub type vm_prot_t = ::c_int;
|
||||
pub type posix_spawnattr_t = *mut ::c_void;
|
||||
pub type posix_spawn_file_actions_t = *mut ::c_void;
|
||||
pub type key_t = ::c_int;
|
||||
pub type shmatt_t = ::c_ushort;
|
||||
|
||||
pub enum timezone {}
|
||||
|
||||
|
@ -418,6 +427,117 @@ s! {
|
|||
pub cr_ngroups: ::c_short,
|
||||
pub cr_groups: [::gid_t;16]
|
||||
}
|
||||
|
||||
pub struct mach_header {
|
||||
pub magic: u32,
|
||||
pub cputype: cpu_type_t,
|
||||
pub cpusubtype: cpu_subtype_t,
|
||||
pub filetype: u32,
|
||||
pub ncmds: u32,
|
||||
pub sizeofcmds: u32,
|
||||
pub flags: u32,
|
||||
}
|
||||
|
||||
pub struct mach_header_64 {
|
||||
pub magic: u32,
|
||||
pub cputype: cpu_type_t,
|
||||
pub cpusubtype: cpu_subtype_t,
|
||||
pub filetype: u32,
|
||||
pub ncmds: u32,
|
||||
pub sizeofcmds: u32,
|
||||
pub flags: u32,
|
||||
pub reserved: u32,
|
||||
}
|
||||
|
||||
pub struct segment_command {
|
||||
pub cmd: u32,
|
||||
pub cmdsize: u32,
|
||||
pub segname: [::c_char; 16],
|
||||
pub vmaddr: u32,
|
||||
pub vmsize: u32,
|
||||
pub fileoff: u32,
|
||||
pub filesize: u32,
|
||||
pub maxprot: vm_prot_t,
|
||||
pub initprot: vm_prot_t,
|
||||
pub nsects: u32,
|
||||
pub flags: u32,
|
||||
}
|
||||
|
||||
pub struct segment_command_64 {
|
||||
pub cmd: u32,
|
||||
pub cmdsize: u32,
|
||||
pub segname: [::c_char; 16],
|
||||
pub vmaddr: u64,
|
||||
pub vmsize: u64,
|
||||
pub fileoff: u64,
|
||||
pub filesize: u64,
|
||||
pub maxprot: vm_prot_t,
|
||||
pub initprot: vm_prot_t,
|
||||
pub nsects: u32,
|
||||
pub flags: u32,
|
||||
}
|
||||
|
||||
pub struct load_command {
|
||||
pub cmd: u32,
|
||||
pub cmdsize: u32,
|
||||
}
|
||||
|
||||
pub struct sockaddr_dl {
|
||||
pub sdl_len: ::c_uchar,
|
||||
pub sdl_family: ::c_uchar,
|
||||
pub sdl_index: ::c_ushort,
|
||||
pub sdl_type: ::c_uchar,
|
||||
pub sdl_nlen: ::c_uchar,
|
||||
pub sdl_alen: ::c_uchar,
|
||||
pub sdl_slen: ::c_uchar,
|
||||
pub sdl_data: [::c_char; 12],
|
||||
}
|
||||
|
||||
pub struct sockaddr_inarp {
|
||||
pub sin_len: ::c_uchar,
|
||||
pub sin_family: ::c_uchar,
|
||||
pub sin_port: ::c_ushort,
|
||||
pub sin_addr: ::in_addr,
|
||||
pub sin_srcaddr: ::in_addr,
|
||||
pub sin_tos: ::c_ushort,
|
||||
pub sin_other: ::c_ushort,
|
||||
}
|
||||
|
||||
pub struct sockaddr_ctl {
|
||||
pub sc_len: ::c_uchar,
|
||||
pub sc_family: ::c_uchar,
|
||||
pub ss_sysaddr: ::uint16_t,
|
||||
pub sc_id: ::uint32_t,
|
||||
pub sc_unit: ::uint32_t,
|
||||
pub sc_reserved: [::uint32_t; 5],
|
||||
}
|
||||
|
||||
// sys/ipc.h:
|
||||
|
||||
pub struct ipc_perm {
|
||||
pub uid: ::uid_t,
|
||||
pub gid: ::gid_t,
|
||||
pub cuid: ::uid_t,
|
||||
pub cgid: ::gid_t,
|
||||
pub mode: ::mode_t,
|
||||
pub _seq: ::c_ushort,
|
||||
pub _key: ::key_t,
|
||||
}
|
||||
|
||||
// FIXME: this should have align 4 but it's got align 8 on 64-bit
|
||||
pub struct shmid_ds {
|
||||
pub shm_perm: ipc_perm,
|
||||
pub shm_segsz: ::size_t,
|
||||
pub shm_lpid: ::pid_t,
|
||||
pub shm_cpid: ::pid_t,
|
||||
pub shm_nattch: ::shmatt_t,
|
||||
pub shm_atime: ::time_t, // FIXME: 64-bit wrong align => wrong offset
|
||||
pub shm_dtime: ::time_t, // FIXME: 64-bit wrong align => wrong offset
|
||||
pub shm_ctime: ::time_t, // FIXME: 64-bit wrong align => wrong offset
|
||||
// FIXME: 64-bit wrong align => wrong offset:
|
||||
pub shm_internal: *mut ::c_void,
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
pub const _UTX_USERSIZE: usize = 256;
|
||||
|
@ -841,7 +961,17 @@ pub const EOWNERDEAD: ::c_int = 105;
|
|||
pub const EQFULL: ::c_int = 106;
|
||||
pub const ELAST: ::c_int = 106;
|
||||
|
||||
pub const EAI_AGAIN: ::c_int = 2;
|
||||
pub const EAI_BADFLAGS: ::c_int = 3;
|
||||
pub const EAI_FAIL: ::c_int = 4;
|
||||
pub const EAI_FAMILY: ::c_int = 5;
|
||||
pub const EAI_MEMORY: ::c_int = 6;
|
||||
pub const EAI_NODATA: ::c_int = 7;
|
||||
pub const EAI_NONAME: ::c_int = 8;
|
||||
pub const EAI_SERVICE: ::c_int = 9;
|
||||
pub const EAI_SOCKTYPE: ::c_int = 10;
|
||||
pub const EAI_SYSTEM: ::c_int = 11;
|
||||
pub const EAI_OVERFLOW: ::c_int = 14;
|
||||
|
||||
pub const F_DUPFD: ::c_int = 0;
|
||||
pub const F_DUPFD_CLOEXEC: ::c_int = 67;
|
||||
|
@ -1063,7 +1193,7 @@ pub const IPPROTO_HOPOPTS: ::c_int = 0;
|
|||
// IPPROTO_ICMP defined in src/unix/mod.rs
|
||||
/// group mgmt protocol
|
||||
pub const IPPROTO_IGMP: ::c_int = 2;
|
||||
/// gateway^2 (deprecated)
|
||||
/// gateway<sup>2</sup> (deprecated)
|
||||
pub const IPPROTO_GGP: ::c_int = 3;
|
||||
/// for compatibility
|
||||
pub const IPPROTO_IPIP: ::c_int = 4;
|
||||
|
@ -1443,7 +1573,24 @@ pub const MSG_RCVMORE: ::c_int = 0x4000;
|
|||
pub const SCM_TIMESTAMP: ::c_int = 0x02;
|
||||
pub const SCM_CREDS: ::c_int = 0x03;
|
||||
|
||||
pub const IFF_LOOPBACK: ::c_int = 0x8;
|
||||
// https://github.com/aosm/xnu/blob/master/bsd/net/if.h#L140-L156
|
||||
pub const IFF_UP: ::c_int = 0x1; // interface is up
|
||||
pub const IFF_BROADCAST: ::c_int = 0x2; // broadcast address valid
|
||||
pub const IFF_DEBUG: ::c_int = 0x4; // turn on debugging
|
||||
pub const IFF_LOOPBACK: ::c_int = 0x8; // is a loopback net
|
||||
pub const IFF_POINTOPOINT: ::c_int = 0x10; // interface is point-to-point link
|
||||
pub const IFF_NOTRAILERS: ::c_int = 0x20; // obsolete: avoid use of trailers
|
||||
pub const IFF_RUNNING: ::c_int = 0x40; // resources allocated
|
||||
pub const IFF_NOARP: ::c_int = 0x80; // no address resolution protocol
|
||||
pub const IFF_PROMISC: ::c_int = 0x100;// receive all packets
|
||||
pub const IFF_ALLMULTI: ::c_int = 0x200;// receive all multicast packets
|
||||
pub const IFF_OACTIVE: ::c_int = 0x400;// transmission in progress
|
||||
pub const IFF_SIMPLEX: ::c_int = 0x800;// can't hear own transmissions
|
||||
pub const IFF_LINK0: ::c_int = 0x1000;// per link layer defined bit
|
||||
pub const IFF_LINK1: ::c_int = 0x2000;// per link layer defined bit
|
||||
pub const IFF_LINK2: ::c_int = 0x4000;// per link layer defined bit
|
||||
pub const IFF_ALTPHYS: ::c_int = IFF_LINK2;// use alternate physical connection
|
||||
pub const IFF_MULTICAST: ::c_int = 0x8000;// supports multicast
|
||||
|
||||
pub const SHUT_RD: ::c_int = 0;
|
||||
pub const SHUT_WR: ::c_int = 1;
|
||||
|
@ -1955,7 +2102,90 @@ pub const XATTR_NODEFAULT: ::c_int = 0x0010;
|
|||
pub const XATTR_SHOWCOMPRESSION: ::c_int = 0x0020;
|
||||
|
||||
pub const NET_RT_IFLIST2: ::c_int = 0x0006;
|
||||
pub const RTM_IFINFO2: ::c_int = 0x0012;
|
||||
|
||||
// net/route.h
|
||||
pub const RTF_UP: ::c_int = 0x1;
|
||||
pub const RTF_GATEWAY: ::c_int = 0x2;
|
||||
pub const RTF_HOST: ::c_int = 0x4;
|
||||
pub const RTF_REJECT: ::c_int = 0x8;
|
||||
pub const RTF_DYNAMIC: ::c_int = 0x10;
|
||||
pub const RTF_MODIFIED: ::c_int = 0x20;
|
||||
pub const RTF_DONE: ::c_int = 0x40;
|
||||
pub const RTF_DELCLONE: ::c_int = 0x80;
|
||||
pub const RTF_CLONING: ::c_int = 0x100;
|
||||
pub const RTF_XRESOLVE: ::c_int = 0x200;
|
||||
pub const RTF_LLINFO: ::c_int = 0x400;
|
||||
pub const RTF_STATIC: ::c_int = 0x800;
|
||||
pub const RTF_BLACKHOLE: ::c_int = 0x1000;
|
||||
pub const RTF_NOIFREF: ::c_int = 0x2000;
|
||||
pub const RTF_PROTO2: ::c_int = 0x4000;
|
||||
pub const RTF_PROTO1: ::c_int = 0x8000;
|
||||
pub const RTF_PRCLONING: ::c_int = 0x10000;
|
||||
pub const RTF_WASCLONED: ::c_int = 0x20000;
|
||||
pub const RTF_PROTO3: ::c_int = 0x40000;
|
||||
pub const RTF_PINNED: ::c_int = 0x100000;
|
||||
pub const RTF_LOCAL: ::c_int = 0x200000;
|
||||
pub const RTF_BROADCAST: ::c_int = 0x400000;
|
||||
pub const RTF_MULTICAST: ::c_int = 0x800000;
|
||||
pub const RTF_IFSCOPE: ::c_int = 0x1000000;
|
||||
pub const RTF_CONDEMNED: ::c_int = 0x2000000;
|
||||
pub const RTF_IFREF: ::c_int = 0x4000000;
|
||||
pub const RTF_PROXY: ::c_int = 0x8000000;
|
||||
pub const RTF_ROUTER: ::c_int = 0x10000000;
|
||||
|
||||
pub const RTM_VERSION: ::c_int = 5;
|
||||
|
||||
// Message types
|
||||
pub const RTM_ADD: ::c_int = 0x1;
|
||||
pub const RTM_DELETE: ::c_int = 0x2;
|
||||
pub const RTM_CHANGE: ::c_int = 0x3;
|
||||
pub const RTM_GET: ::c_int = 0x4;
|
||||
pub const RTM_LOSING: ::c_int = 0x5;
|
||||
pub const RTM_REDIRECT: ::c_int = 0x6;
|
||||
pub const RTM_MISS: ::c_int = 0x7;
|
||||
pub const RTM_LOCK: ::c_int = 0x8;
|
||||
pub const RTM_OLDADD: ::c_int = 0x9;
|
||||
pub const RTM_OLDDEL: ::c_int = 0xa;
|
||||
pub const RTM_RESOLVE: ::c_int = 0xb;
|
||||
pub const RTM_NEWADDR: ::c_int = 0xc;
|
||||
pub const RTM_DELADDR: ::c_int = 0xd;
|
||||
pub const RTM_IFINFO: ::c_int = 0xe;
|
||||
pub const RTM_NEWMADDR: ::c_int = 0xf;
|
||||
pub const RTM_DELMADDR: ::c_int = 0x10;
|
||||
pub const RTM_IFINFO2: ::c_int = 0x12;
|
||||
pub const RTM_NEWMADDR2: ::c_int = 0x13;
|
||||
pub const RTM_GET2: ::c_int = 0x14;
|
||||
|
||||
// Bitmask values for rtm_inits and rmx_locks.
|
||||
pub const RTV_MTU: ::c_int = 0x1;
|
||||
pub const RTV_HOPCOUNT: ::c_int = 0x2;
|
||||
pub const RTV_EXPIRE: ::c_int = 0x4;
|
||||
pub const RTV_RPIPE: ::c_int = 0x8;
|
||||
pub const RTV_SPIPE: ::c_int = 0x10;
|
||||
pub const RTV_SSTHRESH: ::c_int = 0x20;
|
||||
pub const RTV_RTT: ::c_int = 0x40;
|
||||
pub const RTV_RTTVAR: ::c_int = 0x80;
|
||||
|
||||
// Bitmask values for rtm_addrs.
|
||||
pub const RTA_DST: ::c_int = 0x1;
|
||||
pub const RTA_GATEWAY: ::c_int = 0x2;
|
||||
pub const RTA_NETMASK: ::c_int = 0x4;
|
||||
pub const RTA_GENMASK: ::c_int = 0x8;
|
||||
pub const RTA_IFP: ::c_int = 0x10;
|
||||
pub const RTA_IFA: ::c_int = 0x20;
|
||||
pub const RTA_AUTHOR: ::c_int = 0x40;
|
||||
pub const RTA_BRD: ::c_int = 0x80;
|
||||
|
||||
// Index offsets for sockaddr array for alternate internal encoding.
|
||||
pub const RTAX_DST: ::c_int = 0;
|
||||
pub const RTAX_GATEWAY: ::c_int = 1;
|
||||
pub const RTAX_NETMASK: ::c_int = 2;
|
||||
pub const RTAX_GENMASK: ::c_int = 3;
|
||||
pub const RTAX_IFP: ::c_int = 4;
|
||||
pub const RTAX_IFA: ::c_int = 5;
|
||||
pub const RTAX_AUTHOR: ::c_int = 6;
|
||||
pub const RTAX_BRD: ::c_int = 7;
|
||||
pub const RTAX_MAX: ::c_int = 8;
|
||||
|
||||
pub const KERN_PROCARGS2: ::c_int = 49;
|
||||
|
||||
|
@ -1967,6 +2197,62 @@ pub const MAXTHREADNAMESIZE: usize = 64;
|
|||
|
||||
pub const XUCRED_VERSION: ::c_uint = 0;
|
||||
|
||||
pub const LC_SEGMENT: u32 = 0x1;
|
||||
pub const LC_SEGMENT_64: u32 = 0x19;
|
||||
|
||||
pub const MH_MAGIC: u32 = 0xfeedface;
|
||||
pub const MH_MAGIC_64: u32 = 0xfeedfacf;
|
||||
|
||||
// net/if_utun.h
|
||||
pub const UTUN_OPT_FLAGS: ::c_int = 1;
|
||||
pub const UTUN_OPT_IFNAME: ::c_int = 2;
|
||||
|
||||
// net/bpf.h
|
||||
pub const DLT_NULL: ::c_uint = 0; // no link-layer encapsulation
|
||||
pub const DLT_EN10MB: ::c_uint = 1; // Ethernet (10Mb)
|
||||
pub const DLT_EN3MB: ::c_uint = 2; // Experimental Ethernet (3Mb)
|
||||
pub const DLT_AX25: ::c_uint = 3; // Amateur Radio AX.25
|
||||
pub const DLT_PRONET: ::c_uint = 4; // Proteon ProNET Token Ring
|
||||
pub const DLT_CHAOS: ::c_uint = 5; // Chaos
|
||||
pub const DLT_IEEE802: ::c_uint = 6; // IEEE 802 Networks
|
||||
pub const DLT_ARCNET: ::c_uint = 7; // ARCNET
|
||||
pub const DLT_SLIP: ::c_uint = 8; // Serial Line IP
|
||||
pub const DLT_PPP: ::c_uint = 9; // Point-to-point Protocol
|
||||
pub const DLT_FDDI: ::c_uint = 10; // FDDI
|
||||
pub const DLT_ATM_RFC1483: ::c_uint = 11; // LLC/SNAP encapsulated atm
|
||||
pub const DLT_RAW: ::c_uint = 12; // raw IP
|
||||
pub const DLT_LOOP: ::c_uint = 108;
|
||||
|
||||
// https://github.com/apple/darwin-xnu/blob/master/bsd/net/bpf.h#L100
|
||||
// sizeof(int32_t)
|
||||
pub const BPF_ALIGNMENT: ::c_int = 4;
|
||||
|
||||
pub const POSIX_SPAWN_RESETIDS: ::c_int = 0x01;
|
||||
pub const POSIX_SPAWN_SETPGROUP: ::c_int = 0x02;
|
||||
pub const POSIX_SPAWN_SETSIGDEF: ::c_int = 0x04;
|
||||
pub const POSIX_SPAWN_SETSIGMASK: ::c_int = 0x08;
|
||||
|
||||
// sys/ipc.h:
|
||||
pub const IPC_CREAT: ::c_int = 0x200;
|
||||
pub const IPC_EXCL: ::c_int = 0x400;
|
||||
pub const IPC_NOWAIT: ::c_int = 0x800;
|
||||
pub const IPC_PRIVATE: key_t = 0;
|
||||
|
||||
pub const IPC_RMID: ::c_int = 0;
|
||||
pub const IPC_SET: ::c_int = 1;
|
||||
pub const IPC_STAT: ::c_int = 2;
|
||||
|
||||
pub const IPC_R: ::c_int = 0x100;
|
||||
pub const IPC_W: ::c_int = 0x80;
|
||||
pub const IPC_M: ::c_int = 0x1000;
|
||||
|
||||
// sys/shm.h
|
||||
pub const SHM_RDONLY: ::c_int = 0x1000;
|
||||
pub const SHM_RND: ::c_int = 0x2000;
|
||||
pub const SHMLBA: ::c_int = 4096;
|
||||
pub const SHM_R: ::c_int = IPC_R;
|
||||
pub const SHM_W: ::c_int = IPC_W;
|
||||
|
||||
f! {
|
||||
pub fn WSTOPSIG(status: ::c_int) -> ::c_int {
|
||||
status >> 8
|
||||
|
@ -2035,6 +2321,14 @@ extern {
|
|||
pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
|
||||
-> ::c_int;
|
||||
pub fn shm_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::c_int;
|
||||
pub fn shmat(shmid: ::c_int, shmaddr: *const ::c_void,
|
||||
shmflg: ::c_int) -> *mut ::c_void;
|
||||
pub fn shmdt(shmaddr: *const ::c_void) -> ::c_int;
|
||||
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
|
||||
link_name = "shmctl$UNIX2003")]
|
||||
pub fn shmctl(shmid: ::c_int, cmd: ::c_int,
|
||||
buf: *mut ::shmid_ds) -> ::c_int;
|
||||
pub fn shmget(key: key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int;
|
||||
pub fn sysctl(name: *mut ::c_int,
|
||||
namelen: ::c_uint,
|
||||
oldp: *mut ::c_void,
|
||||
|
@ -2123,7 +2417,8 @@ extern {
|
|||
pub fn querylocale(mask: ::c_int, loc: ::locale_t) -> *const ::c_char;
|
||||
pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int;
|
||||
pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int;
|
||||
|
||||
pub fn getdomainname(name: *mut ::c_char, len: ::c_int) -> ::c_int;
|
||||
pub fn setdomainname(name: *const ::c_char, len: ::c_int) -> ::c_int;
|
||||
pub fn getxattr(path: *const ::c_char, name: *const ::c_char,
|
||||
value: *mut ::c_void, size: ::size_t, position: u32,
|
||||
flags: ::c_int) -> ::ssize_t;
|
||||
|
@ -2158,6 +2453,64 @@ extern {
|
|||
pub fn brk(addr: *const ::c_void) -> *mut ::c_void;
|
||||
pub fn sbrk(increment: ::c_int) -> *mut ::c_void;
|
||||
pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int;
|
||||
pub fn _dyld_image_count() -> u32;
|
||||
pub fn _dyld_get_image_header(image_index: u32) -> *const mach_header;
|
||||
pub fn _dyld_get_image_vmaddr_slide(image_index: u32) -> ::intptr_t;
|
||||
pub fn _dyld_get_image_name(image_index: u32) -> *const ::c_char;
|
||||
|
||||
pub fn posix_spawn(pid: *mut ::pid_t,
|
||||
path: *const ::c_char,
|
||||
file_actions: *const ::posix_spawn_file_actions_t,
|
||||
attrp: *const ::posix_spawnattr_t,
|
||||
argv: *const *mut ::c_char,
|
||||
envp: *const *mut ::c_char) -> ::c_int;
|
||||
pub fn posix_spawnp(pid: *mut ::pid_t,
|
||||
file: *const ::c_char,
|
||||
file_actions: *const ::posix_spawn_file_actions_t,
|
||||
attrp: *const ::posix_spawnattr_t,
|
||||
argv: *const *mut ::c_char,
|
||||
envp: *const *mut ::c_char) -> ::c_int;
|
||||
pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> ::c_int;
|
||||
pub fn posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> ::c_int;
|
||||
pub fn posix_spawnattr_getsigdefault(attr: *const posix_spawnattr_t,
|
||||
default: *mut ::sigset_t) -> ::c_int;
|
||||
pub fn posix_spawnattr_setsigdefault(attr: *mut posix_spawnattr_t,
|
||||
default: *const ::sigset_t) -> ::c_int;
|
||||
pub fn posix_spawnattr_getsigmask(attr: *const posix_spawnattr_t,
|
||||
default: *mut ::sigset_t) -> ::c_int;
|
||||
pub fn posix_spawnattr_setsigmask(attr: *mut posix_spawnattr_t,
|
||||
default: *const ::sigset_t) -> ::c_int;
|
||||
pub fn posix_spawnattr_getflags(attr: *const posix_spawnattr_t,
|
||||
flags: *mut ::c_short) -> ::c_int;
|
||||
pub fn posix_spawnattr_setflags(attr: *mut posix_spawnattr_t,
|
||||
flags: ::c_short) -> ::c_int;
|
||||
pub fn posix_spawnattr_getpgroup(attr: *const posix_spawnattr_t,
|
||||
flags: *mut ::pid_t) -> ::c_int;
|
||||
pub fn posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t,
|
||||
flags: ::pid_t) -> ::c_int;
|
||||
|
||||
pub fn posix_spawn_file_actions_init(
|
||||
actions: *mut posix_spawn_file_actions_t,
|
||||
) -> ::c_int;
|
||||
pub fn posix_spawn_file_actions_destroy(
|
||||
actions: *mut posix_spawn_file_actions_t,
|
||||
) -> ::c_int;
|
||||
pub fn posix_spawn_file_actions_addopen(
|
||||
actions: *mut posix_spawn_file_actions_t,
|
||||
fd: ::c_int,
|
||||
path: *const ::c_char,
|
||||
oflag: ::c_int,
|
||||
mode: ::mode_t,
|
||||
) -> ::c_int;
|
||||
pub fn posix_spawn_file_actions_addclose(
|
||||
actions: *mut posix_spawn_file_actions_t,
|
||||
fd: ::c_int,
|
||||
) -> ::c_int;
|
||||
pub fn posix_spawn_file_actions_adddup2(
|
||||
actions: *mut posix_spawn_file_actions_t,
|
||||
fd: ::c_int,
|
||||
newfd: ::c_int,
|
||||
) -> ::c_int;
|
||||
}
|
||||
|
||||
cfg_if! {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
pub type clock_t = u64;
|
||||
pub type ino_t = u64;
|
||||
pub type lwpid_t = i32;
|
||||
pub type nlink_t = u32;
|
||||
pub type blksize_t = i64;
|
||||
pub type clockid_t = ::c_ulong;
|
||||
|
@ -72,6 +73,13 @@ s! {
|
|||
pub node: [u8; 6],
|
||||
}
|
||||
|
||||
pub struct mq_attr {
|
||||
pub mq_flags: ::c_long,
|
||||
pub mq_maxmsg: ::c_long,
|
||||
pub mq_msgsize: ::c_long,
|
||||
pub mq_curmsgs: ::c_long,
|
||||
}
|
||||
|
||||
pub struct sigevent {
|
||||
pub sigev_notify: ::c_int,
|
||||
// The union is 8-byte in size, so it is aligned at a 8-byte offset.
|
||||
|
@ -168,12 +176,26 @@ s! {
|
|||
pub ifm_index: ::c_ushort,
|
||||
pub ifm_data: if_data,
|
||||
}
|
||||
|
||||
pub struct sockaddr_dl {
|
||||
pub sdl_len: ::c_uchar,
|
||||
pub sdl_family: ::c_uchar,
|
||||
pub sdl_index: ::c_ushort,
|
||||
pub sdl_type: ::c_uchar,
|
||||
pub sdl_nlen: ::c_uchar,
|
||||
pub sdl_alen: ::c_uchar,
|
||||
pub sdl_slen: ::c_uchar,
|
||||
pub sdl_data: [::c_char; 12],
|
||||
pub sdl_rcf: ::c_ushort,
|
||||
pub sdl_route: [::c_ushort; 16],
|
||||
}
|
||||
}
|
||||
|
||||
pub const RAND_MAX: ::c_int = 0x7fff_ffff;
|
||||
pub const PTHREAD_STACK_MIN: ::size_t = 16384;
|
||||
pub const SIGSTKSZ: ::size_t = 40960;
|
||||
pub const MADV_INVAL: ::c_int = 10;
|
||||
pub const MADV_SETMAP: ::c_int = 11;
|
||||
pub const O_CLOEXEC: ::c_int = 0x00020000;
|
||||
pub const O_DIRECTORY: ::c_int = 0x08000000;
|
||||
pub const F_GETLK: ::c_int = 7;
|
||||
|
@ -386,6 +408,32 @@ pub const NOTE_CHILD: ::uint32_t = 0x00000004;
|
|||
pub const SO_SNDSPACE: ::c_int = 0x100a;
|
||||
pub const SO_CPUHINT: ::c_int = 0x1030;
|
||||
|
||||
// https://github.com/DragonFlyBSD/DragonFlyBSD/blob/master/sys/net/if.h#L101
|
||||
pub const IFF_UP: ::c_int = 0x1; // interface is up
|
||||
pub const IFF_BROADCAST: ::c_int = 0x2; // broadcast address valid
|
||||
pub const IFF_DEBUG: ::c_int = 0x4; // turn on debugging
|
||||
pub const IFF_LOOPBACK: ::c_int = 0x8; // is a loopback net
|
||||
pub const IFF_POINTOPOINT: ::c_int = 0x10; // interface is point-to-point link
|
||||
pub const IFF_SMART: ::c_int = 0x20; // interface manages own routes
|
||||
pub const IFF_RUNNING: ::c_int = 0x40; // resources allocated
|
||||
pub const IFF_NOARP: ::c_int = 0x80; // no address resolution protocol
|
||||
pub const IFF_PROMISC: ::c_int = 0x100; // receive all packets
|
||||
pub const IFF_ALLMULTI: ::c_int = 0x200; // receive all multicast packets
|
||||
pub const IFF_OACTIVE_COMPAT: ::c_int = 0x400; // was transmission in progress
|
||||
pub const IFF_SIMPLEX: ::c_int = 0x800; // can't hear own transmissions
|
||||
pub const IFF_LINK0: ::c_int = 0x1000; // per link layer defined bit
|
||||
pub const IFF_LINK1: ::c_int = 0x2000; // per link layer defined bit
|
||||
pub const IFF_LINK2: ::c_int = 0x4000; // per link layer defined bit
|
||||
pub const IFF_ALTPHYS: ::c_int = IFF_LINK2; // use alternate physical connection
|
||||
pub const IFF_MULTICAST: ::c_int = 0x8000; // supports multicast
|
||||
// was interface is in polling mode
|
||||
pub const IFF_POLLING_COMPAT: ::c_int = 0x10000;
|
||||
pub const IFF_PPROMISC: ::c_int = 0x20000; // user-requested promisc mode
|
||||
pub const IFF_MONITOR: ::c_int = 0x40000; // user-requested monitor mode
|
||||
pub const IFF_STATICARP: ::c_int = 0x80000; // static ARP
|
||||
pub const IFF_NPOLLING: ::c_int = 0x100000; // interface is in polling mode
|
||||
pub const IFF_IDIRECT: ::c_int = 0x200000; // direct input
|
||||
|
||||
//
|
||||
// sys/netinet/in.h
|
||||
// Protocols (RFC 1700)
|
||||
|
@ -687,6 +735,15 @@ pub const _SC_V7_LPBIG_OFFBIG: ::c_int = 125;
|
|||
pub const _SC_THREAD_ROBUST_PRIO_INHERIT: ::c_int = 126;
|
||||
pub const _SC_THREAD_ROBUST_PRIO_PROTECT: ::c_int = 127;
|
||||
|
||||
pub const WCONTINUED: ::c_int = 4;
|
||||
pub const WSTOPPED: ::c_int = 0o177;
|
||||
|
||||
// Values for struct rtprio (type_ field)
|
||||
pub const RTP_PRIO_REALTIME: ::c_ushort = 0;
|
||||
pub const RTP_PRIO_NORMAL: ::c_ushort = 1;
|
||||
pub const RTP_PRIO_IDLE: ::c_ushort = 2;
|
||||
pub const RTP_PRIO_THREAD: ::c_ushort = 3;
|
||||
|
||||
extern {
|
||||
pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
|
||||
-> ::c_int;
|
||||
|
@ -700,4 +757,7 @@ extern {
|
|||
timeout: *mut ::timespec) -> ::c_int;
|
||||
|
||||
pub fn freelocale(loc: ::locale_t);
|
||||
|
||||
pub fn lwp_rtprio(function: ::c_int, pid: ::pid_t, lwpid: lwpid_t,
|
||||
rtp: *mut super::rtprio) -> ::c_int;
|
||||
}
|
||||
|
|
|
@ -15,6 +15,9 @@ pub type key_t = ::c_long;
|
|||
pub type msglen_t = ::c_ulong;
|
||||
pub type msgqnum_t = ::c_ulong;
|
||||
|
||||
pub type posix_spawnattr_t = *mut ::c_void;
|
||||
pub type posix_spawn_file_actions_t = *mut ::c_void;
|
||||
|
||||
s! {
|
||||
pub struct utmpx {
|
||||
pub ut_type: ::c_short,
|
||||
|
@ -62,6 +65,14 @@ s! {
|
|||
pub ip6: *mut ::in6_addr,
|
||||
}
|
||||
|
||||
pub struct mq_attr {
|
||||
pub mq_flags: ::c_long,
|
||||
pub mq_maxmsg: ::c_long,
|
||||
pub mq_msgsize: ::c_long,
|
||||
pub mq_curmsgs: ::c_long,
|
||||
__reserved: [::c_long; 4]
|
||||
}
|
||||
|
||||
pub struct sigevent {
|
||||
pub sigev_notify: ::c_int,
|
||||
pub sigev_signo: ::c_int,
|
||||
|
@ -135,6 +146,17 @@ s! {
|
|||
pub cr_groups: [::gid_t;16],
|
||||
__cr_unused1: *mut ::c_void,
|
||||
}
|
||||
|
||||
pub struct sockaddr_dl {
|
||||
pub sdl_len: ::c_uchar,
|
||||
pub sdl_family: ::c_uchar,
|
||||
pub sdl_index: ::c_ushort,
|
||||
pub sdl_type: ::c_uchar,
|
||||
pub sdl_nlen: ::c_uchar,
|
||||
pub sdl_alen: ::c_uchar,
|
||||
pub sdl_slen: ::c_uchar,
|
||||
pub sdl_data: [::c_char; 46],
|
||||
}
|
||||
}
|
||||
|
||||
pub const SIGEV_THREAD_ID: ::c_int = 4;
|
||||
|
@ -153,6 +175,10 @@ pub const O_TTY_INIT: ::c_int = 0x00080000;
|
|||
pub const F_GETLK: ::c_int = 11;
|
||||
pub const F_SETLK: ::c_int = 12;
|
||||
pub const F_SETLKW: ::c_int = 13;
|
||||
pub const ENOTCAPABLE: ::c_int = 93;
|
||||
pub const ECAPMODE: ::c_int = 94;
|
||||
pub const ENOTRECOVERABLE: ::c_int = 95;
|
||||
pub const EOWNERDEAD: ::c_int = 96;
|
||||
pub const ELAST: ::c_int = 96;
|
||||
pub const RLIMIT_NPTS: ::c_int = 11;
|
||||
pub const RLIMIT_SWAP: ::c_int = 12;
|
||||
|
@ -177,9 +203,12 @@ pub const EVFILT_VNODE: ::int16_t = -4;
|
|||
pub const EVFILT_PROC: ::int16_t = -5;
|
||||
pub const EVFILT_SIGNAL: ::int16_t = -6;
|
||||
pub const EVFILT_TIMER: ::int16_t = -7;
|
||||
pub const EVFILT_PROCDESC: ::int16_t = -8;
|
||||
pub const EVFILT_FS: ::int16_t = -9;
|
||||
pub const EVFILT_LIO: ::int16_t = -10;
|
||||
pub const EVFILT_USER: ::int16_t = -11;
|
||||
pub const EVFILT_SENDFILE: ::int16_t = -12;
|
||||
pub const EVFILT_EMPTY: ::int16_t = -13;
|
||||
|
||||
pub const EV_ADD: ::uint16_t = 0x1;
|
||||
pub const EV_DELETE: ::uint16_t = 0x2;
|
||||
|
@ -425,6 +454,38 @@ pub const AF_INET6_SDP: ::c_int = 42;
|
|||
#[doc(hidden)]
|
||||
pub const AF_MAX: ::c_int = 42;
|
||||
|
||||
// https://github.com/freebsd/freebsd/blob/master/sys/net/if.h#L140
|
||||
pub const IFF_UP: ::c_int = 0x1; // (n) interface is up
|
||||
pub const IFF_BROADCAST: ::c_int = 0x2; // (i) broadcast address valid
|
||||
pub const IFF_DEBUG: ::c_int = 0x4; // (n) turn on debugging
|
||||
pub const IFF_LOOPBACK: ::c_int = 0x8; // (i) is a loopback net
|
||||
pub const IFF_POINTOPOINT: ::c_int = 0x10; // (i) is a point-to-point link
|
||||
// 0x20 was IFF_SMART
|
||||
pub const IFF_RUNNING: ::c_int = 0x40; // (d) resources allocated
|
||||
#[doc(hidden)]
|
||||
// IFF_DRV_RUNNING is deprecated. Use the portable `IFF_RUNNING` instead
|
||||
pub const IFF_DRV_RUNNING: ::c_int = 0x40;
|
||||
pub const IFF_NOARP: ::c_int = 0x80; // (n) no address resolution protocol
|
||||
pub const IFF_PROMISC: ::c_int = 0x100; // (n) receive all packets
|
||||
pub const IFF_ALLMULTI: ::c_int = 0x200; // (n) receive all multicast packets
|
||||
pub const IFF_OACTIVE: ::c_int = 0x400; // (d) tx hardware queue is full
|
||||
#[doc(hidden)]
|
||||
// IFF_DRV_OACTIVE is deprecated. Use the portable `IFF_OACTIVE` instead
|
||||
pub const IFF_DRV_OACTIVE: ::c_int = 0x400;
|
||||
pub const IFF_SIMPLEX: ::c_int = 0x800; // (i) can't hear own transmissions
|
||||
pub const IFF_LINK0: ::c_int = 0x1000; // per link layer defined bit
|
||||
pub const IFF_LINK1: ::c_int = 0x2000; // per link layer defined bit
|
||||
pub const IFF_LINK2: ::c_int = 0x4000; // per link layer defined bit
|
||||
pub const IFF_ALTPHYS: ::c_int = IFF_LINK2; // use alternate physical connection
|
||||
pub const IFF_MULTICAST: ::c_int = 0x8000; // (i) supports multicast
|
||||
// (i) unconfigurable using ioctl(2)
|
||||
pub const IFF_CANTCONFIG: ::c_int = 0x10000;
|
||||
pub const IFF_PPROMISC: ::c_int = 0x20000; // (n) user-requested promisc mode
|
||||
pub const IFF_MONITOR: ::c_int = 0x40000; // (n) user-requested monitor mode
|
||||
pub const IFF_STATICARP: ::c_int = 0x80000; // (n) static ARP
|
||||
pub const IFF_DYING: ::c_int = 0x200000; // (n) interface is winding down
|
||||
pub const IFF_RENAMING: ::c_int = 0x400000; // (n) interface is being renamed
|
||||
|
||||
// sys/netinet/in.h
|
||||
// Protocols (RFC 1700)
|
||||
// NOTE: These are in addition to the constants defined in src/unix/mod.rs
|
||||
|
@ -703,6 +764,7 @@ pub const SHM_LOCK: ::c_int = 11;
|
|||
pub const SHM_UNLOCK: ::c_int = 12;
|
||||
pub const SHM_STAT: ::c_int = 13;
|
||||
pub const SHM_INFO: ::c_int = 14;
|
||||
pub const SHM_ANON: *mut ::c_char = 1 as *mut ::c_char;
|
||||
|
||||
// The *_MAXID constants never should've been used outside of the
|
||||
// FreeBSD base system. And with the exception of CTL_P1003_1B_MAXID,
|
||||
|
@ -782,6 +844,23 @@ pub const _SC_CPUSET_SIZE: ::c_int = 122;
|
|||
pub const XU_NGROUPS: ::c_int = 16;
|
||||
pub const XUCRED_VERSION: ::c_uint = 0;
|
||||
|
||||
// Flags which can be passed to pdfork(2)
|
||||
pub const PD_DAEMON: ::c_int = 0x00000001;
|
||||
pub const PD_CLOEXEC: ::c_int = 0x00000002;
|
||||
pub const PD_ALLOWED_AT_FORK: ::c_int = PD_DAEMON | PD_CLOEXEC;
|
||||
|
||||
// Values for struct rtprio (type_ field)
|
||||
pub const RTP_PRIO_REALTIME: ::c_ushort = 2;
|
||||
pub const RTP_PRIO_NORMAL: ::c_ushort = 3;
|
||||
pub const RTP_PRIO_IDLE: ::c_ushort = 4;
|
||||
|
||||
pub const POSIX_SPAWN_RESETIDS: ::c_int = 0x01;
|
||||
pub const POSIX_SPAWN_SETPGROUP: ::c_int = 0x02;
|
||||
pub const POSIX_SPAWN_SETSCHEDPARAM: ::c_int = 0x04;
|
||||
pub const POSIX_SPAWN_SETSCHEDULER: ::c_int = 0x08;
|
||||
pub const POSIX_SPAWN_SETSIGDEF: ::c_int = 0x10;
|
||||
pub const POSIX_SPAWN_SETSIGMASK: ::c_int = 0x20;
|
||||
|
||||
extern {
|
||||
pub fn __error() -> *mut ::c_int;
|
||||
|
||||
|
@ -834,6 +913,82 @@ extern {
|
|||
pub fn msgsnd(msqid: ::c_int, msgp: *const ::c_void, msgsz: ::size_t,
|
||||
msgflg: ::c_int) -> ::c_int;
|
||||
pub fn cfmakesane(termios: *mut ::termios);
|
||||
pub fn fexecve(fd: ::c_int, argv: *const *const ::c_char,
|
||||
envp: *const *const ::c_char)
|
||||
-> ::c_int;
|
||||
|
||||
pub fn pdfork(fdp: *mut ::c_int, flags: ::c_int) -> ::pid_t;
|
||||
pub fn pdgetpid(fd: ::c_int, pidp: *mut ::pid_t) -> ::c_int;
|
||||
pub fn pdkill(fd: ::c_int, signum: ::c_int) -> ::c_int;
|
||||
|
||||
pub fn rtprio_thread(function: ::c_int, lwpid: ::lwpid_t,
|
||||
rtp: *mut super::rtprio) -> ::c_int;
|
||||
|
||||
pub fn posix_spawn(pid: *mut ::pid_t,
|
||||
path: *const ::c_char,
|
||||
file_actions: *const ::posix_spawn_file_actions_t,
|
||||
attrp: *const ::posix_spawnattr_t,
|
||||
argv: *const *mut ::c_char,
|
||||
envp: *const *mut ::c_char) -> ::c_int;
|
||||
pub fn posix_spawnp(pid: *mut ::pid_t,
|
||||
file: *const ::c_char,
|
||||
file_actions: *const ::posix_spawn_file_actions_t,
|
||||
attrp: *const ::posix_spawnattr_t,
|
||||
argv: *const *mut ::c_char,
|
||||
envp: *const *mut ::c_char) -> ::c_int;
|
||||
pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> ::c_int;
|
||||
pub fn posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> ::c_int;
|
||||
pub fn posix_spawnattr_getsigdefault(attr: *const posix_spawnattr_t,
|
||||
default: *mut ::sigset_t) -> ::c_int;
|
||||
pub fn posix_spawnattr_setsigdefault(attr: *mut posix_spawnattr_t,
|
||||
default: *const ::sigset_t) -> ::c_int;
|
||||
pub fn posix_spawnattr_getsigmask(attr: *const posix_spawnattr_t,
|
||||
default: *mut ::sigset_t) -> ::c_int;
|
||||
pub fn posix_spawnattr_setsigmask(attr: *mut posix_spawnattr_t,
|
||||
default: *const ::sigset_t) -> ::c_int;
|
||||
pub fn posix_spawnattr_getflags(attr: *const posix_spawnattr_t,
|
||||
flags: *mut ::c_short) -> ::c_int;
|
||||
pub fn posix_spawnattr_setflags(attr: *mut posix_spawnattr_t,
|
||||
flags: ::c_short) -> ::c_int;
|
||||
pub fn posix_spawnattr_getpgroup(attr: *const posix_spawnattr_t,
|
||||
flags: *mut ::pid_t) -> ::c_int;
|
||||
pub fn posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t,
|
||||
flags: ::pid_t) -> ::c_int;
|
||||
pub fn posix_spawnattr_getschedpolicy(attr: *const posix_spawnattr_t,
|
||||
flags: *mut ::c_int) -> ::c_int;
|
||||
pub fn posix_spawnattr_setschedpolicy(attr: *mut posix_spawnattr_t,
|
||||
flags: ::c_int) -> ::c_int;
|
||||
pub fn posix_spawnattr_getschedparam(
|
||||
attr: *const posix_spawnattr_t,
|
||||
param: *mut ::sched_param,
|
||||
) -> ::c_int;
|
||||
pub fn posix_spawnattr_setschedparam(
|
||||
attr: *mut posix_spawnattr_t,
|
||||
param: *const ::sched_param,
|
||||
) -> ::c_int;
|
||||
|
||||
pub fn posix_spawn_file_actions_init(
|
||||
actions: *mut posix_spawn_file_actions_t,
|
||||
) -> ::c_int;
|
||||
pub fn posix_spawn_file_actions_destroy(
|
||||
actions: *mut posix_spawn_file_actions_t,
|
||||
) -> ::c_int;
|
||||
pub fn posix_spawn_file_actions_addopen(
|
||||
actions: *mut posix_spawn_file_actions_t,
|
||||
fd: ::c_int,
|
||||
path: *const ::c_char,
|
||||
oflag: ::c_int,
|
||||
mode: ::mode_t,
|
||||
) -> ::c_int;
|
||||
pub fn posix_spawn_file_actions_addclose(
|
||||
actions: *mut posix_spawn_file_actions_t,
|
||||
fd: ::c_int,
|
||||
) -> ::c_int;
|
||||
pub fn posix_spawn_file_actions_adddup2(
|
||||
actions: *mut posix_spawn_file_actions_t,
|
||||
fd: ::c_int,
|
||||
newfd: ::c_int,
|
||||
) -> ::c_int;
|
||||
}
|
||||
|
||||
cfg_if! {
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
pub type c_char = i8;
|
||||
pub type dev_t = u32;
|
||||
pub type mode_t = u16;
|
||||
pub type pthread_attr_t = *mut ::c_void;
|
||||
pub type rlim_t = i64;
|
||||
pub type mqd_t = *mut ::c_void;
|
||||
pub type pthread_mutex_t = *mut ::c_void;
|
||||
pub type pthread_mutexattr_t = *mut ::c_void;
|
||||
pub type pthread_cond_t = *mut ::c_void;
|
||||
|
@ -159,6 +161,20 @@ s! {
|
|||
pub int_p_sign_posn: ::c_char,
|
||||
pub int_n_sign_posn: ::c_char,
|
||||
}
|
||||
|
||||
pub struct cmsgcred {
|
||||
pub cmcred_pid: ::pid_t,
|
||||
pub cmcred_uid: ::uid_t,
|
||||
pub cmcred_euid: ::uid_t,
|
||||
pub cmcred_gid: ::gid_t,
|
||||
pub cmcred_ngroups: ::c_short,
|
||||
pub cmcred_groups: [::gid_t; CMGROUP_MAX],
|
||||
}
|
||||
|
||||
pub struct rtprio {
|
||||
pub type_: ::c_ushort,
|
||||
pub prio: ::c_ushort,
|
||||
}
|
||||
}
|
||||
|
||||
pub const AIO_LISTIO_MAX: ::c_int = 16;
|
||||
|
@ -446,7 +462,16 @@ pub const POLLSTANDARD: ::c_short = ::POLLIN | ::POLLPRI | ::POLLOUT |
|
|||
::POLLRDNORM | ::POLLRDBAND | ::POLLWRBAND | ::POLLERR |
|
||||
::POLLHUP | ::POLLNVAL;
|
||||
|
||||
pub const EAI_AGAIN: ::c_int = 2;
|
||||
pub const EAI_BADFLAGS: ::c_int = 3;
|
||||
pub const EAI_FAIL: ::c_int = 4;
|
||||
pub const EAI_FAMILY: ::c_int = 5;
|
||||
pub const EAI_MEMORY: ::c_int = 6;
|
||||
pub const EAI_NONAME: ::c_int = 8;
|
||||
pub const EAI_SERVICE: ::c_int = 9;
|
||||
pub const EAI_SOCKTYPE: ::c_int = 10;
|
||||
pub const EAI_SYSTEM: ::c_int = 11;
|
||||
pub const EAI_OVERFLOW: ::c_int = 14;
|
||||
|
||||
pub const F_DUPFD: ::c_int = 0;
|
||||
pub const F_GETFD: ::c_int = 1;
|
||||
|
@ -640,8 +665,6 @@ pub const SO_RCVTIMEO: ::c_int = 0x1006;
|
|||
pub const SO_ERROR: ::c_int = 0x1007;
|
||||
pub const SO_TYPE: ::c_int = 0x1008;
|
||||
|
||||
pub const IFF_LOOPBACK: ::c_int = 0x8;
|
||||
|
||||
pub const SHUT_RD: ::c_int = 0;
|
||||
pub const SHUT_WR: ::c_int = 1;
|
||||
pub const SHUT_RDWR: ::c_int = 2;
|
||||
|
@ -936,6 +959,18 @@ pub const OCRNL: ::tcflag_t = 0x10;
|
|||
pub const ONOCR: ::tcflag_t = 0x20;
|
||||
pub const ONLRET: ::tcflag_t = 0x40;
|
||||
|
||||
pub const CMGROUP_MAX: usize = 16;
|
||||
|
||||
// https://github.com/freebsd/freebsd/blob/master/sys/net/bpf.h
|
||||
// sizeof(long)
|
||||
pub const BPF_ALIGNMENT: ::c_int = 8;
|
||||
|
||||
// Values for rtprio struct (prio field) and syscall (function argument)
|
||||
pub const RTP_PRIO_MIN: ::c_ushort = 0;
|
||||
pub const RTP_PRIO_MAX: ::c_ushort = 31;
|
||||
pub const RTP_LOOKUP: ::c_int = 0;
|
||||
pub const RTP_SET: ::c_int = 1;
|
||||
|
||||
f! {
|
||||
pub fn WIFCONTINUED(status: ::c_int) -> bool {
|
||||
status == 0x13
|
||||
|
@ -969,6 +1004,41 @@ extern {
|
|||
groups: *mut ::gid_t,
|
||||
ngroups: *mut ::c_int) -> ::c_int;
|
||||
pub fn initgroups(name: *const ::c_char, basegid: ::gid_t) -> ::c_int;
|
||||
#[cfg_attr(target_os = "netbsd", link_name = "__getpwent_r50")]
|
||||
pub fn getpwent_r(pwd: *mut ::passwd,
|
||||
buf: *mut ::c_char,
|
||||
buflen: ::size_t,
|
||||
result: *mut *mut ::passwd) -> ::c_int;
|
||||
pub fn getgrent_r(grp: *mut ::group,
|
||||
buf: *mut ::c_char,
|
||||
buflen: ::size_t,
|
||||
result: *mut *mut ::group) -> ::c_int;
|
||||
pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t;
|
||||
pub fn mq_close(mqd: ::mqd_t) -> ::c_int;
|
||||
pub fn mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int;
|
||||
pub fn mq_notify(mqd: ::mqd_t, notification: *const ::sigevent) -> ::c_int;
|
||||
pub fn mq_receive(mqd: ::mqd_t,
|
||||
msg_ptr: *mut ::c_char,
|
||||
msg_len: ::size_t,
|
||||
msq_prio: *mut ::c_uint) -> ::ssize_t;
|
||||
pub fn mq_send(mqd: ::mqd_t,
|
||||
msg_ptr: *const ::c_char,
|
||||
msg_len: ::size_t,
|
||||
msq_prio: ::c_uint) -> ::c_int;
|
||||
pub fn mq_setattr(mqd: ::mqd_t,
|
||||
newattr: *const ::mq_attr,
|
||||
oldattr: *mut ::mq_attr) -> ::c_int;
|
||||
pub fn mq_timedreceive(mqd: ::mqd_t,
|
||||
msg_ptr: *mut ::c_char,
|
||||
msg_len: ::size_t,
|
||||
msq_prio: *mut ::c_uint,
|
||||
abs_timeout: *const ::timespec) -> ::ssize_t;
|
||||
pub fn mq_timedsend(mqd: ::mqd_t,
|
||||
msg_ptr: *const ::c_char,
|
||||
msg_len: ::size_t,
|
||||
msq_prio: ::c_uint,
|
||||
abs_timeout: *const ::timespec) -> ::c_int;
|
||||
pub fn mq_unlink(name: *const ::c_char) -> ::c_int;
|
||||
}
|
||||
|
||||
#[link(name = "util")]
|
||||
|
@ -991,6 +1061,7 @@ extern {
|
|||
serv: *mut ::c_char,
|
||||
servlen: ::size_t,
|
||||
flags: ::c_int) -> ::c_int;
|
||||
#[cfg_attr(target_os = "freebsd", link_name = "kevent@FBSD_1.0")]
|
||||
pub fn kevent(kq: ::c_int,
|
||||
changelist: *const ::kevent,
|
||||
nchanges: ::c_int,
|
||||
|
@ -1085,9 +1156,11 @@ extern {
|
|||
val: ::c_int) -> ::c_int;
|
||||
pub fn getpriority(which: ::c_int, who: ::c_int) -> ::c_int;
|
||||
pub fn setpriority(which: ::c_int, who: ::c_int, prio: ::c_int) -> ::c_int;
|
||||
pub fn rtprio(function: ::c_int, pid: ::pid_t, rtp: *mut rtprio) -> ::c_int;
|
||||
|
||||
pub fn fdopendir(fd: ::c_int) -> *mut ::DIR;
|
||||
|
||||
#[cfg_attr(target_os = "freebsd", link_name = "mknodat@FBSD_1.1")]
|
||||
pub fn mknodat(dirfd: ::c_int, pathname: *const ::c_char,
|
||||
mode: ::mode_t, dev: dev_t) -> ::c_int;
|
||||
pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,
|
||||
|
@ -1107,9 +1180,8 @@ extern {
|
|||
timeout: *const ::timespec,
|
||||
sigmask: *const sigset_t) -> ::c_int;
|
||||
pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int;
|
||||
pub fn fexecve(fd: ::c_int, argv: *const *const ::c_char,
|
||||
envp: *const *const ::c_char)
|
||||
-> ::c_int;
|
||||
pub fn getdomainname(name: *mut ::c_char, len: ::c_int) -> ::c_int;
|
||||
pub fn setdomainname(name: *const ::c_char, len: ::c_int) -> ::c_int;
|
||||
}
|
||||
|
||||
cfg_if! {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
use dox::{mem, Option};
|
||||
|
||||
pub type c_char = i8;
|
||||
pub type wchar_t = i32;
|
||||
pub type off_t = i64;
|
||||
pub type useconds_t = u32;
|
||||
|
@ -184,6 +183,9 @@ pub const IP_MULTICAST_IF: ::c_int = 9;
|
|||
pub const IP_MULTICAST_TTL: ::c_int = 10;
|
||||
pub const IP_MULTICAST_LOOP: ::c_int = 11;
|
||||
|
||||
pub const IPV6_UNICAST_HOPS: ::c_int = 4;
|
||||
pub const IPV6_MULTICAST_IF: ::c_int = 9;
|
||||
pub const IPV6_MULTICAST_HOPS: ::c_int = 10;
|
||||
pub const IPV6_MULTICAST_LOOP: ::c_int = 11;
|
||||
pub const IPV6_V6ONLY: ::c_int = 27;
|
||||
|
||||
|
@ -386,6 +388,10 @@ extern {
|
|||
pub fn getpwent() -> *mut passwd;
|
||||
pub fn setpwent();
|
||||
pub fn endpwent();
|
||||
pub fn setgrent();
|
||||
pub fn endgrent();
|
||||
pub fn getgrent() -> *mut ::group;
|
||||
|
||||
pub fn getprogname() -> *const ::c_char;
|
||||
pub fn setprogname(name: *const ::c_char);
|
||||
pub fn getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int;
|
||||
|
@ -398,12 +404,14 @@ extern {
|
|||
|
||||
#[cfg_attr(target_os = "macos", link_name = "glob$INODE64")]
|
||||
#[cfg_attr(target_os = "netbsd", link_name = "__glob30")]
|
||||
#[cfg_attr(target_os = "freebsd", link_name = "glob@FBSD_1.0")]
|
||||
pub fn glob(pattern: *const ::c_char,
|
||||
flags: ::c_int,
|
||||
errfunc: Option<extern fn(epath: *const ::c_char,
|
||||
errno: ::c_int) -> ::c_int>,
|
||||
pglob: *mut ::glob_t) -> ::c_int;
|
||||
#[cfg_attr(target_os = "netbsd", link_name = "__globfree30")]
|
||||
#[cfg_attr(target_os = "freebsd", link_name = "globfree@FBSD_1.0")]
|
||||
pub fn globfree(pglob: *mut ::glob_t);
|
||||
|
||||
pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
|
||||
|
|
|
@ -448,8 +448,6 @@ pub const MSG_MCAST: ::c_int = 0x200;
|
|||
pub const MSG_NOSIGNAL: ::c_int = 0x400;
|
||||
pub const MSG_CMSG_CLOEXEC: ::c_int = 0x800;
|
||||
|
||||
pub const IFF_LOOPBACK: ::c_int = 0x8;
|
||||
|
||||
pub const SHUT_RD: ::c_int = 0;
|
||||
pub const SHUT_WR: ::c_int = 1;
|
||||
pub const SHUT_RDWR: ::c_int = 2;
|
||||
|
@ -534,6 +532,21 @@ pub const CRTS_IFLOW: ::tcflag_t = CRTSCTS;
|
|||
pub const CCTS_OFLOW: ::tcflag_t = CRTSCTS;
|
||||
pub const OCRNL: ::tcflag_t = 0x10;
|
||||
|
||||
pub const TIOCEXCL: ::c_ulong = 0x2000740d;
|
||||
pub const TIOCNXCL: ::c_ulong = 0x2000740e;
|
||||
pub const TIOCFLUSH: ::c_ulong = 0x80047410;
|
||||
pub const TIOCGETA: ::c_ulong = 0x402c7413;
|
||||
pub const TIOCSETA: ::c_ulong = 0x802c7414;
|
||||
pub const TIOCSETAW: ::c_ulong = 0x802c7415;
|
||||
pub const TIOCSETAF: ::c_ulong = 0x802c7416;
|
||||
pub const TIOCGETD: ::c_ulong = 0x4004741a;
|
||||
pub const TIOCSETD: ::c_ulong = 0x8004741b;
|
||||
pub const TIOCMGET: ::c_ulong = 0x4004746a;
|
||||
pub const TIOCMBIC: ::c_ulong = 0x8004746b;
|
||||
pub const TIOCMBIS: ::c_ulong = 0x8004746c;
|
||||
pub const TIOCMSET: ::c_ulong = 0x8004746d;
|
||||
pub const TIOCSTART: ::c_ulong = 0x2000746e;
|
||||
pub const TIOCSTOP: ::c_ulong = 0x2000746f;
|
||||
pub const TIOCM_LE: ::c_int = 0o0001;
|
||||
pub const TIOCM_DTR: ::c_int = 0o0002;
|
||||
pub const TIOCM_RTS: ::c_int = 0o0004;
|
||||
|
@ -624,9 +637,20 @@ extern {
|
|||
groups: *mut ::gid_t,
|
||||
ngroups: *mut ::c_int) -> ::c_int;
|
||||
pub fn initgroups(name: *const ::c_char, basegid: ::gid_t) -> ::c_int;
|
||||
#[cfg_attr(target_os = "netbsd", link_name = "__getpwent_r50")]
|
||||
pub fn getpwent_r(pwd: *mut ::passwd,
|
||||
buf: *mut ::c_char,
|
||||
buflen: ::size_t,
|
||||
result: *mut *mut ::passwd) -> ::c_int;
|
||||
pub fn getgrent_r(grp: *mut ::group,
|
||||
buf: *mut ::c_char,
|
||||
buflen: ::size_t,
|
||||
result: *mut *mut ::group) -> ::c_int;
|
||||
pub fn fexecve(fd: ::c_int, argv: *const *const ::c_char,
|
||||
envp: *const *const ::c_char)
|
||||
-> ::c_int;
|
||||
pub fn getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int;
|
||||
pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int;
|
||||
}
|
||||
|
||||
cfg_if! {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
use dox::mem;
|
||||
|
||||
pub type c_char = i8;
|
||||
pub type clock_t = ::c_uint;
|
||||
pub type suseconds_t = ::c_int;
|
||||
pub type dev_t = u64;
|
||||
|
@ -5,6 +8,7 @@ pub type blksize_t = ::int32_t;
|
|||
pub type fsblkcnt_t = ::uint64_t;
|
||||
pub type fsfilcnt_t = ::uint64_t;
|
||||
pub type idtype_t = ::c_int;
|
||||
pub type mqd_t = ::c_int;
|
||||
|
||||
s! {
|
||||
pub struct aiocb {
|
||||
|
@ -44,6 +48,13 @@ s! {
|
|||
__unused8: *mut ::c_void,
|
||||
}
|
||||
|
||||
pub struct mq_attr {
|
||||
pub mq_flags: ::c_long,
|
||||
pub mq_maxmsg: ::c_long,
|
||||
pub mq_msgsize: ::c_long,
|
||||
pub mq_curmsgs: ::c_long,
|
||||
}
|
||||
|
||||
pub struct sigevent {
|
||||
pub sigev_notify: ::c_int,
|
||||
pub sigev_signo: ::c_int,
|
||||
|
@ -281,6 +292,27 @@ s! {
|
|||
pub ifm_index: ::c_ushort,
|
||||
pub ifm_data: if_data,
|
||||
}
|
||||
|
||||
pub struct sockcred {
|
||||
pub sc_pid: ::pid_t,
|
||||
pub sc_uid: ::uid_t,
|
||||
pub sc_euid: ::uid_t,
|
||||
pub sc_gid: ::gid_t,
|
||||
pub sc_egid: ::gid_t,
|
||||
pub sc_ngroups: ::c_int,
|
||||
pub sc_groups: [::gid_t; 1],
|
||||
}
|
||||
|
||||
pub struct sockaddr_dl {
|
||||
pub sdl_len: ::c_uchar,
|
||||
pub sdl_family: ::c_uchar,
|
||||
pub sdl_index: ::c_ushort,
|
||||
pub sdl_type: ::uint8_t,
|
||||
pub sdl_nlen: ::uint8_t,
|
||||
pub sdl_alen: ::uint8_t,
|
||||
pub sdl_slen: ::uint8_t,
|
||||
pub sdl_data: [::c_char; 12],
|
||||
}
|
||||
}
|
||||
|
||||
pub const AT_FDCWD: ::c_int = -100;
|
||||
|
@ -316,14 +348,22 @@ pub const MS_INVALIDATE : ::c_int = 0x2;
|
|||
|
||||
pub const RLIM_NLIMITS: ::c_int = 12;
|
||||
|
||||
pub const ENOATTR : ::c_int = 93;
|
||||
pub const EILSEQ : ::c_int = 85;
|
||||
pub const EOVERFLOW : ::c_int = 84;
|
||||
pub const ECANCELED : ::c_int = 87;
|
||||
pub const EIDRM : ::c_int = 82;
|
||||
pub const ENOMSG : ::c_int = 83;
|
||||
pub const ENOTSUP : ::c_int = 86;
|
||||
pub const ELAST : ::c_int = 96;
|
||||
pub const EIDRM: ::c_int = 82;
|
||||
pub const ENOMSG: ::c_int = 83;
|
||||
pub const EOVERFLOW: ::c_int = 84;
|
||||
pub const EILSEQ: ::c_int = 85;
|
||||
pub const ENOTSUP: ::c_int = 86;
|
||||
pub const ECANCELED: ::c_int = 87;
|
||||
pub const EBADMSG: ::c_int = 88;
|
||||
pub const ENODATA: ::c_int = 89;
|
||||
pub const ENOSR: ::c_int = 90;
|
||||
pub const ENOSTR: ::c_int = 91;
|
||||
pub const ETIME: ::c_int = 92;
|
||||
pub const ENOATTR: ::c_int = 93;
|
||||
pub const EMULTIHOP: ::c_int = 94;
|
||||
pub const ENOLINK: ::c_int = 95;
|
||||
pub const EPROTO: ::c_int = 96;
|
||||
pub const ELAST: ::c_int = 96;
|
||||
|
||||
pub const F_DUPFD_CLOEXEC : ::c_int = 12;
|
||||
pub const F_CLOSEM: ::c_int = 10;
|
||||
|
@ -346,6 +386,24 @@ pub const SO_TIMESTAMP: ::c_int = 0x2000;
|
|||
pub const SO_OVERFLOWED: ::c_int = 0x1009;
|
||||
pub const SO_NOHEADER: ::c_int = 0x100a;
|
||||
|
||||
// https://github.com/NetBSD/src/blob/trunk/sys/net/if.h#L373
|
||||
pub const IFF_UP: ::c_int = 0x0001; // interface is up
|
||||
pub const IFF_BROADCAST: ::c_int = 0x0002; // broadcast address valid
|
||||
pub const IFF_DEBUG: ::c_int = 0x0004; // turn on debugging
|
||||
pub const IFF_LOOPBACK: ::c_int = 0x0008; // is a loopback net
|
||||
pub const IFF_POINTOPOINT: ::c_int = 0x0010; // interface is point-to-point link
|
||||
pub const IFF_NOTRAILERS: ::c_int = 0x0020; // avoid use of trailers
|
||||
pub const IFF_RUNNING: ::c_int = 0x0040; // resources allocated
|
||||
pub const IFF_NOARP: ::c_int = 0x0080; // no address resolution protocol
|
||||
pub const IFF_PROMISC: ::c_int = 0x0100; // receive all packets
|
||||
pub const IFF_ALLMULTI: ::c_int = 0x0200; // receive all multicast packets
|
||||
pub const IFF_OACTIVE: ::c_int = 0x0400; // transmission in progress
|
||||
pub const IFF_SIMPLEX: ::c_int = 0x0800; // can't hear own transmissions
|
||||
pub const IFF_LINK0: ::c_int = 0x1000; // per link layer defined bit
|
||||
pub const IFF_LINK1: ::c_int = 0x2000; // per link layer defined bit
|
||||
pub const IFF_LINK2: ::c_int = 0x4000; // per link layer defined bit
|
||||
pub const IFF_MULTICAST: ::c_int = 0x8000; // supports multicast
|
||||
|
||||
// sys/netinet/in.h
|
||||
// Protocols (RFC 1700)
|
||||
// NOTE: These are in addition to the constants defined in src/unix/mod.rs
|
||||
|
@ -844,7 +902,17 @@ pub const KERN_PROC_ENV: ::c_int = 3;
|
|||
pub const KERN_PROC_NENV: ::c_int = 4;
|
||||
pub const KERN_PROC_PATHNAME: ::c_int = 5;
|
||||
|
||||
pub const EAI_AGAIN: ::c_int = 2;
|
||||
pub const EAI_BADFLAGS: ::c_int = 3;
|
||||
pub const EAI_FAIL: ::c_int = 4;
|
||||
pub const EAI_FAMILY: ::c_int = 5;
|
||||
pub const EAI_MEMORY: ::c_int = 6;
|
||||
pub const EAI_NODATA: ::c_int = 7;
|
||||
pub const EAI_NONAME: ::c_int = 8;
|
||||
pub const EAI_SERVICE: ::c_int = 9;
|
||||
pub const EAI_SOCKTYPE: ::c_int = 10;
|
||||
pub const EAI_SYSTEM: ::c_int = 11;
|
||||
pub const EAI_OVERFLOW: ::c_int = 14;
|
||||
|
||||
pub const AIO_CANCELED: ::c_int = 1;
|
||||
pub const AIO_NOTCANCELED: ::c_int = 2;
|
||||
|
@ -884,12 +952,21 @@ pub const SOCK_NONBLOCK: ::c_int = 0x20000000;
|
|||
// http://cvsweb.netbsd.org/bsdweb.cgi/src/include/dirent.h?rev=1.36
|
||||
f! {
|
||||
pub fn dirfd(dirp: *mut ::DIR) -> ::c_int {
|
||||
unsafe { *(dirp as *const ::c_int) }
|
||||
*(dirp as *const ::c_int)
|
||||
}
|
||||
|
||||
pub fn WIFCONTINUED(status: ::c_int) -> bool {
|
||||
status == 0xffff
|
||||
}
|
||||
|
||||
pub fn SOCKCREDSIZE(ngrps: usize) -> usize {
|
||||
let ngrps = if ngrps > 0 {
|
||||
ngrps - 1
|
||||
} else {
|
||||
0
|
||||
};
|
||||
mem::size_of::<sockcred>() + mem::size_of::<::gid_t>() * ngrps
|
||||
}
|
||||
}
|
||||
|
||||
extern {
|
||||
|
@ -941,6 +1018,32 @@ extern {
|
|||
flags: ::c_int,
|
||||
data: *mut ::c_void,
|
||||
size: ::size_t) -> ::c_int;
|
||||
pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t;
|
||||
pub fn mq_close(mqd: ::mqd_t) -> ::c_int;
|
||||
pub fn mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int;
|
||||
pub fn mq_notify(mqd: ::mqd_t, notification: *const ::sigevent) -> ::c_int;
|
||||
pub fn mq_receive(mqd: ::mqd_t,
|
||||
msg_ptr: *mut ::c_char,
|
||||
msg_len: ::size_t,
|
||||
msq_prio: *mut ::c_uint) -> ::ssize_t;
|
||||
pub fn mq_send(mqd: ::mqd_t,
|
||||
msg_ptr: *const ::c_char,
|
||||
msg_len: ::size_t,
|
||||
msq_prio: ::c_uint) -> ::c_int;
|
||||
pub fn mq_setattr(mqd: ::mqd_t,
|
||||
newattr: *const ::mq_attr,
|
||||
oldattr: *mut ::mq_attr) -> ::c_int;
|
||||
pub fn mq_timedreceive(mqd: ::mqd_t,
|
||||
msg_ptr: *mut ::c_char,
|
||||
msg_len: ::size_t,
|
||||
msq_prio: *mut ::c_uint,
|
||||
abs_timeout: *const ::timespec) -> ::ssize_t;
|
||||
pub fn mq_timedsend(mqd: ::mqd_t,
|
||||
msg_ptr: *const ::c_char,
|
||||
msg_len: ::size_t,
|
||||
msq_prio: ::c_uint,
|
||||
abs_timeout: *const ::timespec) -> ::c_int;
|
||||
pub fn mq_unlink(name: *const ::c_char) -> ::c_int;
|
||||
pub fn ptrace(request: ::c_int,
|
||||
pid: ::pid_t,
|
||||
addr: *mut ::c_void,
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
pub type c_char = i8;
|
||||
|
||||
s! {
|
||||
pub struct lconv {
|
||||
pub decimal_point: *mut ::c_char,
|
||||
|
@ -73,3 +75,15 @@ extern {
|
|||
pub fn uselocale(loc: ::locale_t) -> ::locale_t;
|
||||
pub fn querylocale(mask: ::c_int, loc: ::locale_t) -> *const ::c_char;
|
||||
}
|
||||
|
||||
cfg_if! {
|
||||
if #[cfg(target_arch = "x86")] {
|
||||
mod x86;
|
||||
pub use self::x86::*;
|
||||
} else if #[cfg(target_arch = "x86_64")] {
|
||||
mod x86_64;
|
||||
pub use self::x86_64::*;
|
||||
} else {
|
||||
// Unknown target_arch
|
||||
}
|
||||
}
|
|
@ -176,6 +176,17 @@ s! {
|
|||
pub ifm_xflags: ::c_int,
|
||||
pub ifm_data: if_data,
|
||||
}
|
||||
|
||||
pub struct sockaddr_dl {
|
||||
pub sdl_len: ::c_uchar,
|
||||
pub sdl_family: ::c_uchar,
|
||||
pub sdl_index: ::c_ushort,
|
||||
pub sdl_type: ::c_uchar,
|
||||
pub sdl_nlen: ::c_uchar,
|
||||
pub sdl_alen: ::c_uchar,
|
||||
pub sdl_slen: ::c_uchar,
|
||||
pub sdl_data: [::c_char; 24],
|
||||
}
|
||||
}
|
||||
|
||||
pub const UT_NAMESIZE: usize = 32;
|
||||
|
@ -200,7 +211,11 @@ pub const ECANCELED : ::c_int = 88;
|
|||
pub const EIDRM : ::c_int = 89;
|
||||
pub const ENOMSG : ::c_int = 90;
|
||||
pub const ENOTSUP : ::c_int = 91;
|
||||
pub const ELAST : ::c_int = 91;
|
||||
pub const EBADMSG : ::c_int = 92;
|
||||
pub const ENOTRECOVERABLE : ::c_int = 93;
|
||||
pub const EOWNERDEAD : ::c_int = 94;
|
||||
pub const EPROTO : ::c_int = 95;
|
||||
pub const ELAST : ::c_int = 95;
|
||||
|
||||
pub const F_DUPFD_CLOEXEC : ::c_int = 10;
|
||||
|
||||
|
@ -221,6 +236,24 @@ pub const SO_RTABLE: ::c_int = 0x1021;
|
|||
pub const SO_PEERCRED: ::c_int = 0x1022;
|
||||
pub const SO_SPLICE: ::c_int = 0x1023;
|
||||
|
||||
// https://github.com/openbsd/src/blob/master/sys/net/if.h#L187
|
||||
pub const IFF_UP: ::c_int = 0x1; // interface is up
|
||||
pub const IFF_BROADCAST: ::c_int = 0x2; // broadcast address valid
|
||||
pub const IFF_DEBUG: ::c_int = 0x4; // turn on debugging
|
||||
pub const IFF_LOOPBACK: ::c_int = 0x8; // is a loopback net
|
||||
pub const IFF_POINTOPOINT: ::c_int = 0x10; // interface is point-to-point link
|
||||
pub const IFF_NOTRAILERS: ::c_int = 0x20; // avoid use of trailers
|
||||
pub const IFF_RUNNING: ::c_int = 0x40; // resources allocated
|
||||
pub const IFF_NOARP: ::c_int = 0x80; // no address resolution protocol
|
||||
pub const IFF_PROMISC: ::c_int = 0x100; // receive all packets
|
||||
pub const IFF_ALLMULTI: ::c_int = 0x200; // receive all multicast packets
|
||||
pub const IFF_OACTIVE: ::c_int = 0x400; // transmission in progress
|
||||
pub const IFF_SIMPLEX: ::c_int = 0x800; // can't hear own transmissions
|
||||
pub const IFF_LINK0: ::c_int = 0x1000; // per link layer defined bit
|
||||
pub const IFF_LINK1: ::c_int = 0x2000; // per link layer defined bit
|
||||
pub const IFF_LINK2: ::c_int = 0x4000; // per link layer defined bit
|
||||
pub const IFF_MULTICAST: ::c_int = 0x8000; // supports multicast
|
||||
|
||||
// sys/netinet/in.h
|
||||
// Protocols (RFC 1700)
|
||||
// NOTE: These are in addition to the constants defined in src/unix/mod.rs
|
||||
|
@ -339,7 +372,17 @@ pub const EIPSEC : ::c_int = 82;
|
|||
pub const ENOMEDIUM : ::c_int = 85;
|
||||
pub const EMEDIUMTYPE : ::c_int = 86;
|
||||
|
||||
pub const EAI_BADFLAGS: ::c_int = -1;
|
||||
pub const EAI_NONAME: ::c_int = -2;
|
||||
pub const EAI_AGAIN: ::c_int = -3;
|
||||
pub const EAI_FAIL: ::c_int = -4;
|
||||
pub const EAI_NODATA: ::c_int = -5;
|
||||
pub const EAI_FAMILY: ::c_int = -6;
|
||||
pub const EAI_SOCKTYPE: ::c_int = -7;
|
||||
pub const EAI_SERVICE: ::c_int = -8;
|
||||
pub const EAI_MEMORY: ::c_int = -10;
|
||||
pub const EAI_SYSTEM: ::c_int = -11;
|
||||
pub const EAI_OVERFLOW: ::c_int = -14;
|
||||
|
||||
pub const RUSAGE_THREAD: ::c_int = 1;
|
||||
|
||||
|
@ -651,6 +694,8 @@ pub const SOCK_CLOEXEC: ::c_int = 0x8000;
|
|||
pub const SOCK_NONBLOCK: ::c_int = 0x4000;
|
||||
pub const SOCK_DNS: ::c_int = 0x1000;
|
||||
|
||||
pub const WCONTINUED: ::c_int = 8;
|
||||
|
||||
f! {
|
||||
pub fn WIFCONTINUED(status: ::c_int) -> bool {
|
||||
status & 0o177777 == 0o177777
|
||||
|
@ -703,6 +748,3 @@ cfg_if! {
|
|||
// Unknown target_os
|
||||
}
|
||||
}
|
||||
|
||||
mod other;
|
||||
pub use self::other::*;
|
||||
|
|
3
third_party/rust/libc/src/unix/bsd/netbsdlike/openbsdlike/openbsd/aarch64.rs
поставляемый
Normal file
3
third_party/rust/libc/src/unix/bsd/netbsdlike/openbsdlike/openbsd/aarch64.rs
поставляемый
Normal file
|
@ -0,0 +1,3 @@
|
|||
pub type c_long = i64;
|
||||
pub type c_ulong = u64;
|
||||
pub type c_char = u8;
|
|
@ -33,3 +33,18 @@ extern {
|
|||
pub fn execvpe(file: *const ::c_char, argv: *const *const ::c_char,
|
||||
envp: *const *const ::c_char) -> ::c_int;
|
||||
}
|
||||
|
||||
cfg_if! {
|
||||
if #[cfg(target_arch = "x86")] {
|
||||
mod x86;
|
||||
pub use self::x86::*;
|
||||
} else if #[cfg(target_arch = "x86_64")] {
|
||||
mod x86_64;
|
||||
pub use self::x86_64::*;
|
||||
} else if #[cfg(target_arch = "aarch64")] {
|
||||
mod aarch64;
|
||||
pub use self::aarch64::*;
|
||||
} else {
|
||||
// Unknown target_arch
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
pub type c_long = i32;
|
||||
pub type c_ulong = u32;
|
||||
pub type c_char = i8;
|
3
third_party/rust/libc/src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86_64.rs
поставляемый
Normal file
3
third_party/rust/libc/src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86_64.rs
поставляемый
Normal file
|
@ -0,0 +1,3 @@
|
|||
pub type c_long = i64;
|
||||
pub type c_ulong = u64;
|
||||
pub type c_char = i8;
|
|
@ -1,11 +0,0 @@
|
|||
cfg_if! {
|
||||
if #[cfg(target_arch = "x86_64")] {
|
||||
mod b64;
|
||||
pub use self::b64::*;
|
||||
} else if #[cfg(target_arch = "x86")] {
|
||||
mod b32;
|
||||
pub use self::b32::*;
|
||||
} else {
|
||||
// Unknown target_arch
|
||||
}
|
||||
}
|
|
@ -478,7 +478,17 @@ pub const SIGEV_NONE: ::c_int = 0;
|
|||
pub const SIGEV_SIGNAL: ::c_int = 1;
|
||||
pub const SIGEV_THREAD: ::c_int = 2;
|
||||
|
||||
pub const EAI_AGAIN: ::c_int = 2;
|
||||
pub const EAI_BADFLAGS: ::c_int = 3;
|
||||
pub const EAI_FAIL: ::c_int = 4;
|
||||
pub const EAI_FAMILY: ::c_int = 5;
|
||||
pub const EAI_MEMORY: ::c_int = 6;
|
||||
pub const EAI_NODATA: ::c_int = 7;
|
||||
pub const EAI_NONAME: ::c_int = 8;
|
||||
pub const EAI_SERVICE: ::c_int = 9;
|
||||
pub const EAI_SOCKTYPE: ::c_int = 10;
|
||||
pub const EAI_SYSTEM: ::c_int = 11;
|
||||
pub const EAI_OVERFLOW: ::c_int = 14;
|
||||
|
||||
pub const PROT_NONE: ::c_int = 0;
|
||||
pub const PROT_READ: ::c_int = 1;
|
||||
|
@ -606,7 +616,20 @@ pub const MADV_RANDOM: ::c_int = 3;
|
|||
pub const MADV_WILLNEED: ::c_int = 4;
|
||||
pub const MADV_DONTNEED: ::c_int = 5;
|
||||
|
||||
// https://github.com/haiku/haiku/blob/master/headers/posix/net/if.h#L80
|
||||
pub const IFF_UP: ::c_int = 0x0001;
|
||||
pub const IFF_BROADCAST: ::c_int = 0x0002; // valid broadcast address
|
||||
pub const IFF_LOOPBACK: ::c_int = 0x0008;
|
||||
pub const IFF_POINTOPOINT: ::c_int = 0x0010; // point-to-point link
|
||||
pub const IFF_NOARP: ::c_int = 0x0040; // no address resolution
|
||||
pub const IFF_AUTOUP: ::c_int = 0x0080; // auto dial
|
||||
pub const IFF_PROMISC: ::c_int = 0x0100; // receive all packets
|
||||
pub const IFF_ALLMULTI: ::c_int = 0x0200; // receive all multicast packets
|
||||
pub const IFF_SIMPLEX: ::c_int = 0x0800; // doesn't receive own transmissions
|
||||
pub const IFF_LINK: ::c_int = 0x1000; // has link
|
||||
pub const IFF_AUTO_CONFIGURED: ::c_int = 0x2000;
|
||||
pub const IFF_CONFIGURING: ::c_int = 0x4000;
|
||||
pub const IFF_MULTICAST: ::c_int = 0x8000; // supports multicast
|
||||
|
||||
pub const AF_UNSEC: ::c_int = 0;
|
||||
pub const AF_INET: ::c_int = 1;
|
||||
|
@ -1099,6 +1122,7 @@ extern {
|
|||
addrlen: *mut ::socklen_t) -> ::ssize_t;
|
||||
pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int;
|
||||
pub fn futimes(fd: ::c_int, times: *const ::timeval) -> ::c_int;
|
||||
pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
|
||||
pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char;
|
||||
|
||||
pub fn bind(socket: ::c_int, address: *const ::sockaddr,
|
||||
|
|
|
@ -190,6 +190,7 @@ pub const SIG_DFL: sighandler_t = 0 as sighandler_t;
|
|||
pub const SIG_IGN: sighandler_t = 1 as sighandler_t;
|
||||
pub const SIG_ERR: sighandler_t = !0 as sighandler_t;
|
||||
|
||||
pub const DT_UNKNOWN: u8 = 0;
|
||||
pub const DT_FIFO: u8 = 1;
|
||||
pub const DT_CHR: u8 = 2;
|
||||
pub const DT_DIR: u8 = 4;
|
||||
|
@ -210,6 +211,7 @@ pub const S_ISGID: ::c_int = 0x400;
|
|||
pub const S_ISVTX: ::c_int = 0x200;
|
||||
|
||||
pub const IF_NAMESIZE: ::size_t = 16;
|
||||
pub const IFNAMSIZ: ::size_t = IF_NAMESIZE;
|
||||
|
||||
pub const LOG_EMERG: ::c_int = 0;
|
||||
pub const LOG_ALERT: ::c_int = 1;
|
||||
|
@ -274,17 +276,21 @@ cfg_if! {
|
|||
} else if #[cfg(feature = "use_std")] {
|
||||
// cargo build, don't pull in anything extra as the libstd dep
|
||||
// already pulls in all libs.
|
||||
} else if #[cfg(any(all(target_env = "musl", not(target_arch = "mips"))))] {
|
||||
#[link(name = "c", kind = "static", cfg(target_feature = "crt-static"))]
|
||||
#[link(name = "c", cfg(not(target_feature = "crt-static")))]
|
||||
} else if #[cfg(target_env = "musl")] {
|
||||
#[cfg_attr(feature = "stdbuild",
|
||||
link(name = "c", kind = "static",
|
||||
cfg(target_feature = "crt-static")))]
|
||||
#[cfg_attr(feature = "stdbuild",
|
||||
link(name = "c", cfg(not(target_feature = "crt-static"))))]
|
||||
extern {}
|
||||
} else if #[cfg(target_os = "emscripten")] {
|
||||
#[link(name = "c")]
|
||||
extern {}
|
||||
} else if #[cfg(all(target_os = "netbsd", target_vendor = "rumprun"))] {
|
||||
} else if #[cfg(all(target_os = "netbsd"))] {
|
||||
// Since we don't use -nodefaultlibs on Rumprun, libc is always pulled
|
||||
// in automatically by the linker. We avoid passing it explicitly, as it
|
||||
// causes some versions of binutils to crash with an assertion failure.
|
||||
#[cfg_attr(feature = "stdbuild", target_vendor = "rumprun")]
|
||||
#[link(name = "m")]
|
||||
extern {}
|
||||
} else if #[cfg(any(target_os = "macos",
|
||||
|
@ -378,12 +384,14 @@ extern {
|
|||
|
||||
#[cfg_attr(target_os = "macos", link_name = "fstat$INODE64")]
|
||||
#[cfg_attr(target_os = "netbsd", link_name = "__fstat50")]
|
||||
#[cfg_attr(target_os = "freebsd", link_name = "fstat@FBSD_1.0")]
|
||||
pub fn fstat(fildes: ::c_int, buf: *mut stat) -> ::c_int;
|
||||
|
||||
pub fn mkdir(path: *const c_char, mode: mode_t) -> ::c_int;
|
||||
|
||||
#[cfg_attr(target_os = "macos", link_name = "stat$INODE64")]
|
||||
#[cfg_attr(target_os = "netbsd", link_name = "__stat50")]
|
||||
#[cfg_attr(target_os = "freebsd", link_name = "stat@FBSD_1.0")]
|
||||
pub fn stat(path: *const c_char, buf: *mut stat) -> ::c_int;
|
||||
|
||||
pub fn pclose(stream: *mut ::FILE) -> ::c_int;
|
||||
|
@ -410,10 +418,12 @@ extern {
|
|||
pub fn opendir(dirname: *const c_char) -> *mut ::DIR;
|
||||
#[cfg_attr(target_os = "macos", link_name = "readdir$INODE64")]
|
||||
#[cfg_attr(target_os = "netbsd", link_name = "__readdir30")]
|
||||
#[cfg_attr(target_os = "freebsd", link_name = "readdir@FBSD_1.0")]
|
||||
pub fn readdir(dirp: *mut ::DIR) -> *mut ::dirent;
|
||||
#[cfg_attr(target_os = "macos", link_name = "readdir_r$INODE64")]
|
||||
#[cfg_attr(target_os = "netbsd", link_name = "__readdir_r30")]
|
||||
#[cfg_attr(target_os = "solaris", link_name = "__posix_readdir_r")]
|
||||
#[cfg_attr(target_os = "freebsd", link_name = "readdir_r@FBSD_1.0")]
|
||||
pub fn readdir_r(dirp: *mut ::DIR, entry: *mut ::dirent,
|
||||
result: *mut *mut ::dirent) -> ::c_int;
|
||||
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
|
||||
|
@ -436,6 +446,7 @@ extern {
|
|||
owner: ::uid_t, group: ::gid_t,
|
||||
flags: ::c_int) -> ::c_int;
|
||||
#[cfg_attr(target_os = "macos", link_name = "fstatat$INODE64")]
|
||||
#[cfg_attr(target_os = "freebsd", link_name = "fstatat@FBSD_1.1")]
|
||||
pub fn fstatat(dirfd: ::c_int, pathname: *const ::c_char,
|
||||
buf: *mut stat, flags: ::c_int) -> ::c_int;
|
||||
pub fn linkat(olddirfd: ::c_int, oldpath: *const ::c_char,
|
||||
|
@ -561,6 +572,9 @@ extern {
|
|||
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
|
||||
link_name = "kill$UNIX2003")]
|
||||
pub fn kill(pid: pid_t, sig: ::c_int) -> ::c_int;
|
||||
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
|
||||
link_name = "killpg$UNIX2003")]
|
||||
pub fn killpg(pgrp: pid_t, sig: ::c_int) -> ::c_int;
|
||||
|
||||
pub fn mlock(addr: *const ::c_void, len: ::size_t) -> ::c_int;
|
||||
pub fn munlock(addr: *const ::c_void, len: ::size_t) -> ::c_int;
|
||||
|
@ -586,6 +600,7 @@ extern {
|
|||
|
||||
#[cfg_attr(target_os = "macos", link_name = "lstat$INODE64")]
|
||||
#[cfg_attr(target_os = "netbsd", link_name = "__lstat50")]
|
||||
#[cfg_attr(target_os = "freebsd", link_name = "lstat@FBSD_1.0")]
|
||||
pub fn lstat(path: *const c_char, buf: *mut stat) -> ::c_int;
|
||||
|
||||
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
|
||||
|
@ -766,8 +781,11 @@ extern {
|
|||
pub fn gmtime(time_p: *const time_t) -> *mut tm;
|
||||
#[cfg_attr(target_os = "netbsd", link_name = "__locatime50")]
|
||||
pub fn localtime(time_p: *const time_t) -> *mut tm;
|
||||
#[cfg_attr(target_os = "netbsd", link_name = "__difftime50")]
|
||||
pub fn difftime(time1: time_t, time0: time_t) -> ::c_double;
|
||||
|
||||
#[cfg_attr(target_os = "netbsd", link_name = "__mknod50")]
|
||||
#[cfg_attr(target_os = "freebsd", link_name = "mknod@FBSD_1.0")]
|
||||
pub fn mknod(pathname: *const ::c_char, mode: ::mode_t,
|
||||
dev: ::dev_t) -> ::c_int;
|
||||
pub fn uname(buf: *mut ::utsname) -> ::c_int;
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
pub type c_char = u8;
|
||||
pub type wchar_t = u32;
|
||||
|
||||
pub type c_long = i64;
|
||||
pub type c_ulong = u64;
|
|
@ -517,6 +517,26 @@ pub const SOCK_CLOEXEC: ::c_int = O_CLOEXEC;
|
|||
|
||||
pub const INET_ADDRSTRLEN: ::c_int = 16;
|
||||
|
||||
// https://github.
|
||||
// com/bminor/newlib/blob/master/newlib/libc/sys/linux/include/net/if.h#L121
|
||||
pub const IFF_UP: ::c_int = 0x1; // interface is up
|
||||
pub const IFF_BROADCAST: ::c_int = 0x2; // broadcast address valid
|
||||
pub const IFF_DEBUG: ::c_int = 0x4; // turn on debugging
|
||||
pub const IFF_LOOPBACK: ::c_int = 0x8; // is a loopback net
|
||||
pub const IFF_POINTOPOINT: ::c_int = 0x10; // interface is point-to-point link
|
||||
pub const IFF_NOTRAILERS: ::c_int = 0x20; // avoid use of trailers
|
||||
pub const IFF_RUNNING: ::c_int = 0x40; // resources allocated
|
||||
pub const IFF_NOARP: ::c_int = 0x80; // no address resolution protocol
|
||||
pub const IFF_PROMISC: ::c_int = 0x100; // receive all packets
|
||||
pub const IFF_ALLMULTI: ::c_int = 0x200; // receive all multicast packets
|
||||
pub const IFF_OACTIVE: ::c_int = 0x400; // transmission in progress
|
||||
pub const IFF_SIMPLEX: ::c_int = 0x800; // can't hear own transmissions
|
||||
pub const IFF_LINK0: ::c_int = 0x1000; // per link layer defined bit
|
||||
pub const IFF_LINK1: ::c_int = 0x2000; // per link layer defined bit
|
||||
pub const IFF_LINK2: ::c_int = 0x4000; // per link layer defined bit
|
||||
pub const IFF_ALTPHYS: ::c_int = IFF_LINK2; // use alternate physical connection
|
||||
pub const IFF_MULTICAST: ::c_int = 0x8000; // supports multicast
|
||||
|
||||
pub const IPPROTO_IP: ::c_int = 0;
|
||||
pub const IPPROTO_UDP: ::c_int = 17;
|
||||
pub const IPPROTO_TCP: ::c_int = 6;
|
||||
|
@ -659,6 +679,9 @@ cfg_if! {
|
|||
if #[cfg(target_arch = "arm")] {
|
||||
mod arm;
|
||||
pub use self::arm::*;
|
||||
} else if #[cfg(target_arch = "aarch64")] {
|
||||
mod aarch64;
|
||||
pub use self::aarch64::*;
|
||||
} else {
|
||||
// Only tested on ARM so far. Other platforms might have different
|
||||
// definitions for types and constants.
|
||||
|
|
|
@ -185,6 +185,50 @@ s! {
|
|||
pub uid: ::uid_t,
|
||||
pub gid: ::gid_t,
|
||||
}
|
||||
|
||||
pub struct genlmsghdr {
|
||||
cmd: u8,
|
||||
version: u8,
|
||||
reserved: u16,
|
||||
}
|
||||
|
||||
pub struct nlmsghdr {
|
||||
nlmsg_len: u32,
|
||||
nlmsg_type: u16,
|
||||
nlmsg_flags: u16,
|
||||
nlmsg_seq: u32,
|
||||
nlmsg_pid: u32,
|
||||
}
|
||||
|
||||
pub struct nlmsgerr {
|
||||
error: ::c_int,
|
||||
msg: nlmsghdr,
|
||||
}
|
||||
|
||||
pub struct nl_pktinfo {
|
||||
group: u32,
|
||||
}
|
||||
|
||||
pub struct nl_mmap_req {
|
||||
nm_block_size: ::c_uint,
|
||||
nm_block_nr: ::c_uint,
|
||||
nm_frame_size: ::c_uint,
|
||||
nm_frame_nr: ::c_uint,
|
||||
}
|
||||
|
||||
pub struct nl_mmap_hdr {
|
||||
nm_status: ::c_uint,
|
||||
nm_len: ::c_uint,
|
||||
nm_group: u32,
|
||||
nm_pid: u32,
|
||||
nm_uid: u32,
|
||||
nm_gid: u32,
|
||||
}
|
||||
|
||||
pub struct nlattr {
|
||||
nla_len: u16,
|
||||
nla_type: u16,
|
||||
}
|
||||
}
|
||||
|
||||
pub const O_TRUNC: ::c_int = 512;
|
||||
|
@ -684,6 +728,16 @@ pub const TIOCMSET: ::c_int = 0x5418;
|
|||
pub const FIONREAD: ::c_int = 0x541B;
|
||||
pub const TIOCCONS: ::c_int = 0x541D;
|
||||
|
||||
pub const ST_RDONLY: ::c_ulong = 1;
|
||||
pub const ST_NOSUID: ::c_ulong = 2;
|
||||
pub const ST_NODEV: ::c_ulong = 4;
|
||||
pub const ST_NOEXEC: ::c_ulong = 8;
|
||||
pub const ST_SYNCHRONOUS: ::c_ulong = 16;
|
||||
pub const ST_MANDLOCK: ::c_ulong = 64;
|
||||
pub const ST_NOATIME: ::c_ulong = 1024;
|
||||
pub const ST_NODIRATIME: ::c_ulong = 2048;
|
||||
pub const ST_RELATIME: ::c_ulong = 4096;
|
||||
|
||||
pub const RTLD_NOLOAD: ::c_int = 0x4;
|
||||
|
||||
pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t;
|
||||
|
@ -791,7 +845,17 @@ pub const B3000000: ::speed_t = 0o010015;
|
|||
pub const B3500000: ::speed_t = 0o010016;
|
||||
pub const B4000000: ::speed_t = 0o010017;
|
||||
|
||||
pub const EAI_AGAIN: ::c_int = 2;
|
||||
pub const EAI_BADFLAGS: ::c_int = 3;
|
||||
pub const EAI_FAIL: ::c_int = 4;
|
||||
pub const EAI_FAMILY: ::c_int = 5;
|
||||
pub const EAI_MEMORY: ::c_int = 6;
|
||||
pub const EAI_NODATA: ::c_int = 7;
|
||||
pub const EAI_NONAME: ::c_int = 8;
|
||||
pub const EAI_SERVICE: ::c_int = 9;
|
||||
pub const EAI_SOCKTYPE: ::c_int = 10;
|
||||
pub const EAI_SYSTEM: ::c_int = 11;
|
||||
pub const EAI_OVERFLOW: ::c_int = 14;
|
||||
|
||||
pub const NETLINK_ROUTE: ::c_int = 0;
|
||||
pub const NETLINK_UNUSED: ::c_int = 1;
|
||||
|
@ -840,6 +904,49 @@ pub const NLMSG_DONE: ::c_int = 0x3;
|
|||
pub const NLMSG_OVERRUN: ::c_int = 0x4;
|
||||
pub const NLMSG_MIN_TYPE: ::c_int = 0x10;
|
||||
|
||||
pub const GENL_NAMSIZ: ::c_int = 16;
|
||||
|
||||
pub const GENL_MIN_ID: ::c_int = NLMSG_MIN_TYPE;
|
||||
pub const GENL_MAX_ID: ::c_int = 1023;
|
||||
|
||||
pub const GENL_ADMIN_PERM: ::c_int = 0x01;
|
||||
pub const GENL_CMD_CAP_DO: ::c_int = 0x02;
|
||||
pub const GENL_CMD_CAP_DUMP: ::c_int = 0x04;
|
||||
pub const GENL_CMD_CAP_HASPOL: ::c_int = 0x08;
|
||||
pub const GENL_UNS_ADMIN_PERM: ::c_int = 0x10;
|
||||
|
||||
pub const GENL_ID_CTRL: ::c_int = NLMSG_MIN_TYPE;
|
||||
pub const GENL_ID_VFS_DQUOT: ::c_int = NLMSG_MIN_TYPE + 1;
|
||||
pub const GENL_ID_PMCRAID: ::c_int = NLMSG_MIN_TYPE + 2;
|
||||
|
||||
pub const CTRL_CMD_UNSPEC: ::c_int = 0;
|
||||
pub const CTRL_CMD_NEWFAMILY: ::c_int = 1;
|
||||
pub const CTRL_CMD_DELFAMILY: ::c_int = 2;
|
||||
pub const CTRL_CMD_GETFAMILY: ::c_int = 3;
|
||||
pub const CTRL_CMD_NEWOPS: ::c_int = 4;
|
||||
pub const CTRL_CMD_DELOPS: ::c_int = 5;
|
||||
pub const CTRL_CMD_GETOPS: ::c_int = 6;
|
||||
pub const CTRL_CMD_NEWMCAST_GRP: ::c_int = 7;
|
||||
pub const CTRL_CMD_DELMCAST_GRP: ::c_int = 8;
|
||||
pub const CTRL_CMD_GETMCAST_GRP: ::c_int = 9;
|
||||
|
||||
pub const CTRL_ATTR_UNSPEC: ::c_int = 0;
|
||||
pub const CTRL_ATTR_FAMILY_ID: ::c_int = 1;
|
||||
pub const CTRL_ATTR_FAMILY_NAME: ::c_int = 2;
|
||||
pub const CTRL_ATTR_VERSION: ::c_int = 3;
|
||||
pub const CTRL_ATTR_HDRSIZE: ::c_int = 4;
|
||||
pub const CTRL_ATTR_MAXATTR: ::c_int = 5;
|
||||
pub const CTRL_ATTR_OPS: ::c_int = 6;
|
||||
pub const CTRL_ATTR_MCAST_GROUPS: ::c_int = 7;
|
||||
|
||||
pub const CTRL_ATTR_OP_UNSPEC: ::c_int = 0;
|
||||
pub const CTRL_ATTR_OP_ID: ::c_int = 1;
|
||||
pub const CTRL_ATTR_OP_FLAGS: ::c_int = 2;
|
||||
|
||||
pub const CTRL_ATTR_MCAST_GRP_UNSPEC: ::c_int = 0;
|
||||
pub const CTRL_ATTR_MCAST_GRP_NAME: ::c_int = 1;
|
||||
pub const CTRL_ATTR_MCAST_GRP_ID: ::c_int = 2;
|
||||
|
||||
pub const NETLINK_ADD_MEMBERSHIP: ::c_int = 1;
|
||||
pub const NETLINK_DROP_MEMBERSHIP: ::c_int = 2;
|
||||
pub const NETLINK_PKTINFO: ::c_int = 3;
|
||||
|
@ -848,10 +955,19 @@ pub const NETLINK_NO_ENOBUFS: ::c_int = 5;
|
|||
pub const NETLINK_RX_RING: ::c_int = 6;
|
||||
pub const NETLINK_TX_RING: ::c_int = 7;
|
||||
|
||||
pub const GRND_NONBLOCK: ::c_uint = 0x0001;
|
||||
pub const GRND_RANDOM: ::c_uint = 0x0002;
|
||||
|
||||
pub const SECCOMP_MODE_DISABLED: ::c_uint = 0;
|
||||
pub const SECCOMP_MODE_STRICT: ::c_uint = 1;
|
||||
pub const SECCOMP_MODE_FILTER: ::c_uint = 2;
|
||||
|
||||
pub const NLA_F_NESTED: ::c_int = 1 << 15;
|
||||
pub const NLA_F_NET_BYTEORDER: ::c_int = 1 << 14;
|
||||
pub const NLA_TYPE_MASK: ::c_int = !(NLA_F_NESTED | NLA_F_NET_BYTEORDER);
|
||||
|
||||
pub const NLA_ALIGNTO: ::c_int = 4;
|
||||
|
||||
pub const SIGEV_THREAD_ID: ::c_int = 4;
|
||||
|
||||
pub const CIBAUD: ::tcflag_t = 0o02003600000;
|
||||
|
@ -882,6 +998,380 @@ pub const IUTF8: ::tcflag_t = 0x00004000;
|
|||
pub const CMSPAR: ::tcflag_t = 0o10000000000;
|
||||
pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY;
|
||||
|
||||
pub const MFD_CLOEXEC: ::c_uint = 0x0001;
|
||||
pub const MFD_ALLOW_SEALING: ::c_uint = 0x0002;
|
||||
|
||||
// linux/netfilter.h
|
||||
pub const NF_DROP: ::c_int = 0;
|
||||
pub const NF_ACCEPT: ::c_int = 1;
|
||||
pub const NF_STOLEN: ::c_int = 2;
|
||||
pub const NF_QUEUE: ::c_int = 3;
|
||||
pub const NF_REPEAT: ::c_int = 4;
|
||||
pub const NF_STOP: ::c_int = 5;
|
||||
pub const NF_MAX_VERDICT: ::c_int = NF_STOP;
|
||||
|
||||
pub const NF_VERDICT_MASK: ::c_int = 0x000000ff;
|
||||
pub const NF_VERDICT_FLAG_QUEUE_BYPASS: ::c_int = 0x00008000;
|
||||
|
||||
pub const NF_VERDICT_QMASK: ::c_int = 0xffff0000;
|
||||
pub const NF_VERDICT_QBITS: ::c_int = 16;
|
||||
|
||||
pub const NF_VERDICT_BITS: ::c_int = 16;
|
||||
|
||||
pub const NF_INET_PRE_ROUTING: ::c_int = 0;
|
||||
pub const NF_INET_LOCAL_IN: ::c_int = 1;
|
||||
pub const NF_INET_FORWARD: ::c_int = 2;
|
||||
pub const NF_INET_LOCAL_OUT: ::c_int = 3;
|
||||
pub const NF_INET_POST_ROUTING: ::c_int = 4;
|
||||
pub const NF_INET_NUMHOOKS: ::c_int = 5;
|
||||
|
||||
pub const NF_NETDEV_INGRESS: ::c_int = 0;
|
||||
pub const NF_NETDEV_NUMHOOKS: ::c_int = 1;
|
||||
|
||||
pub const NFPROTO_UNSPEC: ::c_int = 0;
|
||||
pub const NFPROTO_INET: ::c_int = 1;
|
||||
pub const NFPROTO_IPV4: ::c_int = 2;
|
||||
pub const NFPROTO_ARP: ::c_int = 3;
|
||||
pub const NFPROTO_NETDEV: ::c_int = 5;
|
||||
pub const NFPROTO_BRIDGE: ::c_int = 7;
|
||||
pub const NFPROTO_IPV6: ::c_int = 10;
|
||||
pub const NFPROTO_DECNET: ::c_int = 12;
|
||||
pub const NFPROTO_NUMPROTO: ::c_int = 13;
|
||||
|
||||
// linux/netfilter_ipv4.h
|
||||
pub const NF_IP_PRE_ROUTING: ::c_int = 0;
|
||||
pub const NF_IP_LOCAL_IN: ::c_int = 1;
|
||||
pub const NF_IP_FORWARD: ::c_int = 2;
|
||||
pub const NF_IP_LOCAL_OUT: ::c_int = 3;
|
||||
pub const NF_IP_POST_ROUTING: ::c_int = 4;
|
||||
pub const NF_IP_NUMHOOKS: ::c_int = 5;
|
||||
|
||||
pub const NF_IP_PRI_FIRST: ::c_int = ::INT_MIN;
|
||||
pub const NF_IP_PRI_CONNTRACK_DEFRAG: ::c_int = -400;
|
||||
pub const NF_IP_PRI_RAW: ::c_int = -300;
|
||||
pub const NF_IP_PRI_SELINUX_FIRST: ::c_int = -225;
|
||||
pub const NF_IP_PRI_CONNTRACK: ::c_int = -200;
|
||||
pub const NF_IP_PRI_MANGLE: ::c_int = -150;
|
||||
pub const NF_IP_PRI_NAT_DST: ::c_int = -100;
|
||||
pub const NF_IP_PRI_FILTER: ::c_int = 0;
|
||||
pub const NF_IP_PRI_SECURITY: ::c_int = 50;
|
||||
pub const NF_IP_PRI_NAT_SRC: ::c_int = 100;
|
||||
pub const NF_IP_PRI_SELINUX_LAST: ::c_int = 225;
|
||||
pub const NF_IP_PRI_CONNTRACK_HELPER: ::c_int = 300;
|
||||
pub const NF_IP_PRI_CONNTRACK_CONFIRM: ::c_int = ::INT_MAX;
|
||||
pub const NF_IP_PRI_LAST: ::c_int = ::INT_MAX;
|
||||
|
||||
// linux/netfilter_ipv6.h
|
||||
pub const NF_IP6_PRE_ROUTING: ::c_int = 0;
|
||||
pub const NF_IP6_LOCAL_IN: ::c_int = 1;
|
||||
pub const NF_IP6_FORWARD: ::c_int = 2;
|
||||
pub const NF_IP6_LOCAL_OUT: ::c_int = 3;
|
||||
pub const NF_IP6_POST_ROUTING: ::c_int = 4;
|
||||
pub const NF_IP6_NUMHOOKS: ::c_int = 5;
|
||||
|
||||
pub const NF_IP6_PRI_FIRST: ::c_int = ::INT_MIN;
|
||||
pub const NF_IP6_PRI_CONNTRACK_DEFRAG: ::c_int = -400;
|
||||
pub const NF_IP6_PRI_RAW: ::c_int = -300;
|
||||
pub const NF_IP6_PRI_SELINUX_FIRST: ::c_int = -225;
|
||||
pub const NF_IP6_PRI_CONNTRACK: ::c_int = -200;
|
||||
pub const NF_IP6_PRI_MANGLE: ::c_int = -150;
|
||||
pub const NF_IP6_PRI_NAT_DST: ::c_int = -100;
|
||||
pub const NF_IP6_PRI_FILTER: ::c_int = 0;
|
||||
pub const NF_IP6_PRI_SECURITY: ::c_int = 50;
|
||||
pub const NF_IP6_PRI_NAT_SRC: ::c_int = 100;
|
||||
pub const NF_IP6_PRI_SELINUX_LAST: ::c_int = 225;
|
||||
pub const NF_IP6_PRI_CONNTRACK_HELPER: ::c_int = 300;
|
||||
pub const NF_IP6_PRI_LAST: ::c_int = ::INT_MAX;
|
||||
|
||||
// linux/netfilter/nf_tables.h
|
||||
pub const NFT_TABLE_MAXNAMELEN: ::c_int = 32;
|
||||
pub const NFT_CHAIN_MAXNAMELEN: ::c_int = 32;
|
||||
pub const NFT_SET_MAXNAMELEN: ::c_int = 32;
|
||||
pub const NFT_OBJ_MAXNAMELEN: ::c_int = 32;
|
||||
pub const NFT_USERDATA_MAXLEN: ::c_int = 256;
|
||||
|
||||
pub const NFT_REG_VERDICT: ::c_int = 0;
|
||||
pub const NFT_REG_1: ::c_int = 1;
|
||||
pub const NFT_REG_2: ::c_int = 2;
|
||||
pub const NFT_REG_3: ::c_int = 3;
|
||||
pub const NFT_REG_4: ::c_int = 4;
|
||||
pub const __NFT_REG_MAX: ::c_int = 5;
|
||||
pub const NFT_REG32_00: ::c_int = 8;
|
||||
pub const NFT_REG32_01: ::c_int = 9;
|
||||
pub const NFT_REG32_02: ::c_int = 10;
|
||||
pub const NFT_REG32_03: ::c_int = 11;
|
||||
pub const NFT_REG32_04: ::c_int = 12;
|
||||
pub const NFT_REG32_05: ::c_int = 13;
|
||||
pub const NFT_REG32_06: ::c_int = 14;
|
||||
pub const NFT_REG32_07: ::c_int = 15;
|
||||
pub const NFT_REG32_08: ::c_int = 16;
|
||||
pub const NFT_REG32_09: ::c_int = 17;
|
||||
pub const NFT_REG32_10: ::c_int = 18;
|
||||
pub const NFT_REG32_11: ::c_int = 19;
|
||||
pub const NFT_REG32_12: ::c_int = 20;
|
||||
pub const NFT_REG32_13: ::c_int = 21;
|
||||
pub const NFT_REG32_14: ::c_int = 22;
|
||||
pub const NFT_REG32_15: ::c_int = 23;
|
||||
|
||||
pub const NFT_REG_SIZE: ::c_int = 16;
|
||||
pub const NFT_REG32_SIZE: ::c_int = 4;
|
||||
|
||||
pub const NFT_CONTINUE: ::c_int = -1;
|
||||
pub const NFT_BREAK: ::c_int = -2;
|
||||
pub const NFT_JUMP: ::c_int = -3;
|
||||
pub const NFT_GOTO: ::c_int = -4;
|
||||
pub const NFT_RETURN: ::c_int = -5;
|
||||
|
||||
pub const NFT_MSG_NEWTABLE: ::c_int = 0;
|
||||
pub const NFT_MSG_GETTABLE: ::c_int = 1;
|
||||
pub const NFT_MSG_DELTABLE: ::c_int = 2;
|
||||
pub const NFT_MSG_NEWCHAIN: ::c_int = 3;
|
||||
pub const NFT_MSG_GETCHAIN: ::c_int = 4;
|
||||
pub const NFT_MSG_DELCHAIN: ::c_int = 5;
|
||||
pub const NFT_MSG_NEWRULE: ::c_int = 6;
|
||||
pub const NFT_MSG_GETRULE: ::c_int = 7;
|
||||
pub const NFT_MSG_DELRULE: ::c_int = 8;
|
||||
pub const NFT_MSG_NEWSET: ::c_int = 9;
|
||||
pub const NFT_MSG_GETSET: ::c_int = 10;
|
||||
pub const NFT_MSG_DELSET: ::c_int = 11;
|
||||
pub const NFT_MSG_NEWSETELEM: ::c_int = 12;
|
||||
pub const NFT_MSG_GETSETELEM: ::c_int = 13;
|
||||
pub const NFT_MSG_DELSETELEM: ::c_int = 14;
|
||||
pub const NFT_MSG_NEWGEN: ::c_int = 15;
|
||||
pub const NFT_MSG_GETGEN: ::c_int = 16;
|
||||
pub const NFT_MSG_TRACE: ::c_int = 17;
|
||||
pub const NFT_MSG_NEWOBJ: ::c_int = 18;
|
||||
pub const NFT_MSG_GETOBJ: ::c_int = 19;
|
||||
pub const NFT_MSG_DELOBJ: ::c_int = 20;
|
||||
pub const NFT_MSG_GETOBJ_RESET: ::c_int = 21;
|
||||
pub const NFT_MSG_MAX: ::c_int = 22;
|
||||
|
||||
pub const NFT_SET_ANONYMOUS: ::c_int = 0x1;
|
||||
pub const NFT_SET_CONSTANT: ::c_int = 0x2;
|
||||
pub const NFT_SET_INTERVAL: ::c_int = 0x4;
|
||||
pub const NFT_SET_MAP: ::c_int = 0x8;
|
||||
pub const NFT_SET_TIMEOUT: ::c_int = 0x10;
|
||||
pub const NFT_SET_EVAL: ::c_int = 0x20;
|
||||
|
||||
pub const NFT_SET_POL_PERFORMANCE: ::c_int = 0;
|
||||
pub const NFT_SET_POL_MEMORY: ::c_int = 1;
|
||||
|
||||
pub const NFT_SET_ELEM_INTERVAL_END: ::c_int = 0x1;
|
||||
|
||||
pub const NFT_DATA_VALUE: ::c_uint = 0;
|
||||
pub const NFT_DATA_VERDICT: ::c_uint = 0xffffff00;
|
||||
|
||||
pub const NFT_DATA_RESERVED_MASK: ::c_uint = 0xffffff00;
|
||||
|
||||
pub const NFT_DATA_VALUE_MAXLEN: ::c_int = 64;
|
||||
|
||||
pub const NFT_BYTEORDER_NTOH: ::c_int = 0;
|
||||
pub const NFT_BYTEORDER_HTON: ::c_int = 1;
|
||||
|
||||
pub const NFT_CMP_EQ: ::c_int = 0;
|
||||
pub const NFT_CMP_NEQ: ::c_int = 1;
|
||||
pub const NFT_CMP_LT: ::c_int = 2;
|
||||
pub const NFT_CMP_LTE: ::c_int = 3;
|
||||
pub const NFT_CMP_GT: ::c_int = 4;
|
||||
pub const NFT_CMP_GTE: ::c_int = 5;
|
||||
|
||||
pub const NFT_RANGE_EQ: ::c_int = 0;
|
||||
pub const NFT_RANGE_NEQ: ::c_int = 1;
|
||||
|
||||
pub const NFT_LOOKUP_F_INV: ::c_int = (1 << 0);
|
||||
|
||||
pub const NFT_DYNSET_OP_ADD: ::c_int = 0;
|
||||
pub const NFT_DYNSET_OP_UPDATE: ::c_int = 1;
|
||||
|
||||
pub const NFT_DYNSET_F_INV: ::c_int = (1 << 0);
|
||||
|
||||
pub const NFT_PAYLOAD_LL_HEADER: ::c_int = 0;
|
||||
pub const NFT_PAYLOAD_NETWORK_HEADER: ::c_int = 1;
|
||||
pub const NFT_PAYLOAD_TRANSPORT_HEADER: ::c_int = 2;
|
||||
|
||||
pub const NFT_PAYLOAD_CSUM_NONE: ::c_int = 0;
|
||||
pub const NFT_PAYLOAD_CSUM_INET: ::c_int = 1;
|
||||
|
||||
pub const NFT_META_LEN: ::c_int = 0;
|
||||
pub const NFT_META_PROTOCOL: ::c_int = 1;
|
||||
pub const NFT_META_PRIORITY: ::c_int = 2;
|
||||
pub const NFT_META_MARK: ::c_int = 3;
|
||||
pub const NFT_META_IIF: ::c_int = 4;
|
||||
pub const NFT_META_OIF: ::c_int = 5;
|
||||
pub const NFT_META_IIFNAME: ::c_int = 6;
|
||||
pub const NFT_META_OIFNAME: ::c_int = 7;
|
||||
pub const NFT_META_IIFTYPE: ::c_int = 8;
|
||||
pub const NFT_META_OIFTYPE: ::c_int = 9;
|
||||
pub const NFT_META_SKUID: ::c_int = 10;
|
||||
pub const NFT_META_SKGID: ::c_int = 11;
|
||||
pub const NFT_META_NFTRACE: ::c_int = 12;
|
||||
pub const NFT_META_RTCLASSID: ::c_int = 13;
|
||||
pub const NFT_META_SECMARK: ::c_int = 14;
|
||||
pub const NFT_META_NFPROTO: ::c_int = 15;
|
||||
pub const NFT_META_L4PROTO: ::c_int = 16;
|
||||
pub const NFT_META_BRI_IIFNAME: ::c_int = 17;
|
||||
pub const NFT_META_BRI_OIFNAME: ::c_int = 18;
|
||||
pub const NFT_META_PKTTYPE: ::c_int = 19;
|
||||
pub const NFT_META_CPU: ::c_int = 20;
|
||||
pub const NFT_META_IIFGROUP: ::c_int = 21;
|
||||
pub const NFT_META_OIFGROUP: ::c_int = 22;
|
||||
pub const NFT_META_CGROUP: ::c_int = 23;
|
||||
pub const NFT_META_PRANDOM: ::c_int = 24;
|
||||
|
||||
pub const NFT_CT_STATE: ::c_int = 0;
|
||||
pub const NFT_CT_DIRECTION: ::c_int = 1;
|
||||
pub const NFT_CT_STATUS: ::c_int = 2;
|
||||
pub const NFT_CT_MARK: ::c_int = 3;
|
||||
pub const NFT_CT_SECMARK: ::c_int = 4;
|
||||
pub const NFT_CT_EXPIRATION: ::c_int = 5;
|
||||
pub const NFT_CT_HELPER: ::c_int = 6;
|
||||
pub const NFT_CT_L3PROTOCOL: ::c_int = 7;
|
||||
pub const NFT_CT_SRC: ::c_int = 8;
|
||||
pub const NFT_CT_DST: ::c_int = 9;
|
||||
pub const NFT_CT_PROTOCOL: ::c_int = 10;
|
||||
pub const NFT_CT_PROTO_SRC: ::c_int = 11;
|
||||
pub const NFT_CT_PROTO_DST: ::c_int = 12;
|
||||
pub const NFT_CT_LABELS: ::c_int = 13;
|
||||
pub const NFT_CT_PKTS: ::c_int = 14;
|
||||
pub const NFT_CT_BYTES: ::c_int = 15;
|
||||
|
||||
pub const NFT_LIMIT_PKTS: ::c_int = 0;
|
||||
pub const NFT_LIMIT_PKT_BYTES: ::c_int = 1;
|
||||
|
||||
pub const NFT_LIMIT_F_INV: ::c_int = (1 << 0);
|
||||
|
||||
pub const NFT_QUEUE_FLAG_BYPASS: ::c_int = 0x01;
|
||||
pub const NFT_QUEUE_FLAG_CPU_FANOUT: ::c_int = 0x02;
|
||||
pub const NFT_QUEUE_FLAG_MASK: ::c_int = 0x03;
|
||||
|
||||
pub const NFT_QUOTA_F_INV: ::c_int = (1 << 0);
|
||||
|
||||
pub const NFT_REJECT_ICMP_UNREACH: ::c_int = 0;
|
||||
pub const NFT_REJECT_TCP_RST: ::c_int = 1;
|
||||
pub const NFT_REJECT_ICMPX_UNREACH: ::c_int = 2;
|
||||
|
||||
pub const NFT_REJECT_ICMPX_NO_ROUTE: ::c_int = 0;
|
||||
pub const NFT_REJECT_ICMPX_PORT_UNREACH: ::c_int = 1;
|
||||
pub const NFT_REJECT_ICMPX_HOST_UNREACH: ::c_int = 2;
|
||||
pub const NFT_REJECT_ICMPX_ADMIN_PROHIBITED: ::c_int = 3;
|
||||
|
||||
pub const NFT_NAT_SNAT: ::c_int = 0;
|
||||
pub const NFT_NAT_DNAT: ::c_int = 1;
|
||||
|
||||
pub const NFT_TRACETYPE_UNSPEC: ::c_int = 0;
|
||||
pub const NFT_TRACETYPE_POLICY: ::c_int = 1;
|
||||
pub const NFT_TRACETYPE_RETURN: ::c_int = 2;
|
||||
pub const NFT_TRACETYPE_RULE: ::c_int = 3;
|
||||
|
||||
pub const NFT_NG_INCREMENTAL: ::c_int = 0;
|
||||
pub const NFT_NG_RANDOM: ::c_int = 1;
|
||||
|
||||
pub const IFF_TUN: ::c_int = 0x0001;
|
||||
pub const IFF_TAP: ::c_int = 0x0002;
|
||||
pub const IFF_NO_PI: ::c_int = 0x1000;
|
||||
|
||||
// start android/platform/bionic/libc/kernel/uapi/linux/if_ether.h
|
||||
// from https://android.googlesource.com/
|
||||
// platform/bionic/+/master/libc/kernel/uapi/linux/if_ether.h
|
||||
pub const ETH_ALEN: ::c_int = 6;
|
||||
pub const ETH_HLEN: ::c_int = 14;
|
||||
pub const ETH_ZLEN: ::c_int = 60;
|
||||
pub const ETH_DATA_LEN: ::c_int = 1500;
|
||||
pub const ETH_FRAME_LEN: ::c_int = 1514;
|
||||
pub const ETH_FCS_LEN: ::c_int = 4;
|
||||
pub const ETH_MIN_MTU: ::c_int = 68;
|
||||
pub const ETH_MAX_MTU: ::c_int = 0xFFFF;
|
||||
pub const ETH_P_LOOP: ::c_int = 0x0060;
|
||||
pub const ETH_P_PUP: ::c_int = 0x0200;
|
||||
pub const ETH_P_PUPAT: ::c_int = 0x0201;
|
||||
pub const ETH_P_TSN: ::c_int = 0x22F0;
|
||||
pub const ETH_P_IP: ::c_int = 0x0800;
|
||||
pub const ETH_P_X25: ::c_int = 0x0805;
|
||||
pub const ETH_P_ARP: ::c_int = 0x0806;
|
||||
pub const ETH_P_BPQ: ::c_int = 0x08FF;
|
||||
pub const ETH_P_IEEEPUP: ::c_int = 0x0a00;
|
||||
pub const ETH_P_IEEEPUPAT: ::c_int = 0x0a01;
|
||||
pub const ETH_P_BATMAN: ::c_int = 0x4305;
|
||||
pub const ETH_P_DEC: ::c_int = 0x6000;
|
||||
pub const ETH_P_DNA_DL: ::c_int = 0x6001;
|
||||
pub const ETH_P_DNA_RC: ::c_int = 0x6002;
|
||||
pub const ETH_P_DNA_RT: ::c_int = 0x6003;
|
||||
pub const ETH_P_LAT: ::c_int = 0x6004;
|
||||
pub const ETH_P_DIAG: ::c_int = 0x6005;
|
||||
pub const ETH_P_CUST: ::c_int = 0x6006;
|
||||
pub const ETH_P_SCA: ::c_int = 0x6007;
|
||||
pub const ETH_P_TEB: ::c_int = 0x6558;
|
||||
pub const ETH_P_RARP: ::c_int = 0x8035;
|
||||
pub const ETH_P_ATALK: ::c_int = 0x809B;
|
||||
pub const ETH_P_AARP: ::c_int = 0x80F3;
|
||||
pub const ETH_P_8021Q: ::c_int = 0x8100;
|
||||
/* see rust-lang/libc#924 pub const ETH_P_ERSPAN: ::c_int = 0x88BE;*/
|
||||
pub const ETH_P_IPX: ::c_int = 0x8137;
|
||||
pub const ETH_P_IPV6: ::c_int = 0x86DD;
|
||||
pub const ETH_P_PAUSE: ::c_int = 0x8808;
|
||||
pub const ETH_P_SLOW: ::c_int = 0x8809;
|
||||
pub const ETH_P_WCCP: ::c_int = 0x883E;
|
||||
pub const ETH_P_MPLS_UC: ::c_int = 0x8847;
|
||||
pub const ETH_P_MPLS_MC: ::c_int = 0x8848;
|
||||
pub const ETH_P_ATMMPOA: ::c_int = 0x884c;
|
||||
pub const ETH_P_PPP_DISC: ::c_int = 0x8863;
|
||||
pub const ETH_P_PPP_SES: ::c_int = 0x8864;
|
||||
pub const ETH_P_LINK_CTL: ::c_int = 0x886c;
|
||||
pub const ETH_P_ATMFATE: ::c_int = 0x8884;
|
||||
pub const ETH_P_PAE: ::c_int = 0x888E;
|
||||
pub const ETH_P_AOE: ::c_int = 0x88A2;
|
||||
pub const ETH_P_8021AD: ::c_int = 0x88A8;
|
||||
pub const ETH_P_802_EX1: ::c_int = 0x88B5;
|
||||
pub const ETH_P_TIPC: ::c_int = 0x88CA;
|
||||
pub const ETH_P_MACSEC: ::c_int = 0x88E5;
|
||||
pub const ETH_P_8021AH: ::c_int = 0x88E7;
|
||||
pub const ETH_P_MVRP: ::c_int = 0x88F5;
|
||||
pub const ETH_P_1588: ::c_int = 0x88F7;
|
||||
pub const ETH_P_NCSI: ::c_int = 0x88F8;
|
||||
pub const ETH_P_PRP: ::c_int = 0x88FB;
|
||||
pub const ETH_P_FCOE: ::c_int = 0x8906;
|
||||
/* see rust-lang/libc#924 pub const ETH_P_IBOE: ::c_int = 0x8915;*/
|
||||
pub const ETH_P_TDLS: ::c_int = 0x890D;
|
||||
pub const ETH_P_FIP: ::c_int = 0x8914;
|
||||
pub const ETH_P_80221: ::c_int = 0x8917;
|
||||
pub const ETH_P_HSR: ::c_int = 0x892F;
|
||||
/* see rust-lang/libc#924 pub const ETH_P_NSH: ::c_int = 0x894F;*/
|
||||
pub const ETH_P_LOOPBACK: ::c_int = 0x9000;
|
||||
pub const ETH_P_QINQ1: ::c_int = 0x9100;
|
||||
pub const ETH_P_QINQ2: ::c_int = 0x9200;
|
||||
pub const ETH_P_QINQ3: ::c_int = 0x9300;
|
||||
pub const ETH_P_EDSA: ::c_int = 0xDADA;
|
||||
/* see rust-lang/libc#924 pub const ETH_P_IFE: ::c_int = 0xED3E;*/
|
||||
pub const ETH_P_AF_IUCV: ::c_int = 0xFBFB;
|
||||
pub const ETH_P_802_3_MIN: ::c_int = 0x0600;
|
||||
pub const ETH_P_802_3: ::c_int = 0x0001;
|
||||
pub const ETH_P_AX25: ::c_int = 0x0002;
|
||||
pub const ETH_P_ALL: ::c_int = 0x0003;
|
||||
pub const ETH_P_802_2: ::c_int = 0x0004;
|
||||
pub const ETH_P_SNAP: ::c_int = 0x0005;
|
||||
pub const ETH_P_DDCMP: ::c_int = 0x0006;
|
||||
pub const ETH_P_WAN_PPP: ::c_int = 0x0007;
|
||||
pub const ETH_P_PPP_MP: ::c_int = 0x0008;
|
||||
pub const ETH_P_LOCALTALK: ::c_int = 0x0009;
|
||||
pub const ETH_P_CAN: ::c_int = 0x000C;
|
||||
pub const ETH_P_CANFD: ::c_int = 0x000D;
|
||||
pub const ETH_P_PPPTALK: ::c_int = 0x0010;
|
||||
pub const ETH_P_TR_802_2: ::c_int = 0x0011;
|
||||
pub const ETH_P_MOBITEX: ::c_int = 0x0015;
|
||||
pub const ETH_P_CONTROL: ::c_int = 0x0016;
|
||||
pub const ETH_P_IRDA: ::c_int = 0x0017;
|
||||
pub const ETH_P_ECONET: ::c_int = 0x0018;
|
||||
pub const ETH_P_HDLC: ::c_int = 0x0019;
|
||||
pub const ETH_P_ARCNET: ::c_int = 0x001A;
|
||||
pub const ETH_P_DSA: ::c_int = 0x001B;
|
||||
pub const ETH_P_TRAILER: ::c_int = 0x001C;
|
||||
pub const ETH_P_PHONET: ::c_int = 0x00F5;
|
||||
pub const ETH_P_IEEE802154: ::c_int = 0x00F6;
|
||||
pub const ETH_P_CAIF: ::c_int = 0x00F7;
|
||||
pub const ETH_P_XDSA: ::c_int = 0x00F8;
|
||||
/* see rust-lang/libc#924 pub const ETH_P_MAP: ::c_int = 0x00F9;*/
|
||||
// end android/platform/bionic/libc/kernel/uapi/linux/if_ether.h
|
||||
|
||||
f! {
|
||||
pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
|
||||
for slot in cpuset.__bits.iter_mut() {
|
||||
|
@ -923,6 +1413,10 @@ f! {
|
|||
let mi = mi as ::dev_t;
|
||||
((ma & 0xfff) << 8) | (mi & 0xff) | ((mi & 0xfff00) << 12)
|
||||
}
|
||||
|
||||
pub fn NLA_ALIGN(len: ::c_int) -> ::c_int {
|
||||
return ((len) + NLA_ALIGNTO - 1) & !(NLA_ALIGNTO - 1)
|
||||
}
|
||||
}
|
||||
|
||||
extern {
|
||||
|
@ -1121,6 +1615,7 @@ extern {
|
|||
attr: *const ::pthread_attr_t,
|
||||
f: extern fn(*mut ::c_void) -> *mut ::c_void,
|
||||
value: *mut ::c_void) -> ::c_int;
|
||||
pub fn __errno() -> *mut ::c_int;
|
||||
}
|
||||
|
||||
cfg_if! {
|
||||
|
|
|
@ -39,6 +39,44 @@ s! {
|
|||
pub c_ispeed: ::speed_t,
|
||||
pub c_ospeed: ::speed_t,
|
||||
}
|
||||
|
||||
pub struct nlmsghdr {
|
||||
nlmsg_len: u32,
|
||||
nlmsg_type: u16,
|
||||
nlmsg_flags: u16,
|
||||
nlmsg_seq: u32,
|
||||
nlmsg_pid: u32,
|
||||
}
|
||||
|
||||
pub struct nlmsgerr {
|
||||
error: ::c_int,
|
||||
msg: nlmsghdr,
|
||||
}
|
||||
|
||||
pub struct nl_pktinfo {
|
||||
group: u32,
|
||||
}
|
||||
|
||||
pub struct nl_mmap_req {
|
||||
nm_block_size: ::c_uint,
|
||||
nm_block_nr: ::c_uint,
|
||||
nm_frame_size: ::c_uint,
|
||||
nm_frame_nr: ::c_uint,
|
||||
}
|
||||
|
||||
pub struct nl_mmap_hdr {
|
||||
nm_status: ::c_uint,
|
||||
nm_len: ::c_uint,
|
||||
nm_group: u32,
|
||||
nm_pid: u32,
|
||||
nm_uid: u32,
|
||||
nm_gid: u32,
|
||||
}
|
||||
|
||||
pub struct nlattr {
|
||||
nla_len: u16,
|
||||
nla_type: u16,
|
||||
}
|
||||
}
|
||||
|
||||
pub const SFD_CLOEXEC: ::c_int = 0x080000;
|
||||
|
@ -50,6 +88,7 @@ pub const O_TRUNC: ::c_int = 512;
|
|||
pub const O_NOATIME: ::c_int = 0o1000000;
|
||||
pub const O_CLOEXEC: ::c_int = 0x80000;
|
||||
pub const O_PATH: ::c_int = 0o10000000;
|
||||
pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY;
|
||||
|
||||
pub const EBFONT: ::c_int = 59;
|
||||
pub const ENOSTR: ::c_int = 60;
|
||||
|
@ -661,11 +700,212 @@ pub const EHWPOISON: ::c_int = 168;
|
|||
pub const SIGEV_THREAD_ID: ::c_int = 4;
|
||||
pub const EPOLLWAKEUP: ::c_int = 0x20000000;
|
||||
|
||||
pub const NF_NETDEV_INGRESS: ::c_int = 0;
|
||||
pub const NF_NETDEV_NUMHOOKS: ::c_int = 1;
|
||||
|
||||
pub const NFPROTO_INET: ::c_int = 1;
|
||||
pub const NFPROTO_NETDEV: ::c_int = 5;
|
||||
|
||||
pub const NLA_ALIGNTO: ::c_int = 4;
|
||||
|
||||
pub const GENL_UNS_ADMIN_PERM: ::c_int = 0x10;
|
||||
|
||||
pub const GENL_ID_VFS_DQUOT: ::c_int = ::NLMSG_MIN_TYPE + 1;
|
||||
pub const GENL_ID_PMCRAID: ::c_int = ::NLMSG_MIN_TYPE + 2;
|
||||
|
||||
pub const NFT_TABLE_MAXNAMELEN: ::c_int = 32;
|
||||
pub const NFT_CHAIN_MAXNAMELEN: ::c_int = 32;
|
||||
pub const NFT_SET_MAXNAMELEN: ::c_int = 32;
|
||||
pub const NFT_OBJ_MAXNAMELEN: ::c_int = 32;
|
||||
pub const NFT_USERDATA_MAXLEN: ::c_int = 256;
|
||||
|
||||
pub const NFT_REG_VERDICT: ::c_int = 0;
|
||||
pub const NFT_REG_1: ::c_int = 1;
|
||||
pub const NFT_REG_2: ::c_int = 2;
|
||||
pub const NFT_REG_3: ::c_int = 3;
|
||||
pub const NFT_REG_4: ::c_int = 4;
|
||||
pub const __NFT_REG_MAX: ::c_int = 5;
|
||||
pub const NFT_REG32_00: ::c_int = 8;
|
||||
pub const NFT_REG32_01: ::c_int = 9;
|
||||
pub const NFT_REG32_02: ::c_int = 10;
|
||||
pub const NFT_REG32_03: ::c_int = 11;
|
||||
pub const NFT_REG32_04: ::c_int = 12;
|
||||
pub const NFT_REG32_05: ::c_int = 13;
|
||||
pub const NFT_REG32_06: ::c_int = 14;
|
||||
pub const NFT_REG32_07: ::c_int = 15;
|
||||
pub const NFT_REG32_08: ::c_int = 16;
|
||||
pub const NFT_REG32_09: ::c_int = 17;
|
||||
pub const NFT_REG32_10: ::c_int = 18;
|
||||
pub const NFT_REG32_11: ::c_int = 19;
|
||||
pub const NFT_REG32_12: ::c_int = 20;
|
||||
pub const NFT_REG32_13: ::c_int = 21;
|
||||
pub const NFT_REG32_14: ::c_int = 22;
|
||||
pub const NFT_REG32_15: ::c_int = 23;
|
||||
|
||||
pub const NFT_REG_SIZE: ::c_int = 16;
|
||||
pub const NFT_REG32_SIZE: ::c_int = 4;
|
||||
|
||||
pub const NFT_CONTINUE: ::c_int = -1;
|
||||
pub const NFT_BREAK: ::c_int = -2;
|
||||
pub const NFT_JUMP: ::c_int = -3;
|
||||
pub const NFT_GOTO: ::c_int = -4;
|
||||
pub const NFT_RETURN: ::c_int = -5;
|
||||
|
||||
pub const NFT_MSG_NEWTABLE: ::c_int = 0;
|
||||
pub const NFT_MSG_GETTABLE: ::c_int = 1;
|
||||
pub const NFT_MSG_DELTABLE: ::c_int = 2;
|
||||
pub const NFT_MSG_NEWCHAIN: ::c_int = 3;
|
||||
pub const NFT_MSG_GETCHAIN: ::c_int = 4;
|
||||
pub const NFT_MSG_DELCHAIN: ::c_int = 5;
|
||||
pub const NFT_MSG_NEWRULE: ::c_int = 6;
|
||||
pub const NFT_MSG_GETRULE: ::c_int = 7;
|
||||
pub const NFT_MSG_DELRULE: ::c_int = 8;
|
||||
pub const NFT_MSG_NEWSET: ::c_int = 9;
|
||||
pub const NFT_MSG_GETSET: ::c_int = 10;
|
||||
pub const NFT_MSG_DELSET: ::c_int = 11;
|
||||
pub const NFT_MSG_NEWSETELEM: ::c_int = 12;
|
||||
pub const NFT_MSG_GETSETELEM: ::c_int = 13;
|
||||
pub const NFT_MSG_DELSETELEM: ::c_int = 14;
|
||||
pub const NFT_MSG_NEWGEN: ::c_int = 15;
|
||||
pub const NFT_MSG_GETGEN: ::c_int = 16;
|
||||
pub const NFT_MSG_TRACE: ::c_int = 17;
|
||||
pub const NFT_MSG_NEWOBJ: ::c_int = 18;
|
||||
pub const NFT_MSG_GETOBJ: ::c_int = 19;
|
||||
pub const NFT_MSG_DELOBJ: ::c_int = 20;
|
||||
pub const NFT_MSG_GETOBJ_RESET: ::c_int = 21;
|
||||
pub const NFT_MSG_MAX: ::c_int = 22;
|
||||
|
||||
pub const NFT_SET_ANONYMOUS: ::c_int = 0x1;
|
||||
pub const NFT_SET_CONSTANT: ::c_int = 0x2;
|
||||
pub const NFT_SET_INTERVAL: ::c_int = 0x4;
|
||||
pub const NFT_SET_MAP: ::c_int = 0x8;
|
||||
pub const NFT_SET_TIMEOUT: ::c_int = 0x10;
|
||||
pub const NFT_SET_EVAL: ::c_int = 0x20;
|
||||
|
||||
pub const NFT_SET_POL_PERFORMANCE: ::c_int = 0;
|
||||
pub const NFT_SET_POL_MEMORY: ::c_int = 1;
|
||||
|
||||
pub const NFT_SET_ELEM_INTERVAL_END: ::c_int = 0x1;
|
||||
|
||||
pub const NFT_DATA_VALUE: ::c_uint = 0;
|
||||
pub const NFT_DATA_VERDICT: ::c_uint = 0xffffff00;
|
||||
|
||||
pub const NFT_DATA_RESERVED_MASK: ::c_uint = 0xffffff00;
|
||||
|
||||
pub const NFT_DATA_VALUE_MAXLEN: ::c_int = 64;
|
||||
|
||||
pub const NFT_BYTEORDER_NTOH: ::c_int = 0;
|
||||
pub const NFT_BYTEORDER_HTON: ::c_int = 1;
|
||||
|
||||
pub const NFT_CMP_EQ: ::c_int = 0;
|
||||
pub const NFT_CMP_NEQ: ::c_int = 1;
|
||||
pub const NFT_CMP_LT: ::c_int = 2;
|
||||
pub const NFT_CMP_LTE: ::c_int = 3;
|
||||
pub const NFT_CMP_GT: ::c_int = 4;
|
||||
pub const NFT_CMP_GTE: ::c_int = 5;
|
||||
|
||||
pub const NFT_RANGE_EQ: ::c_int = 0;
|
||||
pub const NFT_RANGE_NEQ: ::c_int = 1;
|
||||
|
||||
pub const NFT_LOOKUP_F_INV: ::c_int = (1 << 0);
|
||||
|
||||
pub const NFT_DYNSET_OP_ADD: ::c_int = 0;
|
||||
pub const NFT_DYNSET_OP_UPDATE: ::c_int = 1;
|
||||
|
||||
pub const NFT_DYNSET_F_INV: ::c_int = (1 << 0);
|
||||
|
||||
pub const NFT_PAYLOAD_LL_HEADER: ::c_int = 0;
|
||||
pub const NFT_PAYLOAD_NETWORK_HEADER: ::c_int = 1;
|
||||
pub const NFT_PAYLOAD_TRANSPORT_HEADER: ::c_int = 2;
|
||||
|
||||
pub const NFT_PAYLOAD_CSUM_NONE: ::c_int = 0;
|
||||
pub const NFT_PAYLOAD_CSUM_INET: ::c_int = 1;
|
||||
|
||||
pub const NFT_META_LEN: ::c_int = 0;
|
||||
pub const NFT_META_PROTOCOL: ::c_int = 1;
|
||||
pub const NFT_META_PRIORITY: ::c_int = 2;
|
||||
pub const NFT_META_MARK: ::c_int = 3;
|
||||
pub const NFT_META_IIF: ::c_int = 4;
|
||||
pub const NFT_META_OIF: ::c_int = 5;
|
||||
pub const NFT_META_IIFNAME: ::c_int = 6;
|
||||
pub const NFT_META_OIFNAME: ::c_int = 7;
|
||||
pub const NFT_META_IIFTYPE: ::c_int = 8;
|
||||
pub const NFT_META_OIFTYPE: ::c_int = 9;
|
||||
pub const NFT_META_SKUID: ::c_int = 10;
|
||||
pub const NFT_META_SKGID: ::c_int = 11;
|
||||
pub const NFT_META_NFTRACE: ::c_int = 12;
|
||||
pub const NFT_META_RTCLASSID: ::c_int = 13;
|
||||
pub const NFT_META_SECMARK: ::c_int = 14;
|
||||
pub const NFT_META_NFPROTO: ::c_int = 15;
|
||||
pub const NFT_META_L4PROTO: ::c_int = 16;
|
||||
pub const NFT_META_BRI_IIFNAME: ::c_int = 17;
|
||||
pub const NFT_META_BRI_OIFNAME: ::c_int = 18;
|
||||
pub const NFT_META_PKTTYPE: ::c_int = 19;
|
||||
pub const NFT_META_CPU: ::c_int = 20;
|
||||
pub const NFT_META_IIFGROUP: ::c_int = 21;
|
||||
pub const NFT_META_OIFGROUP: ::c_int = 22;
|
||||
pub const NFT_META_CGROUP: ::c_int = 23;
|
||||
pub const NFT_META_PRANDOM: ::c_int = 24;
|
||||
|
||||
pub const NFT_CT_STATE: ::c_int = 0;
|
||||
pub const NFT_CT_DIRECTION: ::c_int = 1;
|
||||
pub const NFT_CT_STATUS: ::c_int = 2;
|
||||
pub const NFT_CT_MARK: ::c_int = 3;
|
||||
pub const NFT_CT_SECMARK: ::c_int = 4;
|
||||
pub const NFT_CT_EXPIRATION: ::c_int = 5;
|
||||
pub const NFT_CT_HELPER: ::c_int = 6;
|
||||
pub const NFT_CT_L3PROTOCOL: ::c_int = 7;
|
||||
pub const NFT_CT_SRC: ::c_int = 8;
|
||||
pub const NFT_CT_DST: ::c_int = 9;
|
||||
pub const NFT_CT_PROTOCOL: ::c_int = 10;
|
||||
pub const NFT_CT_PROTO_SRC: ::c_int = 11;
|
||||
pub const NFT_CT_PROTO_DST: ::c_int = 12;
|
||||
pub const NFT_CT_LABELS: ::c_int = 13;
|
||||
pub const NFT_CT_PKTS: ::c_int = 14;
|
||||
pub const NFT_CT_BYTES: ::c_int = 15;
|
||||
|
||||
pub const NFT_LIMIT_PKTS: ::c_int = 0;
|
||||
pub const NFT_LIMIT_PKT_BYTES: ::c_int = 1;
|
||||
|
||||
pub const NFT_LIMIT_F_INV: ::c_int = (1 << 0);
|
||||
|
||||
pub const NFT_QUEUE_FLAG_BYPASS: ::c_int = 0x01;
|
||||
pub const NFT_QUEUE_FLAG_CPU_FANOUT: ::c_int = 0x02;
|
||||
pub const NFT_QUEUE_FLAG_MASK: ::c_int = 0x03;
|
||||
|
||||
pub const NFT_QUOTA_F_INV: ::c_int = (1 << 0);
|
||||
|
||||
pub const NFT_REJECT_ICMP_UNREACH: ::c_int = 0;
|
||||
pub const NFT_REJECT_TCP_RST: ::c_int = 1;
|
||||
pub const NFT_REJECT_ICMPX_UNREACH: ::c_int = 2;
|
||||
|
||||
pub const NFT_REJECT_ICMPX_NO_ROUTE: ::c_int = 0;
|
||||
pub const NFT_REJECT_ICMPX_PORT_UNREACH: ::c_int = 1;
|
||||
pub const NFT_REJECT_ICMPX_HOST_UNREACH: ::c_int = 2;
|
||||
pub const NFT_REJECT_ICMPX_ADMIN_PROHIBITED: ::c_int = 3;
|
||||
|
||||
pub const NFT_NAT_SNAT: ::c_int = 0;
|
||||
pub const NFT_NAT_DNAT: ::c_int = 1;
|
||||
|
||||
pub const NFT_TRACETYPE_UNSPEC: ::c_int = 0;
|
||||
pub const NFT_TRACETYPE_POLICY: ::c_int = 1;
|
||||
pub const NFT_TRACETYPE_RETURN: ::c_int = 2;
|
||||
pub const NFT_TRACETYPE_RULE: ::c_int = 3;
|
||||
|
||||
pub const NFT_NG_INCREMENTAL: ::c_int = 0;
|
||||
pub const NFT_NG_RANDOM: ::c_int = 1;
|
||||
|
||||
#[doc(hidden)]
|
||||
pub const AF_MAX: ::c_int = 42;
|
||||
#[doc(hidden)]
|
||||
pub const PF_MAX: ::c_int = AF_MAX;
|
||||
|
||||
f! {
|
||||
pub fn NLA_ALIGN(len: ::c_int) -> ::c_int {
|
||||
return ((len) + NLA_ALIGNTO - 1) & !(NLA_ALIGNTO - 1)
|
||||
}
|
||||
}
|
||||
|
||||
#[link(name = "util")]
|
||||
extern {
|
||||
pub fn sysctl(name: *mut ::c_int,
|
||||
|
|
|
@ -23,6 +23,17 @@ pub type __s16 = ::c_short;
|
|||
pub type __u32 = ::c_uint;
|
||||
pub type __s32 = ::c_int;
|
||||
|
||||
pub type Elf32_Half = u16;
|
||||
pub type Elf32_Word = u32;
|
||||
pub type Elf32_Off = u32;
|
||||
pub type Elf32_Addr = u32;
|
||||
|
||||
pub type Elf64_Half = u16;
|
||||
pub type Elf64_Word = u32;
|
||||
pub type Elf64_Off = u64;
|
||||
pub type Elf64_Addr = u64;
|
||||
pub type Elf64_Xword = u64;
|
||||
|
||||
pub enum fpos64_t {} // TODO: fill this out with a struct
|
||||
|
||||
s! {
|
||||
|
@ -391,6 +402,93 @@ s! {
|
|||
#[cfg(target_pointer_width = "32")]
|
||||
pub u: [u32; 7],
|
||||
}
|
||||
|
||||
pub struct dl_phdr_info {
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
pub dlpi_addr: Elf64_Addr,
|
||||
#[cfg(target_pointer_width = "32")]
|
||||
pub dlpi_addr: Elf32_Addr,
|
||||
|
||||
pub dlpi_name: *const ::c_char,
|
||||
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
pub dlpi_phdr: *const Elf64_Phdr,
|
||||
#[cfg(target_pointer_width = "32")]
|
||||
pub dlpi_phdr: *const Elf32_Phdr,
|
||||
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
pub dlpi_phnum: Elf64_Half,
|
||||
#[cfg(target_pointer_width = "32")]
|
||||
pub dlpi_phnum: Elf32_Half,
|
||||
|
||||
pub dlpi_adds: ::c_ulonglong,
|
||||
pub dlpi_subs: ::c_ulonglong,
|
||||
pub dlpi_tls_modid: ::size_t,
|
||||
pub dlpi_tls_data: *mut ::c_void,
|
||||
}
|
||||
|
||||
pub struct Elf32_Phdr {
|
||||
pub p_type: Elf32_Word,
|
||||
pub p_offset: Elf32_Off,
|
||||
pub p_vaddr: Elf32_Addr,
|
||||
pub p_paddr: Elf32_Addr,
|
||||
pub p_filesz: Elf32_Word,
|
||||
pub p_memsz: Elf32_Word,
|
||||
pub p_flags: Elf32_Word,
|
||||
pub p_align: Elf32_Word,
|
||||
}
|
||||
|
||||
pub struct Elf64_Phdr {
|
||||
pub p_type: Elf64_Word,
|
||||
pub p_flags: Elf64_Word,
|
||||
pub p_offset: Elf64_Off,
|
||||
pub p_vaddr: Elf64_Addr,
|
||||
pub p_paddr: Elf64_Addr,
|
||||
pub p_filesz: Elf64_Xword,
|
||||
pub p_memsz: Elf64_Xword,
|
||||
pub p_align: Elf64_Xword,
|
||||
}
|
||||
|
||||
pub struct ucred {
|
||||
pub pid: ::pid_t,
|
||||
pub uid: ::uid_t,
|
||||
pub gid: ::gid_t,
|
||||
}
|
||||
|
||||
pub struct mntent {
|
||||
pub mnt_fsname: *mut ::c_char,
|
||||
pub mnt_dir: *mut ::c_char,
|
||||
pub mnt_type: *mut ::c_char,
|
||||
pub mnt_opts: *mut ::c_char,
|
||||
pub mnt_freq: ::c_int,
|
||||
pub mnt_passno: ::c_int,
|
||||
}
|
||||
|
||||
pub struct posix_spawn_file_actions_t {
|
||||
__allocated: ::c_int,
|
||||
__used: ::c_int,
|
||||
__actions: *mut ::c_int,
|
||||
__pad: [::c_int; 16],
|
||||
}
|
||||
|
||||
pub struct posix_spawnattr_t {
|
||||
__flags: ::c_short,
|
||||
__pgrp: ::pid_t,
|
||||
__sd: ::sigset_t,
|
||||
__ss: ::sigset_t,
|
||||
#[cfg(target_env = "musl")]
|
||||
__prio: ::c_int,
|
||||
#[cfg(not(target_env = "musl"))]
|
||||
__sp: ::sched_param,
|
||||
__policy: ::c_int,
|
||||
__pad: [::c_int; 16],
|
||||
}
|
||||
|
||||
pub struct genlmsghdr {
|
||||
cmd: u8,
|
||||
version: u8,
|
||||
reserved: u16,
|
||||
}
|
||||
}
|
||||
|
||||
pub const ABDAY_1: ::nl_item = 0x20000;
|
||||
|
@ -663,6 +761,27 @@ pub const IFF_LOWER_UP: ::c_int = 0x10000;
|
|||
pub const IFF_DORMANT: ::c_int = 0x20000;
|
||||
pub const IFF_ECHO: ::c_int = 0x40000;
|
||||
|
||||
// linux/if_tun.h
|
||||
pub const IFF_TUN: ::c_short = 0x0001;
|
||||
pub const IFF_TAP: ::c_short = 0x0002;
|
||||
pub const IFF_NO_PI: ::c_short = 0x1000;
|
||||
// Read queue size
|
||||
pub const TUN_READQ_SIZE: ::c_short = 500;
|
||||
// TUN device type flags: deprecated. Use IFF_TUN/IFF_TAP instead.
|
||||
pub const TUN_TUN_DEV: ::c_short = ::IFF_TUN;
|
||||
pub const TUN_TAP_DEV: ::c_short = ::IFF_TAP;
|
||||
pub const TUN_TYPE_MASK: ::c_short = 0x000f;
|
||||
// This flag has no real effect
|
||||
pub const IFF_ONE_QUEUE: ::c_short = 0x2000;
|
||||
pub const IFF_VNET_HDR: ::c_short = 0x4000;
|
||||
pub const IFF_TUN_EXCL: ::c_short = 0x8000;
|
||||
pub const IFF_MULTI_QUEUE: ::c_short = 0x0100;
|
||||
pub const IFF_ATTACH_QUEUE: ::c_short = 0x0200;
|
||||
pub const IFF_DETACH_QUEUE: ::c_short = 0x0400;
|
||||
// read-only flag
|
||||
pub const IFF_PERSIST: ::c_short = 0x0800;
|
||||
pub const IFF_NOFILTER: ::c_short = 0x1000;
|
||||
|
||||
pub const ST_RDONLY: ::c_ulong = 1;
|
||||
pub const ST_NOSUID: ::c_ulong = 2;
|
||||
pub const ST_NODEV: ::c_ulong = 4;
|
||||
|
@ -846,10 +965,12 @@ pub const EAI_BADFLAGS: ::c_int = -1;
|
|||
pub const EAI_NONAME: ::c_int = -2;
|
||||
pub const EAI_AGAIN: ::c_int = -3;
|
||||
pub const EAI_FAIL: ::c_int = -4;
|
||||
pub const EAI_NODATA: ::c_int = -5;
|
||||
pub const EAI_FAMILY: ::c_int = -6;
|
||||
pub const EAI_SOCKTYPE: ::c_int = -7;
|
||||
pub const EAI_SERVICE: ::c_int = -8;
|
||||
pub const EAI_MEMORY: ::c_int = -10;
|
||||
pub const EAI_SYSTEM: ::c_int = -11;
|
||||
pub const EAI_OVERFLOW: ::c_int = -12;
|
||||
|
||||
pub const NI_NUMERICHOST: ::c_int = 1;
|
||||
|
@ -862,8 +983,6 @@ pub const SYNC_FILE_RANGE_WAIT_BEFORE: ::c_uint = 1;
|
|||
pub const SYNC_FILE_RANGE_WRITE: ::c_uint = 2;
|
||||
pub const SYNC_FILE_RANGE_WAIT_AFTER: ::c_uint = 4;
|
||||
|
||||
pub const EAI_SYSTEM: ::c_int = -11;
|
||||
|
||||
pub const AIO_CANCELED: ::c_int = 0;
|
||||
pub const AIO_NOTCANCELED: ::c_int = 1;
|
||||
pub const AIO_ALLDONE: ::c_int = 2;
|
||||
|
@ -996,6 +1115,13 @@ pub const PR_CAP_AMBIENT_RAISE: ::c_int = 2;
|
|||
pub const PR_CAP_AMBIENT_LOWER: ::c_int = 3;
|
||||
pub const PR_CAP_AMBIENT_CLEAR_ALL: ::c_int = 4;
|
||||
|
||||
pub const GRND_NONBLOCK: ::c_uint = 0x0001;
|
||||
pub const GRND_RANDOM: ::c_uint = 0x0002;
|
||||
|
||||
pub const SECCOMP_MODE_DISABLED: ::c_uint = 0;
|
||||
pub const SECCOMP_MODE_STRICT: ::c_uint = 1;
|
||||
pub const SECCOMP_MODE_FILTER: ::c_uint = 2;
|
||||
|
||||
pub const ITIMER_REAL: ::c_int = 0;
|
||||
pub const ITIMER_VIRTUAL: ::c_int = 1;
|
||||
pub const ITIMER_PROF: ::c_int = 2;
|
||||
|
@ -1024,7 +1150,249 @@ pub const ENOATTR: ::c_int = ::ENODATA;
|
|||
pub const SO_ORIGINAL_DST: ::c_int = 80;
|
||||
pub const IUTF8: ::tcflag_t = 0x00004000;
|
||||
pub const CMSPAR: ::tcflag_t = 0o10000000000;
|
||||
pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY;
|
||||
|
||||
pub const MFD_CLOEXEC: ::c_uint = 0x0001;
|
||||
pub const MFD_ALLOW_SEALING: ::c_uint = 0x0002;
|
||||
|
||||
// these are used in the p_type field of Elf32_Phdr and Elf64_Phdr, which has
|
||||
// the type Elf32Word and Elf64Word respectively. Luckily, both of those are u32
|
||||
// so we can use that type here to avoid having to cast.
|
||||
pub const PT_NULL: u32 = 0;
|
||||
pub const PT_LOAD: u32 = 1;
|
||||
pub const PT_DYNAMIC: u32 = 2;
|
||||
pub const PT_INTERP: u32 = 3;
|
||||
pub const PT_NOTE: u32 = 4;
|
||||
pub const PT_SHLIB: u32 = 5;
|
||||
pub const PT_PHDR: u32 = 6;
|
||||
pub const PT_TLS: u32 = 7;
|
||||
pub const PT_NUM: u32 = 8;
|
||||
pub const PT_LOOS: u32 = 0x60000000;
|
||||
pub const PT_GNU_EH_FRAME: u32 = 0x6474e550;
|
||||
pub const PT_GNU_STACK: u32 = 0x6474e551;
|
||||
pub const PT_GNU_RELRO: u32 = 0x6474e552;
|
||||
|
||||
// linux/if_ether.h
|
||||
pub const ETH_ALEN: ::c_int = 6;
|
||||
pub const ETH_HLEN: ::c_int = 14;
|
||||
pub const ETH_ZLEN: ::c_int = 60;
|
||||
pub const ETH_DATA_LEN: ::c_int = 1500;
|
||||
pub const ETH_FRAME_LEN: ::c_int = 1514;
|
||||
pub const ETH_FCS_LEN: ::c_int = 4;
|
||||
|
||||
// These are the defined Ethernet Protocol ID's.
|
||||
pub const ETH_P_LOOP: ::c_int = 0x0060;
|
||||
pub const ETH_P_PUP: ::c_int = 0x0200;
|
||||
pub const ETH_P_PUPAT: ::c_int = 0x0201;
|
||||
pub const ETH_P_IP: ::c_int = 0x0800;
|
||||
pub const ETH_P_X25: ::c_int = 0x0805;
|
||||
pub const ETH_P_ARP: ::c_int = 0x0806;
|
||||
pub const ETH_P_BPQ: ::c_int = 0x08FF;
|
||||
pub const ETH_P_IEEEPUP: ::c_int = 0x0a00;
|
||||
pub const ETH_P_IEEEPUPAT: ::c_int = 0x0a01;
|
||||
pub const ETH_P_BATMAN: ::c_int = 0x4305;
|
||||
pub const ETH_P_DEC: ::c_int = 0x6000;
|
||||
pub const ETH_P_DNA_DL: ::c_int = 0x6001;
|
||||
pub const ETH_P_DNA_RC: ::c_int = 0x6002;
|
||||
pub const ETH_P_DNA_RT: ::c_int = 0x6003;
|
||||
pub const ETH_P_LAT: ::c_int = 0x6004;
|
||||
pub const ETH_P_DIAG: ::c_int = 0x6005;
|
||||
pub const ETH_P_CUST: ::c_int = 0x6006;
|
||||
pub const ETH_P_SCA: ::c_int = 0x6007;
|
||||
pub const ETH_P_TEB: ::c_int = 0x6558;
|
||||
pub const ETH_P_RARP: ::c_int = 0x8035;
|
||||
pub const ETH_P_ATALK: ::c_int = 0x809B;
|
||||
pub const ETH_P_AARP: ::c_int = 0x80F3;
|
||||
pub const ETH_P_8021Q: ::c_int = 0x8100;
|
||||
pub const ETH_P_IPX: ::c_int = 0x8137;
|
||||
pub const ETH_P_IPV6: ::c_int = 0x86DD;
|
||||
pub const ETH_P_PAUSE: ::c_int = 0x8808;
|
||||
pub const ETH_P_SLOW: ::c_int = 0x8809;
|
||||
pub const ETH_P_WCCP: ::c_int = 0x883E;
|
||||
pub const ETH_P_MPLS_UC: ::c_int = 0x8847;
|
||||
pub const ETH_P_MPLS_MC: ::c_int = 0x8848;
|
||||
pub const ETH_P_ATMMPOA: ::c_int = 0x884c;
|
||||
pub const ETH_P_PPP_DISC: ::c_int = 0x8863;
|
||||
pub const ETH_P_PPP_SES: ::c_int = 0x8864;
|
||||
pub const ETH_P_LINK_CTL: ::c_int = 0x886c;
|
||||
pub const ETH_P_ATMFATE: ::c_int = 0x8884;
|
||||
pub const ETH_P_PAE: ::c_int = 0x888E;
|
||||
pub const ETH_P_AOE: ::c_int = 0x88A2;
|
||||
pub const ETH_P_8021AD: ::c_int = 0x88A8;
|
||||
pub const ETH_P_802_EX1: ::c_int = 0x88B5;
|
||||
pub const ETH_P_TIPC: ::c_int = 0x88CA;
|
||||
pub const ETH_P_MACSEC: ::c_int = 0x88E5;
|
||||
pub const ETH_P_8021AH: ::c_int = 0x88E7;
|
||||
pub const ETH_P_MVRP: ::c_int = 0x88F5;
|
||||
pub const ETH_P_1588: ::c_int = 0x88F7;
|
||||
pub const ETH_P_PRP: ::c_int = 0x88FB;
|
||||
pub const ETH_P_FCOE: ::c_int = 0x8906;
|
||||
pub const ETH_P_TDLS: ::c_int = 0x890D;
|
||||
pub const ETH_P_FIP: ::c_int = 0x8914;
|
||||
pub const ETH_P_80221: ::c_int = 0x8917;
|
||||
pub const ETH_P_LOOPBACK: ::c_int = 0x9000;
|
||||
pub const ETH_P_QINQ1: ::c_int = 0x9100;
|
||||
pub const ETH_P_QINQ2: ::c_int = 0x9200;
|
||||
pub const ETH_P_QINQ3: ::c_int = 0x9300;
|
||||
pub const ETH_P_EDSA: ::c_int = 0xDADA;
|
||||
pub const ETH_P_AF_IUCV: ::c_int = 0xFBFB;
|
||||
|
||||
pub const ETH_P_802_3_MIN: ::c_int = 0x0600;
|
||||
|
||||
// Non DIX types. Won't clash for 1500 types.
|
||||
pub const ETH_P_802_3: ::c_int = 0x0001;
|
||||
pub const ETH_P_AX25: ::c_int = 0x0002;
|
||||
pub const ETH_P_ALL: ::c_int = 0x0003;
|
||||
pub const ETH_P_802_2: ::c_int = 0x0004;
|
||||
pub const ETH_P_SNAP: ::c_int = 0x0005;
|
||||
pub const ETH_P_DDCMP: ::c_int = 0x0006;
|
||||
pub const ETH_P_WAN_PPP: ::c_int = 0x0007;
|
||||
pub const ETH_P_PPP_MP: ::c_int = 0x0008;
|
||||
pub const ETH_P_LOCALTALK: ::c_int = 0x0009;
|
||||
pub const ETH_P_CANFD: ::c_int = 0x000D;
|
||||
pub const ETH_P_PPPTALK: ::c_int = 0x0010;
|
||||
pub const ETH_P_TR_802_2: ::c_int = 0x0011;
|
||||
pub const ETH_P_MOBITEX: ::c_int = 0x0015;
|
||||
pub const ETH_P_CONTROL: ::c_int = 0x0016;
|
||||
pub const ETH_P_IRDA: ::c_int = 0x0017;
|
||||
pub const ETH_P_ECONET: ::c_int = 0x0018;
|
||||
pub const ETH_P_HDLC: ::c_int = 0x0019;
|
||||
pub const ETH_P_ARCNET: ::c_int = 0x001A;
|
||||
pub const ETH_P_DSA: ::c_int = 0x001B;
|
||||
pub const ETH_P_TRAILER: ::c_int = 0x001C;
|
||||
pub const ETH_P_PHONET: ::c_int = 0x00F5;
|
||||
pub const ETH_P_IEEE802154: ::c_int = 0x00F6;
|
||||
pub const ETH_P_CAIF: ::c_int = 0x00F7;
|
||||
|
||||
pub const POSIX_SPAWN_RESETIDS: ::c_int = 0x01;
|
||||
pub const POSIX_SPAWN_SETPGROUP: ::c_int = 0x02;
|
||||
pub const POSIX_SPAWN_SETSIGDEF: ::c_int = 0x04;
|
||||
pub const POSIX_SPAWN_SETSIGMASK: ::c_int = 0x08;
|
||||
pub const POSIX_SPAWN_SETSCHEDPARAM: ::c_int = 0x10;
|
||||
pub const POSIX_SPAWN_SETSCHEDULER: ::c_int = 0x20;
|
||||
|
||||
pub const NLMSG_NOOP: ::c_int = 0x1;
|
||||
pub const NLMSG_ERROR: ::c_int = 0x2;
|
||||
pub const NLMSG_DONE: ::c_int = 0x3;
|
||||
pub const NLMSG_OVERRUN: ::c_int = 0x4;
|
||||
pub const NLMSG_MIN_TYPE: ::c_int = 0x10;
|
||||
|
||||
pub const GENL_NAMSIZ: ::c_int = 16;
|
||||
|
||||
pub const GENL_MIN_ID: ::c_int = NLMSG_MIN_TYPE;
|
||||
pub const GENL_MAX_ID: ::c_int = 1023;
|
||||
|
||||
pub const GENL_ADMIN_PERM: ::c_int = 0x01;
|
||||
pub const GENL_CMD_CAP_DO: ::c_int = 0x02;
|
||||
pub const GENL_CMD_CAP_DUMP: ::c_int = 0x04;
|
||||
pub const GENL_CMD_CAP_HASPOL: ::c_int = 0x08;
|
||||
|
||||
pub const GENL_ID_CTRL: ::c_int = NLMSG_MIN_TYPE;
|
||||
|
||||
pub const CTRL_CMD_UNSPEC: ::c_int = 0;
|
||||
pub const CTRL_CMD_NEWFAMILY: ::c_int = 1;
|
||||
pub const CTRL_CMD_DELFAMILY: ::c_int = 2;
|
||||
pub const CTRL_CMD_GETFAMILY: ::c_int = 3;
|
||||
pub const CTRL_CMD_NEWOPS: ::c_int = 4;
|
||||
pub const CTRL_CMD_DELOPS: ::c_int = 5;
|
||||
pub const CTRL_CMD_GETOPS: ::c_int = 6;
|
||||
pub const CTRL_CMD_NEWMCAST_GRP: ::c_int = 7;
|
||||
pub const CTRL_CMD_DELMCAST_GRP: ::c_int = 8;
|
||||
pub const CTRL_CMD_GETMCAST_GRP: ::c_int = 9;
|
||||
|
||||
pub const CTRL_ATTR_UNSPEC: ::c_int = 0;
|
||||
pub const CTRL_ATTR_FAMILY_ID: ::c_int = 1;
|
||||
pub const CTRL_ATTR_FAMILY_NAME: ::c_int = 2;
|
||||
pub const CTRL_ATTR_VERSION: ::c_int = 3;
|
||||
pub const CTRL_ATTR_HDRSIZE: ::c_int = 4;
|
||||
pub const CTRL_ATTR_MAXATTR: ::c_int = 5;
|
||||
pub const CTRL_ATTR_OPS: ::c_int = 6;
|
||||
pub const CTRL_ATTR_MCAST_GROUPS: ::c_int = 7;
|
||||
|
||||
pub const CTRL_ATTR_OP_UNSPEC: ::c_int = 0;
|
||||
pub const CTRL_ATTR_OP_ID: ::c_int = 1;
|
||||
pub const CTRL_ATTR_OP_FLAGS: ::c_int = 2;
|
||||
|
||||
pub const CTRL_ATTR_MCAST_GRP_UNSPEC: ::c_int = 0;
|
||||
pub const CTRL_ATTR_MCAST_GRP_NAME: ::c_int = 1;
|
||||
pub const CTRL_ATTR_MCAST_GRP_ID: ::c_int = 2;
|
||||
|
||||
// linux/netfilter.h
|
||||
pub const NF_DROP: ::c_int = 0;
|
||||
pub const NF_ACCEPT: ::c_int = 1;
|
||||
pub const NF_STOLEN: ::c_int = 2;
|
||||
pub const NF_QUEUE: ::c_int = 3;
|
||||
pub const NF_REPEAT: ::c_int = 4;
|
||||
pub const NF_STOP: ::c_int = 5;
|
||||
pub const NF_MAX_VERDICT: ::c_int = NF_STOP;
|
||||
|
||||
pub const NF_VERDICT_MASK: ::c_int = 0x000000ff;
|
||||
pub const NF_VERDICT_FLAG_QUEUE_BYPASS: ::c_int = 0x00008000;
|
||||
|
||||
pub const NF_VERDICT_QMASK: ::c_int = 0xffff0000;
|
||||
pub const NF_VERDICT_QBITS: ::c_int = 16;
|
||||
|
||||
pub const NF_VERDICT_BITS: ::c_int = 16;
|
||||
|
||||
pub const NF_INET_PRE_ROUTING: ::c_int = 0;
|
||||
pub const NF_INET_LOCAL_IN: ::c_int = 1;
|
||||
pub const NF_INET_FORWARD: ::c_int = 2;
|
||||
pub const NF_INET_LOCAL_OUT: ::c_int = 3;
|
||||
pub const NF_INET_POST_ROUTING: ::c_int = 4;
|
||||
pub const NF_INET_NUMHOOKS: ::c_int = 5;
|
||||
|
||||
// Some NFPROTO are not compatible with musl and are defined in submodules.
|
||||
pub const NFPROTO_UNSPEC: ::c_int = 0;
|
||||
pub const NFPROTO_IPV4: ::c_int = 2;
|
||||
pub const NFPROTO_ARP: ::c_int = 3;
|
||||
pub const NFPROTO_BRIDGE: ::c_int = 7;
|
||||
pub const NFPROTO_IPV6: ::c_int = 10;
|
||||
pub const NFPROTO_DECNET: ::c_int = 12;
|
||||
pub const NFPROTO_NUMPROTO: ::c_int = 13;
|
||||
|
||||
// linux/netfilter_ipv4.h
|
||||
pub const NF_IP_PRE_ROUTING: ::c_int = 0;
|
||||
pub const NF_IP_LOCAL_IN: ::c_int = 1;
|
||||
pub const NF_IP_FORWARD: ::c_int = 2;
|
||||
pub const NF_IP_LOCAL_OUT: ::c_int = 3;
|
||||
pub const NF_IP_POST_ROUTING: ::c_int = 4;
|
||||
pub const NF_IP_NUMHOOKS: ::c_int = 5;
|
||||
|
||||
pub const NF_IP_PRI_FIRST: ::c_int = ::INT_MIN;
|
||||
pub const NF_IP_PRI_CONNTRACK_DEFRAG: ::c_int = -400;
|
||||
pub const NF_IP_PRI_RAW: ::c_int = -300;
|
||||
pub const NF_IP_PRI_SELINUX_FIRST: ::c_int = -225;
|
||||
pub const NF_IP_PRI_CONNTRACK: ::c_int = -200;
|
||||
pub const NF_IP_PRI_MANGLE: ::c_int = -150;
|
||||
pub const NF_IP_PRI_NAT_DST: ::c_int = -100;
|
||||
pub const NF_IP_PRI_FILTER: ::c_int = 0;
|
||||
pub const NF_IP_PRI_SECURITY: ::c_int = 50;
|
||||
pub const NF_IP_PRI_NAT_SRC: ::c_int = 100;
|
||||
pub const NF_IP_PRI_SELINUX_LAST: ::c_int = 225;
|
||||
pub const NF_IP_PRI_CONNTRACK_HELPER: ::c_int = 300;
|
||||
pub const NF_IP_PRI_CONNTRACK_CONFIRM: ::c_int = ::INT_MAX;
|
||||
pub const NF_IP_PRI_LAST: ::c_int = ::INT_MAX;
|
||||
|
||||
// linux/netfilter_ipv6.h
|
||||
pub const NF_IP6_PRE_ROUTING: ::c_int = 0;
|
||||
pub const NF_IP6_LOCAL_IN: ::c_int = 1;
|
||||
pub const NF_IP6_FORWARD: ::c_int = 2;
|
||||
pub const NF_IP6_LOCAL_OUT: ::c_int = 3;
|
||||
pub const NF_IP6_POST_ROUTING: ::c_int = 4;
|
||||
pub const NF_IP6_NUMHOOKS: ::c_int = 5;
|
||||
|
||||
pub const NF_IP6_PRI_FIRST: ::c_int = ::INT_MIN;
|
||||
pub const NF_IP6_PRI_CONNTRACK_DEFRAG: ::c_int = -400;
|
||||
pub const NF_IP6_PRI_RAW: ::c_int = -300;
|
||||
pub const NF_IP6_PRI_SELINUX_FIRST: ::c_int = -225;
|
||||
pub const NF_IP6_PRI_CONNTRACK: ::c_int = -200;
|
||||
pub const NF_IP6_PRI_MANGLE: ::c_int = -150;
|
||||
pub const NF_IP6_PRI_NAT_DST: ::c_int = -100;
|
||||
pub const NF_IP6_PRI_FILTER: ::c_int = 0;
|
||||
pub const NF_IP6_PRI_SECURITY: ::c_int = 50;
|
||||
pub const NF_IP6_PRI_NAT_SRC: ::c_int = 100;
|
||||
pub const NF_IP6_PRI_SELINUX_LAST: ::c_int = 225;
|
||||
pub const NF_IP6_PRI_CONNTRACK_HELPER: ::c_int = 300;
|
||||
pub const NF_IP6_PRI_LAST: ::c_int = ::INT_MAX;
|
||||
|
||||
f! {
|
||||
pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
|
||||
|
@ -1100,9 +1468,13 @@ extern {
|
|||
pub fn setpwent();
|
||||
pub fn endpwent();
|
||||
pub fn getpwent() -> *mut passwd;
|
||||
pub fn setgrent();
|
||||
pub fn endgrent();
|
||||
pub fn getgrent() -> *mut ::group;
|
||||
pub fn setspent();
|
||||
pub fn endspent();
|
||||
pub fn getspent() -> *mut spwd;
|
||||
|
||||
pub fn getspnam(__name: *const ::c_char) -> *mut spwd;
|
||||
|
||||
pub fn shm_open(name: *const c_char, oflag: ::c_int,
|
||||
|
@ -1269,7 +1641,6 @@ extern {
|
|||
nbytes: ::off64_t, flags: ::c_uint) -> ::c_int;
|
||||
pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int;
|
||||
pub fn freeifaddrs(ifa: *mut ::ifaddrs);
|
||||
|
||||
pub fn mremap(addr: *mut ::c_void,
|
||||
len: ::size_t,
|
||||
new_len: ::size_t,
|
||||
|
@ -1295,7 +1666,8 @@ extern {
|
|||
-> ::c_int;
|
||||
|
||||
pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int;
|
||||
|
||||
pub fn remap_file_pages(addr: *mut ::c_void, size: ::size_t, prot: ::c_int,
|
||||
pgoff: ::size_t, flags: ::c_int) -> ::c_int;
|
||||
pub fn recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
|
||||
flags: ::c_int, addr: *mut ::sockaddr,
|
||||
addrlen: *mut ::socklen_t) -> ::ssize_t;
|
||||
|
@ -1483,6 +1855,88 @@ extern {
|
|||
attr: *const ::pthread_attr_t,
|
||||
f: extern fn(*mut ::c_void) -> *mut ::c_void,
|
||||
value: *mut ::c_void) -> ::c_int;
|
||||
pub fn dl_iterate_phdr(
|
||||
callback: Option<unsafe extern fn(
|
||||
info: *mut ::dl_phdr_info,
|
||||
size: ::size_t,
|
||||
data: *mut ::c_void
|
||||
) -> ::c_int>,
|
||||
data: *mut ::c_void
|
||||
) -> ::c_int;
|
||||
|
||||
pub fn setmntent(filename: *const ::c_char,
|
||||
ty: *const ::c_char) -> *mut ::FILE;
|
||||
pub fn getmntent(stream: *mut ::FILE) -> *mut ::mntent;
|
||||
pub fn addmntent(stream: *mut ::FILE, mnt: *const ::mntent) -> ::c_int;
|
||||
pub fn endmntent(streamp: *mut ::FILE) -> ::c_int;
|
||||
pub fn hasmntopt(mnt: *const ::mntent,
|
||||
opt: *const ::c_char) -> *mut ::c_char;
|
||||
|
||||
pub fn posix_spawn(pid: *mut ::pid_t,
|
||||
path: *const ::c_char,
|
||||
file_actions: *const ::posix_spawn_file_actions_t,
|
||||
attrp: *const ::posix_spawnattr_t,
|
||||
argv: *const *mut ::c_char,
|
||||
envp: *const *mut ::c_char) -> ::c_int;
|
||||
pub fn posix_spawnp(pid: *mut ::pid_t,
|
||||
file: *const ::c_char,
|
||||
file_actions: *const ::posix_spawn_file_actions_t,
|
||||
attrp: *const ::posix_spawnattr_t,
|
||||
argv: *const *mut ::c_char,
|
||||
envp: *const *mut ::c_char) -> ::c_int;
|
||||
pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> ::c_int;
|
||||
pub fn posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> ::c_int;
|
||||
pub fn posix_spawnattr_getsigdefault(attr: *const posix_spawnattr_t,
|
||||
default: *mut ::sigset_t) -> ::c_int;
|
||||
pub fn posix_spawnattr_setsigdefault(attr: *mut posix_spawnattr_t,
|
||||
default: *const ::sigset_t) -> ::c_int;
|
||||
pub fn posix_spawnattr_getsigmask(attr: *const posix_spawnattr_t,
|
||||
default: *mut ::sigset_t) -> ::c_int;
|
||||
pub fn posix_spawnattr_setsigmask(attr: *mut posix_spawnattr_t,
|
||||
default: *const ::sigset_t) -> ::c_int;
|
||||
pub fn posix_spawnattr_getflags(attr: *const posix_spawnattr_t,
|
||||
flags: *mut ::c_short) -> ::c_int;
|
||||
pub fn posix_spawnattr_setflags(attr: *mut posix_spawnattr_t,
|
||||
flags: ::c_short) -> ::c_int;
|
||||
pub fn posix_spawnattr_getpgroup(attr: *const posix_spawnattr_t,
|
||||
flags: *mut ::pid_t) -> ::c_int;
|
||||
pub fn posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t,
|
||||
flags: ::pid_t) -> ::c_int;
|
||||
pub fn posix_spawnattr_getschedpolicy(attr: *const posix_spawnattr_t,
|
||||
flags: *mut ::c_int) -> ::c_int;
|
||||
pub fn posix_spawnattr_setschedpolicy(attr: *mut posix_spawnattr_t,
|
||||
flags: ::c_int) -> ::c_int;
|
||||
pub fn posix_spawnattr_getschedparam(
|
||||
attr: *const posix_spawnattr_t,
|
||||
param: *mut ::sched_param,
|
||||
) -> ::c_int;
|
||||
pub fn posix_spawnattr_setschedparam(
|
||||
attr: *mut posix_spawnattr_t,
|
||||
param: *const ::sched_param,
|
||||
) -> ::c_int;
|
||||
|
||||
pub fn posix_spawn_file_actions_init(
|
||||
actions: *mut posix_spawn_file_actions_t,
|
||||
) -> ::c_int;
|
||||
pub fn posix_spawn_file_actions_destroy(
|
||||
actions: *mut posix_spawn_file_actions_t,
|
||||
) -> ::c_int;
|
||||
pub fn posix_spawn_file_actions_addopen(
|
||||
actions: *mut posix_spawn_file_actions_t,
|
||||
fd: ::c_int,
|
||||
path: *const ::c_char,
|
||||
oflag: ::c_int,
|
||||
mode: ::mode_t,
|
||||
) -> ::c_int;
|
||||
pub fn posix_spawn_file_actions_addclose(
|
||||
actions: *mut posix_spawn_file_actions_t,
|
||||
fd: ::c_int,
|
||||
) -> ::c_int;
|
||||
pub fn posix_spawn_file_actions_adddup2(
|
||||
actions: *mut posix_spawn_file_actions_t,
|
||||
fd: ::c_int,
|
||||
newfd: ::c_int,
|
||||
) -> ::c_int;
|
||||
}
|
||||
|
||||
cfg_if! {
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче