Bug 1413195 - Un-vendor separate webdriver dependencies r=jgraham draft
authorAndreas Tolfsen <ato@sny.no>
Fri, 03 Nov 2017 14:01:43 +0000
changeset 692720 ff8652b3623fbbfb6096de4efa724221f0f58c1c
parent 692719 af31947851355677328cbc2c0c265f410a22624f
child 738834 719535dc43fce870d32649e4f8dabc0fd3c7700d
push id87585
push userbmo:ato@sny.no
push dateFri, 03 Nov 2017 14:05:23 +0000
reviewersjgraham
bugs1413195
milestone58.0a1
Bug 1413195 - Un-vendor separate webdriver dependencies r=jgraham MozReview-Commit-ID: 3vJkZ79xOci
third_party/rust/base64-0.5.2/.cargo-checksum.json
third_party/rust/base64-0.5.2/Cargo.toml
third_party/rust/base64-0.5.2/LICENSE-APACHE
third_party/rust/base64-0.5.2/LICENSE-MIT
third_party/rust/base64-0.5.2/README.md
third_party/rust/base64-0.5.2/benches/benchmarks.rs
third_party/rust/base64-0.5.2/examples/make_tables.rs
third_party/rust/base64-0.5.2/src/lib.rs
third_party/rust/base64-0.5.2/src/tables.rs
third_party/rust/base64-0.5.2/tests/tests.rs
third_party/rust/base64/.cargo-checksum.json
third_party/rust/base64/Cargo.toml
third_party/rust/base64/README.md
third_party/rust/base64/benches/benchmarks.rs
third_party/rust/base64/src/lib.rs
third_party/rust/base64/src/line_wrap.rs
third_party/rust/base64/src/tests.rs
third_party/rust/base64/tests/tests.rs
third_party/rust/byteorder-1.0.0/.cargo-checksum.json
third_party/rust/byteorder-1.0.0/.travis.yml
third_party/rust/byteorder-1.0.0/COPYING
third_party/rust/byteorder-1.0.0/Cargo.toml
third_party/rust/byteorder-1.0.0/LICENSE-MIT
third_party/rust/byteorder-1.0.0/README.md
third_party/rust/byteorder-1.0.0/UNLICENSE
third_party/rust/byteorder-1.0.0/benches/bench.rs
third_party/rust/byteorder-1.0.0/src/lib.rs
third_party/rust/byteorder-1.0.0/src/new.rs
third_party/rust/byteorder/.cargo-checksum.json
third_party/rust/byteorder/.travis.yml
third_party/rust/byteorder/CHANGELOG.md
third_party/rust/byteorder/Cargo.toml
third_party/rust/byteorder/benches/bench.rs
third_party/rust/byteorder/src/io.rs
third_party/rust/byteorder/src/lib.rs
third_party/rust/byteorder/src/new.rs
third_party/rust/cookie-0.9.1/.cargo-checksum.json
third_party/rust/cookie-0.9.1/.travis.yml
third_party/rust/cookie-0.9.1/Cargo.toml
third_party/rust/cookie-0.9.1/LICENSE-APACHE
third_party/rust/cookie-0.9.1/LICENSE-MIT
third_party/rust/cookie-0.9.1/README.md
third_party/rust/cookie-0.9.1/src/builder.rs
third_party/rust/cookie-0.9.1/src/delta.rs
third_party/rust/cookie-0.9.1/src/draft.rs
third_party/rust/cookie-0.9.1/src/jar.rs
third_party/rust/cookie-0.9.1/src/lib.rs
third_party/rust/cookie-0.9.1/src/parse.rs
third_party/rust/cookie-0.9.1/src/secure/key.rs
third_party/rust/cookie-0.9.1/src/secure/macros.rs
third_party/rust/cookie-0.9.1/src/secure/mod.rs
third_party/rust/cookie-0.9.1/src/secure/private.rs
third_party/rust/cookie-0.9.1/src/secure/signed.rs
third_party/rust/cookie/.cargo-checksum.json
third_party/rust/cookie/Cargo.toml
third_party/rust/cookie/src/secure/private.rs
third_party/rust/httparse-1.2.2/.cargo-checksum.json
third_party/rust/httparse-1.2.2/.travis.yml
third_party/rust/httparse-1.2.2/.travis_after.sh
third_party/rust/httparse-1.2.2/Cargo.toml
third_party/rust/httparse-1.2.2/LICENSE-APACHE
third_party/rust/httparse-1.2.2/LICENSE-MIT
third_party/rust/httparse-1.2.2/README.md
third_party/rust/httparse-1.2.2/benches/parse.rs
third_party/rust/httparse-1.2.2/src/iter.rs
third_party/rust/httparse-1.2.2/src/lib.rs
third_party/rust/httparse/.cargo-checksum.json
third_party/rust/httparse/.travis.yml
third_party/rust/httparse/.travis_after.sh
third_party/rust/httparse/Cargo.toml
third_party/rust/httparse/LICENSE-APACHE
third_party/rust/httparse/LICENSE-MIT
third_party/rust/httparse/README.md
third_party/rust/httparse/benches/parse.rs
third_party/rust/httparse/src/iter.rs
third_party/rust/httparse/src/lib.rs
third_party/rust/hyper-0.10.10/.cargo-checksum.json
third_party/rust/hyper-0.10.10/Cargo.toml
third_party/rust/hyper-0.10.10/LICENSE
third_party/rust/hyper-0.10.10/build.rs
third_party/rust/hyper-0.10.10/src/buffer.rs
third_party/rust/hyper-0.10.10/src/client/mod.rs
third_party/rust/hyper-0.10.10/src/client/pool.rs
third_party/rust/hyper-0.10.10/src/client/proxy.rs
third_party/rust/hyper-0.10.10/src/client/request.rs
third_party/rust/hyper-0.10.10/src/client/response.rs
third_party/rust/hyper-0.10.10/src/error.rs
third_party/rust/hyper-0.10.10/src/header/common/accept.rs
third_party/rust/hyper-0.10.10/src/header/common/accept_charset.rs
third_party/rust/hyper-0.10.10/src/header/common/accept_encoding.rs
third_party/rust/hyper-0.10.10/src/header/common/accept_language.rs
third_party/rust/hyper-0.10.10/src/header/common/accept_ranges.rs
third_party/rust/hyper-0.10.10/src/header/common/access_control_allow_credentials.rs
third_party/rust/hyper-0.10.10/src/header/common/access_control_allow_headers.rs
third_party/rust/hyper-0.10.10/src/header/common/access_control_allow_methods.rs
third_party/rust/hyper-0.10.10/src/header/common/access_control_allow_origin.rs
third_party/rust/hyper-0.10.10/src/header/common/access_control_expose_headers.rs
third_party/rust/hyper-0.10.10/src/header/common/access_control_max_age.rs
third_party/rust/hyper-0.10.10/src/header/common/access_control_request_headers.rs
third_party/rust/hyper-0.10.10/src/header/common/access_control_request_method.rs
third_party/rust/hyper-0.10.10/src/header/common/allow.rs
third_party/rust/hyper-0.10.10/src/header/common/authorization.rs
third_party/rust/hyper-0.10.10/src/header/common/cache_control.rs
third_party/rust/hyper-0.10.10/src/header/common/connection.rs
third_party/rust/hyper-0.10.10/src/header/common/content_disposition.rs
third_party/rust/hyper-0.10.10/src/header/common/content_encoding.rs
third_party/rust/hyper-0.10.10/src/header/common/content_language.rs
third_party/rust/hyper-0.10.10/src/header/common/content_length.rs
third_party/rust/hyper-0.10.10/src/header/common/content_range.rs
third_party/rust/hyper-0.10.10/src/header/common/content_type.rs
third_party/rust/hyper-0.10.10/src/header/common/cookie.rs
third_party/rust/hyper-0.10.10/src/header/common/date.rs
third_party/rust/hyper-0.10.10/src/header/common/etag.rs
third_party/rust/hyper-0.10.10/src/header/common/expect.rs
third_party/rust/hyper-0.10.10/src/header/common/expires.rs
third_party/rust/hyper-0.10.10/src/header/common/from.rs
third_party/rust/hyper-0.10.10/src/header/common/host.rs
third_party/rust/hyper-0.10.10/src/header/common/if_match.rs
third_party/rust/hyper-0.10.10/src/header/common/if_modified_since.rs
third_party/rust/hyper-0.10.10/src/header/common/if_none_match.rs
third_party/rust/hyper-0.10.10/src/header/common/if_range.rs
third_party/rust/hyper-0.10.10/src/header/common/if_unmodified_since.rs
third_party/rust/hyper-0.10.10/src/header/common/last-event-id.rs
third_party/rust/hyper-0.10.10/src/header/common/last_modified.rs
third_party/rust/hyper-0.10.10/src/header/common/location.rs
third_party/rust/hyper-0.10.10/src/header/common/mod.rs
third_party/rust/hyper-0.10.10/src/header/common/origin.rs
third_party/rust/hyper-0.10.10/src/header/common/pragma.rs
third_party/rust/hyper-0.10.10/src/header/common/prefer.rs
third_party/rust/hyper-0.10.10/src/header/common/preference_applied.rs
third_party/rust/hyper-0.10.10/src/header/common/range.rs
third_party/rust/hyper-0.10.10/src/header/common/referer.rs
third_party/rust/hyper-0.10.10/src/header/common/referrer_policy.rs
third_party/rust/hyper-0.10.10/src/header/common/server.rs
third_party/rust/hyper-0.10.10/src/header/common/set_cookie.rs
third_party/rust/hyper-0.10.10/src/header/common/strict_transport_security.rs
third_party/rust/hyper-0.10.10/src/header/common/transfer_encoding.rs
third_party/rust/hyper-0.10.10/src/header/common/upgrade.rs
third_party/rust/hyper-0.10.10/src/header/common/user_agent.rs
third_party/rust/hyper-0.10.10/src/header/common/vary.rs
third_party/rust/hyper-0.10.10/src/header/internals/cell.rs
third_party/rust/hyper-0.10.10/src/header/internals/item.rs
third_party/rust/hyper-0.10.10/src/header/internals/mod.rs
third_party/rust/hyper-0.10.10/src/header/internals/vec_map.rs
third_party/rust/hyper-0.10.10/src/header/mod.rs
third_party/rust/hyper-0.10.10/src/header/parsing.rs
third_party/rust/hyper-0.10.10/src/header/shared/charset.rs
third_party/rust/hyper-0.10.10/src/header/shared/encoding.rs
third_party/rust/hyper-0.10.10/src/header/shared/entity.rs
third_party/rust/hyper-0.10.10/src/header/shared/httpdate.rs
third_party/rust/hyper-0.10.10/src/header/shared/mod.rs
third_party/rust/hyper-0.10.10/src/header/shared/quality_item.rs
third_party/rust/hyper-0.10.10/src/http/h1.rs
third_party/rust/hyper-0.10.10/src/http/message.rs
third_party/rust/hyper-0.10.10/src/http/mod.rs
third_party/rust/hyper-0.10.10/src/lib.rs
third_party/rust/hyper-0.10.10/src/method.rs
third_party/rust/hyper-0.10.10/src/mock.rs
third_party/rust/hyper-0.10.10/src/net.rs
third_party/rust/hyper-0.10.10/src/server/listener.rs
third_party/rust/hyper-0.10.10/src/server/mod.rs
third_party/rust/hyper-0.10.10/src/server/request.rs
third_party/rust/hyper-0.10.10/src/server/response.rs
third_party/rust/hyper-0.10.10/src/status.rs
third_party/rust/hyper-0.10.10/src/uri.rs
third_party/rust/hyper-0.10.10/src/version.rs
third_party/rust/hyper/.cargo-checksum.json
third_party/rust/hyper/Cargo.toml
third_party/rust/hyper/build.rs
third_party/rust/hyper/src/buffer.rs
third_party/rust/hyper/src/client/mod.rs
third_party/rust/hyper/src/client/pool.rs
third_party/rust/hyper/src/client/response.rs
third_party/rust/hyper/src/header/common/authorization.rs
third_party/rust/hyper/src/header/common/link.rs
third_party/rust/hyper/src/header/common/mod.rs
third_party/rust/hyper/src/header/internals/cell.rs
third_party/rust/hyper/src/header/internals/vec_map.rs
third_party/rust/hyper/src/header/mod.rs
third_party/rust/hyper/src/http/h1.rs
third_party/rust/hyper/src/lib.rs
third_party/rust/hyper/src/mock.rs
third_party/rust/hyper/src/server/listener.rs
third_party/rust/hyper/src/server/mod.rs
third_party/rust/hyper/src/server/request.rs
third_party/rust/hyper/src/server/response.rs
third_party/rust/hyper/src/uri.rs
third_party/rust/hyper/src/version.rs
third_party/rust/lazy_static-0.2.8/.cargo-checksum.json
third_party/rust/lazy_static-0.2.8/.travis.yml
third_party/rust/lazy_static-0.2.8/Cargo.toml
third_party/rust/lazy_static-0.2.8/LICENSE-APACHE
third_party/rust/lazy_static-0.2.8/LICENSE-MIT
third_party/rust/lazy_static-0.2.8/README.md
third_party/rust/lazy_static-0.2.8/src/core_lazy.rs
third_party/rust/lazy_static-0.2.8/src/lazy.rs
third_party/rust/lazy_static-0.2.8/src/lib.rs
third_party/rust/lazy_static-0.2.8/src/nightly_lazy.rs
third_party/rust/lazy_static-0.2.8/tests/no_std.rs
third_party/rust/lazy_static-0.2.8/tests/test.rs
third_party/rust/lazy_static/.cargo-checksum.json
third_party/rust/lazy_static/.travis.yml
third_party/rust/lazy_static/Cargo.toml
third_party/rust/lazy_static/README.md
third_party/rust/lazy_static/appveyor.yml
third_party/rust/lazy_static/src/lib.rs
third_party/rust/libc-0.2.24/.cargo-checksum.json
third_party/rust/libc-0.2.24/.travis.yml
third_party/rust/libc-0.2.24/Cargo.toml
third_party/rust/libc-0.2.24/LICENSE-APACHE
third_party/rust/libc-0.2.24/LICENSE-MIT
third_party/rust/libc-0.2.24/README.md
third_party/rust/libc-0.2.24/appveyor.yml
third_party/rust/libc-0.2.24/ci/README.md
third_party/rust/libc-0.2.24/ci/android-accept-licenses.sh
third_party/rust/libc-0.2.24/ci/android-install-ndk.sh
third_party/rust/libc-0.2.24/ci/android-install-sdk.sh
third_party/rust/libc-0.2.24/ci/android-sysimage.sh
third_party/rust/libc-0.2.24/ci/docker/aarch64-linux-android/Dockerfile
third_party/rust/libc-0.2.24/ci/docker/aarch64-unknown-linux-gnu/Dockerfile
third_party/rust/libc-0.2.24/ci/docker/arm-linux-androideabi/Dockerfile
third_party/rust/libc-0.2.24/ci/docker/arm-unknown-linux-gnueabihf/Dockerfile
third_party/rust/libc-0.2.24/ci/docker/i686-linux-android/Dockerfile
third_party/rust/libc-0.2.24/ci/docker/i686-unknown-linux-gnu/Dockerfile
third_party/rust/libc-0.2.24/ci/docker/i686-unknown-linux-musl/Dockerfile
third_party/rust/libc-0.2.24/ci/docker/mips-unknown-linux-gnu/Dockerfile
third_party/rust/libc-0.2.24/ci/docker/mips-unknown-linux-musl/Dockerfile
third_party/rust/libc-0.2.24/ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile
third_party/rust/libc-0.2.24/ci/docker/mipsel-unknown-linux-musl/Dockerfile
third_party/rust/libc-0.2.24/ci/docker/powerpc-unknown-linux-gnu/Dockerfile
third_party/rust/libc-0.2.24/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile
third_party/rust/libc-0.2.24/ci/docker/x86_64-linux-android/Dockerfile
third_party/rust/libc-0.2.24/ci/docker/x86_64-rumprun-netbsd/Dockerfile
third_party/rust/libc-0.2.24/ci/docker/x86_64-unknown-freebsd/Dockerfile
third_party/rust/libc-0.2.24/ci/docker/x86_64-unknown-linux-gnu/Dockerfile
third_party/rust/libc-0.2.24/ci/docker/x86_64-unknown-linux-musl/Dockerfile
third_party/rust/libc-0.2.24/ci/docker/x86_64-unknown-openbsd/Dockerfile
third_party/rust/libc-0.2.24/ci/dox.sh
third_party/rust/libc-0.2.24/ci/ios/deploy_and_run_on_ios_simulator.rs
third_party/rust/libc-0.2.24/ci/landing-page-footer.html
third_party/rust/libc-0.2.24/ci/landing-page-head.html
third_party/rust/libc-0.2.24/ci/run-docker.sh
third_party/rust/libc-0.2.24/ci/run-qemu.sh
third_party/rust/libc-0.2.24/ci/run.sh
third_party/rust/libc-0.2.24/ci/style.rs
third_party/rust/libc-0.2.24/src/dox.rs
third_party/rust/libc-0.2.24/src/lib.rs
third_party/rust/libc-0.2.24/src/macros.rs
third_party/rust/libc-0.2.24/src/redox.rs
third_party/rust/libc-0.2.24/src/unix/bsd/apple/b32.rs
third_party/rust/libc-0.2.24/src/unix/bsd/apple/b64.rs
third_party/rust/libc-0.2.24/src/unix/bsd/apple/mod.rs
third_party/rust/libc-0.2.24/src/unix/bsd/freebsdlike/dragonfly/mod.rs
third_party/rust/libc-0.2.24/src/unix/bsd/freebsdlike/freebsd/aarch64.rs
third_party/rust/libc-0.2.24/src/unix/bsd/freebsdlike/freebsd/mod.rs
third_party/rust/libc-0.2.24/src/unix/bsd/freebsdlike/freebsd/x86.rs
third_party/rust/libc-0.2.24/src/unix/bsd/freebsdlike/freebsd/x86_64.rs
third_party/rust/libc-0.2.24/src/unix/bsd/freebsdlike/mod.rs
third_party/rust/libc-0.2.24/src/unix/bsd/mod.rs
third_party/rust/libc-0.2.24/src/unix/bsd/netbsdlike/mod.rs
third_party/rust/libc-0.2.24/src/unix/bsd/netbsdlike/netbsd/mod.rs
third_party/rust/libc-0.2.24/src/unix/bsd/netbsdlike/netbsd/other/b32/mod.rs
third_party/rust/libc-0.2.24/src/unix/bsd/netbsdlike/netbsd/other/b64/mod.rs
third_party/rust/libc-0.2.24/src/unix/bsd/netbsdlike/netbsd/other/mod.rs
third_party/rust/libc-0.2.24/src/unix/bsd/netbsdlike/openbsdlike/bitrig.rs
third_party/rust/libc-0.2.24/src/unix/bsd/netbsdlike/openbsdlike/mod.rs
third_party/rust/libc-0.2.24/src/unix/bsd/netbsdlike/openbsdlike/openbsd.rs
third_party/rust/libc-0.2.24/src/unix/bsd/netbsdlike/openbsdlike/other/b32/mod.rs
third_party/rust/libc-0.2.24/src/unix/bsd/netbsdlike/openbsdlike/other/b64/mod.rs
third_party/rust/libc-0.2.24/src/unix/bsd/netbsdlike/openbsdlike/other/mod.rs
third_party/rust/libc-0.2.24/src/unix/haiku/b32.rs
third_party/rust/libc-0.2.24/src/unix/haiku/b64.rs
third_party/rust/libc-0.2.24/src/unix/haiku/mod.rs
third_party/rust/libc-0.2.24/src/unix/mod.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/android/b32/arm.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/android/b32/mod.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/android/b32/x86.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/android/b64/aarch64.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/android/b64/mod.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/android/b64/x86_64.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/android/mod.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/linux/mips/mips32.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/linux/mips/mips64.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/linux/mips/mod.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/linux/mod.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/linux/musl/b32/arm.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/linux/musl/b32/asmjs.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/linux/musl/b32/mips.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/linux/musl/b32/mod.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/linux/musl/b32/x86.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/linux/musl/b64/aarch64.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/linux/musl/b64/mod.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/linux/musl/b64/powerpc64.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/linux/musl/b64/x86_64.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/linux/musl/mod.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/linux/other/b32/arm.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/linux/other/b32/mod.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/linux/other/b32/powerpc.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/linux/other/b32/x86.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/linux/other/b64/aarch64.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/linux/other/b64/mod.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/linux/other/b64/powerpc64.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/linux/other/b64/sparc64.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/linux/other/b64/x86_64.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/linux/other/mod.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/linux/s390x.rs
third_party/rust/libc-0.2.24/src/unix/notbsd/mod.rs
third_party/rust/libc-0.2.24/src/unix/solaris/mod.rs
third_party/rust/libc-0.2.24/src/unix/uclibc/mips/mips32.rs
third_party/rust/libc-0.2.24/src/unix/uclibc/mips/mips64.rs
third_party/rust/libc-0.2.24/src/unix/uclibc/mips/mod.rs
third_party/rust/libc-0.2.24/src/unix/uclibc/mod.rs
third_party/rust/libc-0.2.24/src/unix/uclibc/x86_64/mod.rs
third_party/rust/libc-0.2.24/src/windows.rs
third_party/rust/libc/.cargo-checksum.json
third_party/rust/libc/.travis.yml
third_party/rust/libc/Cargo.toml
third_party/rust/libc/README.md
third_party/rust/libc/appveyor.yml
third_party/rust/libc/ci/README.md
third_party/rust/libc/ci/android-accept-licenses.sh
third_party/rust/libc/ci/android-install-ndk.sh
third_party/rust/libc/ci/android-install-sdk.sh
third_party/rust/libc/ci/docker/aarch64-linux-android/Dockerfile
third_party/rust/libc/ci/docker/aarch64-unknown-linux-gnu/Dockerfile
third_party/rust/libc/ci/docker/aarch64-unknown-linux-musl/Dockerfile
third_party/rust/libc/ci/docker/arm-linux-androideabi/Dockerfile
third_party/rust/libc/ci/docker/arm-unknown-linux-gnueabihf/Dockerfile
third_party/rust/libc/ci/docker/arm-unknown-linux-musleabihf/Dockerfile
third_party/rust/libc/ci/docker/asmjs-unknown-emscripten/Dockerfile
third_party/rust/libc/ci/docker/i686-linux-android/Dockerfile
third_party/rust/libc/ci/docker/i686-unknown-linux-gnu/Dockerfile
third_party/rust/libc/ci/docker/i686-unknown-linux-musl/Dockerfile
third_party/rust/libc/ci/docker/mips-unknown-linux-gnu/Dockerfile
third_party/rust/libc/ci/docker/mips-unknown-linux-musl/Dockerfile
third_party/rust/libc/ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile
third_party/rust/libc/ci/docker/mips64el-unknown-linux-gnuabi64/Dockerfile
third_party/rust/libc/ci/docker/mipsel-unknown-linux-musl/Dockerfile
third_party/rust/libc/ci/docker/powerpc-unknown-linux-gnu/Dockerfile
third_party/rust/libc/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile
third_party/rust/libc/ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile
third_party/rust/libc/ci/docker/s390x-unknown-linux-gnu/Dockerfile
third_party/rust/libc/ci/docker/sparc64-unknown-linux-gnu/Dockerfile
third_party/rust/libc/ci/docker/wasm32-unknown-emscripten/Dockerfile
third_party/rust/libc/ci/docker/wasm32-unknown-emscripten/node-wrapper.sh
third_party/rust/libc/ci/docker/x86_64-linux-android/Dockerfile
third_party/rust/libc/ci/docker/x86_64-rumprun-netbsd/Dockerfile
third_party/rust/libc/ci/docker/x86_64-rumprun-netbsd/runtest.rs
third_party/rust/libc/ci/docker/x86_64-unknown-freebsd/Dockerfile
third_party/rust/libc/ci/docker/x86_64-unknown-linux-gnu/Dockerfile
third_party/rust/libc/ci/docker/x86_64-unknown-linux-gnux32/Dockerfile
third_party/rust/libc/ci/docker/x86_64-unknown-linux-musl/Dockerfile
third_party/rust/libc/ci/docker/x86_64-unknown-openbsd/Dockerfile
third_party/rust/libc/ci/emscripten-entry.sh
third_party/rust/libc/ci/emscripten.sh
third_party/rust/libc/ci/run-docker.sh
third_party/rust/libc/ci/run.sh
third_party/rust/libc/ci/runtest-android.rs
third_party/rust/libc/src/dox.rs
third_party/rust/libc/src/lib.rs
third_party/rust/libc/src/macros.rs
third_party/rust/libc/src/redox.rs
third_party/rust/libc/src/redox/mod.rs
third_party/rust/libc/src/redox/net.rs
third_party/rust/libc/src/unix/bsd/apple/b32.rs
third_party/rust/libc/src/unix/bsd/apple/b64.rs
third_party/rust/libc/src/unix/bsd/apple/mod.rs
third_party/rust/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs
third_party/rust/libc/src/unix/bsd/freebsdlike/freebsd/aarch64.rs
third_party/rust/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs
third_party/rust/libc/src/unix/bsd/freebsdlike/freebsd/x86_64.rs
third_party/rust/libc/src/unix/bsd/freebsdlike/mod.rs
third_party/rust/libc/src/unix/bsd/mod.rs
third_party/rust/libc/src/unix/bsd/netbsdlike/mod.rs
third_party/rust/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs
third_party/rust/libc/src/unix/bsd/netbsdlike/openbsdlike/mod.rs
third_party/rust/libc/src/unix/bsd/netbsdlike/openbsdlike/openbsd.rs
third_party/rust/libc/src/unix/haiku/b32.rs
third_party/rust/libc/src/unix/haiku/b64.rs
third_party/rust/libc/src/unix/haiku/mod.rs
third_party/rust/libc/src/unix/mod.rs
third_party/rust/libc/src/unix/newlib/arm/mod.rs
third_party/rust/libc/src/unix/newlib/mod.rs
third_party/rust/libc/src/unix/notbsd/android/b32/arm.rs
third_party/rust/libc/src/unix/notbsd/android/b32/mod.rs
third_party/rust/libc/src/unix/notbsd/android/b32/x86.rs
third_party/rust/libc/src/unix/notbsd/android/b64/aarch64.rs
third_party/rust/libc/src/unix/notbsd/android/b64/mod.rs
third_party/rust/libc/src/unix/notbsd/android/b64/x86_64.rs
third_party/rust/libc/src/unix/notbsd/android/mod.rs
third_party/rust/libc/src/unix/notbsd/emscripten.rs
third_party/rust/libc/src/unix/notbsd/linux/mips/mips32.rs
third_party/rust/libc/src/unix/notbsd/linux/mips/mips64.rs
third_party/rust/libc/src/unix/notbsd/linux/mips/mod.rs
third_party/rust/libc/src/unix/notbsd/linux/mod.rs
third_party/rust/libc/src/unix/notbsd/linux/musl/b32/arm.rs
third_party/rust/libc/src/unix/notbsd/linux/musl/b32/asmjs.rs
third_party/rust/libc/src/unix/notbsd/linux/musl/b32/mips.rs
third_party/rust/libc/src/unix/notbsd/linux/musl/b32/mod.rs
third_party/rust/libc/src/unix/notbsd/linux/musl/b32/x86.rs
third_party/rust/libc/src/unix/notbsd/linux/musl/b64/aarch64.rs
third_party/rust/libc/src/unix/notbsd/linux/musl/b64/mod.rs
third_party/rust/libc/src/unix/notbsd/linux/musl/b64/powerpc64.rs
third_party/rust/libc/src/unix/notbsd/linux/musl/b64/x86_64.rs
third_party/rust/libc/src/unix/notbsd/linux/musl/mod.rs
third_party/rust/libc/src/unix/notbsd/linux/other/b32/arm.rs
third_party/rust/libc/src/unix/notbsd/linux/other/b32/mod.rs
third_party/rust/libc/src/unix/notbsd/linux/other/b32/powerpc.rs
third_party/rust/libc/src/unix/notbsd/linux/other/b32/x86.rs
third_party/rust/libc/src/unix/notbsd/linux/other/b64/aarch64.rs
third_party/rust/libc/src/unix/notbsd/linux/other/b64/mod.rs
third_party/rust/libc/src/unix/notbsd/linux/other/b64/not_x32.rs
third_party/rust/libc/src/unix/notbsd/linux/other/b64/powerpc64.rs
third_party/rust/libc/src/unix/notbsd/linux/other/b64/sparc64.rs
third_party/rust/libc/src/unix/notbsd/linux/other/b64/x32.rs
third_party/rust/libc/src/unix/notbsd/linux/other/b64/x86_64.rs
third_party/rust/libc/src/unix/notbsd/linux/other/mod.rs
third_party/rust/libc/src/unix/notbsd/linux/s390x.rs
third_party/rust/libc/src/unix/notbsd/mod.rs
third_party/rust/libc/src/unix/solaris/mod.rs
third_party/rust/libc/src/unix/uclibc/mod.rs
third_party/rust/libc/src/unix/uclibc/x86_64/l4re.rs
third_party/rust/libc/src/unix/uclibc/x86_64/mod.rs
third_party/rust/libc/src/windows.rs
third_party/rust/matches-0.1.4/.cargo-checksum.json
third_party/rust/matches-0.1.4/Cargo.toml
third_party/rust/matches-0.1.4/LICENSE
third_party/rust/matches-0.1.4/lib.rs
third_party/rust/matches/.cargo-checksum.json
third_party/rust/matches/Cargo.toml
third_party/rust/matches/lib.rs
third_party/rust/memchr-1.0.1/.cargo-checksum.json
third_party/rust/memchr-1.0.1/.travis.yml
third_party/rust/memchr-1.0.1/COPYING
third_party/rust/memchr-1.0.1/Cargo.toml
third_party/rust/memchr-1.0.1/LICENSE-MIT
third_party/rust/memchr-1.0.1/Makefile
third_party/rust/memchr-1.0.1/README.md
third_party/rust/memchr-1.0.1/UNLICENSE
third_party/rust/memchr-1.0.1/appveyor.yml
third_party/rust/memchr-1.0.1/benches/bench.rs
third_party/rust/memchr-1.0.1/ctags.rust
third_party/rust/memchr-1.0.1/session.vim
third_party/rust/memchr-1.0.1/src/lib.rs
third_party/rust/memchr/.cargo-checksum.json
third_party/rust/memchr/Cargo.toml
third_party/rust/memchr/src/lib.rs
third_party/rust/mime-0.2.4/.cargo-checksum.json
third_party/rust/mime-0.2.4/.travis.yml
third_party/rust/mime-0.2.4/Cargo.toml
third_party/rust/mime-0.2.4/LICENSE
third_party/rust/mime-0.2.4/README.md
third_party/rust/mime-0.2.4/src/lib.rs
third_party/rust/mime/.cargo-checksum.json
third_party/rust/mime/Cargo.toml
third_party/rust/mime/src/lib.rs
third_party/rust/num_cpus-1.6.0/.appveyor.yml
third_party/rust/num_cpus-1.6.0/.cargo-checksum.json
third_party/rust/num_cpus-1.6.0/.travis.yml
third_party/rust/num_cpus-1.6.0/Cargo.toml
third_party/rust/num_cpus-1.6.0/LICENSE-APACHE
third_party/rust/num_cpus-1.6.0/LICENSE-MIT
third_party/rust/num_cpus-1.6.0/README.md
third_party/rust/num_cpus-1.6.0/src/lib.rs
third_party/rust/num_cpus/.cargo-checksum.json
third_party/rust/num_cpus/.travis.yml
third_party/rust/num_cpus/CHANGELOG.md
third_party/rust/num_cpus/CONTRIBUTING.md
third_party/rust/num_cpus/Cargo.toml
third_party/rust/num_cpus/README.md
third_party/rust/num_cpus/src/lib.rs
third_party/rust/redox_syscall-0.1.16/.cargo-checksum.json
third_party/rust/redox_syscall-0.1.16/Cargo.toml
third_party/rust/redox_syscall-0.1.16/src/arch/arm.rs
third_party/rust/redox_syscall-0.1.16/src/arch/x86.rs
third_party/rust/redox_syscall-0.1.16/src/arch/x86_64.rs
third_party/rust/redox_syscall-0.1.16/src/call.rs
third_party/rust/redox_syscall-0.1.16/src/data.rs
third_party/rust/redox_syscall-0.1.16/src/error.rs
third_party/rust/redox_syscall-0.1.16/src/flag.rs
third_party/rust/redox_syscall-0.1.16/src/io/dma.rs
third_party/rust/redox_syscall-0.1.16/src/io/io.rs
third_party/rust/redox_syscall-0.1.16/src/io/mmio.rs
third_party/rust/redox_syscall-0.1.16/src/io/mod.rs
third_party/rust/redox_syscall-0.1.16/src/io/pio.rs
third_party/rust/redox_syscall-0.1.16/src/lib.rs
third_party/rust/redox_syscall-0.1.16/src/number.rs
third_party/rust/redox_syscall-0.1.16/src/scheme.rs
third_party/rust/redox_syscall/.cargo-checksum.json
third_party/rust/redox_syscall/Cargo.toml
third_party/rust/redox_syscall/LICENSE
third_party/rust/redox_syscall/README.md
third_party/rust/redox_syscall/src/arch/arm.rs
third_party/rust/redox_syscall/src/arch/x86.rs
third_party/rust/redox_syscall/src/arch/x86_64.rs
third_party/rust/redox_syscall/src/call.rs
third_party/rust/redox_syscall/src/data.rs
third_party/rust/redox_syscall/src/flag.rs
third_party/rust/redox_syscall/src/number.rs
third_party/rust/redox_syscall/src/scheme.rs
third_party/rust/safemem/.cargo-checksum.json
third_party/rust/safemem/.idea/runConfigurations/cargo_check.xml
third_party/rust/safemem/Cargo.toml
third_party/rust/safemem/LICENSE-APACHE
third_party/rust/safemem/LICENSE-MIT
third_party/rust/safemem/README.md
third_party/rust/safemem/src/lib.rs
third_party/rust/thread_local-0.3.3/.cargo-checksum.json
third_party/rust/thread_local-0.3.3/.travis.yml
third_party/rust/thread_local-0.3.3/Cargo.toml
third_party/rust/thread_local-0.3.3/LICENSE-APACHE
third_party/rust/thread_local-0.3.3/LICENSE-MIT
third_party/rust/thread_local-0.3.3/README.md
third_party/rust/thread_local-0.3.3/src/lib.rs
third_party/rust/thread_local/.cargo-checksum.json
third_party/rust/thread_local/.travis.yml
third_party/rust/thread_local/Cargo.toml
third_party/rust/thread_local/benches/thread_local.rs
third_party/rust/thread_local/src/lib.rs
third_party/rust/thread_local/src/thread_id.rs
third_party/rust/time-0.1.36/.cargo-checksum.json
third_party/rust/time-0.1.36/.travis.yml
third_party/rust/time-0.1.36/Cargo.toml
third_party/rust/time-0.1.36/LICENSE-APACHE
third_party/rust/time-0.1.36/LICENSE-MIT
third_party/rust/time-0.1.36/README.md
third_party/rust/time-0.1.36/appveyor.yml
third_party/rust/time-0.1.36/benches/precise_time_ns.rs
third_party/rust/time-0.1.36/src/display.rs
third_party/rust/time-0.1.36/src/duration.rs
third_party/rust/time-0.1.36/src/lib.rs
third_party/rust/time-0.1.36/src/parse.rs
third_party/rust/time-0.1.36/src/sys.rs
third_party/rust/time/.cargo-checksum.json
third_party/rust/time/Cargo.toml
third_party/rust/time/src/sys.rs
third_party/rust/unicase-1.4.0/.cargo-checksum.json
third_party/rust/unicase-1.4.0/.travis.yml
third_party/rust/unicase-1.4.0/Cargo.toml
third_party/rust/unicase-1.4.0/LICENSE
third_party/rust/unicase-1.4.0/README.md
third_party/rust/unicase-1.4.0/build.rs
third_party/rust/unicase-1.4.0/src/lib.rs
third_party/rust/unicase/.cargo-checksum.json
third_party/rust/unicase/.travis.yml
third_party/rust/unicase/Cargo.toml
third_party/rust/unicase/build.rs
third_party/rust/unicase/src/lib.rs
third_party/rust/unicode-bidi-0.3.3/.cargo-checksum.json
third_party/rust/unicode-bidi-0.3.3/.rustfmt.toml
third_party/rust/unicode-bidi-0.3.3/.travis.yml
third_party/rust/unicode-bidi-0.3.3/AUTHORS
third_party/rust/unicode-bidi-0.3.3/COPYRIGHT
third_party/rust/unicode-bidi-0.3.3/Cargo.toml
third_party/rust/unicode-bidi-0.3.3/LICENSE-APACHE
third_party/rust/unicode-bidi-0.3.3/LICENSE-MIT
third_party/rust/unicode-bidi-0.3.3/README.md
third_party/rust/unicode-bidi-0.3.3/benches/basic.rs
third_party/rust/unicode-bidi-0.3.3/benches/udhr.rs
third_party/rust/unicode-bidi-0.3.3/benches/udhr_data/README.md
third_party/rust/unicode-bidi-0.3.3/src/char_data/mod.rs
third_party/rust/unicode-bidi-0.3.3/src/char_data/tables.rs
third_party/rust/unicode-bidi-0.3.3/src/deprecated.rs
third_party/rust/unicode-bidi-0.3.3/src/explicit.rs
third_party/rust/unicode-bidi-0.3.3/src/format_chars.rs
third_party/rust/unicode-bidi-0.3.3/src/implicit.rs
third_party/rust/unicode-bidi-0.3.3/src/level.rs
third_party/rust/unicode-bidi-0.3.3/src/lib.rs
third_party/rust/unicode-bidi-0.3.3/src/prepare.rs
third_party/rust/unicode-bidi-0.3.3/tests/conformance_tests.rs
third_party/rust/unicode-bidi-0.3.3/tools/generate.py
third_party/rust/unicode-bidi/.appveyor.yml
third_party/rust/unicode-bidi/.cargo-checksum.json
third_party/rust/unicode-bidi/.travis.yml
third_party/rust/unicode-bidi/Cargo.toml
third_party/rust/unicode-bidi/README.md
third_party/rust/unicode-bidi/benches/basic.rs
third_party/rust/unicode-bidi/benches/udhr.rs
third_party/rust/unicode-bidi/benches/udhr_data/README.md
third_party/rust/unicode-bidi/src/char_data/mod.rs
third_party/rust/unicode-bidi/src/char_data/tables.rs
third_party/rust/unicode-bidi/src/deprecated.rs
third_party/rust/unicode-bidi/src/explicit.rs
third_party/rust/unicode-bidi/src/format_chars.rs
third_party/rust/unicode-bidi/src/implicit.rs
third_party/rust/unicode-bidi/src/level.rs
third_party/rust/unicode-bidi/src/lib.rs
third_party/rust/unicode-bidi/src/prepare.rs
third_party/rust/unicode-bidi/tests/conformance_tests.rs
third_party/rust/unicode-bidi/tools/generate.py
third_party/rust/unreachable-0.1.1/.cargo-checksum.json
third_party/rust/unreachable-0.1.1/.travis.yml
third_party/rust/unreachable-0.1.1/Cargo.toml
third_party/rust/unreachable-0.1.1/README.md
third_party/rust/unreachable-0.1.1/src/lib.rs
third_party/rust/unreachable/.cargo-checksum.json
third_party/rust/unreachable/Cargo.toml
third_party/rust/unreachable/LICENSE-APACHE
third_party/rust/unreachable/LICENSE-MIT
third_party/rust/unreachable/README.md
third_party/rust/url-1.5.1/.cargo-checksum.json
third_party/rust/url-1.5.1/.travis.yml
third_party/rust/url-1.5.1/Cargo.toml
third_party/rust/url-1.5.1/LICENSE-APACHE
third_party/rust/url-1.5.1/LICENSE-MIT
third_party/rust/url-1.5.1/Makefile
third_party/rust/url-1.5.1/README.md
third_party/rust/url-1.5.1/UPGRADING.md
third_party/rust/url-1.5.1/appveyor.yml
third_party/rust/url-1.5.1/docs/.nojekyll
third_party/rust/url-1.5.1/docs/404.html
third_party/rust/url-1.5.1/docs/index.html
third_party/rust/url-1.5.1/github.png
third_party/rust/url-1.5.1/rust-url-todo
third_party/rust/url-1.5.1/src/encoding.rs
third_party/rust/url-1.5.1/src/form_urlencoded.rs
third_party/rust/url-1.5.1/src/host.rs
third_party/rust/url-1.5.1/src/lib.rs
third_party/rust/url-1.5.1/src/origin.rs
third_party/rust/url-1.5.1/src/parser.rs
third_party/rust/url-1.5.1/src/path_segments.rs
third_party/rust/url-1.5.1/src/quirks.rs
third_party/rust/url-1.5.1/src/slicing.rs
third_party/rust/url-1.5.1/tests/data.rs
third_party/rust/url-1.5.1/tests/setters_tests.json
third_party/rust/url-1.5.1/tests/unit.rs
third_party/rust/url-1.5.1/tests/urltestdata.json
third_party/rust/url/.cargo-checksum.json
third_party/rust/url/Cargo.toml
third_party/rust/url/src/form_urlencoded.rs
third_party/rust/url/src/host.rs
third_party/rust/url/src/lib.rs
third_party/rust/url/src/origin.rs
third_party/rust/url/src/parser.rs
third_party/rust/url/src/quirks.rs
third_party/rust/url/tests/data.rs
third_party/rust/url/tests/unit.rs
third_party/rust/url/tests/urltestdata.json
third_party/rust/version_check/.cargo-checksum.json
third_party/rust/version_check/Cargo.toml
third_party/rust/version_check/LICENSE
third_party/rust/version_check/README.md
third_party/rust/version_check/src/lib.rs
deleted file mode 100644
--- a/third_party/rust/base64-0.5.2/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{"Cargo.toml":"79fbb792e6c1d05c44188c808ef7120c592e50291a706fe0f669b8ac9a2ad5e5","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0dd882e53de11566d50f8e8e2d5a651bcf3fabee4987d70f306233cf39094ba7","README.md":"b2da2fd61c4f3abf45127d183b61eb2dabc1c97cd191854987aa0328549a663f","benches/benchmarks.rs":"f0469f65f901c3e92fa506c0deb277fd136a7f968cae7cc4f030c0c15e52322f","examples/make_tables.rs":"3c80f2a8cdb204168cc1b60f8904d544b2da067b9e6a7b40ade5fb4a994b4175","src/lib.rs":"a3ac363513ae99a9b0049c19c92bc46b57ac9a0ebfd3317b7b387c5fbaa16a8a","src/tables.rs":"378743892907cde87c1a92e6afee2df36ce590311e61381b2cc0404b3e018039","tests/tests.rs":"dc2c293bae576cc596bdfb6ef783dc1d24d3bf992bf532caaebe1738cb0608cc"},"package":"30e93c03064e7590d0466209155251b90c22e37fab1daf2771582598b5827557"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/base64-0.5.2/Cargo.toml
+++ /dev/null
@@ -1,21 +0,0 @@
-[package]
-name = "base64"
-version = "0.5.2"
-authors = ["Alice Maz <alice@alicemaz.com>", "Marshall Pierce <marshall@mpierce.org>"]
-description = "encodes and decodes base64 as bytes or utf8"
-repository = "https://github.com/alicemaz/rust-base64"
-documentation = "https://github.com/alicemaz/rust-base64/blob/master/README.md"
-readme = "README.md"
-keywords = ["base64", "utf8", "encode", "decode"]
-categories = ["encoding"]
-license = "MIT"
-
-[dependencies]
-byteorder = "1.0.0"
-
-[dev-dependencies]
-rand = "=0.3.15"
-
-[profile.bench]
-# Uncomment when using `perf record`
-#debug = true
deleted file mode 100644
--- a/third_party/rust/base64-0.5.2/LICENSE-APACHE
+++ /dev/null
@@ -1,201 +0,0 @@
-                              Apache License
-                        Version 2.0, January 2004
-                     http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-   "License" shall mean the terms and conditions for use, reproduction,
-   and distribution as defined by Sections 1 through 9 of this document.
-
-   "Licensor" shall mean the copyright owner or entity authorized by
-   the copyright owner that is granting the License.
-
-   "Legal Entity" shall mean the union of the acting entity and all
-   other entities that control, are controlled by, or are under common
-   control with that entity. For the purposes of this definition,
-   "control" means (i) the power, direct or indirect, to cause the
-   direction or management of such entity, whether by contract or
-   otherwise, or (ii) ownership of fifty percent (50%) or more of the
-   outstanding shares, or (iii) beneficial ownership of such entity.
-
-   "You" (or "Your") shall mean an individual or Legal Entity
-   exercising permissions granted by this License.
-
-   "Source" form shall mean the preferred form for making modifications,
-   including but not limited to software source code, documentation
-   source, and configuration files.
-
-   "Object" form shall mean any form resulting from mechanical
-   transformation or translation of a Source form, including but
-   not limited to compiled object code, generated documentation,
-   and conversions to other media types.
-
-   "Work" shall mean the work of authorship, whether in Source or
-   Object form, made available under the License, as indicated by a
-   copyright notice that is included in or attached to the work
-   (an example is provided in the Appendix below).
-
-   "Derivative Works" shall mean any work, whether in Source or Object
-   form, that is based on (or derived from) the Work and for which the
-   editorial revisions, annotations, elaborations, or other modifications
-   represent, as a whole, an original work of authorship. For the purposes
-   of this License, Derivative Works shall not include works that remain
-   separable from, or merely link (or bind by name) to the interfaces of,
-   the Work and Derivative Works thereof.
-
-   "Contribution" shall mean any work of authorship, including
-   the original version of the Work and any modifications or additions
-   to that Work or Derivative Works thereof, that is intentionally
-   submitted to Licensor for inclusion in the Work by the copyright owner
-   or by an individual or Legal Entity authorized to submit on behalf of
-   the copyright owner. For the purposes of this definition, "submitted"
-   means any form of electronic, verbal, or written communication sent
-   to the Licensor or its representatives, including but not limited to
-   communication on electronic mailing lists, source code control systems,
-   and issue tracking systems that are managed by, or on behalf of, the
-   Licensor for the purpose of discussing and improving the Work, but
-   excluding communication that is conspicuously marked or otherwise
-   designated in writing by the copyright owner as "Not a Contribution."
-
-   "Contributor" shall mean Licensor and any individual or Legal Entity
-   on behalf of whom a Contribution has been received by Licensor and
-   subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   copyright license to reproduce, prepare Derivative Works of,
-   publicly display, publicly perform, sublicense, and distribute the
-   Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   (except as stated in this section) patent license to make, have made,
-   use, offer to sell, sell, import, and otherwise transfer the Work,
-   where such license applies only to those patent claims licensable
-   by such Contributor that are necessarily infringed by their
-   Contribution(s) alone or by combination of their Contribution(s)
-   with the Work to which such Contribution(s) was submitted. If You
-   institute patent litigation against any entity (including a
-   cross-claim or counterclaim in a lawsuit) alleging that the Work
-   or a Contribution incorporated within the Work constitutes direct
-   or contributory patent infringement, then any patent licenses
-   granted to You under this License for that Work shall terminate
-   as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
-   Work or Derivative Works thereof in any medium, with or without
-   modifications, and in Source or Object form, provided that You
-   meet the following conditions:
-
-   (a) You must give any other recipients of the Work or
-       Derivative Works a copy of this License; and
-
-   (b) You must cause any modified files to carry prominent notices
-       stating that You changed the files; and
-
-   (c) You must retain, in the Source form of any Derivative Works
-       that You distribute, all copyright, patent, trademark, and
-       attribution notices from the Source form of the Work,
-       excluding those notices that do not pertain to any part of
-       the Derivative Works; and
-
-   (d) If the Work includes a "NOTICE" text file as part of its
-       distribution, then any Derivative Works that You distribute must
-       include a readable copy of the attribution notices contained
-       within such NOTICE file, excluding those notices that do not
-       pertain to any part of the Derivative Works, in at least one
-       of the following places: within a NOTICE text file distributed
-       as part of the Derivative Works; within the Source form or
-       documentation, if provided along with the Derivative Works; or,
-       within a display generated by the Derivative Works, if and
-       wherever such third-party notices normally appear. The contents
-       of the NOTICE file are for informational purposes only and
-       do not modify the License. You may add Your own attribution
-       notices within Derivative Works that You distribute, alongside
-       or as an addendum to the NOTICE text from the Work, provided
-       that such additional attribution notices cannot be construed
-       as modifying the License.
-
-   You may add Your own copyright statement to Your modifications and
-   may provide additional or different license terms and conditions
-   for use, reproduction, or distribution of Your modifications, or
-   for any such Derivative Works as a whole, provided Your use,
-   reproduction, and distribution of the Work otherwise complies with
-   the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
-   any Contribution intentionally submitted for inclusion in the Work
-   by You to the Licensor shall be under the terms and conditions of
-   this License, without any additional terms or conditions.
-   Notwithstanding the above, nothing herein shall supersede or modify
-   the terms of any separate license agreement you may have executed
-   with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
-   names, trademarks, service marks, or product names of the Licensor,
-   except as required for reasonable and customary use in describing the
-   origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
-   agreed to in writing, Licensor provides the Work (and each
-   Contributor provides its Contributions) on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-   implied, including, without limitation, any warranties or conditions
-   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-   PARTICULAR PURPOSE. You are solely responsible for determining the
-   appropriateness of using or redistributing the Work and assume any
-   risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
-   whether in tort (including negligence), contract, or otherwise,
-   unless required by applicable law (such as deliberate and grossly
-   negligent acts) or agreed to in writing, shall any Contributor be
-   liable to You for damages, including any direct, indirect, special,
-   incidental, or consequential damages of any character arising as a
-   result of this License or out of the use or inability to use the
-   Work (including but not limited to damages for loss of goodwill,
-   work stoppage, computer failure or malfunction, or any and all
-   other commercial damages or losses), even if such Contributor
-   has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
-   the Work or Derivative Works thereof, You may choose to offer,
-   and charge a fee for, acceptance of support, warranty, indemnity,
-   or other liability obligations and/or rights consistent with this
-   License. However, in accepting such obligations, You may act only
-   on Your own behalf and on Your sole responsibility, not on behalf
-   of any other Contributor, and only if You agree to indemnify,
-   defend, and hold each Contributor harmless for any liability
-   incurred by, or claims asserted against, such Contributor by reason
-   of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
-   To apply the Apache License to your work, attach the following
-   boilerplate notice, with the fields enclosed by brackets "[]"
-   replaced with your own identifying information. (Don't include
-   the brackets!)  The text should be enclosed in the appropriate
-   comment syntax for the file format. We also recommend that a
-   file or class name and description of purpose be included on the
-   same "printed page" as the copyright notice for easier
-   identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-	http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
deleted file mode 100644
--- a/third_party/rust/base64-0.5.2/LICENSE-MIT
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Alice Maz
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
deleted file mode 100644
--- a/third_party/rust/base64-0.5.2/README.md
+++ /dev/null
@@ -1,112 +0,0 @@
-[base64](https://crates.io/crates/base64)
-===
-
-It's base64. What more could anyone want?
-
-Example
----
-
-In Cargo.toml: `base64 = "~0.5.0"`
-
-```rust
-extern crate base64;
-
-use base64::{encode, decode};
-
-fn main() {
-    let a = b"hello world";
-    let b = "aGVsbG8gd29ybGQ=";
-
-    assert_eq!(encode(a), b);
-    assert_eq!(a, &decode(b).unwrap()[..]);
-}
-```
-
-API
----
-
-base64 exposes six functions:
-
-```rust
-fn encode<T: ?Sized + AsRef<[u8]>>(&T) -> String;
-fn decode<T: ?Sized + AsRef<[u8]>>(&T) -> Result<Vec<u8>, DecodeError>;
-fn encode_config<T: ?Sized + AsRef<[u8]>>(&T, Config) -> String;
-fn encode_config_buf<T: ?Sized + AsRef<[u8]>>(&T, Config, &mut String);
-fn decode_config<T: ?Sized + AsRef<[u8]>>(&T, Config) -> Result<Vec<u8>, DecodeError>;
-fn decode_config_buf<T: ?Sized + AsRef<[u8]>>(&T, Config, &mut Vec<u8>) -> Result<(), DecodeError>;
-```
-
-`STANDARD`, `URL_SAFE`, `URL_SAFE_NO_PAD`, and `MIME` configuation structs are provided for convenience. `encode` and `decode` are convenience wrappers for the `_config` functions called with the `STANDARD` config, and they are themselves wrappers of the `_buf` functions that allocate on the user's behalf. Encode produces valid padding absent a config that states otherwise; decode produces the same output for valid or omitted padding in all cases, but errors on invalid (superfluous) padding. Whitespace in the input to decode is an error for all modes except `MIME`, which disregards it ("whitespace" according to POSIX-locale `isspace`, meaning \n \r \f \t \v and space).
-
-`Config` exposes a constructor to allow custom combinations of character set, output padding, input whitespace permissiveness, linewrapping, and line ending character(s). The vast majority of usecases should be covered by the four provided, however.
-
-Purpose
----
-
-I have a fondness for small dependency footprints, ecosystems where you can pick and choose what functionality you need, and no more. Unix philosophy sort of thing I guess, many tiny utilities interoperating across a common interface. One time making a Twitter bot, I ran into the need to correctly pluralize arbitrary words. I found on npm a module that did nothing but pluralize words. Nothing else, just a couple of functions. I'd like for this to be that "just a couple of functions."
-
-Developing
----
-
-Benchmarks are in `benches/`. Running them requires nightly rust, but `rustup` makes it easy:
-
-```
-rustup run nightly cargo bench
-```
-
-Decoding is aided by some pre-calculated tables, which are generated by:
-
-```
-cargo run --example make_tables > src/tables.rs.tmp && mv src/tables.rs.tmp src/tables.rs
-```
-
-Profiling
----
-
-On Linux, you can use [perf](https://perf.wiki.kernel.org/index.php/Main_Page) for profiling. First, enable debug symbols in Cargo.toml. Don't commit this change, though, since it's usually not what you want (and costs some performance):
-
-```
-[profile.release]
-debug = true
-```
-
-Then compile the benchmarks. (Just re-run them and ^C once the benchmarks start running; all that's needed is to recompile them.)
-
-Run the benchmark binary with `perf` (shown here filtering to one particular benchmark, which will make the results easier to read). `perf` is only available to the root user on most systems as it fiddles with event counters in your CPU, so use `sudo`. We need to run the actual benchmark binary, hence the path into `target`. You can see the actual full path with `rustup run nightly cargo bench -v`; it will print out the commands it runs. If you use the exact path that `bench` outputs, make sure you get the one that's for the benchmarks, not the tests. You may also want to `cargo clean` so you have only one `benchmarks-` binary (they tend to accumulate).
-
-```
-sudo perf record target/release/deps/benchmarks-* --bench decode_10mib_reuse
-```
-
-Then analyze the results, again with perf:
-
-```
-sudo perf annotate -l
-```
-
-You'll see a bunch of interleaved rust source and assembly like this. The section with `lib.rs:327` is telling us that 4.02% of samples saw the `movzbl` aka bit shift as the active instruction. However, this percentage is not as exact as it seems due to a phenomenon called *skid*. Basically, a consequence of how fancy modern CPUs are is that this sort of instruction profiling is inherently inaccurate, especially in branch-heavy code.
-
-```
- lib.rs:322    0.70 :     10698:       mov    %rdi,%rax
-    2.82 :        1069b:       shr    $0x38,%rax
-         :                  if morsel == decode_tables::INVALID_VALUE {
-         :                      bad_byte_index = input_index;
-         :                      break;
-         :                  };
-         :                  accum = (morsel as u64) << 58;
- lib.rs:327    4.02 :     1069f:       movzbl (%r9,%rax,1),%r15d
-         :              // fast loop of 8 bytes at a time
-         :              while input_index < length_of_full_chunks {
-         :                  let mut accum: u64;
-         :
-         :                  let input_chunk = BigEndian::read_u64(&input_bytes[input_index..(input_index + 8)]);
-         :                  morsel = decode_table[(input_chunk >> 56) as usize];
- lib.rs:322    3.68 :     106a4:       cmp    $0xff,%r15
-         :                  if morsel == decode_tables::INVALID_VALUE {
-    0.00 :        106ab:       je     1090e <base64::decode_config_buf::hbf68a45fefa299c1+0x46e>
-```
-
-License
----
-
-This project is dual-licensed under MIT and Apache 2.0.
deleted file mode 100644
--- a/third_party/rust/base64-0.5.2/benches/benchmarks.rs
+++ /dev/null
@@ -1,230 +0,0 @@
-#![feature(test)]
-
-extern crate base64;
-extern crate test;
-extern crate rand;
-
-use base64::{decode, decode_config_buf, encode, encode_config_buf, STANDARD};
-
-use test::Bencher;
-use rand::Rng;
-
-#[bench]
-fn encode_3b(b: &mut Bencher) {
-    do_encode_bench(b, 3)
-}
-
-#[bench]
-fn encode_3b_reuse_buf(b: &mut Bencher) {
-    do_encode_bench_reuse_buf(b, 3)
-}
-
-#[bench]
-fn encode_50b(b: &mut Bencher) {
-    do_encode_bench(b, 50)
-}
-
-#[bench]
-fn encode_50b_reuse_buf(b: &mut Bencher) {
-    do_encode_bench_reuse_buf(b, 50)
-}
-
-#[bench]
-fn encode_100b(b: &mut Bencher) {
-    do_encode_bench(b, 100)
-}
-
-#[bench]
-fn encode_100b_reuse_buf(b: &mut Bencher) {
-    do_encode_bench_reuse_buf(b, 100)
-}
-
-#[bench]
-fn encode_500b(b: &mut Bencher) {
-    do_encode_bench(b, 500)
-}
-
-#[bench]
-fn encode_500b_reuse_buf(b: &mut Bencher) {
-    do_encode_bench_reuse_buf(b, 500)
-}
-
-#[bench]
-fn encode_3kib(b: &mut Bencher) {
-    do_encode_bench(b, 3 * 1024)
-}
-
-#[bench]
-fn encode_3kib_reuse_buf(b: &mut Bencher) {
-    do_encode_bench_reuse_buf(b, 3 * 1024)
-}
-
-#[bench]
-fn encode_3mib(b: &mut Bencher) {
-    do_encode_bench(b, 3 * 1024 * 1024)
-}
-
-#[bench]
-fn encode_3mib_reuse_buf(b: &mut Bencher) {
-    do_encode_bench_reuse_buf(b, 3 * 1024 * 1024)
-}
-
-#[bench]
-fn encode_10mib(b: &mut Bencher) {
-    do_encode_bench(b, 10 * 1024 * 1024)
-}
-
-#[bench]
-fn encode_10mib_reuse_buf(b: &mut Bencher) {
-    do_encode_bench_reuse_buf(b, 10 * 1024 * 1024)
-}
-
-#[bench]
-fn encode_30mib(b: &mut Bencher) {
-    do_encode_bench(b, 30 * 1024 * 1024)
-}
-
-#[bench]
-fn encode_30mib_reuse_buf(b: &mut Bencher) {
-    do_encode_bench_reuse_buf(b, 30 * 1024 * 1024)
-}
-
-#[bench]
-fn decode_3b(b: &mut Bencher) {
-    do_decode_bench(b, 3)
-}
-
-#[bench]
-fn decode_3b_reuse_buf(b: &mut Bencher) {
-    do_decode_bench_reuse_buf(b, 3)
-}
-
-#[bench]
-fn decode_50b(b: &mut Bencher) {
-    do_decode_bench(b, 50)
-}
-
-#[bench]
-fn decode_50b_reuse_buf(b: &mut Bencher) {
-    do_decode_bench_reuse_buf(b, 50)
-}
-
-#[bench]
-fn decode_100b(b: &mut Bencher) {
-    do_decode_bench(b, 100)
-}
-
-#[bench]
-fn decode_100b_reuse_buf(b: &mut Bencher) {
-    do_decode_bench_reuse_buf(b, 100)
-}
-
-#[bench]
-fn decode_500b(b: &mut Bencher) {
-    do_decode_bench(b, 500)
-}
-
-#[bench]
-fn decode_500b_reuse_buf(b: &mut Bencher) {
-    do_decode_bench_reuse_buf(b, 500)
-}
-
-#[bench]
-fn decode_3kib(b: &mut Bencher) {
-    do_decode_bench(b, 3 * 1024)
-}
-
-#[bench]
-fn decode_3kib_reuse_buf(b: &mut Bencher) {
-    do_decode_bench_reuse_buf(b, 3 * 1024)
-}
-
-#[bench]
-fn decode_3mib(b: &mut Bencher) {
-    do_decode_bench(b, 3 * 1024 * 1024)
-}
-
-#[bench]
-fn decode_3mib_reuse_buf(b: &mut Bencher) {
-    do_decode_bench_reuse_buf(b, 3 * 1024 * 1024)
-}
-
-#[bench]
-fn decode_10mib(b: &mut Bencher) {
-    do_decode_bench(b, 10 * 1024 * 1024)
-}
-
-#[bench]
-fn decode_10mib_reuse_buf(b: &mut Bencher) {
-    do_decode_bench_reuse_buf(b, 10 * 1024 * 1024)
-}
-
-#[bench]
-fn decode_30mib(b: &mut Bencher) {
-    do_decode_bench(b, 30 * 1024 * 1024)
-}
-
-#[bench]
-fn decode_30mib_reuse_buf(b: &mut Bencher) {
-    do_decode_bench_reuse_buf(b, 30 * 1024 * 1024)
-}
-
-fn do_decode_bench(b: &mut Bencher, size: usize) {
-    let mut v: Vec<u8> = Vec::with_capacity(size * 3 / 4);
-    fill(&mut v);
-    let encoded = encode(&v);
-
-    b.bytes = encoded.len() as u64;
-    b.iter(|| {
-        let orig = decode(&encoded);
-        test::black_box(&orig);
-    });
-}
-
-fn do_decode_bench_reuse_buf(b: &mut Bencher, size: usize) {
-    let mut v: Vec<u8> = Vec::with_capacity(size * 3 / 4);
-    fill(&mut v);
-    let encoded = encode(&v);
-
-    let mut buf = Vec::new();
-    b.bytes = encoded.len() as u64;
-    b.iter(|| {
-        decode_config_buf(&encoded, STANDARD, &mut buf).unwrap();
-        test::black_box(&buf);
-        buf.clear();
-    });
-}
-
-fn do_encode_bench(b: &mut Bencher, size: usize) {
-    let mut v: Vec<u8> = Vec::with_capacity(size);
-    fill(&mut v);
-
-    b.bytes = v.len() as u64;
-    b.iter(|| {
-        let e = encode(&v);
-        test::black_box(&e);
-    });
-}
-
-fn do_encode_bench_reuse_buf(b: &mut Bencher, size: usize) {
-    let mut v: Vec<u8> = Vec::with_capacity(size);
-    fill(&mut v);
-
-    let mut buf = String::new();
-
-    b.bytes = v.len() as u64;
-    b.iter(|| {
-        let e = encode_config_buf(&v, STANDARD, &mut buf);
-        test::black_box(&e);
-        buf.clear();
-    });
-}
-
-fn fill(v: &mut Vec<u8>) {
-    let cap = v.capacity();
-    // weak randomness is plenty; we just want to not be completely friendly to the branch predictor
-    let mut r = rand::weak_rng();
-    while v.len() < cap {
-        v.push(r.gen::<u8>());
-    }
-}
deleted file mode 100644
--- a/third_party/rust/base64-0.5.2/examples/make_tables.rs
+++ /dev/null
@@ -1,73 +0,0 @@
-use std::collections::HashMap;
-use std::iter::Iterator;
-
-fn main() {
-    println!("pub const INVALID_VALUE: u8 = 255;");
-
-    // A-Z
-    let standard_alphabet: Vec<u8> = (0x41..0x5B)
-        // a-z
-        .chain(0x61..0x7B)
-        // 0-9
-        .chain(0x30..0x3A)
-        // +
-        .chain(0x2B..0x2C)
-        // /
-        .chain(0x2F..0x30)
-        .collect();
-    print_encode_table(&standard_alphabet, "STANDARD_ENCODE", 0);
-    print_decode_table(&standard_alphabet, "STANDARD_DECODE", 0);
-
-    // A-Z
-    let url_alphabet: Vec<u8> = (0x41..0x5B)
-        // a-z
-        .chain(0x61..0x7B)
-        // 0-9
-        .chain(0x30..0x3A)
-        // -
-        .chain(0x2D..0x2E)
-        // _s
-        .chain(0x5F..0x60)
-        .collect();
-    print_encode_table(&url_alphabet, "URL_SAFE_ENCODE", 0);
-    print_decode_table(&url_alphabet, "URL_SAFE_DECODE", 0);
-
-}
-
-fn print_encode_table(alphabet: &[u8], const_name: &str, indent_depth: usize) {
-    println!("{:width$}pub const {}: &'static [u8; 64] = &[", "", const_name, width=indent_depth);
-
-    for (i, b) in alphabet.iter().enumerate() {
-        println!("{:width$}{}, // input {} (0x{:X}) => '{}' (0x{:X})", "",
-                 b, i, i, String::from_utf8(vec!(*b as u8)).unwrap(), b, width=indent_depth + 4);
-    }
-
-    println!("{:width$}];", "", width=indent_depth);
-}
-
-fn print_decode_table(alphabet: &[u8], const_name: &str, indent_depth: usize) {
-    // map of alphabet bytes to 6-bit morsels
-    let mut input_to_morsel = HashMap::<u8, u8>::new();
-
-    // standard base64 alphabet bytes, in order
-    for (morsel, ascii_byte) in alphabet.iter().enumerate() {
-        // truncation cast is fine here
-        let _ = input_to_morsel.insert(*ascii_byte, morsel as u8);
-    }
-
-    println!("{:width$}pub const {}: &'static [u8; 256] = &[", "", const_name, width=indent_depth);
-    for ascii_byte in 0..256 {
-        let (value, comment) = match input_to_morsel.get(&(ascii_byte as u8)) {
-            None => ("INVALID_VALUE".to_string(),
-                    format!("input {} (0x{:X})", ascii_byte, ascii_byte)),
-            Some(v) => (format!("{}", *v),
-                        format!("input {} (0x{:X} char '{}') => {} (0x{:X})",
-                                ascii_byte,
-                                ascii_byte,
-                                String::from_utf8(vec!(ascii_byte as u8)).unwrap(), *v, *v))
-        };
-
-        println!("{:width$}{}, // {}", "", value, comment, width=indent_depth + 4);
-    }
-    println!("{:width$}];", "", width=indent_depth);
-}
deleted file mode 100644
--- a/third_party/rust/base64-0.5.2/src/lib.rs
+++ /dev/null
@@ -1,675 +0,0 @@
-extern crate byteorder;
-
-use std::{fmt, error, str};
-
-use byteorder::{BigEndian, ByteOrder};
-
-mod tables;
-
-/// Available encoding character sets
-#[derive(Clone, Copy, Debug)]
-pub enum CharacterSet {
-    /// The standard character set (uses `+` and `/`)
-    Standard,
-    /// The URL safe character set (uses `-` and `_`)
-    UrlSafe
-}
-
-#[derive(Clone, Copy, Debug)]
-pub enum LineEnding {
-    LF,
-    CRLF,
-}
-
-#[derive(Clone, Copy, Debug)]
-pub enum LineWrap {
-    NoWrap,
-    Wrap(usize, LineEnding)
-}
-
-/// Contains configuration parameters for base64 encoding
-#[derive(Clone, Copy, Debug)]
-pub struct Config {
-    /// Character set to use
-    char_set: CharacterSet,
-    /// True to pad output with `=` characters
-    pad: bool,
-    /// Remove whitespace before decoding, at the cost of an allocation
-    strip_whitespace: bool,
-    /// ADT signifying whether to linewrap output, and if so by how many characters and with what ending
-    line_wrap: LineWrap,
-}
-
-impl Config {
-    pub fn new(char_set: CharacterSet,
-               pad: bool,
-               strip_whitespace: bool,
-               input_line_wrap: LineWrap) -> Config {
-        let line_wrap = match input_line_wrap  {
-            LineWrap::Wrap(0, _) => LineWrap::NoWrap,
-            _ => input_line_wrap,
-        };
-
-        Config {
-            char_set: char_set,
-            pad: pad,
-            strip_whitespace: strip_whitespace,
-            line_wrap: line_wrap,
-        }
-    }
-}
-
-pub static STANDARD: Config = Config {
-    char_set: CharacterSet::Standard,
-    pad: true,
-    strip_whitespace: false,
-    line_wrap: LineWrap::NoWrap,
-};
-
-pub static MIME: Config = Config {
-    char_set: CharacterSet::Standard,
-    pad: true,
-    strip_whitespace: true,
-    line_wrap: LineWrap::Wrap(76, LineEnding::CRLF),
-};
-
-pub static URL_SAFE: Config = Config {
-    char_set: CharacterSet::UrlSafe,
-    pad: true,
-    strip_whitespace: false,
-    line_wrap: LineWrap::NoWrap,
-};
-
-pub static URL_SAFE_NO_PAD: Config = Config {
-    char_set: CharacterSet::UrlSafe,
-    pad: false,
-    strip_whitespace: false,
-    line_wrap: LineWrap::NoWrap,
-};
-
-
-#[derive(Debug, PartialEq, Eq)]
-pub enum DecodeError {
-    InvalidByte(usize, u8),
-    InvalidLength,
-}
-
-impl fmt::Display for DecodeError {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            DecodeError::InvalidByte(index, byte) =>
-                write!(f, "Invalid byte {}, offset {}.", byte, index),
-            DecodeError::InvalidLength =>
-                write!(f, "Encoded text cannot have a 6-bit remainder.")
-        }
-    }
-}
-
-impl error::Error for DecodeError {
-    fn description(&self) -> &str {
-        match *self {
-            DecodeError::InvalidByte(_, _) => "invalid byte",
-            DecodeError::InvalidLength => "invalid length"
-        }
-    }
-
-    fn cause(&self) -> Option<&error::Error> {
-        None
-    }
-}
-
-///Encode arbitrary octets as base64.
-///Returns a String.
-///Convenience for `encode_config(input, base64::STANDARD);`.
-///
-///# Example
-///
-///```rust
-///extern crate base64;
-///
-///fn main() {
-///    let b64 = base64::encode(b"hello world");
-///    println!("{}", b64);
-///}
-///```
-pub fn encode<T: ?Sized + AsRef<[u8]>>(input: &T) -> String {
-    encode_config(input, STANDARD)
-}
-
-///Decode from string reference as octets.
-///Returns a Result containing a Vec<u8>.
-///Convenience `decode_config(input, base64::STANDARD);`.
-///
-///# Example
-///
-///```rust
-///extern crate base64;
-///
-///fn main() {
-///    let bytes = base64::decode("aGVsbG8gd29ybGQ=").unwrap();
-///    println!("{:?}", bytes);
-///}
-///```
-pub fn decode<T: ?Sized + AsRef<[u8]>>(input: &T) -> Result<Vec<u8>, DecodeError> {
-    decode_config(input, STANDARD)
-}
-
-///Encode arbitrary octets as base64.
-///Returns a String.
-///
-///# Example
-///
-///```rust
-///extern crate base64;
-///
-///fn main() {
-///    let b64 = base64::encode_config(b"hello world~", base64::STANDARD);
-///    println!("{}", b64);
-///
-///    let b64_url = base64::encode_config(b"hello internet~", base64::URL_SAFE);
-///    println!("{}", b64_url);
-///}
-///```
-pub fn encode_config<T: ?Sized + AsRef<[u8]>>(input: &T, config: Config) -> String {
-    let mut buf = match encoded_size(input.as_ref().len(), config) {
-        Some(n) => String::with_capacity(n),
-        None => panic!("integer overflow when calculating buffer size")
-    };
-
-    encode_config_buf(input, config, &mut buf);
-
-    buf
-}
-
-/// calculate the base64 encoded string size, including padding
-fn encoded_size(bytes_len: usize, config: Config) -> Option<usize> {
-    let printing_output_chars = bytes_len
-        .checked_add(2)
-        .map(|x| x / 3)
-        .and_then(|x| x.checked_mul(4));
-
-    //TODO this is subtly wrong but in a not dangerous way
-    //pushing patch with identical to previous behavior, then fixing
-    let line_ending_output_chars = match config.line_wrap {
-        LineWrap::NoWrap => Some(0),
-        LineWrap::Wrap(n, LineEnding::CRLF) =>
-            printing_output_chars.map(|y| y / n).and_then(|y| y.checked_mul(2)),
-        LineWrap::Wrap(n, LineEnding::LF) =>
-            printing_output_chars.map(|y| y / n),
-    };
-
-    printing_output_chars.and_then(|x|
-        line_ending_output_chars.and_then(|y| x.checked_add(y))
-    )
-}
-
-///Encode arbitrary octets as base64.
-///Writes into the supplied buffer to avoid allocations.
-///
-///# Example
-///
-///```rust
-///extern crate base64;
-///
-///fn main() {
-///    let mut buf = String::new();
-///    base64::encode_config_buf(b"hello world~", base64::STANDARD, &mut buf);
-///    println!("{}", buf);
-///
-///    buf.clear();
-///    base64::encode_config_buf(b"hello internet~", base64::URL_SAFE, &mut buf);
-///    println!("{}", buf);
-///}
-///```
-pub fn encode_config_buf<T: ?Sized + AsRef<[u8]>>(input: &T, config: Config, buf: &mut String) {
-    let input_bytes = input.as_ref();
-    let ref charset = match config.char_set {
-        CharacterSet::Standard => tables::STANDARD_ENCODE,
-        CharacterSet::UrlSafe => tables::URL_SAFE_ENCODE,
-    };
-
-    // reserve to make sure the memory we'll be writing to with unsafe is allocated
-    let resv_size = match encoded_size(input_bytes.len(), config) {
-        Some(n) => n,
-        None => panic!("integer overflow when calculating buffer size"),
-    };
-    buf.reserve(resv_size);
-
-    let orig_buf_len = buf.len();
-    let mut fast_loop_output_buf_len = orig_buf_len;
-
-    let input_chunk_len = 6;
-
-    let last_fast_index = input_bytes.len().saturating_sub(8);
-
-    // we're only going to insert valid utf8
-    let mut raw = unsafe { buf.as_mut_vec() };
-    // start at the first free part of the output buf
-    let mut output_ptr = unsafe { raw.as_mut_ptr().offset(orig_buf_len as isize) };
-    let mut input_index: usize = 0;
-    if input_bytes.len() >= 8 {
-        while input_index <= last_fast_index {
-            let input_chunk = BigEndian::read_u64(&input_bytes[input_index..(input_index + 8)]);
-
-            // strip off 6 bits at a time for the first 6 bytes
-            unsafe {
-                std::ptr::write(output_ptr, charset[((input_chunk >> 58) & 0x3F) as usize]);
-                std::ptr::write(output_ptr.offset(1), charset[((input_chunk >> 52) & 0x3F) as usize]);
-                std::ptr::write(output_ptr.offset(2), charset[((input_chunk >> 46) & 0x3F) as usize]);
-                std::ptr::write(output_ptr.offset(3), charset[((input_chunk >> 40) & 0x3F) as usize]);
-                std::ptr::write(output_ptr.offset(4), charset[((input_chunk >> 34) & 0x3F) as usize]);
-                std::ptr::write(output_ptr.offset(5), charset[((input_chunk >> 28) & 0x3F) as usize]);
-                std::ptr::write(output_ptr.offset(6), charset[((input_chunk >> 22) & 0x3F) as usize]);
-                std::ptr::write(output_ptr.offset(7), charset[((input_chunk >> 16) & 0x3F) as usize]);
-                output_ptr = output_ptr.offset(8);
-            }
-
-            input_index += input_chunk_len;
-            fast_loop_output_buf_len += 8;
-        }
-    }
-
-    unsafe {
-        // expand len to include the bytes we just wrote
-        raw.set_len(fast_loop_output_buf_len);
-    }
-
-    // encode the 0 to 7 bytes left after the fast loop
-
-    let rem = input_bytes.len() % 3;
-    let start_of_rem = input_bytes.len() - rem;
-
-    // start at the first index not handled by fast loop, which may be 0.
-    let mut leftover_index = input_index;
-
-    while leftover_index < start_of_rem {
-        raw.push(charset[(input_bytes[leftover_index] >> 2) as usize]);
-        raw.push(charset[((input_bytes[leftover_index] << 4 | input_bytes[leftover_index + 1] >> 4) & 0x3f) as usize]);
-        raw.push(charset[((input_bytes[leftover_index + 1] << 2 | input_bytes[leftover_index + 2] >> 6) & 0x3f) as usize]);
-        raw.push(charset[(input_bytes[leftover_index + 2] & 0x3f) as usize]);
-
-        leftover_index += 3;
-    }
-
-    if rem == 2 {
-        raw.push(charset[(input_bytes[start_of_rem] >> 2) as usize]);
-        raw.push(charset[((input_bytes[start_of_rem] << 4 | input_bytes[start_of_rem + 1] >> 4) & 0x3f) as usize]);
-        raw.push(charset[(input_bytes[start_of_rem + 1] << 2 & 0x3f) as usize]);
-    } else if rem == 1 {
-        raw.push(charset[(input_bytes[start_of_rem] >> 2) as usize]);
-        raw.push(charset[(input_bytes[start_of_rem] << 4 & 0x3f) as usize]);
-    }
-
-    if config.pad {
-        for _ in 0..((3 - rem) % 3) {
-            raw.push(0x3d);
-        }
-    }
-
-    //TODO FIXME this does the wrong thing for nonempty buffers
-    if orig_buf_len == 0 {
-        if let LineWrap::Wrap(line_size, line_end) = config.line_wrap {
-            let len = raw.len();
-            let mut i = 0;
-            let mut j = 0;
-
-            while i < len {
-                if i > 0 && i % line_size == 0 {
-                    match line_end {
-                        LineEnding::LF => { raw.insert(j, b'\n'); j += 1; }
-                        LineEnding::CRLF => { raw.insert(j, b'\r'); raw.insert(j + 1, b'\n'); j += 2; }
-                    }
-                }
-
-                i += 1;
-                j += 1;
-            }
-        }
-    }
-}
-
-///Decode from string reference as octets.
-///Returns a Result containing a Vec<u8>.
-///
-///# Example
-///
-///```rust
-///extern crate base64;
-///
-///fn main() {
-///    let bytes = base64::decode_config("aGVsbG8gd29ybGR+Cg==", base64::STANDARD).unwrap();
-///    println!("{:?}", bytes);
-///
-///    let bytes_url = base64::decode_config("aGVsbG8gaW50ZXJuZXR-Cg==", base64::URL_SAFE).unwrap();
-///    println!("{:?}", bytes_url);
-///}
-///```
-pub fn decode_config<T: ?Sized + AsRef<[u8]>>(input: &T, config: Config) -> Result<Vec<u8>, DecodeError> {
-    let mut buffer = Vec::<u8>::with_capacity(input.as_ref().len() * 4 / 3);
-
-    decode_config_buf(input, config, &mut buffer).map(|_| buffer)
-}
-
-///Decode from string reference as octets.
-///Writes into the supplied buffer to avoid allocation.
-///Returns a Result containing an empty tuple, aka ().
-///
-///# Example
-///
-///```rust
-///extern crate base64;
-///
-///fn main() {
-///    let mut buffer = Vec::<u8>::new();
-///    base64::decode_config_buf("aGVsbG8gd29ybGR+Cg==", base64::STANDARD, &mut buffer).unwrap();
-///    println!("{:?}", buffer);
-///
-///    buffer.clear();
-///
-///    base64::decode_config_buf("aGVsbG8gaW50ZXJuZXR-Cg==", base64::URL_SAFE, &mut buffer).unwrap();
-///    println!("{:?}", buffer);
-///}
-///```
-pub fn decode_config_buf<T: ?Sized + AsRef<[u8]>>(input: &T,
-                                                  config: Config,
-                                                  buffer: &mut Vec<u8>)
-                                                  -> Result<(), DecodeError> {
-    let mut input_copy;
-    let input_bytes = if config.strip_whitespace {
-        input_copy = Vec::<u8>::with_capacity(input.as_ref().len());
-        input_copy.extend(input.as_ref().iter().filter(|b| !b" \n\t\r\x0b\x0c".contains(b)));
-
-        input_copy.as_ref()
-    } else {
-        input.as_ref()
-    };
-
-    let ref decode_table = match config.char_set {
-        CharacterSet::Standard => tables::STANDARD_DECODE,
-        CharacterSet::UrlSafe => tables::URL_SAFE_DECODE,
-    };
-
-    buffer.reserve(input_bytes.len() * 3 / 4);
-
-    // the fast loop only handles complete chunks of 8 input bytes without padding
-    let chunk_len = 8;
-    let decoded_chunk_len = 6;
-    let remainder_len = input_bytes.len() % chunk_len;
-    let trailing_bytes_to_skip = if remainder_len == 0 {
-        // if input is a multiple of the chunk size, ignore the last chunk as it may have padding
-        chunk_len
-    } else {
-        remainder_len
-    };
-
-    let length_of_full_chunks = input_bytes.len().saturating_sub(trailing_bytes_to_skip);
-
-    let starting_output_index = buffer.len();
-    // Resize to hold decoded output from fast loop. Need the extra two bytes because
-    // we write a full 8 bytes for the last 6-byte decoded chunk and then truncate off two
-    let new_size = starting_output_index
-        + length_of_full_chunks / chunk_len * decoded_chunk_len
-        + (chunk_len - decoded_chunk_len);
-    buffer.resize(new_size, 0);
-
-    let mut output_index = starting_output_index;
-
-    {
-        let buffer_slice = buffer.as_mut_slice();
-
-        let mut input_index = 0;
-        // initial value is never used; always set if fast loop breaks
-        let mut bad_byte_index: usize = 0;
-        // a non-invalid value means it's not an error if fast loop never runs
-        let mut morsel: u8 = 0;
-
-        // fast loop of 8 bytes at a time
-        while input_index < length_of_full_chunks {
-            let mut accum: u64;
-
-            let input_chunk = BigEndian::read_u64(&input_bytes[input_index..(input_index + 8)]);
-            morsel = decode_table[(input_chunk >> 56) as usize];
-            if morsel == tables::INVALID_VALUE {
-                bad_byte_index = input_index;
-                break;
-            };
-            accum = (morsel as u64) << 58;
-
-            morsel = decode_table[(input_chunk >> 48 & 0xFF) as usize];
-            if morsel == tables::INVALID_VALUE {
-                bad_byte_index = input_index + 1;
-                break;
-            };
-            accum |= (morsel as u64) << 52;
-
-            morsel = decode_table[(input_chunk >> 40 & 0xFF) as usize];
-            if morsel == tables::INVALID_VALUE {
-                bad_byte_index = input_index + 2;
-                break;
-            };
-            accum |= (morsel as u64) << 46;
-
-            morsel = decode_table[(input_chunk >> 32 & 0xFF) as usize];
-            if morsel == tables::INVALID_VALUE {
-                bad_byte_index = input_index + 3;
-                break;
-            };
-            accum |= (morsel as u64) << 40;
-
-            morsel = decode_table[(input_chunk >> 24 & 0xFF) as usize];
-            if morsel == tables::INVALID_VALUE {
-                bad_byte_index = input_index + 4;
-                break;
-            };
-            accum |= (morsel as u64) << 34;
-
-            morsel = decode_table[(input_chunk >> 16 & 0xFF) as usize];
-            if morsel == tables::INVALID_VALUE {
-                bad_byte_index = input_index + 5;
-                break;
-            };
-            accum |= (morsel as u64) << 28;
-
-            morsel = decode_table[(input_chunk >> 8 & 0xFF) as usize];
-            if morsel == tables::INVALID_VALUE {
-                bad_byte_index = input_index + 6;
-                break;
-            };
-            accum |= (morsel as u64) << 22;
-
-            morsel = decode_table[(input_chunk & 0xFF) as usize];
-            if morsel == tables::INVALID_VALUE {
-                bad_byte_index = input_index + 7;
-                break;
-            };
-            accum |= (morsel as u64) << 16;
-
-            BigEndian::write_u64(&mut buffer_slice[(output_index)..(output_index + 8)],
-                                 accum);
-
-            output_index += 6;
-            input_index += chunk_len;
-        };
-
-        if morsel == tables::INVALID_VALUE {
-            // we got here from a break
-            return Err(DecodeError::InvalidByte(bad_byte_index, input_bytes[bad_byte_index]));
-        }
-    }
-
-    // Truncate off the last two bytes from writing the last u64.
-    // Unconditional because we added on the extra 2 bytes in the resize before the loop,
-    // so it will never underflow.
-    let new_len = buffer.len() - (chunk_len - decoded_chunk_len);
-    buffer.truncate(new_len);
-
-    // handle leftovers (at most 8 bytes, decoded to 6).
-    // Use a u64 as a stack-resident 8 bytes buffer.
-    let mut leftover_bits: u64 = 0;
-    let mut morsels_in_leftover = 0;
-    let mut padding_bytes = 0;
-    let mut first_padding_index: usize = 0;
-    for (i, b) in input_bytes[length_of_full_chunks..].iter().enumerate() {
-        // '=' padding
-        if *b == 0x3D {
-            // There can be bad padding in a few ways:
-            // 1 - Padding with non-padding characters after it
-            // 2 - Padding after zero or one non-padding characters before it
-            //     in the current quad.
-            // 3 - More than two characters of padding. If 3 or 4 padding chars
-            //     are in the same quad, that implies it will be caught by #2.
-            //     If it spreads from one quad to another, it will be caught by
-            //     #2 in the second quad.
-
-            if i % 4 < 2 {
-                // Check for case #2.
-                // TODO InvalidPadding error
-                return Err(DecodeError::InvalidByte(length_of_full_chunks + i, *b));
-            };
-
-            if padding_bytes == 0 {
-                first_padding_index = i;
-            };
-
-            padding_bytes += 1;
-            continue;
-        };
-
-        // Check for case #1.
-        // To make '=' handling consistent with the main loop, don't allow
-        // non-suffix '=' in trailing chunk either. Report error as first
-        // erroneous padding.
-        if padding_bytes > 0 {
-            return Err(DecodeError::InvalidByte(
-                length_of_full_chunks + first_padding_index, 0x3D));
-        };
-
-        // can use up to 8 * 6 = 48 bits of the u64, if last chunk has no padding.
-        // To minimize shifts, pack the leftovers from left to right.
-        let shift = 64 - (morsels_in_leftover + 1) * 6;
-        // tables are all 256 elements, cannot overflow from a u8 index
-        let morsel = decode_table[*b as usize];
-        if morsel == tables::INVALID_VALUE {
-            return Err(DecodeError::InvalidByte(length_of_full_chunks + i, *b));
-        };
-
-        leftover_bits |= (morsel as u64) << shift;
-        morsels_in_leftover += 1;
-    };
-
-    let leftover_bits_ready_to_append = match morsels_in_leftover {
-        0 => 0,
-        1 => return Err(DecodeError::InvalidLength),
-        2 => 8,
-        3 => 16,
-        4 => 24,
-        5 => return Err(DecodeError::InvalidLength),
-        6 => 32,
-        7 => 40,
-        8 => 48,
-        _ => panic!("Impossible: must only have 0 to 4 input bytes in last quad")
-    };
-
-    let mut leftover_bits_appended_to_buf = 0;
-    while leftover_bits_appended_to_buf < leftover_bits_ready_to_append {
-        // `as` simply truncates the higher bits, which is what we want here
-        let selected_bits = (leftover_bits >> (56 - leftover_bits_appended_to_buf)) as u8;
-        buffer.push(selected_bits);
-
-        leftover_bits_appended_to_buf += 8;
-    };
-
-    Ok(())
-}
-
-#[cfg(test)]
-mod tests {
-    use super::*;
-
-    #[test]
-    fn encoded_size_correct() {
-        assert_eq!(Some(0), encoded_size(0, STANDARD));
-
-        assert_eq!(Some(4), encoded_size(1, STANDARD));
-        assert_eq!(Some(4), encoded_size(2, STANDARD));
-        assert_eq!(Some(4), encoded_size(3, STANDARD));
-
-        assert_eq!(Some(8), encoded_size(4, STANDARD));
-        assert_eq!(Some(8), encoded_size(5, STANDARD));
-        assert_eq!(Some(8), encoded_size(6, STANDARD));
-
-        assert_eq!(Some(12), encoded_size(7, STANDARD));
-        assert_eq!(Some(12), encoded_size(8, STANDARD));
-        assert_eq!(Some(12), encoded_size(9, STANDARD));
-
-        assert_eq!(Some(72), encoded_size(54, STANDARD));
-
-        assert_eq!(Some(76), encoded_size(55, STANDARD));
-        assert_eq!(Some(76), encoded_size(56, STANDARD));
-        assert_eq!(Some(76), encoded_size(57, STANDARD));
-
-        assert_eq!(Some(80), encoded_size(58, STANDARD));
-    }
-
-    #[test]
-    fn encoded_size_correct_mime() {
-        assert_eq!(Some(0), encoded_size(0, MIME));
-
-        assert_eq!(Some(4), encoded_size(1, MIME));
-        assert_eq!(Some(4), encoded_size(2, MIME));
-        assert_eq!(Some(4), encoded_size(3, MIME));
-
-        assert_eq!(Some(8), encoded_size(4, MIME));
-        assert_eq!(Some(8), encoded_size(5, MIME));
-        assert_eq!(Some(8), encoded_size(6, MIME));
-
-        assert_eq!(Some(12), encoded_size(7, MIME));
-        assert_eq!(Some(12), encoded_size(8, MIME));
-        assert_eq!(Some(12), encoded_size(9, MIME));
-
-        assert_eq!(Some(72), encoded_size(54, MIME));
-
-        assert_eq!(Some(78), encoded_size(55, MIME));
-        assert_eq!(Some(78), encoded_size(56, MIME));
-        assert_eq!(Some(78), encoded_size(57, MIME));
-
-        assert_eq!(Some(82), encoded_size(58, MIME));
-    }
-
-    #[test]
-    fn encoded_size_correct_lf() {
-        let config = Config::new(
-            CharacterSet::Standard,
-            true,
-            false,
-            LineWrap::Wrap(76, LineEnding::LF)
-        );
-
-        assert_eq!(Some(0), encoded_size(0, config));
-
-        assert_eq!(Some(4), encoded_size(1, config));
-        assert_eq!(Some(4), encoded_size(2, config));
-        assert_eq!(Some(4), encoded_size(3, config));
-
-        assert_eq!(Some(8), encoded_size(4, config));
-        assert_eq!(Some(8), encoded_size(5, config));
-        assert_eq!(Some(8), encoded_size(6, config));
-
-        assert_eq!(Some(12), encoded_size(7, config));
-        assert_eq!(Some(12), encoded_size(8, config));
-        assert_eq!(Some(12), encoded_size(9, config));
-
-        assert_eq!(Some(72), encoded_size(54, config));
-
-        assert_eq!(Some(77), encoded_size(55, config));
-        assert_eq!(Some(77), encoded_size(56, config));
-        assert_eq!(Some(77), encoded_size(57, config));
-
-        assert_eq!(Some(81), encoded_size(58, config));
-    }
-
-    #[test]
-    fn encoded_size_overflow() {
-        assert_eq!(None, encoded_size(std::usize::MAX, STANDARD));
-    }
-}
deleted file mode 100644
--- a/third_party/rust/base64-0.5.2/src/tables.rs
+++ /dev/null
@@ -1,649 +0,0 @@
-pub const INVALID_VALUE: u8 = 255;
-pub const STANDARD_ENCODE: &'static [u8; 64] = &[
-    65, // input 0 (0x0) => 'A' (0x41)
-    66, // input 1 (0x1) => 'B' (0x42)
-    67, // input 2 (0x2) => 'C' (0x43)
-    68, // input 3 (0x3) => 'D' (0x44)
-    69, // input 4 (0x4) => 'E' (0x45)
-    70, // input 5 (0x5) => 'F' (0x46)
-    71, // input 6 (0x6) => 'G' (0x47)
-    72, // input 7 (0x7) => 'H' (0x48)
-    73, // input 8 (0x8) => 'I' (0x49)
-    74, // input 9 (0x9) => 'J' (0x4A)
-    75, // input 10 (0xA) => 'K' (0x4B)
-    76, // input 11 (0xB) => 'L' (0x4C)
-    77, // input 12 (0xC) => 'M' (0x4D)
-    78, // input 13 (0xD) => 'N' (0x4E)
-    79, // input 14 (0xE) => 'O' (0x4F)
-    80, // input 15 (0xF) => 'P' (0x50)
-    81, // input 16 (0x10) => 'Q' (0x51)
-    82, // input 17 (0x11) => 'R' (0x52)
-    83, // input 18 (0x12) => 'S' (0x53)
-    84, // input 19 (0x13) => 'T' (0x54)
-    85, // input 20 (0x14) => 'U' (0x55)
-    86, // input 21 (0x15) => 'V' (0x56)
-    87, // input 22 (0x16) => 'W' (0x57)
-    88, // input 23 (0x17) => 'X' (0x58)
-    89, // input 24 (0x18) => 'Y' (0x59)
-    90, // input 25 (0x19) => 'Z' (0x5A)
-    97, // input 26 (0x1A) => 'a' (0x61)
-    98, // input 27 (0x1B) => 'b' (0x62)
-    99, // input 28 (0x1C) => 'c' (0x63)
-    100, // input 29 (0x1D) => 'd' (0x64)
-    101, // input 30 (0x1E) => 'e' (0x65)
-    102, // input 31 (0x1F) => 'f' (0x66)
-    103, // input 32 (0x20) => 'g' (0x67)
-    104, // input 33 (0x21) => 'h' (0x68)
-    105, // input 34 (0x22) => 'i' (0x69)
-    106, // input 35 (0x23) => 'j' (0x6A)
-    107, // input 36 (0x24) => 'k' (0x6B)
-    108, // input 37 (0x25) => 'l' (0x6C)
-    109, // input 38 (0x26) => 'm' (0x6D)
-    110, // input 39 (0x27) => 'n' (0x6E)
-    111, // input 40 (0x28) => 'o' (0x6F)
-    112, // input 41 (0x29) => 'p' (0x70)
-    113, // input 42 (0x2A) => 'q' (0x71)
-    114, // input 43 (0x2B) => 'r' (0x72)
-    115, // input 44 (0x2C) => 's' (0x73)
-    116, // input 45 (0x2D) => 't' (0x74)
-    117, // input 46 (0x2E) => 'u' (0x75)
-    118, // input 47 (0x2F) => 'v' (0x76)
-    119, // input 48 (0x30) => 'w' (0x77)
-    120, // input 49 (0x31) => 'x' (0x78)
-    121, // input 50 (0x32) => 'y' (0x79)
-    122, // input 51 (0x33) => 'z' (0x7A)
-    48, // input 52 (0x34) => '0' (0x30)
-    49, // input 53 (0x35) => '1' (0x31)
-    50, // input 54 (0x36) => '2' (0x32)
-    51, // input 55 (0x37) => '3' (0x33)
-    52, // input 56 (0x38) => '4' (0x34)
-    53, // input 57 (0x39) => '5' (0x35)
-    54, // input 58 (0x3A) => '6' (0x36)
-    55, // input 59 (0x3B) => '7' (0x37)
-    56, // input 60 (0x3C) => '8' (0x38)
-    57, // input 61 (0x3D) => '9' (0x39)
-    43, // input 62 (0x3E) => '+' (0x2B)
-    47, // input 63 (0x3F) => '/' (0x2F)
-];
-pub const STANDARD_DECODE: &'static [u8; 256] = &[
-    INVALID_VALUE, // input 0 (0x0)
-    INVALID_VALUE, // input 1 (0x1)
-    INVALID_VALUE, // input 2 (0x2)
-    INVALID_VALUE, // input 3 (0x3)
-    INVALID_VALUE, // input 4 (0x4)
-    INVALID_VALUE, // input 5 (0x5)
-    INVALID_VALUE, // input 6 (0x6)
-    INVALID_VALUE, // input 7 (0x7)
-    INVALID_VALUE, // input 8 (0x8)
-    INVALID_VALUE, // input 9 (0x9)
-    INVALID_VALUE, // input 10 (0xA)
-    INVALID_VALUE, // input 11 (0xB)
-    INVALID_VALUE, // input 12 (0xC)
-    INVALID_VALUE, // input 13 (0xD)
-    INVALID_VALUE, // input 14 (0xE)
-    INVALID_VALUE, // input 15 (0xF)
-    INVALID_VALUE, // input 16 (0x10)
-    INVALID_VALUE, // input 17 (0x11)
-    INVALID_VALUE, // input 18 (0x12)
-    INVALID_VALUE, // input 19 (0x13)
-    INVALID_VALUE, // input 20 (0x14)
-    INVALID_VALUE, // input 21 (0x15)
-    INVALID_VALUE, // input 22 (0x16)
-    INVALID_VALUE, // input 23 (0x17)
-    INVALID_VALUE, // input 24 (0x18)
-    INVALID_VALUE, // input 25 (0x19)
-    INVALID_VALUE, // input 26 (0x1A)
-    INVALID_VALUE, // input 27 (0x1B)
-    INVALID_VALUE, // input 28 (0x1C)
-    INVALID_VALUE, // input 29 (0x1D)
-    INVALID_VALUE, // input 30 (0x1E)
-    INVALID_VALUE, // input 31 (0x1F)
-    INVALID_VALUE, // input 32 (0x20)
-    INVALID_VALUE, // input 33 (0x21)
-    INVALID_VALUE, // input 34 (0x22)
-    INVALID_VALUE, // input 35 (0x23)
-    INVALID_VALUE, // input 36 (0x24)
-    INVALID_VALUE, // input 37 (0x25)
-    INVALID_VALUE, // input 38 (0x26)
-    INVALID_VALUE, // input 39 (0x27)
-    INVALID_VALUE, // input 40 (0x28)
-    INVALID_VALUE, // input 41 (0x29)
-    INVALID_VALUE, // input 42 (0x2A)
-    62, // input 43 (0x2B char '+') => 62 (0x3E)
-    INVALID_VALUE, // input 44 (0x2C)
-    INVALID_VALUE, // input 45 (0x2D)
-    INVALID_VALUE, // input 46 (0x2E)
-    63, // input 47 (0x2F char '/') => 63 (0x3F)
-    52, // input 48 (0x30 char '0') => 52 (0x34)
-    53, // input 49 (0x31 char '1') => 53 (0x35)
-    54, // input 50 (0x32 char '2') => 54 (0x36)
-    55, // input 51 (0x33 char '3') => 55 (0x37)
-    56, // input 52 (0x34 char '4') => 56 (0x38)
-    57, // input 53 (0x35 char '5') => 57 (0x39)
-    58, // input 54 (0x36 char '6') => 58 (0x3A)
-    59, // input 55 (0x37 char '7') => 59 (0x3B)
-    60, // input 56 (0x38 char '8') => 60 (0x3C)
-    61, // input 57 (0x39 char '9') => 61 (0x3D)
-    INVALID_VALUE, // input 58 (0x3A)
-    INVALID_VALUE, // input 59 (0x3B)
-    INVALID_VALUE, // input 60 (0x3C)
-    INVALID_VALUE, // input 61 (0x3D)
-    INVALID_VALUE, // input 62 (0x3E)
-    INVALID_VALUE, // input 63 (0x3F)
-    INVALID_VALUE, // input 64 (0x40)
-    0, // input 65 (0x41 char 'A') => 0 (0x0)
-    1, // input 66 (0x42 char 'B') => 1 (0x1)
-    2, // input 67 (0x43 char 'C') => 2 (0x2)
-    3, // input 68 (0x44 char 'D') => 3 (0x3)
-    4, // input 69 (0x45 char 'E') => 4 (0x4)
-    5, // input 70 (0x46 char 'F') => 5 (0x5)
-    6, // input 71 (0x47 char 'G') => 6 (0x6)
-    7, // input 72 (0x48 char 'H') => 7 (0x7)
-    8, // input 73 (0x49 char 'I') => 8 (0x8)
-    9, // input 74 (0x4A char 'J') => 9 (0x9)
-    10, // input 75 (0x4B char 'K') => 10 (0xA)
-    11, // input 76 (0x4C char 'L') => 11 (0xB)
-    12, // input 77 (0x4D char 'M') => 12 (0xC)
-    13, // input 78 (0x4E char 'N') => 13 (0xD)
-    14, // input 79 (0x4F char 'O') => 14 (0xE)
-    15, // input 80 (0x50 char 'P') => 15 (0xF)
-    16, // input 81 (0x51 char 'Q') => 16 (0x10)
-    17, // input 82 (0x52 char 'R') => 17 (0x11)
-    18, // input 83 (0x53 char 'S') => 18 (0x12)
-    19, // input 84 (0x54 char 'T') => 19 (0x13)
-    20, // input 85 (0x55 char 'U') => 20 (0x14)
-    21, // input 86 (0x56 char 'V') => 21 (0x15)
-    22, // input 87 (0x57 char 'W') => 22 (0x16)
-    23, // input 88 (0x58 char 'X') => 23 (0x17)
-    24, // input 89 (0x59 char 'Y') => 24 (0x18)
-    25, // input 90 (0x5A char 'Z') => 25 (0x19)
-    INVALID_VALUE, // input 91 (0x5B)
-    INVALID_VALUE, // input 92 (0x5C)
-    INVALID_VALUE, // input 93 (0x5D)
-    INVALID_VALUE, // input 94 (0x5E)
-    INVALID_VALUE, // input 95 (0x5F)
-    INVALID_VALUE, // input 96 (0x60)
-    26, // input 97 (0x61 char 'a') => 26 (0x1A)
-    27, // input 98 (0x62 char 'b') => 27 (0x1B)
-    28, // input 99 (0x63 char 'c') => 28 (0x1C)
-    29, // input 100 (0x64 char 'd') => 29 (0x1D)
-    30, // input 101 (0x65 char 'e') => 30 (0x1E)
-    31, // input 102 (0x66 char 'f') => 31 (0x1F)
-    32, // input 103 (0x67 char 'g') => 32 (0x20)
-    33, // input 104 (0x68 char 'h') => 33 (0x21)
-    34, // input 105 (0x69 char 'i') => 34 (0x22)
-    35, // input 106 (0x6A char 'j') => 35 (0x23)
-    36, // input 107 (0x6B char 'k') => 36 (0x24)
-    37, // input 108 (0x6C char 'l') => 37 (0x25)
-    38, // input 109 (0x6D char 'm') => 38 (0x26)
-    39, // input 110 (0x6E char 'n') => 39 (0x27)
-    40, // input 111 (0x6F char 'o') => 40 (0x28)
-    41, // input 112 (0x70 char 'p') => 41 (0x29)
-    42, // input 113 (0x71 char 'q') => 42 (0x2A)
-    43, // input 114 (0x72 char 'r') => 43 (0x2B)
-    44, // input 115 (0x73 char 's') => 44 (0x2C)
-    45, // input 116 (0x74 char 't') => 45 (0x2D)
-    46, // input 117 (0x75 char 'u') => 46 (0x2E)
-    47, // input 118 (0x76 char 'v') => 47 (0x2F)
-    48, // input 119 (0x77 char 'w') => 48 (0x30)
-    49, // input 120 (0x78 char 'x') => 49 (0x31)
-    50, // input 121 (0x79 char 'y') => 50 (0x32)
-    51, // input 122 (0x7A char 'z') => 51 (0x33)
-    INVALID_VALUE, // input 123 (0x7B)
-    INVALID_VALUE, // input 124 (0x7C)
-    INVALID_VALUE, // input 125 (0x7D)
-    INVALID_VALUE, // input 126 (0x7E)
-    INVALID_VALUE, // input 127 (0x7F)
-    INVALID_VALUE, // input 128 (0x80)
-    INVALID_VALUE, // input 129 (0x81)
-    INVALID_VALUE, // input 130 (0x82)
-    INVALID_VALUE, // input 131 (0x83)
-    INVALID_VALUE, // input 132 (0x84)
-    INVALID_VALUE, // input 133 (0x85)
-    INVALID_VALUE, // input 134 (0x86)
-    INVALID_VALUE, // input 135 (0x87)
-    INVALID_VALUE, // input 136 (0x88)
-    INVALID_VALUE, // input 137 (0x89)
-    INVALID_VALUE, // input 138 (0x8A)
-    INVALID_VALUE, // input 139 (0x8B)
-    INVALID_VALUE, // input 140 (0x8C)
-    INVALID_VALUE, // input 141 (0x8D)
-    INVALID_VALUE, // input 142 (0x8E)
-    INVALID_VALUE, // input 143 (0x8F)
-    INVALID_VALUE, // input 144 (0x90)
-    INVALID_VALUE, // input 145 (0x91)
-    INVALID_VALUE, // input 146 (0x92)
-    INVALID_VALUE, // input 147 (0x93)
-    INVALID_VALUE, // input 148 (0x94)
-    INVALID_VALUE, // input 149 (0x95)
-    INVALID_VALUE, // input 150 (0x96)
-    INVALID_VALUE, // input 151 (0x97)
-    INVALID_VALUE, // input 152 (0x98)
-    INVALID_VALUE, // input 153 (0x99)
-    INVALID_VALUE, // input 154 (0x9A)
-    INVALID_VALUE, // input 155 (0x9B)
-    INVALID_VALUE, // input 156 (0x9C)
-    INVALID_VALUE, // input 157 (0x9D)
-    INVALID_VALUE, // input 158 (0x9E)
-    INVALID_VALUE, // input 159 (0x9F)
-    INVALID_VALUE, // input 160 (0xA0)
-    INVALID_VALUE, // input 161 (0xA1)
-    INVALID_VALUE, // input 162 (0xA2)
-    INVALID_VALUE, // input 163 (0xA3)
-    INVALID_VALUE, // input 164 (0xA4)
-    INVALID_VALUE, // input 165 (0xA5)
-    INVALID_VALUE, // input 166 (0xA6)
-    INVALID_VALUE, // input 167 (0xA7)
-    INVALID_VALUE, // input 168 (0xA8)
-    INVALID_VALUE, // input 169 (0xA9)
-    INVALID_VALUE, // input 170 (0xAA)
-    INVALID_VALUE, // input 171 (0xAB)
-    INVALID_VALUE, // input 172 (0xAC)
-    INVALID_VALUE, // input 173 (0xAD)
-    INVALID_VALUE, // input 174 (0xAE)
-    INVALID_VALUE, // input 175 (0xAF)
-    INVALID_VALUE, // input 176 (0xB0)
-    INVALID_VALUE, // input 177 (0xB1)
-    INVALID_VALUE, // input 178 (0xB2)
-    INVALID_VALUE, // input 179 (0xB3)
-    INVALID_VALUE, // input 180 (0xB4)
-    INVALID_VALUE, // input 181 (0xB5)
-    INVALID_VALUE, // input 182 (0xB6)
-    INVALID_VALUE, // input 183 (0xB7)
-    INVALID_VALUE, // input 184 (0xB8)
-    INVALID_VALUE, // input 185 (0xB9)
-    INVALID_VALUE, // input 186 (0xBA)
-    INVALID_VALUE, // input 187 (0xBB)
-    INVALID_VALUE, // input 188 (0xBC)
-    INVALID_VALUE, // input 189 (0xBD)
-    INVALID_VALUE, // input 190 (0xBE)
-    INVALID_VALUE, // input 191 (0xBF)
-    INVALID_VALUE, // input 192 (0xC0)
-    INVALID_VALUE, // input 193 (0xC1)
-    INVALID_VALUE, // input 194 (0xC2)
-    INVALID_VALUE, // input 195 (0xC3)
-    INVALID_VALUE, // input 196 (0xC4)
-    INVALID_VALUE, // input 197 (0xC5)
-    INVALID_VALUE, // input 198 (0xC6)
-    INVALID_VALUE, // input 199 (0xC7)
-    INVALID_VALUE, // input 200 (0xC8)
-    INVALID_VALUE, // input 201 (0xC9)
-    INVALID_VALUE, // input 202 (0xCA)
-    INVALID_VALUE, // input 203 (0xCB)
-    INVALID_VALUE, // input 204 (0xCC)
-    INVALID_VALUE, // input 205 (0xCD)
-    INVALID_VALUE, // input 206 (0xCE)
-    INVALID_VALUE, // input 207 (0xCF)
-    INVALID_VALUE, // input 208 (0xD0)
-    INVALID_VALUE, // input 209 (0xD1)
-    INVALID_VALUE, // input 210 (0xD2)
-    INVALID_VALUE, // input 211 (0xD3)
-    INVALID_VALUE, // input 212 (0xD4)
-    INVALID_VALUE, // input 213 (0xD5)
-    INVALID_VALUE, // input 214 (0xD6)
-    INVALID_VALUE, // input 215 (0xD7)
-    INVALID_VALUE, // input 216 (0xD8)
-    INVALID_VALUE, // input 217 (0xD9)
-    INVALID_VALUE, // input 218 (0xDA)
-    INVALID_VALUE, // input 219 (0xDB)
-    INVALID_VALUE, // input 220 (0xDC)
-    INVALID_VALUE, // input 221 (0xDD)
-    INVALID_VALUE, // input 222 (0xDE)
-    INVALID_VALUE, // input 223 (0xDF)
-    INVALID_VALUE, // input 224 (0xE0)
-    INVALID_VALUE, // input 225 (0xE1)
-    INVALID_VALUE, // input 226 (0xE2)
-    INVALID_VALUE, // input 227 (0xE3)
-    INVALID_VALUE, // input 228 (0xE4)
-    INVALID_VALUE, // input 229 (0xE5)
-    INVALID_VALUE, // input 230 (0xE6)
-    INVALID_VALUE, // input 231 (0xE7)
-    INVALID_VALUE, // input 232 (0xE8)
-    INVALID_VALUE, // input 233 (0xE9)
-    INVALID_VALUE, // input 234 (0xEA)
-    INVALID_VALUE, // input 235 (0xEB)
-    INVALID_VALUE, // input 236 (0xEC)
-    INVALID_VALUE, // input 237 (0xED)
-    INVALID_VALUE, // input 238 (0xEE)
-    INVALID_VALUE, // input 239 (0xEF)
-    INVALID_VALUE, // input 240 (0xF0)
-    INVALID_VALUE, // input 241 (0xF1)
-    INVALID_VALUE, // input 242 (0xF2)
-    INVALID_VALUE, // input 243 (0xF3)
-    INVALID_VALUE, // input 244 (0xF4)
-    INVALID_VALUE, // input 245 (0xF5)
-    INVALID_VALUE, // input 246 (0xF6)
-    INVALID_VALUE, // input 247 (0xF7)
-    INVALID_VALUE, // input 248 (0xF8)
-    INVALID_VALUE, // input 249 (0xF9)
-    INVALID_VALUE, // input 250 (0xFA)
-    INVALID_VALUE, // input 251 (0xFB)
-    INVALID_VALUE, // input 252 (0xFC)
-    INVALID_VALUE, // input 253 (0xFD)
-    INVALID_VALUE, // input 254 (0xFE)
-    INVALID_VALUE, // input 255 (0xFF)
-];
-pub const URL_SAFE_ENCODE: &'static [u8; 64] = &[
-    65, // input 0 (0x0) => 'A' (0x41)
-    66, // input 1 (0x1) => 'B' (0x42)
-    67, // input 2 (0x2) => 'C' (0x43)
-    68, // input 3 (0x3) => 'D' (0x44)
-    69, // input 4 (0x4) => 'E' (0x45)
-    70, // input 5 (0x5) => 'F' (0x46)
-    71, // input 6 (0x6) => 'G' (0x47)
-    72, // input 7 (0x7) => 'H' (0x48)
-    73, // input 8 (0x8) => 'I' (0x49)
-    74, // input 9 (0x9) => 'J' (0x4A)
-    75, // input 10 (0xA) => 'K' (0x4B)
-    76, // input 11 (0xB) => 'L' (0x4C)
-    77, // input 12 (0xC) => 'M' (0x4D)
-    78, // input 13 (0xD) => 'N' (0x4E)
-    79, // input 14 (0xE) => 'O' (0x4F)
-    80, // input 15 (0xF) => 'P' (0x50)
-    81, // input 16 (0x10) => 'Q' (0x51)
-    82, // input 17 (0x11) => 'R' (0x52)
-    83, // input 18 (0x12) => 'S' (0x53)
-    84, // input 19 (0x13) => 'T' (0x54)
-    85, // input 20 (0x14) => 'U' (0x55)
-    86, // input 21 (0x15) => 'V' (0x56)
-    87, // input 22 (0x16) => 'W' (0x57)
-    88, // input 23 (0x17) => 'X' (0x58)
-    89, // input 24 (0x18) => 'Y' (0x59)
-    90, // input 25 (0x19) => 'Z' (0x5A)
-    97, // input 26 (0x1A) => 'a' (0x61)
-    98, // input 27 (0x1B) => 'b' (0x62)
-    99, // input 28 (0x1C) => 'c' (0x63)
-    100, // input 29 (0x1D) => 'd' (0x64)
-    101, // input 30 (0x1E) => 'e' (0x65)
-    102, // input 31 (0x1F) => 'f' (0x66)
-    103, // input 32 (0x20) => 'g' (0x67)
-    104, // input 33 (0x21) => 'h' (0x68)
-    105, // input 34 (0x22) => 'i' (0x69)
-    106, // input 35 (0x23) => 'j' (0x6A)
-    107, // input 36 (0x24) => 'k' (0x6B)
-    108, // input 37 (0x25) => 'l' (0x6C)
-    109, // input 38 (0x26) => 'm' (0x6D)
-    110, // input 39 (0x27) => 'n' (0x6E)
-    111, // input 40 (0x28) => 'o' (0x6F)
-    112, // input 41 (0x29) => 'p' (0x70)
-    113, // input 42 (0x2A) => 'q' (0x71)
-    114, // input 43 (0x2B) => 'r' (0x72)
-    115, // input 44 (0x2C) => 's' (0x73)
-    116, // input 45 (0x2D) => 't' (0x74)
-    117, // input 46 (0x2E) => 'u' (0x75)
-    118, // input 47 (0x2F) => 'v' (0x76)
-    119, // input 48 (0x30) => 'w' (0x77)
-    120, // input 49 (0x31) => 'x' (0x78)
-    121, // input 50 (0x32) => 'y' (0x79)
-    122, // input 51 (0x33) => 'z' (0x7A)
-    48, // input 52 (0x34) => '0' (0x30)
-    49, // input 53 (0x35) => '1' (0x31)
-    50, // input 54 (0x36) => '2' (0x32)
-    51, // input 55 (0x37) => '3' (0x33)
-    52, // input 56 (0x38) => '4' (0x34)
-    53, // input 57 (0x39) => '5' (0x35)
-    54, // input 58 (0x3A) => '6' (0x36)
-    55, // input 59 (0x3B) => '7' (0x37)
-    56, // input 60 (0x3C) => '8' (0x38)
-    57, // input 61 (0x3D) => '9' (0x39)
-    45, // input 62 (0x3E) => '-' (0x2D)
-    95, // input 63 (0x3F) => '_' (0x5F)
-];
-pub const URL_SAFE_DECODE: &'static [u8; 256] = &[
-    INVALID_VALUE, // input 0 (0x0)
-    INVALID_VALUE, // input 1 (0x1)
-    INVALID_VALUE, // input 2 (0x2)
-    INVALID_VALUE, // input 3 (0x3)
-    INVALID_VALUE, // input 4 (0x4)
-    INVALID_VALUE, // input 5 (0x5)
-    INVALID_VALUE, // input 6 (0x6)
-    INVALID_VALUE, // input 7 (0x7)
-    INVALID_VALUE, // input 8 (0x8)
-    INVALID_VALUE, // input 9 (0x9)
-    INVALID_VALUE, // input 10 (0xA)
-    INVALID_VALUE, // input 11 (0xB)
-    INVALID_VALUE, // input 12 (0xC)
-    INVALID_VALUE, // input 13 (0xD)
-    INVALID_VALUE, // input 14 (0xE)
-    INVALID_VALUE, // input 15 (0xF)
-    INVALID_VALUE, // input 16 (0x10)
-    INVALID_VALUE, // input 17 (0x11)
-    INVALID_VALUE, // input 18 (0x12)
-    INVALID_VALUE, // input 19 (0x13)
-    INVALID_VALUE, // input 20 (0x14)
-    INVALID_VALUE, // input 21 (0x15)
-    INVALID_VALUE, // input 22 (0x16)
-    INVALID_VALUE, // input 23 (0x17)
-    INVALID_VALUE, // input 24 (0x18)
-    INVALID_VALUE, // input 25 (0x19)
-    INVALID_VALUE, // input 26 (0x1A)
-    INVALID_VALUE, // input 27 (0x1B)
-    INVALID_VALUE, // input 28 (0x1C)
-    INVALID_VALUE, // input 29 (0x1D)
-    INVALID_VALUE, // input 30 (0x1E)
-    INVALID_VALUE, // input 31 (0x1F)
-    INVALID_VALUE, // input 32 (0x20)
-    INVALID_VALUE, // input 33 (0x21)
-    INVALID_VALUE, // input 34 (0x22)
-    INVALID_VALUE, // input 35 (0x23)
-    INVALID_VALUE, // input 36 (0x24)
-    INVALID_VALUE, // input 37 (0x25)
-    INVALID_VALUE, // input 38 (0x26)
-    INVALID_VALUE, // input 39 (0x27)
-    INVALID_VALUE, // input 40 (0x28)
-    INVALID_VALUE, // input 41 (0x29)
-    INVALID_VALUE, // input 42 (0x2A)
-    INVALID_VALUE, // input 43 (0x2B)
-    INVALID_VALUE, // input 44 (0x2C)
-    62, // input 45 (0x2D char '-') => 62 (0x3E)
-    INVALID_VALUE, // input 46 (0x2E)
-    INVALID_VALUE, // input 47 (0x2F)
-    52, // input 48 (0x30 char '0') => 52 (0x34)
-    53, // input 49 (0x31 char '1') => 53 (0x35)
-    54, // input 50 (0x32 char '2') => 54 (0x36)
-    55, // input 51 (0x33 char '3') => 55 (0x37)
-    56, // input 52 (0x34 char '4') => 56 (0x38)
-    57, // input 53 (0x35 char '5') => 57 (0x39)
-    58, // input 54 (0x36 char '6') => 58 (0x3A)
-    59, // input 55 (0x37 char '7') => 59 (0x3B)
-    60, // input 56 (0x38 char '8') => 60 (0x3C)
-    61, // input 57 (0x39 char '9') => 61 (0x3D)
-    INVALID_VALUE, // input 58 (0x3A)
-    INVALID_VALUE, // input 59 (0x3B)
-    INVALID_VALUE, // input 60 (0x3C)
-    INVALID_VALUE, // input 61 (0x3D)
-    INVALID_VALUE, // input 62 (0x3E)
-    INVALID_VALUE, // input 63 (0x3F)
-    INVALID_VALUE, // input 64 (0x40)
-    0, // input 65 (0x41 char 'A') => 0 (0x0)
-    1, // input 66 (0x42 char 'B') => 1 (0x1)
-    2, // input 67 (0x43 char 'C') => 2 (0x2)
-    3, // input 68 (0x44 char 'D') => 3 (0x3)
-    4, // input 69 (0x45 char 'E') => 4 (0x4)
-    5, // input 70 (0x46 char 'F') => 5 (0x5)
-    6, // input 71 (0x47 char 'G') => 6 (0x6)
-    7, // input 72 (0x48 char 'H') => 7 (0x7)
-    8, // input 73 (0x49 char 'I') => 8 (0x8)
-    9, // input 74 (0x4A char 'J') => 9 (0x9)
-    10, // input 75 (0x4B char 'K') => 10 (0xA)
-    11, // input 76 (0x4C char 'L') => 11 (0xB)
-    12, // input 77 (0x4D char 'M') => 12 (0xC)
-    13, // input 78 (0x4E char 'N') => 13 (0xD)
-    14, // input 79 (0x4F char 'O') => 14 (0xE)
-    15, // input 80 (0x50 char 'P') => 15 (0xF)
-    16, // input 81 (0x51 char 'Q') => 16 (0x10)
-    17, // input 82 (0x52 char 'R') => 17 (0x11)
-    18, // input 83 (0x53 char 'S') => 18 (0x12)
-    19, // input 84 (0x54 char 'T') => 19 (0x13)
-    20, // input 85 (0x55 char 'U') => 20 (0x14)
-    21, // input 86 (0x56 char 'V') => 21 (0x15)
-    22, // input 87 (0x57 char 'W') => 22 (0x16)
-    23, // input 88 (0x58 char 'X') => 23 (0x17)
-    24, // input 89 (0x59 char 'Y') => 24 (0x18)
-    25, // input 90 (0x5A char 'Z') => 25 (0x19)
-    INVALID_VALUE, // input 91 (0x5B)
-    INVALID_VALUE, // input 92 (0x5C)
-    INVALID_VALUE, // input 93 (0x5D)
-    INVALID_VALUE, // input 94 (0x5E)
-    63, // input 95 (0x5F char '_') => 63 (0x3F)
-    INVALID_VALUE, // input 96 (0x60)
-    26, // input 97 (0x61 char 'a') => 26 (0x1A)
-    27, // input 98 (0x62 char 'b') => 27 (0x1B)
-    28, // input 99 (0x63 char 'c') => 28 (0x1C)
-    29, // input 100 (0x64 char 'd') => 29 (0x1D)
-    30, // input 101 (0x65 char 'e') => 30 (0x1E)
-    31, // input 102 (0x66 char 'f') => 31 (0x1F)
-    32, // input 103 (0x67 char 'g') => 32 (0x20)
-    33, // input 104 (0x68 char 'h') => 33 (0x21)
-    34, // input 105 (0x69 char 'i') => 34 (0x22)
-    35, // input 106 (0x6A char 'j') => 35 (0x23)
-    36, // input 107 (0x6B char 'k') => 36 (0x24)
-    37, // input 108 (0x6C char 'l') => 37 (0x25)
-    38, // input 109 (0x6D char 'm') => 38 (0x26)
-    39, // input 110 (0x6E char 'n') => 39 (0x27)
-    40, // input 111 (0x6F char 'o') => 40 (0x28)
-    41, // input 112 (0x70 char 'p') => 41 (0x29)
-    42, // input 113 (0x71 char 'q') => 42 (0x2A)
-    43, // input 114 (0x72 char 'r') => 43 (0x2B)
-    44, // input 115 (0x73 char 's') => 44 (0x2C)
-    45, // input 116 (0x74 char 't') => 45 (0x2D)
-    46, // input 117 (0x75 char 'u') => 46 (0x2E)
-    47, // input 118 (0x76 char 'v') => 47 (0x2F)
-    48, // input 119 (0x77 char 'w') => 48 (0x30)
-    49, // input 120 (0x78 char 'x') => 49 (0x31)
-    50, // input 121 (0x79 char 'y') => 50 (0x32)
-    51, // input 122 (0x7A char 'z') => 51 (0x33)
-    INVALID_VALUE, // input 123 (0x7B)
-    INVALID_VALUE, // input 124 (0x7C)
-    INVALID_VALUE, // input 125 (0x7D)
-    INVALID_VALUE, // input 126 (0x7E)
-    INVALID_VALUE, // input 127 (0x7F)
-    INVALID_VALUE, // input 128 (0x80)
-    INVALID_VALUE, // input 129 (0x81)
-    INVALID_VALUE, // input 130 (0x82)
-    INVALID_VALUE, // input 131 (0x83)
-    INVALID_VALUE, // input 132 (0x84)
-    INVALID_VALUE, // input 133 (0x85)
-    INVALID_VALUE, // input 134 (0x86)
-    INVALID_VALUE, // input 135 (0x87)
-    INVALID_VALUE, // input 136 (0x88)
-    INVALID_VALUE, // input 137 (0x89)
-    INVALID_VALUE, // input 138 (0x8A)
-    INVALID_VALUE, // input 139 (0x8B)
-    INVALID_VALUE, // input 140 (0x8C)
-    INVALID_VALUE, // input 141 (0x8D)
-    INVALID_VALUE, // input 142 (0x8E)
-    INVALID_VALUE, // input 143 (0x8F)
-    INVALID_VALUE, // input 144 (0x90)
-    INVALID_VALUE, // input 145 (0x91)
-    INVALID_VALUE, // input 146 (0x92)
-    INVALID_VALUE, // input 147 (0x93)
-    INVALID_VALUE, // input 148 (0x94)
-    INVALID_VALUE, // input 149 (0x95)
-    INVALID_VALUE, // input 150 (0x96)
-    INVALID_VALUE, // input 151 (0x97)
-    INVALID_VALUE, // input 152 (0x98)
-    INVALID_VALUE, // input 153 (0x99)
-    INVALID_VALUE, // input 154 (0x9A)
-    INVALID_VALUE, // input 155 (0x9B)
-    INVALID_VALUE, // input 156 (0x9C)
-    INVALID_VALUE, // input 157 (0x9D)
-    INVALID_VALUE, // input 158 (0x9E)
-    INVALID_VALUE, // input 159 (0x9F)
-    INVALID_VALUE, // input 160 (0xA0)
-    INVALID_VALUE, // input 161 (0xA1)
-    INVALID_VALUE, // input 162 (0xA2)
-    INVALID_VALUE, // input 163 (0xA3)
-    INVALID_VALUE, // input 164 (0xA4)
-    INVALID_VALUE, // input 165 (0xA5)
-    INVALID_VALUE, // input 166 (0xA6)
-    INVALID_VALUE, // input 167 (0xA7)
-    INVALID_VALUE, // input 168 (0xA8)
-    INVALID_VALUE, // input 169 (0xA9)
-    INVALID_VALUE, // input 170 (0xAA)
-    INVALID_VALUE, // input 171 (0xAB)
-    INVALID_VALUE, // input 172 (0xAC)
-    INVALID_VALUE, // input 173 (0xAD)
-    INVALID_VALUE, // input 174 (0xAE)
-    INVALID_VALUE, // input 175 (0xAF)
-    INVALID_VALUE, // input 176 (0xB0)
-    INVALID_VALUE, // input 177 (0xB1)
-    INVALID_VALUE, // input 178 (0xB2)
-    INVALID_VALUE, // input 179 (0xB3)
-    INVALID_VALUE, // input 180 (0xB4)
-    INVALID_VALUE, // input 181 (0xB5)
-    INVALID_VALUE, // input 182 (0xB6)
-    INVALID_VALUE, // input 183 (0xB7)
-    INVALID_VALUE, // input 184 (0xB8)
-    INVALID_VALUE, // input 185 (0xB9)
-    INVALID_VALUE, // input 186 (0xBA)
-    INVALID_VALUE, // input 187 (0xBB)
-    INVALID_VALUE, // input 188 (0xBC)
-    INVALID_VALUE, // input 189 (0xBD)
-    INVALID_VALUE, // input 190 (0xBE)
-    INVALID_VALUE, // input 191 (0xBF)
-    INVALID_VALUE, // input 192 (0xC0)
-    INVALID_VALUE, // input 193 (0xC1)
-    INVALID_VALUE, // input 194 (0xC2)
-    INVALID_VALUE, // input 195 (0xC3)
-    INVALID_VALUE, // input 196 (0xC4)
-    INVALID_VALUE, // input 197 (0xC5)
-    INVALID_VALUE, // input 198 (0xC6)
-    INVALID_VALUE, // input 199 (0xC7)
-    INVALID_VALUE, // input 200 (0xC8)
-    INVALID_VALUE, // input 201 (0xC9)
-    INVALID_VALUE, // input 202 (0xCA)
-    INVALID_VALUE, // input 203 (0xCB)
-    INVALID_VALUE, // input 204 (0xCC)
-    INVALID_VALUE, // input 205 (0xCD)
-    INVALID_VALUE, // input 206 (0xCE)
-    INVALID_VALUE, // input 207 (0xCF)
-    INVALID_VALUE, // input 208 (0xD0)
-    INVALID_VALUE, // input 209 (0xD1)
-    INVALID_VALUE, // input 210 (0xD2)
-    INVALID_VALUE, // input 211 (0xD3)
-    INVALID_VALUE, // input 212 (0xD4)
-    INVALID_VALUE, // input 213 (0xD5)
-    INVALID_VALUE, // input 214 (0xD6)
-    INVALID_VALUE, // input 215 (0xD7)
-    INVALID_VALUE, // input 216 (0xD8)
-    INVALID_VALUE, // input 217 (0xD9)
-    INVALID_VALUE, // input 218 (0xDA)
-    INVALID_VALUE, // input 219 (0xDB)
-    INVALID_VALUE, // input 220 (0xDC)
-    INVALID_VALUE, // input 221 (0xDD)
-    INVALID_VALUE, // input 222 (0xDE)
-    INVALID_VALUE, // input 223 (0xDF)
-    INVALID_VALUE, // input 224 (0xE0)
-    INVALID_VALUE, // input 225 (0xE1)
-    INVALID_VALUE, // input 226 (0xE2)
-    INVALID_VALUE, // input 227 (0xE3)
-    INVALID_VALUE, // input 228 (0xE4)
-    INVALID_VALUE, // input 229 (0xE5)
-    INVALID_VALUE, // input 230 (0xE6)
-    INVALID_VALUE, // input 231 (0xE7)
-    INVALID_VALUE, // input 232 (0xE8)
-    INVALID_VALUE, // input 233 (0xE9)
-    INVALID_VALUE, // input 234 (0xEA)
-    INVALID_VALUE, // input 235 (0xEB)
-    INVALID_VALUE, // input 236 (0xEC)
-    INVALID_VALUE, // input 237 (0xED)
-    INVALID_VALUE, // input 238 (0xEE)
-    INVALID_VALUE, // input 239 (0xEF)
-    INVALID_VALUE, // input 240 (0xF0)
-    INVALID_VALUE, // input 241 (0xF1)
-    INVALID_VALUE, // input 242 (0xF2)
-    INVALID_VALUE, // input 243 (0xF3)
-    INVALID_VALUE, // input 244 (0xF4)
-    INVALID_VALUE, // input 245 (0xF5)
-    INVALID_VALUE, // input 246 (0xF6)
-    INVALID_VALUE, // input 247 (0xF7)
-    INVALID_VALUE, // input 248 (0xF8)
-    INVALID_VALUE, // input 249 (0xF9)
-    INVALID_VALUE, // input 250 (0xFA)
-    INVALID_VALUE, // input 251 (0xFB)
-    INVALID_VALUE, // input 252 (0xFC)
-    INVALID_VALUE, // input 253 (0xFD)
-    INVALID_VALUE, // input 254 (0xFE)
-    INVALID_VALUE, // input 255 (0xFF)
-];
deleted file mode 100644
--- a/third_party/rust/base64-0.5.2/tests/tests.rs
+++ /dev/null
@@ -1,696 +0,0 @@
-extern crate base64;
-extern crate rand;
-
-use rand::Rng;
-
-use base64::*;
-
-fn compare_encode(expected: &str, target: &[u8]) {
-    assert_eq!(expected, encode(target));
-}
-
-fn compare_decode(expected: &str, target: &str) {
-    assert_eq!(expected, String::from_utf8(decode(target).unwrap()).unwrap());
-    assert_eq!(expected, String::from_utf8(decode(target.as_bytes()).unwrap()).unwrap());
-}
-
-fn compare_decode_mime(expected: &str, target: &str) {
-    assert_eq!(expected, String::from_utf8(decode_config(target, MIME).unwrap()).unwrap());
-}
-
-fn push_rand(buf: &mut Vec<u8>, len: usize) {
-    let mut r = rand::weak_rng();
-
-    for _ in 0..len {
-        buf.push(r.gen::<u8>());
-    }
-}
-
-// generate every possible byte string recursively and test encode/decode roundtrip
-fn roundtrip_append_recurse(byte_buf: &mut Vec<u8>, str_buf: &mut String, remaining_bytes: usize) {
-    let orig_length = byte_buf.len();
-    for b in 0..256 {
-        byte_buf.push(b as u8);
-
-        if remaining_bytes > 1 {
-            roundtrip_append_recurse(byte_buf, str_buf, remaining_bytes - 1)
-        } else {
-            encode_config_buf(&byte_buf, STANDARD, str_buf);
-            let roundtrip_bytes = decode_config(&str_buf, STANDARD).unwrap();
-            assert_eq!(*byte_buf, roundtrip_bytes);
-
-            str_buf.clear();
-
-        }
-
-        byte_buf.truncate(orig_length);
-    }
-}
-
-// generate every possible byte string recursively and test encode/decode roundtrip with
-// padding removed
-fn roundtrip_append_recurse_strip_padding(byte_buf: &mut Vec<u8>, str_buf: &mut String,
-                                          remaining_bytes: usize) {
-    let orig_length = byte_buf.len();
-    for b in 0..256 {
-        byte_buf.push(b as u8);
-
-        if remaining_bytes > 1 {
-            roundtrip_append_recurse_strip_padding(byte_buf, str_buf, remaining_bytes - 1)
-        } else {
-            encode_config_buf(&byte_buf, STANDARD, str_buf);
-            {
-                let trimmed = str_buf.trim_right_matches('=');
-                let roundtrip_bytes = decode_config(&trimmed, STANDARD).unwrap();
-                assert_eq!(*byte_buf, roundtrip_bytes);
-            }
-            str_buf.clear();
-        }
-
-        byte_buf.truncate(orig_length);
-    }
-}
-
-// generate random contents of the specified length and test encode/decode roundtrip
-fn roundtrip_random(byte_buf: &mut Vec<u8>, str_buf: &mut String, byte_len: usize,
-                    approx_values_per_byte: u8, max_rounds: u64) {
-    let num_rounds = calculate_number_of_rounds(byte_len, approx_values_per_byte, max_rounds);
-    let mut r = rand::weak_rng();
-
-    for _ in 0..num_rounds {
-        byte_buf.clear();
-        str_buf.clear();
-        while byte_buf.len() < byte_len {
-            byte_buf.push(r.gen::<u8>());
-        }
-
-        encode_config_buf(&byte_buf, STANDARD, str_buf);
-        let roundtrip_bytes = decode_config(&str_buf, STANDARD).unwrap();
-
-        assert_eq!(*byte_buf, roundtrip_bytes);
-    }
-}
-
-// generate random contents of the specified length and test encode/decode roundtrip
-fn roundtrip_random_strip_padding(byte_buf: &mut Vec<u8>, str_buf: &mut String, byte_len: usize,
-                    approx_values_per_byte: u8, max_rounds: u64) {
-    // let the short ones be short but don't let it get too crazy large
-    let num_rounds = calculate_number_of_rounds(byte_len, approx_values_per_byte, max_rounds);
-    let mut r = rand::weak_rng();
-
-    for _ in 0..num_rounds {
-        byte_buf.clear();
-        str_buf.clear();
-        while byte_buf.len() < byte_len {
-            byte_buf.push(r.gen::<u8>());
-        }
-
-        encode_config_buf(&byte_buf, STANDARD, str_buf);
-        let trimmed = str_buf.trim_right_matches('=');
-        let roundtrip_bytes = decode_config(&trimmed, STANDARD).unwrap();
-
-        assert_eq!(*byte_buf, roundtrip_bytes);
-    }
-}
-
-fn calculate_number_of_rounds(byte_len: usize, approx_values_per_byte: u8, max: u64) -> u64 {
-    // don't overflow
-    let mut prod = approx_values_per_byte as u64;
-
-    for _ in 0..byte_len {
-        if prod > max {
-            return max;
-        }
-
-        prod = prod.saturating_mul(prod);
-    }
-
-    return prod;
-}
-
-//-------
-//decode
-
-#[test]
-fn decode_rfc4648_0() {
-    compare_decode("", "");
-}
-
-#[test]
-fn decode_rfc4648_1() {
-    compare_decode("f", "Zg==");
-}
-#[test]
-fn decode_rfc4648_1_just_a_bit_of_padding() {
-    // allows less padding than required
-    compare_decode("f", "Zg=");
-}
-
-#[test]
-fn decode_rfc4648_1_no_padding() {
-    compare_decode("f", "Zg");
-}
-
-#[test]
-fn decode_rfc4648_2() {
-    compare_decode("fo", "Zm8=");
-}
-
-#[test]
-fn decode_rfc4648_2_no_padding() {
-    compare_decode("fo", "Zm8");
-}
-
-#[test]
-fn decode_rfc4648_3() {
-    compare_decode("foo", "Zm9v");
-}
-
-#[test]
-fn decode_rfc4648_4() {
-    compare_decode("foob", "Zm9vYg==");
-}
-
-#[test]
-fn decode_rfc4648_4_no_padding() {
-    compare_decode("foob", "Zm9vYg");
-}
-
-#[test]
-fn decode_rfc4648_5() {
-    compare_decode("fooba", "Zm9vYmE=");
-}
-
-#[test]
-fn decode_rfc4648_5_no_padding() {
-    compare_decode("fooba", "Zm9vYmE");
-}
-
-#[test]
-fn decode_rfc4648_6() {
-    compare_decode("foobar", "Zm9vYmFy");
-}
-
-//this is a MAY in the rfc: https://tools.ietf.org/html/rfc4648#section-3.3
-#[test]
-fn decode_pad_inside_fast_loop_chunk_error() {
-    // can't PartialEq Base64Error, so we do this the hard way
-    match decode("YWxpY2U=====").unwrap_err() {
-        DecodeError::InvalidByte(offset, byte) => {
-            // since the first 8 bytes are handled in the fast loop, the
-            // padding is an error. Could argue that the *next* padding
-            // byte is technically the first erroneous one, but reporting
-            // that accurately is more complex and probably nobody cares
-            assert_eq!(7, offset);
-            assert_eq!(0x3D, byte);
-        }
-        _ => assert!(false)
-    }
-}
-
-#[test]
-fn decode_extra_pad_after_fast_loop_chunk_error() {
-    match decode("YWxpY2UABB===").unwrap_err() {
-        DecodeError::InvalidByte(offset, byte) => {
-            // extraneous third padding byte
-            assert_eq!(12, offset);
-            assert_eq!(0x3D, byte);
-        }
-        _ => assert!(false)
-    };
-}
-
-
-//same
-#[test]
-fn decode_absurd_pad_error() {
-    match decode("==Y=Wx===pY=2U=====").unwrap_err() {
-        DecodeError::InvalidByte(size, byte) => {
-            assert_eq!(0, size);
-            assert_eq!(0x3D, byte);
-        }
-        _ => assert!(false)
-    }
-}
-
-#[test]
-fn decode_starts_with_padding_single_quad_error() {
-    match decode("====").unwrap_err() {
-        DecodeError::InvalidByte(offset, byte) => {
-            // with no real input, first padding byte is bogus
-            assert_eq!(0, offset);
-            assert_eq!(0x3D, byte);
-        }
-        _ => assert!(false)
-    }
-}
-
-#[test]
-fn decode_extra_padding_in_trailing_quad_returns_error() {
-    match decode("zzz==").unwrap_err() {
-        DecodeError::InvalidByte(size, byte) => {
-            // first unneeded padding byte
-            assert_eq!(4, size);
-            assert_eq!(0x3D, byte);
-        }
-        _ => assert!(false)
-    }
-}
-
-#[test]
-fn decode_extra_padding_in_trailing_quad_2_returns_error() {
-    match decode("zz===").unwrap_err() {
-        DecodeError::InvalidByte(size, byte) => {
-            // first unneeded padding byte
-            assert_eq!(4, size);
-            assert_eq!(0x3D, byte);
-        }
-        _ => assert!(false)
-    }
-}
-
-
-#[test]
-fn decode_start_second_quad_with_padding_returns_error() {
-    match decode("zzzz=").unwrap_err() {
-        DecodeError::InvalidByte(size, byte) => {
-            // first unneeded padding byte
-            assert_eq!(4, size);
-            assert_eq!(0x3D, byte);
-        }
-        _ => assert!(false)
-    }
-}
-
-#[test]
-fn decode_padding_in_last_quad_followed_by_non_padding_returns_error() {
-    match decode("zzzz==z").unwrap_err() {
-        DecodeError::InvalidByte(size, byte) => {
-            assert_eq!(4, size);
-            assert_eq!(0x3D, byte);
-        }
-        _ => assert!(false)
-    }
-}
-
-#[test]
-fn decode_too_short_with_padding_error() {
-    match decode("z==").unwrap_err() {
-        DecodeError::InvalidByte(size, byte) => {
-            // first unneeded padding byte
-            assert_eq!(1, size);
-            assert_eq!(0x3D, byte);
-        }
-        _ => assert!(false)
-    }
-}
-
-#[test]
-fn decode_too_short_without_padding_error() {
-    match decode("z").unwrap_err() {
-        DecodeError::InvalidLength => {}
-        _ => assert!(false)
-    }
-}
-
-#[test]
-fn decode_too_short_second_quad_without_padding_error() {
-    match decode("zzzzX").unwrap_err() {
-        DecodeError::InvalidLength => {}
-        _ => assert!(false)
-    }
-}
-
-#[test]
-fn decode_error_for_bogus_char_in_right_position() {
-    for length in 1..25 {
-        for error_position in 0_usize..length {
-            let prefix: String = std::iter::repeat("A").take(error_position).collect();
-            let suffix: String = std::iter::repeat("B").take(length - error_position - 1).collect();
-
-            let input = prefix + "%" + &suffix;
-            assert_eq!(length, input.len(),
-                "length {} error position {}", length, error_position);
-
-            match decode(&input).unwrap_err() {
-                DecodeError::InvalidByte(size, byte) => {
-                    assert_eq!(error_position, size,
-                        "length {} error position {}", length, error_position);
-                    assert_eq!(0x25, byte);
-                }
-                _ => assert!(false)
-            }
-        }
-    }
-}
-
-#[test]
-fn decode_into_nonempty_buffer_doesnt_clobber_existing_contents() {
-    let mut orig_data = Vec::new();
-    let mut encoded_data = String::new();
-    let mut decoded_with_prefix = Vec::new();
-    let mut decoded_without_prefix = Vec::new();
-    let mut prefix = Vec::new();
-    for encoded_length in 0_usize..26 {
-        if encoded_length % 4 == 1 {
-            // can't have a lone byte in a quad of input
-            continue;
-        };
-
-        let raw_data_byte_triples = encoded_length / 4;
-        // 4 base64 bytes -> 3 input bytes, 3 -> 2, 2 -> 1, 0 -> 0
-        let raw_data_byte_leftovers = (encoded_length % 4).saturating_sub(1);
-
-        // we'll borrow buf to make some data to encode
-        orig_data.clear();
-        push_rand(&mut orig_data, raw_data_byte_triples * 3 + raw_data_byte_leftovers);
-
-        encoded_data.clear();
-        encode_config_buf(&orig_data, STANDARD, &mut encoded_data);
-
-        assert_eq!(encoded_length, encoded_data.trim_right_matches('=').len());
-
-        for prefix_length in 1..26 {
-            decoded_with_prefix.clear();
-            decoded_without_prefix.clear();
-            prefix.clear();
-
-            // fill the buf with a prefix
-            push_rand(&mut prefix, prefix_length);
-            decoded_with_prefix.resize(prefix_length, 0);
-            decoded_with_prefix.copy_from_slice(&prefix);
-
-            // decode into the non-empty buf
-            decode_config_buf(&encoded_data, STANDARD, &mut decoded_with_prefix).unwrap();
-            // also decode into the empty buf
-            decode_config_buf(&encoded_data, STANDARD, &mut decoded_without_prefix).unwrap();
-
-            assert_eq!(prefix_length + decoded_without_prefix.len(), decoded_with_prefix.len());
-
-            // append plain decode onto prefix
-            prefix.append(&mut decoded_without_prefix);
-
-            assert_eq!(prefix, decoded_with_prefix);
-        }
-    }
-}
-
-#[test]
-fn roundtrip_random_no_fast_loop() {
-    let mut byte_buf: Vec<u8> = Vec::new();
-    let mut str_buf = String::new();
-
-    for input_len in 0..9 {
-        roundtrip_random(&mut byte_buf, &mut str_buf, input_len, 4, 10000);
-    }
-}
-
-#[test]
-fn roundtrip_random_with_fast_loop() {
-    let mut byte_buf: Vec<u8> = Vec::new();
-    let mut str_buf = String::new();
-
-    for input_len in 9..26 {
-        roundtrip_random(&mut byte_buf, &mut str_buf, input_len, 4, 100000);
-    }
-}
-
-#[test]
-fn roundtrip_random_no_fast_loop_no_padding() {
-    let mut byte_buf: Vec<u8> = Vec::new();
-    let mut str_buf = String::new();
-
-    for input_len in 0..9 {
-        roundtrip_random_strip_padding(&mut byte_buf, &mut str_buf, input_len, 4, 10000);
-    }
-}
-
-#[test]
-fn roundtrip_random_with_fast_loop_no_padding() {
-    let mut byte_buf: Vec<u8> = Vec::new();
-    let mut str_buf = String::new();
-
-    for input_len in 9..26 {
-        roundtrip_random_strip_padding(&mut byte_buf, &mut str_buf, input_len, 4, 100000);
-    }
-}
-
-#[test]
-fn roundtrip_all_1_byte() {
-    let mut byte_buf: Vec<u8> = Vec::new();
-    let mut str_buf = String::new();
-    roundtrip_append_recurse(&mut byte_buf, &mut str_buf, 1);
-}
-
-#[test]
-fn roundtrip_all_1_byte_no_padding() {
-    let mut byte_buf: Vec<u8> = Vec::new();
-    let mut str_buf = String::new();
-    roundtrip_append_recurse_strip_padding(&mut byte_buf, &mut str_buf, 1);
-}
-
-#[test]
-fn roundtrip_all_2_byte() {
-    let mut byte_buf: Vec<u8> = Vec::new();
-    let mut str_buf = String::new();
-    roundtrip_append_recurse(&mut byte_buf, &mut str_buf, 2);
-}
-
-#[test]
-fn roundtrip_all_2_byte_no_padding() {
-    let mut byte_buf: Vec<u8> = Vec::new();
-    let mut str_buf = String::new();
-    roundtrip_append_recurse_strip_padding(&mut byte_buf, &mut str_buf, 2);
-}
-
-#[test]
-fn roundtrip_all_3_byte() {
-    let mut byte_buf: Vec<u8> = Vec::new();
-    let mut str_buf = String::new();
-    roundtrip_append_recurse(&mut byte_buf, &mut str_buf, 3);
-}
-
-#[test]
-fn roundtrip_random_4_byte() {
-    let mut byte_buf: Vec<u8> = Vec::new();
-    let mut str_buf = String::new();
-
-    roundtrip_random(&mut byte_buf, &mut str_buf, 4, 48, 10000);
-}
-
-//TODO like, write a thing to test every ascii val lol
-//prolly just yankput the 64 array and a 256 one later
-//is there a way to like, not have to write a fn every time
-//"hi test harness this should panic 192 times" would be nice
-//oh well whatever this is better done by a fuzzer
-
-//strip yr whitespace kids
-#[test]
-#[should_panic]
-fn decode_reject_space() {
-    assert!(decode("YWx pY2U=").is_ok());
-}
-
-#[test]
-#[should_panic]
-fn decode_reject_tab() {
-    assert!(decode("YWx\tpY2U=").is_ok());
-}
-
-#[test]
-#[should_panic]
-fn decode_reject_ff() {
-    assert!(decode("YWx\x0cpY2U=").is_ok());
-}
-
-#[test]
-#[should_panic]
-fn decode_reject_vtab() {
-    assert!(decode("YWx\x0bpY2U=").is_ok());
-}
-
-#[test]
-#[should_panic]
-fn decode_reject_nl() {
-    assert!(decode("YWx\npY2U=").is_ok());
-}
-
-#[test]
-#[should_panic]
-fn decode_reject_crnl() {
-    assert!(decode("YWx\r\npY2U=").is_ok());
-}
-
-#[test]
-#[should_panic]
-fn decode_reject_null() {
-    assert!(decode("YWx\0pY2U=").is_ok());
-}
-
-#[test]
-fn decode_mime_allow_space() {
-    assert!(decode_config("YWx pY2U=", MIME).is_ok());
-}
-
-#[test]
-fn decode_mime_allow_tab() {
-    assert!(decode_config("YWx\tpY2U=", MIME).is_ok());
-}
-
-#[test]
-fn decode_mime_allow_ff() {
-    assert!(decode_config("YWx\x0cpY2U=", MIME).is_ok());
-}
-
-#[test]
-fn decode_mime_allow_vtab() {
-    assert!(decode_config("YWx\x0bpY2U=", MIME).is_ok());
-}
-
-#[test]
-fn decode_mime_allow_nl() {
-    assert!(decode_config("YWx\npY2U=", MIME).is_ok());
-}
-
-#[test]
-fn decode_mime_allow_crnl() {
-    assert!(decode_config("YWx\r\npY2U=", MIME).is_ok());
-}
-
-#[test]
-#[should_panic]
-fn decode_mime_reject_null() {
-    assert!(decode_config("YWx\0pY2U=", MIME).is_ok());
-}
-
-#[test]
-fn decode_mime_absurd_whitespace() {
-    compare_decode_mime("how could you let this happen",
-        "\n aG93I\n\nG\x0bNvd\r\nWxkI HlvdSB \tsZXQgdGh\rpcyBo\x0cYXBwZW4 =   ");
-}
-
-//-------
-//encode
-
-#[test]
-fn encode_rfc4648_0() {
-    compare_encode("", b"");
-}
-
-#[test]
-fn encode_rfc4648_1() {
-    compare_encode("Zg==", b"f");
-}
-
-#[test]
-fn encode_rfc4648_2() {
-    compare_encode("Zm8=", b"fo");
-}
-
-#[test]
-fn encode_rfc4648_3() {
-    compare_encode("Zm9v", b"foo");
-}
-
-#[test]
-fn encode_rfc4648_4() {
-    compare_encode("Zm9vYg==", b"foob");
-}
-
-#[test]
-fn encode_rfc4648_5() {
-    compare_encode("Zm9vYmE=", b"fooba");
-}
-
-#[test]
-fn encode_rfc4648_6() {
-    compare_encode("Zm9vYmFy", b"foobar");
-}
-
-#[test]
-fn encode_all_ascii() {
-    let mut ascii = Vec::<u8>::with_capacity(128);
-
-    for i in 0..128 {
-        ascii.push(i);
-    }
-
-    compare_encode("AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn8=", &ascii);
-}
-
-#[test]
-fn encode_all_bytes() {
-    let mut bytes = Vec::<u8>::with_capacity(256);
-
-    for i in 0..255 {
-        bytes.push(i);
-    }
-    bytes.push(255); //bug with "overflowing" ranges?
-
-    compare_encode("AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w==", &bytes);
-}
-
-#[test]
-fn encode_all_bytes_url() {
-    let mut bytes = Vec::<u8>::with_capacity(256);
-
-    for i in 0..255 {
-        bytes.push(i);
-    }
-    bytes.push(255); //bug with "overflowing" ranges?
-
-    assert_eq!("AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0-P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn-AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq-wsbKztLW2t7i5uru8vb6_wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t_g4eLj5OXm5-jp6uvs7e7v8PHy8_T19vf4-fr7_P3-_w==", encode_config(&bytes, URL_SAFE));
-}
-
-#[test]
-fn encode_into_nonempty_buffer_doesnt_clobber_existing_contents() {
-    let mut orig_data = Vec::new();
-    let mut encoded_with_prefix = String::new();
-    let mut encoded_without_prefix = String::new();
-    let mut prefix = String::new();
-    for orig_data_length in 0_usize..26 {
-        // we'll borrow buf to make some data to encode
-        orig_data.clear();
-        push_rand(&mut orig_data, orig_data_length);
-
-        for prefix_length in 1..26 {
-            encoded_with_prefix.clear();
-            encoded_without_prefix.clear();
-            prefix.clear();
-
-            for _ in 0..prefix_length {
-                prefix.push('~');
-            }
-
-            encoded_with_prefix.push_str(&prefix);
-
-            // encode into the non-empty buf
-            encode_config_buf(&orig_data, STANDARD, &mut encoded_with_prefix);
-            // also encode into the empty buf
-            encode_config_buf(&orig_data, STANDARD, &mut encoded_without_prefix);
-
-            assert_eq!(prefix_length + encoded_without_prefix.len(), encoded_with_prefix.len());
-
-            // append plain decode onto prefix
-            prefix.push_str(&mut encoded_without_prefix);
-
-            assert_eq!(prefix, encoded_with_prefix);
-        }
-    }
-}
-
-
-#[test]
-fn because_we_can() {
-    compare_decode("alice", "YWxpY2U=");
-    compare_decode("alice", &encode(b"alice"));
-    compare_decode("alice", &encode(&decode(&encode(b"alice")).unwrap()));
-}
-
-
-#[test]
-fn encode_url_safe_without_padding() {
-    let encoded = encode_config(b"alice", URL_SAFE_NO_PAD);
-    assert_eq!(&encoded, "YWxpY2U");
-    assert_eq!(String::from_utf8(decode(&encoded).unwrap()).unwrap(), "alice");
-}
--- a/third_party/rust/base64/.cargo-checksum.json
+++ b/third_party/rust/base64/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"6f4dcaea19fa469551f91670c673d9e240fee726ea78c0ab46ba7b779b3a0d31","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0dd882e53de11566d50f8e8e2d5a651bcf3fabee4987d70f306233cf39094ba7","README.md":"ac936d8d62e3aab7294e077901010ed0daf99b5f1df0569ffe197859955338c1","benches/benchmarks.rs":"9a7167a38f6f42be4ac32e723aeedcdfd8740a90775c461170a4203809e768f3","examples/make_tables.rs":"3c80f2a8cdb204168cc1b60f8904d544b2da067b9e6a7b40ade5fb4a994b4175","src/lib.rs":"cc226627c531a6d84c95f7b41dc024a26bb0b2341554b4b937baac4b591adf77","src/line_wrap.rs":"3a8f8fb96e3f63d80b87a94e8d4a235ad4e18bd3ee6413c2fd9dcd70354177b6","src/tables.rs":"378743892907cde87c1a92e6afee2df36ce590311e61381b2cc0404b3e018039","src/tests.rs":"61a54ba78255fd360f8b39ca47cefae2e5cb568b525ca1bef7e92dc127a0a485","tests/tests.rs":"80b9b3a44517baaf9bf584cf02fe521594f7993270dffeed3d1e743cf617206c"},"package":"96434f987501f0ed4eb336a411e0631ecd1afa11574fe148587adc4ff96143c9"}
\ No newline at end of file
+{"files":{"Cargo.toml":"79fbb792e6c1d05c44188c808ef7120c592e50291a706fe0f669b8ac9a2ad5e5","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0dd882e53de11566d50f8e8e2d5a651bcf3fabee4987d70f306233cf39094ba7","README.md":"b2da2fd61c4f3abf45127d183b61eb2dabc1c97cd191854987aa0328549a663f","benches/benchmarks.rs":"f0469f65f901c3e92fa506c0deb277fd136a7f968cae7cc4f030c0c15e52322f","examples/make_tables.rs":"3c80f2a8cdb204168cc1b60f8904d544b2da067b9e6a7b40ade5fb4a994b4175","src/lib.rs":"a3ac363513ae99a9b0049c19c92bc46b57ac9a0ebfd3317b7b387c5fbaa16a8a","src/tables.rs":"378743892907cde87c1a92e6afee2df36ce590311e61381b2cc0404b3e018039","tests/tests.rs":"dc2c293bae576cc596bdfb6ef783dc1d24d3bf992bf532caaebe1738cb0608cc"},"package":"30e93c03064e7590d0466209155251b90c22e37fab1daf2771582598b5827557"}
\ No newline at end of file
--- a/third_party/rust/base64/Cargo.toml
+++ b/third_party/rust/base64/Cargo.toml
@@ -1,22 +1,21 @@
 [package]
 name = "base64"
-version = "0.6.0"
+version = "0.5.2"
 authors = ["Alice Maz <alice@alicemaz.com>", "Marshall Pierce <marshall@mpierce.org>"]
 description = "encodes and decodes base64 as bytes or utf8"
 repository = "https://github.com/alicemaz/rust-base64"
 documentation = "https://github.com/alicemaz/rust-base64/blob/master/README.md"
 readme = "README.md"
 keywords = ["base64", "utf8", "encode", "decode"]
 categories = ["encoding"]
-license = "MIT/Apache-2.0"
+license = "MIT"
 
 [dependencies]
 byteorder = "1.0.0"
-safemem = "0.2.0"
 
 [dev-dependencies]
 rand = "=0.3.15"
 
 [profile.bench]
 # Uncomment when using `perf record`
 #debug = true
--- a/third_party/rust/base64/README.md
+++ b/third_party/rust/base64/README.md
@@ -1,17 +1,17 @@
 [base64](https://crates.io/crates/base64)
 ===
 
 It's base64. What more could anyone want?
 
 Example
 ---
 
-In Cargo.toml: `base64 = "~0.6.0"`
+In Cargo.toml: `base64 = "~0.5.0"`
 
 ```rust
 extern crate base64;
 
 use base64::{encode, decode};
 
 fn main() {
     let a = b"hello world";
@@ -101,26 +101,12 @@ You'll see a bunch of interleaved rust s
          :
          :                  let input_chunk = BigEndian::read_u64(&input_bytes[input_index..(input_index + 8)]);
          :                  morsel = decode_table[(input_chunk >> 56) as usize];
  lib.rs:322    3.68 :     106a4:       cmp    $0xff,%r15
          :                  if morsel == decode_tables::INVALID_VALUE {
     0.00 :        106ab:       je     1090e <base64::decode_config_buf::hbf68a45fefa299c1+0x46e>
 ```
 
-
-Fuzzing
----
-
-This uses [cargo-fuzz](https://github.com/rust-fuzz/cargo-fuzz). See `fuzz/fuzzers` for the available fuzzing scripts. To run, use an invocation like these:
-
-```
-rustup run nightly cargo fuzz run roundtrip
-rustup run nightly cargo fuzz run roundtrip_no_pad
-rustup run nightly cargo fuzz run roundtrip_mime -- -max_len=10240
-rustup run nightly cargo fuzz run roundtrip_random_config -- -max_len=10240
-```
-
-
 License
 ---
 
 This project is dual-licensed under MIT and Apache 2.0.
--- a/third_party/rust/base64/benches/benchmarks.rs
+++ b/third_party/rust/base64/benches/benchmarks.rs
@@ -1,107 +1,97 @@
 #![feature(test)]
 
 extern crate base64;
 extern crate test;
 extern crate rand;
 
-use base64::{decode, decode_config_buf, encode, encode_config_buf, Config, MIME, STANDARD};
+use base64::{decode, decode_config_buf, encode, encode_config_buf, STANDARD};
 
 use test::Bencher;
 use rand::Rng;
 
 #[bench]
 fn encode_3b(b: &mut Bencher) {
     do_encode_bench(b, 3)
 }
 
 #[bench]
 fn encode_3b_reuse_buf(b: &mut Bencher) {
-    do_encode_bench_reuse_buf(b, 3, STANDARD)
+    do_encode_bench_reuse_buf(b, 3)
 }
 
 #[bench]
 fn encode_50b(b: &mut Bencher) {
     do_encode_bench(b, 50)
 }
 
 #[bench]
 fn encode_50b_reuse_buf(b: &mut Bencher) {
-    do_encode_bench_reuse_buf(b, 50, STANDARD)
+    do_encode_bench_reuse_buf(b, 50)
 }
 
 #[bench]
 fn encode_100b(b: &mut Bencher) {
     do_encode_bench(b, 100)
 }
 
 #[bench]
 fn encode_100b_reuse_buf(b: &mut Bencher) {
-    do_encode_bench_reuse_buf(b, 100, STANDARD)
+    do_encode_bench_reuse_buf(b, 100)
 }
 
 #[bench]
 fn encode_500b(b: &mut Bencher) {
     do_encode_bench(b, 500)
 }
 
 #[bench]
 fn encode_500b_reuse_buf(b: &mut Bencher) {
-    do_encode_bench_reuse_buf(b, 500, STANDARD)
-}
-
-#[bench]
-fn encode_500b_reuse_buf_mime(b: &mut Bencher) {
-    do_encode_bench_reuse_buf(b, 500, MIME)
+    do_encode_bench_reuse_buf(b, 500)
 }
 
 #[bench]
 fn encode_3kib(b: &mut Bencher) {
     do_encode_bench(b, 3 * 1024)
 }
 
 #[bench]
 fn encode_3kib_reuse_buf(b: &mut Bencher) {
-    do_encode_bench_reuse_buf(b, 3 * 1024, STANDARD)
-}
-
-#[bench]
-fn encode_3kib_reuse_buf_mime(b: &mut Bencher) {
-    do_encode_bench_reuse_buf(b, 3 * 1024, MIME)
+    do_encode_bench_reuse_buf(b, 3 * 1024)
 }
 
 #[bench]
 fn encode_3mib(b: &mut Bencher) {
     do_encode_bench(b, 3 * 1024 * 1024)
 }
 
 #[bench]
 fn encode_3mib_reuse_buf(b: &mut Bencher) {
-    do_encode_bench_reuse_buf(b, 3 * 1024 * 1024, STANDARD)
+    do_encode_bench_reuse_buf(b, 3 * 1024 * 1024)
 }
 
 #[bench]
 fn encode_10mib(b: &mut Bencher) {
     do_encode_bench(b, 10 * 1024 * 1024)
 }
 
 #[bench]
 fn encode_10mib_reuse_buf(b: &mut Bencher) {
-    do_encode_bench_reuse_buf(b, 10 * 1024 * 1024, STANDARD)
+    do_encode_bench_reuse_buf(b, 10 * 1024 * 1024)
 }
 
 #[bench]
 fn encode_30mib(b: &mut Bencher) {
     do_encode_bench(b, 30 * 1024 * 1024)
 }
 
 #[bench]
 fn encode_30mib_reuse_buf(b: &mut Bencher) {
-    do_encode_bench_reuse_buf(b, 30 * 1024 * 1024, STANDARD)
+    do_encode_bench_reuse_buf(b, 30 * 1024 * 1024)
 }
 
 #[bench]
 fn decode_3b(b: &mut Bencher) {
     do_decode_bench(b, 3)
 }
 
 #[bench]
@@ -211,25 +201,26 @@ fn do_encode_bench(b: &mut Bencher, size
 
     b.bytes = v.len() as u64;
     b.iter(|| {
         let e = encode(&v);
         test::black_box(&e);
     });
 }
 
-fn do_encode_bench_reuse_buf(b: &mut Bencher, size: usize, config: Config) {
+fn do_encode_bench_reuse_buf(b: &mut Bencher, size: usize) {
     let mut v: Vec<u8> = Vec::with_capacity(size);
     fill(&mut v);
 
     let mut buf = String::new();
 
     b.bytes = v.len() as u64;
     b.iter(|| {
-        encode_config_buf(&v, config, &mut buf);
+        let e = encode_config_buf(&v, STANDARD, &mut buf);
+        test::black_box(&e);
         buf.clear();
     });
 }
 
 fn fill(v: &mut Vec<u8>) {
     let cap = v.capacity();
     // weak randomness is plenty; we just want to not be completely friendly to the branch predictor
     let mut r = rand::weak_rng();
--- a/third_party/rust/base64/src/lib.rs
+++ b/third_party/rust/base64/src/lib.rs
@@ -1,63 +1,34 @@
 extern crate byteorder;
 
 use std::{fmt, error, str};
 
 use byteorder::{BigEndian, ByteOrder};
 
 mod tables;
 
-mod line_wrap;
-use line_wrap::{line_wrap_parameters, line_wrap};
-
 /// Available encoding character sets
 #[derive(Clone, Copy, Debug)]
 pub enum CharacterSet {
     /// The standard character set (uses `+` and `/`)
     Standard,
     /// The URL safe character set (uses `-` and `_`)
     UrlSafe
 }
 
-impl CharacterSet {
-    fn encode_table(&self) -> &'static [u8; 64] {
-        match *self {
-            CharacterSet::Standard => tables::STANDARD_ENCODE,
-            CharacterSet::UrlSafe => tables::URL_SAFE_ENCODE
-        }
-    }
-
-    fn decode_table(&self) -> &'static [u8; 256] {
-        match *self {
-            CharacterSet::Standard => tables::STANDARD_DECODE,
-            CharacterSet::UrlSafe => tables::URL_SAFE_DECODE
-        }
-    }
-}
-
 #[derive(Clone, Copy, Debug)]
 pub enum LineEnding {
     LF,
     CRLF,
 }
 
-impl LineEnding {
-    fn len(&self) -> usize {
-        match *self {
-            LineEnding::LF => 1,
-            LineEnding::CRLF => 2
-        }
-    }
-}
-
 #[derive(Clone, Copy, Debug)]
 pub enum LineWrap {
     NoWrap,
-    // wrap length is always > 0
     Wrap(usize, LineEnding)
 }
 
 /// Contains configuration parameters for base64 encoding
 #[derive(Clone, Copy, Debug)]
 pub struct Config {
     /// Character set to use
     char_set: CharacterSet,
@@ -111,16 +82,17 @@ pub static URL_SAFE: Config = Config {
 
 pub static URL_SAFE_NO_PAD: Config = Config {
     char_set: CharacterSet::UrlSafe,
     pad: false,
     strip_whitespace: false,
     line_wrap: LineWrap::NoWrap,
 };
 
+
 #[derive(Debug, PartialEq, Eq)]
 pub enum DecodeError {
     InvalidByte(usize, u8),
     InvalidLength,
 }
 
 impl fmt::Display for DecodeError {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
@@ -194,56 +166,46 @@ pub fn decode<T: ?Sized + AsRef<[u8]>>(i
 ///    let b64 = base64::encode_config(b"hello world~", base64::STANDARD);
 ///    println!("{}", b64);
 ///
 ///    let b64_url = base64::encode_config(b"hello internet~", base64::URL_SAFE);
 ///    println!("{}", b64_url);
 ///}
 ///```
 pub fn encode_config<T: ?Sized + AsRef<[u8]>>(input: &T, config: Config) -> String {
-    let mut buf = match encoded_size(input.as_ref().len(), &config) {
+    let mut buf = match encoded_size(input.as_ref().len(), config) {
         Some(n) => String::with_capacity(n),
         None => panic!("integer overflow when calculating buffer size")
     };
 
     encode_config_buf(input, config, &mut buf);
 
     buf
 }
 
 /// calculate the base64 encoded string size, including padding
-fn encoded_size(bytes_len: usize, config: &Config) -> Option<usize> {
-    let rem = bytes_len % 3;
-
-    let complete_input_chunks = bytes_len / 3;
-    let complete_chunk_output = complete_input_chunks.checked_mul(4);
+fn encoded_size(bytes_len: usize, config: Config) -> Option<usize> {
+    let printing_output_chars = bytes_len
+        .checked_add(2)
+        .map(|x| x / 3)
+        .and_then(|x| x.checked_mul(4));
 
-    let encoded_len_no_wrap = if rem > 0 {
-        if config.pad {
-            complete_chunk_output.and_then(|c| c.checked_add(4))
-        } else {
-            let encoded_rem = match rem {
-                1 => 2,
-                2 => 3,
-                _ => panic!("Impossible remainder")
-            };
-            complete_chunk_output.and_then(|c| c.checked_add(encoded_rem))
-        }
-    } else {
-        complete_chunk_output
+    //TODO this is subtly wrong but in a not dangerous way
+    //pushing patch with identical to previous behavior, then fixing
+    let line_ending_output_chars = match config.line_wrap {
+        LineWrap::NoWrap => Some(0),
+        LineWrap::Wrap(n, LineEnding::CRLF) =>
+            printing_output_chars.map(|y| y / n).and_then(|y| y.checked_mul(2)),
+        LineWrap::Wrap(n, LineEnding::LF) =>
+            printing_output_chars.map(|y| y / n),
     };
 
-    encoded_len_no_wrap.map(|e| {
-        match config.line_wrap {
-            LineWrap::NoWrap => e,
-            LineWrap::Wrap(line_len, line_ending) => {
-                line_wrap_parameters(e, line_len, line_ending).total_len
-            }
-        }
-    })
+    printing_output_chars.and_then(|x|
+        line_ending_output_chars.and_then(|y| x.checked_add(y))
+    )
 }
 
 ///Encode arbitrary octets as base64.
 ///Writes into the supplied buffer to avoid allocations.
 ///
 ///# Example
 ///
 ///```rust
@@ -256,183 +218,119 @@ fn encoded_size(bytes_len: usize, config
 ///
 ///    buf.clear();
 ///    base64::encode_config_buf(b"hello internet~", base64::URL_SAFE, &mut buf);
 ///    println!("{}", buf);
 ///}
 ///```
 pub fn encode_config_buf<T: ?Sized + AsRef<[u8]>>(input: &T, config: Config, buf: &mut String) {
     let input_bytes = input.as_ref();
-
-    let encoded_size = encoded_size(input_bytes.len(), &config)
-        .expect("usize overflow when calculating buffer size");
-
-    let orig_buf_len = buf.len();
-
-    // we're only going to insert valid utf8
-    let mut buf_bytes;
-    unsafe {
-        buf_bytes = buf.as_mut_vec();
-    }
-
-    buf_bytes.resize(orig_buf_len.checked_add(encoded_size)
-                         .expect("usize overflow when calculating expanded buffer size"), 0);
-
-    let mut b64_output = &mut buf_bytes[orig_buf_len..];
-
-    let encoded_bytes = encode_with_padding(input_bytes, b64_output, config.char_set.encode_table(),
-                                            config.pad);
-
-    if let LineWrap::Wrap(line_len, line_end) = config.line_wrap {
-        line_wrap(b64_output, encoded_bytes, line_len, line_end);
-    }
-}
-
-/// Encode input bytes and pad if configured.
-/// `output` must be long enough to hold the encoded `input` with padding.
-/// Returns the number of bytes written.
-fn encode_with_padding(input: &[u8], output: &mut [u8], encode_table: &[u8; 64], pad: bool) -> usize {
-    let b64_bytes_written = encode_to_slice(input, output, encode_table);
-
-    let padding_bytes = if pad {
-        add_padding(input.len(), &mut output[b64_bytes_written..])
-    } else {
-        0
+    let ref charset = match config.char_set {
+        CharacterSet::Standard => tables::STANDARD_ENCODE,
+        CharacterSet::UrlSafe => tables::URL_SAFE_ENCODE,
     };
 
-    b64_bytes_written.checked_add(padding_bytes)
-        .expect("usize overflow when calculating b64 length")
-}
-
-/// Encode input bytes to utf8 base64 bytes. Does not pad or line wrap.
-/// `output` must be long enough to hold the encoded `input` without padding or line wrapping.
-/// Returns the number of bytes written.
-#[inline]
-fn encode_to_slice(input: &[u8], output: &mut [u8], encode_table: &[u8; 64]) -> usize {
-    let mut input_index: usize = 0;
-
-    const BLOCKS_PER_FAST_LOOP: usize = 4;
-    const LOW_SIX_BITS: u64 = 0x3F;
+    // reserve to make sure the memory we'll be writing to with unsafe is allocated
+    let resv_size = match encoded_size(input_bytes.len(), config) {
+        Some(n) => n,
+        None => panic!("integer overflow when calculating buffer size"),
+    };
+    buf.reserve(resv_size);
 
-    // we read 8 bytes at a time (u64) but only actually consume 6 of those bytes. Thus, we need
-    // 2 trailing bytes to be available to read..
-    let last_fast_index = input.len().saturating_sub(BLOCKS_PER_FAST_LOOP * 6 + 2);
-    let mut output_index = 0;
+    let orig_buf_len = buf.len();
+    let mut fast_loop_output_buf_len = orig_buf_len;
 
-    if last_fast_index > 0 {
-        while input_index <= last_fast_index {
-            // Major performance wins from letting the optimizer do the bounds check once, mostly
-            // on the output side
-            let input_chunk = &input[input_index..(input_index + (BLOCKS_PER_FAST_LOOP * 6 + 2))];
-            let mut output_chunk = &mut output[output_index..(output_index + BLOCKS_PER_FAST_LOOP * 8)];
+    let input_chunk_len = 6;
 
-            // Hand-unrolling for 32 vs 16 or 8 bytes produces yields performance about equivalent
-            // to unsafe pointer code on a Xeon E5-1650v3. 64 byte unrolling was slightly better for
-            // large inputs but significantly worse for 50-byte input, unsurprisingly. I suspect
-            // that it's a not uncommon use case to encode smallish chunks of data (e.g. a 64-byte
-            // SHA-512 digest), so it would be nice if that fit in the unrolled loop at least once.
-            // Plus, single-digit percentage performance differences might well be quite different
-            // on different hardware.
-
-            let input_u64 = BigEndian::read_u64(&input_chunk[0..]);
+    let last_fast_index = input_bytes.len().saturating_sub(8);
 
-            output_chunk[0] = encode_table[((input_u64 >> 58) & LOW_SIX_BITS) as usize];
-            output_chunk[1] = encode_table[((input_u64 >> 52) & LOW_SIX_BITS) as usize];
-            output_chunk[2] = encode_table[((input_u64 >> 46) & LOW_SIX_BITS) as usize];
-            output_chunk[3] = encode_table[((input_u64 >> 40) & LOW_SIX_BITS) as usize];
-            output_chunk[4] = encode_table[((input_u64 >> 34) & LOW_SIX_BITS) as usize];
-            output_chunk[5] = encode_table[((input_u64 >> 28) & LOW_SIX_BITS) as usize];
-            output_chunk[6] = encode_table[((input_u64 >> 22) & LOW_SIX_BITS) as usize];
-            output_chunk[7] = encode_table[((input_u64 >> 16) & LOW_SIX_BITS) as usize];
-
-            let input_u64 = BigEndian::read_u64(&input_chunk[6..]);
-
-            output_chunk[8] = encode_table[((input_u64 >> 58) & LOW_SIX_BITS) as usize];
-            output_chunk[9] = encode_table[((input_u64 >> 52) & LOW_SIX_BITS) as usize];
-            output_chunk[10] = encode_table[((input_u64 >> 46) & LOW_SIX_BITS) as usize];
-            output_chunk[11] = encode_table[((input_u64 >> 40) & LOW_SIX_BITS) as usize];
-            output_chunk[12] = encode_table[((input_u64 >> 34) & LOW_SIX_BITS) as usize];
-            output_chunk[13] = encode_table[((input_u64 >> 28) & LOW_SIX_BITS) as usize];
-            output_chunk[14] = encode_table[((input_u64 >> 22) & LOW_SIX_BITS) as usize];
-            output_chunk[15] = encode_table[((input_u64 >> 16) & LOW_SIX_BITS) as usize];
-
-            let input_u64 = BigEndian::read_u64(&input_chunk[12..]);
+    // we're only going to insert valid utf8
+    let mut raw = unsafe { buf.as_mut_vec() };
+    // start at the first free part of the output buf
+    let mut output_ptr = unsafe { raw.as_mut_ptr().offset(orig_buf_len as isize) };
+    let mut input_index: usize = 0;
+    if input_bytes.len() >= 8 {
+        while input_index <= last_fast_index {
+            let input_chunk = BigEndian::read_u64(&input_bytes[input_index..(input_index + 8)]);
 
-            output_chunk[16] = encode_table[((input_u64 >> 58) & LOW_SIX_BITS) as usize];
-            output_chunk[17] = encode_table[((input_u64 >> 52) & LOW_SIX_BITS) as usize];
-            output_chunk[18] = encode_table[((input_u64 >> 46) & LOW_SIX_BITS) as usize];
-            output_chunk[19] = encode_table[((input_u64 >> 40) & LOW_SIX_BITS) as usize];
-            output_chunk[20] = encode_table[((input_u64 >> 34) & LOW_SIX_BITS) as usize];
-            output_chunk[21] = encode_table[((input_u64 >> 28) & LOW_SIX_BITS) as usize];
-            output_chunk[22] = encode_table[((input_u64 >> 22) & LOW_SIX_BITS) as usize];
-            output_chunk[23] = encode_table[((input_u64 >> 16) & LOW_SIX_BITS) as usize];
-
-            let input_u64 = BigEndian::read_u64(&input_chunk[18..]);
+            // strip off 6 bits at a time for the first 6 bytes
+            unsafe {
+                std::ptr::write(output_ptr, charset[((input_chunk >> 58) & 0x3F) as usize]);
+                std::ptr::write(output_ptr.offset(1), charset[((input_chunk >> 52) & 0x3F) as usize]);
+                std::ptr::write(output_ptr.offset(2), charset[((input_chunk >> 46) & 0x3F) as usize]);
+                std::ptr::write(output_ptr.offset(3), charset[((input_chunk >> 40) & 0x3F) as usize]);
+                std::ptr::write(output_ptr.offset(4), charset[((input_chunk >> 34) & 0x3F) as usize]);
+                std::ptr::write(output_ptr.offset(5), charset[((input_chunk >> 28) & 0x3F) as usize]);
+                std::ptr::write(output_ptr.offset(6), charset[((input_chunk >> 22) & 0x3F) as usize]);
+                std::ptr::write(output_ptr.offset(7), charset[((input_chunk >> 16) & 0x3F) as usize]);
+                output_ptr = output_ptr.offset(8);
+            }
 
-            output_chunk[24] = encode_table[((input_u64 >> 58) & LOW_SIX_BITS) as usize];
-            output_chunk[25] = encode_table[((input_u64 >> 52) & LOW_SIX_BITS) as usize];
-            output_chunk[26] = encode_table[((input_u64 >> 46) & LOW_SIX_BITS) as usize];
-            output_chunk[27] = encode_table[((input_u64 >> 40) & LOW_SIX_BITS) as usize];
-            output_chunk[28] = encode_table[((input_u64 >> 34) & LOW_SIX_BITS) as usize];
-            output_chunk[29] = encode_table[((input_u64 >> 28) & LOW_SIX_BITS) as usize];
-            output_chunk[30] = encode_table[((input_u64 >> 22) & LOW_SIX_BITS) as usize];
-            output_chunk[31] = encode_table[((input_u64 >> 16) & LOW_SIX_BITS) as usize];
-
-            output_index += BLOCKS_PER_FAST_LOOP * 8;
-            input_index += BLOCKS_PER_FAST_LOOP * 6;
+            input_index += input_chunk_len;
+            fast_loop_output_buf_len += 8;
         }
     }
 
-    // Encode what's left after the fast loop.
+    unsafe {
+        // expand len to include the bytes we just wrote
+        raw.set_len(fast_loop_output_buf_len);
+    }
 
-    const LOW_SIX_BITS_U8: u8 = 0x3F;
+    // encode the 0 to 7 bytes left after the fast loop
 
-    let rem = input.len() % 3;
-    let start_of_rem = input.len() - rem;
+    let rem = input_bytes.len() % 3;
+    let start_of_rem = input_bytes.len() - rem;
 
     // start at the first index not handled by fast loop, which may be 0.
-
-    while input_index < start_of_rem {
-        let input_chunk = &input[input_index..(input_index + 3)];
-        let mut output_chunk = &mut output[output_index..(output_index + 4)];
+    let mut leftover_index = input_index;
 
-        output_chunk[0] = encode_table[(input_chunk[0] >> 2) as usize];
-        output_chunk[1] = encode_table[((input_chunk[0] << 4 | input_chunk[1] >> 4) & LOW_SIX_BITS_U8) as usize];
-        output_chunk[2] = encode_table[((input_chunk[1] << 2 | input_chunk[2] >> 6) & LOW_SIX_BITS_U8) as usize];
-        output_chunk[3] = encode_table[(input_chunk[2] & LOW_SIX_BITS_U8) as usize];
+    while leftover_index < start_of_rem {
+        raw.push(charset[(input_bytes[leftover_index] >> 2) as usize]);
+        raw.push(charset[((input_bytes[leftover_index] << 4 | input_bytes[leftover_index + 1] >> 4) & 0x3f) as usize]);
+        raw.push(charset[((input_bytes[leftover_index + 1] << 2 | input_bytes[leftover_index + 2] >> 6) & 0x3f) as usize]);
+        raw.push(charset[(input_bytes[leftover_index + 2] & 0x3f) as usize]);
 
-        input_index += 3;
-        output_index += 4;
+        leftover_index += 3;
     }
 
     if rem == 2 {
-        output[output_index] = encode_table[(input[start_of_rem] >> 2) as usize];
-        output[output_index + 1] = encode_table[((input[start_of_rem] << 4 | input[start_of_rem + 1] >> 4) & LOW_SIX_BITS_U8) as usize];
-        output[output_index + 2] = encode_table[((input[start_of_rem + 1] << 2) & LOW_SIX_BITS_U8) as usize];
-        output_index += 3;
+        raw.push(charset[(input_bytes[start_of_rem] >> 2) as usize]);
+        raw.push(charset[((input_bytes[start_of_rem] << 4 | input_bytes[start_of_rem + 1] >> 4) & 0x3f) as usize]);
+        raw.push(charset[(input_bytes[start_of_rem + 1] << 2 & 0x3f) as usize]);
     } else if rem == 1 {
-        output[output_index] = encode_table[(input[start_of_rem] >> 2) as usize];
-        output[output_index + 1] = encode_table[((input[start_of_rem] << 4) & LOW_SIX_BITS_U8) as usize];
-        output_index += 2;
+        raw.push(charset[(input_bytes[start_of_rem] >> 2) as usize]);
+        raw.push(charset[(input_bytes[start_of_rem] << 4 & 0x3f) as usize]);
+    }
+
+    if config.pad {
+        for _ in 0..((3 - rem) % 3) {
+            raw.push(0x3d);
+        }
     }
 
-    output_index
-}
+    //TODO FIXME this does the wrong thing for nonempty buffers
+    if orig_buf_len == 0 {
+        if let LineWrap::Wrap(line_size, line_end) = config.line_wrap {
+            let len = raw.len();
+            let mut i = 0;
+            let mut j = 0;
 
-/// Write padding characters.
-/// `output` is the slice where padding should be written, of length at least 2.
-fn add_padding(input_len: usize, output: &mut[u8]) -> usize {
-    let rem = input_len % 3;
-    let mut bytes_written = 0;
-    for _ in 0..((3 - rem) % 3) {
-        output[bytes_written] = b'=';
-        bytes_written += 1;
+            while i < len {
+                if i > 0 && i % line_size == 0 {
+                    match line_end {
+                        LineEnding::LF => { raw.insert(j, b'\n'); j += 1; }
+                        LineEnding::CRLF => { raw.insert(j, b'\r'); raw.insert(j + 1, b'\n'); j += 2; }
+                    }
+                }
+
+                i += 1;
+                j += 1;
+            }
+        }
     }
-
-    bytes_written
 }
 
 ///Decode from string reference as octets.
 ///Returns a Result containing a Vec<u8>.
 ///
 ///# Example
 ///
 ///```rust
@@ -481,96 +379,137 @@ pub fn decode_config_buf<T: ?Sized + AsR
         input_copy = Vec::<u8>::with_capacity(input.as_ref().len());
         input_copy.extend(input.as_ref().iter().filter(|b| !b" \n\t\r\x0b\x0c".contains(b)));
 
         input_copy.as_ref()
     } else {
         input.as_ref()
     };
 
-    let decode_table = &config.char_set.decode_table();
+    let ref decode_table = match config.char_set {
+        CharacterSet::Standard => tables::STANDARD_DECODE,
+        CharacterSet::UrlSafe => tables::URL_SAFE_DECODE,
+    };
+
+    buffer.reserve(input_bytes.len() * 3 / 4);
 
-    // decode logic operates on chunks of 8 input bytes without padding
-    const INPUT_CHUNK_LEN: usize = 8;
-    const DECODED_CHUNK_LEN: usize = 6;
-    // we read a u64 and write a u64, but a u64 of input only yields 6 bytes of output, so the last
-    // 2 bytes of any output u64 should not be counted as written to (but must be available in a
-    // slice).
-    const DECODED_CHUNK_SUFFIX: usize = 2;
-
-    let remainder_len = input_bytes.len() % INPUT_CHUNK_LEN;
+    // the fast loop only handles complete chunks of 8 input bytes without padding
+    let chunk_len = 8;
+    let decoded_chunk_len = 6;
+    let remainder_len = input_bytes.len() % chunk_len;
     let trailing_bytes_to_skip = if remainder_len == 0 {
-        // if input is a multiple of the chunk size, ignore the last chunk as it may have padding,
-        // and the fast decode logic cannot handle padding
-        INPUT_CHUNK_LEN
+        // if input is a multiple of the chunk size, ignore the last chunk as it may have padding
+        chunk_len
     } else {
         remainder_len
     };
 
     let length_of_full_chunks = input_bytes.len().saturating_sub(trailing_bytes_to_skip);
 
     let starting_output_index = buffer.len();
     // Resize to hold decoded output from fast loop. Need the extra two bytes because
-    // we write a full 8 bytes for the last 6-byte decoded chunk and then truncate off the last two.
+    // we write a full 8 bytes for the last 6-byte decoded chunk and then truncate off two
     let new_size = starting_output_index
-        .checked_add(length_of_full_chunks / INPUT_CHUNK_LEN * DECODED_CHUNK_LEN)
-        .and_then(|l| l.checked_add(DECODED_CHUNK_SUFFIX))
-        .expect("Overflow when calculating output buffer length");
+        + length_of_full_chunks / chunk_len * decoded_chunk_len
+        + (chunk_len - decoded_chunk_len);
+    buffer.resize(new_size, 0);
 
-    buffer.resize(new_size, 0);
+    let mut output_index = starting_output_index;
 
     {
-        let mut output_index = 0;
+        let buffer_slice = buffer.as_mut_slice();
+
         let mut input_index = 0;
-        let buffer_slice = &mut buffer.as_mut_slice()[starting_output_index..];
+        // initial value is never used; always set if fast loop breaks
+        let mut bad_byte_index: usize = 0;
+        // a non-invalid value means it's not an error if fast loop never runs
+        let mut morsel: u8 = 0;
+
+        // fast loop of 8 bytes at a time
+        while input_index < length_of_full_chunks {
+            let mut accum: u64;
 
-        // how many u64's of input to handle at a time
-        const CHUNKS_PER_FAST_LOOP_BLOCK: usize = 4;
-        const INPUT_BLOCK_LEN: usize = CHUNKS_PER_FAST_LOOP_BLOCK * INPUT_CHUNK_LEN;
-        // includes the trailing 2 bytes for the final u64 write
-        const DECODED_BLOCK_LEN: usize = CHUNKS_PER_FAST_LOOP_BLOCK * DECODED_CHUNK_LEN +
-            DECODED_CHUNK_SUFFIX;
-        // the start index of the last block of data that is big enough to use the unrolled loop
-        let last_block_start_index = length_of_full_chunks
-            .saturating_sub(INPUT_CHUNK_LEN * CHUNKS_PER_FAST_LOOP_BLOCK);
+            let input_chunk = BigEndian::read_u64(&input_bytes[input_index..(input_index + 8)]);
+            morsel = decode_table[(input_chunk >> 56) as usize];
+            if morsel == tables::INVALID_VALUE {
+                bad_byte_index = input_index;
+                break;
+            };
+            accum = (morsel as u64) << 58;
+
+            morsel = decode_table[(input_chunk >> 48 & 0xFF) as usize];
+            if morsel == tables::INVALID_VALUE {
+                bad_byte_index = input_index + 1;
+                break;
+            };
+            accum |= (morsel as u64) << 52;
+
+            morsel = decode_table[(input_chunk >> 40 & 0xFF) as usize];
+            if morsel == tables::INVALID_VALUE {
+                bad_byte_index = input_index + 2;
+                break;
+            };
+            accum |= (morsel as u64) << 46;
 
-        // manual unroll to CHUNKS_PER_FAST_LOOP_BLOCK of u64s to amortize slice bounds checks
-        if last_block_start_index > 0 {
-            while input_index <= last_block_start_index {
-                let input_slice = &input_bytes[input_index..(input_index + INPUT_BLOCK_LEN)];
-                let output_slice = &mut buffer_slice[output_index..(output_index + DECODED_BLOCK_LEN)];
+            morsel = decode_table[(input_chunk >> 32 & 0xFF) as usize];
+            if morsel == tables::INVALID_VALUE {
+                bad_byte_index = input_index + 3;
+                break;
+            };
+            accum |= (morsel as u64) << 40;
 
-                decode_chunk(&input_slice[0..], input_index, decode_table, &mut output_slice[0..])?;
-                decode_chunk(&input_slice[8..], input_index + 8, decode_table, &mut output_slice[6..])?;
-                decode_chunk(&input_slice[16..], input_index + 16, decode_table, &mut output_slice[12..])?;
-                decode_chunk(&input_slice[24..], input_index + 24, decode_table, &mut output_slice[18..])?;
+            morsel = decode_table[(input_chunk >> 24 & 0xFF) as usize];
+            if morsel == tables::INVALID_VALUE {
+                bad_byte_index = input_index + 4;
+                break;
+            };
+            accum |= (morsel as u64) << 34;
+
+            morsel = decode_table[(input_chunk >> 16 & 0xFF) as usize];
+            if morsel == tables::INVALID_VALUE {
+                bad_byte_index = input_index + 5;
+                break;
+            };
+            accum |= (morsel as u64) << 28;
 
-                input_index += INPUT_BLOCK_LEN;
-                output_index += DECODED_BLOCK_LEN - DECODED_CHUNK_SUFFIX;
-            }
-        }
+            morsel = decode_table[(input_chunk >> 8 & 0xFF) as usize];
+            if morsel == tables::INVALID_VALUE {
+                bad_byte_index = input_index + 6;
+                break;
+            };
+            accum |= (morsel as u64) << 22;
 
-        // still pretty fast loop: 8 bytes at a time for whatever we didn't do in the faster loop.
-        while input_index < length_of_full_chunks {
-            decode_chunk(&input_bytes[input_index..(input_index + 8)], input_index, decode_table,
-                         &mut buffer_slice[output_index..(output_index + 8)])?;
+            morsel = decode_table[(input_chunk & 0xFF) as usize];
+            if morsel == tables::INVALID_VALUE {
+                bad_byte_index = input_index + 7;
+                break;
+            };
+            accum |= (morsel as u64) << 16;
 
-            output_index += DECODED_CHUNK_LEN;
-            input_index += INPUT_CHUNK_LEN;
+            BigEndian::write_u64(&mut buffer_slice[(output_index)..(output_index + 8)],
+                                 accum);
+
+            output_index += 6;
+            input_index += chunk_len;
+        };
+
+        if morsel == tables::INVALID_VALUE {
+            // we got here from a break
+            return Err(DecodeError::InvalidByte(bad_byte_index, input_bytes[bad_byte_index]));
         }
     }
 
     // Truncate off the last two bytes from writing the last u64.
     // Unconditional because we added on the extra 2 bytes in the resize before the loop,
     // so it will never underflow.
-    let new_len = buffer.len() - DECODED_CHUNK_SUFFIX;
+    let new_len = buffer.len() - (chunk_len - decoded_chunk_len);
     buffer.truncate(new_len);
 
     // handle leftovers (at most 8 bytes, decoded to 6).
-    // Use a u64 as a stack-resident 8 byte buffer.
+    // Use a u64 as a stack-resident 8 bytes buffer.
     let mut leftover_bits: u64 = 0;
     let mut morsels_in_leftover = 0;
     let mut padding_bytes = 0;
     let mut first_padding_index: usize = 0;
     for (i, b) in input_bytes[length_of_full_chunks..].iter().enumerate() {
         // '=' padding
         if *b == 0x3D {
             // There can be bad padding in a few ways:
@@ -579,58 +518,49 @@ pub fn decode_config_buf<T: ?Sized + AsR
             //     in the current quad.
             // 3 - More than two characters of padding. If 3 or 4 padding chars
             //     are in the same quad, that implies it will be caught by #2.
             //     If it spreads from one quad to another, it will be caught by
             //     #2 in the second quad.
 
             if i % 4 < 2 {
                 // Check for case #2.
-                let bad_padding_index = length_of_full_chunks + if padding_bytes > 0 {
-                    // If we've already seen padding, report the first padding index.
-                    // This is to be consistent with the faster logic above: it will report an error
-                    // on the first padding character (since it doesn't expect to see anything but
-                    // actual encoded data).
-                    first_padding_index
-                } else {
-                    // haven't seen padding before, just use where we are now
-                    i
-                };
-                return Err(DecodeError::InvalidByte(bad_padding_index, *b));
-            }
+                // TODO InvalidPadding error
+                return Err(DecodeError::InvalidByte(length_of_full_chunks + i, *b));
+            };
 
             if padding_bytes == 0 {
                 first_padding_index = i;
-            }
+            };
 
             padding_bytes += 1;
             continue;
-        }
+        };
 
         // Check for case #1.
         // To make '=' handling consistent with the main loop, don't allow
         // non-suffix '=' in trailing chunk either. Report error as first
         // erroneous padding.
         if padding_bytes > 0 {
             return Err(DecodeError::InvalidByte(
                 length_of_full_chunks + first_padding_index, 0x3D));
-        }
+        };
 
         // can use up to 8 * 6 = 48 bits of the u64, if last chunk has no padding.
         // To minimize shifts, pack the leftovers from left to right.
         let shift = 64 - (morsels_in_leftover + 1) * 6;
-        // tables are all 256 elements, lookup with a u8 index always succeeds
+        // tables are all 256 elements, cannot overflow from a u8 index
         let morsel = decode_table[*b as usize];
         if morsel == tables::INVALID_VALUE {
             return Err(DecodeError::InvalidByte(length_of_full_chunks + i, *b));
-        }
+        };
 
         leftover_bits |= (morsel as u64) << shift;
         morsels_in_leftover += 1;
-    }
+    };
 
     let leftover_bits_ready_to_append = match morsels_in_leftover {
         0 => 0,
         1 => return Err(DecodeError::InvalidLength),
         2 => 8,
         3 => 16,
         4 => 24,
         5 => return Err(DecodeError::InvalidLength),
@@ -647,69 +577,99 @@ pub fn decode_config_buf<T: ?Sized + AsR
         buffer.push(selected_bits);
 
         leftover_bits_appended_to_buf += 8;
     };
 
     Ok(())
 }
 
-// yes, really inline (worth 30-50% speedup)
-#[inline(always)]
-fn decode_chunk(input: &[u8], index_at_start_of_input: usize, decode_table: &[u8; 256],
-                output: &mut [u8]) -> Result<(), DecodeError> {
-    let mut accum: u64;
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    #[test]
+    fn encoded_size_correct() {
+        assert_eq!(Some(0), encoded_size(0, STANDARD));
 
-    let morsel = decode_table[input[0] as usize];
-    if morsel == tables::INVALID_VALUE {
-        return Err(DecodeError::InvalidByte(index_at_start_of_input, input[0]));
-    }
-    accum = (morsel as u64) << 58;
+        assert_eq!(Some(4), encoded_size(1, STANDARD));
+        assert_eq!(Some(4), encoded_size(2, STANDARD));
+        assert_eq!(Some(4), encoded_size(3, STANDARD));
+
+        assert_eq!(Some(8), encoded_size(4, STANDARD));
+        assert_eq!(Some(8), encoded_size(5, STANDARD));
+        assert_eq!(Some(8), encoded_size(6, STANDARD));
+
+        assert_eq!(Some(12), encoded_size(7, STANDARD));
+        assert_eq!(Some(12), encoded_size(8, STANDARD));
+        assert_eq!(Some(12), encoded_size(9, STANDARD));
+
+        assert_eq!(Some(72), encoded_size(54, STANDARD));
 
-    let morsel = decode_table[input[1] as usize];
-    if morsel == tables::INVALID_VALUE {
-        return Err(DecodeError::InvalidByte(index_at_start_of_input + 1, input[1]));
+        assert_eq!(Some(76), encoded_size(55, STANDARD));
+        assert_eq!(Some(76), encoded_size(56, STANDARD));
+        assert_eq!(Some(76), encoded_size(57, STANDARD));
+
+        assert_eq!(Some(80), encoded_size(58, STANDARD));
     }
-    accum |= (morsel as u64) << 52;
+
+    #[test]
+    fn encoded_size_correct_mime() {
+        assert_eq!(Some(0), encoded_size(0, MIME));
 
-    let morsel = decode_table[input[2] as usize];
-    if morsel == tables::INVALID_VALUE {
-        return Err(DecodeError::InvalidByte(index_at_start_of_input + 2, input[2]));
-    }
-    accum |= (morsel as u64) << 46;
+        assert_eq!(Some(4), encoded_size(1, MIME));
+        assert_eq!(Some(4), encoded_size(2, MIME));
+        assert_eq!(Some(4), encoded_size(3, MIME));
 
-    let morsel = decode_table[input[3] as usize];
-    if morsel == tables::INVALID_VALUE {
-        return Err(DecodeError::InvalidByte(index_at_start_of_input + 3, input[3]));
-    }
-    accum |= (morsel as u64) << 40;
+        assert_eq!(Some(8), encoded_size(4, MIME));
+        assert_eq!(Some(8), encoded_size(5, MIME));
+        assert_eq!(Some(8), encoded_size(6, MIME));
+
+        assert_eq!(Some(12), encoded_size(7, MIME));
+        assert_eq!(Some(12), encoded_size(8, MIME));
+        assert_eq!(Some(12), encoded_size(9, MIME));
 
-    let morsel = decode_table[input[4] as usize];
-    if morsel == tables::INVALID_VALUE {
-        return Err(DecodeError::InvalidByte(index_at_start_of_input + 4, input[4]));
-    }
-    accum |= (morsel as u64) << 34;
+        assert_eq!(Some(72), encoded_size(54, MIME));
 
-    let morsel = decode_table[input[5] as usize];
-    if morsel == tables::INVALID_VALUE {
-        return Err(DecodeError::InvalidByte(index_at_start_of_input + 5, input[5]));
-    }
-    accum |= (morsel as u64) << 28;
+        assert_eq!(Some(78), encoded_size(55, MIME));
+        assert_eq!(Some(78), encoded_size(56, MIME));
+        assert_eq!(Some(78), encoded_size(57, MIME));
 
-    let morsel = decode_table[input[6] as usize];
-    if morsel == tables::INVALID_VALUE {
-        return Err(DecodeError::InvalidByte(index_at_start_of_input + 6, input[6]));
+        assert_eq!(Some(82), encoded_size(58, MIME));
     }
-    accum |= (morsel as u64) << 22;
 
-    let morsel = decode_table[input[7] as usize];
-    if morsel == tables::INVALID_VALUE {
-        return Err(DecodeError::InvalidByte(index_at_start_of_input + 7, input[7]));
-    }
-    accum |= (morsel as u64) << 16;
+    #[test]
+    fn encoded_size_correct_lf() {
+        let config = Config::new(
+            CharacterSet::Standard,
+            true,
+            false,
+            LineWrap::Wrap(76, LineEnding::LF)
+        );
+
+        assert_eq!(Some(0), encoded_size(0, config));
+
+        assert_eq!(Some(4), encoded_size(1, config));
+        assert_eq!(Some(4), encoded_size(2, config));
+        assert_eq!(Some(4), encoded_size(3, config));
 
-    BigEndian::write_u64(output, accum);
+        assert_eq!(Some(8), encoded_size(4, config));
+        assert_eq!(Some(8), encoded_size(5, config));
+        assert_eq!(Some(8), encoded_size(6, config));
+
+        assert_eq!(Some(12), encoded_size(7, config));
+        assert_eq!(Some(12), encoded_size(8, config));
+        assert_eq!(Some(12), encoded_size(9, config));
+
+        assert_eq!(Some(72), encoded_size(54, config));
 
-    Ok(())
+        assert_eq!(Some(77), encoded_size(55, config));
+        assert_eq!(Some(77), encoded_size(56, config));
+        assert_eq!(Some(77), encoded_size(57, config));
+
+        assert_eq!(Some(81), encoded_size(58, config));
+    }
+
+    #[test]
+    fn encoded_size_overflow() {
+        assert_eq!(None, encoded_size(std::usize::MAX, STANDARD));
+    }
 }
-
-#[cfg(test)]
-mod tests;
deleted file mode 100644
--- a/third_party/rust/base64/src/line_wrap.rs
+++ /dev/null
@@ -1,350 +0,0 @@
-extern crate safemem;
-
-use super::*;
-
-use std::str;
-
-#[derive(Debug, PartialEq)]
-pub struct LineWrapParameters {
-    // number of lines that need an ending
-    pub lines_with_endings: usize,
-    // length of last line (which never needs an ending)
-    pub last_line_len: usize,
-    // length of lines that need an ending (which are always full lines), with their endings
-    pub total_full_wrapped_lines_len: usize,
-    // length of all lines, including endings for the ones that need them
-    pub total_len: usize,
-    // length of the line endings only
-    pub total_line_endings_len: usize
-}
-
-/// Calculations about how many lines we'll get for a given line length, line ending, etc.
-/// This assumes that the last line will not get an ending, even if it is the full line length.
-pub fn line_wrap_parameters(input_len: usize, line_len: usize, line_ending: LineEnding)
-                            -> LineWrapParameters {
-    let line_ending_len = line_ending.len();
-
-    if input_len <= line_len {
-        // no wrapping needed
-        return LineWrapParameters {
-            lines_with_endings: 0,
-            last_line_len: input_len,
-            total_full_wrapped_lines_len: 0,
-            total_len: input_len,
-            total_line_endings_len: 0
-        };
-    };
-
-    // num_lines_with_endings > 0, last_line_length > 0
-    let (num_lines_with_endings, last_line_length) = if input_len % line_len > 0 {
-        // Every full line has an ending since there is a partial line at the end
-        (input_len / line_len, input_len % line_len)
-    } else {
-        // Every line is a full line, but no trailing ending.
-        // Subtraction will not underflow since we know input_len > line_len.
-        (input_len / line_len - 1, line_len)
-    };
-
-    // TODO should we expose exceeding usize via Result to be kind to 16-bit users? Or is that
-    // always going to be a panic anyway in practice? If we choose to use a Result we could pull
-    // line wrapping out of the normal encode path and have it be a separate step. Then only users
-    // who need line wrapping would care about the possibility for error.
-
-    let single_full_line_with_ending_len = line_len.checked_add(line_ending_len)
-        .expect("Line length with ending exceeds usize");
-    // length of just the full lines with line endings
-    let total_full_wrapped_lines_len = num_lines_with_endings
-        .checked_mul(single_full_line_with_ending_len)
-        .expect("Full lines with endings length exceeds usize");
-    // all lines with appropriate endings, including the last line
-    let total_all_wrapped_len = total_full_wrapped_lines_len.checked_add(last_line_length)
-        .expect("All lines with endings length exceeds usize");
-    let total_line_endings_len = num_lines_with_endings.checked_mul(line_ending_len)
-        .expect("Total line endings length exceeds usize");
-
-    LineWrapParameters {
-        lines_with_endings: num_lines_with_endings,
-        last_line_len: last_line_length,
-        total_full_wrapped_lines_len: total_full_wrapped_lines_len,
-        total_len: total_all_wrapped_len,
-        total_line_endings_len: total_line_endings_len
-    }
-}
-
-
-/// Insert line endings into the encoded base64 after each complete line (except the last line, even
-/// if it is complete).
-/// The provided buffer must be large enough to handle the increased size after endings are
-/// inserted.
-/// `input_len` is the length of the encoded data in `encoded_buf`.
-/// `line_len` is the width without line ending characters.
-/// Returns the number of line ending bytes added.
-pub fn line_wrap(encoded_buf: &mut [u8], input_len: usize, line_len: usize, line_ending: LineEnding) -> usize {
-    let line_wrap_params = line_wrap_parameters(input_len, line_len, line_ending);
-
-    // ptr.offset() is undefined if it wraps, and there is no checked_offset(). However, because
-    // we perform this check up front to make sure we have enough capacity, we know that none of
-    // the subsequent pointer operations (assuming they implement the desired behavior of course!)
-    // will overflow.
-    assert!(encoded_buf.len() >= line_wrap_params.total_len,
-        "Buffer must be able to hold encoded data after line wrapping");
-
-    // Move the last line, either partial or full, by itself as it does not have a line ending
-    // afterwards
-    let last_line_start = line_wrap_params.lines_with_endings.checked_mul(line_len)
-        .expect("Start of last line in input exceeds usize");
-    // last line starts immediately after all the wrapped full lines
-    let new_line_start = line_wrap_params.total_full_wrapped_lines_len;
-
-    safemem::copy_over(encoded_buf, last_line_start, new_line_start, line_wrap_params.last_line_len);
-
-    let mut line_ending_bytes = 0;
-
-    let line_ending_len = line_ending.len();
-
-    // handle the full lines
-    for line_num in 0..line_wrap_params.lines_with_endings {
-        // doesn't underflow because line_num < lines_with_endings
-        let lines_before_this_line = line_wrap_params.lines_with_endings - 1 - line_num;
-        let old_line_start = lines_before_this_line.checked_mul(line_len)
-            .expect("Old line start index exceeds usize");
-        let new_line_start = lines_before_this_line.checked_mul(line_ending_len)
-            .and_then(|i| i.checked_add(old_line_start))
-            .expect("New line start index exceeds usize");
-
-        safemem::copy_over(encoded_buf, old_line_start, new_line_start, line_len);
-
-        let after_new_line = new_line_start.checked_add(line_len)
-            .expect("Line ending index exceeds usize");
-
-        match line_ending {
-            LineEnding::LF => {
-                encoded_buf[after_new_line] = b'\n';
-                line_ending_bytes += 1;
-            }
-            LineEnding::CRLF => {
-                encoded_buf[after_new_line] = b'\r';
-                encoded_buf[after_new_line.checked_add(1).expect("Line ending index exceeds usize")]
-                    = b'\n';
-                line_ending_bytes += 2;
-            }
-        }
-    }
-
-    assert_eq!(line_wrap_params.total_line_endings_len, line_ending_bytes);
-
-    line_ending_bytes
-}
-
-#[cfg(test)]
-mod tests {
-    extern crate rand;
-
-    use super::super::*;
-    use super::*;
-
-    use self::rand::Rng;
-    use self::rand::distributions::{IndependentSample, Range};
-
-    #[test]
-    fn line_params_perfect_multiple_of_line_length_lf() {
-        let params = line_wrap_parameters(100, 20, LineEnding::LF);
-
-        assert_eq!(LineWrapParameters {
-            lines_with_endings: 4,
-            last_line_len: 20,
-            total_full_wrapped_lines_len: 84,
-            total_len: 104,
-            total_line_endings_len: 4
-        }, params);
-    }
-
-    #[test]
-    fn line_params_partial_last_line_crlf() {
-        let params = line_wrap_parameters(103, 20, LineEnding::CRLF);
-
-        assert_eq!(LineWrapParameters {
-            lines_with_endings: 5,
-            last_line_len: 3,
-            total_full_wrapped_lines_len: 110,
-            total_len: 113,
-            total_line_endings_len: 10
-        }, params);
-    }
-
-    #[test]
-    fn line_params_line_len_1_crlf() {
-        let params = line_wrap_parameters(100, 1, LineEnding::CRLF);
-
-        assert_eq!(LineWrapParameters {
-            lines_with_endings: 99,
-            last_line_len: 1,
-            total_full_wrapped_lines_len: 99 * 3,
-            total_len: 99 * 3 + 1,
-            total_line_endings_len: 99 * 2
-        }, params);
-    }
-
-    #[test]
-    fn line_params_line_len_longer_than_input_crlf() {
-        let params = line_wrap_parameters(100, 200, LineEnding::CRLF);
-
-        assert_eq!(LineWrapParameters {
-            lines_with_endings: 0,
-            last_line_len: 100,
-            total_full_wrapped_lines_len: 0,
-            total_len: 100,
-            total_line_endings_len: 0
-        }, params);
-    }
-
-    #[test]
-    fn line_params_line_len_same_as_input_crlf() {
-        let params = line_wrap_parameters(100, 100, LineEnding::CRLF);
-
-        assert_eq!(LineWrapParameters {
-            lines_with_endings: 0,
-            last_line_len: 100,
-            total_full_wrapped_lines_len: 0,
-            total_len: 100,
-            total_line_endings_len: 0
-        }, params);
-    }
-
-    #[test]
-    fn line_wrap_length_1_lf() {
-        let mut buf = vec![0x1, 0x2, 0x3, 0x4];
-
-        do_line_wrap(&mut buf, 1, LineEnding::LF);
-
-        assert_eq!(vec![0x1, 0xA, 0x2, 0xA, 0x3, 0xA, 0x4], buf);
-    }
-
-    #[test]
-    fn line_wrap_length_1_crlf() {
-        let mut buf = vec![0x1, 0x2, 0x3, 0x4];
-
-        do_line_wrap(&mut buf, 1, LineEnding::CRLF);
-
-        assert_eq!(vec![0x1, 0xD, 0xA, 0x2, 0xD, 0xA, 0x3, 0xD, 0xA, 0x4], buf);
-    }
-
-    #[test]
-    fn line_wrap_length_2_lf_full_lines() {
-        let mut buf = vec![0x1, 0x2, 0x3, 0x4];
-
-        do_line_wrap(&mut buf, 2, LineEnding::LF);
-
-        assert_eq!(vec![0x1, 0x2, 0xA, 0x3, 0x4], buf);
-    }
-
-    #[test]
-    fn line_wrap_length_2_crlf_full_lines() {
-        let mut buf = vec![0x1, 0x2, 0x3, 0x4];
-
-        do_line_wrap(&mut buf, 2, LineEnding::CRLF);
-
-        assert_eq!(vec![0x1, 0x2, 0xD, 0xA, 0x3, 0x4], buf);
-    }
-
-    #[test]
-    fn line_wrap_length_2_lf_partial_line() {
-        let mut buf = vec![0x1, 0x2, 0x3, 0x4, 0x5];
-
-        do_line_wrap(&mut buf, 2, LineEnding::LF);
-
-        assert_eq!(vec![0x1, 0x2, 0xA, 0x3, 0x4, 0xA, 0x5], buf);
-    }
-
-    #[test]
-    fn line_wrap_length_2_crlf_partial_line() {
-        let mut buf = vec![0x1, 0x2, 0x3, 0x4, 0x5];
-
-        do_line_wrap(&mut buf, 2, LineEnding::CRLF);
-
-        assert_eq!(vec![0x1, 0x2, 0xD, 0xA, 0x3, 0x4, 0xD, 0xA, 0x5], buf);
-    }
-
-    #[test]
-    fn line_wrap_random() {
-        let mut buf: Vec<u8> = Vec::new();
-        let buf_range = Range::new(10, 1000);
-        let line_range = Range::new(10, 100);
-        let mut rng = rand::weak_rng();
-
-        for _ in 0..10_000 {
-            buf.clear();
-
-            let buf_len = buf_range.ind_sample(&mut rng);
-            let line_len = line_range.ind_sample(&mut rng);
-            let line_ending = if rng.gen() {
-                LineEnding::LF
-            } else {
-                LineEnding::CRLF
-            };
-            let line_ending_len = line_ending.len();
-
-            for _ in 0..buf_len {
-                buf.push(rng.gen());
-            }
-
-            let line_wrap_params = line_wrap_parameters(buf_len, line_len, line_ending);
-
-            let not_wrapped_buf = buf.to_vec();
-
-            let _ = do_line_wrap(&mut buf, line_len, line_ending);
-
-            // remove the endings
-            for line_ending_num in 0..line_wrap_params.lines_with_endings {
-                let line_ending_offset = (line_ending_num + 1) * line_len;
-
-                for _ in 0..line_ending_len {
-                    buf.remove(line_ending_offset);
-                }
-            }
-
-            assert_eq!(not_wrapped_buf, buf);
-        }
-    }
-
-    fn do_line_wrap(buf: &mut Vec<u8>, line_len: usize, line_ending: LineEnding) -> usize {
-        let mut rng = rand::weak_rng();
-
-        let orig_len = buf.len();
-
-        // A 3x inflation is enough for the worst case: line length 1, crlf ending.
-        // We add on extra bytes so we'll have un-wrapped bytes at the end that shouldn't get
-        // modified..
-        for _ in 0..(1000 + 2 * orig_len) {
-            buf.push(rng.gen());
-        }
-
-        let mut before_line_wrap = buf.to_vec();
-
-        let params = line_wrap_parameters(orig_len, line_len, line_ending);
-
-        let bytes_written = line_wrap(&mut buf[..], orig_len, line_len, line_ending);
-
-        assert_eq!(params.total_line_endings_len, bytes_written);
-        assert_eq!(params.lines_with_endings * line_ending.len(), bytes_written);
-        assert_eq!(params.total_len, orig_len + bytes_written);
-
-        // make sure line_wrap didn't touch anything beyond what it should
-        let start_of_untouched_data = orig_len + bytes_written;
-        assert_eq!(before_line_wrap[start_of_untouched_data..],
-            buf[start_of_untouched_data..]);
-
-        // also make sure that line wrapping will fit into a slice no bigger than what it should
-        // need
-        let bytes_written_precise_fit =
-            line_wrap(&mut before_line_wrap[0..(params.total_len)], orig_len, line_len,
-                      line_ending);
-
-        assert_eq!(bytes_written, bytes_written_precise_fit);
-        assert_eq!(&buf[0..(params.total_len)], &before_line_wrap[0..(params.total_len)]);
-
-        buf.truncate(orig_len + bytes_written);
-
-        bytes_written
-    }
-}
deleted file mode 100644
--- a/third_party/rust/base64/src/tests.rs
+++ /dev/null
@@ -1,478 +0,0 @@
-extern crate rand;
-
-use super::*;
-use super::line_wrap::{line_wrap_parameters};
-use self::rand::Rng;
-use self::rand::distributions::{IndependentSample, Range};
-
-#[test]
-fn encoded_size_correct_standard() {
-    assert_encoded_length(0, 0, STANDARD);
-
-    assert_encoded_length(1, 4, STANDARD);
-    assert_encoded_length(2, 4, STANDARD);
-    assert_encoded_length(3, 4, STANDARD);
-
-    assert_encoded_length(4, 8, STANDARD);
-    assert_encoded_length(5, 8, STANDARD);
-    assert_encoded_length(6, 8, STANDARD);
-
-    assert_encoded_length(7, 12, STANDARD);
-    assert_encoded_length(8, 12, STANDARD);
-    assert_encoded_length(9, 12, STANDARD);
-
-    assert_encoded_length(54, 72, STANDARD);
-
-    assert_encoded_length(55, 76, STANDARD);
-    assert_encoded_length(56, 76, STANDARD);
-    assert_encoded_length(57, 76, STANDARD);
-
-    assert_encoded_length(58, 80, STANDARD);
-}
-
-#[test]
-fn encoded_size_correct_no_pad_no_wrap() {
-    assert_encoded_length(0, 0, URL_SAFE_NO_PAD);
-
-    assert_encoded_length(1, 2, URL_SAFE_NO_PAD);
-    assert_encoded_length(2, 3, URL_SAFE_NO_PAD);
-    assert_encoded_length(3, 4, URL_SAFE_NO_PAD);
-
-    assert_encoded_length(4, 6, URL_SAFE_NO_PAD);
-    assert_encoded_length(5, 7, URL_SAFE_NO_PAD);
-    assert_encoded_length(6, 8, URL_SAFE_NO_PAD);
-
-    assert_encoded_length(7, 10, URL_SAFE_NO_PAD);
-    assert_encoded_length(8, 11, URL_SAFE_NO_PAD);
-    assert_encoded_length(9, 12, URL_SAFE_NO_PAD);
-
-    assert_encoded_length(54, 72, URL_SAFE_NO_PAD);
-
-    assert_encoded_length(55, 74, URL_SAFE_NO_PAD);
-    assert_encoded_length(56, 75, URL_SAFE_NO_PAD);
-    assert_encoded_length(57, 76, URL_SAFE_NO_PAD);
-
-    assert_encoded_length(58, 78, URL_SAFE_NO_PAD);
-}
-
-#[test]
-fn encoded_size_correct_mime() {
-    assert_encoded_length(0, 0, MIME);
-
-    assert_encoded_length(1, 4, MIME);
-    assert_encoded_length(2, 4, MIME);
-    assert_encoded_length(3, 4, MIME);
-
-    assert_encoded_length(4, 8, MIME);
-    assert_encoded_length(5, 8, MIME);
-    assert_encoded_length(6, 8, MIME);
-
-    assert_encoded_length(7, 12, MIME);
-    assert_encoded_length(8, 12, MIME);
-    assert_encoded_length(9, 12, MIME);
-
-    assert_encoded_length(54, 72, MIME);
-
-    assert_encoded_length(55, 76, MIME);
-    assert_encoded_length(56, 76, MIME);
-    assert_encoded_length(57, 76, MIME);
-
-    assert_encoded_length(58, 82, MIME);
-    assert_encoded_length(59, 82, MIME);
-    assert_encoded_length(60, 82, MIME);
-}
-
-#[test]
-fn encoded_size_correct_lf_pad() {
-    let config = Config::new(
-        CharacterSet::Standard,
-        true,
-        false,
-        LineWrap::Wrap(76, LineEnding::LF)
-    );
-
-    assert_encoded_length(0, 0, config);
-
-    assert_encoded_length(1, 4, config);
-    assert_encoded_length(2, 4, config);
-    assert_encoded_length(3, 4, config);
-
-    assert_encoded_length(4, 8, config);
-    assert_encoded_length(5, 8, config);
-    assert_encoded_length(6, 8, config);
-
-    assert_encoded_length(7, 12, config);
-    assert_encoded_length(8, 12, config);
-    assert_encoded_length(9, 12, config);
-
-    assert_encoded_length(54, 72, config);
-
-    assert_encoded_length(55, 76, config);
-    assert_encoded_length(56, 76, config);
-    assert_encoded_length(57, 76, config);
-
-    // one fewer than MIME
-    assert_encoded_length(58, 81, config);
-    assert_encoded_length(59, 81, config);
-    assert_encoded_length(60, 81, config);
-}
-
-#[test]
-fn encoded_size_overflow() {
-    assert_eq!(None, encoded_size(std::usize::MAX, &STANDARD));
-}
-
-#[test]
-fn roundtrip_random_config_short() {
-    // exercise the slower encode/decode routines that operate on shorter buffers more vigorously
-    roundtrip_random_config(Range::new(0, 50), Range::new(0, 50), 10_000);
-}
-
-#[test]
-fn roundtrip_random_config_long() {
-    roundtrip_random_config(Range::new(0, 1000), Range::new(0, 1000), 10_000);
-}
-
-#[test]
-fn encode_into_nonempty_buffer_doesnt_clobber_existing_contents() {
-    let mut orig_data = Vec::new();
-    let mut prefix = String::new();
-    let mut encoded_data_no_prefix = String::new();
-    let mut encoded_data_with_prefix = String::new();
-    let mut decoded = Vec::new();
-
-    let prefix_len_range = Range::new(0, 1000);
-    let input_len_range = Range::new(0, 1000);
-    let line_len_range = Range::new(1, 1000);
-
-    let mut rng = rand::weak_rng();
-
-    for _ in 0..10_000 {
-        orig_data.clear();
-        prefix.clear();
-        encoded_data_no_prefix.clear();
-        encoded_data_with_prefix.clear();
-        decoded.clear();
-
-        let input_len = input_len_range.ind_sample(&mut rng);
-
-        for _ in 0..input_len {
-            orig_data.push(rng.gen());
-        }
-
-        let prefix_len = prefix_len_range.ind_sample(&mut rng);
-        for _ in 0..prefix_len {
-            // getting convenient random single-byte printable chars that aren't base64 is annoying
-            prefix.push('#');
-        }
-        encoded_data_with_prefix.push_str(&prefix);
-
-        let config = random_config(&mut rng, &line_len_range);
-        encode_config_buf(&orig_data, config, &mut encoded_data_no_prefix);
-        encode_config_buf(&orig_data, config, &mut encoded_data_with_prefix);
-
-        assert_eq!(encoded_data_no_prefix.len() + prefix_len, encoded_data_with_prefix.len());
-        assert_encode_sanity(&encoded_data_no_prefix, &config, input_len);
-        assert_encode_sanity(&encoded_data_with_prefix[prefix_len..], &config, input_len);
-
-        // append plain encode onto prefix
-        prefix.push_str(&mut encoded_data_no_prefix);
-
-        assert_eq!(prefix, encoded_data_with_prefix);
-
-        // since we know we have the correct count of line endings, it's reasonable to simply remove
-        // them without worrying about where they are
-        let encoded_no_line_endings: String = encoded_data_no_prefix.chars()
-            .filter(|&c| c != '\r' && c != '\n')
-            .collect();
-
-        decode_config_buf(&encoded_no_line_endings, config, &mut decoded).unwrap();
-        assert_eq!(orig_data, decoded);
-    }
-}
-
-#[test]
-fn decode_into_nonempty_buffer_doesnt_clobber_existing_contents() {
-    let mut orig_data = Vec::new();
-    let mut encoded_data = String::new();
-    let mut decoded_with_prefix = Vec::new();
-    let mut decoded_without_prefix = Vec::new();
-    let mut prefix = Vec::new();
-
-    let prefix_len_range = Range::new(0, 1000);
-    let input_len_range = Range::new(0, 1000);
-    let line_len_range = Range::new(1, 1000);
-
-    let mut rng = rand::weak_rng();
-
-    for _ in 0..10_000 {
-        orig_data.clear();
-        encoded_data.clear();
-        decoded_with_prefix.clear();
-        decoded_without_prefix.clear();
-        prefix.clear();
-
-        let input_len = input_len_range.ind_sample(&mut rng);
-
-        for _ in 0..input_len {
-            orig_data.push(rng.gen());
-        }
-
-        let config = random_config(&mut rng, &line_len_range);
-        encode_config_buf(&orig_data, config, &mut encoded_data);
-        assert_encode_sanity(&encoded_data, &config, input_len);
-
-        let prefix_len = prefix_len_range.ind_sample(&mut rng);
-
-        // fill the buf with a prefix
-        for _ in 0..prefix_len {
-            prefix.push(rng.gen());
-        }
-
-        decoded_with_prefix.resize(prefix_len, 0);
-        decoded_with_prefix.copy_from_slice(&prefix);
-
-        // remove line wrapping
-        let encoded_no_line_endings: String = encoded_data.chars()
-            .filter(|&c| c != '\r' && c != '\n')
-            .collect();
-
-        // decode into the non-empty buf
-        decode_config_buf(&encoded_no_line_endings, config, &mut decoded_with_prefix).unwrap();
-        // also decode into the empty buf
-        decode_config_buf(&encoded_no_line_endings, config, &mut decoded_without_prefix).unwrap();
-
-        assert_eq!(prefix_len + decoded_without_prefix.len(), decoded_with_prefix.len());
-        assert_eq!(orig_data, decoded_without_prefix);
-
-        // append plain decode onto prefix
-        prefix.append(&mut decoded_without_prefix);
-
-        assert_eq!(prefix, decoded_with_prefix);
-    }
-}
-
-#[test]
-fn encode_with_padding_random_valid_utf8() {
-    let mut input = Vec::new();
-    let mut output = Vec::new();
-
-    let input_len_range = Range::new(0, 1000);
-    let line_len_range = Range::new(1, 1000);
-
-    let mut rng = rand::weak_rng();
-
-    for _ in 0..10_000 {
-        input.clear();
-        output.clear();
-
-        let input_len = input_len_range.ind_sample(&mut rng);
-
-        for _ in 0..input_len {
-            input.push(rng.gen());
-        }
-
-        let config = random_config(&mut rng, &line_len_range);
-
-        // fill up the output buffer with garbage
-        let encoded_size = encoded_size(input_len, &config).unwrap();
-        for _ in 0..encoded_size {
-            output.push(rng.gen());
-        }
-
-        let orig_output_buf = output.to_vec();
-
-        let bytes_written =
-            encode_with_padding(&input, &mut output, config.char_set.encode_table(), config.pad);
-
-        let line_ending_bytes = total_line_ending_bytes(bytes_written, &config);
-        assert_eq!(encoded_size, bytes_written + line_ending_bytes);
-        // make sure the part beyond bytes_written is the same garbage it was before
-        assert_eq!(orig_output_buf[bytes_written..], output[bytes_written..]);
-
-        // make sure the encoded bytes are UTF-8
-        let _ = str::from_utf8(&output[0..bytes_written]).unwrap();
-    }
-}
-
-#[test]
-fn encode_to_slice_random_valid_utf8() {
-    let mut input = Vec::new();
-    let mut output = Vec::new();
-
-    let input_len_range = Range::new(0, 1000);
-    let line_len_range = Range::new(1, 1000);
-
-    let mut rng = rand::weak_rng();
-
-    for _ in 0..10_000 {
-        input.clear();
-        output.clear();
-
-        let input_len = input_len_range.ind_sample(&mut rng);
-
-        for _ in 0..input_len {
-            input.push(rng.gen());
-        }
-
-        let config = random_config(&mut rng, &line_len_range);
-
-
-        // fill up the output buffer with garbage
-        let encoded_size = encoded_size(input_len, &config).unwrap();
-        for _ in 0..encoded_size {
-            output.push(rng.gen());
-        }
-
-        let orig_output_buf = output.to_vec();
-
-        let bytes_written =
-            encode_to_slice(&input, &mut output, config.char_set.encode_table());
-
-        // make sure the part beyond bytes_written is the same garbage it was before
-        assert_eq!(orig_output_buf[bytes_written..], output[bytes_written..]);
-
-        // make sure the encoded bytes are UTF-8
-        let _ = str::from_utf8(&output[0..bytes_written]).unwrap();
-    }
-}
-
-#[test]
-fn add_padding_random_valid_utf8(){
-    let mut output = Vec::new();
-
-    let mut rng = rand::weak_rng();
-
-    // cover our bases for length % 3
-    for input_len in 0..10 {
-        output.clear();
-
-        // fill output with random
-        for _ in 0..10 {
-            output.push(rng.gen());
-        }
-
-        let orig_output_buf = output.to_vec();
-
-        let bytes_written =
-            add_padding(input_len, &mut output);
-
-        // make sure the part beyond bytes_written is the same garbage it was before
-        assert_eq!(orig_output_buf[bytes_written..], output[bytes_written..]);
-
-        // make sure the encoded bytes are UTF-8
-        let _ = str::from_utf8(&output[0..bytes_written]).unwrap();
-    }
-}
-
-fn total_line_ending_bytes(encoded_len: usize, config: &Config) -> usize {
-    match config.line_wrap {
-        LineWrap::NoWrap => 0,
-        LineWrap::Wrap(line_len, line_ending) =>
-            line_wrap_parameters(encoded_len, line_len, line_ending).total_line_endings_len
-    }
-}
-
-fn assert_encoded_length(input_len: usize, encoded_len: usize, config: Config) {
-    assert_eq!(encoded_len, encoded_size(input_len, &config).unwrap());
-
-    let mut bytes: Vec<u8> = Vec::new();
-    let mut rng = rand::weak_rng();
-
-    for _ in 0..input_len {
-        bytes.push(rng.gen());
-    }
-
-    let encoded = encode_config(&bytes, config);
-    assert_encode_sanity(&encoded, &config, input_len);
-
-    assert_eq!(encoded_len, encoded.len());
-}
-
-fn assert_encode_sanity(encoded: &str, config: &Config, input_len: usize) {
-    let input_rem = input_len % 3;
-    let (expected_padding_len, last_encoded_chunk_len) = if input_rem > 0 {
-        if config.pad {
-            (3 - input_rem, 4)
-        } else {
-            (0, input_rem + 1)
-        }
-    } else {
-        (0, 0)
-    };
-
-    let b64_only_len = (input_len / 3) * 4 + last_encoded_chunk_len;
-
-    let expected_line_ending_len = match config.line_wrap {
-        LineWrap::NoWrap => 0,
-        LineWrap::Wrap(line_len, line_ending) =>
-            line_wrap_parameters(b64_only_len, line_len, line_ending).total_line_endings_len
-    };
-
-    let expected_encoded_len = encoded_size(input_len, &config).unwrap();
-
-    assert_eq!(expected_encoded_len, encoded.len());
-
-    let line_endings_len = encoded.chars().filter(|&c| c == '\r' || c == '\n').count();
-    let padding_len = encoded.chars().filter(|&c| c == '=').count();
-
-    assert_eq!(expected_padding_len, padding_len);
-    assert_eq!(expected_line_ending_len, line_endings_len);
-
-    let _ = str::from_utf8(encoded.as_bytes()).expect("Base64 should be valid utf8");
-}
-
-fn roundtrip_random_config(input_len_range: Range<usize>, line_len_range: Range<usize>,
-                           iterations: u32) {
-    let mut input_buf: Vec<u8> = Vec::new();
-    let mut encoded_buf = String::new();
-    let mut rng = rand::weak_rng();
-
-    for _ in 0..iterations {
-        input_buf.clear();
-        encoded_buf.clear();
-
-        let input_len = input_len_range.ind_sample(&mut rng);
-
-        let config = random_config(&mut rng, &line_len_range);
-
-        for _ in 0..input_len {
-            input_buf.push(rng.gen());
-        }
-
-        encode_config_buf(&input_buf, config, &mut encoded_buf);
-
-        assert_encode_sanity(&encoded_buf, &config, input_len);
-
-        // remove line wrapping
-        let encoded_no_line_endings: String = encoded_buf.chars()
-            .filter(|&c| c != '\r' && c != '\n')
-            .collect();
-
-        assert_eq!(input_buf, decode_config(&encoded_no_line_endings, config).unwrap());
-    }
-}
-
-pub fn random_config<R: Rng>(rng: &mut R, line_len_range: &Range<usize>) -> Config {
-    let line_wrap = if rng.gen() {
-        LineWrap::NoWrap
-    } else {
-        let line_len = line_len_range.ind_sample(rng);
-
-        let line_ending = if rng.gen() {
-            LineEnding::LF
-        } else {
-            LineEnding::CRLF
-        };
-
-        LineWrap::Wrap(line_len, line_ending)
-    };
-
-    let charset = if rng.gen() {
-        CharacterSet::UrlSafe
-    } else {
-        CharacterSet::Standard
-    };
-
-    Config::new(charset, rng.gen(), rng.gen(), line_wrap)
-}
--- a/third_party/rust/base64/tests/tests.rs
+++ b/third_party/rust/base64/tests/tests.rs
@@ -13,71 +13,138 @@ fn compare_decode(expected: &str, target
     assert_eq!(expected, String::from_utf8(decode(target).unwrap()).unwrap());
     assert_eq!(expected, String::from_utf8(decode(target.as_bytes()).unwrap()).unwrap());
 }
 
 fn compare_decode_mime(expected: &str, target: &str) {
     assert_eq!(expected, String::from_utf8(decode_config(target, MIME).unwrap()).unwrap());
 }
 
+fn push_rand(buf: &mut Vec<u8>, len: usize) {
+    let mut r = rand::weak_rng();
+
+    for _ in 0..len {
+        buf.push(r.gen::<u8>());
+    }
+}
+
+// generate every possible byte string recursively and test encode/decode roundtrip
+fn roundtrip_append_recurse(byte_buf: &mut Vec<u8>, str_buf: &mut String, remaining_bytes: usize) {
+    let orig_length = byte_buf.len();
+    for b in 0..256 {
+        byte_buf.push(b as u8);
+
+        if remaining_bytes > 1 {
+            roundtrip_append_recurse(byte_buf, str_buf, remaining_bytes - 1)
+        } else {
+            encode_config_buf(&byte_buf, STANDARD, str_buf);
+            let roundtrip_bytes = decode_config(&str_buf, STANDARD).unwrap();
+            assert_eq!(*byte_buf, roundtrip_bytes);
+
+            str_buf.clear();
+
+        }
+
+        byte_buf.truncate(orig_length);
+    }
+}
+
+// generate every possible byte string recursively and test encode/decode roundtrip with
+// padding removed
+fn roundtrip_append_recurse_strip_padding(byte_buf: &mut Vec<u8>, str_buf: &mut String,
+                                          remaining_bytes: usize) {
+    let orig_length = byte_buf.len();
+    for b in 0..256 {
+        byte_buf.push(b as u8);
+
+        if remaining_bytes > 1 {
+            roundtrip_append_recurse_strip_padding(byte_buf, str_buf, remaining_bytes - 1)
+        } else {
+            encode_config_buf(&byte_buf, STANDARD, str_buf);
+            {
+                let trimmed = str_buf.trim_right_matches('=');
+                let roundtrip_bytes = decode_config(&trimmed, STANDARD).unwrap();
+                assert_eq!(*byte_buf, roundtrip_bytes);
+            }
+            str_buf.clear();
+        }
+
+        byte_buf.truncate(orig_length);
+    }
+}
+
 // generate random contents of the specified length and test encode/decode roundtrip
-fn roundtrip_random(byte_buf: &mut Vec<u8>, str_buf: &mut String, config: Config,
-                    byte_len: usize, approx_values_per_byte: u8, max_rounds: u64) {
-    // let the short ones be short but don't let it get too crazy large
+fn roundtrip_random(byte_buf: &mut Vec<u8>, str_buf: &mut String, byte_len: usize,
+                    approx_values_per_byte: u8, max_rounds: u64) {
     let num_rounds = calculate_number_of_rounds(byte_len, approx_values_per_byte, max_rounds);
     let mut r = rand::weak_rng();
-    let mut decode_buf = Vec::new();
 
     for _ in 0..num_rounds {
         byte_buf.clear();
         str_buf.clear();
-        decode_buf.clear();
         while byte_buf.len() < byte_len {
             byte_buf.push(r.gen::<u8>());
         }
 
-        encode_config_buf(&byte_buf, config, str_buf);
-        decode_config_buf(&str_buf, config, &mut decode_buf).unwrap();
+        encode_config_buf(&byte_buf, STANDARD, str_buf);
+        let roundtrip_bytes = decode_config(&str_buf, STANDARD).unwrap();
+
+        assert_eq!(*byte_buf, roundtrip_bytes);
+    }
+}
 
-        assert_eq!(byte_buf, &decode_buf);
+// generate random contents of the specified length and test encode/decode roundtrip
+fn roundtrip_random_strip_padding(byte_buf: &mut Vec<u8>, str_buf: &mut String, byte_len: usize,
+                    approx_values_per_byte: u8, max_rounds: u64) {
+    // let the short ones be short but don't let it get too crazy large
+    let num_rounds = calculate_number_of_rounds(byte_len, approx_values_per_byte, max_rounds);
+    let mut r = rand::weak_rng();
+
+    for _ in 0..num_rounds {
+        byte_buf.clear();
+        str_buf.clear();
+        while byte_buf.len() < byte_len {
+            byte_buf.push(r.gen::<u8>());
+        }
+
+        encode_config_buf(&byte_buf, STANDARD, str_buf);
+        let trimmed = str_buf.trim_right_matches('=');
+        let roundtrip_bytes = decode_config(&trimmed, STANDARD).unwrap();
+
+        assert_eq!(*byte_buf, roundtrip_bytes);
     }
 }
 
 fn calculate_number_of_rounds(byte_len: usize, approx_values_per_byte: u8, max: u64) -> u64 {
     // don't overflow
     let mut prod = approx_values_per_byte as u64;
 
     for _ in 0..byte_len {
         if prod > max {
             return max;
         }
 
         prod = prod.saturating_mul(prod);
     }
 
-    prod
-}
-
-fn no_pad_config() -> Config {
-    Config::new(CharacterSet::Standard, false, false, LineWrap::NoWrap)
+    return prod;
 }
 
 //-------
 //decode
 
 #[test]
 fn decode_rfc4648_0() {
     compare_decode("", "");
 }
 
 #[test]
 fn decode_rfc4648_1() {
     compare_decode("f", "Zg==");
 }
-
 #[test]
 fn decode_rfc4648_1_just_a_bit_of_padding() {
     // allows less padding than required
     compare_decode("f", "Zg=");
 }
 
 #[test]
 fn decode_rfc4648_1_no_padding() {
@@ -122,187 +189,347 @@ fn decode_rfc4648_5_no_padding() {
 #[test]
 fn decode_rfc4648_6() {
     compare_decode("foobar", "Zm9vYmFy");
 }
 
 //this is a MAY in the rfc: https://tools.ietf.org/html/rfc4648#section-3.3
 #[test]
 fn decode_pad_inside_fast_loop_chunk_error() {
-    for num_quads in 0..25 {
-        let mut s: String = std::iter::repeat("ABCD").take(num_quads).collect();
-        s.push_str("YWxpY2U=====");
-
-        // since the first 8 bytes are handled in the fast loop, the
-        // padding is an error. Could argue that the *next* padding
-        // byte is technically the first erroneous one, but reporting
-        // that accurately is more complex and probably nobody cares
-        assert_eq!(DecodeError::InvalidByte(num_quads * 4 + 7, b'='), decode(&s).unwrap_err());
+    // can't PartialEq Base64Error, so we do this the hard way
+    match decode("YWxpY2U=====").unwrap_err() {
+        DecodeError::InvalidByte(offset, byte) => {
+            // since the first 8 bytes are handled in the fast loop, the
+            // padding is an error. Could argue that the *next* padding
+            // byte is technically the first erroneous one, but reporting
+            // that accurately is more complex and probably nobody cares
+            assert_eq!(7, offset);
+            assert_eq!(0x3D, byte);
+        }
+        _ => assert!(false)
     }
 }
 
 #[test]
 fn decode_extra_pad_after_fast_loop_chunk_error() {
-    for num_quads in 0..25 {
-        let mut s: String = std::iter::repeat("ABCD").take(num_quads).collect();
-        s.push_str("YWxpY2UABB===");
+    match decode("YWxpY2UABB===").unwrap_err() {
+        DecodeError::InvalidByte(offset, byte) => {
+            // extraneous third padding byte
+            assert_eq!(12, offset);
+            assert_eq!(0x3D, byte);
+        }
+        _ => assert!(false)
+    };
+}
 
-        // first padding byte
-        assert_eq!(DecodeError::InvalidByte(num_quads * 4 + 10, b'='), decode(&s).unwrap_err());
+
+//same
+#[test]
+fn decode_absurd_pad_error() {
+    match decode("==Y=Wx===pY=2U=====").unwrap_err() {
+        DecodeError::InvalidByte(size, byte) => {
+            assert_eq!(0, size);
+            assert_eq!(0x3D, byte);
+        }
+        _ => assert!(false)
     }
 }
 
 #[test]
-fn decode_absurd_pad_error() {
-    for num_quads in 0..25 {
-        let mut s: String = std::iter::repeat("ABCD").take(num_quads).collect();
-        s.push_str("==Y=Wx===pY=2U=====");
-
-        // first padding byte
-        assert_eq!(DecodeError::InvalidByte(num_quads * 4, b'='), decode(&s).unwrap_err());
+fn decode_starts_with_padding_single_quad_error() {
+    match decode("====").unwrap_err() {
+        DecodeError::InvalidByte(offset, byte) => {
+            // with no real input, first padding byte is bogus
+            assert_eq!(0, offset);
+            assert_eq!(0x3D, byte);
+        }
+        _ => assert!(false)
     }
 }
 
 #[test]
 fn decode_extra_padding_in_trailing_quad_returns_error() {
-    for num_quads in 0..25 {
-        let mut s: String = std::iter::repeat("ABCD").take(num_quads).collect();
-        s.push_str("EEE==");
-
-        // first padding byte -- which would be legal if it was by itself
-        assert_eq!(DecodeError::InvalidByte(num_quads * 4 + 3, b'='), decode(&s).unwrap_err());
+    match decode("zzz==").unwrap_err() {
+        DecodeError::InvalidByte(size, byte) => {
+            // first unneeded padding byte
+            assert_eq!(4, size);
+            assert_eq!(0x3D, byte);
+        }
+        _ => assert!(false)
     }
 }
 
 #[test]
 fn decode_extra_padding_in_trailing_quad_2_returns_error() {
-    for num_quads in 0..25 {
-        let mut s: String = std::iter::repeat("ABCD").take(num_quads).collect();
-        s.push_str("EE===");
-
-        // first padding byte -- which would be legal if it was by itself
-        assert_eq!(DecodeError::InvalidByte(num_quads * 4 + 2, b'='), decode(&s).unwrap_err());
+    match decode("zz===").unwrap_err() {
+        DecodeError::InvalidByte(size, byte) => {
+            // first unneeded padding byte
+            assert_eq!(4, size);
+            assert_eq!(0x3D, byte);
+        }
+        _ => assert!(false)
     }
 }
 
+
 #[test]
 fn decode_start_second_quad_with_padding_returns_error() {
-    for num_quads in 0..25 {
-        let mut s: String = std::iter::repeat("ABCD").take(num_quads).collect();
-        s.push_str("=");
-
-        // first padding byte -- must have two non-padding bytes in a quad
-        assert_eq!(DecodeError::InvalidByte(num_quads * 4, b'='), decode(&s).unwrap_err());
-
-        // two padding bytes -- same
-        s.push_str("=");
-        assert_eq!(DecodeError::InvalidByte(num_quads * 4, b'='), decode(&s).unwrap_err());
-
-        s.push_str("=");
-        assert_eq!(DecodeError::InvalidByte(num_quads * 4, b'='), decode(&s).unwrap_err());
-
-        s.push_str("=");
-        assert_eq!(DecodeError::InvalidByte(num_quads * 4, b'='), decode(&s).unwrap_err());
+    match decode("zzzz=").unwrap_err() {
+        DecodeError::InvalidByte(size, byte) => {
+            // first unneeded padding byte
+            assert_eq!(4, size);
+            assert_eq!(0x3D, byte);
+        }
+        _ => assert!(false)
     }
 }
 
 #[test]
 fn decode_padding_in_last_quad_followed_by_non_padding_returns_error() {
-    for num_quads in 0..25 {
-        let mut s: String = std::iter::repeat("ABCD").take(num_quads).collect();
-        s.push_str("==E");
+    match decode("zzzz==z").unwrap_err() {
+        DecodeError::InvalidByte(size, byte) => {
+            assert_eq!(4, size);
+            assert_eq!(0x3D, byte);
+        }
+        _ => assert!(false)
+    }
+}
 
-        // first padding byte -- must have two non-padding bytes in a quad
-        assert_eq!(DecodeError::InvalidByte(num_quads * 4, b'='), decode(&s).unwrap_err());
+#[test]
+fn decode_too_short_with_padding_error() {
+    match decode("z==").unwrap_err() {
+        DecodeError::InvalidByte(size, byte) => {
+            // first unneeded padding byte
+            assert_eq!(1, size);
+            assert_eq!(0x3D, byte);
+        }
+        _ => assert!(false)
     }
 }
 
 #[test]
-fn decode_one_char_in_quad_with_padding_error() {
-    for num_quads in 0..25 {
-        let mut s: String = std::iter::repeat("ABCD").take(num_quads).collect();
-        s.push_str("E=");
-
-        assert_eq!(DecodeError::InvalidByte(num_quads * 4 + 1, b'='), decode(&s).unwrap_err());
+fn decode_too_short_without_padding_error() {
+    match decode("z").unwrap_err() {
+        DecodeError::InvalidLength => {}
+        _ => assert!(false)
+    }
+}
 
-        // more padding doesn't change the error
-        s.push_str("=");
-        assert_eq!(DecodeError::InvalidByte(num_quads * 4 + 1, b'='), decode(&s).unwrap_err());
-
-        s.push_str("=");
-        assert_eq!(DecodeError::InvalidByte(num_quads * 4 + 1, b'='), decode(&s).unwrap_err());
+#[test]
+fn decode_too_short_second_quad_without_padding_error() {
+    match decode("zzzzX").unwrap_err() {
+        DecodeError::InvalidLength => {}
+        _ => assert!(false)
     }
 }
 
 #[test]
-fn decode_one_char_in_quad_without_padding_error() {
-    for num_quads in 0..25 {
-        let mut s: String = std::iter::repeat("ABCD").take(num_quads).collect();
-        s.push('E');
-
-        assert_eq!(DecodeError::InvalidLength, decode(&s).unwrap_err());
-    }
-}
+fn decode_error_for_bogus_char_in_right_position() {
+    for length in 1..25 {
+        for error_position in 0_usize..length {
+            let prefix: String = std::iter::repeat("A").take(error_position).collect();
+            let suffix: String = std::iter::repeat("B").take(length - error_position - 1).collect();
 
-#[test]
-fn decode_reject_invalid_bytes_with_correct_error() {
-    for length in 1..100 {
-        for index in 0_usize..length {
-            for invalid_byte in " \t\n\r\x0C\x0B\x00%*.".bytes() {
-                let prefix: String = std::iter::repeat("A").take(index).collect();
-                let suffix: String = std::iter::repeat("B").take(length - index - 1).collect();
+            let input = prefix + "%" + &suffix;
+            assert_eq!(length, input.len(),
+                "length {} error position {}", length, error_position);
 
-                let input = prefix + &String::from_utf8(vec![invalid_byte]).unwrap() + &suffix;
-                assert_eq!(length, input.len(), "length {} error position {}", length, index);
-
-                assert_eq!(DecodeError::InvalidByte(index, invalid_byte),
-                    decode(&input).unwrap_err());
+            match decode(&input).unwrap_err() {
+                DecodeError::InvalidByte(size, byte) => {
+                    assert_eq!(error_position, size,
+                        "length {} error position {}", length, error_position);
+                    assert_eq!(0x25, byte);
+                }
+                _ => assert!(false)
             }
         }
     }
 }
 
 #[test]
-fn roundtrip_random_short_standard() {
+fn decode_into_nonempty_buffer_doesnt_clobber_existing_contents() {
+    let mut orig_data = Vec::new();
+    let mut encoded_data = String::new();
+    let mut decoded_with_prefix = Vec::new();
+    let mut decoded_without_prefix = Vec::new();
+    let mut prefix = Vec::new();
+    for encoded_length in 0_usize..26 {
+        if encoded_length % 4 == 1 {
+            // can't have a lone byte in a quad of input
+            continue;
+        };
+
+        let raw_data_byte_triples = encoded_length / 4;
+        // 4 base64 bytes -> 3 input bytes, 3 -> 2, 2 -> 1, 0 -> 0
+        let raw_data_byte_leftovers = (encoded_length % 4).saturating_sub(1);
+
+        // we'll borrow buf to make some data to encode
+        orig_data.clear();
+        push_rand(&mut orig_data, raw_data_byte_triples * 3 + raw_data_byte_leftovers);
+
+        encoded_data.clear();
+        encode_config_buf(&orig_data, STANDARD, &mut encoded_data);
+
+        assert_eq!(encoded_length, encoded_data.trim_right_matches('=').len());
+
+        for prefix_length in 1..26 {
+            decoded_with_prefix.clear();
+            decoded_without_prefix.clear();
+            prefix.clear();
+
+            // fill the buf with a prefix
+            push_rand(&mut prefix, prefix_length);
+            decoded_with_prefix.resize(prefix_length, 0);
+            decoded_with_prefix.copy_from_slice(&prefix);
+
+            // decode into the non-empty buf
+            decode_config_buf(&encoded_data, STANDARD, &mut decoded_with_prefix).unwrap();
+            // also decode into the empty buf
+            decode_config_buf(&encoded_data, STANDARD, &mut decoded_without_prefix).unwrap();
+
+            assert_eq!(prefix_length + decoded_without_prefix.len(), decoded_with_prefix.len());
+
+            // append plain decode onto prefix
+            prefix.append(&mut decoded_without_prefix);
+
+            assert_eq!(prefix, decoded_with_prefix);
+        }
+    }
+}
+
+#[test]
+fn roundtrip_random_no_fast_loop() {
     let mut byte_buf: Vec<u8> = Vec::new();
     let mut str_buf = String::new();
 
-    for input_len in 0..40 {
-        roundtrip_random(&mut byte_buf, &mut str_buf, STANDARD, input_len, 4, 10000);
+    for input_len in 0..9 {
+        roundtrip_random(&mut byte_buf, &mut str_buf, input_len, 4, 10000);
+    }
+}
+
+#[test]
+fn roundtrip_random_with_fast_loop() {
+    let mut byte_buf: Vec<u8> = Vec::new();
+    let mut str_buf = String::new();
+
+    for input_len in 9..26 {
+        roundtrip_random(&mut byte_buf, &mut str_buf, input_len, 4, 100000);
+    }
+}
+
+#[test]
+fn roundtrip_random_no_fast_loop_no_padding() {
+    let mut byte_buf: Vec<u8> = Vec::new();
+    let mut str_buf = String::new();
+
+    for input_len in 0..9 {
+        roundtrip_random_strip_padding(&mut byte_buf, &mut str_buf, input_len, 4, 10000);
     }
 }
 
 #[test]
-fn roundtrip_random_with_fast_loop_standard() {
+fn roundtrip_random_with_fast_loop_no_padding() {
     let mut byte_buf: Vec<u8> = Vec::new();
     let mut str_buf = String::new();
 
-    for input_len in 40..100 {
-        roundtrip_random(&mut byte_buf, &mut str_buf, STANDARD, input_len, 4, 1000);
+    for input_len in 9..26 {
+        roundtrip_random_strip_padding(&mut byte_buf, &mut str_buf, input_len, 4, 100000);
     }
 }
 
 #[test]
-fn roundtrip_random_short_no_padding() {
+fn roundtrip_all_1_byte() {
+    let mut byte_buf: Vec<u8> = Vec::new();
+    let mut str_buf = String::new();
+    roundtrip_append_recurse(&mut byte_buf, &mut str_buf, 1);
+}
+
+#[test]
+fn roundtrip_all_1_byte_no_padding() {
+    let mut byte_buf: Vec<u8> = Vec::new();
+    let mut str_buf = String::new();
+    roundtrip_append_recurse_strip_padding(&mut byte_buf, &mut str_buf, 1);
+}
+
+#[test]
+fn roundtrip_all_2_byte() {
+    let mut byte_buf: Vec<u8> = Vec::new();
+    let mut str_buf = String::new();
+    roundtrip_append_recurse(&mut byte_buf, &mut str_buf, 2);
+}
+
+#[test]
+fn roundtrip_all_2_byte_no_padding() {
+    let mut byte_buf: Vec<u8> = Vec::new();
+    let mut str_buf = String::new();
+    roundtrip_append_recurse_strip_padding(&mut byte_buf, &mut str_buf, 2);
+}
+
+#[test]
+fn roundtrip_all_3_byte() {
+    let mut byte_buf: Vec<u8> = Vec::new();
+    let mut str_buf = String::new();
+    roundtrip_append_recurse(&mut byte_buf, &mut str_buf, 3);
+}
+
+#[test]
+fn roundtrip_random_4_byte() {
     let mut byte_buf: Vec<u8> = Vec::new();
     let mut str_buf = String::new();
 
-    for input_len in 0..40 {
-        roundtrip_random(&mut byte_buf, &mut str_buf, no_pad_config(), input_len, 4, 10000);
-    }
+    roundtrip_random(&mut byte_buf, &mut str_buf, 4, 48, 10000);
+}
+
+//TODO like, write a thing to test every ascii val lol
+//prolly just yankput the 64 array and a 256 one later
+//is there a way to like, not have to write a fn every time
+//"hi test harness this should panic 192 times" would be nice
+//oh well whatever this is better done by a fuzzer
+
+//strip yr whitespace kids
+#[test]
+#[should_panic]
+fn decode_reject_space() {
+    assert!(decode("YWx pY2U=").is_ok());
+}
+
+#[test]
+#[should_panic]
+fn decode_reject_tab() {
+    assert!(decode("YWx\tpY2U=").is_ok());
 }
 
 #[test]
-fn roundtrip_random_no_padding() {
-    let mut byte_buf: Vec<u8> = Vec::new();
-    let mut str_buf = String::new();
+#[should_panic]
+fn decode_reject_ff() {
+    assert!(decode("YWx\x0cpY2U=").is_ok());
+}
+
+#[test]
+#[should_panic]
+fn decode_reject_vtab() {
+    assert!(decode("YWx\x0bpY2U=").is_ok());
+}
 
-    for input_len in 40..100 {
-        roundtrip_random(&mut byte_buf, &mut str_buf, no_pad_config(), input_len, 4, 1000);
-    }
+#[test]
+#[should_panic]
+fn decode_reject_nl() {
+    assert!(decode("YWx\npY2U=").is_ok());
+}
+
+#[test]
+#[should_panic]
+fn decode_reject_crnl() {
+    assert!(decode("YWx\r\npY2U=").is_ok());
+}
+
+#[test]
+#[should_panic]
+fn decode_reject_null() {
+    assert!(decode("YWx\0pY2U=").is_ok());
 }
 
 #[test]
 fn decode_mime_allow_space() {
     assert!(decode_config("YWx pY2U=", MIME).is_ok());
 }
 
 #[test]
@@ -326,18 +553,19 @@ fn decode_mime_allow_nl() {
 }
 
 #[test]
 fn decode_mime_allow_crnl() {
     assert!(decode_config("YWx\r\npY2U=", MIME).is_ok());
 }
 
 #[test]
+#[should_panic]
 fn decode_mime_reject_null() {
-    assert_eq!(DecodeError::InvalidByte(3, 0x0),decode_config("YWx\0pY2U=", MIME).unwrap_err());
+    assert!(decode_config("YWx\0pY2U=", MIME).is_ok());
 }
 
 #[test]
 fn decode_mime_absurd_whitespace() {
     compare_decode_mime("how could you let this happen",
         "\n aG93I\n\nG\x0bNvd\r\nWxkI HlvdSB \tsZXQgdGh\rpcyBo\x0cYXBwZW4 =   ");
 }
 
@@ -410,48 +638,59 @@ fn encode_all_bytes_url() {
         bytes.push(i);
     }
     bytes.push(255); //bug with "overflowing" ranges?
 
     assert_eq!("AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0-P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn-AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq-wsbKztLW2t7i5uru8vb6_wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t_g4eLj5OXm5-jp6uvs7e7v8PHy8_T19vf4-fr7_P3-_w==", encode_config(&bytes, URL_SAFE));
 }
 
 #[test]
-fn encode_line_ending_lf_partial_last_line() {
-    let config = Config::new(CharacterSet::Standard, true, false,
-                             LineWrap::Wrap(3, LineEnding::LF));
-    assert_eq!("Zm9\nvYm\nFy", encode_config(b"foobar", config));
-}
+fn encode_into_nonempty_buffer_doesnt_clobber_existing_contents() {
+    let mut orig_data = Vec::new();
+    let mut encoded_with_prefix = String::new();
+    let mut encoded_without_prefix = String::new();
+    let mut prefix = String::new();
+    for orig_data_length in 0_usize..26 {
+        // we'll borrow buf to make some data to encode
+        orig_data.clear();
+        push_rand(&mut orig_data, orig_data_length);
+
+        for prefix_length in 1..26 {
+            encoded_with_prefix.clear();
+            encoded_without_prefix.clear();
+            prefix.clear();
 
-#[test]
-fn encode_line_ending_crlf_partial_last_line() {
-    let config = Config::new(CharacterSet::Standard, true, false,
-                             LineWrap::Wrap(3, LineEnding::CRLF));
-    assert_eq!("Zm9\r\nvYm\r\nFy", encode_config(b"foobar", config));
+            for _ in 0..prefix_length {
+                prefix.push('~');
+            }
+
+            encoded_with_prefix.push_str(&prefix);
+
+            // encode into the non-empty buf
+            encode_config_buf(&orig_data, STANDARD, &mut encoded_with_prefix);
+            // also encode into the empty buf
+            encode_config_buf(&orig_data, STANDARD, &mut encoded_without_prefix);
+
+            assert_eq!(prefix_length + encoded_without_prefix.len(), encoded_with_prefix.len());
+
+            // append plain decode onto prefix
+            prefix.push_str(&mut encoded_without_prefix);
+
+            assert_eq!(prefix, encoded_with_prefix);
+        }
+    }
 }
 
-#[test]
-fn encode_line_ending_lf_full_last_line() {
-    let config = Config::new(CharacterSet::Standard, true, false,
-                             LineWrap::Wrap(4, LineEnding::LF));
-    assert_eq!("Zm9v\nYmFy", encode_config(b"foobar", config));
-}
-
-#[test]
-fn encode_line_ending_crlf_full_last_line() {
-    let config = Config::new(CharacterSet::Standard, true, false,
-                             LineWrap::Wrap(4, LineEnding::CRLF));
-    assert_eq!("Zm9v\r\nYmFy", encode_config(b"foobar", config));
-}
 
 #[test]
 fn because_we_can() {
     compare_decode("alice", "YWxpY2U=");
     compare_decode("alice", &encode(b"alice"));
     compare_decode("alice", &encode(&decode(&encode(b"alice")).unwrap()));
 }
 
+
 #[test]
 fn encode_url_safe_without_padding() {
     let encoded = encode_config(b"alice", URL_SAFE_NO_PAD);
     assert_eq!(&encoded, "YWxpY2U");
     assert_eq!(String::from_utf8(decode(&encoded).unwrap()).unwrap(), "alice");
 }
deleted file mode 100644
--- a/third_party/rust/byteorder-1.0.0/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".travis.yml":"c8243fb884ca390f5a7b8cc45e1c0d5bbbdd7e4e82ada2dc1880b3a904c9ce12","COPYING":"01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f","Cargo.toml":"b6cd79e1f2a93cd8a5c6e6dd7985c46fc26e442ae5b8ed4a0ff37a4ad4708023","LICENSE-MIT":"0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f","README.md":"0559514b9d7488e96fb7a2f3c043a62fadf3495a1e10602d109ce79ee67da998","UNLICENSE":"7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c","benches/bench.rs":"f583692d829c8dfe19b1d5b9e968ccf5c74d6733367ca183edff74041a6afedd","src/lib.rs":"b038b8a84b2b7b2143b2835185b3cbbacaf056fa8a2f03bec84bfd79c913c726","src/new.rs":"161c21b7ebb5668c7cc70b46b0eb37709e06bb9c854f2fdfc6ce3d3babcbf3de"},"package":"c40977b0ee6b9885c9013cd41d9feffdd22deb3bb4dc3a71d901cc7a77de18c8"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/byteorder-1.0.0/.travis.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-language: rust
-rust:
-  - 1.12.0
-  - stable
-  - beta
-  - nightly
-script:
-  - cargo build --verbose
-  - cargo doc
-  - cargo test --verbose
-  - cargo test --verbose --no-default-features --lib
-  - if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
-      cargo bench --verbose;
-      cargo bench --verbose --no-default-features;
-    fi
deleted file mode 100644
--- a/third_party/rust/byteorder-1.0.0/COPYING
+++ /dev/null
@@ -1,3 +0,0 @@
-This project is dual-licensed under the Unlicense and MIT licenses.
-
-You may use this code under the terms of either license.
deleted file mode 100644
--- a/third_party/rust/byteorder-1.0.0/Cargo.toml
+++ /dev/null
@@ -1,26 +0,0 @@
-[package]
-name = "byteorder"
-version = "1.0.0"  #:version
-authors = ["Andrew Gallant <jamslam@gmail.com>"]
-description = "Library for reading/writing numbers in big-endian and little-endian."
-documentation = "https://docs.rs/byteorder"
-homepage = "https://github.com/BurntSushi/byteorder"
-repository = "https://github.com/BurntSushi/byteorder"
-readme = "README.md"
-keywords = ["byte", "endian", "big-endian", "little-endian", "binary"]
-license = "Unlicense/MIT"
-
-[lib]
-name = "byteorder"
-bench = false
-
-[dev-dependencies]
-quickcheck = "0.4"
-rand = "0.3"
-
-[features]
-default = ["std"]
-std = []
-
-[profile.bench]
-opt-level = 3
deleted file mode 100644
--- a/third_party/rust/byteorder-1.0.0/LICENSE-MIT
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Andrew Gallant
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
deleted file mode 100644
--- a/third_party/rust/byteorder-1.0.0/README.md
+++ /dev/null
@@ -1,56 +0,0 @@
-This crate provides convenience methods for encoding and decoding numbers in
-either big-endian or little-endian order.
-
-[![Build status](https://api.travis-ci.org/BurntSushi/byteorder.png)](https://travis-ci.org/BurntSushi/byteorder)
-[![](http://meritbadge.herokuapp.com/byteorder)](https://crates.io/crates/byteorder)
-
-Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org).
-
-
-### Documentation
-
-https://docs.rs/byteorder
-
-
-### Installation
-
-This crate works with Cargo and is on
-[crates.io](https://crates.io/crates/byteorder). Add it to your `Cargo.toml`
-like so:
-
-```toml
-[dependencies]
-byteorder = "1"
-```
-
-If you want to augment existing `Read` and `Write` traits, then import the
-extension methods like so:
-
-```rust
-extern crate byteorder;
-
-use byteorder::{ReadBytesExt, WriteBytesExt, BigEndian, LittleEndian};
-```
-
-For example:
-
-```rust
-use std::io::Cursor;
-use byteorder::{BigEndian, ReadBytesExt};
-
-let mut rdr = Cursor::new(vec![2, 5, 3, 0]);
-// Note that we use type parameters to indicate which kind of byte order
-// we want!
-assert_eq!(517, rdr.read_u16::<BigEndian>().unwrap());
-assert_eq!(768, rdr.read_u16::<BigEndian>().unwrap());
-```
-
-### `no_std` crates
-
-This crate has a feature, `std`, that is enabled by default. To use this crate
-in a `no_std` context, add the following to your `Cargo.toml`:
-
-```toml
-[dependencies]
-byteorder = { version = "1", default-features = false }
-```
deleted file mode 100644
--- a/third_party/rust/byteorder-1.0.0/UNLICENSE
+++ /dev/null
@@ -1,24 +0,0 @@
-This is free and unencumbered software released into the public domain.
-
-Anyone is free to copy, modify, publish, use, compile, sell, or
-distribute this software, either in source code form or as a compiled
-binary, for any purpose, commercial or non-commercial, and by any
-means.
-
-In jurisdictions that recognize copyright laws, the author or authors
-of this software dedicate any and all copyright interest in the
-software to the public domain. We make this dedication for the benefit
-of the public at large and to the detriment of our heirs and
-successors. We intend this dedication to be an overt act of
-relinquishment in perpetuity of all present and future rights to this
-software under copyright law.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-For more information, please refer to <http://unlicense.org/>
deleted file mode 100644
--- a/third_party/rust/byteorder-1.0.0/benches/bench.rs
+++ /dev/null
@@ -1,148 +0,0 @@
-#![feature(test)]
-
-extern crate byteorder;
-extern crate test;
-
-macro_rules! bench_num {
-    ($name:ident, $read:ident, $bytes:expr, $data:expr) => (
-        mod $name {
-            use byteorder::{ByteOrder, BigEndian, NativeEndian, LittleEndian};
-            use super::test::Bencher;
-            use super::test::black_box as bb;
-
-            const NITER: usize = 100_000;
-
-            #[bench]
-            fn read_big_endian(b: &mut Bencher) {
-                let buf = $data;
-                b.iter(|| {
-                    for _ in 0..NITER {
-                        bb(BigEndian::$read(&buf, $bytes));
-                    }
-                });
-            }
-
-            #[bench]
-            fn read_little_endian(b: &mut Bencher) {
-                let buf = $data;
-                b.iter(|| {
-                    for _ in 0..NITER {
-                        bb(LittleEndian::$read(&buf, $bytes));
-                    }
-                });
-            }
-
-            #[bench]
-            fn read_native_endian(b: &mut Bencher) {
-                let buf = $data;
-                b.iter(|| {
-                    for _ in 0..NITER {
-                        bb(NativeEndian::$read(&buf, $bytes));
-                    }
-                });
-            }
-        }
-    );
-    ($ty:ident, $max:ident,
-     $read:ident, $write:ident, $size:expr, $data:expr) => (
-        mod $ty {
-            use std::$ty;
-            use byteorder::{ByteOrder, BigEndian, NativeEndian, LittleEndian};
-            use super::test::Bencher;
-            use super::test::black_box as bb;
-
-            const NITER: usize = 100_000;
-
-            #[bench]
-            fn read_big_endian(b: &mut Bencher) {
-                let buf = $data;
-                b.iter(|| {
-                    for _ in 0..NITER {
-                        bb(BigEndian::$read(&buf));
-                    }
-                });
-            }
-
-            #[bench]
-            fn read_little_endian(b: &mut Bencher) {
-                let buf = $data;
-                b.iter(|| {
-                    for _ in 0..NITER {
-                        bb(LittleEndian::$read(&buf));
-                    }
-                });
-            }
-
-            #[bench]
-            fn read_native_endian(b: &mut Bencher) {
-                let buf = $data;
-                b.iter(|| {
-                    for _ in 0..NITER {
-                        bb(NativeEndian::$read(&buf));
-                    }
-                });
-            }
-
-            #[bench]
-            fn write_big_endian(b: &mut Bencher) {
-                let mut buf = $data;
-                let n = $ty::$max;
-                b.iter(|| {
-                    for _ in 0..NITER {
-                        bb(BigEndian::$write(&mut buf, n));
-                    }
-                });
-            }
-
-            #[bench]
-            fn write_little_endian(b: &mut Bencher) {
-                let mut buf = $data;
-                let n = $ty::$max;
-                b.iter(|| {
-                    for _ in 0..NITER {
-                        bb(LittleEndian::$write(&mut buf, n));
-                    }
-                });
-            }
-
-            #[bench]
-            fn write_native_endian(b: &mut Bencher) {
-                let mut buf = $data;
-                let n = $ty::$max;
-                b.iter(|| {
-                    for _ in 0..NITER {
-                        bb(NativeEndian::$write(&mut buf, n));
-                    }
-                });
-            }
-        }
-    );
-}
-
-bench_num!(u16, MAX, read_u16, write_u16, 2, [1, 2]);
-bench_num!(i16, MAX, read_i16, write_i16, 2, [1, 2]);
-bench_num!(u32, MAX, read_u32, write_u32, 4, [1, 2, 3, 4]);
-bench_num!(i32, MAX, read_i32, write_i32, 4, [1, 2, 3, 4]);
-bench_num!(u64, MAX, read_u64, write_u64, 8, [1, 2, 3, 4, 5, 6, 7, 8]);
-bench_num!(i64, MAX, read_i64, write_i64, 8, [1, 2, 3, 4, 5, 6, 7, 8]);
-bench_num!(f32, MAX, read_f32, write_f32, 4, [1, 2, 3, 4]);
-bench_num!(f64, MAX, read_f64, write_f64, 8,
-           [1, 2, 3, 4, 5, 6, 7, 8]);
-
-bench_num!(uint_1, read_uint, 1, [1]);
-bench_num!(uint_2, read_uint, 2, [1, 2]);
-bench_num!(uint_3, read_uint, 3, [1, 2, 3]);
-bench_num!(uint_4, read_uint, 4, [1, 2, 3, 4]);
-bench_num!(uint_5, read_uint, 5, [1, 2, 3, 4, 5]);
-bench_num!(uint_6, read_uint, 6, [1, 2, 3, 4, 5, 6]);
-bench_num!(uint_7, read_uint, 7, [1, 2, 3, 4, 5, 6, 7]);
-bench_num!(uint_8, read_uint, 8, [1, 2, 3, 4, 5, 6, 7, 8]);
-
-bench_num!(int_1, read_int, 1, [1]);
-bench_num!(int_2, read_int, 2, [1, 2]);
-bench_num!(int_3, read_int, 3, [1, 2, 3]);
-bench_num!(int_4, read_int, 4, [1, 2, 3, 4]);
-bench_num!(int_5, read_int, 5, [1, 2, 3, 4, 5]);
-bench_num!(int_6, read_int, 6, [1, 2, 3, 4, 5, 6]);
-bench_num!(int_7, read_int, 7, [1, 2, 3, 4, 5, 6, 7]);
-bench_num!(int_8, read_int, 8, [1, 2, 3, 4, 5, 6, 7, 8]);
deleted file mode 100644
--- a/third_party/rust/byteorder-1.0.0/src/lib.rs
+++ /dev/null
@@ -1,820 +0,0 @@
-/*!
-This crate provides convenience methods for encoding and decoding numbers
-in either big-endian or little-endian order.
-
-The organization of the crate is pretty simple. A trait, `ByteOrder`, specifies
-byte conversion methods for each type of number in Rust (sans numbers that have
-a platform dependent size like `usize` and `isize`). Two types, `BigEndian`
-and `LittleEndian` implement these methods. Finally, `ReadBytesExt` and
-`WriteBytesExt` provide convenience methods available to all types that
-implement `Read` and `Write`.
-
-# Examples
-
-Read unsigned 16 bit big-endian integers from a `Read` type:
-
-```rust
-use std::io::Cursor;
-use byteorder::{BigEndian, ReadBytesExt};
-
-let mut rdr = Cursor::new(vec![2, 5, 3, 0]);
-// Note that we use type parameters to indicate which kind of byte order
-// we want!
-assert_eq!(517, rdr.read_u16::<BigEndian>().unwrap());
-assert_eq!(768, rdr.read_u16::<BigEndian>().unwrap());
-```
-
-Write unsigned 16 bit little-endian integers to a `Write` type:
-
-```rust
-use byteorder::{LittleEndian, WriteBytesExt};
-
-let mut wtr = vec![];
-wtr.write_u16::<LittleEndian>(517).unwrap();
-wtr.write_u16::<LittleEndian>(768).unwrap();
-assert_eq!(wtr, vec![5, 2, 0, 3]);
-```
-*/
-
-#![deny(missing_docs)]
-#![cfg_attr(not(feature = "std"), no_std)]
-
-#[cfg(feature = "std")]
-extern crate core;
-
-use core::fmt::Debug;
-use core::hash::Hash;
-use core::mem::transmute;
-use core::ptr::copy_nonoverlapping;
-
-#[cfg(feature = "std")]
-pub use new::{ReadBytesExt, WriteBytesExt};
-
-#[cfg(feature = "std")]
-mod new;
-
-#[inline]
-fn extend_sign(val: u64, nbytes: usize) -> i64 {
-    let shift = (8 - nbytes) * 8;
-    (val << shift) as i64 >> shift
-}
-
-#[inline]
-fn unextend_sign(val: i64, nbytes: usize) -> u64 {
-    let shift = (8 - nbytes) * 8;
-    (val << shift) as u64 >> shift
-}
-
-#[inline]
-fn pack_size(n: u64) -> usize {
-    if n < 1 << 8 {
-        1
-    } else if n < 1 << 16 {
-        2
-    } else if n < 1 << 24 {
-        3
-    } else if n < 1 << 32 {
-        4
-    } else if n < 1 << 40 {
-        5
-    } else if n < 1 << 48 {
-        6
-    } else if n < 1 << 56 {
-        7
-    } else {
-        8
-    }
-}
-
-/// ByteOrder describes types that can serialize integers as bytes.
-///
-/// Note that `Self` does not appear anywhere in this trait's definition!
-/// Therefore, in order to use it, you'll need to use syntax like
-/// `T::read_u16(&[0, 1])` where `T` implements `ByteOrder`.
-///
-/// This crate provides two types that implement `ByteOrder`: `BigEndian`
-/// and `LittleEndian`.
-///
-/// # Examples
-///
-/// Write and read `u32` numbers in little endian order:
-///
-/// ```rust
-/// use byteorder::{ByteOrder, LittleEndian};
-///
-/// let mut buf = [0; 4];
-/// LittleEndian::write_u32(&mut buf, 1_000_000);
-/// assert_eq!(1_000_000, LittleEndian::read_u32(&buf));
-/// ```
-///
-/// Write and read `i16` numbers in big endian order:
-///
-/// ```rust
-/// use byteorder::{ByteOrder, BigEndian};
-///
-/// let mut buf = [0; 2];
-/// BigEndian::write_i16(&mut buf, -50_000);
-/// assert_eq!(-50_000, BigEndian::read_i16(&buf));
-/// ```
-pub trait ByteOrder
-    : Clone + Copy + Debug + Default + Eq + Hash + Ord + PartialEq + PartialOrd {
-    /// Reads an unsigned 16 bit integer from `buf`.
-    ///
-    /// Panics when `buf.len() < 2`.
-    fn read_u16(buf: &[u8]) -> u16;
-
-    /// Reads an unsigned 32 bit integer from `buf`.
-    ///
-    /// Panics when `buf.len() < 4`.
-    fn read_u32(buf: &[u8]) -> u32;
-
-    /// Reads an unsigned 64 bit integer from `buf`.
-    ///
-    /// Panics when `buf.len() < 8`.
-    fn read_u64(buf: &[u8]) -> u64;
-
-    /// Reads an unsigned n-bytes integer from `buf`.
-    ///
-    /// Panics when `nbytes < 1` or `nbytes > 8` or
-    /// `buf.len() < nbytes`
-    fn read_uint(buf: &[u8], nbytes: usize) -> u64;
-
-    /// Writes an unsigned 16 bit integer `n` to `buf`.
-    ///
-    /// Panics when `buf.len() < 2`.
-    fn write_u16(buf: &mut [u8], n: u16);
-
-    /// Writes an unsigned 32 bit integer `n` to `buf`.
-    ///
-    /// Panics when `buf.len() < 4`.
-    fn write_u32(buf: &mut [u8], n: u32);
-
-    /// Writes an unsigned 64 bit integer `n` to `buf`.
-    ///
-    /// Panics when `buf.len() < 8`.
-    fn write_u64(buf: &mut [u8], n: u64);
-
-    /// Writes an unsigned integer `n` to `buf` using only `nbytes`.
-    ///
-    /// If `n` is not representable in `nbytes`, or if `nbytes` is `> 8`, then
-    /// this method panics.
-    fn write_uint(buf: &mut [u8], n: u64, nbytes: usize);
-
-    /// Reads a signed 16 bit integer from `buf`.
-    ///
-    /// Panics when `buf.len() < 2`.
-    #[inline]
-    fn read_i16(buf: &[u8]) -> i16 {
-        Self::read_u16(buf) as i16
-    }
-
-    /// Reads a signed 32 bit integer from `buf`.
-    ///
-    /// Panics when `buf.len() < 4`.
-    #[inline]
-    fn read_i32(buf: &[u8]) -> i32 {
-        Self::read_u32(buf) as i32
-    }
-
-    /// Reads a signed 64 bit integer from `buf`.
-    ///
-    /// Panics when `buf.len() < 8`.
-    #[inline]
-    fn read_i64(buf: &[u8]) -> i64 {
-        Self::read_u64(buf) as i64
-    }
-
-    /// Reads a signed n-bytes integer from `buf`.
-    ///
-    /// Panics when `nbytes < 1` or `nbytes > 8` or
-    /// `buf.len() < nbytes`
-    #[inline]
-    fn read_int(buf: &[u8], nbytes: usize) -> i64 {
-        extend_sign(Self::read_uint(buf, nbytes), nbytes)
-    }
-
-    /// Reads a IEEE754 single-precision (4 bytes) floating point number.
-    ///
-    /// Panics when `buf.len() < 4`.
-    #[inline]
-    fn read_f32(buf: &[u8]) -> f32 {
-        unsafe { transmute(Self::read_u32(buf)) }
-    }
-
-    /// Reads a IEEE754 double-precision (8 bytes) floating point number.
-    ///
-    /// Panics when `buf.len() < 8`.
-    #[inline]
-    fn read_f64(buf: &[u8]) -> f64 {
-        unsafe { transmute(Self::read_u64(buf)) }
-    }
-
-    /// Writes a signed 16 bit integer `n` to `buf`.
-    ///
-    /// Panics when `buf.len() < 2`.
-    #[inline]
-    fn write_i16(buf: &mut [u8], n: i16) {
-        Self::write_u16(buf, n as u16)
-    }
-
-    /// Writes a signed 32 bit integer `n` to `buf`.
-    ///
-    /// Panics when `buf.len() < 4`.
-    #[inline]
-    fn write_i32(buf: &mut [u8], n: i32) {
-        Self::write_u32(buf, n as u32)
-    }
-
-    /// Writes a signed 64 bit integer `n` to `buf`.
-    ///
-    /// Panics when `buf.len() < 8`.
-    #[inline]
-    fn write_i64(buf: &mut [u8], n: i64) {
-        Self::write_u64(buf, n as u64)
-    }
-
-    /// Writes a signed integer `n` to `buf` using only `nbytes`.
-    ///
-    /// If `n` is not representable in `nbytes`, or if `nbytes` is `> 8`, then
-    /// this method panics.
-    #[inline]
-    fn write_int(buf: &mut [u8], n: i64, nbytes: usize) {
-        Self::write_uint(buf, unextend_sign(n, nbytes), nbytes)
-    }
-
-    /// Writes a IEEE754 single-precision (4 bytes) floating point number.
-    ///
-    /// Panics when `buf.len() < 4`.
-    #[inline]
-    fn write_f32(buf: &mut [u8], n: f32) {
-        Self::write_u32(buf, unsafe { transmute(n) })
-    }
-
-    /// Writes a IEEE754 double-precision (8 bytes) floating point number.
-    ///
-    /// Panics when `buf.len() < 8`.
-    #[inline]
-    fn write_f64(buf: &mut [u8], n: f64) {
-        Self::write_u64(buf, unsafe { transmute(n) })
-    }
-}
-
-/// Defines big-endian serialization.
-///
-/// Note that this type has no value constructor. It is used purely at the
-/// type level.
-#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
-pub enum BigEndian {}
-
-impl Default for BigEndian {
-    fn default() -> BigEndian {
-        unreachable!()
-    }
-}
-
-/// Defines little-endian serialization.
-///
-/// Note that this type has no value constructor. It is used purely at the
-/// type level.
-#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
-pub enum LittleEndian {}
-
-impl Default for LittleEndian {
-    fn default() -> LittleEndian {
-        unreachable!()
-    }
-}
-
-/// Defines network byte order serialization.
-///
-/// Network byte order is defined by [RFC 1700][1] to be big-endian, and is
-/// referred to in several protocol specifications.  This type is an alias of
-/// BigEndian.
-///
-/// [1]: https://tools.ietf.org/html/rfc1700
-///
-/// Note that this type has no value constructor. It is used purely at the
-/// type level.
-pub type NetworkEndian = BigEndian;
-
-/// Defines system native-endian serialization.
-///
-/// Note that this type has no value constructor. It is used purely at the
-/// type level.
-#[cfg(target_endian = "little")]
-pub type NativeEndian = LittleEndian;
-
-/// Defines system native-endian serialization.
-///
-/// Note that this type has no value constructor. It is used purely at the
-/// type level.
-#[cfg(target_endian = "big")]
-pub type NativeEndian = BigEndian;
-
-macro_rules! read_num_bytes {
-    ($ty:ty, $size:expr, $src:expr, $which:ident) => ({
-        assert!($size == ::core::mem::size_of::<$ty>());
-        assert!($size <= $src.len());
-        let mut data: $ty = 0;
-        unsafe {
-            copy_nonoverlapping(
-                $src.as_ptr(),
-                &mut data as *mut $ty as *mut u8,
-                $size);
-        }
-        data.$which()
-    });
-}
-
-macro_rules! write_num_bytes {
-    ($ty:ty, $size:expr, $n:expr, $dst:expr, $which:ident) => ({
-        assert!($size <= $dst.len());
-        unsafe {
-            // N.B. https://github.com/rust-lang/rust/issues/22776
-            let bytes = transmute::<_, [u8; $size]>($n.$which());
-            copy_nonoverlapping((&bytes).as_ptr(), $dst.as_mut_ptr(), $size);
-        }
-    });
-}
-
-impl ByteOrder for BigEndian {
-    #[inline]
-    fn read_u16(buf: &[u8]) -> u16 {
-        read_num_bytes!(u16, 2, buf, to_be)
-    }
-
-    #[inline]
-    fn read_u32(buf: &[u8]) -> u32 {
-        read_num_bytes!(u32, 4, buf, to_be)
-    }
-
-    #[inline]
-    fn read_u64(buf: &[u8]) -> u64 {
-        read_num_bytes!(u64, 8, buf, to_be)
-    }
-
-    #[inline]
-    fn read_uint(buf: &[u8], nbytes: usize) -> u64 {
-        assert!(1 <= nbytes && nbytes <= 8 && nbytes <= buf.len());
-        let mut out = [0u8; 8];
-        let ptr_out = out.as_mut_ptr();
-        unsafe {
-            copy_nonoverlapping(
-                buf.as_ptr(), ptr_out.offset((8 - nbytes) as isize), nbytes);
-            (*(ptr_out as *const u64)).to_be()
-        }
-    }
-
-    #[inline]
-    fn write_u16(buf: &mut [u8], n: u16) {
-        write_num_bytes!(u16, 2, n, buf, to_be);
-    }
-
-    #[inline]
-    fn write_u32(buf: &mut [u8], n: u32) {
-        write_num_bytes!(u32, 4, n, buf, to_be);
-    }
-
-    #[inline]
-    fn write_u64(buf: &mut [u8], n: u64) {
-        write_num_bytes!(u64, 8, n, buf, to_be);
-    }
-
-    #[inline]
-    fn write_uint(buf: &mut [u8], n: u64, nbytes: usize) {
-        assert!(pack_size(n) <= nbytes && nbytes <= 8);
-        assert!(nbytes <= buf.len());
-        unsafe {
-            let bytes: [u8; 8] = transmute(n.to_be());
-            copy_nonoverlapping(
-                bytes.as_ptr().offset((8 - nbytes) as isize),
-                buf.as_mut_ptr(),
-                nbytes);
-        }
-    }
-}
-
-impl ByteOrder for LittleEndian {
-    #[inline]
-    fn read_u16(buf: &[u8]) -> u16 {
-        read_num_bytes!(u16, 2, buf, to_le)
-    }
-
-    #[inline]
-    fn read_u32(buf: &[u8]) -> u32 {
-        read_num_bytes!(u32, 4, buf, to_le)
-    }
-
-    #[inline]
-    fn read_u64(buf: &[u8]) -> u64 {
-        read_num_bytes!(u64, 8, buf, to_le)
-    }
-
-    #[inline]
-    fn read_uint(buf: &[u8], nbytes: usize) -> u64 {
-        assert!(1 <= nbytes && nbytes <= 8 && nbytes <= buf.len());
-        let mut out = [0u8; 8];
-        let ptr_out = out.as_mut_ptr();
-        unsafe {
-            copy_nonoverlapping(buf.as_ptr(), ptr_out, nbytes);
-            (*(ptr_out as *const u64)).to_le()
-        }
-    }
-
-    #[inline]
-    fn write_u16(buf: &mut [u8], n: u16) {
-        write_num_bytes!(u16, 2, n, buf, to_le);
-    }
-
-    #[inline]
-    fn write_u32(buf: &mut [u8], n: u32) {
-        write_num_bytes!(u32, 4, n, buf, to_le);
-    }
-
-    #[inline]
-    fn write_u64(buf: &mut [u8], n: u64) {
-        write_num_bytes!(u64, 8, n, buf, to_le);
-    }
-
-    #[inline]
-    fn write_uint(buf: &mut [u8], n: u64, nbytes: usize) {
-        assert!(pack_size(n as u64) <= nbytes && nbytes <= 8);
-        assert!(nbytes <= buf.len());
-        unsafe {
-            let bytes: [u8; 8] = transmute(n.to_le());
-            copy_nonoverlapping(bytes.as_ptr(), buf.as_mut_ptr(), nbytes);
-        }
-    }
-}
-
-#[cfg(test)]
-mod test {
-    extern crate quickcheck;
-    extern crate rand;
-
-    use self::rand::thread_rng;
-    use self::quickcheck::{QuickCheck, StdGen, Testable};
-
-    pub const U64_MAX: u64 = ::core::u64::MAX;
-    pub const I64_MAX: u64 = ::core::i64::MAX as u64;
-
-    pub fn qc_sized<A: Testable>(f: A, size: u64) {
-        QuickCheck::new()
-            .gen(StdGen::new(thread_rng(), size as usize))
-            .tests(1_00)
-            .max_tests(10_000)
-            .quickcheck(f);
-    }
-
-    macro_rules! qc_byte_order {
-        ($name:ident, $ty_int:ident, $max:expr,
-         $bytes:expr, $read:ident, $write:ident) => (
-            mod $name {
-                use {BigEndian, ByteOrder, NativeEndian, LittleEndian};
-                use super::qc_sized;
-
-                #[test]
-                fn big_endian() {
-                    let max = ($max - 1) >> (8 * (8 - $bytes));
-                    fn prop(n: $ty_int) -> bool {
-                        let mut buf = [0; 8];
-                        BigEndian::$write(&mut buf, n, $bytes);
-                        n == BigEndian::$read(&mut buf[..$bytes], $bytes)
-                    }
-                    qc_sized(prop as fn($ty_int) -> bool, max);
-                }
-
-                #[test]
-                fn little_endian() {
-                    let max = ($max - 1) >> (8 * (8 - $bytes));
-                    fn prop(n: $ty_int) -> bool {
-                        let mut buf = [0; 8];
-                        LittleEndian::$write(&mut buf, n, $bytes);
-                        n == LittleEndian::$read(&mut buf[..$bytes], $bytes)
-                    }
-                    qc_sized(prop as fn($ty_int) -> bool, max);
-                }
-
-                #[test]
-                fn native_endian() {
-                    let max = ($max - 1) >> (8 * (8 - $bytes));
-                    fn prop(n: $ty_int) -> bool {
-                        let mut buf = [0; 8];
-                        NativeEndian::$write(&mut buf, n, $bytes);
-                        n == NativeEndian::$read(&mut buf[..$bytes], $bytes)
-                    }
-                    qc_sized(prop as fn($ty_int) -> bool, max);
-                }
-            }
-        );
-        ($name:ident, $ty_int:ident, $max:expr,
-         $read:ident, $write:ident) => (
-            mod $name {
-                use core::mem::size_of;
-                use {BigEndian, ByteOrder, NativeEndian, LittleEndian};
-                use super::qc_sized;
-
-                #[test]
-                fn big_endian() {
-                    fn prop(n: $ty_int) -> bool {
-                        let bytes = size_of::<$ty_int>();
-                        let mut buf = [0; 8];
-                        BigEndian::$write(&mut buf[8 - bytes..], n);
-                        n == BigEndian::$read(&mut buf[8 - bytes..])
-                    }
-                    qc_sized(prop as fn($ty_int) -> bool, $max - 1);
-                }
-
-                #[test]
-                fn little_endian() {
-                    fn prop(n: $ty_int) -> bool {
-                        let bytes = size_of::<$ty_int>();
-                        let mut buf = [0; 8];
-                        LittleEndian::$write(&mut buf[..bytes], n);
-                        n == LittleEndian::$read(&mut buf[..bytes])
-                    }
-                    qc_sized(prop as fn($ty_int) -> bool, $max - 1);
-                }
-
-                #[test]
-                fn native_endian() {
-                    fn prop(n: $ty_int) -> bool {
-                        let bytes = size_of::<$ty_int>();
-                        let mut buf = [0; 8];
-                        NativeEndian::$write(&mut buf[..bytes], n);
-                        n == NativeEndian::$read(&mut buf[..bytes])
-                    }
-                    qc_sized(prop as fn($ty_int) -> bool, $max - 1);
-                }
-            }
-        );
-    }
-
-    qc_byte_order!(prop_u16, u16, ::core::u16::MAX as u64, read_u16, write_u16);
-    qc_byte_order!(prop_i16, i16, ::core::i16::MAX as u64, read_i16, write_i16);
-    qc_byte_order!(prop_u32, u32, ::core::u32::MAX as u64, read_u32, write_u32);
-    qc_byte_order!(prop_i32, i32, ::core::i32::MAX as u64, read_i32, write_i32);
-    qc_byte_order!(prop_u64, u64, ::core::u64::MAX as u64, read_u64, write_u64);
-    qc_byte_order!(prop_i64, i64, ::core::i64::MAX as u64, read_i64, write_i64);
-    qc_byte_order!(prop_f32, f32, ::core::u64::MAX as u64, read_f32, write_f32);
-    qc_byte_order!(prop_f64, f64, ::core::i64::MAX as u64, read_f64, write_f64);
-
-    qc_byte_order!(prop_uint_1, u64, super::U64_MAX, 1, read_uint, write_uint);
-    qc_byte_order!(prop_uint_2, u64, super::U64_MAX, 2, read_uint, write_uint);
-    qc_byte_order!(prop_uint_3, u64, super::U64_MAX, 3, read_uint, write_uint);
-    qc_byte_order!(prop_uint_4, u64, super::U64_MAX, 4, read_uint, write_uint);
-    qc_byte_order!(prop_uint_5, u64, super::U64_MAX, 5, read_uint, write_uint);
-    qc_byte_order!(prop_uint_6, u64, super::U64_MAX, 6, read_uint, write_uint);
-    qc_byte_order!(prop_uint_7, u64, super::U64_MAX, 7, read_uint, write_uint);
-    qc_byte_order!(prop_uint_8, u64, super::U64_MAX, 8, read_uint, write_uint);
-
-    qc_byte_order!(prop_int_1, i64, super::I64_MAX, 1, read_int, write_int);
-    qc_byte_order!(prop_int_2, i64, super::I64_MAX, 2, read_int, write_int);
-    qc_byte_order!(prop_int_3, i64, super::I64_MAX, 3, read_int, write_int);
-    qc_byte_order!(prop_int_4, i64, super::I64_MAX, 4, read_int, write_int);
-    qc_byte_order!(prop_int_5, i64, super::I64_MAX, 5, read_int, write_int);
-    qc_byte_order!(prop_int_6, i64, super::I64_MAX, 6, read_int, write_int);
-    qc_byte_order!(prop_int_7, i64, super::I64_MAX, 7, read_int, write_int);
-    qc_byte_order!(prop_int_8, i64, super::I64_MAX, 8, read_int, write_int);
-
-    // Test that all of the byte conversion functions panic when given a
-    // buffer that is too small.
-    //
-    // These tests are critical to ensure safety, otherwise we might end up
-    // with a buffer overflow.
-    macro_rules! too_small {
-        ($name:ident, $maximally_small:expr, $zero:expr,
-         $read:ident, $write:ident) => (
-            mod $name {
-                use {BigEndian, ByteOrder, NativeEndian, LittleEndian};
-
-                #[test]
-                #[should_panic]
-                fn read_big_endian() {
-                    let buf = [0; $maximally_small];
-                    BigEndian::$read(&buf);
-                }
-
-                #[test]
-                #[should_panic]
-                fn read_little_endian() {
-                    let buf = [0; $maximally_small];
-                    LittleEndian::$read(&buf);
-                }
-
-                #[test]
-                #[should_panic]
-                fn read_native_endian() {
-                    let buf = [0; $maximally_small];
-                    NativeEndian::$read(&buf);
-                }
-
-                #[test]
-                #[should_panic]
-                fn write_big_endian() {
-                    let mut buf = [0; $maximally_small];
-                    BigEndian::$write(&mut buf, $zero);
-                }
-
-                #[test]
-                #[should_panic]
-                fn write_little_endian() {
-                    let mut buf = [0; $maximally_small];
-                    LittleEndian::$write(&mut buf, $zero);
-                }
-
-                #[test]
-                #[should_panic]
-                fn write_native_endian() {
-                    let mut buf = [0; $maximally_small];
-                    NativeEndian::$write(&mut buf, $zero);
-                }
-            }
-        );
-        ($name:ident, $maximally_small:expr, $read:ident) => (
-            mod $name {
-                use {BigEndian, ByteOrder, NativeEndian, LittleEndian};
-
-                #[test]
-                #[should_panic]
-                fn read_big_endian() {
-                    let buf = [0; $maximally_small];
-                    BigEndian::$read(&buf, $maximally_small + 1);
-                }
-
-                #[test]
-                #[should_panic]
-                fn read_little_endian() {
-                    let buf = [0; $maximally_small];
-                    LittleEndian::$read(&buf, $maximally_small + 1);
-                }
-
-                #[test]
-                #[should_panic]
-                fn read_native_endian() {
-                    let buf = [0; $maximally_small];
-                    NativeEndian::$read(&buf, $maximally_small + 1);
-                }
-            }
-        );
-    }
-
-    too_small!(small_u16, 1, 0, read_u16, write_u16);
-    too_small!(small_i16, 1, 0, read_i16, write_i16);
-    too_small!(small_u32, 3, 0, read_u32, write_u32);
-    too_small!(small_i32, 3, 0, read_i32, write_i32);
-    too_small!(small_u64, 7, 0, read_u64, write_u64);
-    too_small!(small_i64, 7, 0, read_i64, write_i64);
-    too_small!(small_f32, 3, 0.0, read_f32, write_f32);
-    too_small!(small_f64, 7, 0.0, read_f64, write_f64);
-
-    too_small!(small_uint_1, 1, read_uint);
-    too_small!(small_uint_2, 2, read_uint);
-    too_small!(small_uint_3, 3, read_uint);
-    too_small!(small_uint_4, 4, read_uint);
-    too_small!(small_uint_5, 5, read_uint);
-    too_small!(small_uint_6, 6, read_uint);
-    too_small!(small_uint_7, 7, read_uint);
-
-    too_small!(small_int_1, 1, read_int);
-    too_small!(small_int_2, 2, read_int);
-    too_small!(small_int_3, 3, read_int);
-    too_small!(small_int_4, 4, read_int);
-    too_small!(small_int_5, 5, read_int);
-    too_small!(small_int_6, 6, read_int);
-    too_small!(small_int_7, 7, read_int);
-
-    #[test]
-    fn uint_bigger_buffer() {
-        use {ByteOrder, LittleEndian};
-        let n = LittleEndian::read_uint(&[1, 2, 3, 4, 5, 6, 7, 8], 5);
-        assert_eq!(n, 0x0504030201);
-    }
-}
-
-#[cfg(test)]
-#[cfg(feature = "std")]
-mod stdtests {
-    macro_rules! qc_bytes_ext {
-        ($name:ident, $ty_int:ident, $max:expr,
-         $bytes:expr, $read:ident, $write:ident) => (
-            mod $name {
-                use std::io::Cursor;
-                use {
-                    ReadBytesExt, WriteBytesExt,
-                    BigEndian, NativeEndian, LittleEndian,
-                };
-                use test::qc_sized;
-
-                #[test]
-                fn big_endian() {
-                    let max = ($max - 1) >> (8 * (8 - $bytes));
-                    fn prop(n: $ty_int) -> bool {
-                        let mut wtr = vec![];
-                        wtr.$write::<BigEndian>(n).unwrap();
-                        let mut rdr = Vec::new();
-                        rdr.extend(wtr[8 - $bytes..].iter().map(|&x|x));
-                        let mut rdr = Cursor::new(rdr);
-                        n == rdr.$read::<BigEndian>($bytes).unwrap()
-                    }
-                    qc_sized(prop as fn($ty_int) -> bool, max);
-                }
-
-                #[test]
-                fn little_endian() {
-                    let max = ($max - 1) >> (8 * (8 - $bytes));
-                    fn prop(n: $ty_int) -> bool {
-                        let mut wtr = vec![];
-                        wtr.$write::<LittleEndian>(n).unwrap();
-                        let mut rdr = Cursor::new(wtr);
-                        n == rdr.$read::<LittleEndian>($bytes).unwrap()
-                    }
-                    qc_sized(prop as fn($ty_int) -> bool, max);
-                }
-
-                #[test]
-                fn native_endian() {
-                    let max = ($max - 1) >> (8 * (8 - $bytes));
-                    fn prop(n: $ty_int) -> bool {
-                        let mut wtr = vec![];
-                        wtr.$write::<NativeEndian>(n).unwrap();
-                        let mut rdr = Cursor::new(wtr);
-                        n == rdr.$read::<NativeEndian>($bytes).unwrap()
-                    }
-                    qc_sized(prop as fn($ty_int) -> bool, max);
-                }
-            }
-        );
-        ($name:ident, $ty_int:ident, $max:expr, $read:ident, $write:ident) => (
-            mod $name {
-                use std::io::Cursor;
-                use {
-                    ReadBytesExt, WriteBytesExt,
-                    BigEndian, NativeEndian, LittleEndian,
-                };
-                use test::qc_sized;
-
-                #[test]
-                fn big_endian() {
-                    fn prop(n: $ty_int) -> bool {
-                        let mut wtr = vec![];
-                        wtr.$write::<BigEndian>(n).unwrap();
-                        let mut rdr = Cursor::new(wtr);
-                        n == rdr.$read::<BigEndian>().unwrap()
-                    }
-                    qc_sized(prop as fn($ty_int) -> bool, $max - 1);
-                }
-
-                #[test]
-                fn little_endian() {
-                    fn prop(n: $ty_int) -> bool {
-                        let mut wtr = vec![];
-                        wtr.$write::<LittleEndian>(n).unwrap();
-                        let mut rdr = Cursor::new(wtr);
-                        n == rdr.$read::<LittleEndian>().unwrap()
-                    }
-                    qc_sized(prop as fn($ty_int) -> bool, $max - 1);
-                }
-
-                #[test]
-                fn native_endian() {
-                    fn prop(n: $ty_int) -> bool {
-                        let mut wtr = vec![];
-                        wtr.$write::<NativeEndian>(n).unwrap();
-                        let mut rdr = Cursor::new(wtr);
-                        n == rdr.$read::<NativeEndian>().unwrap()
-                    }
-                    qc_sized(prop as fn($ty_int) -> bool, $max - 1);
-                }
-            }
-        );
-    }
-
-    qc_bytes_ext!(prop_ext_u16, u16, ::std::u16::MAX as u64, read_u16, write_u16);
-    qc_bytes_ext!(prop_ext_i16, i16, ::std::i16::MAX as u64, read_i16, write_i16);
-    qc_bytes_ext!(prop_ext_u32, u32, ::std::u32::MAX as u64, read_u32, write_u32);
-    qc_bytes_ext!(prop_ext_i32, i32, ::std::i32::MAX as u64, read_i32, write_i32);
-    qc_bytes_ext!(prop_ext_u64, u64, ::std::u64::MAX as u64, read_u64, write_u64);
-    qc_bytes_ext!(prop_ext_i64, i64, ::std::i64::MAX as u64, read_i64, write_i64);
-    qc_bytes_ext!(prop_ext_f32, f32, ::std::u64::MAX as u64, read_f32, write_f32);
-    qc_bytes_ext!(prop_ext_f64, f64, ::std::i64::MAX as u64, read_f64, write_f64);
-
-    qc_bytes_ext!(prop_ext_uint_1, u64, ::test::U64_MAX, 1, read_uint, write_u64);
-    qc_bytes_ext!(prop_ext_uint_2, u64, ::test::U64_MAX, 2, read_uint, write_u64);
-    qc_bytes_ext!(prop_ext_uint_3, u64, ::test::U64_MAX, 3, read_uint, write_u64);
-    qc_bytes_ext!(prop_ext_uint_4, u64, ::test::U64_MAX, 4, read_uint, write_u64);
-    qc_bytes_ext!(prop_ext_uint_5, u64, ::test::U64_MAX, 5, read_uint, write_u64);
-    qc_bytes_ext!(prop_ext_uint_6, u64, ::test::U64_MAX, 6, read_uint, write_u64);
-    qc_bytes_ext!(prop_ext_uint_7, u64, ::test::U64_MAX, 7, read_uint, write_u64);
-    qc_bytes_ext!(prop_ext_uint_8, u64, ::test::U64_MAX, 8, read_uint, write_u64);
-
-    qc_bytes_ext!(prop_ext_int_1, i64, ::test::I64_MAX, 1, read_int, write_i64);
-    qc_bytes_ext!(prop_ext_int_2, i64, ::test::I64_MAX, 2, read_int, write_i64);
-    qc_bytes_ext!(prop_ext_int_3, i64, ::test::I64_MAX, 3, read_int, write_i64);
-    qc_bytes_ext!(prop_ext_int_4, i64, ::test::I64_MAX, 4, read_int, write_i64);
-    qc_bytes_ext!(prop_ext_int_5, i64, ::test::I64_MAX, 5, read_int, write_i64);
-    qc_bytes_ext!(prop_ext_int_6, i64, ::test::I64_MAX, 6, read_int, write_i64);
-    qc_bytes_ext!(prop_ext_int_7, i64, ::test::I64_MAX, 7, read_int, write_i64);
-    qc_bytes_ext!(prop_ext_int_8, i64, ::test::I64_MAX, 8, read_int, write_i64);
-}
-
--- a/third_party/rust/byteorder/.cargo-checksum.json
+++ b/third_party/rust/byteorder/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".travis.yml":"a798200a7a2a7b499b4c44f0e516cd8975dc5f4b933144d1e2b1523087330b95","CHANGELOG.md":"caa17ca58eafcd282ed7b8bd47ef0670ce30a20aad339bf2758469f09fa4559d","COPYING":"01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f","Cargo.toml":"0e636678a02b111d1ebdfdc8ac5a835a2a41370028eeadf6d5fbfd3239f531f8","LICENSE-MIT":"0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f","README.md":"0559514b9d7488e96fb7a2f3c043a62fadf3495a1e10602d109ce79ee67da998","UNLICENSE":"7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c","benches/bench.rs":"250d46461a0529a856d76a6421fd45c499bccba2c532e05dbf438c94582a8eac","src/io.rs":"5429f522221b3cce8a5c90fba7ad98b0ddad4fab44acc39763e6adabd511c021","src/lib.rs":"d31f218ca1892bea2812dd575ceb700779de704dc8bf1b9a778315ab75343c5d"},"package":"ff81738b726f5d099632ceaffe7fb65b90212e8dce59d518729e7e8634032d3d"}
\ No newline at end of file
+{"files":{".travis.yml":"c8243fb884ca390f5a7b8cc45e1c0d5bbbdd7e4e82ada2dc1880b3a904c9ce12","COPYING":"01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f","Cargo.toml":"b6cd79e1f2a93cd8a5c6e6dd7985c46fc26e442ae5b8ed4a0ff37a4ad4708023","LICENSE-MIT":"0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f","README.md":"0559514b9d7488e96fb7a2f3c043a62fadf3495a1e10602d109ce79ee67da998","UNLICENSE":"7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c","benches/bench.rs":"f583692d829c8dfe19b1d5b9e968ccf5c74d6733367ca183edff74041a6afedd","src/lib.rs":"b038b8a84b2b7b2143b2835185b3cbbacaf056fa8a2f03bec84bfd79c913c726","src/new.rs":"161c21b7ebb5668c7cc70b46b0eb37709e06bb9c854f2fdfc6ce3d3babcbf3de"},"package":"c40977b0ee6b9885c9013cd41d9feffdd22deb3bb4dc3a71d901cc7a77de18c8"}
\ No newline at end of file
--- a/third_party/rust/byteorder/.travis.yml
+++ b/third_party/rust/byteorder/.travis.yml
@@ -5,18 +5,11 @@ rust:
   - beta
   - nightly
 script:
   - cargo build --verbose
   - cargo doc
   - cargo test --verbose
   - cargo test --verbose --no-default-features --lib
   - if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
-      cargo test --verbose --features i128;
-      cargo test --verbose --no-default-features --features i128 --lib;
-      cargo bench --verbose --no-run;
-      cargo bench --verbose --no-run --no-default-features;
-      cargo bench --verbose --no-run --features i128;
-      cargo bench --verbose --no-run --no-default-features --features i128;
+      cargo bench --verbose;
+      cargo bench --verbose --no-default-features;
     fi
-branches:
-  only:
-    - master
deleted file mode 100644
--- a/third_party/rust/byteorder/CHANGELOG.md
+++ /dev/null
@@ -1,36 +0,0 @@
-1.1.0
-=====
-This release of `byteorder` features a number of fixes and improvements, mostly
-as a result of the
-[Litz Blitz evaluation](https://public.etherpad-mozilla.org/p/rust-crate-eval-byteorder).
-
-Feature enhancements:
-
-* [FEATURE #63](https://github.com/BurntSushi/byteorder/issues/63):
-  Add methods for reading/writing slices of numbers for a specific
-  endianness.
-* [FEATURE #65](https://github.com/BurntSushi/byteorder/issues/65):
-  Add support for `u128`/`i128` types. (Behind the nightly only `i128`
-  feature.)
-* [FEATURE #72](https://github.com/BurntSushi/byteorder/issues/72):
-  Add "panics" and "errors" sections for each relevant public API item.
-* [FEATURE #74](https://github.com/BurntSushi/byteorder/issues/74):
-  Add CI badges to Cargo.toml.
-* [FEATURE #75](https://github.com/BurntSushi/byteorder/issues/75):
-  Add more examples to public API items.
-* Add 24-bit read/write methods.
-* Add `BE` and `LE` type aliases for `BigEndian` and `LittleEndian`,
-  respectively.
-
-Bug fixes:
-
-* [BUG #68](https://github.com/BurntSushi/byteorder/issues/68):
-  Panic in {BigEndian,LittleEndian}::default.
-* [BUG #69](https://github.com/BurntSushi/byteorder/issues/69):
-  Seal the `ByteOrder` trait to prevent out-of-crate implementations.
-* [BUG #71](https://github.com/BurntSushi/byteorder/issues/71):
-  Guarantee that the results of `read_f32`/`read_f64` are always defined.
-* [BUG #73](https://github.com/BurntSushi/byteorder/issues/73):
-  Add crates.io categories.
-* [BUG #77](https://github.com/BurntSushi/byteorder/issues/77):
-  Add `html_root` doc attribute.
--- a/third_party/rust/byteorder/Cargo.toml
+++ b/third_party/rust/byteorder/Cargo.toml
@@ -1,44 +1,26 @@
-# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
-#
-# When uploading crates to the registry Cargo will automatically
-# "normalize" Cargo.toml files for maximal compatibility
-# with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g. crates.io) dependencies
-#
-# If you believe there's an error in this file please file an
-# issue against the rust-lang/cargo repository. If you're
-# editing this file be aware that the upstream Cargo.toml
-# will likely look very different (and much more reasonable)
-
 [package]
 name = "byteorder"
-version = "1.1.0"
+version = "1.0.0"  #:version
 authors = ["Andrew Gallant <jamslam@gmail.com>"]
 description = "Library for reading/writing numbers in big-endian and little-endian."
+documentation = "https://docs.rs/byteorder"
 homepage = "https://github.com/BurntSushi/byteorder"
-documentation = "https://docs.rs/byteorder"
+repository = "https://github.com/BurntSushi/byteorder"
 readme = "README.md"
 keywords = ["byte", "endian", "big-endian", "little-endian", "binary"]
-categories = ["encoding", "parsing"]
 license = "Unlicense/MIT"
-repository = "https://github.com/BurntSushi/byteorder"
-[profile.bench]
-opt-level = 3
 
 [lib]
 name = "byteorder"
 bench = false
-[dev-dependencies.rand]
-version = "0.3"
 
-[dev-dependencies.quickcheck]
-version = "0.4"
-default-features = false
+[dev-dependencies]
+quickcheck = "0.4"
+rand = "0.3"
 
 [features]
 default = ["std"]
-i128 = []
 std = []
-[badges.travis-ci]
-branch = "master"
-repository = "https://github.com/BurntSushi/byteorder"
+
+[profile.bench]
+opt-level = 3
--- a/third_party/rust/byteorder/benches/bench.rs
+++ b/third_party/rust/byteorder/benches/bench.rs
@@ -1,13 +1,11 @@
-#![cfg_attr(feature = "i128", feature(i128))]
 #![feature(test)]
 
 extern crate byteorder;
-extern crate rand;
 extern crate test;
 
 macro_rules! bench_num {
     ($name:ident, $read:ident, $bytes:expr, $data:expr) => (
         mod $name {
             use byteorder::{ByteOrder, BigEndian, NativeEndian, LittleEndian};
             use super::test::Bencher;
             use super::test::black_box as bb;
@@ -143,178 +141,8 @@ bench_num!(uint_8, read_uint, 8, [1, 2, 
 bench_num!(int_1, read_int, 1, [1]);
 bench_num!(int_2, read_int, 2, [1, 2]);
 bench_num!(int_3, read_int, 3, [1, 2, 3]);
 bench_num!(int_4, read_int, 4, [1, 2, 3, 4]);
 bench_num!(int_5, read_int, 5, [1, 2, 3, 4, 5]);
 bench_num!(int_6, read_int, 6, [1, 2, 3, 4, 5, 6]);
 bench_num!(int_7, read_int, 7, [1, 2, 3, 4, 5, 6, 7]);
 bench_num!(int_8, read_int, 8, [1, 2, 3, 4, 5, 6, 7, 8]);
-
-#[cfg(feature = "i128")]
-bench_num!(u128, MAX, read_u128, write_u128,
-    16, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]);
-#[cfg(feature = "i128")]
-bench_num!(i128, MAX, read_i128, write_i128,
-    16, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]);
-
-#[cfg(feature = "i128")]
-bench_num!(uint128_1, read_uint128,
-    1, [1]);
-#[cfg(feature = "i128")]
-bench_num!(uint128_2, read_uint128,
-    2, [1, 2]);
-#[cfg(feature = "i128")]
-bench_num!(uint128_3, read_uint128,
-    3, [1, 2, 3]);
-#[cfg(feature = "i128")]
-bench_num!(uint128_4, read_uint128,
-    4, [1, 2, 3, 4]);
-#[cfg(feature = "i128")]
-bench_num!(uint128_5, read_uint128,
-    5, [1, 2, 3, 4, 5]);
-#[cfg(feature = "i128")]
-bench_num!(uint128_6, read_uint128,
-    6, [1, 2, 3, 4, 5, 6]);
-#[cfg(feature = "i128")]
-bench_num!(uint128_7, read_uint128,
-    7, [1, 2, 3, 4, 5, 6, 7]);
-#[cfg(feature = "i128")]
-bench_num!(uint128_8, read_uint128,
-    8, [1, 2, 3, 4, 5, 6, 7, 8]);
-#[cfg(feature = "i128")]
-bench_num!(uint128_9, read_uint128,
-    9, [1, 2, 3, 4, 5, 6, 7, 8, 9]);
-#[cfg(feature = "i128")]
-bench_num!(uint128_10, read_uint128,
-    10, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
-#[cfg(feature = "i128")]
-bench_num!(uint128_11, read_uint128,
-    11, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]);
-#[cfg(feature = "i128")]
-bench_num!(uint128_12, read_uint128,
-    12, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]);
-#[cfg(feature = "i128")]
-bench_num!(uint128_13, read_uint128,
-    13, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]);
-#[cfg(feature = "i128")]
-bench_num!(uint128_14, read_uint128,
-    14, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]);
-#[cfg(feature = "i128")]
-bench_num!(uint128_15, read_uint128,
-    15, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]);
-#[cfg(feature = "i128")]
-bench_num!(uint128_16, read_uint128,
-    16, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]);
-
-#[cfg(feature = "i128")]
-bench_num!(int128_1, read_int128,
-    1, [1]);
-#[cfg(feature = "i128")]
-bench_num!(int128_2, read_int128,
-    2, [1, 2]);
-#[cfg(feature = "i128")]
-bench_num!(int128_3, read_int128,
-    3, [1, 2, 3]);
-#[cfg(feature = "i128")]
-bench_num!(int128_4, read_int128,
-    4, [1, 2, 3, 4]);
-#[cfg(feature = "i128")]
-bench_num!(int128_5, read_int128,
-    5, [1, 2, 3, 4, 5]);
-#[cfg(feature = "i128")]
-bench_num!(int128_6, read_int128,
-    6, [1, 2, 3, 4, 5, 6]);
-#[cfg(feature = "i128")]
-bench_num!(int128_7, read_int128,
-    7, [1, 2, 3, 4, 5, 6, 7]);
-#[cfg(feature = "i128")]
-bench_num!(int128_8, read_int128,
-    8, [1, 2, 3, 4, 5, 6, 7, 8]);
-#[cfg(feature = "i128")]
-bench_num!(int128_9, read_int128,
-    9, [1, 2, 3, 4, 5, 6, 7, 8, 9]);
-#[cfg(feature = "i128")]
-bench_num!(int128_10, read_int128,
-    10, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
-#[cfg(feature = "i128")]
-bench_num!(int128_11, read_int128,
-    11, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]);
-#[cfg(feature = "i128")]
-bench_num!(int128_12, read_int128,
-    12, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]);
-#[cfg(feature = "i128")]
-bench_num!(int128_13, read_int128,
-    13, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]);
-#[cfg(feature = "i128")]
-bench_num!(int128_14, read_int128,
-    14, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]);
-#[cfg(feature = "i128")]
-bench_num!(int128_15, read_int128,
-    15, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]);
-#[cfg(feature = "i128")]
-bench_num!(int128_16, read_int128,
-    16, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]);
-
-
-macro_rules! bench_slice {
-    ($name:ident, $numty:ty, $read:ident, $write:ident) => {
-        mod $name {
-            use std::mem::size_of;
-
-            use byteorder::{ByteOrder, BigEndian, LittleEndian};
-            use rand::{self, Rng};
-            use test::Bencher;
-
-            #[bench]
-            fn read_big_endian(b: &mut Bencher) {
-                let mut numbers: Vec<$numty> =
-                    rand::thread_rng().gen_iter().take(100000).collect();
-                let mut bytes = vec![0; numbers.len() * size_of::<$numty>()];
-                BigEndian::$write(&numbers, &mut bytes);
-
-                b.bytes = bytes.len() as u64;
-                b.iter(|| {
-                    BigEndian::$read(&bytes, &mut numbers);
-                });
-            }
-
-            #[bench]
-            fn read_little_endian(b: &mut Bencher) {
-                let mut numbers: Vec<$numty> =
-                    rand::thread_rng().gen_iter().take(100000).collect();
-                let mut bytes = vec![0; numbers.len() * size_of::<$numty>()];
-                LittleEndian::$write(&numbers, &mut bytes);
-
-                b.bytes = bytes.len() as u64;
-                b.iter(|| {
-                    LittleEndian::$read(&bytes, &mut numbers);
-                });
-            }
-
-            #[bench]
-            fn write_big_endian(b: &mut Bencher) {
-                let numbers: Vec<$numty> =
-                    rand::thread_rng().gen_iter().take(100000).collect();
-                let mut bytes = vec![0; numbers.len() * size_of::<$numty>()];
-
-                b.bytes = bytes.len() as u64;
-                b.iter(|| {
-                    BigEndian::$write(&numbers, &mut bytes);
-                });
-            }
-
-            #[bench]
-            fn write_little_endian(b: &mut Bencher) {
-                let numbers: Vec<$numty> =
-                    rand::thread_rng().gen_iter().take(100000).collect();
-                let mut bytes = vec![0; numbers.len() * size_of::<$numty>()];
-
-                b.bytes = bytes.len() as u64;
-                b.iter(|| {
-                    LittleEndian::$write(&numbers, &mut bytes);
-                });
-            }
-        }
-    }
-}
-
-bench_slice!(slice_u64, u64, read_u64_into, write_u64_into);
deleted file mode 100644
--- a/third_party/rust/byteorder/src/io.rs
+++ /dev/null
@@ -1,1189 +0,0 @@
-use std::io::{self, Result};
-use std::slice;
-// use std::mem::transmute;
-
-use ByteOrder;
-
-/// Extends `Read` with methods for reading numbers. (For `std::io`.)
-///
-/// Most of the methods defined here have an unconstrained type parameter that
-/// must be explicitly instantiated. Typically, it is instantiated with either
-/// the `BigEndian` or `LittleEndian` types defined in this crate.
-///
-/// # Examples
-///
-/// Read unsigned 16 bit big-endian integers from a `Read`:
-///
-/// ```rust
-/// use std::io::Cursor;
-/// use byteorder::{BigEndian, ReadBytesExt};
-///
-/// let mut rdr = Cursor::new(vec![2, 5, 3, 0]);
-/// assert_eq!(517, rdr.read_u16::<BigEndian>().unwrap());
-/// assert_eq!(768, rdr.read_u16::<BigEndian>().unwrap());
-/// ```
-pub trait ReadBytesExt: io::Read {
-    /// Reads an unsigned 8 bit integer from the underlying reader.
-    ///
-    /// Note that since this reads a single byte, no byte order conversions
-    /// are used. It is included for completeness.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Read::read_exact`].
-    ///
-    /// [`Read::read_exact`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact
-    ///
-    /// # Examples
-    ///
-    /// Read unsigned 8 bit integers from a `Read`:
-    ///
-    /// ```rust
-    /// use std::io::Cursor;
-    /// use byteorder::{BigEndian, ReadBytesExt};
-    ///
-    /// let mut rdr = Cursor::new(vec![2, 5]);
-    /// assert_eq!(2, rdr.read_u8().unwrap());
-    /// assert_eq!(5, rdr.read_u8().unwrap());
-    /// ```
-    #[inline]
-    fn read_u8(&mut self) -> Result<u8> {
-        let mut buf = [0; 1];
-        try!(self.read_exact(&mut buf));
-        Ok(buf[0])
-    }
-
-    /// Reads a signed 8 bit integer from the underlying reader.
-    ///
-    /// Note that since this reads a single byte, no byte order conversions
-    /// are used. It is included for completeness.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Read::read_exact`].
-    ///
-    /// [`Read::read_exact`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact
-    ///
-    /// # Examples
-    ///
-    /// Read unsigned 8 bit integers from a `Read`:
-    ///
-    /// ```rust
-    /// use std::io::Cursor;
-    /// use byteorder::{BigEndian, ReadBytesExt};
-    ///
-    /// let mut rdr = Cursor::new(vec![0x02, 0xfb]);
-    /// assert_eq!(2, rdr.read_i8().unwrap());
-    /// assert_eq!(-5, rdr.read_i8().unwrap());
-    /// ```
-    #[inline]
-    fn read_i8(&mut self) -> Result<i8> {
-        let mut buf = [0; 1];
-        try!(self.read_exact(&mut buf));
-        Ok(buf[0] as i8)
-    }
-
-    /// Reads an unsigned 16 bit integer from the underlying reader.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Read::read_exact`].
-    ///
-    /// [`Read::read_exact`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact
-    ///
-    /// # Examples
-    ///
-    /// Read unsigned 16 bit big-endian integers from a `Read`:
-    ///
-    /// ```rust
-    /// use std::io::Cursor;
-    /// use byteorder::{BigEndian, ReadBytesExt};
-    ///
-    /// let mut rdr = Cursor::new(vec![2, 5, 3, 0]);
-    /// assert_eq!(517, rdr.read_u16::<BigEndian>().unwrap());
-    /// assert_eq!(768, rdr.read_u16::<BigEndian>().unwrap());
-    /// ```
-    #[inline]
-    fn read_u16<T: ByteOrder>(&mut self) -> Result<u16> {
-        let mut buf = [0; 2];
-        try!(self.read_exact(&mut buf));
-        Ok(T::read_u16(&buf))
-    }
-
-    /// Reads a signed 16 bit integer from the underlying reader.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Read::read_exact`].
-    ///
-    /// [`Read::read_exact`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact
-    ///
-    /// # Examples
-    ///
-    /// Read signed 16 bit big-endian integers from a `Read`:
-    ///
-    /// ```rust
-    /// use std::io::Cursor;
-    /// use byteorder::{BigEndian, ReadBytesExt};
-    ///
-    /// let mut rdr = Cursor::new(vec![0x00, 0xc1, 0xff, 0x7c]);
-    /// assert_eq!(193, rdr.read_i16::<BigEndian>().unwrap());
-    /// assert_eq!(-132, rdr.read_i16::<BigEndian>().unwrap());
-    /// ```
-    #[inline]
-    fn read_i16<T: ByteOrder>(&mut self) -> Result<i16> {
-        let mut buf = [0; 2];
-        try!(self.read_exact(&mut buf));
-        Ok(T::read_i16(&buf))
-    }
-
-    /// Reads an unsigned 24 bit integer from the underlying reader.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Read::read_exact`].
-    ///
-    /// [`Read::read_exact`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact
-    ///
-    /// # Examples
-    ///
-    /// Read unsigned 24 bit big-endian integers from a `Read`:
-    ///
-    /// ```rust
-    /// use std::io::Cursor;
-    /// use byteorder::{BigEndian, ReadBytesExt};
-    ///
-    /// let mut rdr = Cursor::new(vec![0x00, 0x01, 0x0b]);
-    /// assert_eq!(267, rdr.read_u24::<BigEndian>().unwrap());
-    /// ```
-    #[inline]
-    fn read_u24<T: ByteOrder>(&mut self) -> Result<u32> {
-        let mut buf = [0; 3];
-        try!(self.read_exact(&mut buf));
-        Ok(T::read_u24(&buf))
-    }
-
-    /// Reads a signed 24 bit integer from the underlying reader.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Read::read_exact`].
-    ///
-    /// [`Read::read_exact`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact
-    ///
-    /// # Examples
-    ///
-    /// Read signed 24 bit big-endian integers from a `Read`:
-    ///
-    /// ```rust
-    /// use std::io::Cursor;
-    /// use byteorder::{BigEndian, ReadBytesExt};
-    ///
-    /// let mut rdr = Cursor::new(vec![0xff, 0x7a, 0x33]);
-    /// assert_eq!(-34253, rdr.read_i24::<BigEndian>().unwrap());
-    /// ```
-    #[inline]
-    fn read_i24<T: ByteOrder>(&mut self) -> Result<i32> {
-        let mut buf = [0; 3];
-        try!(self.read_exact(&mut buf));
-        Ok(T::read_i24(&buf))
-    }
-
-    /// Reads an unsigned 32 bit integer from the underlying reader.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Read::read_exact`].
-    ///
-    /// [`Read::read_exact`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact
-    ///
-    /// # Examples
-    ///
-    /// Read unsigned 32 bit big-endian integers from a `Read`:
-    ///
-    /// ```rust
-    /// use std::io::Cursor;
-    /// use byteorder::{BigEndian, ReadBytesExt};
-    ///
-    /// let mut rdr = Cursor::new(vec![0x00, 0x00, 0x01, 0x0b]);
-    /// assert_eq!(267, rdr.read_u32::<BigEndian>().unwrap());
-    /// ```
-    #[inline]
-    fn read_u32<T: ByteOrder>(&mut self) -> Result<u32> {
-        let mut buf = [0; 4];
-        try!(self.read_exact(&mut buf));
-        Ok(T::read_u32(&buf))
-    }
-
-    /// Reads a signed 32 bit integer from the underlying reader.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Read::read_exact`].
-    ///
-    /// [`Read::read_exact`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact
-    ///
-    /// # Examples
-    ///
-    /// Read signed 32 bit big-endian integers from a `Read`:
-    ///
-    /// ```rust
-    /// use std::io::Cursor;
-    /// use byteorder::{BigEndian, ReadBytesExt};
-    ///
-    /// let mut rdr = Cursor::new(vec![0xff, 0xff, 0x7a, 0x33]);
-    /// assert_eq!(-34253, rdr.read_i32::<BigEndian>().unwrap());
-    /// ```
-    #[inline]
-    fn read_i32<T: ByteOrder>(&mut self) -> Result<i32> {
-        let mut buf = [0; 4];
-        try!(self.read_exact(&mut buf));
-        Ok(T::read_i32(&buf))
-    }
-
-    /// Reads an unsigned 64 bit integer from the underlying reader.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Read::read_exact`].
-    ///
-    /// [`Read::read_exact`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact
-    ///
-    /// # Examples
-    ///
-    /// Read an unsigned 64 bit big-endian integer from a `Read`:
-    ///
-    /// ```rust
-    /// use std::io::Cursor;
-    /// use byteorder::{BigEndian, ReadBytesExt};
-    ///
-    /// let mut rdr = Cursor::new(vec![0x00, 0x03, 0x43, 0x95, 0x4d, 0x60, 0x86, 0x83]);
-    /// assert_eq!(918733457491587, rdr.read_u64::<BigEndian>().unwrap());
-    /// ```
-    #[inline]
-    fn read_u64<T: ByteOrder>(&mut self) -> Result<u64> {
-        let mut buf = [0; 8];
-        try!(self.read_exact(&mut buf));
-        Ok(T::read_u64(&buf))
-    }
-
-    /// Reads a signed 64 bit integer from the underlying reader.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Read::read_exact`].
-    ///
-    /// [`Read::read_exact`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact
-    ///
-    /// # Examples
-    ///
-    /// Read a signed 64 bit big-endian integer from a `Read`:
-    ///
-    /// ```rust
-    /// use std::io::Cursor;
-    /// use byteorder::{BigEndian, ReadBytesExt};
-    ///
-    /// let mut rdr = Cursor::new(vec![0x80, 0, 0, 0, 0, 0, 0, 0]);
-    /// assert_eq!(i64::min_value(), rdr.read_i64::<BigEndian>().unwrap());
-    /// ```
-    #[inline]
-    fn read_i64<T: ByteOrder>(&mut self) -> Result<i64> {
-        let mut buf = [0; 8];
-        try!(self.read_exact(&mut buf));
-        Ok(T::read_i64(&buf))
-    }
-
-    /// Reads an unsigned 128 bit integer from the underlying reader.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Read::read_exact`].
-    ///
-    /// [`Read::read_exact`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact
-    ///
-    /// # Examples
-    ///
-    /// Read an unsigned 128 bit big-endian integer from a `Read`:
-    ///
-    /// ```rust
-    /// use std::io::Cursor;
-    /// use byteorder::{BigEndian, ReadBytesExt};
-    ///
-    /// let mut rdr = Cursor::new(vec![
-    ///     0x00, 0x03, 0x43, 0x95, 0x4d, 0x60, 0x86, 0x83,
-    ///     0x00, 0x03, 0x43, 0x95, 0x4d, 0x60, 0x86, 0x83
-    /// ]);
-    /// assert_eq!(16947640962301618749969007319746179, rdr.read_u128::<BigEndian>().unwrap());
-    /// ```
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn read_u128<T: ByteOrder>(&mut self) -> Result<u128> {
-        let mut buf = [0; 16];
-        try!(self.read_exact(&mut buf));
-        Ok(T::read_u128(&buf))
-    }
-
-    /// Reads a signed 128 bit integer from the underlying reader.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Read::read_exact`].
-    ///
-    /// [`Read::read_exact`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact
-    ///
-    /// # Examples
-    ///
-    /// Read a signed 128 bit big-endian integer from a `Read`:
-    ///
-    /// ```rust
-    /// #![feature(i128_type)]
-    /// use std::io::Cursor;
-    /// use byteorder::{BigEndian, ReadBytesExt};
-    ///
-    /// let mut rdr = Cursor::new(vec![0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
-    /// assert_eq!(i128::min_value(), rdr.read_i128::<BigEndian>().unwrap());
-    /// ```
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn read_i128<T: ByteOrder>(&mut self) -> Result<i128> {
-        let mut buf = [0; 16];
-        try!(self.read_exact(&mut buf));
-        Ok(T::read_i128(&buf))
-    }
-
-    /// Reads an unsigned n-bytes integer from the underlying reader.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Read::read_exact`].
-    ///
-    /// [`Read::read_exact`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact
-    ///
-    /// # Examples
-    ///
-    /// Read an unsigned n-byte big-endian integer from a `Read`:
-    ///
-    /// ```rust
-    /// use std::io::Cursor;
-    /// use byteorder::{BigEndian, ReadBytesExt};
-    ///
-    /// let mut rdr = Cursor::new(vec![0x80, 0x74, 0xfa]);
-    /// assert_eq!(8418554, rdr.read_uint::<BigEndian>(3).unwrap());
-    #[inline]
-    fn read_uint<T: ByteOrder>(&mut self, nbytes: usize) -> Result<u64> {
-        let mut buf = [0; 8];
-        try!(self.read_exact(&mut buf[..nbytes]));
-        Ok(T::read_uint(&buf[..nbytes], nbytes))
-    }
-
-    /// Reads a signed n-bytes integer from the underlying reader.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Read::read_exact`].
-    ///
-    /// [`Read::read_exact`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact
-    ///
-    /// # Examples
-    ///
-    /// Read an unsigned n-byte big-endian integer from a `Read`:
-    ///
-    /// ```rust
-    /// use std::io::Cursor;
-    /// use byteorder::{BigEndian, ReadBytesExt};
-    ///
-    /// let mut rdr = Cursor::new(vec![0xc1, 0xff, 0x7c]);
-    /// assert_eq!(-4063364, rdr.read_int::<BigEndian>(3).unwrap());
-    #[inline]
-    fn read_int<T: ByteOrder>(&mut self, nbytes: usize) -> Result<i64> {
-        let mut buf = [0; 8];
-        try!(self.read_exact(&mut buf[..nbytes]));
-        Ok(T::read_int(&buf[..nbytes], nbytes))
-    }
-
-    /// Reads an unsigned n-bytes integer from the underlying reader.
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn read_uint128<T: ByteOrder>(&mut self, nbytes: usize) -> Result<u128> {
-        let mut buf = [0; 16];
-        try!(self.read_exact(&mut buf[..nbytes]));
-        Ok(T::read_uint128(&buf[..nbytes], nbytes))
-    }
-
-    /// Reads a signed n-bytes integer from the underlying reader.
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn read_int128<T: ByteOrder>(&mut self, nbytes: usize) -> Result<i128> {
-        let mut buf = [0; 16];
-        try!(self.read_exact(&mut buf[..nbytes]));
-        Ok(T::read_int128(&buf[..nbytes], nbytes))
-    }
-
-    /// Reads a IEEE754 single-precision (4 bytes) floating point number from
-    /// the underlying reader.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Read::read_exact`].
-    ///
-    /// [`Read::read_exact`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact
-    ///
-    /// # Examples
-    ///
-    /// Read a big-endian single-precision floating point number from a `Read`:
-    ///
-    /// ```rust
-    /// use std::f32;
-    /// use std::io::Cursor;
-    ///
-    /// use byteorder::{BigEndian, ReadBytesExt};
-    ///
-    /// let mut rdr = Cursor::new(vec![
-    ///     0x40, 0x49, 0x0f, 0xdb,
-    /// ]);
-    /// assert_eq!(f32::consts::PI, rdr.read_f32::<BigEndian>().unwrap());
-    /// ```
-    #[inline]
-    fn read_f32<T: ByteOrder>(&mut self) -> Result<f32> {
-        let mut buf = [0; 4];
-        try!(self.read_exact(&mut buf));
-        Ok(T::read_f32(&buf))
-    }
-
-    /// Reads a IEEE754 double-precision (8 bytes) floating point number from
-    /// the underlying reader.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Read::read_exact`].
-    ///
-    /// [`Read::read_exact`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact
-    ///
-    /// # Examples
-    ///
-    /// Read a big-endian double-precision floating point number from a `Read`:
-    ///
-    /// ```rust
-    /// use std::f64;
-    /// use std::io::Cursor;
-    ///
-    /// use byteorder::{BigEndian, ReadBytesExt};
-    ///
-    /// let mut rdr = Cursor::new(vec![
-    ///     0x40, 0x09, 0x21, 0xfb, 0x54, 0x44, 0x2d, 0x18,
-    /// ]);
-    /// assert_eq!(f64::consts::PI, rdr.read_f64::<BigEndian>().unwrap());
-    /// ```
-    #[inline]
-    fn read_f64<T: ByteOrder>(&mut self) -> Result<f64> {
-        let mut buf = [0; 8];
-        try!(self.read_exact(&mut buf));
-        Ok(T::read_f64(&buf))
-    }
-
-    /// Reads a sequence of unsigned 16 bit integers from the underlying
-    /// reader.
-    ///
-    /// The given buffer is either filled completely or an error is returned.
-    /// If an error is returned, the contents of `dst` are unspecified.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Read::read_exact`].
-    ///
-    /// [`Read::read_exact`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact
-    ///
-    /// # Examples
-    ///
-    /// Read a sequence of unsigned 16 bit big-endian integers from a `Read`:
-    ///
-    /// ```rust
-    /// use std::io::Cursor;
-    /// use byteorder::{BigEndian, ReadBytesExt};
-    ///
-    /// let mut rdr = Cursor::new(vec![2, 5, 3, 0]);
-    /// let mut dst = [0; 2];
-    /// rdr.read_u16_into::<BigEndian>(&mut dst).unwrap();
-    /// assert_eq!([517, 768], dst);
-    /// ```
-    #[inline]
-    fn read_u16_into<T: ByteOrder>(&mut self, dst: &mut [u16]) -> Result<()> {
-        {
-            let mut buf = unsafe { slice_to_u8_mut(dst) };
-            try!(self.read_exact(buf));
-        }
-        T::from_slice_u16(dst);
-        Ok(())
-    }
-
-    /// Reads a sequence of unsigned 32 bit integers from the underlying
-    /// reader.
-    ///
-    /// The given buffer is either filled completely or an error is returned.
-    /// If an error is returned, the contents of `dst` are unspecified.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Read::read_exact`].
-    ///
-    /// [`Read::read_exact`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact
-    ///
-    /// # Examples
-    ///
-    /// Read a sequence of unsigned 32 bit big-endian integers from a `Read`:
-    ///
-    /// ```rust
-    /// use std::io::Cursor;
-    /// use byteorder::{BigEndian, ReadBytesExt};
-    ///
-    /// let mut rdr = Cursor::new(vec![0, 0, 2, 5, 0, 0, 3, 0]);
-    /// let mut dst = [0; 2];
-    /// rdr.read_u32_into::<BigEndian>(&mut dst).unwrap();
-    /// assert_eq!([517, 768], dst);
-    /// ```
-    #[inline]
-    fn read_u32_into<T: ByteOrder>(&mut self, dst: &mut [u32]) -> Result<()> {
-        {
-            let mut buf = unsafe { slice_to_u8_mut(dst) };
-            try!(self.read_exact(buf));
-        }
-        T::from_slice_u32(dst);
-        Ok(())
-    }
-
-    /// Reads a sequence of unsigned 64 bit integers from the underlying
-    /// reader.
-    ///
-    /// The given buffer is either filled completely or an error is returned.
-    /// If an error is returned, the contents of `dst` are unspecified.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Read::read_exact`].
-    ///
-    /// [`Read::read_exact`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact
-    ///
-    /// # Examples
-    ///
-    /// Read a sequence of unsigned 64 bit big-endian integers from a `Read`:
-    ///
-    /// ```rust
-    /// use std::io::Cursor;
-    /// use byteorder::{BigEndian, ReadBytesExt};
-    ///
-    /// let mut rdr = Cursor::new(vec![
-    ///     0, 0, 0, 0, 0, 0, 2, 5,
-    ///     0, 0, 0, 0, 0, 0, 3, 0,
-    /// ]);
-    /// let mut dst = [0; 2];
-    /// rdr.read_u64_into::<BigEndian>(&mut dst).unwrap();
-    /// assert_eq!([517, 768], dst);
-    /// ```
-    #[inline]
-    fn read_u64_into<T: ByteOrder>(&mut self, dst: &mut [u64]) -> Result<()> {
-        {
-            let mut buf = unsafe { slice_to_u8_mut(dst) };
-            try!(self.read_exact(buf));
-        }
-        T::from_slice_u64(dst);
-        Ok(())
-    }
-
-    /// Reads a sequence of unsigned 128 bit integers from the underlying
-    /// reader.
-    ///
-    /// The given buffer is either filled completely or an error is returned.
-    /// If an error is returned, the contents of `dst` are unspecified.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Read::read_exact`].
-    ///
-    /// [`Read::read_exact`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact
-    ///
-    /// # Examples
-    ///
-    /// Read a sequence of unsigned 128 bit big-endian integers from a `Read`:
-    ///
-    /// ```rust
-    /// use std::io::Cursor;
-    /// use byteorder::{BigEndian, ReadBytesExt};
-    ///
-    /// let mut rdr = Cursor::new(vec![
-    ///     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5,
-    ///     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0,
-    /// ]);
-    /// let mut dst = [0; 2];
-    /// rdr.read_u128_into::<BigEndian>(&mut dst).unwrap();
-    /// assert_eq!([517, 768], dst);
-    /// ```
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn read_u128_into<T: ByteOrder>(
-        &mut self,
-        dst: &mut [u128],
-    ) -> Result<()> {
-        {
-            let mut buf = unsafe { slice_to_u8_mut(dst) };
-            try!(self.read_exact(buf));
-        }
-        T::from_slice_u128(dst);
-        Ok(())
-    }
-
-    /// Reads a sequence of signed 16 bit integers from the underlying
-    /// reader.
-    ///
-    /// The given buffer is either filled completely or an error is returned.
-    /// If an error is returned, the contents of `dst` are unspecified.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Read::read_exact`].
-    ///
-    /// [`Read::read_exact`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact
-    ///
-    /// # Examples
-    ///
-    /// Read a sequence of signed 16 bit big-endian integers from a `Read`:
-    ///
-    /// ```rust
-    /// use std::io::Cursor;
-    /// use byteorder::{BigEndian, ReadBytesExt};
-    ///
-    /// let mut rdr = Cursor::new(vec![2, 5, 3, 0]);
-    /// let mut dst = [0; 2];
-    /// rdr.read_i16_into::<BigEndian>(&mut dst).unwrap();
-    /// assert_eq!([517, 768], dst);
-    /// ```
-    #[inline]
-    fn read_i16_into<T: ByteOrder>(&mut self, dst: &mut [i16]) -> Result<()> {
-        {
-            let mut buf = unsafe { slice_to_u8_mut(dst) };
-            try!(self.read_exact(buf));
-        }
-        T::from_slice_i16(dst);
-        Ok(())
-    }
-
-    /// Reads a sequence of signed 32 bit integers from the underlying
-    /// reader.
-    ///
-    /// The given buffer is either filled completely or an error is returned.
-    /// If an error is returned, the contents of `dst` are unspecified.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Read::read_exact`].
-    ///
-    /// [`Read::read_exact`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact
-    ///
-    /// # Examples
-    ///
-    /// Read a sequence of signed 32 bit big-endian integers from a `Read`:
-    ///
-    /// ```rust
-    /// use std::io::Cursor;
-    /// use byteorder::{BigEndian, ReadBytesExt};
-    ///
-    /// let mut rdr = Cursor::new(vec![0, 0, 2, 5, 0, 0, 3, 0]);
-    /// let mut dst = [0; 2];
-    /// rdr.read_i32_into::<BigEndian>(&mut dst).unwrap();
-    /// assert_eq!([517, 768], dst);
-    /// ```
-    #[inline]
-    fn read_i32_into<T: ByteOrder>(&mut self, dst: &mut [i32]) -> Result<()> {
-        {
-            let mut buf = unsafe { slice_to_u8_mut(dst) };
-            try!(self.read_exact(buf));
-        }
-        T::from_slice_i32(dst);
-        Ok(())
-    }
-
-    /// Reads a sequence of signed 64 bit integers from the underlying
-    /// reader.
-    ///
-    /// The given buffer is either filled completely or an error is returned.
-    /// If an error is returned, the contents of `dst` are unspecified.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Read::read_exact`].
-    ///
-    /// [`Read::read_exact`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact
-    ///
-    /// # Examples
-    ///
-    /// Read a sequence of signed 64 bit big-endian integers from a `Read`:
-    ///
-    /// ```rust
-    /// use std::io::Cursor;
-    /// use byteorder::{BigEndian, ReadBytesExt};
-    ///
-    /// let mut rdr = Cursor::new(vec![
-    ///     0, 0, 0, 0, 0, 0, 2, 5,
-    ///     0, 0, 0, 0, 0, 0, 3, 0,
-    /// ]);
-    /// let mut dst = [0; 2];
-    /// rdr.read_i64_into::<BigEndian>(&mut dst).unwrap();
-    /// assert_eq!([517, 768], dst);
-    /// ```
-    #[inline]
-    fn read_i64_into<T: ByteOrder>(&mut self, dst: &mut [i64]) -> Result<()> {
-        {
-            let mut buf = unsafe { slice_to_u8_mut(dst) };
-            try!(self.read_exact(buf));
-        }
-        T::from_slice_i64(dst);
-        Ok(())
-    }
-
-    /// Reads a sequence of signed 128 bit integers from the underlying
-    /// reader.
-    ///
-    /// The given buffer is either filled completely or an error is returned.
-    /// If an error is returned, the contents of `dst` are unspecified.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Read::read_exact`].
-    ///
-    /// [`Read::read_exact`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact
-    ///
-    /// # Examples
-    ///
-    /// Read a sequence of signed 128 bit big-endian integers from a `Read`:
-    ///
-    /// ```rust
-    /// use std::io::Cursor;
-    /// use byteorder::{BigEndian, ReadBytesExt};
-    ///
-    /// let mut rdr = Cursor::new(vec![
-    ///     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5,
-    ///     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0,
-    /// ]);
-    /// let mut dst = [0; 2];
-    /// rdr.read_i128_into::<BigEndian>(&mut dst).unwrap();
-    /// assert_eq!([517, 768], dst);
-    /// ```
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn read_i128_into<T: ByteOrder>(
-        &mut self,
-        dst: &mut [i128],
-    ) -> Result<()> {
-        {
-            let mut buf = unsafe { slice_to_u8_mut(dst) };
-            try!(self.read_exact(buf));
-        }
-        T::from_slice_i128(dst);
-        Ok(())
-    }
-
-    /// Reads a sequence of IEEE754 single-precision (4 bytes) floating
-    /// point numbers from the underlying reader.
-    ///
-    /// The given buffer is either filled completely or an error is returned.
-    /// If an error is returned, the contents of `dst` are unspecified.
-    ///
-    /// # Safety
-    ///
-    /// This method is unsafe because there are no guarantees made about the
-    /// floating point values. In particular, this method does not check for
-    /// signaling NaNs, which may result in undefined behavior.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Read::read_exact`].
-    ///
-    /// [`Read::read_exact`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact
-    ///
-    /// # Examples
-    ///
-    /// Read a sequence of big-endian single-precision floating point number
-    /// from a `Read`:
-    ///
-    /// ```rust
-    /// use std::f32;
-    /// use std::io::Cursor;
-    ///
-    /// use byteorder::{BigEndian, ReadBytesExt};
-    ///
-    /// let mut rdr = Cursor::new(vec![
-    ///     0x40, 0x49, 0x0f, 0xdb,
-    ///     0x3f, 0x80, 0x00, 0x00,
-    /// ]);
-    /// let mut dst = [0.0; 2];
-    /// unsafe {
-    ///     rdr.read_f32_into_unchecked::<BigEndian>(&mut dst).unwrap();
-    /// }
-    /// assert_eq!([f32::consts::PI, 1.0], dst);
-    /// ```
-    #[inline]
-    unsafe fn read_f32_into_unchecked<T: ByteOrder>(
-        &mut self,
-        dst: &mut [f32],
-    ) -> Result<()> {
-        {
-            let mut buf = slice_to_u8_mut(dst);
-            try!(self.read_exact(buf));
-        }
-        T::from_slice_f32(dst);
-        Ok(())
-    }
-
-    /// Reads a sequence of IEEE754 double-precision (8 bytes) floating
-    /// point numbers from the underlying reader.
-    ///
-    /// The given buffer is either filled completely or an error is returned.
-    /// If an error is returned, the contents of `dst` are unspecified.
-    ///
-    /// # Safety
-    ///
-    /// This method is unsafe because there are no guarantees made about the
-    /// floating point values. In particular, this method does not check for
-    /// signaling NaNs, which may result in undefined behavior.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Read::read_exact`].
-    ///
-    /// [`Read::read_exact`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_exact
-    ///
-    /// # Examples
-    ///
-    /// Read a sequence of big-endian single-precision floating point number
-    /// from a `Read`:
-    ///
-    /// ```rust
-    /// use std::f64;
-    /// use std::io::Cursor;
-    ///
-    /// use byteorder::{BigEndian, ReadBytesExt};
-    ///
-    /// let mut rdr = Cursor::new(vec![
-    ///     0x40, 0x09, 0x21, 0xfb, 0x54, 0x44, 0x2d, 0x18,
-    ///     0x3f, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-    /// ]);
-    /// let mut dst = [0.0; 2];
-    /// unsafe {
-    ///     rdr.read_f64_into_unchecked::<BigEndian>(&mut dst).unwrap();
-    /// }
-    /// assert_eq!([f64::consts::PI, 1.0], dst);
-    /// ```
-    #[inline]
-    unsafe fn read_f64_into_unchecked<T: ByteOrder>(
-        &mut self,
-        dst: &mut [f64],
-    ) -> Result<()> {
-        {
-            let mut buf = slice_to_u8_mut(dst);
-            try!(self.read_exact(buf));
-        }
-        T::from_slice_f64(dst);
-        Ok(())
-    }
-}
-
-/// All types that implement `Read` get methods defined in `ReadBytesExt`
-/// for free.
-impl<R: io::Read + ?Sized> ReadBytesExt for R {}
-
-/// Extends `Write` with methods for writing numbers. (For `std::io`.)
-///
-/// Most of the methods defined here have an unconstrained type parameter that
-/// must be explicitly instantiated. Typically, it is instantiated with either
-/// the `BigEndian` or `LittleEndian` types defined in this crate.
-///
-/// # Examples
-///
-/// Write unsigned 16 bit big-endian integers to a `Write`:
-///
-/// ```rust
-/// use byteorder::{BigEndian, WriteBytesExt};
-///
-/// let mut wtr = vec![];
-/// wtr.write_u16::<BigEndian>(517).unwrap();
-/// wtr.write_u16::<BigEndian>(768).unwrap();
-/// assert_eq!(wtr, vec![2, 5, 3, 0]);
-/// ```
-pub trait WriteBytesExt: io::Write {
-    /// Writes an unsigned 8 bit integer to the underlying writer.
-    ///
-    /// Note that since this writes a single byte, no byte order conversions
-    /// are used. It is included for completeness.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Write::write_all`].
-    ///
-    /// [`Write::write_all`]: https://doc.rust-lang.org/std/io/trait.Write.html#method.write_all
-    #[inline]
-    fn write_u8(&mut self, n: u8) -> Result<()> {
-        self.write_all(&[n])
-    }
-
-    /// Writes a signed 8 bit integer to the underlying writer.
-    ///
-    /// Note that since this writes a single byte, no byte order conversions
-    /// are used. It is included for completeness.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Write::write_all`].
-    ///
-    /// [`Write::write_all`]: https://doc.rust-lang.org/std/io/trait.Write.html#method.write_all
-    #[inline]
-    fn write_i8(&mut self, n: i8) -> Result<()> {
-        self.write_all(&[n as u8])
-    }
-
-    /// Writes an unsigned 16 bit integer to the underlying writer.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Write::write_all`].
-    ///
-    /// [`Write::write_all`]: https://doc.rust-lang.org/std/io/trait.Write.html#method.write_all
-    #[inline]
-    fn write_u16<T: ByteOrder>(&mut self, n: u16) -> Result<()> {
-        let mut buf = [0; 2];
-        T::write_u16(&mut buf, n);
-        self.write_all(&buf)
-    }
-
-    /// Writes a signed 16 bit integer to the underlying writer.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Write::write_all`].
-    ///
-    /// [`Write::write_all`]: https://doc.rust-lang.org/std/io/trait.Write.html#method.write_all
-    #[inline]
-    fn write_i16<T: ByteOrder>(&mut self, n: i16) -> Result<()> {
-        let mut buf = [0; 2];
-        T::write_i16(&mut buf, n);
-        self.write_all(&buf)
-    }
-
-    /// Writes an unsigned 24 bit integer to the underlying writer.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Write::write_all`].
-    ///
-    /// [`Write::write_all`]: https://doc.rust-lang.org/std/io/trait.Write.html#method.write_all
-    #[inline]
-    fn write_u24<T: ByteOrder>(&mut self, n: u32) -> Result<()> {
-        let mut buf = [0; 3];
-        T::write_u24(&mut buf, n);
-        self.write_all(&buf)
-    }
-
-    /// Writes a signed 24 bit integer to the underlying writer.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Write::write_all`].
-    ///
-    /// [`Write::write_all`]: https://doc.rust-lang.org/std/io/trait.Write.html#method.write_all
-    #[inline]
-    fn write_i24<T: ByteOrder>(&mut self, n: i32) -> Result<()> {
-        let mut buf = [0; 3];
-        T::write_i24(&mut buf, n);
-        self.write_all(&buf)
-    }
-
-    /// Writes an unsigned 32 bit integer to the underlying writer.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Write::write_all`].
-    ///
-    /// [`Write::write_all`]: https://doc.rust-lang.org/std/io/trait.Write.html#method.write_all
-    #[inline]
-    fn write_u32<T: ByteOrder>(&mut self, n: u32) -> Result<()> {
-        let mut buf = [0; 4];
-        T::write_u32(&mut buf, n);
-        self.write_all(&buf)
-    }
-
-    /// Writes a signed 32 bit integer to the underlying writer.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Write::write_all`].
-    ///
-    /// [`Write::write_all`]: https://doc.rust-lang.org/std/io/trait.Write.html#method.write_all
-    #[inline]
-    fn write_i32<T: ByteOrder>(&mut self, n: i32) -> Result<()> {
-        let mut buf = [0; 4];
-        T::write_i32(&mut buf, n);
-        self.write_all(&buf)
-    }
-
-    /// Writes an unsigned 64 bit integer to the underlying writer.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Write::write_all`].
-    ///
-    /// [`Write::write_all`]: https://doc.rust-lang.org/std/io/trait.Write.html#method.write_all
-    #[inline]
-    fn write_u64<T: ByteOrder>(&mut self, n: u64) -> Result<()> {
-        let mut buf = [0; 8];
-        T::write_u64(&mut buf, n);
-        self.write_all(&buf)
-    }
-
-    /// Writes a signed 64 bit integer to the underlying writer.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Write::write_all`].
-    ///
-    /// [`Write::write_all`]: https://doc.rust-lang.org/std/io/trait.Write.html#method.write_all
-    #[inline]
-    fn write_i64<T: ByteOrder>(&mut self, n: i64) -> Result<()> {
-        let mut buf = [0; 8];
-        T::write_i64(&mut buf, n);
-        self.write_all(&buf)
-    }
-
-    /// Writes an unsigned 128 bit integer to the underlying writer.
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn write_u128<T: ByteOrder>(&mut self, n: u128) -> Result<()> {
-        let mut buf = [0; 16];
-        T::write_u128(&mut buf, n);
-        self.write_all(&buf)
-    }
-
-    /// Writes a signed 128 bit integer to the underlying writer.
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn write_i128<T: ByteOrder>(&mut self, n: i128) -> Result<()> {
-        let mut buf = [0; 16];
-        T::write_i128(&mut buf, n);
-        self.write_all(&buf)
-    }
-
-    /// Writes an unsigned n-bytes integer to the underlying writer.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Write::write_all`].
-    ///
-    /// [`Write::write_all`]: https://doc.rust-lang.org/std/io/trait.Write.html#method.write_all
-    ///
-    /// # Panics
-    ///
-    /// If the given integer is not representable in the given number of bytes,
-    /// this method panics. If `nbytes > 8`, this method panics.
-    #[inline]
-    fn write_uint<T: ByteOrder>(
-        &mut self,
-        n: u64,
-        nbytes: usize,
-    ) -> Result<()> {
-        let mut buf = [0; 8];
-        T::write_uint(&mut buf, n, nbytes);
-        self.write_all(&buf[0..nbytes])
-    }
-
-    /// Writes a signed n-bytes integer to the underlying writer.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Write::write_all`].
-    ///
-    /// [`Write::write_all`]: https://doc.rust-lang.org/std/io/trait.Write.html#method.write_all
-    ///
-    /// # Panics
-    ///
-    /// If the given integer is not representable in the given number of bytes,
-    /// this method panics. If `nbytes > 8`, this method panics.
-    #[inline]
-    fn write_int<T: ByteOrder>(
-        &mut self,
-        n: i64,
-        nbytes: usize,
-    ) -> Result<()> {
-        let mut buf = [0; 8];
-        T::write_int(&mut buf, n, nbytes);
-        self.write_all(&buf[0..nbytes])
-    }
-
-    /// Writes an unsigned n-bytes integer to the underlying writer.
-    ///
-    /// If the given integer is not representable in the given number of bytes,
-    /// this method panics. If `nbytes > 16`, this method panics.
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn write_uint128<T: ByteOrder>(
-        &mut self,
-        n: u128,
-        nbytes: usize,
-    ) -> Result<()> {
-        let mut buf = [0; 16];
-        T::write_uint128(&mut buf, n, nbytes);
-        self.write_all(&buf[0..nbytes])
-    }
-
-    /// Writes a signed n-bytes integer to the underlying writer.
-    ///
-    /// If the given integer is not representable in the given number of bytes,
-    /// this method panics. If `nbytes > 16`, this method panics.
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn write_int128<T: ByteOrder>(
-        &mut self,
-        n: i128,
-        nbytes: usize,
-    ) -> Result<()> {
-        let mut buf = [0; 16];
-        T::write_int128(&mut buf, n, nbytes);
-        self.write_all(&buf[0..nbytes])
-    }
-
-    /// Writes a IEEE754 single-precision (4 bytes) floating point number to
-    /// the underlying writer.
-    ///
-    /// # Errors
-    ///
-    /// This method returns the same errors as [`Write::write_all`].
-    ///
-    /// [`Write::write_all`]: https://doc.rust-lang.org/std/io/trait.Write.html#method.write_all
-    #[inline]
-    fn write_f32<T: ByteOrder>(&mut self, n: f32) -> Result<()> {
-        let mut buf = [0; 4];
-        T::write_f32(&mut buf, n);
-        self.write_all(&buf)
-    }
-
-    /// Writes a IEEE754 double-precision (8 bytes) floating point number to
-    /// the underlying writer.
-    #[inline]
-    fn write_f64<T: ByteOrder>(&mut self, n: f64) -> Result<()> {
-        let mut buf = [0; 8];
-        T::write_f64(&mut buf, n);
-        self.write_all(&buf)
-    }
-}
-
-/// All types that implement `Write` get methods defined in `WriteBytesExt`
-/// for free.
-impl<W: io::Write + ?Sized> WriteBytesExt for W {}
-
-/// Convert a slice of T (where T is plain old data) to its mutable binary
-/// representation.
-///
-/// This function is wildly unsafe because it permits arbitrary modification of
-/// the binary representation of any `Copy` type. Use with care.
-unsafe fn slice_to_u8_mut<T: Copy>(slice: &mut [T]) -> &mut [u8] {
-    use std::mem::size_of;
-
-    let len = size_of::<T>() * slice.len();
-    slice::from_raw_parts_mut(slice.as_mut_ptr() as *mut u8, len)
-}
--- a/third_party/rust/byteorder/src/lib.rs
+++ b/third_party/rust/byteorder/src/lib.rs
@@ -33,60 +33,43 @@ let mut wtr = vec![];
 wtr.write_u16::<LittleEndian>(517).unwrap();
 wtr.write_u16::<LittleEndian>(768).unwrap();
 assert_eq!(wtr, vec![5, 2, 0, 3]);
 ```
 */
 
 #![deny(missing_docs)]
 #![cfg_attr(not(feature = "std"), no_std)]
-#![cfg_attr(feature = "i128", feature(i128_type))]
-#![cfg_attr(all(feature = "i128", test), feature(i128))]
-#![doc(html_root_url = "https://docs.rs/byteorder/1.0.0")]
 
 #[cfg(feature = "std")]
 extern crate core;
 
 use core::fmt::Debug;
 use core::hash::Hash;
 use core::mem::transmute;
 use core::ptr::copy_nonoverlapping;
 
 #[cfg(feature = "std")]
-pub use io::{ReadBytesExt, WriteBytesExt};
+pub use new::{ReadBytesExt, WriteBytesExt};
 
 #[cfg(feature = "std")]
-mod io;
+mod new;
 
 #[inline]
 fn extend_sign(val: u64, nbytes: usize) -> i64 {
     let shift = (8 - nbytes) * 8;
     (val << shift) as i64 >> shift
 }
 
-#[cfg(feature = "i128")]
-#[inline]
-fn extend_sign128(val: u128, nbytes: usize) -> i128 {
-    let shift = (16 - nbytes) * 8;
-    (val << shift) as i128 >> shift
-}
-
 #[inline]
 fn unextend_sign(val: i64, nbytes: usize) -> u64 {
     let shift = (8 - nbytes) * 8;
     (val << shift) as u64 >> shift
 }
 
-#[cfg(feature = "i128")]
-#[inline]
-fn unextend_sign128(val: i128, nbytes: usize) -> u128 {
-    let shift = (16 - nbytes) * 8;
-    (val << shift) as u128 >> shift
-}
-
 #[inline]
 fn pack_size(n: u64) -> usize {
     if n < 1 << 8 {
         1
     } else if n < 1 << 16 {
         2
     } else if n < 1 << 24 {
         3
@@ -98,72 +81,24 @@ fn pack_size(n: u64) -> usize {
         6
     } else if n < 1 << 56 {
         7
     } else {
         8
     }
 }
 
-#[cfg(feature = "i128")]
-#[inline]
-fn pack_size128(n: u128) -> usize {
-    if n < 1 << 8 {
-        1
-    } else if n < 1 << 16 {
-        2
-    } else if n < 1 << 24 {
-        3
-    } else if n < 1 << 32 {
-        4
-    } else if n < 1 << 40 {
-        5
-    } else if n < 1 << 48 {
-        6
-    } else if n < 1 << 56 {
-        7
-    } else if n < 1 << 64 {
-        8
-    } else if n < 1 << 72 {
-        9
-    } else if n < 1 << 80 {
-        10
-    } else if n < 1 << 88 {
-        11
-    } else if n < 1 << 96 {
-        12
-    } else if n < 1 << 104 {
-        13
-    } else if n < 1 << 112 {
-        14
-    } else if n < 1 << 120 {
-        15
-    } else {
-        16
-    }
-}
-
-mod private {
-    /// Sealed stops crates other than byteorder from implementing any traits
-    /// that use it.
-    pub trait Sealed{}
-    impl Sealed for super::LittleEndian {}
-    impl Sealed for super::BigEndian {}
-}
-
 /// ByteOrder describes types that can serialize integers as bytes.
 ///
 /// Note that `Self` does not appear anywhere in this trait's definition!
 /// Therefore, in order to use it, you'll need to use syntax like
 /// `T::read_u16(&[0, 1])` where `T` implements `ByteOrder`.
 ///
 /// This crate provides two types that implement `ByteOrder`: `BigEndian`
 /// and `LittleEndian`.
-/// This trait is sealed and cannot be implemented for callers to avoid
-/// breaking backwards compatibility when adding new derived traits.
 ///
 /// # Examples
 ///
 /// Write and read `u32` numbers in little endian order:
 ///
 /// ```rust
 /// use byteorder::{ByteOrder, LittleEndian};
 ///
@@ -177,1520 +112,194 @@ mod private {
 /// ```rust
 /// use byteorder::{ByteOrder, BigEndian};
 ///
 /// let mut buf = [0; 2];
 /// BigEndian::write_i16(&mut buf, -50_000);
 /// assert_eq!(-50_000, BigEndian::read_i16(&buf));
 /// ```
 pub trait ByteOrder
-    : Clone + Copy + Debug + Default + Eq + Hash + Ord + PartialEq + PartialOrd
-    + private::Sealed
-{
+    : Clone + Copy + Debug + Default + Eq + Hash + Ord + PartialEq + PartialOrd {
     /// Reads an unsigned 16 bit integer from `buf`.
     ///
-    /// # Panics
-    ///
     /// Panics when `buf.len() < 2`.
     fn read_u16(buf: &[u8]) -> u16;
 
-    /// Reads an unsigned 24 bit integer from `buf`, stored in u32.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `buf.len() < 3`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read 24 bit `u32` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 3];
-    /// LittleEndian::write_u24(&mut buf, 1_000_000);
-    /// assert_eq!(1_000_000, LittleEndian::read_u24(&buf));
-    /// ```
-    fn read_u24(buf: &[u8]) -> u32 {
-        Self::read_uint(buf, 3) as u32
-    }
-
     /// Reads an unsigned 32 bit integer from `buf`.
     ///
-    /// # Panics
-    ///
     /// Panics when `buf.len() < 4`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `u32` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 4];
-    /// LittleEndian::write_u32(&mut buf, 1_000_000);
-    /// assert_eq!(1_000_000, LittleEndian::read_u32(&buf));
-    /// ```
     fn read_u32(buf: &[u8]) -> u32;
 
     /// Reads an unsigned 64 bit integer from `buf`.
     ///
-    /// # Panics
-    ///
     /// Panics when `buf.len() < 8`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `u64` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 8];
-    /// LittleEndian::write_u64(&mut buf, 1_000_000);
-    /// assert_eq!(1_000_000, LittleEndian::read_u64(&buf));
-    /// ```
     fn read_u64(buf: &[u8]) -> u64;
 
-    /// Reads an unsigned 128 bit integer from `buf`.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `buf.len() < 16`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `u128` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 16];
-    /// LittleEndian::write_u128(&mut buf, 1_000_000);
-    /// assert_eq!(1_000_000, LittleEndian::read_u128(&buf));
-    /// ```
-    #[cfg(feature = "i128")]
-    fn read_u128(buf: &[u8]) -> u128;
-
-    /// Reads an unsigned n-bytes integer from `buf`.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `nbytes < 1` or `nbytes > 8` or
-    /// `buf.len() < nbytes`
-    ///
-    /// # Examples
-    ///
-    /// Write and read an n-byte number in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 3];
-    /// LittleEndian::write_uint(&mut buf, 1_000_000, 3);
-    /// assert_eq!(1_000_000, LittleEndian::read_uint(&buf, 3));
-    /// ```
-    fn read_uint(buf: &[u8], nbytes: usize) -> u64;
-
     /// Reads an unsigned n-bytes integer from `buf`.
     ///
-    /// # Panics
-    ///
-    /// Panics when `nbytes < 1` or `nbytes > 16` or
+    /// Panics when `nbytes < 1` or `nbytes > 8` or
     /// `buf.len() < nbytes`
-    ///
-    /// # Examples
-    ///
-    /// Write and read an n-byte number in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 3];
-    /// LittleEndian::write_uint128(&mut buf, 1_000_000, 3);
-    /// assert_eq!(1_000_000, LittleEndian::read_uint128(&buf, 3));
-    /// ```
-    #[cfg(feature = "i128")]
-    fn read_uint128(buf: &[u8], nbytes: usize) -> u128;
+    fn read_uint(buf: &[u8], nbytes: usize) -> u64;
 
     /// Writes an unsigned 16 bit integer `n` to `buf`.
     ///
-    /// # Panics
-    ///
     /// Panics when `buf.len() < 2`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `u16` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 2];
-    /// LittleEndian::write_u16(&mut buf, 1_000_000);
-    /// assert_eq!(1_000_000, LittleEndian::read_u16(&buf));
-    /// ```
     fn write_u16(buf: &mut [u8], n: u16);
 
-    /// Writes an unsigned 24 bit integer `n` to `buf`, stored in u32.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `buf.len() < 3`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read 24 bit `u32` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 3];
-    /// LittleEndian::write_u24(&mut buf, 1_000_000);
-    /// assert_eq!(1_000_000, LittleEndian::read_u24(&buf));
-    /// ```
-    fn write_u24(buf: &mut [u8], n: u32) {
-        Self::write_uint(buf, n as u64, 3)
-    }
-
     /// Writes an unsigned 32 bit integer `n` to `buf`.
     ///
-    /// # Panics
-    ///
     /// Panics when `buf.len() < 4`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `u32` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 4];
-    /// LittleEndian::write_u32(&mut buf, 1_000_000);
-    /// assert_eq!(1_000_000, LittleEndian::read_u32(&buf));
-    /// ```
     fn write_u32(buf: &mut [u8], n: u32);
 
     /// Writes an unsigned 64 bit integer `n` to `buf`.
     ///
-    /// # Panics
-    ///
     /// Panics when `buf.len() < 8`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `u64` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 8];
-    /// LittleEndian::write_u64(&mut buf, 1_000_000);
-    /// assert_eq!(1_000_000, LittleEndian::read_u64(&buf));
-    /// ```
     fn write_u64(buf: &mut [u8], n: u64);
 
-    /// Writes an unsigned 128 bit integer `n` to `buf`.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `buf.len() < 16`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `u128` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 16];
-    /// LittleEndian::write_u128(&mut buf, 1_000_000);
-    /// assert_eq!(1_000_000, LittleEndian::read_u128(&buf));
-    /// ```
-    #[cfg(feature = "i128")]
-    fn write_u128(buf: &mut [u8], n: u128);
-
     /// Writes an unsigned integer `n` to `buf` using only `nbytes`.
     ///
-    /// # Panics
-    ///
     /// If `n` is not representable in `nbytes`, or if `nbytes` is `> 8`, then
     /// this method panics.
-    ///
-    /// # Examples
-    ///
-    /// Write and read an n-byte number in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 3];
-    /// LittleEndian::write_uint(&mut buf, 1_000_000, 3);
-    /// assert_eq!(1_000_000, LittleEndian::read_uint(&buf, 3));
-    /// ```
     fn write_uint(buf: &mut [u8], n: u64, nbytes: usize);
 
-    /// Writes an unsigned integer `n` to `buf` using only `nbytes`.
-    ///
-    /// # Panics
-    ///
-    /// If `n` is not representable in `nbytes`, or if `nbytes` is `> 16`, then
-    /// this method panics.
-    ///
-    /// # Examples
-    ///
-    /// Write and read an n-byte number in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 3];
-    /// LittleEndian::write_uint128(&mut buf, 1_000_000, 3);
-    /// assert_eq!(1_000_000, LittleEndian::read_uint128(&buf, 3));
-    /// ```
-    #[cfg(feature = "i128")]
-    fn write_uint128(buf: &mut [u8], n: u128, nbytes: usize);
-
     /// Reads a signed 16 bit integer from `buf`.
     ///
-    /// # Panics
-    ///
     /// Panics when `buf.len() < 2`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `i16` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 2];
-    /// LittleEndian::write_i16(&mut buf, -1_000);
-    /// assert_eq!(-1_000, LittleEndian::read_i16(&buf));
-    /// ```
     #[inline]
     fn read_i16(buf: &[u8]) -> i16 {
         Self::read_u16(buf) as i16
     }
 
-    /// Reads a signed 24 bit integer from `buf`, stored in i32.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `buf.len() < 3`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read 24 bit `i32` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 3];
-    /// LittleEndian::write_i24(&mut buf, -1_000_000);
-    /// assert_eq!(-1_000_000, LittleEndian::read_i24(&buf));
-    /// ```
-    #[inline]
-    fn read_i24(buf: &[u8]) -> i32 {
-        Self::read_int(buf, 3) as i32
-    }
-
     /// Reads a signed 32 bit integer from `buf`.
     ///
-    /// # Panics
-    ///
     /// Panics when `buf.len() < 4`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `i32` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 4];
-    /// LittleEndian::write_i32(&mut buf, -1_000_000);
-    /// assert_eq!(-1_000_000, LittleEndian::read_i32(&buf));
-    /// ```
     #[inline]
     fn read_i32(buf: &[u8]) -> i32 {
         Self::read_u32(buf) as i32
     }
 
     /// Reads a signed 64 bit integer from `buf`.
     ///
-    /// # Panics
-    ///
     /// Panics when `buf.len() < 8`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `i64` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 8];
-    /// LittleEndian::write_i64(&mut buf, -1_000_000_000);
-    /// assert_eq!(-1_000_000_000, LittleEndian::read_i64(&buf));
-    /// ```
     #[inline]
     fn read_i64(buf: &[u8]) -> i64 {
         Self::read_u64(buf) as i64
     }
 
-    /// Reads a signed 128 bit integer from `buf`.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `buf.len() < 16`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `i128` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 16];
-    /// LittleEndian::write_i128(&mut buf, -1_000_000_000);
-    /// assert_eq!(-1_000_000_000, LittleEndian::read_i128(&buf));
-    /// ```
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn read_i128(buf: &[u8]) -> i128 {
-        Self::read_u128(buf) as i128
-    }
-
     /// Reads a signed n-bytes integer from `buf`.
     ///
-    /// # Panics
-    ///
     /// Panics when `nbytes < 1` or `nbytes > 8` or
     /// `buf.len() < nbytes`
-    ///
-    /// # Examples
-    ///
-    /// Write and read n-length signed numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 3];
-    /// LittleEndian::write_int(&mut buf, -1_000, 3);
-    /// assert_eq!(-1_000, LittleEndian::read_int(&buf, 3));
-    /// ```
     #[inline]
     fn read_int(buf: &[u8], nbytes: usize) -> i64 {
         extend_sign(Self::read_uint(buf, nbytes), nbytes)
     }
 
-    /// Reads a signed n-bytes integer from `buf`.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `nbytes < 1` or `nbytes > 16` or
-    /// `buf.len() < nbytes`
-    ///
-    /// # Examples
-    ///
-    /// Write and read n-length signed numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 3];
-    /// LittleEndian::write_int128(&mut buf, -1_000, 3);
-    /// assert_eq!(-1_000, LittleEndian::read_int128(&buf, 3));
-    /// ```
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn read_int128(buf: &[u8], nbytes: usize) -> i128 {
-        extend_sign128(Self::read_uint128(buf, nbytes), nbytes)
-    }
-
     /// Reads a IEEE754 single-precision (4 bytes) floating point number.
     ///
-    /// The return value is always defined; signaling NaN's may be turned into
-    /// quiet NaN's.
-    ///
-    /// # Panics
-    ///
     /// Panics when `buf.len() < 4`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `f32` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let e = 2.71828;
-    /// let mut buf = [0; 4];
-    /// LittleEndian::write_f32(&mut buf, e);
-    /// assert_eq!(e, LittleEndian::read_f32(&buf));
-    /// ```
     #[inline]
     fn read_f32(buf: &[u8]) -> f32 {
-        safe_u32_bits_to_f32(Self::read_u32(buf))
+        unsafe { transmute(Self::read_u32(buf)) }
     }
 
     /// Reads a IEEE754 double-precision (8 bytes) floating point number.
     ///
-    /// The return value is always defined; signaling NaN's may be turned into
-    /// quiet NaN's.
-    ///
-    /// # Panics
-    ///
     /// Panics when `buf.len() < 8`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `f64` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let phi = 1.6180339887;
-    /// let mut buf = [0; 8];
-    /// LittleEndian::write_f64(&mut buf, phi);
-    /// assert_eq!(phi, LittleEndian::read_f64(&buf));
-    /// ```
     #[inline]
     fn read_f64(buf: &[u8]) -> f64 {
-        safe_u64_bits_to_f64(Self::read_u64(buf))
+        unsafe { transmute(Self::read_u64(buf)) }
     }
 
     /// Writes a signed 16 bit integer `n` to `buf`.
     ///
-    /// # Panics
-    ///
     /// Panics when `buf.len() < 2`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `i16` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 2];
-    /// LittleEndian::write_i16(&mut buf, -1_000);
-    /// assert_eq!(-1_000, LittleEndian::read_i16(&buf));
-    /// ```
     #[inline]
     fn write_i16(buf: &mut [u8], n: i16) {
         Self::write_u16(buf, n as u16)
     }
 
-    /// Writes a signed 24 bit integer `n` to `buf`, stored in i32.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `buf.len() < 3`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read 24 bit `i32` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 3];
-    /// LittleEndian::write_i24(&mut buf, -1_000_000);
-    /// assert_eq!(-1_000_000, LittleEndian::read_i24(&buf));
-    /// ```
-    #[inline]
-    fn write_i24(buf: &mut [u8], n: i32) {
-        Self::write_int(buf, n as i64, 3)
-    }
-
     /// Writes a signed 32 bit integer `n` to `buf`.
     ///
-    /// # Panics
-    ///
     /// Panics when `buf.len() < 4`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `i32` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 4];
-    /// LittleEndian::write_i32(&mut buf, -1_000_000);
-    /// assert_eq!(-1_000_000, LittleEndian::read_i32(&buf));
-    /// ```
     #[inline]
     fn write_i32(buf: &mut [u8], n: i32) {
         Self::write_u32(buf, n as u32)
     }
 
     /// Writes a signed 64 bit integer `n` to `buf`.
     ///
-    /// # Panics
-    ///
     /// Panics when `buf.len() < 8`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `i64` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 8];
-    /// LittleEndian::write_i64(&mut buf, -1_000_000_000);
-    /// assert_eq!(-1_000_000_000, LittleEndian::read_i64(&buf));
-    /// ```
     #[inline]
     fn write_i64(buf: &mut [u8], n: i64) {
         Self::write_u64(buf, n as u64)
     }
 
-    /// Writes a signed 128 bit integer `n` to `buf`.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `buf.len() < 16`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read n-byte `i128` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 16];
-    /// LittleEndian::write_i128(&mut buf, -1_000_000_000);
-    /// assert_eq!(-1_000_000_000, LittleEndian::read_i128(&buf));
-    /// ```
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn write_i128(buf: &mut [u8], n: i128) {
-        Self::write_u128(buf, n as u128)
-    }
-
     /// Writes a signed integer `n` to `buf` using only `nbytes`.
     ///
-    /// # Panics
-    ///
     /// If `n` is not representable in `nbytes`, or if `nbytes` is `> 8`, then
     /// this method panics.
-    ///
-    /// # Examples
-    ///
-    /// Write and read an n-byte number in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 3];
-    /// LittleEndian::write_int(&mut buf, -1_000, 3);
-    /// assert_eq!(-1_000, LittleEndian::read_int(&buf, 3));
-    /// ```
     #[inline]
     fn write_int(buf: &mut [u8], n: i64, nbytes: usize) {
         Self::write_uint(buf, unextend_sign(n, nbytes), nbytes)
     }
 
-    /// Writes a signed integer `n` to `buf` using only `nbytes`.
-    ///
-    /// # Panics
-    ///
-    /// If `n` is not representable in `nbytes`, or if `nbytes` is `> 16`, then
-    /// this method panics.
-    ///
-    /// # Examples
-    ///
-    /// Write and read n-length signed numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut buf = [0; 3];
-    /// LittleEndian::write_int128(&mut buf, -1_000, 3);
-    /// assert_eq!(-1_000, LittleEndian::read_int128(&buf, 3));
-    /// ```
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn write_int128(buf: &mut [u8], n: i128, nbytes: usize) {
-        Self::write_uint128(buf, unextend_sign128(n, nbytes), nbytes)
-    }
-
     /// Writes a IEEE754 single-precision (4 bytes) floating point number.
     ///
-    /// # Panics
-    ///
     /// Panics when `buf.len() < 4`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `f32` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let e = 2.71828;
-    /// let mut buf = [0; 4];
-    /// LittleEndian::write_f32(&mut buf, e);
-    /// assert_eq!(e, LittleEndian::read_f32(&buf));
-    /// ```
     #[inline]
     fn write_f32(buf: &mut [u8], n: f32) {
         Self::write_u32(buf, unsafe { transmute(n) })
     }
 
     /// Writes a IEEE754 double-precision (8 bytes) floating point number.
     ///
-    /// # Panics
-    ///
     /// Panics when `buf.len() < 8`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `f64` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let phi = 1.6180339887;
-    /// let mut buf = [0; 8];
-    /// LittleEndian::write_f64(&mut buf, phi);
-    /// assert_eq!(phi, LittleEndian::read_f64(&buf));
-    /// ```
     #[inline]
     fn write_f64(buf: &mut [u8], n: f64) {
         Self::write_u64(buf, unsafe { transmute(n) })
     }
-
-    /// Reads unsigned 16 bit integers from `src` into `dst`.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `src.len() != 2*dst.len()`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `u16` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut bytes = [0; 8];
-    /// let numbers_given = [1, 2, 0xf00f, 0xffee];
-    /// LittleEndian::write_u16_into(&numbers_given, &mut bytes);
-    ///
-    /// let mut numbers_got = [0; 4];
-    /// LittleEndian::read_u16_into(&bytes, &mut numbers_got);
-    /// assert_eq!(numbers_given, numbers_got);
-    /// ```
-    fn read_u16_into(src: &[u8], dst: &mut [u16]);
-
-    /// Reads unsigned 32 bit integers from `src` into `dst`.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `src.len() != 4*dst.len()`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `u32` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut bytes = [0; 16];
-    /// let numbers_given = [1, 2, 0xf00f, 0xffee];
-    /// LittleEndian::write_u32_into(&numbers_given, &mut bytes);
-    ///
-    /// let mut numbers_got = [0; 4];
-    /// LittleEndian::read_u32_into(&bytes, &mut numbers_got);
-    /// assert_eq!(numbers_given, numbers_got);
-    /// ```
-    fn read_u32_into(src: &[u8], dst: &mut [u32]);
-
-    /// Reads unsigned 64 bit integers from `src` into `dst`.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `src.len() != 8*dst.len()`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `u64` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut bytes = [0; 32];
-    /// let numbers_given = [1, 2, 0xf00f, 0xffee];
-    /// LittleEndian::write_u64_into(&numbers_given, &mut bytes);
-    ///
-    /// let mut numbers_got = [0; 4];
-    /// LittleEndian::read_u64_into(&bytes, &mut numbers_got);
-    /// assert_eq!(numbers_given, numbers_got);
-    /// ```
-    fn read_u64_into(src: &[u8], dst: &mut [u64]);
-
-    /// Reads unsigned 128 bit integers from `src` into `dst`.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `src.len() != 16*dst.len()`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `u128` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut bytes = [0; 64];
-    /// let numbers_given = [1, 2, 0xf00f, 0xffee];
-    /// LittleEndian::write_u128_into(&numbers_given, &mut bytes);
-    ///
-    /// let mut numbers_got = [0; 4];
-    /// LittleEndian::read_u128_into(&bytes, &mut numbers_got);
-    /// assert_eq!(numbers_given, numbers_got);
-    /// ```
-    #[cfg(feature = "i128")]
-    fn read_u128_into(src: &[u8], dst: &mut [u128]);
-
-    /// Reads signed 16 bit integers from `src` to `dst`.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `buf.len() != 2*dst.len()`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `i16` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut bytes = [0; 8];
-    /// let numbers_given = [1, 2, 0xf00f, 0xffee];
-    /// LittleEndian::write_i16_into(&numbers_given, &mut bytes);
-    ///
-    /// let mut numbers_got = [0; 4];
-    /// LittleEndian::read_i16_into(&bytes, &mut numbers_got);
-    /// assert_eq!(numbers_given, numbers_got);
-    /// ```
-    #[inline]
-    fn read_i16_into(src: &[u8], dst: &mut [i16]) {
-        Self::read_u16_into(src, unsafe { transmute(dst) });
-    }
-
-    /// Reads signed 32 bit integers from `src` into `dst`.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `src.len() != 4*dst.len()`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `i32` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut bytes = [0; 16];
-    /// let numbers_given = [1, 2, 0xf00f, 0xffee];
-    /// LittleEndian::write_i32_into(&numbers_given, &mut bytes);
-    ///
-    /// let mut numbers_got = [0; 4];
-    /// LittleEndian::read_i32_into(&bytes, &mut numbers_got);
-    /// assert_eq!(numbers_given, numbers_got);
-    /// ```
-    #[inline]
-    fn read_i32_into(src: &[u8], dst: &mut [i32]) {
-        Self::read_u32_into(src, unsafe { transmute(dst) });
-    }
-
-    /// Reads signed 64 bit integers from `src` into `dst`.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `src.len() != 8*dst.len()`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `i64` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut bytes = [0; 32];
-    /// let numbers_given = [1, 2, 0xf00f, 0xffee];
-    /// LittleEndian::write_i64_into(&numbers_given, &mut bytes);
-    ///
-    /// let mut numbers_got = [0; 4];
-    /// LittleEndian::read_i64_into(&bytes, &mut numbers_got);
-    /// assert_eq!(numbers_given, numbers_got);
-    /// ```
-    #[inline]
-    fn read_i64_into(src: &[u8], dst: &mut [i64]) {
-        Self::read_u64_into(src, unsafe { transmute(dst) });
-    }
-
-    /// Reads signed 128 bit integers from `src` into `dst`.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `src.len() != 16*dst.len()`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `i128` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut bytes = [0; 64];
-    /// let numbers_given = [1, 2, 0xf00f, 0xffee];
-    /// LittleEndian::write_i128_into(&numbers_given, &mut bytes);
-    ///
-    /// let mut numbers_got = [0; 4];
-    /// LittleEndian::read_i128_into(&bytes, &mut numbers_got);
-    /// assert_eq!(numbers_given, numbers_got);
-    /// ```
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn read_i128_into(src: &[u8], dst: &mut [i128]) {
-        Self::read_u128_into(src, unsafe { transmute(dst) });
-    }
-
-    /// Reads IEEE754 single-precision (4 bytes) floating point numbers from
-    /// `src` into `dst`.
-    ///
-    /// Note that this does not perform any checks on the floating point
-    /// conversion. In particular, if the `src` data encodes an undefined
-    /// floating point value for your environment, then the result may be
-    /// undefined behavior. For example, this function may produce signaling
-    /// NaN floating point values.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `src.len() != 4*dst.len()`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `f32` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut bytes = [0; 16];
-    /// let numbers_given = [1.0, 2.0, 31.312e311, -11.32e91];
-    /// LittleEndian::write_f32_into(&numbers_given, &mut bytes);
-    ///
-    /// let mut numbers_got = [0.0; 4];
-    /// unsafe {
-    ///     LittleEndian::read_f32_into_unchecked(&bytes, &mut numbers_got);
-    /// }
-    /// assert_eq!(numbers_given, numbers_got);
-    /// ```
-    #[inline]
-    unsafe fn read_f32_into_unchecked(src: &[u8], dst: &mut [f32]) {
-        Self::read_u32_into(src, transmute(dst));
-    }
-
-    /// Reads IEEE754 single-precision (4 bytes) floating point numbers from
-    /// `src` into `dst`.
-    ///
-    /// Note that this does not perform any checks on the floating point
-    /// conversion. In particular, if the `src` data encodes an undefined
-    /// floating point value for your environment, then the result may be
-    /// undefined behavior. For example, this function may produce signaling
-    /// NaN floating point values.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `src.len() != 8*dst.len()`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `f64` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut bytes = [0; 32];
-    /// let numbers_given = [1.0, 2.0, 31.312e311, -11.32e91];
-    /// LittleEndian::write_f64_into(&numbers_given, &mut bytes);
-    ///
-    /// let mut numbers_got = [0.0; 4];
-    /// unsafe {
-    ///     LittleEndian::read_f64_into_unchecked(&bytes, &mut numbers_got);
-    /// }
-    /// assert_eq!(numbers_given, numbers_got);
-    /// ```
-    #[inline]
-    unsafe fn read_f64_into_unchecked(src: &[u8], dst: &mut [f64]) {
-        Self::read_u64_into(src, transmute(dst));
-    }
-
-    /// Writes unsigned 16 bit integers from `src` into `dst`.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `dst.len() != 2*src.len()`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `u16` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut bytes = [0; 8];
-    /// let numbers_given = [1, 2, 0xf00f, 0xffee];
-    /// LittleEndian::write_u16_into(&numbers_given, &mut bytes);
-    ///
-    /// let mut numbers_got = [0; 4];
-    /// LittleEndian::read_u16_into(&bytes, &mut numbers_got);
-    /// assert_eq!(numbers_given, numbers_got);
-    /// ```
-    fn write_u16_into(src: &[u16], dst: &mut [u8]);
-
-    /// Writes unsigned 32 bit integers from `src` into `dst`.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `dst.len() != 4*src.len()`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `u32` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut bytes = [0; 16];
-    /// let numbers_given = [1, 2, 0xf00f, 0xffee];
-    /// LittleEndian::write_u32_into(&numbers_given, &mut bytes);
-    ///
-    /// let mut numbers_got = [0; 4];
-    /// LittleEndian::read_u32_into(&bytes, &mut numbers_got);
-    /// assert_eq!(numbers_given, numbers_got);
-    /// ```
-    fn write_u32_into(src: &[u32], dst: &mut [u8]);
-
-    /// Writes unsigned 64 bit integers from `src` into `dst`.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `dst.len() != 8*src.len()`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `u64` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut bytes = [0; 32];
-    /// let numbers_given = [1, 2, 0xf00f, 0xffee];
-    /// LittleEndian::write_u64_into(&numbers_given, &mut bytes);
-    ///
-    /// let mut numbers_got = [0; 4];
-    /// LittleEndian::read_u64_into(&bytes, &mut numbers_got);
-    /// assert_eq!(numbers_given, numbers_got);
-    /// ```
-    fn write_u64_into(src: &[u64], dst: &mut [u8]);
-
-    /// Writes unsigned 128 bit integers from `src` into `dst`.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `dst.len() != 16*src.len()`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `u128` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut bytes = [0; 64];
-    /// let numbers_given = [1, 2, 0xf00f, 0xffee];
-    /// LittleEndian::write_u128_into(&numbers_given, &mut bytes);
-    ///
-    /// let mut numbers_got = [0; 4];
-    /// LittleEndian::read_u128_into(&bytes, &mut numbers_got);
-    /// assert_eq!(numbers_given, numbers_got);
-    /// ```
-    #[cfg(feature = "i128")]
-    fn write_u128_into(src: &[u128], dst: &mut [u8]);
-
-    /// Writes signed 16 bit integers from `src` into `dst`.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `buf.len() != 2*src.len()`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `i16` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut bytes = [0; 8];
-    /// let numbers_given = [1, 2, 0xf00f, 0xffee];
-    /// LittleEndian::write_i16_into(&numbers_given, &mut bytes);
-    ///
-    /// let mut numbers_got = [0; 4];
-    /// LittleEndian::read_i16_into(&bytes, &mut numbers_got);
-    /// assert_eq!(numbers_given, numbers_got);
-    /// ```
-    fn write_i16_into(src: &[i16], dst: &mut [u8]) {
-        Self::write_u16_into(unsafe { transmute(src) }, dst);
-    }
-
-    /// Writes signed 32 bit integers from `src` into `dst`.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `dst.len() != 4*src.len()`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `i32` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut bytes = [0; 16];
-    /// let numbers_given = [1, 2, 0xf00f, 0xffee];
-    /// LittleEndian::write_i32_into(&numbers_given, &mut bytes);
-    ///
-    /// let mut numbers_got = [0; 4];
-    /// LittleEndian::read_i32_into(&bytes, &mut numbers_got);
-    /// assert_eq!(numbers_given, numbers_got);
-    /// ```
-    fn write_i32_into(src: &[i32], dst: &mut [u8]) {
-        Self::write_u32_into(unsafe { transmute(src) }, dst);
-    }
-
-    /// Writes signed 64 bit integers from `src` into `dst`.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `dst.len() != 8*src.len()`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `i64` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut bytes = [0; 32];
-    /// let numbers_given = [1, 2, 0xf00f, 0xffee];
-    /// LittleEndian::write_i64_into(&numbers_given, &mut bytes);
-    ///
-    /// let mut numbers_got = [0; 4];
-    /// LittleEndian::read_i64_into(&bytes, &mut numbers_got);
-    /// assert_eq!(numbers_given, numbers_got);
-    /// ```
-    fn write_i64_into(src: &[i64], dst: &mut [u8]) {
-        Self::write_u64_into(unsafe { transmute(src) }, dst);
-    }
-
-    /// Writes signed 128 bit integers from `src` into `dst`.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `dst.len() != 16*src.len()`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `i128` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut bytes = [0; 64];
-    /// let numbers_given = [1, 2, 0xf00f, 0xffee];
-    /// LittleEndian::write_i128_into(&numbers_given, &mut bytes);
-    ///
-    /// let mut numbers_got = [0; 4];
-    /// LittleEndian::read_i128_into(&bytes, &mut numbers_got);
-    /// assert_eq!(numbers_given, numbers_got);
-    /// ```
-    #[cfg(feature = "i128")]
-    fn write_i128_into(src: &[i128], dst: &mut [u8]) {
-        Self::write_u128_into(unsafe { transmute(src) }, dst);
-    }
-
-    /// Writes IEEE754 single-precision (4 bytes) floating point numbers from
-    /// `src` into `dst`.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `src.len() != 4*dst.len()`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `f32` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut bytes = [0; 16];
-    /// let numbers_given = [1.0, 2.0, 31.312e311, -11.32e91];
-    /// LittleEndian::write_f32_into(&numbers_given, &mut bytes);
-    ///
-    /// let mut numbers_got = [0.0; 4];
-    /// unsafe {
-    ///     LittleEndian::read_f32_into_unchecked(&bytes, &mut numbers_got);
-    /// }
-    /// assert_eq!(numbers_given, numbers_got);
-    /// ```
-    fn write_f32_into(src: &[f32], dst: &mut [u8]) {
-        Self::write_u32_into(unsafe { transmute(src) }, dst);
-    }
-
-    /// Writes IEEE754 double-precision (8 bytes) floating point numbers from
-    /// `src` into `dst`.
-    ///
-    /// # Panics
-    ///
-    /// Panics when `src.len() != 8*dst.len()`.
-    ///
-    /// # Examples
-    ///
-    /// Write and read `f64` numbers in little endian order:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, LittleEndian};
-    ///
-    /// let mut bytes = [0; 32];
-    /// let numbers_given = [1.0, 2.0, 31.312e311, -11.32e91];
-    /// LittleEndian::write_f64_into(&numbers_given, &mut bytes);
-    ///
-    /// let mut numbers_got = [0.0; 4];
-    /// unsafe {
-    ///     LittleEndian::read_f64_into_unchecked(&bytes, &mut numbers_got);
-    /// }
-    /// assert_eq!(numbers_given, numbers_got);
-    /// ```
-    fn write_f64_into(src: &[f64], dst: &mut [u8]) {
-        Self::write_u64_into(unsafe { transmute(src) }, dst);
-    }
-
-    /// Converts the given slice of unsigned 16 bit integers to a particular
-    /// endianness.
-    ///
-    /// If the endianness matches the endianness of the host platform, then
-    /// this is a no-op.
-    ///
-    /// # Examples
-    ///
-    /// Convert the host platform's endianness to big-endian:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, BigEndian};
-    ///
-    /// let mut numbers = [5, 65000];
-    /// BigEndian::from_slice_u16(&mut numbers);
-    /// if cfg!(target_endian = "little") {
-    ///     assert_eq!(numbers, [5u16.swap_bytes(), 65000u16.swap_bytes()]);
-    /// } else {
-    ///     assert_eq!(numbers, [5, 65000]);
-    /// }
-    /// ```
-    fn from_slice_u16(numbers: &mut [u16]);
-
-    /// Converts the given slice of unsigned 32 bit integers to a particular
-    /// endianness.
-    ///
-    /// If the endianness matches the endianness of the host platform, then
-    /// this is a no-op.
-    ///
-    /// # Examples
-    ///
-    /// Convert the host platform's endianness to big-endian:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, BigEndian};
-    ///
-    /// let mut numbers = [5, 65000];
-    /// BigEndian::from_slice_u32(&mut numbers);
-    /// if cfg!(target_endian = "little") {
-    ///     assert_eq!(numbers, [5u32.swap_bytes(), 65000u32.swap_bytes()]);
-    /// } else {
-    ///     assert_eq!(numbers, [5, 65000]);
-    /// }
-    /// ```
-    fn from_slice_u32(numbers: &mut [u32]);
-
-    /// Converts the given slice of unsigned 64 bit integers to a particular
-    /// endianness.
-    ///
-    /// If the endianness matches the endianness of the host platform, then
-    /// this is a no-op.
-    ///
-    /// # Examples
-    ///
-    /// Convert the host platform's endianness to big-endian:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, BigEndian};
-    ///
-    /// let mut numbers = [5, 65000];
-    /// BigEndian::from_slice_u64(&mut numbers);
-    /// if cfg!(target_endian = "little") {
-    ///     assert_eq!(numbers, [5u64.swap_bytes(), 65000u64.swap_bytes()]);
-    /// } else {
-    ///     assert_eq!(numbers, [5, 65000]);
-    /// }
-    /// ```
-    fn from_slice_u64(numbers: &mut [u64]);
-
-    /// Converts the given slice of unsigned 128 bit integers to a particular
-    /// endianness.
-    ///
-    /// If the endianness matches the endianness of the host platform, then
-    /// this is a no-op.
-    ///
-    /// # Examples
-    ///
-    /// Convert the host platform's endianness to big-endian:
-    ///
-    /// ```rust
-    /// #![feature(i128_type)]
-    ///
-    /// use byteorder::{ByteOrder, BigEndian};
-    ///
-    /// let mut numbers = [5, 65000];
-    /// BigEndian::from_slice_u128(&mut numbers);
-    /// if cfg!(target_endian = "little") {
-    ///     assert_eq!(numbers, [5u128.swap_bytes(), 65000u128.swap_bytes()]);
-    /// } else {
-    ///     assert_eq!(numbers, [5, 65000]);
-    /// }
-    /// ```
-    #[cfg(feature = "i128")]
-    fn from_slice_u128(numbers: &mut [u128]);
-
-    /// Converts the given slice of signed 16 bit integers to a particular
-    /// endianness.
-    ///
-    /// If the endianness matches the endianness of the host platform, then
-    /// this is a no-op.
-    ///
-    /// # Examples
-    ///
-    /// Convert the host platform's endianness to big-endian:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, BigEndian};
-    ///
-    /// let mut numbers = [5, 65000];
-    /// BigEndian::from_slice_i16(&mut numbers);
-    /// if cfg!(target_endian = "little") {
-    ///     assert_eq!(numbers, [5i16.swap_bytes(), 65000i16.swap_bytes()]);
-    /// } else {
-    ///     assert_eq!(numbers, [5, 65000]);
-    /// }
-    /// ```
-    #[inline]
-    fn from_slice_i16(numbers: &mut [i16]) {
-        Self::from_slice_u16(unsafe { transmute(numbers) });
-    }
-
-    /// Converts the given slice of signed 32 bit integers to a particular
-    /// endianness.
-    ///
-    /// If the endianness matches the endianness of the host platform, then
-    /// this is a no-op.
-    ///
-    /// # Examples
-    ///
-    /// Convert the host platform's endianness to big-endian:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, BigEndian};
-    ///
-    /// let mut numbers = [5, 65000];
-    /// BigEndian::from_slice_i32(&mut numbers);
-    /// if cfg!(target_endian = "little") {
-    ///     assert_eq!(numbers, [5i32.swap_bytes(), 65000i32.swap_bytes()]);
-    /// } else {
-    ///     assert_eq!(numbers, [5, 65000]);
-    /// }
-    /// ```
-    #[inline]
-    fn from_slice_i32(numbers: &mut [i32]) {
-        Self::from_slice_u32(unsafe { transmute(numbers) });
-    }
-
-    /// Converts the given slice of signed 64 bit integers to a particular
-    /// endianness.
-    ///
-    /// If the endianness matches the endianness of the host platform, then
-    /// this is a no-op.
-    ///
-    /// # Examples
-    ///
-    /// Convert the host platform's endianness to big-endian:
-    ///
-    /// ```rust
-    /// use byteorder::{ByteOrder, BigEndian};
-    ///
-    /// let mut numbers = [5, 65000];
-    /// BigEndian::from_slice_i64(&mut numbers);
-    /// if cfg!(target_endian = "little") {
-    ///     assert_eq!(numbers, [5i64.swap_bytes(), 65000i64.swap_bytes()]);
-    /// } else {
-    ///     assert_eq!(numbers, [5, 65000]);
-    /// }
-    /// ```
-    #[inline]
-    fn from_slice_i64(numbers: &mut [i64]) {
-        Self::from_slice_u64(unsafe { transmute(numbers) });
-    }
-
-    /// Converts the given slice of signed 128 bit integers to a particular
-    /// endianness.
-    ///
-    /// If the endianness matches the endianness of the host platform, then
-    /// this is a no-op.
-    ///
-    /// # Examples
-    ///
-    /// Convert the host platform's endianness to big-endian:
-    ///
-    /// ```rust
-    /// #![feature(i128_type)]
-    ///
-    /// use byteorder::{ByteOrder, BigEndian};
-    ///
-    /// let mut numbers = [5, 65000];
-    /// BigEndian::from_slice_i128(&mut numbers);
-    /// if cfg!(target_endian = "little") {
-    ///     assert_eq!(numbers, [5i128.swap_bytes(), 65000i128.swap_bytes()]);
-    /// } else {
-    ///     assert_eq!(numbers, [5, 65000]);
-    /// }
-    /// ```
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn from_slice_i128(numbers: &mut [i128]) {
-        Self::from_slice_u128(unsafe { transmute(numbers) });
-    }
-
-    /// Converts the given slice of IEEE754 single-precision (4 bytes) floating
-    /// point numbers to a particular endianness.
-    ///
-    /// If the endianness matches the endianness of the host platform, then
-    /// this is a no-op.
-    ///
-    /// Note that the results of this operation are guaranteed to be defined.
-    /// In particular, this method may replace signaling NaN values with
-    /// quiet NaN values.
-    fn from_slice_f32(numbers: &mut [f32]);
-
-    /// Converts the given slice of IEEE754 double-precision (8 bytes) floating
-    /// point numbers to a particular endianness.
-    ///
-    /// If the endianness matches the endianness of the host platform, then
-    /// this is a no-op.
-    ///
-    /// Note that the results of this operation are guaranteed to be defined.
-    /// In particular, this method may replace signaling NaN values with
-    /// quiet NaN values.
-    fn from_slice_f64(numbers: &mut [f64]);
 }
 
 /// Defines big-endian serialization.
 ///
 /// Note that this type has no value constructor. It is used purely at the
 /// type level.
-///
-/// # Examples
-///
-/// Write and read `u32` numbers in big endian order:
-///
-/// ```rust
-/// use byteorder::{ByteOrder, BigEndian};
-///
-/// let mut buf = [0; 4];
-/// BigEndian::write_u32(&mut buf, 1_000_000);
-/// assert_eq!(1_000_000, BigEndian::read_u32(&buf));
-/// ```
 #[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
 pub enum BigEndian {}
 
 impl Default for BigEndian {
     fn default() -> BigEndian {
-        panic!("BigEndian default")
+        unreachable!()
     }
 }
 
-/// A type alias for `BigEndian`.
-pub type BE = BigEndian;
-
 /// Defines little-endian serialization.
 ///
 /// Note that this type has no value constructor. It is used purely at the
 /// type level.
-///
-/// # Examples
-///
-/// Write and read `u32` numbers in little endian order:
-///
-/// ```rust
-/// use byteorder::{ByteOrder, LittleEndian};
-///
-/// let mut buf = [0; 4];
-/// LittleEndian::write_u32(&mut buf, 1_000_000);
-/// assert_eq!(1_000_000, LittleEndian::read_u32(&buf));
-/// ```
 #[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
 pub enum LittleEndian {}
 
 impl Default for LittleEndian {
     fn default() -> LittleEndian {
-        panic!("LittleEndian default")
+        unreachable!()
     }
 }
 
-/// A type alias for `LittleEndian`.
-pub type LE = LittleEndian;
-
 /// Defines network byte order serialization.
 ///
 /// Network byte order is defined by [RFC 1700][1] to be big-endian, and is
 /// referred to in several protocol specifications.  This type is an alias of
 /// BigEndian.
 ///
 /// [1]: https://tools.ietf.org/html/rfc1700
 ///
 /// Note that this type has no value constructor. It is used purely at the
 /// type level.
-///
-/// # Examples
-///
-/// Write and read `i16` numbers in big endian order:
-///
-/// ```rust
-/// use byteorder::{ByteOrder, NetworkEndian, BigEndian};
-///
-/// let mut buf = [0; 2];
-/// BigEndian::write_i16(&mut buf, -50_000);
-/// assert_eq!(-50_000, NetworkEndian::read_i16(&buf));
-/// ```
 pub type NetworkEndian = BigEndian;
 
 /// Defines system native-endian serialization.
 ///
 /// Note that this type has no value constructor. It is used purely at the
 /// type level.
 #[cfg(target_endian = "little")]
 pub type NativeEndian = LittleEndian;
@@ -1723,266 +332,71 @@ macro_rules! write_num_bytes {
         unsafe {
             // N.B. https://github.com/rust-lang/rust/issues/22776
             let bytes = transmute::<_, [u8; $size]>($n.$which());
             copy_nonoverlapping((&bytes).as_ptr(), $dst.as_mut_ptr(), $size);
         }
     });
 }
 
-macro_rules! read_slice {
-    ($src:expr, $dst:expr, $size:expr, $which:ident) => {{
-        assert_eq!($src.len(), $size * $dst.len());
-
-        unsafe {
-            copy_nonoverlapping(
-                $src.as_ptr(),
-                $dst.as_mut_ptr() as *mut u8,
-                $src.len());
-        }
-        for v in $dst.iter_mut() {
-            *v = v.$which();
-        }
-    }};
-}
-
-macro_rules! write_slice_native {
-    ($src:expr, $dst:expr, $ty:ty, $size:expr) => {{
-        assert!($size == ::core::mem::size_of::<$ty>());
-        assert_eq!($size * $src.len(), $dst.len());
-
-        unsafe {
-            copy_nonoverlapping(
-                $src.as_ptr() as *const u8,
-                $dst.as_mut_ptr(),
-                $dst.len());
-        }
-    }};
-}
-
-macro_rules! write_slice {
-    ($src:expr, $dst:expr, $ty:ty, $size:expr, $write:expr) => ({
-        assert!($size == ::core::mem::size_of::<$ty>());
-        assert_eq!($size * $src.len(), $dst.len());
-
-        for (&n, chunk) in $src.iter().zip($dst.chunks_mut($size)) {
-            $write(chunk, n);
-        }
-    });
-}
-
 impl ByteOrder for BigEndian {
     #[inline]
     fn read_u16(buf: &[u8]) -> u16 {
         read_num_bytes!(u16, 2, buf, to_be)
     }
 
     #[inline]
     fn read_u32(buf: &[u8]) -> u32 {
         read_num_bytes!(u32, 4, buf, to_be)
     }
 
     #[inline]
     fn read_u64(buf: &[u8]) -> u64 {
         read_num_bytes!(u64, 8, buf, to_be)
     }
 
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn read_u128(buf: &[u8]) -> u128 {
-        read_num_bytes!(u128, 16, buf, to_be)
-    }
-
     #[inline]
     fn read_uint(buf: &[u8], nbytes: usize) -> u64 {
         assert!(1 <= nbytes && nbytes <= 8 && nbytes <= buf.len());
         let mut out = [0u8; 8];
         let ptr_out = out.as_mut_ptr();
         unsafe {
             copy_nonoverlapping(
                 buf.as_ptr(), ptr_out.offset((8 - nbytes) as isize), nbytes);
             (*(ptr_out as *const u64)).to_be()
         }
     }
 
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn read_uint128(buf: &[u8], nbytes: usize) -> u128 {
-        assert!(1 <= nbytes && nbytes <= 16 && nbytes <= buf.len());
-        let mut out = [0u8; 16];
-        let ptr_out = out.as_mut_ptr();
-        unsafe {
-            copy_nonoverlapping(
-                buf.as_ptr(), ptr_out.offset((16 - nbytes) as isize), nbytes);
-            (*(ptr_out as *const u128)).to_be()
-        }
-    }
-
     #[inline]
     fn write_u16(buf: &mut [u8], n: u16) {
         write_num_bytes!(u16, 2, n, buf, to_be);
     }
 
     #[inline]
     fn write_u32(buf: &mut [u8], n: u32) {
         write_num_bytes!(u32, 4, n, buf, to_be);
     }
 
     #[inline]
     fn write_u64(buf: &mut [u8], n: u64) {
         write_num_bytes!(u64, 8, n, buf, to_be);
     }
 
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn write_u128(buf: &mut [u8], n: u128) {
-        write_num_bytes!(u128, 16, n, buf, to_be);
-    }
-
     #[inline]
     fn write_uint(buf: &mut [u8], n: u64, nbytes: usize) {
         assert!(pack_size(n) <= nbytes && nbytes <= 8);
         assert!(nbytes <= buf.len());
         unsafe {
             let bytes: [u8; 8] = transmute(n.to_be());
             copy_nonoverlapping(
                 bytes.as_ptr().offset((8 - nbytes) as isize),
                 buf.as_mut_ptr(),
                 nbytes);
         }
     }
-
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn write_uint128(buf: &mut [u8], n: u128, nbytes: usize) {
-        assert!(pack_size128(n) <= nbytes && nbytes <= 16);
-        assert!(nbytes <= buf.len());
-        unsafe {
-            let bytes: [u8; 16] = transmute(n.to_be());
-            copy_nonoverlapping(
-                bytes.as_ptr().offset((16 - nbytes) as isize),
-                buf.as_mut_ptr(),
-                nbytes);
-        }
-    }
-
-    #[inline]
-    fn read_u16_into(src: &[u8], dst: &mut [u16]) {
-        read_slice!(src, dst, 2, to_be);
-    }
-
-    #[inline]
-    fn read_u32_into(src: &[u8], dst: &mut [u32]) {
-        read_slice!(src, dst, 4, to_be);
-    }
-
-    #[inline]
-    fn read_u64_into(src: &[u8], dst: &mut [u64]) {
-        read_slice!(src, dst, 8, to_be);
-    }
-
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn read_u128_into(src: &[u8], dst: &mut [u128]) {
-        read_slice!(src, dst, 16, to_be);
-    }
-
-    #[inline]
-    fn write_u16_into(src: &[u16], dst: &mut [u8]) {
-        if cfg!(target_endian = "big") {
-            write_slice_native!(src, dst, u16, 2);
-        } else {
-            write_slice!(src, dst, u16, 2, Self::write_u16);
-        }
-    }
-
-    #[inline]
-    fn write_u32_into(src: &[u32], dst: &mut [u8]) {
-        if cfg!(target_endian = "big") {
-            write_slice_native!(src, dst, u32, 4);
-        } else {
-            write_slice!(src, dst, u32, 4, Self::write_u32);
-        }
-    }
-
-    #[inline]
-    fn write_u64_into(src: &[u64], dst: &mut [u8]) {
-        if cfg!(target_endian = "big") {
-            write_slice_native!(src, dst, u64, 8);
-        } else {
-            write_slice!(src, dst, u64, 8, Self::write_u64);
-        }
-    }
-
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn write_u128_into(src: &[u128], dst: &mut [u8]) {
-        if cfg!(target_endian = "big") {
-            write_slice_native!(src, dst, u128, 16);
-        } else {
-            write_slice!(src, dst, u128, 16, Self::write_u128);
-        }
-    }
-
-    #[inline]
-    fn from_slice_u16(numbers: &mut [u16]) {
-        if cfg!(target_endian = "little") {
-            for n in numbers {
-                *n = n.to_be();
-            }
-        }
-    }
-
-    #[inline]
-    fn from_slice_u32(numbers: &mut [u32]) {
-        if cfg!(target_endian = "little") {
-            for n in numbers {
-                *n = n.to_be();
-            }
-        }
-    }
-
-    #[inline]
-    fn from_slice_u64(numbers: &mut [u64]) {
-        if cfg!(target_endian = "little") {
-            for n in numbers {
-                *n = n.to_be();
-            }
-        }
-    }
-
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn from_slice_u128(numbers: &mut [u128]) {
-        if cfg!(target_endian = "little") {
-            for n in numbers {
-                *n = n.to_be();
-            }
-        }
-    }
-
-    #[inline]
-    fn from_slice_f32(numbers: &mut [f32]) {
-        if cfg!(target_endian = "little") {
-            for n in numbers {
-                let int: u32 = unsafe { transmute(*n) };
-                *n = safe_u32_bits_to_f32(int.to_be());
-            }
-        }
-    }
-
-    #[inline]
-    fn from_slice_f64(numbers: &mut [f64]) {
-        if cfg!(target_endian = "little") {
-            for n in numbers {
-                let int: u64 = unsafe { transmute(*n) };
-                *n = safe_u64_bits_to_f64(int.to_be());
-            }
-        }
-    }
 }
 
 impl ByteOrder for LittleEndian {
     #[inline]
     fn read_u16(buf: &[u8]) -> u16 {
         read_num_bytes!(u16, 2, buf, to_le)
     }
 
@@ -1991,538 +405,182 @@ impl ByteOrder for LittleEndian {
         read_num_bytes!(u32, 4, buf, to_le)
     }
 
     #[inline]
     fn read_u64(buf: &[u8]) -> u64 {
         read_num_bytes!(u64, 8, buf, to_le)
     }
 
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn read_u128(buf: &[u8]) -> u128 {
-        read_num_bytes!(u128, 16, buf, to_le)
-    }
-
     #[inline]
     fn read_uint(buf: &[u8], nbytes: usize) -> u64 {
         assert!(1 <= nbytes && nbytes <= 8 && nbytes <= buf.len());
         let mut out = [0u8; 8];
         let ptr_out = out.as_mut_ptr();
         unsafe {
             copy_nonoverlapping(buf.as_ptr(), ptr_out, nbytes);
             (*(ptr_out as *const u64)).to_le()
         }
     }
 
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn read_uint128(buf: &[u8], nbytes: usize) -> u128 {
-        assert!(1 <= nbytes && nbytes <= 16 && nbytes <= buf.len());
-        let mut out = [0u8; 16];
-        let ptr_out = out.as_mut_ptr();
-        unsafe {
-            copy_nonoverlapping(buf.as_ptr(), ptr_out, nbytes);
-            (*(ptr_out as *const u128)).to_le()
-        }
-    }
-
     #[inline]
     fn write_u16(buf: &mut [u8], n: u16) {
         write_num_bytes!(u16, 2, n, buf, to_le);
     }
 
     #[inline]
     fn write_u32(buf: &mut [u8], n: u32) {
         write_num_bytes!(u32, 4, n, buf, to_le);
     }
 
     #[inline]
     fn write_u64(buf: &mut [u8], n: u64) {
         write_num_bytes!(u64, 8, n, buf, to_le);
     }
 
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn write_u128(buf: &mut [u8], n: u128) {
-        write_num_bytes!(u128, 16, n, buf, to_le);
-    }
-
     #[inline]
     fn write_uint(buf: &mut [u8], n: u64, nbytes: usize) {
         assert!(pack_size(n as u64) <= nbytes && nbytes <= 8);
         assert!(nbytes <= buf.len());
         unsafe {
             let bytes: [u8; 8] = transmute(n.to_le());
             copy_nonoverlapping(bytes.as_ptr(), buf.as_mut_ptr(), nbytes);
         }
     }
-
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn write_uint128(buf: &mut [u8], n: u128, nbytes: usize) {
-        assert!(pack_size128(n as u128) <= nbytes && nbytes <= 16);
-        assert!(nbytes <= buf.len());
-        unsafe {
-            let bytes: [u8; 16] = transmute(n.to_le());
-            copy_nonoverlapping(bytes.as_ptr(), buf.as_mut_ptr(), nbytes);
-        }
-    }
-
-    #[inline]
-    fn read_u16_into(src: &[u8], dst: &mut [u16]) {
-        read_slice!(src, dst, 2, to_le);
-    }
-
-    #[inline]
-    fn read_u32_into(src: &[u8], dst: &mut [u32]) {
-        read_slice!(src, dst, 4, to_le);
-    }
-
-    #[inline]
-    fn read_u64_into(src: &[u8], dst: &mut [u64]) {
-        read_slice!(src, dst, 8, to_le);
-    }
-
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn read_u128_into(src: &[u8], dst: &mut [u128]) {
-        read_slice!(src, dst, 16, to_le);
-    }
-
-    #[inline]
-    fn write_u16_into(src: &[u16], dst: &mut [u8]) {
-        if cfg!(target_endian = "little") {
-            write_slice_native!(src, dst, u16, 2);
-        } else {
-            write_slice!(src, dst, u16, 2, Self::write_u16);
-        }
-    }
-
-    #[inline]
-    fn write_u32_into(src: &[u32], dst: &mut [u8]) {
-        if cfg!(target_endian = "little") {
-            write_slice_native!(src, dst, u32, 4);
-        } else {
-            write_slice!(src, dst, u32, 4, Self::write_u32);
-        }
-    }
-
-    #[inline]
-    fn write_u64_into(src: &[u64], dst: &mut [u8]) {
-        if cfg!(target_endian = "little") {
-            write_slice_native!(src, dst, u64, 8);
-        } else {
-            write_slice!(src, dst, u64, 8, Self::write_u64);
-        }
-    }
-
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn write_u128_into(src: &[u128], dst: &mut [u8]) {
-        if cfg!(target_endian = "little") {
-            write_slice_native!(src, dst, u128, 16);
-        } else {
-            write_slice!(src, dst, u128, 16, Self::write_u128);
-        }
-    }
-
-    #[inline]
-    fn from_slice_u16(numbers: &mut [u16]) {
-        if cfg!(target_endian = "big") {
-            for n in numbers {
-                *n = n.to_le();
-            }
-        }
-    }
-
-    #[inline]
-    fn from_slice_u32(numbers: &mut [u32]) {
-        if cfg!(target_endian = "big") {
-            for n in numbers {
-                *n = n.to_le();
-            }
-        }
-    }
-
-    #[inline]
-    fn from_slice_u64(numbers: &mut [u64]) {
-        if cfg!(target_endian = "big") {
-            for n in numbers {
-                *n = n.to_le();
-            }
-        }
-    }
-
-    #[cfg(feature = "i128")]
-    #[inline]
-    fn from_slice_u128(numbers: &mut [u128]) {
-        if cfg!(target_endian = "big") {
-            for n in numbers {
-                *n = n.to_le();
-            }
-        }
-    }
-
-    #[inline]
-    fn from_slice_f32(numbers: &mut [f32]) {
-        if cfg!(target_endian = "big") {
-            for n in numbers {
-                let int: u32 = unsafe { transmute(*n) };
-                *n = safe_u32_bits_to_f32(int.to_le());
-            }
-        }
-    }
-
-    #[inline]
-    fn from_slice_f64(numbers: &mut [f64]) {
-        if cfg!(target_endian = "big") {
-            for n in numbers {
-                let int: u64 = unsafe { transmute(*n) };
-                *n = safe_u64_bits_to_f64(int.to_le());
-            }
-        }
-    }
-}
-
-#[inline]
-fn safe_u32_bits_to_f32(u: u32) -> f32 {
-    use core::f32::NAN;
-
-    const EXP_MASK: u32 = 0x7F800000;
-    const FRACT_MASK: u32 = 0x007FFFFF;
-
-    if u & EXP_MASK == EXP_MASK && u & FRACT_MASK != 0 {
-        // While IEEE 754-2008 specifies encodings for quiet NaNs and
-        // signaling ones, certains MIPS and PA-RISC CPUs treat signaling
-        // NaNs differently. Therefore, to be safe, we pass a known quiet
-        // NaN if u is any kind of NaN. The check above only assumes
-        // IEEE 754-1985 to be valid.
-        NAN
-    } else {
-        unsafe { transmute(u) }
-    }
-}
-
-#[inline]
-fn safe_u64_bits_to_f64(u: u64) -> f64 {
-    use core::f64::NAN;
-
-    const EXP_MASK: u64 = 0x7FF0000000000000;
-    const FRACT_MASK: u64 = 0x000FFFFFFFFFFFFF;
-
-    if u & EXP_MASK == EXP_MASK && u & FRACT_MASK != 0 {
-        // While IEEE 754-2008 specifies encodings for quiet NaNs and
-        // signaling ones, certains MIPS and PA-RISC CPUs treat signaling
-        // NaNs differently. Therefore, to be safe, we pass a known quiet
-        // NaN if u is any kind of NaN. The check above only assumes
-        // IEEE 754-1985 to be valid.
-        NAN
-    } else {
-        unsafe { transmute(u) }
-    }
 }
 
 #[cfg(test)]
 mod test {
     extern crate quickcheck;
     extern crate rand;
 
+    use self::rand::thread_rng;
     use self::quickcheck::{QuickCheck, StdGen, Testable};
-    use self::rand::thread_rng;
-    #[cfg(feature = "i128")] use self::quickcheck::{Arbitrary, Gen};
-
-    pub const U24_MAX: u32 = 16_777_215;
-    pub const I24_MAX: i32 = 8_388_607;
 
     pub const U64_MAX: u64 = ::core::u64::MAX;
     pub const I64_MAX: u64 = ::core::i64::MAX as u64;
 
-    macro_rules! calc_max {
-        ($max:expr, $bytes:expr) => { calc_max!($max, $bytes, 8) };
-        ($max:expr, $bytes:expr, $maxbytes:expr) => {
-            ($max - 1) >> (8 * ($maxbytes - $bytes))
-        };
-    }
-
-    #[derive(Clone, Debug)]
-    pub struct Wi128<T>(pub T);
-
-    #[cfg(feature = "i128")]
-    impl<T: Clone> Wi128<T> {
-        pub fn clone(&self) -> T {
-            self.0.clone()
-        }
-    }
-
-    impl<T: PartialEq> PartialEq<T> for Wi128<T> {
-        fn eq(&self, other: &T) -> bool {
-            self.0.eq(other)
-        }
-    }
-
-    #[cfg(feature = "i128")]
-    impl Arbitrary for Wi128<u128> {
-        fn arbitrary<G: Gen>(gen: &mut G) -> Wi128<u128> {
-            let max = calc_max!(::core::u128::MAX, gen.size(), 16);
-            let output =
-                (gen.gen::<u64>() as u128) |
-                ((gen.gen::<u64>() as u128) << 64);
-            Wi128(output & (max - 1))
-        }
-    }
-
-    #[cfg(feature = "i128")]
-    impl Arbitrary for Wi128<i128> {
-        fn arbitrary<G: Gen>(gen: &mut G) -> Wi128<i128> {
-            let max = calc_max!(::core::i128::MAX, gen.size(), 16);
-            let output =
-                (gen.gen::<i64>() as i128) |
-                ((gen.gen::<i64>() as i128) << 64);
-            Wi128(output & (max - 1))
-        }
-    }
-
     pub fn qc_sized<A: Testable>(f: A, size: u64) {
         QuickCheck::new()
             .gen(StdGen::new(thread_rng(), size as usize))
             .tests(1_00)
             .max_tests(10_000)
             .quickcheck(f);
     }
 
     macro_rules! qc_byte_order {
-        ($name:ident, $ty_int:ty, $max:expr,
+        ($name:ident, $ty_int:ident, $max:expr,
          $bytes:expr, $read:ident, $write:ident) => (
             mod $name {
                 use {BigEndian, ByteOrder, NativeEndian, LittleEndian};
-                #[allow(unused_imports)] use super::{ qc_sized, Wi128 };
+                use super::qc_sized;
 
                 #[test]
                 fn big_endian() {
+                    let max = ($max - 1) >> (8 * (8 - $bytes));
                     fn prop(n: $ty_int) -> bool {
-                        let mut buf = [0; 16];
-                        BigEndian::$write(&mut buf, n.clone(), $bytes);
+                        let mut buf = [0; 8];
+                        BigEndian::$write(&mut buf, n, $bytes);
                         n == BigEndian::$read(&mut buf[..$bytes], $bytes)
                     }
-                    qc_sized(prop as fn($ty_int) -> bool, $max);
+                    qc_sized(prop as fn($ty_int) -> bool, max);
                 }
 
                 #[test]
                 fn little_endian() {
+                    let max = ($max - 1) >> (8 * (8 - $bytes));
                     fn prop(n: $ty_int) -> bool {
-                        let mut buf = [0; 16];
-                        LittleEndian::$write(&mut buf, n.clone(), $bytes);
+                        let mut buf = [0; 8];
+                        LittleEndian::$write(&mut buf, n, $bytes);
                         n == LittleEndian::$read(&mut buf[..$bytes], $bytes)
                     }
-                    qc_sized(prop as fn($ty_int) -> bool, $max);
+                    qc_sized(prop as fn($ty_int) -> bool, max);
                 }
 
                 #[test]
                 fn native_endian() {
+                    let max = ($max - 1) >> (8 * (8 - $bytes));
                     fn prop(n: $ty_int) -> bool {
-                        let mut buf = [0; 16];
-                        NativeEndian::$write(&mut buf, n.clone(), $bytes);
+                        let mut buf = [0; 8];
+                        NativeEndian::$write(&mut buf, n, $bytes);
                         n == NativeEndian::$read(&mut buf[..$bytes], $bytes)
                     }
-                    qc_sized(prop as fn($ty_int) -> bool, $max);
+                    qc_sized(prop as fn($ty_int) -> bool, max);
                 }
             }
         );
-        ($name:ident, $ty_int:ty, $max:expr,
+        ($name:ident, $ty_int:ident, $max:expr,
          $read:ident, $write:ident) => (
             mod $name {
                 use core::mem::size_of;
                 use {BigEndian, ByteOrder, NativeEndian, LittleEndian};
-                #[allow(unused_imports)] use super::{ qc_sized, Wi128 };
+                use super::qc_sized;
 
                 #[test]
                 fn big_endian() {
                     fn prop(n: $ty_int) -> bool {
                         let bytes = size_of::<$ty_int>();
-                        let mut buf = [0; 16];
-                        BigEndian::$write(&mut buf[16 - bytes..], n.clone());
-                        n == BigEndian::$read(&mut buf[16 - bytes..])
+                        let mut buf = [0; 8];
+                        BigEndian::$write(&mut buf[8 - bytes..], n);
+                        n == BigEndian::$read(&mut buf[8 - bytes..])
                     }
                     qc_sized(prop as fn($ty_int) -> bool, $max - 1);
                 }
 
                 #[test]
                 fn little_endian() {
                     fn prop(n: $ty_int) -> bool {
                         let bytes = size_of::<$ty_int>();
-                        let mut buf = [0; 16];
-                        LittleEndian::$write(&mut buf[..bytes], n.clone());
+                        let mut buf = [0; 8];
+                        LittleEndian::$write(&mut buf[..bytes], n);
                         n == LittleEndian::$read(&mut buf[..bytes])
                     }
                     qc_sized(prop as fn($ty_int) -> bool, $max - 1);
                 }
 
                 #[test]
                 fn native_endian() {
                     fn prop(n: $ty_int) -> bool {
                         let bytes = size_of::<$ty_int>();
-                        let mut buf = [0; 16];
-                        NativeEndian::$write(&mut buf[..bytes], n.clone());
+                        let mut buf = [0; 8];
+                        NativeEndian::$write(&mut buf[..bytes], n);
                         n == NativeEndian::$read(&mut buf[..bytes])
                     }
                     qc_sized(prop as fn($ty_int) -> bool, $max - 1);
                 }
             }
         );
     }
 
     qc_byte_order!(prop_u16, u16, ::core::u16::MAX as u64, read_u16, write_u16);
     qc_byte_order!(prop_i16, i16, ::core::i16::MAX as u64, read_i16, write_i16);
-    qc_byte_order!(prop_u24, u32, ::test::U24_MAX as u64, read_u24, write_u24);
-    qc_byte_order!(prop_i24, i32, ::test::I24_MAX as u64, read_i24, write_i24);
     qc_byte_order!(prop_u32, u32, ::core::u32::MAX as u64, read_u32, write_u32);
     qc_byte_order!(prop_i32, i32, ::core::i32::MAX as u64, read_i32, write_i32);
     qc_byte_order!(prop_u64, u64, ::core::u64::MAX as u64, read_u64, write_u64);
     qc_byte_order!(prop_i64, i64, ::core::i64::MAX as u64, read_i64, write_i64);
     qc_byte_order!(prop_f32, f32, ::core::u64::MAX as u64, read_f32, write_f32);
     qc_byte_order!(prop_f64, f64, ::core::i64::MAX as u64, read_f64, write_f64);
 
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_u128, Wi128<u128>, 16 + 1, read_u128, write_u128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_i128, Wi128<i128>, 16 + 1, read_i128, write_i128);
-
-    qc_byte_order!(prop_uint_1,
-        u64, calc_max!(super::U64_MAX, 1), 1, read_uint, write_uint);
-    qc_byte_order!(prop_uint_2,
-        u64, calc_max!(super::U64_MAX, 2), 2, read_uint, write_uint);
-    qc_byte_order!(prop_uint_3,
-        u64, calc_max!(super::U64_MAX, 3), 3, read_uint, write_uint);
-    qc_byte_order!(prop_uint_4,
-        u64, calc_max!(super::U64_MAX, 4), 4, read_uint, write_uint);
-    qc_byte_order!(prop_uint_5,
-        u64, calc_max!(super::U64_MAX, 5), 5, read_uint, write_uint);
-    qc_byte_order!(prop_uint_6,
-        u64, calc_max!(super::U64_MAX, 6), 6, read_uint, write_uint);
-    qc_byte_order!(prop_uint_7,
-        u64, calc_max!(super::U64_MAX, 7), 7, read_uint, write_uint);
-    qc_byte_order!(prop_uint_8,
-        u64, calc_max!(super::U64_MAX, 8), 8, read_uint, write_uint);
+    qc_byte_order!(prop_uint_1, u64, super::U64_MAX, 1, read_uint, write_uint);
+    qc_byte_order!(prop_uint_2, u64, super::U64_MAX, 2, read_uint, write_uint);
+    qc_byte_order!(prop_uint_3, u64, super::U64_MAX, 3, read_uint, write_uint);
+    qc_byte_order!(prop_uint_4, u64, super::U64_MAX, 4, read_uint, write_uint);
+    qc_byte_order!(prop_uint_5, u64, super::U64_MAX, 5, read_uint, write_uint);
+    qc_byte_order!(prop_uint_6, u64, super::U64_MAX, 6, read_uint, write_uint);
+    qc_byte_order!(prop_uint_7, u64, super::U64_MAX, 7, read_uint, write_uint);
+    qc_byte_order!(prop_uint_8, u64, super::U64_MAX, 8, read_uint, write_uint);
 
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_uint128_1,
-        Wi128<u128>, 1, 1, read_uint128, write_uint128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_uint128_2,
-        Wi128<u128>, 2, 2, read_uint128, write_uint128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_uint128_3,
-        Wi128<u128>, 3, 3, read_uint128, write_uint128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_uint128_4,
-        Wi128<u128>, 4, 4, read_uint128, write_uint128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_uint128_5,
-        Wi128<u128>, 5, 5, read_uint128, write_uint128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_uint128_6,
-        Wi128<u128>, 6, 6, read_uint128, write_uint128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_uint128_7,
-        Wi128<u128>, 7, 7, read_uint128, write_uint128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_uint128_8,
-        Wi128<u128>, 8, 8, read_uint128, write_uint128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_uint128_9,
-        Wi128<u128>, 9, 9, read_uint128, write_uint128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_uint128_10,
-        Wi128<u128>, 10, 10, read_uint128, write_uint128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_uint128_11,
-        Wi128<u128>, 11, 11, read_uint128, write_uint128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_uint128_12,
-        Wi128<u128>, 12, 12, read_uint128, write_uint128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_uint128_13,
-        Wi128<u128>, 13, 13, read_uint128, write_uint128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_uint128_14,
-        Wi128<u128>, 14, 14, read_uint128, write_uint128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_uint128_15,
-        Wi128<u128>, 15, 15, read_uint128, write_uint128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_uint128_16,
-        Wi128<u128>, 16, 16, read_uint128, write_uint128);
-
-    qc_byte_order!(prop_int_1,
-        i64, calc_max!(super::I64_MAX, 1), 1, read_int, write_int);
-    qc_byte_order!(prop_int_2,
-        i64, calc_max!(super::I64_MAX, 2), 2, read_int, write_int);
-    qc_byte_order!(prop_int_3,
-        i64, calc_max!(super::I64_MAX, 3), 3, read_int, write_int);
-    qc_byte_order!(prop_int_4,
-        i64, calc_max!(super::I64_MAX, 4), 4, read_int, write_int);
-    qc_byte_order!(prop_int_5,
-        i64, calc_max!(super::I64_MAX, 5), 5, read_int, write_int);
-    qc_byte_order!(prop_int_6,
-        i64, calc_max!(super::I64_MAX, 6), 6, read_int, write_int);
-    qc_byte_order!(prop_int_7,
-        i64, calc_max!(super::I64_MAX, 7), 7, read_int, write_int);
-    qc_byte_order!(prop_int_8,
-        i64, calc_max!(super::I64_MAX, 8), 8, read_int, write_int);
-
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_int128_1,
-        Wi128<i128>, 1, 1, read_int128, write_int128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_int128_2,
-        Wi128<i128>, 2, 2, read_int128, write_int128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_int128_3,
-        Wi128<i128>, 3, 3, read_int128, write_int128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_int128_4,
-        Wi128<i128>, 4, 4, read_int128, write_int128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_int128_5,
-        Wi128<i128>, 5, 5, read_int128, write_int128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_int128_6,
-        Wi128<i128>, 6, 6, read_int128, write_int128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_int128_7,
-        Wi128<i128>, 7, 7, read_int128, write_int128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_int128_8,
-        Wi128<i128>, 8, 8, read_int128, write_int128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_int128_9,
-        Wi128<i128>, 9, 9, read_int128, write_int128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_int128_10,
-        Wi128<i128>, 10, 10, read_int128, write_int128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_int128_11,
-        Wi128<i128>, 11, 11, read_int128, write_int128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_int128_12,
-        Wi128<i128>, 12, 12, read_int128, write_int128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_int128_13,
-        Wi128<i128>, 13, 13, read_int128, write_int128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_int128_14,
-        Wi128<i128>, 14, 14, read_int128, write_int128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_int128_15,
-        Wi128<i128>, 15, 15, read_int128, write_int128);
-    #[cfg(feature = "i128")]
-    qc_byte_order!(prop_int128_16,
-        Wi128<i128>, 16, 16, read_int128, write_int128);
-
+    qc_byte_order!(prop_int_1, i64, super::I64_MAX, 1, read_int, write_int);
+    qc_byte_order!(prop_int_2, i64, super::I64_MAX, 2, read_int, write_int);
+    qc_byte_order!(prop_int_3, i64, super::I64_MAX, 3, read_int, write_int);
+    qc_byte_order!(prop_int_4, i64, super::I64_MAX, 4, read_int, write_int);
+    qc_byte_order!(prop_int_5, i64, super::I64_MAX, 5, read_int, write_int);
+    qc_byte_order!(prop_int_6, i64, super::I64_MAX, 6, read_int, write_int);
+    qc_byte_order!(prop_int_7, i64, super::I64_MAX, 7, read_int, write_int);
+    qc_byte_order!(prop_int_8, i64, super::I64_MAX, 8, read_int, write_int);
 
     // Test that all of the byte conversion functions panic when given a
     // buffer that is too small.
     //
     // These tests are critical to ensure safety, otherwise we might end up
     // with a buffer overflow.
     macro_rules! too_small {
         ($name:ident, $maximally_small:expr, $zero:expr,
@@ -2604,588 +662,159 @@ mod test {
     too_small!(small_u16, 1, 0, read_u16, write_u16);
     too_small!(small_i16, 1, 0, read_i16, write_i16);
     too_small!(small_u32, 3, 0, read_u32, write_u32);
     too_small!(small_i32, 3, 0, read_i32, write_i32);
     too_small!(small_u64, 7, 0, read_u64, write_u64);
     too_small!(small_i64, 7, 0, read_i64, write_i64);
     too_small!(small_f32, 3, 0.0, read_f32, write_f32);
     too_small!(small_f64, 7, 0.0, read_f64, write_f64);
-    #[cfg(feature = "i128")]
-    too_small!(small_u128, 15, 0, read_u128, write_u128);
-    #[cfg(feature = "i128")]
-    too_small!(small_i128, 15, 0, read_i128, write_i128);
 
     too_small!(small_uint_1, 1, read_uint);
     too_small!(small_uint_2, 2, read_uint);
     too_small!(small_uint_3, 3, read_uint);
     too_small!(small_uint_4, 4, read_uint);
     too_small!(small_uint_5, 5, read_uint);
     too_small!(small_uint_6, 6, read_uint);
     too_small!(small_uint_7, 7, read_uint);
 
-    #[cfg(feature = "i128")]
-    too_small!(small_uint128_1, 1, read_uint128);
-    #[cfg(feature = "i128")]
-    too_small!(small_uint128_2, 2, read_uint128);
-    #[cfg(feature = "i128")]
-    too_small!(small_uint128_3, 3, read_uint128);
-    #[cfg(feature = "i128")]
-    too_small!(small_uint128_4, 4, read_uint128);
-    #[cfg(feature = "i128")]
-    too_small!(small_uint128_5, 5, read_uint128);
-    #[cfg(feature = "i128")]
-    too_small!(small_uint128_6, 6, read_uint128);
-    #[cfg(feature = "i128")]
-    too_small!(small_uint128_7, 7, read_uint128);
-    #[cfg(feature = "i128")]
-    too_small!(small_uint128_8, 8, read_uint128);
-    #[cfg(feature = "i128")]
-    too_small!(small_uint128_9, 9, read_uint128);
-    #[cfg(feature = "i128")]
-    too_small!(small_uint128_10, 10, read_uint128);
-    #[cfg(feature = "i128")]
-    too_small!(small_uint128_11, 11, read_uint128);
-    #[cfg(feature = "i128")]
-    too_small!(small_uint128_12, 12, read_uint128);
-    #[cfg(feature = "i128")]
-    too_small!(small_uint128_13, 13, read_uint128);
-    #[cfg(feature = "i128")]
-    too_small!(small_uint128_14, 14, read_uint128);
-    #[cfg(feature = "i128")]
-    too_small!(small_uint128_15, 15, read_uint128);
-
     too_small!(small_int_1, 1, read_int);
     too_small!(small_int_2, 2, read_int);
     too_small!(small_int_3, 3, read_int);
     too_small!(small_int_4, 4, read_int);
     too_small!(small_int_5, 5, read_int);
     too_small!(small_int_6, 6, read_int);
     too_small!(small_int_7, 7, read_int);
 
-    #[cfg(feature = "i128")]
-    too_small!(small_int128_1, 1, read_int128);
-    #[cfg(feature = "i128")]
-    too_small!(small_int128_2, 2, read_int128);
-    #[cfg(feature = "i128")]
-    too_small!(small_int128_3, 3, read_int128);
-    #[cfg(feature = "i128")]
-    too_small!(small_int128_4, 4, read_int128);
-    #[cfg(feature = "i128")]
-    too_small!(small_int128_5, 5, read_int128);
-    #[cfg(feature = "i128")]
-    too_small!(small_int128_6, 6, read_int128);
-    #[cfg(feature = "i128")]
-    too_small!(small_int128_7, 7, read_int128);
-    #[cfg(feature = "i128")]
-    too_small!(small_int128_8, 8, read_int128);
-    #[cfg(feature = "i128")]
-    too_small!(small_int128_9, 9, read_int128);
-    #[cfg(feature = "i128")]
-    too_small!(small_int128_10, 10, read_int128);
-    #[cfg(feature = "i128")]
-    too_small!(small_int128_11, 11, read_int128);
-    #[cfg(feature = "i128")]
-    too_small!(small_int128_12, 12, read_int128);
-    #[cfg(feature = "i128")]
-    too_small!(small_int128_13, 13, read_int128);
-    #[cfg(feature = "i128")]
-    too_small!(small_int128_14, 14, read_int128);
-    #[cfg(feature = "i128")]
-    too_small!(small_int128_15, 15, read_int128);
-
-    // Test that reading/writing slices enforces the correct lengths.
-    macro_rules! slice_lengths {
-        ($name:ident, $read:ident, $write:ident,
-         $num_bytes:expr, $numbers:expr) => {
-            mod $name {
-                use {ByteOrder, BigEndian, NativeEndian, LittleEndian};
-
-                #[test]
-                #[should_panic]
-                fn read_big_endian() {
-                    let bytes = [0; $num_bytes];
-                    let mut numbers = $numbers;
-                    BigEndian::$read(&bytes, &mut numbers);
-                }
-
-                #[test]
-                #[should_panic]
-                fn read_little_endian() {
-                    let bytes = [0; $num_bytes];
-                    let mut numbers = $numbers;
-                    LittleEndian::$read(&bytes, &mut numbers);
-                }
-
-                #[test]
-                #[should_panic]
-                fn read_native_endian() {
-                    let bytes = [0; $num_bytes];
-                    let mut numbers = $numbers;
-                    NativeEndian::$read(&bytes, &mut numbers);
-                }
-
-                #[test]
-                #[should_panic]
-                fn write_big_endian() {
-                    let mut bytes = [0; $num_bytes];
-                    let numbers = $numbers;
-                    BigEndian::$write(&numbers, &mut bytes);
-                }
-
-                #[test]
-                #[should_panic]
-                fn write_little_endian() {
-                    let mut bytes = [0; $num_bytes];
-                    let numbers = $numbers;
-                    LittleEndian::$write(&numbers, &mut bytes);
-                }
-
-                #[test]
-                #[should_panic]
-                fn write_native_endian() {
-                    let mut bytes = [0; $num_bytes];
-                    let numbers = $numbers;
-                    NativeEndian::$write(&numbers, &mut bytes);
-                }
-            }
-        }
-    }
-
-    slice_lengths!(
-        slice_len_too_small_u16, read_u16_into, write_u16_into, 3, [0, 0]);
-    slice_lengths!(
-        slice_len_too_big_u16, read_u16_into, write_u16_into, 5, [0, 0]);
-    slice_lengths!(
-        slice_len_too_small_i16, read_i16_into, write_i16_into, 3, [0, 0]);
-    slice_lengths!(
-        slice_len_too_big_i16, read_i16_into, write_i16_into, 5, [0, 0]);
-
-    slice_lengths!(
-        slice_len_too_small_u32, read_u32_into, write_u32_into, 7, [0, 0]);
-    slice_lengths!(
-        slice_len_too_big_u32, read_u32_into, write_u32_into, 9, [0, 0]);
-    slice_lengths!(
-        slice_len_too_small_i32, read_i32_into, write_i32_into, 7, [0, 0]);
-    slice_lengths!(
-        slice_len_too_big_i32, read_i32_into, write_i32_into, 9, [0, 0]);
-
-    slice_lengths!(
-        slice_len_too_small_u64, read_u64_into, write_u64_into, 15, [0, 0]);
-    slice_lengths!(
-        slice_len_too_big_u64, read_u64_into, write_u64_into, 17, [0, 0]);
-    slice_lengths!(
-        slice_len_too_small_i64, read_i64_into, write_i64_into, 15, [0, 0]);
-    slice_lengths!(
-        slice_len_too_big_i64, read_i64_into, write_i64_into, 17, [0, 0]);
-
-    #[cfg(feature = "i128")]
-    slice_lengths!(
-        slice_len_too_small_u128, read_u128_into, write_u128_into, 31, [0, 0]);
-    #[cfg(feature = "i128")]
-    slice_lengths!(
-        slice_len_too_big_u128, read_u128_into, write_u128_into, 33, [0, 0]);
-    #[cfg(feature = "i128")]
-    slice_lengths!(
-        slice_len_too_small_i128, read_i128_into, write_i128_into, 31, [0, 0]);
-    #[cfg(feature = "i128")]
-    slice_lengths!(
-        slice_len_too_big_i128, read_i128_into, write_i128_into, 33, [0, 0]);
-
     #[test]
     fn uint_bigger_buffer() {
         use {ByteOrder, LittleEndian};
         let n = LittleEndian::read_uint(&[1, 2, 3, 4, 5, 6, 7, 8], 5);
         assert_eq!(n, 0x0504030201);
     }
-
-    #[test]
-    fn read_snan() {
-        use core::f32;
-        use core::f64;
-        use core::mem::transmute;
-
-        use {ByteOrder, BigEndian, LittleEndian};
-
-        let sf = BigEndian::read_f32(&[0xFF, 0x80, 0x00, 0x01]);
-        let sbits: u32 = unsafe { transmute(sf) };
-        assert_eq!(sbits, unsafe { transmute(f32::NAN) });
-        assert_eq!(sf.classify(), ::core::num::FpCategory::Nan);
-
-        let df = BigEndian::read_f64(&[0x7F, 0xF0, 0, 0, 0, 0, 0, 0x01]);
-        let dbits: u64 = unsafe { ::core::mem::transmute(df) };
-        assert_eq!(dbits, unsafe { transmute(f64::NAN) });
-        assert_eq!(df.classify(), ::core::num::FpCategory::Nan);
-
-        let sf = LittleEndian::read_f32(&[0x01, 0x00, 0x80, 0xFF]);
-        let sbits: u32 = unsafe { transmute(sf) };
-        assert_eq!(sbits, unsafe { transmute(f32::NAN) });
-        assert_eq!(sf.classify(), ::core::num::FpCategory::Nan);
-
-        let df = LittleEndian::read_f64(&[0x01, 0, 0, 0, 0, 0, 0xF0, 0x7F]);
-        let dbits: u64 = unsafe { ::core::mem::transmute(df) };
-        assert_eq!(dbits, unsafe { transmute(f64::NAN) });
-        assert_eq!(df.classify(), ::core::num::FpCategory::Nan);
-    }
 }
 
 #[cfg(test)]
 #[cfg(feature = "std")]
 mod stdtests {
-    extern crate quickcheck;
-    extern crate rand;
-
-    use self::quickcheck::{QuickCheck, StdGen, Testable};
-    use self::rand::thread_rng;
-
-    fn qc_unsized<A: Testable>(f: A) {
-
-        QuickCheck::new()
-            .gen(StdGen::new(thread_rng(), 16))
-            .tests(1_00)
-            .max_tests(10_000)
-            .quickcheck(f);
-    }
-
-    macro_rules! calc_max {
-        ($max:expr, $bytes:expr) => { ($max - 1) >> (8 * (8 - $bytes)) };
-    }
-
     macro_rules! qc_bytes_ext {
-        ($name:ident, $ty_int:ty, $max:expr,
+        ($name:ident, $ty_int:ident, $max:expr,
          $bytes:expr, $read:ident, $write:ident) => (
             mod $name {
                 use std::io::Cursor;
                 use {
                     ReadBytesExt, WriteBytesExt,
                     BigEndian, NativeEndian, LittleEndian,
                 };
-                #[allow(unused_imports)] use test::{qc_sized, Wi128};
+                use test::qc_sized;
 
                 #[test]
                 fn big_endian() {
+                    let max = ($max - 1) >> (8 * (8 - $bytes));
                     fn prop(n: $ty_int) -> bool {
                         let mut wtr = vec![];
-                        wtr.$write::<BigEndian>(n.clone()).unwrap();
+                        wtr.$write::<BigEndian>(n).unwrap();
                         let mut rdr = Vec::new();
-                        rdr.extend(wtr[wtr.len()-$bytes..].iter().map(|&x| x));
+                        rdr.extend(wtr[8 - $bytes..].iter().map(|&x|x));
                         let mut rdr = Cursor::new(rdr);
                         n == rdr.$read::<BigEndian>($bytes).unwrap()
                     }
-                    qc_sized(prop as fn($ty_int) -> bool, $max);
+                    qc_sized(prop as fn($ty_int) -> bool, max);
                 }
 
                 #[test]
                 fn little_endian() {
+                    let max = ($max - 1) >> (8 * (8 - $bytes));
                     fn prop(n: $ty_int) -> bool {
                         let mut wtr = vec![];
-                        wtr.$write::<LittleEndian>(n.clone()).unwrap();
+                        wtr.$write::<LittleEndian>(n).unwrap();
                         let mut rdr = Cursor::new(wtr);
                         n == rdr.$read::<LittleEndian>($bytes).unwrap()
                     }
-                    qc_sized(prop as fn($ty_int) -> bool, $max);
+                    qc_sized(prop as fn($ty_int) -> bool, max);
                 }
 
                 #[test]
                 fn native_endian() {
+                    let max = ($max - 1) >> (8 * (8 - $bytes));
                     fn prop(n: $ty_int) -> bool {
                         let mut wtr = vec![];
-                        wtr.$write::<NativeEndian>(n.clone()).unwrap();
+                        wtr.$write::<NativeEndian>(n).unwrap();
                         let mut rdr = Cursor::new(wtr);
                         n == rdr.$read::<NativeEndian>($bytes).unwrap()
                     }
-                    qc_sized(prop as fn($ty_int) -> bool, $max);
+                    qc_sized(prop as fn($ty_int) -> bool, max);
                 }
             }
         );
-        ($name:ident, $ty_int:ty, $max:expr, $read:ident, $write:ident) => (
+        ($name:ident, $ty_int:ident, $max:expr, $read:ident, $write:ident) => (
             mod $name {
                 use std::io::Cursor;
                 use {
                     ReadBytesExt, WriteBytesExt,
                     BigEndian, NativeEndian, LittleEndian,
                 };
-                #[allow(unused_imports)] use test::{qc_sized, Wi128};
+                use test::qc_sized;
 
                 #[test]
                 fn big_endian() {
                     fn prop(n: $ty_int) -> bool {
                         let mut wtr = vec![];
-                        wtr.$write::<BigEndian>(n.clone()).unwrap();
+                        wtr.$write::<BigEndian>(n).unwrap();
                         let mut rdr = Cursor::new(wtr);
                         n == rdr.$read::<BigEndian>().unwrap()
                     }
                     qc_sized(prop as fn($ty_int) -> bool, $max - 1);
                 }
 
                 #[test]
                 fn little_endian() {
                     fn prop(n: $ty_int) -> bool {
                         let mut wtr = vec![];
-                        wtr.$write::<LittleEndian>(n.clone()).unwrap();
+                        wtr.$write::<LittleEndian>(n).unwrap();
                         let mut rdr = Cursor::new(wtr);
                         n == rdr.$read::<LittleEndian>().unwrap()
                     }
                     qc_sized(prop as fn($ty_int) -> bool, $max - 1);
                 }
 
                 #[test]
                 fn native_endian() {
                     fn prop(n: $ty_int) -> bool {
                         let mut wtr = vec![];
-                        wtr.$write::<NativeEndian>(n.clone()).unwrap();
+                        wtr.$write::<NativeEndian>(n).unwrap();
                         let mut rdr = Cursor::new(wtr);
                         n == rdr.$read::<NativeEndian>().unwrap()
                     }
                     qc_sized(prop as fn($ty_int) -> bool, $max - 1);
                 }
             }
         );
     }
 
-    qc_bytes_ext!(prop_ext_u16,
-        u16, ::std::u16::MAX as u64, read_u16, write_u16);
-    qc_bytes_ext!(prop_ext_i16,
-        i16, ::std::i16::MAX as u64, read_i16, write_i16);
-    qc_bytes_ext!(prop_ext_u32,
-        u32, ::std::u32::MAX as u64, read_u32, write_u32);
-    qc_bytes_ext!(prop_ext_i32,
-        i32, ::std::i32::MAX as u64, read_i32, write_i32);
-    qc_bytes_ext!(prop_ext_u64,
-        u64, ::std::u64::MAX as u64, read_u64, write_u64);
-    qc_bytes_ext!(prop_ext_i64,
-        i64, ::std::i64::MAX as u64, read_i64, write_i64);
-    qc_bytes_ext!(prop_ext_f32,
-        f32, ::std::u64::MAX as u64, read_f32, write_f32);
-    qc_bytes_ext!(prop_ext_f64,
-        f64, ::std::i64::MAX as u64, read_f64, write_f64);
-
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_u128, Wi128<u128>, 16 + 1, read_u128, write_u128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_i128, Wi128<i128>, 16 + 1, read_i128, write_i128);
-
-    qc_bytes_ext!(prop_ext_uint_1,
-        u64, calc_max!(::test::U64_MAX, 1), 1, read_uint, write_u64);
-    qc_bytes_ext!(prop_ext_uint_2,
-        u64, calc_max!(::test::U64_MAX, 2), 2, read_uint, write_u64);
-    qc_bytes_ext!(prop_ext_uint_3,
-        u64, calc_max!(::test::U64_MAX, 3), 3, read_uint, write_u64);
-    qc_bytes_ext!(prop_ext_uint_4,
-        u64, calc_max!(::test::U64_MAX, 4), 4, read_uint, write_u64);
-    qc_bytes_ext!(prop_ext_uint_5,
-        u64, calc_max!(::test::U64_MAX, 5), 5, read_uint, write_u64);
-    qc_bytes_ext!(prop_ext_uint_6,
-        u64, calc_max!(::test::U64_MAX, 6), 6, read_uint, write_u64);
-    qc_bytes_ext!(prop_ext_uint_7,
-        u64, calc_max!(::test::U64_MAX, 7), 7, read_uint, write_u64);
-    qc_bytes_ext!(prop_ext_uint_8,
-        u64, calc_max!(::test::U64_MAX, 8), 8, read_uint, write_u64);
-
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_uint128_1,
-        Wi128<u128>, 1, 1, read_uint128, write_u128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_uint128_2,
-        Wi128<u128>, 2, 2, read_uint128, write_u128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_uint128_3,
-        Wi128<u128>, 3, 3, read_uint128, write_u128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_uint128_4,
-        Wi128<u128>, 4, 4, read_uint128, write_u128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_uint128_5,
-        Wi128<u128>, 5, 5, read_uint128, write_u128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_uint128_6,
-        Wi128<u128>, 6, 6, read_uint128, write_u128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_uint128_7,
-        Wi128<u128>, 7, 7, read_uint128, write_u128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_uint128_8,
-        Wi128<u128>, 8, 8, read_uint128, write_u128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_uint128_9,
-        Wi128<u128>, 9, 9, read_uint128, write_u128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_uint128_10,
-        Wi128<u128>, 10, 10, read_uint128, write_u128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_uint128_11,
-        Wi128<u128>, 11, 11, read_uint128, write_u128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_uint128_12,
-        Wi128<u128>, 12, 12, read_uint128, write_u128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_uint128_13,
-        Wi128<u128>, 13, 13, read_uint128, write_u128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_uint128_14,
-        Wi128<u128>, 14, 14, read_uint128, write_u128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_uint128_15,
-        Wi128<u128>, 15, 15, read_uint128, write_u128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_uint128_16,
-        Wi128<u128>, 16, 16, read_uint128, write_u128);
-
-    qc_bytes_ext!(prop_ext_int_1,
-        i64, calc_max!(::test::I64_MAX, 1), 1, read_int, write_i64);
-    qc_bytes_ext!(prop_ext_int_2,
-        i64, calc_max!(::test::I64_MAX, 2), 2, read_int, write_i64);
-    qc_bytes_ext!(prop_ext_int_3,
-        i64, calc_max!(::test::I64_MAX, 3), 3, read_int, write_i64);
-    qc_bytes_ext!(prop_ext_int_4,
-        i64, calc_max!(::test::I64_MAX, 4), 4, read_int, write_i64);
-    qc_bytes_ext!(prop_ext_int_5,
-        i64, calc_max!(::test::I64_MAX, 5), 5, read_int, write_i64);
-    qc_bytes_ext!(prop_ext_int_6,
-        i64, calc_max!(::test::I64_MAX, 6), 6, read_int, write_i64);
-    qc_bytes_ext!(prop_ext_int_7,
-        i64, calc_max!(::test::I64_MAX, 1), 7, read_int, write_i64);
-    qc_bytes_ext!(prop_ext_int_8,
-        i64, calc_max!(::test::I64_MAX, 8), 8, read_int, write_i64);
+    qc_bytes_ext!(prop_ext_u16, u16, ::std::u16::MAX as u64, read_u16, write_u16);
+    qc_bytes_ext!(prop_ext_i16, i16, ::std::i16::MAX as u64, read_i16, write_i16);
+    qc_bytes_ext!(prop_ext_u32, u32, ::std::u32::MAX as u64, read_u32, write_u32);
+    qc_bytes_ext!(prop_ext_i32, i32, ::std::i32::MAX as u64, read_i32, write_i32);
+    qc_bytes_ext!(prop_ext_u64, u64, ::std::u64::MAX as u64, read_u64, write_u64);
+    qc_bytes_ext!(prop_ext_i64, i64, ::std::i64::MAX as u64, read_i64, write_i64);
+    qc_bytes_ext!(prop_ext_f32, f32, ::std::u64::MAX as u64, read_f32, write_f32);
+    qc_bytes_ext!(prop_ext_f64, f64, ::std::i64::MAX as u64, read_f64, write_f64);
 
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_int128_1,
-        Wi128<i128>, 1, 1, read_int128, write_i128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_int128_2,
-        Wi128<i128>, 2, 2, read_int128, write_i128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_int128_3,
-        Wi128<i128>, 3, 3, read_int128, write_i128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_int128_4,
-        Wi128<i128>, 4, 4, read_int128, write_i128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_int128_5,
-        Wi128<i128>, 5, 5, read_int128, write_i128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_int128_6,
-        Wi128<i128>, 6, 6, read_int128, write_i128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_int128_7,
-        Wi128<i128>, 7, 7, read_int128, write_i128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_int128_8,
-        Wi128<i128>, 8, 8, read_int128, write_i128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_int128_9,
-        Wi128<i128>, 9, 9, read_int128, write_i128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_int128_10,
-        Wi128<i128>, 10, 10, read_int128, write_i128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_int128_11,
-        Wi128<i128>, 11, 11, read_int128, write_i128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_int128_12,
-        Wi128<i128>, 12, 12, read_int128, write_i128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_int128_13,
-        Wi128<i128>, 13, 13, read_int128, write_i128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_int128_14,
-        Wi128<i128>, 14, 14, read_int128, write_i128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_int128_15,
-        Wi128<i128>, 15, 15, read_int128, write_i128);
-    #[cfg(feature = "i128")]
-    qc_bytes_ext!(prop_ext_int128_16,
-        Wi128<i128>, 16, 16, read_int128, write_i128);
-
-    // Test slice serialization/deserialization.
-    macro_rules! qc_slice {
-        ($name:ident, $ty_int:ty, $read:ident, $write:ident, $zero:expr) => {
-            mod $name {
-                use core::mem::size_of;
-                use {ByteOrder, BigEndian, NativeEndian, LittleEndian};
-                use super::qc_unsized;
-                #[allow(unused_imports)]
-                use test::Wi128;
-
-                #[test]
-                fn big_endian() {
-                    #[allow(unused_unsafe)]
-                    fn prop(numbers: Vec<$ty_int>) -> bool {
-                        let numbers: Vec<_> = numbers
-                            .into_iter()
-                            .map(|x| x.clone())
-                            .collect();
-                        let num_bytes = size_of::<$ty_int>() * numbers.len();
-                        let mut bytes = vec![0; num_bytes];
-
-                        BigEndian::$write(&numbers, &mut bytes);
+    qc_bytes_ext!(prop_ext_uint_1, u64, ::test::U64_MAX, 1, read_uint, write_u64);
+    qc_bytes_ext!(prop_ext_uint_2, u64, ::test::U64_MAX, 2, read_uint, write_u64);
+    qc_bytes_ext!(prop_ext_uint_3, u64, ::test::U64_MAX, 3, read_uint, write_u64);
+    qc_bytes_ext!(prop_ext_uint_4, u64, ::test::U64_MAX, 4, read_uint, write_u64);
+    qc_bytes_ext!(prop_ext_uint_5, u64, ::test::U64_MAX, 5, read_uint, write_u64);
+    qc_bytes_ext!(prop_ext_uint_6, u64, ::test::U64_MAX, 6, read_uint, write_u64);
+    qc_bytes_ext!(prop_ext_uint_7, u64, ::test::U64_MAX, 7, read_uint, write_u64);
+    qc_bytes_ext!(prop_ext_uint_8, u64, ::test::U64_MAX, 8, read_uint, write_u64);
 
-                        let mut got = vec![$zero; numbers.len()];
-                        unsafe { BigEndian::$read(&bytes, &mut got); }
-
-                        numbers == got
-                    }
-                    qc_unsized(prop as fn(_) -> bool);
-                }
-
-                #[test]
-                fn little_endian() {
-                    #[allow(unused_unsafe)]
-                    fn prop(numbers: Vec<$ty_int>) -> bool {
-                        let numbers: Vec<_> = numbers
-                            .into_iter()
-                            .map(|x| x.clone())
-                            .collect();
-                        let num_bytes = size_of::<$ty_int>() * numbers.len();
-                        let mut bytes = vec![0; num_bytes];
-
-                        LittleEndian::$write(&numbers, &mut bytes);
-
-                        let mut got = vec![$zero; numbers.len()];
-                        unsafe { LittleEndian::$read(&bytes, &mut got); }
-
-                        numbers == got
-                    }
-                    qc_unsized(prop as fn(_) -> bool);
-                }
+    qc_bytes_ext!(prop_ext_int_1, i64, ::test::I64_MAX, 1, read_int, write_i64);
+    qc_bytes_ext!(prop_ext_int_2, i64, ::test::I64_MAX, 2, read_int, write_i64);
+    qc_bytes_ext!(prop_ext_int_3, i64, ::test::I64_MAX, 3, read_int, write_i64);
+    qc_bytes_ext!(prop_ext_int_4, i64, ::test::I64_MAX, 4, read_int, write_i64);
+    qc_bytes_ext!(prop_ext_int_5, i64, ::test::I64_MAX, 5, read_int, write_i64);
+    qc_bytes_ext!(prop_ext_int_6, i64, ::test::I64_MAX, 6, read_int, write_i64);
+    qc_bytes_ext!(prop_ext_int_7, i64, ::test::I64_MAX, 7, read_int, write_i64);
+    qc_bytes_ext!(prop_ext_int_8, i64, ::test::I64_MAX, 8, read_int, write_i64);
+}
 
-                #[test]
-                fn native_endian() {
-                    #[allow(unused_unsafe)]
-                    fn prop(numbers: Vec<$ty_int>) -> bool {
-                        let numbers: Vec<_> = numbers
-                            .into_iter()
-                            .map(|x| x.clone())
-                            .collect();
-                        let num_bytes = size_of::<$ty_int>() * numbers.len();
-                        let mut bytes = vec![0; num_bytes];
-
-                        NativeEndian::$write(&numbers, &mut bytes);
-
-                        let mut got = vec![$zero; numbers.len()];
-                        unsafe { NativeEndian::$read(&bytes, &mut got); }
-
-                        numbers == got
-                    }
-                    qc_unsized(prop as fn(_) -> bool);
-                }
-            }
-        }
-    }
-
-    qc_slice!(prop_slice_u16, u16, read_u16_into, write_u16_into, 0);
-    qc_slice!(prop_slice_i16, i16, read_i16_into, write_i16_into, 0);
-    qc_slice!(prop_slice_u32, u32, read_u32_into, write_u32_into, 0);
-    qc_slice!(prop_slice_i32, i32, read_i32_into, write_i32_into, 0);
-    qc_slice!(prop_slice_u64, u64, read_u64_into, write_u64_into, 0);
-    qc_slice!(prop_slice_i64, i64, read_i64_into, write_i64_into, 0);
-    #[cfg(feature = "i128")]
-    qc_slice!(
-        prop_slice_u128, Wi128<u128>, read_u128_into, write_u128_into, 0);
-    #[cfg(feature = "i128")]
-    qc_slice!(
-        prop_slice_i128, Wi128<i128>, read_i128_into, write_i128_into, 0);
-
-    qc_slice!(
-        prop_slice_f32, f32, read_f32_into_unchecked, write_f32_into, 0.0);
-    qc_slice!(
-        prop_slice_f64, f64, read_f64_into_unchecked, write_f64_into, 0.0);
-}
rename from third_party/rust/byteorder-1.0.0/src/new.rs
rename to third_party/rust/byteorder/src/new.rs
deleted file mode 100644
--- a/third_party/rust/cookie-0.9.1/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".travis.yml":"d2a9bb7c029e8ed0acfb8dc8e786014cfa4f053b6f4c525303d69fd7e28704e9","Cargo.toml":"58c04bac67faab6be97b59de07794082d3939573035d206bfdd097943a5db79c","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"d4e2bab975203277cab1daa6560bd918fdc35e50a7a41a97a55eeea06526a441","src/builder.rs":"528640f717f5769e522a9ac066a994c21973ff3a5e9359d087f410233887c83c","src/delta.rs":"510fc3dbf0a70d635d0488c5a5a32a2ba8e1490ce05bee39d944ea8c02189bbc","src/draft.rs":"bd11960db08f4e4368937845fc18b842e474391738e4457a3441df2789c9d320","src/jar.rs":"98237c4a37143e08bcb6e84c5ed69b799a8a08f89a1b83f02c425cc92b089252","src/lib.rs":"c9713205a51c98138cdcf422313fde959d8bcabf483c4803f2ed6c755eb9f7d5","src/parse.rs":"ee46cee7fa445e6545f29eac3eac81e76ec29e9c53e000195af427c7315ee11c","src/secure/key.rs":"734f35ef4b0d6b63174befdcb970f0304ac63f0895871b7c2f267fefdd43b648","src/secure/macros.rs":"83d770e5c4eb7fbd3c3d86973b69042e9e2bb9fafb72a4456598e2ae78638d5f","src/secure/mod.rs":"5d7fecb62295827d474ed1ce6b7628fe93d4a09eb14babfde036d64e8e4a04f8","src/secure/private.rs":"fbe9b8f79acaab9f9698298e7be57d3fcc33ca3fffbd13f576951b16f28cba60","src/secure/signed.rs":"8440c9ce5a0be4e162fb502cd1fbe24572ce00709f5554c45f8bece39637590d"},"package":"a54aa6d675d62b2f95b56b331b5222a520149a54f23a2d21974dfcc69caf0a9d"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/cookie-0.9.1/.travis.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-language: rust
-rust:
-  - stable
-  - beta
-  - nightly
-sudo: false
-before_script:
-  - pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH
-script:
-  - cargo build --verbose
-  - cargo test --verbose --no-default-features
-  - cargo test --verbose
-  - cargo test --verbose --features percent-encode
-  - cargo test --verbose --features secure
-  - cargo test --verbose --all-features
-  - rustdoc --test README.md -L target
-  - cargo doc --no-deps
-after_success:
-  - travis-cargo --only nightly doc-upload
-env:
-  global:
-    secure: "TyMGH+sbPmKs9lKCziKShxWr3G6im0owEchVrbUChWnQIQv1WydXftFoEoUsVl6qZspjehWK1b1AsnIgCXK0HtEi4DnqLsxs0s36bOjfg5yHBT/pETTr6kcq7KAL4Be4GmI331k6gT1Oi0TPFp7Sg9xpiWsQqKIHA5Szk2wpFQ8="
-
-notifications:
-  email:
-    on_success: never
deleted file mode 100644
--- a/third_party/rust/cookie-0.9.1/Cargo.toml
+++ /dev/null
@@ -1,38 +0,0 @@
-# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
-#
-# When uploading crates to the registry Cargo will automatically
-# "normalize" Cargo.toml files for maximal compatibility
-# with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g. crates.io) dependencies
-#
-# If you believe there's an error in this file please file an
-# issue against the rust-lang/cargo repository. If you're
-# editing this file be aware that the upstream Cargo.toml
-# will likely look very different (and much more reasonable)
-
-[package]
-name = "cookie"
-version = "0.9.1"
-authors = ["Alex Crichton <alex@alexcrichton.com>", "Sergio Benitez <sb@sergio.bz>"]
-description = "Crate for parsing HTTP cookie headers and managing a cookie jar. Supports signed\nand private (encrypted + signed) jars.\n"
-documentation = "https://docs.rs/cookie"
-license = "MIT/Apache-2.0"
-repository = "https://github.com/alexcrichton/cookie-rs"
-[dependencies.url]
-version = "1.0"
-optional = true
-
-[dependencies.ring]
-version = "0.11.0"
-optional = true
-
-[dependencies.base64]
-version = "0.6.0"
-optional = true
-
-[dependencies.time]
-version = "0.1"
-
-[features]
-percent-encode = ["url"]
-secure = ["ring", "base64"]
deleted file mode 100644
--- a/third_party/rust/cookie-0.9.1/LICENSE-APACHE
+++ /dev/null
@@ -1,201 +0,0 @@
-                              Apache License
-                        Version 2.0, January 2004
-                     http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-   "License" shall mean the terms and conditions for use, reproduction,
-   and distribution as defined by Sections 1 through 9 of this document.
-
-   "Licensor" shall mean the copyright owner or entity authorized by
-   the copyright owner that is granting the License.
-
-   "Legal Entity" shall mean the union of the acting entity and all
-   other entities that control, are controlled by, or are under common
-   control with that entity. For the purposes of this definition,
-   "control" means (i) the power, direct or indirect, to cause the
-   direction or management of such entity, whether by contract or
-   otherwise, or (ii) ownership of fifty percent (50%) or more of the
-   outstanding shares, or (iii) beneficial ownership of such entity.
-
-   "You" (or "Your") shall mean an individual or Legal Entity
-   exercising permissions granted by this License.
-
-   "Source" form shall mean the preferred form for making modifications,
-   including but not limited to software source code, documentation
-   source, and configuration files.
-
-   "Object" form shall mean any form resulting from mechanical
-   transformation or translation of a Source form, including but
-   not limited to compiled object code, generated documentation,
-   and conversions to other media types.
-
-   "Work" shall mean the work of authorship, whether in Source or
-   Object form, made available under the License, as indicated by a
-   copyright notice that is included in or attached to the work
-   (an example is provided in the Appendix below).
-
-   "Derivative Works" shall mean any work, whether in Source or Object
-   form, that is based on (or derived from) the Work and for which the
-   editorial revisions, annotations, elaborations, or other modifications
-   represent, as a whole, an original work of authorship. For the purposes
-   of this License, Derivative Works shall not include works that remain
-   separable from, or merely link (or bind by name) to the interfaces of,
-   the Work and Derivative Works thereof.
-
-   "Contribution" shall mean any work of authorship, including
-   the original version of the Work and any modifications or additions
-   to that Work or Derivative Works thereof, that is intentionally
-   submitted to Licensor for inclusion in the Work by the copyright owner
-   or by an individual or Legal Entity authorized to submit on behalf of
-   the copyright owner. For the purposes of this definition, "submitted"
-   means any form of electronic, verbal, or written communication sent
-   to the Licensor or its representatives, including but not limited to
-   communication on electronic mailing lists, source code control systems,
-   and issue tracking systems that are managed by, or on behalf of, the
-   Licensor for the purpose of discussing and improving the Work, but
-   excluding communication that is conspicuously marked or otherwise
-   designated in writing by the copyright owner as "Not a Contribution."
-
-   "Contributor" shall mean Licensor and any individual or Legal Entity
-   on behalf of whom a Contribution has been received by Licensor and
-   subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   copyright license to reproduce, prepare Derivative Works of,
-   publicly display, publicly perform, sublicense, and distribute the
-   Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   (except as stated in this section) patent license to make, have made,
-   use, offer to sell, sell, import, and otherwise transfer the Work,
-   where such license applies only to those patent claims licensable
-   by such Contributor that are necessarily infringed by their
-   Contribution(s) alone or by combination of their Contribution(s)
-   with the Work to which such Contribution(s) was submitted. If You
-   institute patent litigation against any entity (including a
-   cross-claim or counterclaim in a lawsuit) alleging that the Work
-   or a Contribution incorporated within the Work constitutes direct
-   or contributory patent infringement, then any patent licenses
-   granted to You under this License for that Work shall terminate
-   as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
-   Work or Derivative Works thereof in any medium, with or without
-   modifications, and in Source or Object form, provided that You
-   meet the following conditions:
-
-   (a) You must give any other recipients of the Work or
-       Derivative Works a copy of this License; and
-
-   (b) You must cause any modified files to carry prominent notices
-       stating that You changed the files; and
-
-   (c) You must retain, in the Source form of any Derivative Works
-       that You distribute, all copyright, patent, trademark, and
-       attribution notices from the Source form of the Work,
-       excluding those notices that do not pertain to any part of
-       the Derivative Works; and
-
-   (d) If the Work includes a "NOTICE" text file as part of its
-       distribution, then any Derivative Works that You distribute must
-       include a readable copy of the attribution notices contained
-       within such NOTICE file, excluding those notices that do not
-       pertain to any part of the Derivative Works, in at least one
-       of the following places: within a NOTICE text file distributed
-       as part of the Derivative Works; within the Source form or
-       documentation, if provided along with the Derivative Works; or,
-       within a display generated by the Derivative Works, if and
-       wherever such third-party notices normally appear. The contents
-       of the NOTICE file are for informational purposes only and
-       do not modify the License. You may add Your own attribution
-       notices within Derivative Works that You distribute, alongside
-       or as an addendum to the NOTICE text from the Work, provided
-       that such additional attribution notices cannot be construed
-       as modifying the License.
-
-   You may add Your own copyright statement to Your modifications and
-   may provide additional or different license terms and conditions
-   for use, reproduction, or distribution of Your modifications, or
-   for any such Derivative Works as a whole, provided Your use,
-   reproduction, and distribution of the Work otherwise complies with
-   the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
-   any Contribution intentionally submitted for inclusion in the Work
-   by You to the Licensor shall be under the terms and conditions of
-   this License, without any additional terms or conditions.
-   Notwithstanding the above, nothing herein shall supersede or modify
-   the terms of any separate license agreement you may have executed
-   with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
-   names, trademarks, service marks, or product names of the Licensor,
-   except as required for reasonable and customary use in describing the
-   origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
-   agreed to in writing, Licensor provides the Work (and each
-   Contributor provides its Contributions) on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-   implied, including, without limitation, any warranties or conditions
-   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-   PARTICULAR PURPOSE. You are solely responsible for determining the
-   appropriateness of using or redistributing the Work and assume any
-   risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
-   whether in tort (including negligence), contract, or otherwise,
-   unless required by applicable law (such as deliberate and grossly
-   negligent acts) or agreed to in writing, shall any Contributor be
-   liable to You for damages, including any direct, indirect, special,
-   incidental, or consequential damages of any character arising as a
-   result of this License or out of the use or inability to use the
-   Work (including but not limited to damages for loss of goodwill,
-   work stoppage, computer failure or malfunction, or any and all
-   other commercial damages or losses), even if such Contributor
-   has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
-   the Work or Derivative Works thereof, You may choose to offer,
-   and charge a fee for, acceptance of support, warranty, indemnity,
-   or other liability obligations and/or rights consistent with this
-   License. However, in accepting such obligations, You may act only
-   on Your own behalf and on Your sole responsibility, not on behalf
-   of any other Contributor, and only if You agree to indemnify,
-   defend, and hold each Contributor harmless for any liability
-   incurred by, or claims asserted against, such Contributor by reason
-   of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
-   To apply the Apache License to your work, attach the following
-   boilerplate notice, with the fields enclosed by brackets "[]"
-   replaced with your own identifying information. (Don't include
-   the brackets!)  The text should be enclosed in the appropriate
-   comment syntax for the file format. We also recommend that a
-   file or class name and description of purpose be included on the
-   same "printed page" as the copyright notice for easier
-   identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-	http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
deleted file mode 100644
--- a/third_party/rust/cookie-0.9.1/LICENSE-MIT
+++ /dev/null
@@ -1,25 +0,0 @@
-Copyright (c) 2014 Alex Crichton
-
-Permission is hereby granted, free of charge, to any
-person obtaining a copy of this software and associated
-documentation files (the "Software"), to deal in the
-Software without restriction, including without
-limitation the rights to use, copy, modify, merge,
-publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software
-is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice
-shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
-ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
-TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
deleted file mode 100644
--- a/third_party/rust/cookie-0.9.1/README.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# cookie-rs
-
-[![Build Status](https://travis-ci.org/alexcrichton/cookie-rs.svg?branch=master)](https://travis-ci.org/alexcrichton/cookie-rs)
-[![Current Crates.io Version](https://img.shields.io/crates/v/cookie.svg)](https://crates.io/crates/cookie)
-
-A library for parsing HTTP cookies and managing cookie jars.
-
-# Usage
-
-Add the following to your `Cargo.toml`:
-
-```toml
-[dependencies]
-cookie = "0.9"
-```
-
-See the [documentation](http://docs.rs/cookie) for detailed usage information.
-
-# License
-
-`cookie-rs` is primarily distributed under the terms of both the MIT license and
-the Apache License (Version 2.0), with portions covered by various BSD-like
-licenses.
-
-See [LICENSE-APACHE](LICENSE-APACHE), and [LICENSE-MIT](LICENSE-MIT) for
-details.
deleted file mode 100644
--- a/third_party/rust/cookie-0.9.1/src/builder.rs
+++ /dev/null
@@ -1,250 +0,0 @@
-use std::borrow::Cow;
-
-use time::{Tm, Duration};
-
-use ::{Cookie, SameSite};
-
-/// Structure that follows the builder pattern for building `Cookie` structs.
-///
-/// To construct a cookie:
-///
-///   1. Call [`Cookie::build`](struct.Cookie.html#method.build) to start building.
-///   2. Use any of the builder methods to set fields in the cookie.
-///   3. Call [finish](#method.finish) to retrieve the built cookie.
-///
-/// # Example
-///
-/// ```rust
-/// # extern crate cookie;
-/// extern crate time;
-///
-/// use cookie::Cookie;
-/// use time::Duration;
-///
-/// # fn main() {
-/// let cookie: Cookie = Cookie::build("name", "value")
-///     .domain("www.rust-lang.org")
-///     .path("/")
-///     .secure(true)
-///     .http_only(true)
-///     .max_age(Duration::days(1))
-///     .finish();
-/// # }
-/// ```
-#[derive(Debug, Clone)]
-pub struct CookieBuilder {
-    /// The cookie being built.
-    cookie: Cookie<'static>,
-}
-
-impl CookieBuilder {
-    /// Creates a new `CookieBuilder` instance from the given name and value.
-    ///
-    /// This method is typically called indirectly via
-    /// [Cookie::build](struct.Cookie.html#method.build).
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::Cookie;
-    ///
-    /// let c = Cookie::build("foo", "bar").finish();
-    /// assert_eq!(c.name_value(), ("foo", "bar"));
-    /// ```
-    pub fn new<N, V>(name: N, value: V) -> CookieBuilder
-        where N: Into<Cow<'static, str>>,
-              V: Into<Cow<'static, str>>
-    {
-        CookieBuilder { cookie: Cookie::new(name, value) }
-    }
-
-    /// Sets the `expires` field in the cookie being built.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// # extern crate cookie;
-    /// extern crate time;
-    ///
-    /// use cookie::Cookie;
-    ///
-    /// # fn main() {
-    /// let c = Cookie::build("foo", "bar")
-    ///     .expires(time::now())
-    ///     .finish();
-    ///
-    /// assert!(c.expires().is_some());
-    /// # }
-    /// ```
-    #[inline]
-    pub fn expires(mut self, when: Tm) -> CookieBuilder {
-        self.cookie.set_expires(when);
-        self
-    }
-
-    /// Sets the `max_age` field in the cookie being built.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// # extern crate cookie;
-    /// extern crate time;
-    /// use time::Duration;
-    ///
-    /// use cookie::Cookie;
-    ///
-    /// # fn main() {
-    /// let c = Cookie::build("foo", "bar")
-    ///     .max_age(Duration::minutes(30))
-    ///     .finish();
-    ///
-    /// assert_eq!(c.max_age(), Some(Duration::seconds(30 * 60)));
-    /// # }
-    /// ```
-    #[inline]
-    pub fn max_age(mut self, value: Duration) -> CookieBuilder {
-        self.cookie.set_max_age(value);
-        self
-    }
-
-    /// Sets the `domain` field in the cookie being built.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::Cookie;
-    ///
-    /// let c = Cookie::build("foo", "bar")
-    ///     .domain("www.rust-lang.org")
-    ///     .finish();
-    ///
-    /// assert_eq!(c.domain(), Some("www.rust-lang.org"));
-    /// ```
-    pub fn domain<D: Into<Cow<'static, str>>>(mut self, value: D) -> CookieBuilder {
-        self.cookie.set_domain(value);
-        self
-    }
-
-    /// Sets the `path` field in the cookie being built.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::Cookie;
-    ///
-    /// let c = Cookie::build("foo", "bar")
-    ///     .path("/")
-    ///     .finish();
-    ///
-    /// assert_eq!(c.path(), Some("/"));
-    /// ```
-    pub fn path<P: Into<Cow<'static, str>>>(mut self, path: P) -> CookieBuilder {
-        self.cookie.set_path(path);
-        self
-    }
-
-    /// Sets the `secure` field in the cookie being built.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::Cookie;
-    ///
-    /// let c = Cookie::build("foo", "bar")
-    ///     .secure(true)
-    ///     .finish();
-    ///
-    /// assert_eq!(c.secure(), true);
-    /// ```
-    #[inline]
-    pub fn secure(mut self, value: bool) -> CookieBuilder {
-        self.cookie.set_secure(value);
-        self
-    }
-
-    /// Sets the `http_only` field in the cookie being built.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::Cookie;
-    ///
-    /// let c = Cookie::build("foo", "bar")
-    ///     .http_only(true)
-    ///     .finish();
-    ///
-    /// assert_eq!(c.http_only(), true);
-    /// ```
-    #[inline]
-    pub fn http_only(mut self, value: bool) -> CookieBuilder {
-        self.cookie.set_http_only(value);
-        self
-    }
-
-    /// Sets the `same_site` field in the cookie being built.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::{Cookie, SameSite};
-    ///
-    /// let c = Cookie::build("foo", "bar")
-    ///     .same_site(SameSite::Strict)
-    ///     .finish();
-    ///
-    /// assert_eq!(c.same_site(), Some(SameSite::Strict));
-    /// ```
-    #[inline]
-    pub fn same_site(mut self, value: SameSite) -> CookieBuilder {
-        self.cookie.set_same_site(value);
-        self
-    }
-
-    /// Makes the cookie being built 'permanent' by extending its expiration and
-    /// max age 20 years into the future.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// # extern crate cookie;
-    /// extern crate time;
-    ///
-    /// use cookie::Cookie;
-    /// use time::Duration;
-    ///
-    /// # fn main() {
-    /// let c = Cookie::build("foo", "bar")
-    ///     .permanent()
-    ///     .finish();
-    ///
-    /// assert_eq!(c.max_age(), Some(Duration::days(365 * 20)));
-    /// # assert!(c.expires().is_some());
-    /// # }
-    /// ```
-    #[inline]
-    pub fn permanent(mut self) -> CookieBuilder {
-        self.cookie.make_permanent();
-        self
-    }
-
-    /// Finishes building and returns the built `Cookie`.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::Cookie;
-    ///
-    /// let c = Cookie::build("foo", "bar")
-    ///     .domain("crates.io")
-    ///     .path("/")
-    ///     .finish();
-    ///
-    /// assert_eq!(c.name_value(), ("foo", "bar"));
-    /// assert_eq!(c.domain(), Some("crates.io"));
-    /// assert_eq!(c.path(), Some("/"));
-    /// ```
-    #[inline]
-    pub fn finish(self) -> Cookie<'static> {
-        self.cookie
-    }
-}
deleted file mode 100644
--- a/third_party/rust/cookie-0.9.1/src/delta.rs
+++ /dev/null
@@ -1,71 +0,0 @@
-use std::ops::{Deref, DerefMut};
-use std::hash::{Hash, Hasher};
-use std::borrow::Borrow;
-
-use Cookie;
-
-/// A `DeltaCookie` is a helper structure used in a cookie jar. It wraps a
-/// `Cookie` so that it can be hashed and compared purely by name. It further
-/// records whether the wrapped cookie is a "removal" cookie, that is, a cookie
-/// that when sent to the client removes the named cookie on the client's
-/// machine.
-#[derive(Clone, Debug)]
-pub struct DeltaCookie {
-    pub cookie: Cookie<'static>,
-    pub removed: bool,
-}
-
-impl DeltaCookie {
-    /// Create a new `DeltaCookie` that is being added to a jar.
-    #[inline]
-    pub fn added(cookie: Cookie<'static>) -> DeltaCookie {
-        DeltaCookie {
-            cookie: cookie,
-            removed: false,
-        }
-    }
-
-    /// Create a new `DeltaCookie` that is being removed from a jar. The
-    /// `cookie` should be a "removal" cookie.
-    #[inline]
-    pub fn removed(cookie: Cookie<'static>) -> DeltaCookie {
-        DeltaCookie {
-            cookie: cookie,
-            removed: true,
-        }
-    }
-}
-
-impl Deref for DeltaCookie {
-    type Target = Cookie<'static>;
-
-    fn deref(&self) -> &Cookie<'static> {
-        &self.cookie
-    }
-}
-
-impl DerefMut for DeltaCookie {
-    fn deref_mut(&mut self) -> &mut Cookie<'static> {
-        &mut self.cookie
-    }
-}
-
-impl PartialEq for DeltaCookie {
-    fn eq(&self, other: &DeltaCookie) -> bool {
-        self.name() == other.name()
-    }
-}
-
-impl Eq for DeltaCookie {}
-
-impl Hash for DeltaCookie {
-    fn hash<H: Hasher>(&self, state: &mut H) {
-        self.name().hash(state);
-    }
-}
-
-impl Borrow<str> for DeltaCookie {
-    fn borrow(&self) -> &str {
-        self.name()
-    }
-}
deleted file mode 100644
--- a/third_party/rust/cookie-0.9.1/src/draft.rs
+++ /dev/null
@@ -1,71 +0,0 @@
-//! This module contains types that represent cookie properties that are not yet
-//! standardized. That is, _draft_ features.
-
-use std::fmt;
-
-/// The `SameSite` cookie attribute.
-///
-/// A cookie with a `SameSite` attribute is imposed restrictions on when it is
-/// sent to the origin server in a cross-site request. If the `SameSite`
-/// attribute is "Strict", then the cookie is never sent in cross-site requests.
-/// If the `SameSite` attribute is "Lax", the cookie is only sent in cross-site
-/// requests with "safe" HTTP methods, i.e, `GET`, `HEAD`, `OPTIONS`, `TRACE`.
-///
-/// **Note:** This cookie attribute is an HTTP draft! Its meaning and definition
-/// are subject to change.
-#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
-pub enum SameSite {
-    /// The "Strict" `SameSite` attribute.
-    Strict,
-    /// The "Lax" `SameSite` attribute.
-    Lax
-}
-
-impl SameSite {
-    /// Returns `true` if `self` is `SameSite::Strict` and `false` otherwise.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::SameSite;
-    ///
-    /// let strict = SameSite::Strict;
-    /// assert!(strict.is_strict());
-    /// assert!(!strict.is_lax());
-    /// ```
-    #[inline]
-    pub fn is_strict(&self) -> bool {
-        match *self {
-            SameSite::Strict => true,
-            SameSite::Lax => false
-        }
-    }
-
-    /// Returns `true` if `self` is `SameSite::Lax` and `false` otherwise.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::SameSite;
-    ///
-    /// let lax = SameSite::Lax;
-    /// assert!(lax.is_lax());
-    /// assert!(!lax.is_strict());
-    /// ```
-    #[inline]
-    pub fn is_lax(&self) -> bool {
-        match *self {
-            SameSite::Strict => false,
-            SameSite::Lax => true
-        }
-    }
-}
-
-impl fmt::Display for SameSite {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            SameSite::Strict => write!(f, "Strict"),
-            SameSite::Lax => write!(f, "Lax")
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/cookie-0.9.1/src/jar.rs
+++ /dev/null
@@ -1,604 +0,0 @@
-use std::collections::HashSet;
-use std::mem::replace;
-
-use time::{self, Duration};
-
-#[cfg(feature = "secure")]
-use secure::{PrivateJar, SignedJar, Key};
-use delta::DeltaCookie;
-use Cookie;
-
-/// A collection of cookies that tracks its modifications.
-///
-/// A `CookieJar` provides storage for any number of cookies. Any changes made
-/// to the jar are tracked; the changes can be retrieved via the
-/// [delta](#method.delta) method which returns an interator over the changes.
-///
-/// # Usage
-///
-/// A jar's life begins via [new](#method.new) and calls to
-/// [`add_original`](#method.add_original):
-///
-/// ```rust
-/// use cookie::{Cookie, CookieJar};
-///
-/// let mut jar = CookieJar::new();
-/// jar.add_original(Cookie::new("name", "value"));
-/// jar.add_original(Cookie::new("second", "another"));
-/// ```
-///
-/// Cookies can be added via [add](#method.add) and removed via
-/// [remove](#method.remove). Finally, cookies can be looked up via
-/// [get](#method.get):
-///
-/// ```rust
-/// # use cookie::{Cookie, CookieJar};
-/// let mut jar = CookieJar::new();
-/// jar.add(Cookie::new("a", "one"));
-/// jar.add(Cookie::new("b", "two"));
-///
-/// assert_eq!(jar.get("a").map(|c| c.value()), Some("one"));
-/// assert_eq!(jar.get("b").map(|c| c.value()), Some("two"));
-///
-/// jar.remove(Cookie::named("b"));
-/// assert!(jar.get("b").is_none());
-/// ```
-///
-/// # Deltas
-///
-/// A jar keeps track of any modifications made to it over time. The
-/// modifications are recorded as cookies. The modifications can be retrieved
-/// via [delta](#method.delta). Any new `Cookie` added to a jar via `add`
-/// results in the same `Cookie` appearing in the `delta`; cookies added via
-/// `add_original` do not count towards the delta. Any _original_ cookie that is
-/// removed from a jar results in a "removal" cookie appearing in the delta. A
-/// "removal" cookie is a cookie that a server sends so that the cookie is
-/// removed from the client's machine.
-///
-/// Deltas are typically used to create `Set-Cookie` headers corresponding to
-/// the changes made to a cookie jar over a period of time.
-///
-/// ```rust
-/// # use cookie::{Cookie, CookieJar};
-/// let mut jar = CookieJar::new();
-///
-/// // original cookies don't affect the delta
-/// jar.add_original(Cookie::new("original", "value"));
-/// assert_eq!(jar.delta().count(), 0);
-///
-/// // new cookies result in an equivalent `Cookie` in the delta
-/// jar.add(Cookie::new("a", "one"));
-/// jar.add(Cookie::new("b", "two"));
-/// assert_eq!(jar.delta().count(), 2);
-///
-/// // removing an original cookie adds a "removal" cookie to the delta
-/// jar.remove(Cookie::named("original"));
-/// assert_eq!(jar.delta().count(), 3);
-///
-/// // removing a new cookie that was added removes that `Cookie` from the delta
-/// jar.remove(Cookie::named("a"));
-/// assert_eq!(jar.delta().count(), 2);
-/// ```
-#[derive(Default, Debug, Clone)]
-pub struct CookieJar {
-    original_cookies: HashSet<DeltaCookie>,
-    delta_cookies: HashSet<DeltaCookie>,
-}
-
-impl CookieJar {
-    /// Creates an empty cookie jar.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::CookieJar;
-    ///
-    /// let jar = CookieJar::new();
-    /// assert_eq!(jar.iter().count(), 0);
-    /// ```
-    pub fn new() -> CookieJar {
-        CookieJar::default()
-    }
-
-    /// Returns a reference to the `Cookie` inside this jar with the name
-    /// `name`. If no such cookie exists, returns `None`.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::{CookieJar, Cookie};
-    ///
-    /// let mut jar = CookieJar::new();
-    /// assert!(jar.get("name").is_none());
-    ///
-    /// jar.add(Cookie::new("name", "value"));
-    /// assert_eq!(jar.get("name").map(|c| c.value()), Some("value"));
-    /// ```
-    pub fn get(&self, name: &str) -> Option<&Cookie<'static>> {
-        self.delta_cookies
-            .get(name)
-            .or_else(|| self.original_cookies.get(name))
-            .and_then(|c| if !c.removed { Some(&c.cookie) } else { None })
-    }
-
-    /// Adds an "original" `cookie` to this jar. Adding an original cookie does
-    /// not affect the [delta](#method.delta) computation. This method is
-    /// intended to be used to seed the cookie jar with cookies received from a
-    /// client's HTTP message.
-    ///
-    /// For accurate `delta` computations, this method should not be called
-    /// after calling `remove`.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::{CookieJar, Cookie};
-    ///
-    /// let mut jar = CookieJar::new();
-    /// jar.add_original(Cookie::new("name", "value"));
-    /// jar.add_original(Cookie::new("second", "two"));
-    ///
-    /// assert_eq!(jar.get("name").map(|c| c.value()), Some("value"));
-    /// assert_eq!(jar.get("second").map(|c| c.value()), Some("two"));
-    /// assert_eq!(jar.iter().count(), 2);
-    /// assert_eq!(jar.delta().count(), 0);
-    /// ```
-    pub fn add_original(&mut self, cookie: Cookie<'static>) {
-        self.original_cookies.replace(DeltaCookie::added(cookie));
-    }
-
-    /// Adds `cookie` to this jar.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::{CookieJar, Cookie};
-    ///
-    /// let mut jar = CookieJar::new();
-    /// jar.add(Cookie::new("name", "value"));
-    /// jar.add(Cookie::new("second", "two"));
-    ///
-    /// assert_eq!(jar.get("name").map(|c| c.value()), Some("value"));
-    /// assert_eq!(jar.get("second").map(|c| c.value()), Some("two"));
-    /// assert_eq!(jar.iter().count(), 2);
-    /// assert_eq!(jar.delta().count(), 2);
-    /// ```
-    pub fn add(&mut self, cookie: Cookie<'static>) {
-        self.delta_cookies.replace(DeltaCookie::added(cookie));
-    }
-
-    /// Removes `cookie` from this jar. If an _original_ cookie with the same
-    /// name as `cookie` is present in the jar, a _removal_ cookie will be
-    /// present in the `delta` computation. To properly generate the removal
-    /// cookie, `cookie` must contain the same `path` and `domain` as the cookie
-    /// that was initially set.
-    ///
-    /// A "removal" cookie is a cookie that has the same name as the original
-    /// cookie but has an empty value, a max-age of 0, and an expiration date
-    /// far in the past.
-    ///
-    /// # Example
-    ///
-    /// Removing an _original_ cookie results in a _removal_ cookie:
-    ///
-    /// ```rust
-    /// # extern crate cookie;
-    /// extern crate time;
-    ///
-    /// use cookie::{CookieJar, Cookie};
-    /// use time::Duration;
-    ///
-    /// # fn main() {
-    /// let mut jar = CookieJar::new();
-    ///
-    /// // Assume this cookie originally had a path of "/" and domain of "a.b".
-    /// jar.add_original(Cookie::new("name", "value"));
-    ///
-    /// // If the path and domain were set, they must be provided to `remove`.
-    /// jar.remove(Cookie::build("name", "").path("/").domain("a.b").finish());
-    ///
-    /// // The delta will contain the removal cookie.
-    /// let delta: Vec<_> = jar.delta().collect();
-    /// assert_eq!(delta.len(), 1);
-    /// assert_eq!(delta[0].name(), "name");
-    /// assert_eq!(delta[0].max_age(), Some(Duration::seconds(0)));
-    /// # }
-    /// ```
-    ///
-    /// Removing a new cookie does not result in a _removal_ cookie:
-    ///
-    /// ```rust
-    /// use cookie::{CookieJar, Cookie};
-    ///
-    /// let mut jar = CookieJar::new();
-    /// jar.add(Cookie::new("name", "value"));
-    /// assert_eq!(jar.delta().count(), 1);
-    ///
-    /// jar.remove(Cookie::named("name"));
-    /// assert_eq!(jar.delta().count(), 0);
-    /// ```
-    pub fn remove(&mut self, mut cookie: Cookie<'static>) {
-        if self.original_cookies.contains(cookie.name()) {
-            cookie.set_value("");
-            cookie.set_max_age(Duration::seconds(0));
-            cookie.set_expires(time::now() - Duration::days(365));
-            self.delta_cookies.replace(DeltaCookie::removed(cookie));
-        } else {
-            self.delta_cookies.remove(cookie.name());
-        }
-    }
-
-    /// Removes all cookies from this cookie jar.
-    #[deprecated(since = "0.7.0", note = "calling this method may not remove \
-                 all cookies since the path and domain are not specified; use \
-                 `remove` instead")]
-    pub fn clear(&mut self) {
-        self.delta_cookies.clear();
-        for delta in replace(&mut self.original_cookies, HashSet::new()) {
-            self.remove(delta.cookie);
-        }
-    }
-
-    /// Returns an iterator over cookies that represent the changes to this jar
-    /// over time. These cookies can be rendered directly as `Set-Cookie` header
-    /// values to affect the changes made to this jar on the client.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::{CookieJar, Cookie};
-    ///
-    /// let mut jar = CookieJar::new();
-    /// jar.add_original(Cookie::new("name", "value"));
-    /// jar.add_original(Cookie::new("second", "two"));
-    ///
-    /// // Add new cookies.
-    /// jar.add(Cookie::new("new", "third"));
-    /// jar.add(Cookie::new("another", "fourth"));
-    /// jar.add(Cookie::new("yac", "fifth"));
-    ///
-    /// // Remove some cookies.
-    /// jar.remove(Cookie::named("name"));
-    /// jar.remove(Cookie::named("another"));
-    ///
-    /// // Delta contains two new cookies ("new", "yac") and a removal ("name").
-    /// assert_eq!(jar.delta().count(), 3);
-    /// ```
-    pub fn delta(&self) -> Delta {
-        Delta { iter: self.delta_cookies.iter() }
-    }
-
-    /// Returns an iterator over all of the cookies present in this jar.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::{CookieJar, Cookie};
-    ///
-    /// let mut jar = CookieJar::new();
-    ///
-    /// jar.add_original(Cookie::new("name", "value"));
-    /// jar.add_original(Cookie::new("second", "two"));
-    ///
-    /// jar.add(Cookie::new("new", "third"));
-    /// jar.add(Cookie::new("another", "fourth"));
-    /// jar.add(Cookie::new("yac", "fifth"));
-    ///
-    /// jar.remove(Cookie::named("name"));
-    /// jar.remove(Cookie::named("another"));
-    ///
-    /// // There are three cookies in the jar: "second", "new", and "yac".
-    /// # assert_eq!(jar.iter().count(), 3);
-    /// for cookie in jar.iter() {
-    ///     match cookie.name() {
-    ///         "second" => assert_eq!(cookie.value(), "two"),
-    ///         "new" => assert_eq!(cookie.value(), "third"),
-    ///         "yac" => assert_eq!(cookie.value(), "fifth"),
-    ///         _ => unreachable!("there are only three cookies in the jar")
-    ///     }
-    /// }
-    /// ```
-    pub fn iter(&self) -> Iter {
-        Iter { delta_cookies: self.delta_cookies.union(&self.original_cookies) }
-    }
-
-    /// Returns a `PrivateJar` with `self` as its parent jar using the key `key`
-    /// to sign/encrypt and verify/decrypt cookies added/retrieved from the
-    /// child jar.
-    ///
-    /// Any modifications to the child jar will be reflected on the parent jar,
-    /// and any retrievals from the child jar will be made from the parent jar.
-    ///
-    /// This method is only available when the `secure` feature is enabled.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::{Cookie, CookieJar, Key};
-    ///
-    /// // Generate a secure key.
-    /// let key = Key::generate();
-    ///
-    /// // Add a private (signed + encrypted) cookie.
-    /// let mut jar = CookieJar::new();
-    /// jar.private(&key).add(Cookie::new("private", "text"));
-    ///
-    /// // The cookie's contents are encrypted.
-    /// assert_ne!(jar.get("private").unwrap().value(), "text");
-    ///
-    /// // They can be decrypted and verified through the child jar.
-    /// assert_eq!(jar.private(&key).get("private").unwrap().value(), "text");
-    ///
-    /// // A tampered with cookie does not validate but still exists.
-    /// let mut cookie = jar.get("private").unwrap().clone();
-    /// jar.add(Cookie::new("private", cookie.value().to_string() + "!"));
-    /// assert!(jar.private(&key).get("private").is_none());
-    /// assert!(jar.get("private").is_some());
-    /// ```
-    #[cfg(feature = "secure")]
-    pub fn private(&mut self, key: &Key) -> PrivateJar {
-        PrivateJar::new(self, key)
-    }
-
-    /// Returns a `SignedJar` with `self` as its parent jar using the key `key`
-    /// to sign/verify cookies added/retrieved from the child jar.
-    ///
-    /// Any modifications to the child jar will be reflected on the parent jar,
-    /// and any retrievals from the child jar will be made from the parent jar.
-    ///
-    /// This method is only available when the `secure` feature is enabled.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::{Cookie, CookieJar, Key};
-    ///
-    /// // Generate a secure key.
-    /// let key = Key::generate();
-    ///
-    /// // Add a signed cookie.
-    /// let mut jar = CookieJar::new();
-    /// jar.signed(&key).add(Cookie::new("signed", "text"));
-    ///
-    /// // The cookie's contents are signed but still in plaintext.
-    /// assert_ne!(jar.get("signed").unwrap().value(), "text");
-    /// assert!(jar.get("signed").unwrap().value().contains("text"));
-    ///
-    /// // They can be verified through the child jar.
-    /// assert_eq!(jar.signed(&key).get("signed").unwrap().value(), "text");
-    ///
-    /// // A tampered with cookie does not validate but still exists.
-    /// let mut cookie = jar.get("signed").unwrap().clone();
-    /// jar.add(Cookie::new("signed", cookie.value().to_string() + "!"));
-    /// assert!(jar.signed(&key).get("signed").is_none());
-    /// assert!(jar.get("signed").is_some());
-    /// ```
-    #[cfg(feature = "secure")]
-    pub fn signed(&mut self, key: &Key) -> SignedJar {
-        SignedJar::new(self, key)
-    }
-}
-
-use std::collections::hash_set::Iter as HashSetIter;
-
-/// Iterator over the changes to a cookie jar.
-pub struct Delta<'a> {
-    iter: HashSetIter<'a, DeltaCookie>,
-}
-
-impl<'a> Iterator for Delta<'a> {
-    type Item = &'a Cookie<'static>;
-
-    fn next(&mut self) -> Option<&'a Cookie<'static>> {
-        self.iter.next().map(|c| &c.cookie)
-    }
-}
-
-use std::collections::hash_set::Union;
-use std::collections::hash_map::RandomState;
-
-/// Iterator over all of the cookies in a jar.
-pub struct Iter<'a> {
-    delta_cookies: Union<'a, DeltaCookie, RandomState>,
-}
-
-impl<'a> Iterator for Iter<'a> {
-    type Item = &'a Cookie<'static>;
-
-    fn next(&mut self) -> Option<&'a Cookie<'static>> {
-        for cookie in self.delta_cookies.by_ref() {
-            if !cookie.removed {
-                return Some(&*cookie);
-            }
-        }
-
-        None
-    }
-}
-
-#[cfg(test)]
-mod test {
-    use super::CookieJar;
-    use Cookie;
-
-    #[test]
-    #[allow(deprecated)]
-    fn simple() {
-        let mut c = CookieJar::new();
-
-        c.add(Cookie::new("test", ""));
-        c.add(Cookie::new("test2", ""));
-        c.remove(Cookie::named("test"));
-
-        assert!(c.get("test").is_none());
-        assert!(c.get("test2").is_some());
-
-        c.add(Cookie::new("test3", ""));
-        c.clear();
-
-        assert!(c.get("test").is_none());
-        assert!(c.get("test2").is_none());
-        assert!(c.get("test3").is_none());
-    }
-
-    #[test]
-    fn jar_is_send() {
-        fn is_send<T: Send>(_: T) -> bool {
-            true
-        }
-
-        assert!(is_send(CookieJar::new()))
-    }
-
-    #[test]
-    #[cfg(feature = "secure")]
-    fn iter() {
-        let key = ::Key::generate();
-        let mut c = CookieJar::new();
-
-        c.add_original(Cookie::new("original", "original"));
-
-        c.add(Cookie::new("test", "test"));
-        c.add(Cookie::new("test2", "test2"));
-        c.add(Cookie::new("test3", "test3"));
-        assert_eq!(c.iter().count(), 4);
-
-        c.signed(&key).add(Cookie::new("signed", "signed"));
-        c.private(&key).add(Cookie::new("encrypted", "encrypted"));
-        assert_eq!(c.iter().count(), 6);
-
-        c.remove(Cookie::named("test"));
-        assert_eq!(c.iter().count(), 5);
-
-        c.remove(Cookie::named("signed"));
-        c.remove(Cookie::named("test2"));
-        assert_eq!(c.iter().count(), 3);
-
-        c.add(Cookie::new("test2", "test2"));
-        assert_eq!(c.iter().count(), 4);
-
-        c.remove(Cookie::named("test2"));
-        assert_eq!(c.iter().count(), 3);
-    }
-
-    #[test]
-    #[cfg(feature = "secure")]
-    fn delta() {
-        use std::collections::HashMap;
-        use time::Duration;
-
-        let mut c = CookieJar::new();
-
-        c.add_original(Cookie::new("original", "original"));
-        c.add_original(Cookie::new("original1", "original1"));
-
-        c.add(Cookie::new("test", "test"));
-        c.add(Cookie::new("test2", "test2"));
-        c.add(Cookie::new("test3", "test3"));
-        c.add(Cookie::new("test4", "test4"));
-
-        c.remove(Cookie::named("test"));
-        c.remove(Cookie::named("original"));
-
-        assert_eq!(c.delta().count(), 4);
-
-        let names: HashMap<_, _> = c.delta()
-            .map(|c| (c.name(), c.max_age()))
-            .collect();
-
-        assert!(names.get("test2").unwrap().is_none());
-        assert!(names.get("test3").unwrap().is_none());
-        assert!(names.get("test4").unwrap().is_none());
-        assert_eq!(names.get("original").unwrap(), &Some(Duration::seconds(0)));
-    }
-
-    #[test]
-    fn replace_original() {
-        let mut jar = CookieJar::new();
-        jar.add_original(Cookie::new("original_a", "a"));
-        jar.add_original(Cookie::new("original_b", "b"));
-        assert_eq!(jar.get("original_a").unwrap().value(), "a");
-
-        jar.add(Cookie::new("original_a", "av2"));
-        assert_eq!(jar.get("original_a").unwrap().value(), "av2");
-    }
-
-    #[test]
-    fn empty_delta() {
-        let mut jar = CookieJar::new();
-        jar.add(Cookie::new("name", "val"));
-        assert_eq!(jar.delta().count(), 1);
-
-        jar.remove(Cookie::named("name"));
-        assert_eq!(jar.delta().count(), 0);
-
-        jar.add_original(Cookie::new("name", "val"));
-        assert_eq!(jar.delta().count(), 0);
-
-        jar.remove(Cookie::named("name"));
-        assert_eq!(jar.delta().count(), 1);
-
-        jar.add(Cookie::new("name", "val"));
-        assert_eq!(jar.delta().count(), 1);
-
-        jar.remove(Cookie::named("name"));
-        assert_eq!(jar.delta().count(), 1);
-    }
-
-    #[test]
-    fn add_remove_add() {
-        let mut jar = CookieJar::new();
-        jar.add_original(Cookie::new("name", "val"));
-        assert_eq!(jar.delta().count(), 0);
-
-        jar.remove(Cookie::named("name"));
-        assert_eq!(jar.delta().filter(|c| c.value().is_empty()).count(), 1);
-        assert_eq!(jar.delta().count(), 1);
-
-        // The cookie's been deleted. Another original doesn't change that.
-        jar.add_original(Cookie::new("name", "val"));
-        assert_eq!(jar.delta().filter(|c| c.value().is_empty()).count(), 1);
-        assert_eq!(jar.delta().count(), 1);
-
-        jar.remove(Cookie::named("name"));
-        assert_eq!(jar.delta().filter(|c| c.value().is_empty()).count(), 1);
-        assert_eq!(jar.delta().count(), 1);
-
-        jar.add(Cookie::new("name", "val"));
-        assert_eq!(jar.delta().filter(|c| !c.value().is_empty()).count(), 1);
-        assert_eq!(jar.delta().count(), 1);
-
-        jar.remove(Cookie::named("name"));
-        assert_eq!(jar.delta().filter(|c| c.value().is_empty()).count(), 1);
-        assert_eq!(jar.delta().count(), 1);
-    }
-
-    #[test]
-    fn replace_remove() {
-        let mut jar = CookieJar::new();
-        jar.add_original(Cookie::new("name", "val"));
-        assert_eq!(jar.delta().count(), 0);
-
-        jar.add(Cookie::new("name", "val"));
-        assert_eq!(jar.delta().count(), 1);
-        assert_eq!(jar.delta().filter(|c| !c.value().is_empty()).count(), 1);
-
-        jar.remove(Cookie::named("name"));
-        assert_eq!(jar.delta().filter(|c| c.value().is_empty()).count(), 1);
-    }
-
-    #[test]
-    fn remove_with_path() {
-        let mut jar = CookieJar::new();
-        jar.add_original(Cookie::build("name", "val").finish());
-        assert_eq!(jar.iter().count(), 1);
-        assert_eq!(jar.delta().count(), 0);
-        assert_eq!(jar.iter().filter(|c| c.path().is_none()).count(), 1);
-
-        jar.remove(Cookie::build("name", "").path("/").finish());
-        assert_eq!(jar.iter().count(), 0);
-        assert_eq!(jar.delta().count(), 1);
-        assert_eq!(jar.delta().filter(|c| c.value().is_empty()).count(), 1);
-        assert_eq!(jar.delta().filter(|c| c.path() == Some("/")).count(), 1);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/cookie-0.9.1/src/lib.rs
+++ /dev/null
@@ -1,1063 +0,0 @@
-//! HTTP cookie parsing and cookie jar management.
-//!
-//! This crates provides the [`Cookie`](struct.Cookie.html) type, which directly
-//! maps to an HTTP cookie, and the [`CookieJar`](struct.CookieJar.html) type,
-//! which allows for simple management of many cookies as well as encryption and
-//! signing of cookies for session management.
-//!
-//! # Usage
-//!
-//! Add the following to the `[dependencies]` section of your `Cargo.toml`:
-//!
-//! ```ignore
-//! cookie = "0.9"
-//! ```
-//!
-//! Then add the following line to your crate root:
-//!
-//! ```ignore
-//! extern crate cookie;
-//! ```
-//!
-//! # Features
-//!
-//! This crates can be configured at compile-time through the following Cargo
-//! features:
-//!
-//!
-//! * **secure** (disabled by default)
-//!
-//!   Enables signed and private (signed + encrypted) cookie jars.
-//!
-//!   When this feature is enabled, the
-//!   [signed](struct.CookieJar.html#method.signed) and
-//!   [private](struct.CookieJar.html#method.private) method of `CookieJar` and
-//!   [`SignedJar`](struct.SignedJar.html) and
-//!   [`PrivateJar`](struct.PrivateJar.html) structures are available. The jars
-//!   act as "children jars", allowing for easy retrieval and addition of signed
-//!   and/or encrypted cookies to a cookie jar. When this feature is disabled,
-//!   none of the types are available.
-//!
-//! * **percent-encode** (disabled by default)
-//!
-//!   Enables percent encoding and decoding of names and values in cookies.
-//!
-//!   When this feature is enabled, the
-//!   [encoded](struct.Cookie.html#method.encoded) and
-//!   [`parse_encoded`](struct.Cookie.html#method.parse_encoded) methods of
-//!   `Cookie` become available. The `encoded` method returns a wrapper around a
-//!   `Cookie` whose `Display` implementation percent-encodes the name and value
-//!   of the cookie. The `parse_encoded` method percent-decodes the name and
-//!   value of a `Cookie` during parsing. When this feature is disabled, the
-//!   `encoded` and `parse_encoded` methods are not available.
-//!
-//! You can enable features via the `Cargo.toml` file:
-//!
-//! ```ignore
-//! [dependencies.cookie]
-//! features = ["secure", "percent-encode"]
-//! ```
-
-#![doc(html_root_url = "https://docs.rs/cookie/0.9")]
-#![deny(missing_docs)]
-
-#[cfg(feature = "percent-encode")] extern crate url;
-extern crate time;
-
-mod builder;
-mod parse;
-mod jar;
-mod delta;
-mod draft;
-
-#[cfg(feature = "secure")] #[macro_use] mod secure;
-#[cfg(feature = "secure")] pub use secure::*;
-
-use std::borrow::Cow;
-use std::ascii::AsciiExt;
-use std::fmt;
-use std::str::FromStr;
-
-#[cfg(feature = "percent-encode")]
-use url::percent_encoding::{USERINFO_ENCODE_SET, percent_encode};
-use time::{Tm, Duration};
-
-use parse::parse_cookie;
-pub use parse::ParseError;
-pub use builder::CookieBuilder;
-pub use jar::{CookieJar, Delta, Iter};
-pub use draft::*;
-
-#[derive(Debug, Clone)]
-enum CookieStr {
-    /// An string derived from indexes (start, end).
-    Indexed(usize, usize),
-    /// A string derived from a concrete string.
-    Concrete(Cow<'static, str>),
-}
-
-impl CookieStr {
-    /// Retrieves the string `self` corresponds to. If `self` is derived from
-    /// indexes, the corresponding subslice of `string` is returned. Otherwise,
-    /// the concrete string is returned.
-    ///
-    /// # Panics
-    ///
-    /// Panics if `self` is an indexed string and `string` is None.
-    fn to_str<'s>(&'s self, string: Option<&'s Cow<str>>) -> &'s str {
-        match *self {
-            CookieStr::Indexed(i, j) => {
-                let s = string.expect("`Some` base string must exist when \
-                    converting indexed str to str! (This is a module invariant.)");
-                &s[i..j]
-            },
-            CookieStr::Concrete(ref cstr) => &*cstr,
-        }
-    }
-
-    fn to_raw_str<'s, 'c: 's>(&'s self, string: &'s Cow<'c, str>) -> Option<&'c str> {
-        match *self {
-            CookieStr::Indexed(i, j) => {
-                match *string {
-                    Cow::Borrowed(s) => Some(&s[i..j]),
-                    Cow::Owned(_) => None,
-                }
-            },
-            CookieStr::Concrete(_) => None,
-        }
-    }
-}
-
-/// Representation of an HTTP cookie.
-///
-/// # Constructing a `Cookie`
-///
-/// To construct a cookie with only a name/value, use the [new](#method.new)
-/// method:
-///
-/// ```rust
-/// use cookie::Cookie;
-///
-/// let cookie = Cookie::new("name", "value");
-/// assert_eq!(&cookie.to_string(), "name=value");
-/// ```
-///
-/// To construct more elaborate cookies, use the [build](#method.build) method
-/// and [`CookieBuilder`](struct.CookieBuilder.html) methods:
-///
-/// ```rust
-/// use cookie::Cookie;
-///
-/// let cookie = Cookie::build("name", "value")
-///     .domain("www.rust-lang.org")
-///     .path("/")
-///     .secure(true)
-///     .http_only(true)
-///     .finish();
-/// ```
-#[derive(Debug, Clone)]
-pub struct Cookie<'c> {
-    /// Storage for the cookie string. Only used if this structure was derived
-    /// from a string that was subsequently parsed.
-    cookie_string: Option<Cow<'c, str>>,
-    /// The cookie's name.
-    name: CookieStr,
-    /// The cookie's value.
-    value: CookieStr,
-    /// The cookie's experiation, if any.
-    expires: Option<Tm>,
-    /// The cookie's maximum age, if any.
-    max_age: Option<Duration>,
-    /// The cookie's domain, if any.
-    domain: Option<CookieStr>,
-    /// The cookie's path domain, if any.
-    path: Option<CookieStr>,
-    /// Whether this cookie was marked secure.
-    secure: bool,
-    /// Whether this cookie was marked httponly.
-    http_only: bool,
-    /// The draft `SameSite` attribute.
-    same_site: Option<SameSite>,
-}
-
-impl Cookie<'static> {
-    /// Creates a new `Cookie` with the given name and value.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::Cookie;
-    ///
-    /// let cookie = Cookie::new("name", "value");
-    /// assert_eq!(cookie.name_value(), ("name", "value"));
-    /// ```
-    pub fn new<N, V>(name: N, value: V) -> Cookie<'static>
-        where N: Into<Cow<'static, str>>,
-              V: Into<Cow<'static, str>>
-    {
-        Cookie {
-            cookie_string: None,
-            name: CookieStr::Concrete(name.into()),
-            value: CookieStr::Concrete(value.into()),
-            expires: None,
-            max_age: None,
-            domain: None,
-            path: None,
-            secure: false,
-            http_only: false,
-            same_site: None,
-        }
-    }
-
-    /// Creates a new `Cookie` with the given name and an empty value.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::Cookie;
-    ///
-    /// let cookie = Cookie::named("name");
-    /// assert_eq!(cookie.name(), "name");
-    /// assert!(cookie.value().is_empty());
-    /// ```
-    pub fn named<N>(name: N) -> Cookie<'static>
-        where N: Into<Cow<'static, str>>
-    {
-        Cookie::new(name, "")
-    }
-
-    /// Creates a new `CookieBuilder` instance from the given key and value
-    /// strings.
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// use cookie::Cookie;
-    ///
-    /// let c = Cookie::build("foo", "bar").finish();
-    /// assert_eq!(c.name_value(), ("foo", "bar"));
-    /// ```
-    pub fn build<N, V>(name: N, value: V) -> CookieBuilder
-        where N: Into<Cow<'static, str>>,
-              V: Into<Cow<'static, str>>
-    {
-        CookieBuilder::new(name, value)
-    }
-}
-
-impl<'c> Cookie<'c> {
-    /// Parses a `Cookie` from the given HTTP cookie header value string. Does
-    /// not perform any percent-decoding.
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// use cookie::Cookie;
-    ///
-    /// let c = Cookie::parse("foo=bar%20baz; HttpOnly").unwrap();
-    /// assert_eq!(c.name_value(), ("foo", "bar%20baz"));
-    /// assert_eq!(c.http_only(), true);
-    /// ```
-    pub fn parse<S>(s: S) -> Result<Cookie<'c>, ParseError>
-        where S: Into<Cow<'c, str>>
-    {
-        parse_cookie(s, false)
-    }
-
-    /// Parses a `Cookie` from the given HTTP cookie header value string where
-    /// the name and value fields are percent-encoded. Percent-decodes the
-    /// name/value fields.
-    ///
-    /// This API requires the `percent-encode` feature to be enabled on this
-    /// crate.
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// use cookie::Cookie;
-    ///
-    /// let c = Cookie::parse_encoded("foo=bar%20baz; HttpOnly").unwrap();
-    /// assert_eq!(c.name_value(), ("foo", "bar baz"));
-    /// assert_eq!(c.http_only(), true);
-    /// ```
-    #[cfg(feature = "percent-encode")]
-    pub fn parse_encoded<S>(s: S) -> Result<Cookie<'c>, ParseError>
-        where S: Into<Cow<'c, str>>
-    {
-        parse_cookie(s, true)
-    }
-
-    /// Wraps `self` in an `EncodedCookie`: a cost-free wrapper around `Cookie`
-    /// whose `Display` implementation percent-encodes the name and value of the
-    /// wrapped `Cookie`.
-    ///
-    /// This method is only available when the `percent-encode` feature is
-    /// enabled.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::Cookie;
-    ///
-    /// let mut c = Cookie::new("my name", "this; value?");
-    /// assert_eq!(&c.encoded().to_string(), "my%20name=this%3B%20value%3F");
-    /// ```
-    #[cfg(feature = "percent-encode")]
-    pub fn encoded<'a>(&'a self) -> EncodedCookie<'a, 'c> {
-        EncodedCookie(self)
-    }
-
-    /// Converts `self` into a `Cookie` with a static lifetime. This method
-    /// results in at most one allocation.
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// use cookie::Cookie;
-    ///
-    /// let c = Cookie::new("a", "b");
-    /// let owned_cookie = c.into_owned();
-    /// assert_eq!(owned_cookie.name_value(), ("a", "b"));
-    /// ```
-    pub fn into_owned(self) -> Cookie<'static> {
-        Cookie {
-            cookie_string: self.cookie_string.map(|s| s.into_owned().into()),
-            name: self.name,
-            value: self.value,
-            expires: self.expires,
-            max_age: self.max_age,
-            domain: self.domain,
-            path: self.path,
-            secure: self.secure,
-            http_only: self.http_only,
-            same_site: self.same_site,
-        }
-    }
-
-    /// Returns the name of `self`.
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// use cookie::Cookie;
-    ///
-    /// let c = Cookie::new("name", "value");
-    /// assert_eq!(c.name(), "name");
-    /// ```
-    #[inline]
-    pub fn name(&self) -> &str {
-        self.name.to_str(self.cookie_string.as_ref())
-    }
-
-    /// Returns the value of `self`.
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// use cookie::Cookie;
-    ///
-    /// let c = Cookie::new("name", "value");
-    /// assert_eq!(c.value(), "value");
-    /// ```
-    #[inline]
-    pub fn value(&self) -> &str {
-        self.value.to_str(self.cookie_string.as_ref())
-    }
-
-    /// Returns the name and value of `self` as a tuple of `(name, value)`.
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// use cookie::Cookie;
-    ///
-    /// let c = Cookie::new("name", "value");
-    /// assert_eq!(c.name_value(), ("name", "value"));
-    /// ```
-    #[inline]
-    pub fn name_value(&self) -> (&str, &str) {
-        (self.name(), self.value())
-    }
-
-    /// Returns whether this cookie was marked `HttpOnly` or not.
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// use cookie::Cookie;
-    ///
-    /// let c = Cookie::parse("name=value; httponly").unwrap();
-    /// assert_eq!(c.http_only(), true);
-    /// ```
-    #[inline]
-    pub fn http_only(&self) -> bool {
-        self.http_only
-    }
-
-    /// Returns whether this cookie was marked `Secure` or not.
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// use cookie::Cookie;
-    ///
-    /// let c = Cookie::parse("name=value; Secure").unwrap();
-    /// assert_eq!(c.secure(), true);
-    /// ```
-    #[inline]
-    pub fn secure(&self) -> bool {
-        self.secure
-    }
-
-    /// Returns the `SameSite` attribute of this cookie if one was specified.
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// use cookie::{Cookie, SameSite};
-    ///
-    /// let c = Cookie::parse("name=value; SameSite=Lax").unwrap();
-    /// assert_eq!(c.same_site(), Some(SameSite::Lax));
-    /// ```
-    #[inline]
-    pub fn same_site(&self) -> Option<SameSite> {
-        self.same_site
-    }
-
-    /// Returns the specified max-age of the cookie if one was specified.
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// use cookie::Cookie;
-    ///
-    /// let c = Cookie::parse("name=value").unwrap();
-    /// assert_eq!(c.max_age(), None);
-    ///
-    /// let c = Cookie::parse("name=value; Max-Age=3600").unwrap();
-    /// assert_eq!(c.max_age().map(|age| age.num_hours()), Some(1));
-    /// ```
-    #[inline]
-    pub fn max_age(&self) -> Option<Duration> {
-        self.max_age
-    }
-
-    /// Returns the `Path` of the cookie if one was specified.
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// use cookie::Cookie;
-    ///
-    /// let c = Cookie::parse("name=value").unwrap();
-    /// assert_eq!(c.path(), None);
-    ///
-    /// let c = Cookie::parse("name=value; Path=/").unwrap();
-    /// assert_eq!(c.path(), Some("/"));
-    ///
-    /// let c = Cookie::parse("name=value; path=/sub").unwrap();
-    /// assert_eq!(c.path(), Some("/sub"));
-    /// ```
-    #[inline]
-    pub fn path(&self) -> Option<&str> {
-        match self.path {
-            Some(ref c) => Some(c.to_str(self.cookie_string.as_ref())),
-            None => None,
-        }
-    }
-
-    /// Returns the `Domain` of the cookie if one was specified.
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// use cookie::Cookie;
-    ///
-    /// let c = Cookie::parse("name=value").unwrap();
-    /// assert_eq!(c.domain(), None);
-    ///
-    /// let c = Cookie::parse("name=value; Domain=crates.io").unwrap();
-    /// assert_eq!(c.domain(), Some("crates.io"));
-    /// ```
-    #[inline]
-    pub fn domain(&self) -> Option<&str> {
-        match self.domain {
-            Some(ref c) => Some(c.to_str(self.cookie_string.as_ref())),
-            None => None,
-        }
-    }
-
-    /// Returns the `Expires` time of the cookie if one was specified.
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// use cookie::Cookie;
-    ///
-    /// let c = Cookie::parse("name=value").unwrap();
-    /// assert_eq!(c.expires(), None);
-    ///
-    /// let expire_time = "Wed, 21 Oct 2017 07:28:00 GMT";
-    /// let cookie_str = format!("name=value; Expires={}", expire_time);
-    /// let c = Cookie::parse(cookie_str).unwrap();
-    /// assert_eq!(c.expires().map(|t| t.tm_year), Some(117));
-    /// ```
-    #[inline]
-    pub fn expires(&self) -> Option<Tm> {
-        self.expires
-    }
-
-    /// Sets the name of `self` to `name`.
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// use cookie::Cookie;
-    ///
-    /// let mut c = Cookie::new("name", "value");
-    /// assert_eq!(c.name(), "name");
-    ///
-    /// c.set_name("foo");
-    /// assert_eq!(c.name(), "foo");
-    /// ```
-    pub fn set_name<N: Into<Cow<'static, str>>>(&mut self, name: N) {
-        self.name = CookieStr::Concrete(name.into())
-    }
-
-    /// Sets the value of `self` to `value`.
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// use cookie::Cookie;
-    ///
-    /// let mut c = Cookie::new("name", "value");
-    /// assert_eq!(c.value(), "value");
-    ///
-    /// c.set_value("bar");
-    /// assert_eq!(c.value(), "bar");
-    /// ```
-    pub fn set_value<V: Into<Cow<'static, str>>>(&mut self, value: V) {
-        self.value = CookieStr::Concrete(value.into())
-    }
-
-    /// Sets the value of `http_only` in `self` to `value`.
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// use cookie::Cookie;
-    ///
-    /// let mut c = Cookie::new("name", "value");
-    /// assert_eq!(c.http_only(), false);
-    ///
-    /// c.set_http_only(true);
-    /// assert_eq!(c.http_only(), true);
-    /// ```
-    #[inline]
-    pub fn set_http_only(&mut self, value: bool) {
-        self.http_only = value;
-    }
-
-    /// Sets the value of `secure` in `self` to `value`.
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// use cookie::Cookie;
-    ///
-    /// let mut c = Cookie::new("name", "value");
-    /// assert_eq!(c.secure(), false);
-    ///
-    /// c.set_secure(true);
-    /// assert_eq!(c.secure(), true);
-    /// ```
-    #[inline]
-    pub fn set_secure(&mut self, value: bool) {
-        self.secure = value;
-    }
-
-    /// Sets the value of `same_site` in `self` to `value`.
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// use cookie::{Cookie, SameSite};
-    ///
-    /// let mut c = Cookie::new("name", "value");
-    /// assert!(c.same_site().is_none());
-    ///
-    /// c.set_same_site(SameSite::Strict);
-    /// assert_eq!(c.same_site(), Some(SameSite::Strict));
-    /// ```
-    #[inline]
-    pub fn set_same_site(&mut self, value: SameSite) {
-        self.same_site = Some(value);
-    }
-
-    /// Sets the value of `max_age` in `self` to `value`.
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// # extern crate cookie;
-    /// extern crate time;
-    ///
-    /// use cookie::Cookie;
-    /// use time::Duration;
-    ///
-    /// # fn main() {
-    /// let mut c = Cookie::new("name", "value");
-    /// assert_eq!(c.max_age(), None);
-    ///
-    /// c.set_max_age(Duration::hours(10));
-    /// assert_eq!(c.max_age(), Some(Duration::hours(10)));
-    /// # }
-    /// ```
-    #[inline]
-    pub fn set_max_age(&mut self, value: Duration) {
-        self.max_age = Some(value);
-    }
-
-    /// Sets the `path` of `self` to `path`.
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// use cookie::Cookie;
-    ///
-    /// let mut c = Cookie::new("name", "value");
-    /// assert_eq!(c.path(), None);
-    ///
-    /// c.set_path("/");
-    /// assert_eq!(c.path(), Some("/"));
-    /// ```
-    pub fn set_path<P: Into<Cow<'static, str>>>(&mut self, path: P) {
-        self.path = Some(CookieStr::Concrete(path.into()));
-    }
-
-    /// Sets the `domain` of `self` to `domain`.
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// use cookie::Cookie;
-    ///
-    /// let mut c = Cookie::new("name", "value");
-    /// assert_eq!(c.domain(), None);
-    ///
-    /// c.set_domain("rust-lang.org");
-    /// assert_eq!(c.domain(), Some("rust-lang.org"));
-    /// ```
-    pub fn set_domain<D: Into<Cow<'static, str>>>(&mut self, domain: D) {
-        self.domain = Some(CookieStr::Concrete(domain.into()));
-    }
-
-    /// Sets the expires field of `self` to `time`.
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// # extern crate cookie;
-    /// extern crate time;
-    ///
-    /// use cookie::Cookie;
-    ///
-    /// # fn main() {
-    /// let mut c = Cookie::new("name", "value");
-    /// assert_eq!(c.expires(), None);
-    ///
-    /// let mut now = time::now();
-    /// now.tm_year += 1;
-    ///
-    /// c.set_expires(now);
-    /// assert!(c.expires().is_some())
-    /// # }
-    /// ```
-    #[inline]
-    pub fn set_expires(&mut self, time: Tm) {
-        self.expires = Some(time);
-    }
-
-    /// Makes `self` a "permanent" cookie by extending its expiration and max
-    /// age 20 years into the future.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// # extern crate cookie;
-    /// extern crate time;
-    ///
-    /// use cookie::Cookie;
-    /// use time::Duration;
-    ///
-    /// # fn main() {
-    /// let mut c = Cookie::new("foo", "bar");
-    /// assert!(c.expires().is_none());
-    /// assert!(c.max_age().is_none());
-    ///
-    /// c.make_permanent();
-    /// assert!(c.expires().is_some());
-    /// assert_eq!(c.max_age(), Some(Duration::days(365 * 20)));
-    /// # }
-    /// ```
-    pub fn make_permanent(&mut self) {
-        let twenty_years = Duration::days(365 * 20);
-        self.set_max_age(twenty_years);
-        self.set_expires(time::now() + twenty_years);
-    }
-
-    fn fmt_parameters(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        if self.http_only() {
-            write!(f, "; HttpOnly")?;
-        }
-
-        if self.secure() {
-            write!(f, "; Secure")?;
-        }
-
-        if let Some(same_site) = self.same_site() {
-            write!(f, "; SameSite={}", same_site)?;
-        }
-
-        if let Some(path) = self.path() {
-            write!(f, "; Path={}", path)?;
-        }
-
-        if let Some(domain) = self.domain() {
-            write!(f, "; Domain={}", domain)?;
-        }
-
-        if let Some(max_age) = self.max_age() {
-            write!(f, "; Max-Age={}", max_age.num_seconds())?;
-        }
-
-        if let Some(time) = self.expires() {
-            write!(f, "; Expires={}", time.rfc822())?;
-        }
-
-        Ok(())
-    }
-
-    /// Returns the name of `self` as a string slice of the raw string `self`
-    /// was originally parsed from. If `self` was not originally parsed from a
-    /// raw string, returns `None`.
-    ///
-    /// This method differs from [name](#method.name) in that it returns a
-    /// string with the same lifetime as the originally parsed string. This
-    /// lifetime may outlive `self`. If a longer lifetime is not required, or
-    /// you're unsure if you need a longer lifetime, use [name](#method.name).
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// use cookie::Cookie;
-    ///
-    /// let cookie_string = format!("{}={}", "foo", "bar");
-    ///
-    /// // `c` will be dropped at the end of the scope, but `name` will live on
-    /// let name = {
-    ///     let c = Cookie::parse(cookie_string.as_str()).unwrap();
-    ///     c.name_raw()
-    /// };
-    ///
-    /// assert_eq!(name, Some("foo"));
-    /// ```
-    #[inline]
-    pub fn name_raw(&self) -> Option<&'c str> {
-        self.cookie_string.as_ref()
-            .and_then(|s| self.name.to_raw_str(s))
-    }
-
-    /// Returns the value of `self` as a string slice of the raw string `self`
-    /// was originally parsed from. If `self` was not originally parsed from a
-    /// raw string, returns `None`.
-    ///
-    /// This method differs from [value](#method.value) in that it returns a
-    /// string with the same lifetime as the originally parsed string. This
-    /// lifetime may outlive `self`. If a longer lifetime is not required, or
-    /// you're unsure if you need a longer lifetime, use [value](#method.value).
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// use cookie::Cookie;
-    ///
-    /// let cookie_string = format!("{}={}", "foo", "bar");
-    ///
-    /// // `c` will be dropped at the end of the scope, but `value` will live on
-    /// let value = {
-    ///     let c = Cookie::parse(cookie_string.as_str()).unwrap();
-    ///     c.value_raw()
-    /// };
-    ///
-    /// assert_eq!(value, Some("bar"));
-    /// ```
-    #[inline]
-    pub fn value_raw(&self) -> Option<&'c str> {
-        self.cookie_string.as_ref()
-            .and_then(|s| self.value.to_raw_str(s))
-    }
-
-    /// Returns the `Path` of `self` as a string slice of the raw string `self`
-    /// was originally parsed from. If `self` was not originally parsed from a
-    /// raw string, or if `self` doesn't contain a `Path`, or if the `Path` has
-    /// changed since parsing, returns `None`.
-    ///
-    /// This method differs from [path](#method.path) in that it returns a
-    /// string with the same lifetime as the originally parsed string. This
-    /// lifetime may outlive `self`. If a longer lifetime is not required, or
-    /// you're unsure if you need a longer lifetime, use [path](#method.path).
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// use cookie::Cookie;
-    ///
-    /// let cookie_string = format!("{}={}; Path=/", "foo", "bar");
-    ///
-    /// // `c` will be dropped at the end of the scope, but `path` will live on
-    /// let path = {
-    ///     let c = Cookie::parse(cookie_string.as_str()).unwrap();
-    ///     c.path_raw()
-    /// };
-    ///
-    /// assert_eq!(path, Some("/"));
-    /// ```
-    #[inline]
-    pub fn path_raw(&self) -> Option<&'c str> {
-        match (self.path.as_ref(), self.cookie_string.as_ref()) {
-            (Some(path), Some(string)) => path.to_raw_str(string),
-            _ => None,
-        }
-    }
-
-    /// Returns the `Domain` of `self` as a string slice of the raw string
-    /// `self` was originally parsed from. If `self` was not originally parsed
-    /// from a raw string, or if `self` doesn't contain a `Domain`, or if the
-    /// `Domain` has changed since parsing, returns `None`.
-    ///
-    /// This method differs from [domain](#method.domain) in that it returns a
-    /// string with the same lifetime as the originally parsed string. This
-    /// lifetime may outlive `self` struct. If a longer lifetime is not
-    /// required, or you're unsure if you need a longer lifetime, use
-    /// [domain](#method.domain).
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// use cookie::Cookie;
-    ///
-    /// let cookie_string = format!("{}={}; Domain=crates.io", "foo", "bar");
-    ///
-    /// //`c` will be dropped at the end of the scope, but `domain` will live on
-    /// let domain = {
-    ///     let c = Cookie::parse(cookie_string.as_str()).unwrap();
-    ///     c.domain_raw()
-    /// };
-    ///
-    /// assert_eq!(domain, Some("crates.io"));
-    /// ```
-    #[inline]
-    pub fn domain_raw(&self) -> Option<&'c str> {
-        match (self.domain.as_ref(), self.cookie_string.as_ref()) {
-            (Some(domain), Some(string)) => domain.to_raw_str(string),
-            _ => None,
-        }
-    }
-}
-
-/// Wrapper around `Cookie` whose `Display` implementation percent-encodes the
-/// cookie's name and value.
-///
-/// A value of this type can be obtained via the
-/// [encoded](struct.Cookie.html#method.encoded) method on
-/// [Cookie](struct.Cookie.html). This type should only be used for its
-/// `Display` implementation.
-///
-/// This type is only available when the `percent-encode` feature is enabled.
-///
-/// # Example
-///
-/// ```rust
-/// use cookie::Cookie;
-///
-/// let mut c = Cookie::new("my name", "this; value?");
-/// assert_eq!(&c.encoded().to_string(), "my%20name=this%3B%20value%3F");
-/// ```
-#[cfg(feature = "percent-encode")]
-pub struct EncodedCookie<'a, 'c: 'a>(&'a Cookie<'c>);
-
-#[cfg(feature = "percent-encode")]
-impl<'a, 'c: 'a> fmt::Display for EncodedCookie<'a, 'c> {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        // Percent-encode the name and value.
-        let name = percent_encode(self.0.name().as_bytes(), USERINFO_ENCODE_SET);
-        let value = percent_encode(self.0.value().as_bytes(), USERINFO_ENCODE_SET);
-
-        // Write out the name/value pair and the cookie's parameters.
-        write!(f, "{}={}", name, value)?;
-        self.0.fmt_parameters(f)
-    }
-}
-
-impl<'c> fmt::Display for Cookie<'c> {
-    /// Formats the cookie `self` as a `Set-Cookie` header value.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::Cookie;
-    ///
-    /// let mut cookie = Cookie::build("foo", "bar")
-    ///     .path("/")
-    ///     .finish();
-    ///
-    /// assert_eq!(&cookie.to_string(), "foo=bar; Path=/");
-    /// ```
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "{}={}", self.name(), self.value())?;
-        self.fmt_parameters(f)
-    }
-}
-
-impl FromStr for Cookie<'static> {
-    type Err = ParseError;
-
-    fn from_str(s: &str) -> Result<Cookie<'static>, ParseError> {
-        Cookie::parse(s).map(|c| c.into_owned())
-    }
-}
-
-impl<'a, 'b> PartialEq<Cookie<'b>> for Cookie<'a> {
-    fn eq(&self, other: &Cookie<'b>) -> bool {
-        let so_far_so_good = self.name() == other.name()
-            && self.value() == other.value()
-            && self.http_only() == other.http_only()
-            && self.secure() == other.secure()
-            && self.max_age() == other.max_age()
-            && self.expires() == other.expires();
-
-        if !so_far_so_good {
-            return false;
-        }
-
-        match (self.path(), other.path()) {
-            (Some(a), Some(b)) if a.eq_ignore_ascii_case(b) => {}
-            (None, None) => {}
-            _ => return false,
-        };
-
-        match (self.domain(), other.domain()) {
-            (Some(a), Some(b)) if a.eq_ignore_ascii_case(b) => {}
-            (None, None) => {}
-            _ => return false,
-        };
-
-        true
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use ::{Cookie, SameSite};
-    use ::time::{strptime, Duration};
-
-    #[test]
-    fn format() {
-        let cookie = Cookie::new("foo", "bar");
-        assert_eq!(&cookie.to_string(), "foo=bar");
-
-        let cookie = Cookie::build("foo", "bar")
-            .http_only(true).finish();
-        assert_eq!(&cookie.to_string(), "foo=bar; HttpOnly");
-
-        let cookie = Cookie::build("foo", "bar")
-            .max_age(Duration::seconds(10)).finish();
-        assert_eq!(&cookie.to_string(), "foo=bar; Max-Age=10");
-
-        let cookie = Cookie::build("foo", "bar")
-            .secure(true).finish();
-        assert_eq!(&cookie.to_string(), "foo=bar; Secure");
-
-        let cookie = Cookie::build("foo", "bar")
-            .path("/").finish();
-        assert_eq!(&cookie.to_string(), "foo=bar; Path=/");
-
-        let cookie = Cookie::build("foo", "bar")
-            .domain("www.rust-lang.org").finish();
-        assert_eq!(&cookie.to_string(), "foo=bar; Domain=www.rust-lang.org");
-
-        let time_str = "Wed, 21 Oct 2015 07:28:00 GMT";
-        let expires = strptime(time_str, "%a, %d %b %Y %H:%M:%S %Z").unwrap();
-        let cookie = Cookie::build("foo", "bar")
-            .expires(expires).finish();
-        assert_eq!(&cookie.to_string(),
-                   "foo=bar; Expires=Wed, 21 Oct 2015 07:28:00 GMT");
-
-        let cookie = Cookie::build("foo", "bar")
-            .same_site(SameSite::Strict).finish();
-        assert_eq!(&cookie.to_string(), "foo=bar; SameSite=Strict");
-
-        let cookie = Cookie::build("foo", "bar")
-            .same_site(SameSite::Lax).finish();
-        assert_eq!(&cookie.to_string(), "foo=bar; SameSite=Lax");
-    }
-
-    #[test]
-    fn cookie_string_long_lifetimes() {
-        let cookie_string = "bar=baz; Path=/subdir; HttpOnly; Domain=crates.io".to_owned();
-        let (name, value, path, domain) = {
-            // Create a cookie passing a slice
-            let c = Cookie::parse(cookie_string.as_str()).unwrap();
-            (c.name_raw(), c.value_raw(), c.path_raw(), c.domain_raw())
-        };
-
-        assert_eq!(name, Some("bar"));
-        assert_eq!(value, Some("baz"));
-        assert_eq!(path, Some("/subdir"));
-        assert_eq!(domain, Some("crates.io"));
-    }
-
-    #[test]
-    fn owned_cookie_string() {
-        let cookie_string = "bar=baz; Path=/subdir; HttpOnly; Domain=crates.io".to_owned();
-        let (name, value, path, domain) = {
-            // Create a cookie passing an owned string
-            let c = Cookie::parse(cookie_string).unwrap();
-            (c.name_raw(), c.value_raw(), c.path_raw(), c.domain_raw())
-        };
-
-        assert_eq!(name, None);
-        assert_eq!(value, None);
-        assert_eq!(path, None);
-        assert_eq!(domain, None);
-    }
-
-    #[test]
-    fn owned_cookie_struct() {
-        let cookie_string = "bar=baz; Path=/subdir; HttpOnly; Domain=crates.io";
-        let (name, value, path, domain) = {
-            // Create an owned cookie
-            let c = Cookie::parse(cookie_string).unwrap().into_owned();
-
-            (c.name_raw(), c.value_raw(), c.path_raw(), c.domain_raw())
-        };
-
-        assert_eq!(name, None);
-        assert_eq!(value, None);
-        assert_eq!(path, None);
-        assert_eq!(domain, None);
-    }
-
-    #[test]
-    #[cfg(feature = "percent-encode")]
-    fn format_encoded() {
-        let cookie = Cookie::build("foo !?=", "bar;; a").finish();
-        let cookie_str = cookie.encoded().to_string();
-        assert_eq!(&cookie_str, "foo%20!%3F%3D=bar%3B%3B%20a");
-
-        let cookie = Cookie::parse_encoded(cookie_str).unwrap();
-        assert_eq!(cookie.name_value(), ("foo !?=", "bar;; a"));
-    }
-}
deleted file mode 100644
--- a/third_party/rust/cookie-0.9.1/src/parse.rs
+++ /dev/null
@@ -1,410 +0,0 @@
-use std::borrow::Cow;
-use std::cmp;
-use std::error::Error;
-use std::ascii::AsciiExt;
-use std::str::Utf8Error;
-use std::fmt;
-use std::convert::From;
-
-#[cfg(feature = "percent-encode")]
-use url::percent_encoding::percent_decode;
-use time::{self, Duration};
-
-use ::{Cookie, SameSite, CookieStr};
-
-/// Enum corresponding to a parsing error.
-#[derive(Debug, PartialEq, Eq, Clone, Copy)]
-pub enum ParseError {
-    /// The cookie did not contain a name/value pair.
-    MissingPair,
-    /// The cookie's name was empty.
-    EmptyName,
-    /// Decoding the cookie's name or value resulted in invalid UTF-8.
-    Utf8Error(Utf8Error),
-    /// It is discouraged to exhaustively match on this enum as its variants may
-    /// grow without a breaking-change bump in version numbers.
-    #[doc(hidden)]
-    __Nonexhasutive,
-}
-
-impl ParseError {
-    /// Returns a description of this error as a string
-    pub fn as_str(&self) -> &'static str {
-        match *self {
-            ParseError::MissingPair => "the cookie is missing a name/value pair",
-            ParseError::EmptyName => "the cookie's name is empty",
-            ParseError::Utf8Error(_) => {
-                "decoding the cookie's name or value resulted in invalid UTF-8"
-            }
-            ParseError::__Nonexhasutive => unreachable!("__Nonexhasutive ParseError"),
-        }
-    }
-}
-
-impl fmt::Display for ParseError {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "{}", self.as_str())
-    }
-}
-
-impl From<Utf8Error> for ParseError {
-    fn from(error: Utf8Error) -> ParseError {
-        ParseError::Utf8Error(error)
-    }
-}
-
-impl Error for ParseError {
-    fn description(&self) -> &str {
-        self.as_str()
-    }
-}
-
-fn indexes_of(needle: &str, haystack: &str) -> Option<(usize, usize)> {
-    let haystack_start = haystack.as_ptr() as usize;
-    let needle_start = needle.as_ptr() as usize;
-
-    if needle_start < haystack_start {
-        return None;
-    }
-
-    if (needle_start + needle.len()) > (haystack_start + haystack.len()) {
-        return None;
-    }
-
-    let start = needle_start - haystack_start;
-    let end = start + needle.len();
-    Some((start, end))
-}
-
-#[cfg(feature = "percent-encode")]
-fn name_val_decoded(name: &str, val: &str) -> Result<(CookieStr, CookieStr), ParseError> {
-    let decoded_name = percent_decode(name.as_bytes()).decode_utf8()?;
-    let decoded_value = percent_decode(val.as_bytes()).decode_utf8()?;
-    let name = CookieStr::Concrete(Cow::Owned(decoded_name.into_owned()));
-    let val = CookieStr::Concrete(Cow::Owned(decoded_value.into_owned()));
-
-    Ok((name, val))
-}
-
-#[cfg(not(feature = "percent-encode"))]
-fn name_val_decoded(_: &str, _: &str) -> Result<(CookieStr, CookieStr), ParseError> {
-    unreachable!("This function should never be called when the feature is disabled!")
-}
-
-// This function does the real parsing but _does not_ set the `cookie_string` in
-// the returned cookie object. This only exists so that the borrow to `s` is
-// returned at the end of the call, allowing the `cookie_string` field to be
-// set in the outer `parse` function.
-fn parse_inner<'c>(s: &str, decode: bool) -> Result<Cookie<'c>, ParseError> {
-    let mut attributes = s.split(';');
-    let key_value = match attributes.next() {
-        Some(s) => s,
-        _ => panic!(),
-    };
-
-    // Determine the name = val.
-    let (name, value) = match key_value.find('=') {
-        Some(i) => (key_value[..i].trim(), key_value[(i + 1)..].trim()),
-        None => return Err(ParseError::MissingPair)
-    };
-
-    if name.is_empty() {
-        return Err(ParseError::EmptyName);
-    }
-
-    // Create a cookie with all of the defaults. We'll fill things in while we
-    // iterate through the parameters below.
-    let (name, value) = if decode {
-        name_val_decoded(name, value)?
-    } else {
-        let name_indexes = indexes_of(name, s).expect("name sub");
-        let value_indexes = indexes_of(value, s).expect("value sub");
-        let name = CookieStr::Indexed(name_indexes.0, name_indexes.1);
-        let value = CookieStr::Indexed(value_indexes.0, value_indexes.1);
-
-        (name, value)
-    };
-
-    let mut cookie = Cookie {
-        cookie_string: None,
-        name: name,
-        value: value,
-        expires: None,
-        max_age: None,
-        domain: None,
-        path: None,
-        secure: false,
-        http_only: false,
-        same_site: None
-    };
-
-    for attr in attributes {
-        let (key, value) = match attr.find('=') {
-            Some(i) => (attr[..i].trim(), Some(attr[(i + 1)..].trim())),
-            None => (attr.trim(), None),
-        };
-
-        match (&*key.to_ascii_lowercase(), value) {
-            ("secure", _) => cookie.secure = true,
-            ("httponly", _) => cookie.http_only = true,
-            ("max-age", Some(v)) => {
-                // See RFC 6265 Section 5.2.2, negative values indicate that the
-                // earliest possible expiration time should be used, so set the
-                // max age as 0 seconds.
-                cookie.max_age = match v.parse() {
-                    Ok(val) if val <= 0 => Some(Duration::zero()),
-                    Ok(val) => {
-                        // Don't panic if the max age seconds is greater than what's supported by
-                        // `Duration`.
-                        let val = cmp::min(val, Duration::max_value().num_seconds());
-                        Some(Duration::seconds(val))
-                    }
-                    Err(_) => continue,
-                };
-            }
-            ("domain", Some(mut domain)) if !domain.is_empty() => {
-                if domain.starts_with('.') {
-                    domain = &domain[1..];
-                }
-
-                let (i, j) = indexes_of(domain, s).expect("domain sub");
-                cookie.domain = Some(CookieStr::Indexed(i, j));
-            }
-            ("path", Some(v)) => {
-                let (i, j) = indexes_of(v, s).expect("path sub");
-                cookie.path = Some(CookieStr::Indexed(i, j));
-            }
-            ("samesite", Some(v)) => {
-                if v.eq_ignore_ascii_case("strict") {
-                    cookie.same_site = Some(SameSite::Strict);
-                } else if v.eq_ignore_ascii_case("lax") {
-                    cookie.same_site = Some(SameSite::Lax);
-                } else {
-                    // We do nothing here, for now. When/if the `SameSite`
-                    // attribute becomes standard, the spec says that we should
-                    // ignore this cookie, i.e, fail to parse it, when an
-                    // invalid value is passed in. The draft is at
-                    // http://httpwg.org/http-extensions/draft-ietf-httpbis-cookie-same-site.html.
-                }
-            }
-            ("expires", Some(v)) => {
-                // Try strptime with three date formats according to
-                // http://tools.ietf.org/html/rfc2616#section-3.3.1. Try
-                // additional ones as encountered in the real world.
-                let tm = time::strptime(v, "%a, %d %b %Y %H:%M:%S %Z")
-                    .or_else(|_| time::strptime(v, "%A, %d-%b-%y %H:%M:%S %Z"))
-                    .or_else(|_| time::strptime(v, "%a, %d-%b-%Y %H:%M:%S %Z"))
-                    .or_else(|_| time::strptime(v, "%a %b %d %H:%M:%S %Y"));
-
-                if let Ok(time) = tm {
-                    cookie.expires = Some(time)
-                }
-            }
-            _ => {
-                // We're going to be permissive here. If we have no idea what
-                // this is, then it's something nonstandard. We're not going to
-                // store it (because it's not compliant), but we're also not
-                // going to emit an error.
-            }
-        }
-    }
-
-    Ok(cookie)
-}
-
-pub fn parse_cookie<'c, S>(cow: S, decode: bool) -> Result<Cookie<'c>, ParseError>
-    where S: Into<Cow<'c, str>>
-{
-    let s = cow.into();
-    let mut cookie = parse_inner(&s, decode)?;
-    cookie.cookie_string = Some(s);
-    Ok(cookie)
-}
-
-#[cfg(test)]
-mod tests {
-    use ::{Cookie, SameSite};
-    use ::time::{strptime, Duration};
-
-    macro_rules! assert_eq_parse {
-        ($string:expr, $expected:expr) => (
-            let cookie = match Cookie::parse($string) {
-                Ok(cookie) => cookie,
-                Err(e) => panic!("Failed to parse {:?}: {:?}", $string, e)
-            };
-
-            assert_eq!(cookie, $expected);
-        )
-    }
-
-    macro_rules! assert_ne_parse {
-        ($string:expr, $expected:expr) => (
-            let cookie = match Cookie::parse($string) {
-                Ok(cookie) => cookie,
-                Err(e) => panic!("Failed to parse {:?}: {:?}", $string, e)
-            };
-
-            assert_ne!(cookie, $expected);
-        )
-    }
-
-    #[test]
-    fn parse_same_site() {
-        let expected = Cookie::build("foo", "bar")
-            .same_site(SameSite::Lax)
-            .finish();
-
-        assert_eq_parse!("foo=bar; SameSite=Lax", expected);
-        assert_eq_parse!("foo=bar; SameSite=lax", expected);
-        assert_eq_parse!("foo=bar; SameSite=LAX", expected);
-        assert_eq_parse!("foo=bar; samesite=Lax", expected);
-        assert_eq_parse!("foo=bar; SAMESITE=Lax", expected);
-
-        let expected = Cookie::build("foo", "bar")
-            .same_site(SameSite::Strict)
-            .finish();
-
-        assert_eq_parse!("foo=bar; SameSite=Strict", expected);
-        assert_eq_parse!("foo=bar; SameSITE=Strict", expected);
-        assert_eq_parse!("foo=bar; SameSite=strict", expected);
-        assert_eq_parse!("foo=bar; SameSite=STrICT", expected);
-        assert_eq_parse!("foo=bar; SameSite=STRICT", expected);
-    }
-
-    #[test]
-    fn parse() {
-        assert!(Cookie::parse("bar").is_err());
-        assert!(Cookie::parse("=bar").is_err());
-        assert!(Cookie::parse(" =bar").is_err());
-        assert!(Cookie::parse("foo=").is_ok());
-
-        let expected = Cookie::build("foo", "bar=baz").finish();
-        assert_eq_parse!("foo=bar=baz", expected);
-
-        let mut expected = Cookie::build("foo", "bar").finish();
-        assert_eq_parse!("foo=bar", expected);
-        assert_eq_parse!("foo = bar", expected);
-        assert_eq_parse!(" foo=bar ", expected);
-        assert_eq_parse!(" foo=bar ;Domain=", expected);
-        assert_eq_parse!(" foo=bar ;Domain= ", expected);
-        assert_eq_parse!(" foo=bar ;Ignored", expected);
-
-        let mut unexpected = Cookie::build("foo", "bar").http_only(false).finish();
-        assert_ne_parse!(" foo=bar ;HttpOnly", unexpected);
-        assert_ne_parse!(" foo=bar; httponly", unexpected);
-
-        expected.set_http_only(true);
-        assert_eq_parse!(" foo=bar ;HttpOnly", expected);
-        assert_eq_parse!(" foo=bar ;httponly", expected);
-        assert_eq_parse!(" foo=bar ;HTTPONLY=whatever", expected);
-        assert_eq_parse!(" foo=bar ; sekure; HTTPONLY", expected);
-
-        expected.set_secure(true);
-        assert_eq_parse!(" foo=bar ;HttpOnly; Secure", expected);
-        assert_eq_parse!(" foo=bar ;HttpOnly; Secure=aaaa", expected);
-
-        unexpected.set_http_only(true);
-        unexpected.set_secure(true);
-        assert_ne_parse!(" foo=bar ;HttpOnly; skeure", unexpected);
-        assert_ne_parse!(" foo=bar ;HttpOnly; =secure", unexpected);
-        assert_ne_parse!(" foo=bar ;HttpOnly;", unexpected);
-
-        unexpected.set_secure(false);
-        assert_ne_parse!(" foo=bar ;HttpOnly; secure", unexpected);
-        assert_ne_parse!(" foo=bar ;HttpOnly; secure", unexpected);
-        assert_ne_parse!(" foo=bar ;HttpOnly; secure", unexpected);
-
-        expected.set_max_age(Duration::zero());
-        assert_eq_parse!(" foo=bar ;HttpOnly; Secure; Max-Age=0", expected);
-        assert_eq_parse!(" foo=bar ;HttpOnly; Secure; Max-Age = 0 ", expected);
-        assert_eq_parse!(" foo=bar ;HttpOnly; Secure; Max-Age=-1", expected);
-        assert_eq_parse!(" foo=bar ;HttpOnly; Secure; Max-Age = -1 ", expected);
-
-        expected.set_max_age(Duration::minutes(1));
-        assert_eq_parse!(" foo=bar ;HttpOnly; Secure; Max-Age=60", expected);
-        assert_eq_parse!(" foo=bar ;HttpOnly; Secure; Max-Age =   60 ", expected);
-
-        expected.set_max_age(Duration::seconds(4));
-        assert_eq_parse!(" foo=bar ;HttpOnly; Secure; Max-Age=4", expected);
-        assert_eq_parse!(" foo=bar ;HttpOnly; Secure; Max-Age = 4 ", expected);
-
-        unexpected.set_secure(true);
-        unexpected.set_max_age(Duration::minutes(1));
-        assert_ne_parse!(" foo=bar ;HttpOnly; Secure; Max-Age=122", unexpected);
-        assert_ne_parse!(" foo=bar ;HttpOnly; Secure; Max-Age = 38 ", unexpected);
-        assert_ne_parse!(" foo=bar ;HttpOnly; Secure; Max-Age=51", unexpected);
-        assert_ne_parse!(" foo=bar ;HttpOnly; Secure; Max-Age = -1 ", unexpected);
-        assert_ne_parse!(" foo=bar ;HttpOnly; Secure; Max-Age = 0", unexpected);
-
-        expected.set_path("/");
-        assert_eq_parse!("foo=bar;HttpOnly; Secure; Max-Age=4; Path=/", expected);
-        assert_eq_parse!("foo=bar;HttpOnly; Secure; Max-Age=4;Path=/", expected);
-
-        expected.set_path("/foo");
-        assert_eq_parse!("foo=bar;HttpOnly; Secure; Max-Age=4; Path=/foo", expected);
-        assert_eq_parse!("foo=bar;HttpOnly; Secure; Max-Age=4;Path=/foo", expected);
-        assert_eq_parse!("foo=bar;HttpOnly; Secure; Max-Age=4;path=/foo", expected);
-        assert_eq_parse!("foo=bar;HttpOnly; Secure; Max-Age=4;path = /foo", expected);
-
-        unexpected.set_max_age(Duration::seconds(4));
-        unexpected.set_path("/bar");
-        assert_ne_parse!("foo=bar;HttpOnly; Secure; Max-Age=4; Path=/foo", unexpected);
-        assert_ne_parse!("foo=bar;HttpOnly; Secure; Max-Age=4;Path=/baz", unexpected);
-
-        expected.set_domain("www.foo.com");
-        assert_eq_parse!(" foo=bar ;HttpOnly; Secure; Max-Age=4; Path=/foo; \
-            Domain=www.foo.com", expected);
-
-        expected.set_domain("foo.com");
-        assert_eq_parse!(" foo=bar ;HttpOnly; Secure; Max-Age=4; Path=/foo; \
-            Domain=foo.com", expected);
-        assert_eq_parse!(" foo=bar ;HttpOnly; Secure; Max-Age=4; Path=/foo; \
-            Domain=FOO.COM", expected);
-
-        unexpected.set_path("/foo");
-        unexpected.set_domain("bar.com");
-        assert_ne_parse!(" foo=bar ;HttpOnly; Secure; Max-Age=4; Path=/foo; \
-            Domain=foo.com", unexpected);
-        assert_ne_parse!(" foo=bar ;HttpOnly; Secure; Max-Age=4; Path=/foo; \
-            Domain=FOO.COM", unexpected);
-
-        let time_str = "Wed, 21 Oct 2015 07:28:00 GMT";
-        let expires = strptime(time_str, "%a, %d %b %Y %H:%M:%S %Z").unwrap();
-        expected.set_expires(expires);
-        assert_eq_parse!(" foo=bar ;HttpOnly; Secure; Max-Age=4; Path=/foo; \
-            Domain=foo.com; Expires=Wed, 21 Oct 2015 07:28:00 GMT", expected);
-
-        unexpected.set_domain("foo.com");
-        let bad_expires = strptime(time_str, "%a, %d %b %Y %H:%S:%M %Z").unwrap();
-        expected.set_expires(bad_expires);
-        assert_ne_parse!(" foo=bar ;HttpOnly; Secure; Max-Age=4; Path=/foo; \
-            Domain=foo.com; Expires=Wed, 21 Oct 2015 07:28:00 GMT", unexpected);
-    }
-
-    #[test]
-    fn odd_characters() {
-        let expected = Cookie::new("foo", "b%2Fr");
-        assert_eq_parse!("foo=b%2Fr", expected);
-    }
-
-    #[test]
-    #[cfg(feature = "percent-encode")]
-    fn odd_characters_encoded() {
-        let expected = Cookie::new("foo", "b/r");
-        let cookie = match Cookie::parse_encoded("foo=b%2Fr") {
-            Ok(cookie) => cookie,
-            Err(e) => panic!("Failed to parse: {:?}", e)
-        };
-
-        assert_eq!(cookie, expected);
-    }
-
-    #[test]
-    fn do_not_panic_on_large_max_ages() {
-        let max_seconds = Duration::max_value().num_seconds();
-        let expected = Cookie::build("foo", "bar")
-            .max_age(Duration::seconds(max_seconds))
-            .finish();
-        assert_eq_parse!(format!(" foo=bar; Max-Age={:?}", max_seconds + 1), expected);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/cookie-0.9.1/src/secure/key.rs
+++ /dev/null
@@ -1,174 +0,0 @@
-use secure::ring::hkdf::expand;
-use secure::ring::digest::{SHA256, Algorithm};
-use secure::ring::hmac::SigningKey;
-use secure::ring::rand::{SecureRandom, SystemRandom};
-
-use secure::private::KEY_LEN as PRIVATE_KEY_LEN;
-use secure::signed::KEY_LEN as SIGNED_KEY_LEN;
-
-static HKDF_DIGEST: &'static Algorithm = &SHA256;
-const KEYS_INFO: &'static str = "COOKIE;SIGNED:HMAC-SHA256;PRIVATE:AEAD-AES-256-GCM";
-
-/// A cryptographic master key for use with `Signed` and/or `Private` jars.
-///
-/// This structure encapsulates secure, cryptographic keys for use with both
-/// [PrivateJar](struct.PrivateJar.html) and [SignedJar](struct.SignedJar.html).
-/// It can be derived from a single master key via
-/// [from_master](#method.from_master) or generated from a secure random source
-/// via [generate](#method.generate). A single instance of `Key` can be used for
-/// both a `PrivateJar` and a `SignedJar`.
-///
-/// This type is only available when the `secure` feature is enabled.
-#[derive(Clone)]
-pub struct Key {
-    signing_key: [u8; SIGNED_KEY_LEN],
-    encryption_key: [u8; PRIVATE_KEY_LEN]
-}
-
-impl Key {
-    /// Derives new signing/encryption keys from a master key.
-    ///
-    /// The master key must be at least 256-bits (32 bytes). For security, the
-    /// master key _must_ be cryptographically random. The keys are derived
-    /// deterministically from the master key.
-    ///
-    /// # Panics
-    ///
-    /// Panics if `key` is less than 32 bytes in length.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::Key;
-    ///
-    /// # /*
-    /// let master_key = { /* a cryptographically random key >= 32 bytes */ };
-    /// # */
-    /// # let master_key: &Vec<u8> = &(0..32).collect();
-    ///
-    /// let key = Key::from_master(master_key);
-    /// ```
-    pub fn from_master(key: &[u8]) -> Key {
-        if key.len() < 32 {
-            panic!("bad master key length: expected at least 32 bytes, found {}", key.len());
-        }
-
-        // Expand the user's key into two.
-        let prk = SigningKey::new(HKDF_DIGEST, key);
-        let mut both_keys = [0; SIGNED_KEY_LEN + PRIVATE_KEY_LEN];
-        expand(&prk, KEYS_INFO.as_bytes(), &mut both_keys);
-
-        // Copy the keys into their respective arrays.
-        let mut signing_key = [0; SIGNED_KEY_LEN];
-        let mut encryption_key = [0; PRIVATE_KEY_LEN];
-        signing_key.copy_from_slice(&both_keys[..SIGNED_KEY_LEN]);
-        encryption_key.copy_from_slice(&both_keys[SIGNED_KEY_LEN..]);
-
-        Key {
-            signing_key: signing_key,
-            encryption_key: encryption_key
-        }
-    }
-
-    /// Generates signing/encryption keys from a secure, random source. Keys are
-    /// generated nondeterministically.
-    ///
-    /// # Panics
-    ///
-    /// Panics if randomness cannot be retrieved from the operating system. See
-    /// [try_generate](#method.try_generate) for a non-panicking version.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::Key;
-    ///
-    /// let key = Key::generate();
-    /// ```
-    pub fn generate() -> Key {
-        Self::try_generate().expect("failed to generate `Key` from randomness")
-    }
-
-    /// Attempts to generate signing/encryption keys from a secure, random
-    /// source. Keys are generated nondeterministically. If randomness cannot be
-    /// retrieved from the underlying operating system, returns `None`.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::Key;
-    ///
-    /// let key = Key::try_generate();
-    /// ```
-    pub fn try_generate() -> Option<Key> {
-        let mut sign_key = [0; SIGNED_KEY_LEN];
-        let mut enc_key = [0; PRIVATE_KEY_LEN];
-
-        let rng = SystemRandom::new();
-        if rng.fill(&mut sign_key).is_err() || rng.fill(&mut enc_key).is_err() {
-            return None
-        }
-
-        Some(Key { signing_key: sign_key, encryption_key: enc_key })
-    }
-
-    /// Returns the raw bytes of a key suitable for signing cookies.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::Key;
-    ///
-    /// let key = Key::generate();
-    /// let signing_key = key.signing();
-    /// ```
-    pub fn signing(&self) -> &[u8] {
-        &self.signing_key[..]
-    }
-
-    /// Returns the raw bytes of a key suitable for encrypting cookies.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::Key;
-    ///
-    /// let key = Key::generate();
-    /// let encryption_key = key.encryption();
-    /// ```
-    pub fn encryption(&self) -> &[u8] {
-        &self.encryption_key[..]
-    }
-}
-
-#[cfg(test)]
-mod test {
-    use super::Key;
-
-    #[test]
-    fn deterministic_from_master() {
-        let master_key: Vec<u8> = (0..32).collect();
-
-        let key_a = Key::from_master(&master_key);
-        let key_b = Key::from_master(&master_key);
-
-        assert_eq!(key_a.signing(), key_b.signing());
-        assert_eq!(key_a.encryption(), key_b.encryption());
-        assert_ne!(key_a.encryption(), key_a.signing());
-
-        let master_key_2: Vec<u8> = (32..64).collect();
-        let key_2 = Key::from_master(&master_key_2);
-
-        assert_ne!(key_2.signing(), key_a.signing());
-        assert_ne!(key_2.encryption(), key_a.encryption());
-    }
-
-    #[test]
-    fn non_deterministic_generate() {
-        let key_a = Key::generate();
-        let key_b = Key::generate();
-
-        assert_ne!(key_a.signing(), key_b.signing());
-        assert_ne!(key_a.encryption(), key_b.encryption());
-    }
-}
deleted file mode 100644
--- a/third_party/rust/cookie-0.9.1/src/secure/macros.rs
+++ /dev/null
@@ -1,41 +0,0 @@
-#[cfg(test)]
-macro_rules! assert_simple_behaviour {
-    ($clear:expr, $secure:expr) => ({
-        assert_eq!($clear.iter().count(), 0);
-
-        $secure.add(Cookie::new("name", "val"));
-        assert_eq!($clear.iter().count(), 1);
-        assert_eq!($secure.get("name").unwrap().value(), "val");
-        assert_ne!($clear.get("name").unwrap().value(), "val");
-
-        $secure.add(Cookie::new("another", "two"));
-        assert_eq!($clear.iter().count(), 2);
-
-        $clear.remove(Cookie::named("another"));
-        assert_eq!($clear.iter().count(), 1);
-
-        $secure.remove(Cookie::named("name"));
-        assert_eq!($clear.iter().count(), 0);
-    })
-}
-
-#[cfg(test)]
-macro_rules! assert_secure_behaviour {
-    ($clear:expr, $secure:expr) => ({
-        $secure.add(Cookie::new("secure", "secure"));
-        assert!($clear.get("secure").unwrap().value() != "secure");
-        assert!($secure.get("secure").unwrap().value() == "secure");
-
-        let mut cookie = $clear.get("secure").unwrap().clone();
-        let new_val = format!("{}l", cookie.value());
-        cookie.set_value(new_val);
-        $clear.add(cookie);
-        assert!($secure.get("secure").is_none());
-
-        let mut cookie = $clear.get("secure").unwrap().clone();
-        cookie.set_value("foobar");
-        $clear.add(cookie);
-        assert!($secure.get("secure").is_none());
-    })
-}
-
deleted file mode 100644
--- a/third_party/rust/cookie-0.9.1/src/secure/mod.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-extern crate ring;
-extern crate base64;
-
-#[macro_use]
-mod macros;
-mod private;
-mod signed;
-mod key;
-
-pub use self::private::*;
-pub use self::signed::*;
-pub use self::key::*;
deleted file mode 100644
--- a/third_party/rust/cookie-0.9.1/src/secure/private.rs
+++ /dev/null
@@ -1,178 +0,0 @@
-use secure::ring::aead::{seal_in_place, open_in_place, Algorithm, AES_256_GCM};
-use secure::ring::aead::{OpeningKey, SealingKey};
-use secure::ring::rand::{SecureRandom, SystemRandom};
-use secure::{base64, Key};
-
-use {Cookie, CookieJar};
-
-// Keep these in sync, and keep the key len synced with the `private` docs as
-// well as the `KEYS_INFO` const in secure::Key.
-static ALGO: &'static Algorithm = &AES_256_GCM;
-const NONCE_LEN: usize = 12;
-pub const KEY_LEN: usize = 32;
-
-/// A child cookie jar that provides authenticated encryption for its cookies.
-///
-/// A _private_ child jar signs and encrypts all the cookies added to it and
-/// verifies and decrypts cookies retrieved from it. Any cookies stored in a
-/// `PrivateJar` are simultaneously assured confidentiality, integrity, and
-/// authenticity. In other words, clients cannot discover nor tamper with the
-/// contents of a cookie, nor can they fabricate cookie data.
-///
-/// This type is only available when the `secure` feature is enabled.
-pub struct PrivateJar<'a> {
-    parent: &'a mut CookieJar,
-    key: [u8; KEY_LEN]
-}
-
-impl<'a> PrivateJar<'a> {
-    /// Creates a new child `PrivateJar` with parent `parent` and key `key`.
-    /// This method is typically called indirectly via the `signed` method of
-    /// `CookieJar`.
-    #[doc(hidden)]
-    pub fn new(parent: &'a mut CookieJar, key: &Key) -> PrivateJar<'a> {
-        let mut key_array = [0u8; KEY_LEN];
-        key_array.copy_from_slice(key.encryption());
-        PrivateJar { parent: parent, key: key_array }
-    }
-
-    /// Given a sealed value `str` where the nonce is prepended to the original
-    /// value and then both are Base64 encoded, verifies and decrypts the sealed
-    /// value and returns it. If there's a problem, returns an `Err` with a
-    /// string describing the issue.
-    fn unseal(&self, value: &str) -> Result<String, &'static str> {
-        let mut data = base64::decode(value).map_err(|_| "bad base64 value")?;
-        if data.len() <= NONCE_LEN {
-            return Err("length of decoded data is <= NONCE_LEN");
-        }
-
-        let key = OpeningKey::new(ALGO, &self.key).expect("opening key");
-        let (nonce, sealed) = data.split_at_mut(NONCE_LEN);
-        let unsealed = open_in_place(&key, nonce, &[], 0, sealed)
-            .map_err(|_| "invalid key/nonce/value: bad seal")?;
-
-        ::std::str::from_utf8(unsealed)
-            .map(|s| s.to_string())
-            .map_err(|_| "bad unsealed utf8")
-    }
-
-    /// Returns a reference to the `Cookie` inside this jar with the name `name`
-    /// and authenticates and decrypts the cookie's value, returning a `Cookie`
-    /// with the decrypted value. If the cookie cannot be found, or the cookie
-    /// fails to authenticate or decrypt, `None` is returned.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::{CookieJar, Cookie, Key};
-    ///
-    /// let key = Key::generate();
-    /// let mut jar = CookieJar::new();
-    /// let mut private_jar = jar.private(&key);
-    /// assert!(private_jar.get("name").is_none());
-    ///
-    /// private_jar.add(Cookie::new("name", "value"));
-    /// assert_eq!(private_jar.get("name").unwrap().value(), "value");
-    /// ```
-    pub fn get(&self, name: &str) -> Option<Cookie<'static>> {
-        if let Some(cookie_ref) = self.parent.get(name) {
-            let mut cookie = cookie_ref.clone();
-            if let Ok(value) = self.unseal(cookie.value()) {
-                cookie.set_value(value);
-                return Some(cookie);
-            }
-        }
-
-        None
-    }
-
-    /// Adds `cookie` to the parent jar. The cookie's value is encrypted with
-    /// authenticated encryption assuring confidentiality, integrity, and
-    /// authenticity.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::{CookieJar, Cookie, Key};
-    ///
-    /// let key = Key::generate();
-    /// let mut jar = CookieJar::new();
-    /// jar.private(&key).add(Cookie::new("name", "value"));
-    ///
-    /// assert_ne!(jar.get("name").unwrap().value(), "value");
-    /// assert_eq!(jar.private(&key).get("name").unwrap().value(), "value");
-    /// ```
-    pub fn add(&mut self, mut cookie: Cookie<'static>) {
-        let mut data;
-        let output_len = {
-            // Create the `SealingKey` structure.
-            let key = SealingKey::new(ALGO, &self.key).expect("sealing key creation");
-
-            // Create a vec to hold the [nonce | cookie value | overhead].
-            let overhead = ALGO.tag_len();
-            let cookie_val = cookie.value().as_bytes();
-            data = vec![0; NONCE_LEN + cookie_val.len() + overhead];
-
-            // Randomly generate the nonce, then copy the cookie value as input.
-            let (nonce, in_out) = data.split_at_mut(NONCE_LEN);
-            SystemRandom::new().fill(nonce).expect("couldn't random fill nonce");
-            in_out[..cookie_val.len()].copy_from_slice(cookie_val);
-
-            // Perform the actual sealing operation and get the output length.
-            seal_in_place(&key, nonce, &[], in_out, overhead).expect("in-place seal")
-        };
-
-        // Base64 encode the nonce and encrypted value.
-        let sealed_value = base64::encode(&data[..(NONCE_LEN + output_len)]);
-        cookie.set_value(sealed_value);
-
-        // Add the sealed cookie to the parent.
-        self.parent.add(cookie);
-    }
-
-    /// Removes `cookie` from the parent jar.
-    ///
-    /// For correct removal, the passed in `cookie` must contain the same `path`
-    /// and `domain` as the cookie that was initially set.
-    ///
-    /// See [CookieJar::remove](struct.CookieJar.html#method.remove) for more
-    /// details.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::{CookieJar, Cookie, Key};
-    ///
-    /// let key = Key::generate();
-    /// let mut jar = CookieJar::new();
-    /// let mut private_jar = jar.private(&key);
-    ///
-    /// private_jar.add(Cookie::new("name", "value"));
-    /// assert!(private_jar.get("name").is_some());
-    ///
-    /// private_jar.remove(Cookie::named("name"));
-    /// assert!(private_jar.get("name").is_none());
-    /// ```
-    pub fn remove(&mut self, cookie: Cookie<'static>) {
-        self.parent.remove(cookie);
-    }
-}
-
-#[cfg(test)]
-mod test {
-    use {CookieJar, Cookie, Key};
-
-    #[test]
-    fn simple() {
-        let key = Key::generate();
-        let mut jar = CookieJar::new();
-        assert_simple_behaviour!(jar, jar.private(&key));
-    }
-
-    #[test]
-    fn private() {
-        let key = Key::generate();
-        let mut jar = CookieJar::new();
-        assert_secure_behaviour!(jar, jar.private(&key));
-    }
-}
deleted file mode 100644
--- a/third_party/rust/cookie-0.9.1/src/secure/signed.rs
+++ /dev/null
@@ -1,152 +0,0 @@
-use secure::ring::digest::{SHA256, Algorithm};
-use secure::ring::hmac::{SigningKey, sign, verify_with_own_key as verify};
-use secure::{base64, Key};
-
-use {Cookie, CookieJar};
-
-// Keep these in sync, and keep the key len synced with the `signed` docs as
-// well as the `KEYS_INFO` const in secure::Key.
-static HMAC_DIGEST: &'static Algorithm = &SHA256;
-const BASE64_DIGEST_LEN: usize = 44;
-pub const KEY_LEN: usize = 32;
-
-/// A child cookie jar that authenticates its cookies.
-///
-/// A _signed_ child jar signs all the cookies added to it and verifies cookies
-/// retrieved from it. Any cookies stored in a `SignedJar` are assured integrity
-/// and authenticity. In other words, clients cannot tamper with the contents of
-/// a cookie nor can they fabricate cookie values, but the data is visible in
-/// plaintext.
-///
-/// This type is only available when the `secure` feature is enabled.
-pub struct SignedJar<'a> {
-    parent: &'a mut CookieJar,
-    key: SigningKey
-}
-
-impl<'a> SignedJar<'a> {
-    /// Creates a new child `SignedJar` with parent `parent` and key `key`. This
-    /// method is typically called indirectly via the `signed` method of
-    /// `CookieJar`.
-    #[doc(hidden)]
-    pub fn new(parent: &'a mut CookieJar, key: &Key) -> SignedJar<'a> {
-        SignedJar { parent: parent, key: SigningKey::new(HMAC_DIGEST, key.signing()) }
-    }
-
-    /// Given a signed value `str` where the signature is prepended to `value`,
-    /// verifies the signed value and returns it. If there's a problem, returns
-    /// an `Err` with a string describing the issue.
-    fn verify(&self, cookie_value: &str) -> Result<String, &'static str> {
-        if cookie_value.len() < BASE64_DIGEST_LEN {
-            return Err("length of value is <= BASE64_DIGEST_LEN");
-        }
-
-        let (digest_str, value) = cookie_value.split_at(BASE64_DIGEST_LEN);
-        let sig = base64::decode(digest_str).map_err(|_| "bad base64 digest")?;
-
-        verify(&self.key, value.as_bytes(), &sig)
-            .map(|_| value.to_string())
-            .map_err(|_| "value did not verify")
-    }
-
-    /// Returns a reference to the `Cookie` inside this jar with the name `name`
-    /// and verifies the authenticity and integrity of the cookie's value,
-    /// returning a `Cookie` with the authenticated value. If the cookie cannot
-    /// be found, or the cookie fails to verify, `None` is returned.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::{CookieJar, Cookie, Key};
-    ///
-    /// let key = Key::generate();
-    /// let mut jar = CookieJar::new();
-    /// let mut signed_jar = jar.signed(&key);
-    /// assert!(signed_jar.get("name").is_none());
-    ///
-    /// signed_jar.add(Cookie::new("name", "value"));
-    /// assert_eq!(signed_jar.get("name").unwrap().value(), "value");
-    /// ```
-    pub fn get(&self, name: &str) -> Option<Cookie<'static>> {
-        if let Some(cookie_ref) = self.parent.get(name) {
-            let mut cookie = cookie_ref.clone();
-            if let Ok(value) = self.verify(cookie.value()) {
-                cookie.set_value(value);
-                return Some(cookie);
-            }
-        }
-
-        None
-    }
-
-    /// Adds `cookie` to the parent jar. The cookie's value is signed assuring
-    /// integrity and authenticity.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::{CookieJar, Cookie, Key};
-    ///
-    /// let key = Key::generate();
-    /// let mut jar = CookieJar::new();
-    /// jar.signed(&key).add(Cookie::new("name", "value"));
-    ///
-    /// assert_ne!(jar.get("name").unwrap().value(), "value");
-    /// assert!(jar.get("name").unwrap().value().contains("value"));
-    /// assert_eq!(jar.signed(&key).get("name").unwrap().value(), "value");
-    /// ```
-    pub fn add(&mut self, mut cookie: Cookie<'static>) {
-        let digest = sign(&self.key, cookie.value().as_bytes());
-        let mut new_value = base64::encode(digest.as_ref());
-        new_value.push_str(cookie.value());
-        cookie.set_value(new_value);
-
-        self.parent.add(cookie);
-    }
-
-    /// Removes `cookie` from the parent jar.
-    ///
-    /// For correct removal, the passed in `cookie` must contain the same `path`
-    /// and `domain` as the cookie that was initially set.
-    ///
-    /// See [CookieJar::remove](struct.CookieJar.html#method.remove) for more
-    /// details.
-    ///
-    /// # Example
-    ///
-    /// ```rust
-    /// use cookie::{CookieJar, Cookie, Key};
-    ///
-    /// let key = Key::generate();
-    /// let mut jar = CookieJar::new();
-    /// let mut signed_jar = jar.signed(&key);
-    ///
-    /// signed_jar.add(Cookie::new("name", "value"));
-    /// assert!(signed_jar.get("name").is_some());
-    ///
-    /// signed_jar.remove(Cookie::named("name"));
-    /// assert!(signed_jar.get("name").is_none());
-    /// ```
-    pub fn remove(&mut self, cookie: Cookie<'static>) {
-        self.parent.remove(cookie);
-    }
-}
-
-#[cfg(test)]
-mod test {
-    use {CookieJar, Cookie, Key};
-
-    #[test]
-    fn simple() {
-        let key = Key::generate();
-        let mut jar = CookieJar::new();
-        assert_simple_behaviour!(jar, jar.signed(&key));
-    }
-
-    #[test]
-    fn private() {
-        let key = Key::generate();
-        let mut jar = CookieJar::new();
-        assert_secure_behaviour!(jar, jar.signed(&key));
-    }
-}
--- a/third_party/rust/cookie/.cargo-checksum.json
+++ b/third_party/rust/cookie/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".travis.yml":"d2a9bb7c029e8ed0acfb8dc8e786014cfa4f053b6f4c525303d69fd7e28704e9","Cargo.toml":"8b893da0847ec4b48408daf72c3f85f0ece7a8aa25950133c350fc10e7cbcb9c","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"d4e2bab975203277cab1daa6560bd918fdc35e50a7a41a97a55eeea06526a441","src/builder.rs":"528640f717f5769e522a9ac066a994c21973ff3a5e9359d087f410233887c83c","src/delta.rs":"510fc3dbf0a70d635d0488c5a5a32a2ba8e1490ce05bee39d944ea8c02189bbc","src/draft.rs":"bd11960db08f4e4368937845fc18b842e474391738e4457a3441df2789c9d320","src/jar.rs":"98237c4a37143e08bcb6e84c5ed69b799a8a08f89a1b83f02c425cc92b089252","src/lib.rs":"c9713205a51c98138cdcf422313fde959d8bcabf483c4803f2ed6c755eb9f7d5","src/parse.rs":"ee46cee7fa445e6545f29eac3eac81e76ec29e9c53e000195af427c7315ee11c","src/secure/key.rs":"734f35ef4b0d6b63174befdcb970f0304ac63f0895871b7c2f267fefdd43b648","src/secure/macros.rs":"83d770e5c4eb7fbd3c3d86973b69042e9e2bb9fafb72a4456598e2ae78638d5f","src/secure/mod.rs":"5d7fecb62295827d474ed1ce6b7628fe93d4a09eb14babfde036d64e8e4a04f8","src/secure/private.rs":"ee114d603a7b97e6f78c09a3612be0afa2ff7aca5d68d728336797c8a36e8000","src/secure/signed.rs":"8440c9ce5a0be4e162fb502cd1fbe24572ce00709f5554c45f8bece39637590d"},"package":"477eb650753e319be2ae77ec368a58c638f9f0c4d941c39bad95e950fb1d1d0d"}
\ No newline at end of file
+{"files":{".travis.yml":"d2a9bb7c029e8ed0acfb8dc8e786014cfa4f053b6f4c525303d69fd7e28704e9","Cargo.toml":"58c04bac67faab6be97b59de07794082d3939573035d206bfdd097943a5db79c","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"d4e2bab975203277cab1daa6560bd918fdc35e50a7a41a97a55eeea06526a441","src/builder.rs":"528640f717f5769e522a9ac066a994c21973ff3a5e9359d087f410233887c83c","src/delta.rs":"510fc3dbf0a70d635d0488c5a5a32a2ba8e1490ce05bee39d944ea8c02189bbc","src/draft.rs":"bd11960db08f4e4368937845fc18b842e474391738e4457a3441df2789c9d320","src/jar.rs":"98237c4a37143e08bcb6e84c5ed69b799a8a08f89a1b83f02c425cc92b089252","src/lib.rs":"c9713205a51c98138cdcf422313fde959d8bcabf483c4803f2ed6c755eb9f7d5","src/parse.rs":"ee46cee7fa445e6545f29eac3eac81e76ec29e9c53e000195af427c7315ee11c","src/secure/key.rs":"734f35ef4b0d6b63174befdcb970f0304ac63f0895871b7c2f267fefdd43b648","src/secure/macros.rs":"83d770e5c4eb7fbd3c3d86973b69042e9e2bb9fafb72a4456598e2ae78638d5f","src/secure/mod.rs":"5d7fecb62295827d474ed1ce6b7628fe93d4a09eb14babfde036d64e8e4a04f8","src/secure/private.rs":"fbe9b8f79acaab9f9698298e7be57d3fcc33ca3fffbd13f576951b16f28cba60","src/secure/signed.rs":"8440c9ce5a0be4e162fb502cd1fbe24572ce00709f5554c45f8bece39637590d"},"package":"a54aa6d675d62b2f95b56b331b5222a520149a54f23a2d21974dfcc69caf0a9d"}
\ No newline at end of file
--- a/third_party/rust/cookie/Cargo.toml
+++ b/third_party/rust/cookie/Cargo.toml
@@ -7,34 +7,32 @@
 #
 # If you believe there's an error in this file please file an
 # issue against the rust-lang/cargo repository. If you're
 # editing this file be aware that the upstream Cargo.toml
 # will likely look very different (and much more reasonable)
 
 [package]
 name = "cookie"
-version = "0.9.2"
+version = "0.9.1"
 authors = ["Alex Crichton <alex@alexcrichton.com>", "Sergio Benitez <sb@sergio.bz>"]
 description = "Crate for parsing HTTP cookie headers and managing a cookie jar. Supports signed\nand private (encrypted + signed) jars.\n"
 documentation = "https://docs.rs/cookie"
 license = "MIT/Apache-2.0"
 repository = "https://github.com/alexcrichton/cookie-rs"
-[package.metadata.docs.rs]
-all-features = true
 [dependencies.url]
 version = "1.0"
 optional = true
 
+[dependencies.ring]
+version = "0.11.0"
+optional = true
+
 [dependencies.base64]
 version = "0.6.0"
 optional = true
 
 [dependencies.time]
 version = "0.1"
 
-[dependencies.ring]
-version = "0.11.0"
-optional = true
-
 [features]
+percent-encode = ["url"]
 secure = ["ring", "base64"]
-percent-encode = ["url"]
--- a/third_party/rust/cookie/src/secure/private.rs
+++ b/third_party/rust/cookie/src/secure/private.rs
@@ -31,30 +31,29 @@ impl<'a> PrivateJar<'a> {
     /// `CookieJar`.
     #[doc(hidden)]
     pub fn new(parent: &'a mut CookieJar, key: &Key) -> PrivateJar<'a> {
         let mut key_array = [0u8; KEY_LEN];
         key_array.copy_from_slice(key.encryption());
         PrivateJar { parent: parent, key: key_array }
     }
 
-    /// Given a sealed value `str` and a key name `name`, where the nonce is
-    /// prepended to the original value and then both are Base64 encoded,
-    /// verifies and decrypts the sealed value and returns it. If there's a
-    /// problem, returns an `Err` with a string describing the issue.
-    fn unseal(&self, name: &str, value: &str) -> Result<String, &'static str> {
+    /// Given a sealed value `str` where the nonce is prepended to the original
+    /// value and then both are Base64 encoded, verifies and decrypts the sealed
+    /// value and returns it. If there's a problem, returns an `Err` with a
+    /// string describing the issue.
+    fn unseal(&self, value: &str) -> Result<String, &'static str> {
         let mut data = base64::decode(value).map_err(|_| "bad base64 value")?;
         if data.len() <= NONCE_LEN {
             return Err("length of decoded data is <= NONCE_LEN");
         }
 
-        let ad = name.as_bytes();
         let key = OpeningKey::new(ALGO, &self.key).expect("opening key");
         let (nonce, sealed) = data.split_at_mut(NONCE_LEN);
-        let unsealed = open_in_place(&key, nonce, ad, 0, sealed)
+        let unsealed = open_in_place(&key, nonce, &[], 0, sealed)
             .map_err(|_| "invalid key/nonce/value: bad seal")?;
 
         ::std::str::from_utf8(unsealed)
             .map(|s| s.to_string())
             .map_err(|_| "bad unsealed utf8")
     }
 
     /// Returns a reference to the `Cookie` inside this jar with the name `name`
@@ -73,17 +72,17 @@ impl<'a> PrivateJar<'a> {
     /// assert!(private_jar.get("name").is_none());
     ///
     /// private_jar.add(Cookie::new("name", "value"));
     /// assert_eq!(private_jar.get("name").unwrap().value(), "value");
     /// ```
     pub fn get(&self, name: &str) -> Option<Cookie<'static>> {
         if let Some(cookie_ref) = self.parent.get(name) {
             let mut cookie = cookie_ref.clone();
-            if let Ok(value) = self.unseal(name, cookie.value()) {
+            if let Ok(value) = self.unseal(cookie.value()) {
                 cookie.set_value(value);
                 return Some(cookie);
             }
         }
 
         None
     }
 
@@ -114,21 +113,18 @@ impl<'a> PrivateJar<'a> {
             let cookie_val = cookie.value().as_bytes();
             data = vec![0; NONCE_LEN + cookie_val.len() + overhead];
 
             // Randomly generate the nonce, then copy the cookie value as input.
             let (nonce, in_out) = data.split_at_mut(NONCE_LEN);
             SystemRandom::new().fill(nonce).expect("couldn't random fill nonce");
             in_out[..cookie_val.len()].copy_from_slice(cookie_val);
 
-            // Use cookie's name as associated data to prevent value swapping.
-            let ad = cookie.name().as_bytes();
-
             // Perform the actual sealing operation and get the output length.
-            seal_in_place(&key, nonce, ad, in_out, overhead).expect("in-place seal")
+            seal_in_place(&key, nonce, &[], in_out, overhead).expect("in-place seal")
         };
 
         // Base64 encode the nonce and encrypted value.
         let sealed_value = base64::encode(&data[..(NONCE_LEN + output_len)]);
         cookie.set_value(sealed_value);
 
         // Add the sealed cookie to the parent.
         self.parent.add(cookie);
deleted file mode 100644
--- a/third_party/rust/httparse-1.2.2/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".travis.yml":"be18ed6efd3eb179681f340007aaaa2a2fdbe859dee2088268306ca771662f82",".travis_after.sh":"8a2b7facdb728db96f856211101a6ec70d08e8a6c97e2b88b95aacc6e9d43633","Cargo.toml":"8decbc46cc24226324027edebbfa878a887f2cacb2a9b4c9e9cde101a26d05b4","LICENSE-APACHE":"7cfd738c53d61c79f07e348f622bf7707c9084237054d37fbe07788a75f5881c","LICENSE-MIT":"1bc1057abd72f06decbd02da13037adbe5e8f92a719c5032e34ac52aa0f9e62f","README.md":"0d390941cb326a4a5baf06d930285192b5a98e2967e6dec2826acd593fa9bab3","benches/parse.rs":"a4927e4c379e8859b18b40c019655f2b75c3c75977eab066586a5fedee5d6b94","src/iter.rs":"e018f14fbcdcc501218737e2bfb3c44163e42f024756a5de74e9b3ed63c64fcc","src/lib.rs":"4bdb2eaf6e47468ddce4cda0d66440a31294fb6b5fc7dd0d06c032c1281c9624"},"package":"77f756bed9ee3a83ce98774f4155b42a31b787029013f3a7d83eca714e500e21"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/httparse-1.2.2/.travis.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-language: rust
-rust:
-  - stable
-  - beta
-  - nightly
-
-sudo: false
-
-cache:
-  apt: true
-  directories:
-    - target/debug/deps
-    - target/debug/build
-
-script:
-  - cargo build --verbose
-  - cargo test --verbose
-  - cargo build --verbose --no-default-features
-  - cargo test --verbose --no-default-features
-
-notifications:
-  email: false
-
-addons:
-  apt:
-    packages:
-      - libcurl4-openssl-dev
-      - libelf-dev
-      - libdw-dev
-
-after_success: ./.travis_after.sh
-
-env:
-  global:
-    secure: VhNfac39x05yr7aAwvg973wdaFxFfg0PqApgHIKyilq0aNDacpPi94sSEjSw1Qan9R6SaAH5nXj6xMst18sCw9DCLZzXr7cboun6Zd+O4eB9Kna5veXASpIa9KH/GMZvILfDFTXnIbLDpvzzEuSS5tWIUu7elikmoZhOXXP82B4=
deleted file mode 100644
--- a/third_party/rust/httparse-1.2.2/.travis_after.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-set -ev
-if [[ $TRAVIS_RUST_VERSION = stable ]]; then
-  wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz
-  tar xzf master.tar.gz
-  mkdir kcov-master/build
-  cd kcov-master/build
-  cmake ..
-  make
-  make install DESTDIR=../tmp
-  cd ../..
-  ls target/debug
-  ./kcov-master/tmp/usr/local/bin/kcov --coveralls-id=$TRAVIS_JOB_ID --exclude-pattern=/.cargo target/kcov target/debug/httparse-*
-fi
-
-
deleted file mode 100644
--- a/third_party/rust/httparse-1.2.2/Cargo.toml
+++ /dev/null
@@ -1,20 +0,0 @@
-[package]
-
-name = "httparse"
-version = "1.2.2"
-authors = ["Sean McArthur <sean.monstar@gmail.com>"]
-license = "MIT/Apache-2.0"
-description = "A tiny, safe, speedy, zero-copy HTTP/1.x parser."
-repository = "https://github.com/seanmonstar/httparse"
-
-[features]
-default = ["std"]
-std = []
-
-[dev-dependencies]
-pico-sys = "0.0"
-
-[profile.bench]
-lto = true
-codegen-units = 1
-opt-level = 3
deleted file mode 100644
--- a/third_party/rust/httparse-1.2.2/LICENSE-APACHE
+++ /dev/null
@@ -1,201 +0,0 @@
-                              Apache License
-                        Version 2.0, January 2004
-                     http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-   "License" shall mean the terms and conditions for use, reproduction,
-   and distribution as defined by Sections 1 through 9 of this document.
-
-   "Licensor" shall mean the copyright owner or entity authorized by
-   the copyright owner that is granting the License.
-
-   "Legal Entity" shall mean the union of the acting entity and all
-   other entities that control, are controlled by, or are under common
-   control with that entity. For the purposes of this definition,
-   "control" means (i) the power, direct or indirect, to cause the
-   direction or management of such entity, whether by contract or
-   otherwise, or (ii) ownership of fifty percent (50%) or more of the
-   outstanding shares, or (iii) beneficial ownership of such entity.
-
-   "You" (or "Your") shall mean an individual or Legal Entity
-   exercising permissions granted by this License.
-
-   "Source" form shall mean the preferred form for making modifications,
-   including but not limited to software source code, documentation
-   source, and configuration files.
-
-   "Object" form shall mean any form resulting from mechanical
-   transformation or translation of a Source form, including but
-   not limited to compiled object code, generated documentation,
-   and conversions to other media types.
-
-   "Work" shall mean the work of authorship, whether in Source or
-   Object form, made available under the License, as indicated by a
-   copyright notice that is included in or attached to the work
-   (an example is provided in the Appendix below).
-
-   "Derivative Works" shall mean any work, whether in Source or Object
-   form, that is based on (or derived from) the Work and for which the
-   editorial revisions, annotations, elaborations, or other modifications
-   represent, as a whole, an original work of authorship. For the purposes
-   of this License, Derivative Works shall not include works that remain
-   separable from, or merely link (or bind by name) to the interfaces of,
-   the Work and Derivative Works thereof.
-
-   "Contribution" shall mean any work of authorship, including
-   the original version of the Work and any modifications or additions
-   to that Work or Derivative Works thereof, that is intentionally
-   submitted to Licensor for inclusion in the Work by the copyright owner
-   or by an individual or Legal Entity authorized to submit on behalf of
-   the copyright owner. For the purposes of this definition, "submitted"
-   means any form of electronic, verbal, or written communication sent
-   to the Licensor or its representatives, including but not limited to
-   communication on electronic mailing lists, source code control systems,
-   and issue tracking systems that are managed by, or on behalf of, the
-   Licensor for the purpose of discussing and improving the Work, but
-   excluding communication that is conspicuously marked or otherwise
-   designated in writing by the copyright owner as "Not a Contribution."
-
-   "Contributor" shall mean Licensor and any individual or Legal Entity
-   on behalf of whom a Contribution has been received by Licensor and
-   subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   copyright license to reproduce, prepare Derivative Works of,
-   publicly display, publicly perform, sublicense, and distribute the
-   Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   (except as stated in this section) patent license to make, have made,
-   use, offer to sell, sell, import, and otherwise transfer the Work,
-   where such license applies only to those patent claims licensable
-   by such Contributor that are necessarily infringed by their
-   Contribution(s) alone or by combination of their Contribution(s)
-   with the Work to which such Contribution(s) was submitted. If You
-   institute patent litigation against any entity (including a
-   cross-claim or counterclaim in a lawsuit) alleging that the Work
-   or a Contribution incorporated within the Work constitutes direct
-   or contributory patent infringement, then any patent licenses
-   granted to You under this License for that Work shall terminate
-   as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
-   Work or Derivative Works thereof in any medium, with or without
-   modifications, and in Source or Object form, provided that You
-   meet the following conditions:
-
-   (a) You must give any other recipients of the Work or
-       Derivative Works a copy of this License; and
-
-   (b) You must cause any modified files to carry prominent notices
-       stating that You changed the files; and
-
-   (c) You must retain, in the Source form of any Derivative Works
-       that You distribute, all copyright, patent, trademark, and
-       attribution notices from the Source form of the Work,
-       excluding those notices that do not pertain to any part of
-       the Derivative Works; and
-
-   (d) If the Work includes a "NOTICE" text file as part of its
-       distribution, then any Derivative Works that You distribute must
-       include a readable copy of the attribution notices contained
-       within such NOTICE file, excluding those notices that do not
-       pertain to any part of the Derivative Works, in at least one
-       of the following places: within a NOTICE text file distributed
-       as part of the Derivative Works; within the Source form or
-       documentation, if provided along with the Derivative Works; or,
-       within a display generated by the Derivative Works, if and
-       wherever such third-party notices normally appear. The contents
-       of the NOTICE file are for informational purposes only and
-       do not modify the License. You may add Your own attribution
-       notices within Derivative Works that You distribute, alongside
-       or as an addendum to the NOTICE text from the Work, provided
-       that such additional attribution notices cannot be construed
-       as modifying the License.
-
-   You may add Your own copyright statement to Your modifications and
-   may provide additional or different license terms and conditions
-   for use, reproduction, or distribution of Your modifications, or
-   for any such Derivative Works as a whole, provided Your use,
-   reproduction, and distribution of the Work otherwise complies with
-   the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
-   any Contribution intentionally submitted for inclusion in the Work
-   by You to the Licensor shall be under the terms and conditions of
-   this License, without any additional terms or conditions.
-   Notwithstanding the above, nothing herein shall supersede or modify
-   the terms of any separate license agreement you may have executed
-   with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
-   names, trademarks, service marks, or product names of the Licensor,
-   except as required for reasonable and customary use in describing the
-   origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
-   agreed to in writing, Licensor provides the Work (and each
-   Contributor provides its Contributions) on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-   implied, including, without limitation, any warranties or conditions
-   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-   PARTICULAR PURPOSE. You are solely responsible for determining the
-   appropriateness of using or redistributing the Work and assume any
-   risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
-   whether in tort (including negligence), contract, or otherwise,
-   unless required by applicable law (such as deliberate and grossly
-   negligent acts) or agreed to in writing, shall any Contributor be
-   liable to You for damages, including any direct, indirect, special,
-   incidental, or consequential damages of any character arising as a
-   result of this License or out of the use or inability to use the
-   Work (including but not limited to damages for loss of goodwill,
-   work stoppage, computer failure or malfunction, or any and all
-   other commercial damages or losses), even if such Contributor
-   has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
-   the Work or Derivative Works thereof, You may choose to offer,
-   and charge a fee for, acceptance of support, warranty, indemnity,
-   or other liability obligations and/or rights consistent with this
-   License. However, in accepting such obligations, You may act only
-   on Your own behalf and on Your sole responsibility, not on behalf
-   of any other Contributor, and only if You agree to indemnify,
-   defend, and hold each Contributor harmless for any liability
-   incurred by, or claims asserted against, such Contributor by reason
-   of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
-   To apply the Apache License to your work, attach the following
-   boilerplate notice, with the fields enclosed by brackets "[]"
-   replaced with your own identifying information. (Don't include
-   the brackets!)  The text should be enclosed in the appropriate
-   comment syntax for the file format. We also recommend that a
-   file or class name and description of purpose be included on the
-   same "printed page" as the copyright notice for easier
-   identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-	http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
deleted file mode 100644
--- a/third_party/rust/httparse-1.2.2/LICENSE-MIT
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2015 Sean McArthur
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
deleted file mode 100644
--- a/third_party/rust/httparse-1.2.2/README.md
+++ /dev/null
@@ -1,35 +0,0 @@
-# httparse
-
-[![Build Status](https://travis-ci.org/seanmonstar/httparse.svg?branch=master)](https://travis-ci.org/seanmonstar/httparse)
-[![Coverage Status](https://coveralls.io/repos/seanmonstar/httparse/badge.svg)](https://coveralls.io/r/seanmonstar/httparse)
-[![crates.io](http://meritbadge.herokuapp.com/httparse)](https://crates.io/crates/httparse)
-
-A push parser for the HTTP 1.x protocol. Avoids allocations. Fast.
-
-[Documentation](https://docs.rs/httparse)
-
-## Usage
-
-```rust
-let mut headers = [httparse::EMPTY_HEADER; 16];
-let mut req = httparse::Request::new(&mut headers);
-
-let buf = b"GET /index.html HTTP/1.1\r\nHost";
-assert!(try!(req.parse(buf)).is_partial());
-
-// a partial request, so we try again once we have more data
-
-let buf = b"GET /index.html HTTP/1.1\r\nHost: example.domain\r\n\r\n";
-assert!(try!(req.parse(buf)).is_complete());
-```
-
-## License
-
-Licensed under either of
-
-- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://apache.org/licenses/LICENSE-2.0)
-- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
-
-### Contribution
-
-Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
deleted file mode 100644
--- a/third_party/rust/httparse-1.2.2/benches/parse.rs
+++ /dev/null
@@ -1,68 +0,0 @@
-#![feature(test)]
-
-extern crate pico_sys as pico;
-extern crate httparse;
-
-extern crate test;
-
-const REQ: &'static [u8] = b"\
-GET /wp-content/uploads/2010/03/hello-kitty-darth-vader-pink.jpg HTTP/1.1\r\n\
-Host: www.kittyhell.com\r\n\
-User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; ja-JP-mac; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 Pathtraq/0.9\r\n\
-Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n\
-Accept-Language: ja,en-us;q=0.7,en;q=0.3\r\n\
-Accept-Encoding: gzip,deflate\r\n\
-Accept-Charset: Shift_JIS,utf-8;q=0.7,*;q=0.7\r\n\
-Keep-Alive: 115\r\n\
-Connection: keep-alive\r\n\
-Cookie: wp_ozh_wsa_visits=2; wp_ozh_wsa_visit_lasttime=xxxxxxxxxx; __utma=xxxxxxxxx.xxxxxxxxxx.xxxxxxxxxx.xxxxxxxxxx.xxxxxxxxxx.x; __utmz=xxxxxxxxx.xxxxxxxxxx.x.x.utmccn=(referral)|utmcsr=reader.livedoor.com|utmcct=/reader/|utmcmd=referral\r\n\r\n";
-
-
-
-
-#[bench]
-fn bench_pico(b: &mut test::Bencher) {
-    use std::mem;
-
-    #[repr(C)]
-    #[derive(Clone, Copy)]
-    struct Header<'a>(&'a [u8], &'a [u8]);
-
-
-    #[repr(C)]
-    struct Headers<'a>(&'a mut [Header<'a>]);
-    let method = [0i8; 16];
-    let path = [0i8; 16];
-    let mut minor_version = 0;
-    let mut h = [Header(&[], &[]); 16];
-    let mut h_len = h.len();
-    let headers = Headers(&mut h);
-    let prev_buf_len = 0;
-
-    b.iter(|| {
-        let ret = unsafe {
-            pico::ffi::phr_parse_request(
-                REQ.as_ptr() as *const _,
-                REQ.len(),
-                &mut method.as_ptr(),
-                &mut 16,
-                &mut path.as_ptr(),
-                &mut 16,
-                &mut minor_version,
-                mem::transmute::<*mut Header, *mut pico::ffi::phr_header>(headers.0.as_mut_ptr()),
-                &mut h_len as *mut usize as *mut _,
-                prev_buf_len
-            )
-        };
-        assert_eq!(ret, REQ.len() as i32);
-    })
-}
-
-#[bench]
-fn bench_httparse(b: &mut test::Bencher) {
-    let mut headers = [httparse::Header{ name: "", value: &[] }; 16];
-    let mut req = httparse::Request::new(&mut headers);
-    b.iter(|| {
-        assert_eq!(req.parse(REQ).unwrap(), httparse::Status::Complete(REQ.len()));
-    })
-}
deleted file mode 100644
--- a/third_party/rust/httparse-1.2.2/src/iter.rs
+++ /dev/null
@@ -1,116 +0,0 @@
-use core::slice;
-
-pub struct Bytes<'a> {
-    slice: &'a [u8],
-    pos: usize
-}
-
-impl<'a> Bytes<'a> {
-    #[inline]
-    pub fn new(slice: &'a [u8]) -> Bytes<'a> {
-        Bytes {
-            slice: slice,
-            pos: 0
-        }
-    }
-
-    #[inline]
-    pub fn pos(&self) -> usize {
-        self.pos
-    }
-
-    #[inline]
-    pub fn peek(&self) -> Option<u8> {
-        self.slice.get(self.pos).cloned()
-    }
-
-    #[inline]
-    pub fn bump(&mut self) {
-        self.pos += 1;
-    }
-
-    #[inline]
-    pub fn len(&self) -> usize {
-        self.slice.len()
-    }
-
-    #[inline]
-    pub fn slice(&mut self) -> &'a [u8] {
-        self.slice_skip(0)
-    }
-
-    #[inline]
-    pub fn slice_skip(&mut self, skip: usize) -> &'a [u8] {
-        debug_assert!(self.pos >= skip);
-        let head_pos = self.pos - skip;
-        unsafe {
-            let ptr = self.slice.as_ptr();
-            let head = slice::from_raw_parts(ptr, head_pos);
-            let tail = slice::from_raw_parts(ptr.offset(self.pos as isize), self.slice.len() - self.pos);
-            self.pos = 0;
-            self.slice = tail;
-            head
-        }
-    }
-
-    #[inline]
-    pub fn next_8<'b>(&'b mut self) -> Option<Bytes8<'b, 'a>> {
-        if self.slice.len() > self.pos + 8 {
-            Some(Bytes8 { bytes: self, pos: 0 })
-        } else {
-            None
-        }
-    }
-}
-
-impl<'a> Iterator for Bytes<'a> {
-    type Item = u8;
-
-    #[inline]
-    fn next(&mut self) -> Option<u8> {
-        if self.slice.len() > self.pos {
-            let b = unsafe { *self.slice.get_unchecked(self.pos) };
-            self.pos += 1;
-            Some(b)
-        } else {
-            None
-        }
-    }
-}
-
-pub struct Bytes8<'a, 'b: 'a> {
-    bytes: &'a mut Bytes<'b>,
-    pos: usize
-}
-
-macro_rules! bytes8_methods {
-    ($f:ident, $pos:expr) => {
-        #[inline]
-        pub fn $f(&mut self) -> u8 {
-            debug_assert!(self.assert_pos($pos));
-            let b = unsafe { *self.bytes.slice.get_unchecked(self.bytes.pos) };
-            self.bytes.pos += 1;
-            b
-        }
-    };
-    () => {
-        bytes8_methods!(_0, 0);
-        bytes8_methods!(_1, 1);
-        bytes8_methods!(_2, 2);
-        bytes8_methods!(_3, 3);
-        bytes8_methods!(_4, 4);
-        bytes8_methods!(_5, 5);
-        bytes8_methods!(_6, 6);
-        bytes8_methods!(_7, 7);
-    }
-}
-
-impl<'a, 'b: 'a> Bytes8<'a, 'b> {
-    bytes8_methods! {}
-
-    fn assert_pos(&mut self, pos: usize) -> bool {
-        let ret = self.pos == pos;
-        self.pos += 1;
-        ret
-    }
-}
deleted file mode 100644
--- a/third_party/rust/httparse-1.2.2/src/lib.rs
+++ /dev/null
@@ -1,946 +0,0 @@
-#![cfg_attr(not(feature = "std"),  no_std)]
-#![cfg_attr(test, deny(warnings))]
-#![deny(missing_docs)]
-//! # httparse
-//!
-//! A push library for parsing HTTP/1.x requests and responses.
-//!
-//! The focus is on speed and safety. Unsafe code is used to keep parsing fast,
-//! but unsafety is contained in a submodule, with invariants enforced. The
-//! parsing internals use an `Iterator` instead of direct indexing, while
-//! skipping bounds checks.
-//!
-//! The speed is comparable to the fast picohttpparser, currently being around
-//! 1.6 times slower than pico. Improvements can be made as a `likely`
-//! intrinsic, and simd, are stabilized in rustc.
-
-#[cfg(feature = "std")] extern crate std as core;
-
-use core::{fmt, result, str, slice};
-
-use iter::Bytes;
-
-mod iter;
-
-macro_rules! next {
-    ($bytes:ident) => ({
-        match $bytes.next() {
-            Some(b) => b,
-            None => return Ok(Status::Partial)
-        }
-    })
-}
-
-macro_rules! expect {
-    ($bytes:ident.next() == $pat:pat => $ret:expr) => {
-        expect!(next!($bytes) => $pat |? $ret)
-    };
-    ($e:expr => $pat:pat |? $ret:expr) => {
-        match $e {
-            v@$pat => v,
-            _ => return $ret
-        }
-    };
-}
-
-macro_rules! complete {
-    ($e:expr) => {
-        match try!($e) {
-            Status::Complete(v) => v,
-            Status::Partial => return Ok(Status::Partial)
-        }
-    }
-}
-
-#[inline]
-fn shrink<T>(slice: &mut &mut [T], len: usize) {
-    debug_assert!(slice.len() >= len);
-    let ptr = slice.as_mut_ptr();
-    *slice = unsafe { slice::from_raw_parts_mut(ptr, len) };
-}
-
-/// Determines if byte is a token char.
-///
-/// > ```notrust
-/// > token          = 1*tchar
-/// >
-/// > tchar          = "!" / "#" / "$" / "%" / "&" / "'" / "*"
-/// >                / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
-/// >                / DIGIT / ALPHA
-/// >                ; any VCHAR, except delimiters
-/// > ```
-#[inline]
-fn is_token(b: u8) -> bool {
-    b > 0x1F && b < 0x7F
-}
-
-macro_rules! space {
-    ($bytes:ident or $err:expr) => ({
-        expect!($bytes.next() == b' ' => Err($err));
-        $bytes.slice();
-    })
-}
-
-macro_rules! newline {
-    ($bytes:ident) => ({
-        match next!($bytes) {
-            b'\r' => {
-                expect!($bytes.next() == b'\n' => Err(Error::NewLine));
-                $bytes.slice();
-            },
-            b'\n' => {
-                $bytes.slice();
-            },
-            _ => return Err(Error::NewLine)
-        }
-    })
-}
-
-/// An error in parsing.
-#[derive(Copy, Clone, PartialEq, Eq, Debug)]
-pub enum Error {
-    /// Invalid byte in header name.
-    HeaderName,
-    /// Invalid byte in header value.
-    HeaderValue,
-    /// Invalid byte in new line.
-    NewLine,
-    /// Invalid byte in Response status.
-    Status,
-    /// Invalid byte where token is required.
-    Token,
-    /// Parsed more headers than provided buffer can contain.
-    TooManyHeaders,
-    /// Invalid byte in HTTP version.
-    Version,
-}
-
-impl Error {
-    #[inline]
-    fn description_str(&self) -> &'static str {
-        match *self {
-            Error::HeaderName => "invalid header name",
-            Error::HeaderValue => "invalid header value",
-            Error::NewLine => "invalid new line",
-            Error::Status => "invalid response status",
-            Error::Token => "invalid token",
-            Error::TooManyHeaders => "too many headers",
-            Error::Version => "invalid HTTP version",
-        }
-    }
-}
-
-impl fmt::Display for Error {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.write_str(self.description_str())
-    }
-}
-
-#[cfg(feature = "std")]
-impl std::error::Error for Error {
-    fn description(&self) -> &str {
-        self.description_str()
-    }
-}
-
-/// An error in parsing a chunk size.
-// Note: Move this into the error enum once v2.0 is released.
-#[derive(Debug, PartialEq, Eq)]
-pub struct InvalidChunkSize;
-
-impl fmt::Display for InvalidChunkSize {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.write_str("invalid chunk size")
-    }
-}
-
-/// A Result of any parsing action.
-///
-/// If the input is invalid, an `Error` will be returned. Note that incomplete
-/// data is not considered invalid, and so will not return an error, but rather
-/// a `Ok(Status::Partial)`.
-pub type Result<T> = result::Result<Status<T>, Error>;
-
-/// The result of a successful parse pass.
-///
-/// `Complete` is used when the buffer contained the complete value.
-/// `Partial` is used when parsing did not reach the end of the expected value,
-/// but no invalid data was found.
-#[derive(Copy, Clone, PartialEq, Debug)]
-pub enum Status<T> {
-    /// The completed result.
-    Complete(T),
-    /// A partial result.
-    Partial
-}
-
-impl<T> Status<T> {
-    /// Convenience method to check if status is complete.
-    #[inline]
-    pub fn is_complete(&self) -> bool {
-        match *self {
-            Status::Complete(..) => true,
-            Status::Partial => false
-        }
-    }
-
-    /// Convenience method to check if status is partial.
-    #[inline]
-    pub fn is_partial(&self) -> bool {
-        match *self {
-            Status::Complete(..) => false,
-            Status::Partial => true
-        }
-    }
-
-    /// Convenience method to unwrap a Complete value. Panics if the status is
-    /// `Partial`.
-    #[inline]
-    pub fn unwrap(self) -> T {
-        match self {
-            Status::Complete(t) => t,
-            Status::Partial => panic!("Tried to unwrap Status::Partial")
-        }
-    }
-}
-
-/// A parsed Request.
-///
-/// The optional values will be `None` if a parse was not complete, and did not
-/// parse the associated property. This allows you to inspect the parts that
-/// could be parsed, before reading more, in case you wish to exit early.
-///
-/// # Example
-///
-/// ```no_run
-/// let buf = b"GET /404 HTTP/1.1\r\nHost:";
-/// let mut headers = [httparse::EMPTY_HEADER; 16];
-/// let mut req = httparse::Request::new(&mut headers);
-/// let res = req.parse(buf).unwrap();
-/// if res.is_partial() {
-///     match req.path {
-///         Some(ref path) => {
-///             // check router for path.
-///             // /404 doesn't exist? we could stop parsing
-///         },
-///         None => {
-///             // must read more and parse again
-///         }
-///     }
-/// }
-/// ```
-pub struct Request<'headers, 'buf: 'headers> {
-    /// The request method, such as `GET`.
-    pub method: Option<&'buf str>,
-    /// The request path, such as `/about-us`.
-    pub path: Option<&'buf str>,
-    /// The request version, such as `HTTP/1.1`.
-    pub version: Option<u8>,
-    /// The request headers.
-    pub headers: &'headers mut [Header<'buf>]
-}
-
-impl<'h, 'b> Request<'h, 'b> {
-    /// Creates a new Request, using a slice of headers you allocate.
-    #[inline]
-    pub fn new(headers: &'h mut [Header<'b>]) -> Request<'h, 'b> {
-        Request {
-            method: None,
-            path: None,
-            version: None,
-            headers: headers,
-        }
-    }
-
-    /// Try to parse a buffer of bytes into the Request.
-    pub fn parse(&mut self, buf: &'b [u8]) -> Result<usize> {
-        let orig_len = buf.len();
-        let mut bytes = Bytes::new(buf);
-        complete!(skip_empty_lines(&mut bytes));
-        self.method = Some(complete!(parse_token(&mut bytes)));
-        self.path = Some(complete!(parse_token(&mut bytes)));
-        self.version = Some(complete!(parse_version(&mut bytes)));
-        newline!(bytes);
-
-        let len = orig_len - bytes.len();
-        let headers_len = complete!(parse_headers_iter(&mut self.headers, &mut bytes));
-
-        Ok(Status::Complete(len + headers_len))
-    }
-}
-
-#[inline]
-fn skip_empty_lines(bytes: &mut Bytes) -> Result<()> {
-    loop {
-        let b = bytes.peek();
-        match b {
-            Some(b'\r') => {
-                bytes.bump();
-                expect!(bytes.next() == b'\n' => Err(Error::NewLine));
-            },
-            Some(b'\n') => {
-                bytes.bump();
-            },
-            Some(..) => {
-                bytes.slice();
-                return Ok(Status::Complete(()));
-            },
-            None => return Ok(Status::Partial)
-        }
-    }
-}
-
-/// A parsed Response.
-///
-/// See `Request` docs for explanation of optional values.
-pub struct Response<'headers, 'buf: 'headers> {
-    /// The response version, such as `HTTP/1.1`.
-    pub version: Option<u8>,
-    /// The response code, such as `200`.
-    pub code: Option<u16>,
-    /// The response reason-phrase, such as `OK`.
-    pub reason: Option<&'buf str>,
-    /// The response headers.
-    pub headers: &'headers mut [Header<'buf>]
-}
-
-impl<'h, 'b> Response<'h, 'b> {
-    /// Creates a new `Response` using a slice of `Header`s you have allocated.
-    #[inline]
-    pub fn new(headers: &'h mut [Header<'b>]) -> Response<'h, 'b> {
-        Response {
-            version: None,
-            code: None,
-            reason: None,
-            headers: headers,
-        }
-    }
-
-    /// Try to parse a buffer of bytes into this `Response`.
-    pub fn parse(&mut self, buf: &'b [u8]) -> Result<usize> {
-        let orig_len = buf.len();
-        let mut bytes = Bytes::new(buf);
-
-        complete!(skip_empty_lines(&mut bytes));
-        self.version = Some(complete!(parse_version(&mut bytes)));
-        space!(bytes or Error::Version);
-        self.code = Some(complete!(parse_code(&mut bytes)));
-
-        // RFC7230 says there must be 'SP' and then reason-phrase, but admits
-        // its only for legacy reasons. With the reason-phrase completely
-        // optional (and preferred to be omitted) in HTTP2, we'll just
-        // handle any response that doesn't include a reason-phrase, because
-        // it's more lenient, and we don't care anyways.
-        //
-        // So, a SP means parse a reason-phrase.
-        // A newline means go to headers.
-        // Anything else we'll say is a malformed status.
-        match next!(bytes) {
-            b' ' => {
-                bytes.slice();
-                self.reason = Some(complete!(parse_reason(&mut bytes)));
-            },
-            b'\r' => {
-                expect!(bytes.next() == b'\n' => Err(Error::Status));
-                self.reason = Some("");
-            },
-            b'\n' => self.reason = Some(""),
-            _ => return Err(Error::Status),
-        }
-
-
-        let len = orig_len - bytes.len();
-        let headers_len = complete!(parse_headers_iter(&mut self.headers, &mut bytes));
-        Ok(Status::Complete(len + headers_len))
-    }
-}
-
-/// Represents a parsed header.
-#[derive(Copy, Clone, PartialEq, Debug)]
-pub struct Header<'a> {
-    /// The name portion of a header.
-    ///
-    /// A header name must be valid ASCII-US, so it's safe to store as a `&str`.
-    pub name: &'a str,
-    /// The value portion of a header.
-    ///
-    /// While headers **should** be ASCII-US, the specification allows for
-    /// values that may not be, and so the value is stored as bytes.
-    pub value: &'a [u8],
-}
-
-/// An empty header, useful for constructing a `Header` array to pass in for
-/// parsing.
-///
-/// # Example
-///
-/// ```
-/// let headers = [httparse::EMPTY_HEADER; 64];
-/// ```
-pub const EMPTY_HEADER: Header<'static> = Header { name: "", value: b"" };
-
-#[inline]
-fn parse_version(bytes: &mut Bytes) -> Result<u8> {
-    if let Some(mut eight) = bytes.next_8() {
-        expect!(eight._0() => b'H' |? Err(Error::Version));
-        expect!(eight._1() => b'T' |? Err(Error::Version));
-        expect!(eight._2() => b'T' |? Err(Error::Version));
-        expect!(eight._3() => b'P' |? Err(Error::Version));
-        expect!(eight._4() => b'/' |? Err(Error::Version));
-        expect!(eight._5() => b'1' |? Err(Error::Version));
-        expect!(eight._6() => b'.' |? Err(Error::Version));
-        let v = match eight._7() {
-            b'0' => 0,
-            b'1' => 1,
-            _ => return Err(Error::Version)
-        };
-        Ok(Status::Complete(v))
-    } else {
-        Ok(Status::Partial)
-    }
-}
-
-/// From [RFC 7230](https://tools.ietf.org/html/rfc7230):
-///
-/// > ```notrust
-/// > reason-phrase  = *( HTAB / SP / VCHAR / obs-text )
-/// > HTAB           = %x09        ; horizontal tab
-/// > VCHAR          = %x21-7E     ; visible (printing) characters
-/// > obs-text       = %x80-FF
-/// > ```
-///
-/// > A.2.  Changes from RFC 2616
-/// >
-/// > Non-US-ASCII content in header fields and the reason phrase
-/// > has been obsoleted and made opaque (the TEXT rule was removed).
-///
-/// Note that the following implementation deliberately rejects the obsoleted (non-US-ASCII) text range.
-///
-/// The fully compliant parser should probably just return the reason-phrase as an opaque &[u8] data
-/// and leave interpretation to user or specialized helpers (akin to .display() in std::path::Path)
-#[inline]
-fn parse_reason<'a>(bytes: &mut Bytes<'a>) -> Result<&'a str> {
-    loop {
-        let b = next!(bytes);
-        if b == b'\r' {
-            expect!(bytes.next() == b'\n' => Err(Error::Status));
-            return Ok(Status::Complete(unsafe {
-                // all bytes up till `i` must have been HTAB / SP / VCHAR
-                str::from_utf8_unchecked(bytes.slice_skip(2))
-            }));
-        } else if b == b'\n' {
-            return Ok(Status::Complete(unsafe {
-                // all bytes up till `i` must have been HTAB / SP / VCHAR
-                str::from_utf8_unchecked(bytes.slice_skip(1))
-            }));
-        } else if !((b >= 0x20 && b <= 0x7E) || b == b'\t') {
-            return Err(Error::Status);
-        }
-    }
-}
-
-#[inline]
-fn parse_token<'a>(bytes: &mut Bytes<'a>) -> Result<&'a str> {
-    loop {
-        let b = next!(bytes);
-        if b == b' ' {
-            return Ok(Status::Complete(unsafe {
-                // all bytes up till `i` must have been `is_token`.
-                str::from_utf8_unchecked(bytes.slice_skip(1))
-            }));
-        } else if !is_token(b) {
-            return Err(Error::Token);
-        }
-    }
-}
-
-#[inline]
-fn parse_code(bytes: &mut Bytes) -> Result<u16> {
-    let hundreds = expect!(bytes.next() == b'0'...b'9' => Err(Error::Status));
-    let tens = expect!(bytes.next() == b'0'...b'9' => Err(Error::Status));
-    let ones = expect!(bytes.next() == b'0'...b'9' => Err(Error::Status));
-
-    Ok(Status::Complete((hundreds - b'0') as u16 * 100 +
-                        (tens - b'0') as u16 * 10 +
-                        (ones - b'0') as u16))
-}
-
-/// Parse a buffer of bytes as headers.
-///
-/// The return value, if complete and successful, includes the index of the
-/// buffer that parsing stopped at, and a sliced reference to the parsed
-/// headers. The length of the slice will be equal to the number of properly
-/// parsed headers.
-///
-/// # Example
-///
-/// ```
-/// let buf = b"Host: foo.bar\nAccept: */*\n\nblah blah";
-/// let mut headers = [httparse::EMPTY_HEADER; 4];
-/// assert_eq!(httparse::parse_headers(buf, &mut headers),
-///            Ok(httparse::Status::Complete((27, &[
-///                httparse::Header { name: "Host", value: b"foo.bar" },
-///                httparse::Header { name: "Accept", value: b"*/*" }
-///            ][..]))));
-/// ```
-pub fn parse_headers<'b: 'h, 'h>(src: &'b [u8], mut dst: &'h mut [Header<'b>])
-    -> Result<(usize, &'h [Header<'b>])> {
-    let mut iter = Bytes::new(src);
-    let pos = complete!(parse_headers_iter(&mut dst, &mut iter));
-    Ok(Status::Complete((pos, dst)))
-}
-
-#[inline]
-fn parse_headers_iter<'a, 'b>(headers: &mut &mut [Header<'a>], bytes: &'b mut Bytes<'a>)
-    -> Result<usize> {
-    let mut num_headers: usize = 0;
-    let mut count: usize = 0;
-    let mut result = Err(Error::TooManyHeaders);
-
-    {
-        let mut iter = headers.iter_mut();
-
-        'headers: loop {
-            // a newline here means the head is over!
-            let b = next!(bytes);
-            if b == b'\r' {
-                expect!(bytes.next() == b'\n' => Err(Error::NewLine));
-                result = Ok(Status::Complete(count + bytes.pos()));
-                break;
-            } else if b == b'\n' {
-                result = Ok(Status::Complete(count + bytes.pos()));
-                break;
-            } else if b == b':' || !is_token(b) {
-                return Err(Error::HeaderName);
-            }
-
-            let header = match iter.next() {
-                Some(header) => header,
-                None => break 'headers
-            };
-
-            num_headers += 1;
-            // parse header name until colon
-            loop {
-                let b = next!(bytes);
-                if b == b':' {
-                    count += bytes.pos();
-                    header.name = unsafe {
-                        str::from_utf8_unchecked(bytes.slice_skip(1))
-                    };
-                    break;
-                } else if !is_token(b) {
-                    return Err(Error::HeaderName);
-                }
-            }
-
-            let mut b;
-
-            'value: loop {
-
-                // eat white space between colon and value
-                loop {
-                    b = next!(bytes);
-                    if b == b' ' || b == b'\t' {
-                        count += bytes.pos();
-                        bytes.slice();
-                        continue;
-                    } else {
-                        if !is_token(b) {
-                            if (b < 0o40 && b != 0o11) || b == 0o177 {
-                                break 'value;
-                            }
-                        }
-                        break;
-                    }
-                }
-
-                // parse value till EOL
-
-
-
-                macro_rules! check {
-                    ($bytes:ident, $i:ident) => ({
-                        b = $bytes.$i();
-                        if !is_token(b) {
-                            if (b < 0o40 && b != 0o11) || b == 0o177 {
-                                break 'value;
-                            }
-                        }
-                    });
-                    ($bytes:ident) => ({
-                        check!($bytes, _0);
-                        check!($bytes, _1);
-                        check!($bytes, _2);
-                        check!($bytes, _3);
-                        check!($bytes, _4);
-                        check!($bytes, _5);
-                        check!($bytes, _6);
-                        check!($bytes, _7);
-                    })
-                }
-                while let Some(mut bytes8) = bytes.next_8() {
-                    check!(bytes8);
-                }
-                loop {
-                    b = next!(bytes);
-                    if !is_token(b) {
-                        if (b < 0o40 && b != 0o11) || b == 0o177 {
-                            break 'value;
-                        }
-                    }
-                }
-            }
-
-            //found_ctl
-            if b == b'\r' {
-                expect!(bytes.next() == b'\n' => Err(Error::HeaderValue));
-                count += bytes.pos();
-                header.value = bytes.slice_skip(2);
-            } else if b == b'\n' {
-                count += bytes.pos();
-                header.value = bytes.slice_skip(1);
-            } else {
-                return Err(Error::HeaderValue);
-            }
-
-        }
-    } // drop iter
-
-    shrink(headers, num_headers);
-    result
-}
-
-/// Parse a buffer of bytes as a chunk size.
-///
-/// The return value, if complete and successful, includes the index of the
-/// buffer that parsing stopped at, and the size of the following chunk.
-///
-/// # Example
-///
-/// ```
-/// let buf = b"4\r\nRust\r\n0\r\n\r\n";
-/// assert_eq!(httparse::parse_chunk_size(buf),
-///            Ok(httparse::Status::Complete((3, 4))));
-/// ```
-pub fn parse_chunk_size(buf: &[u8])
-        -> result::Result<Status<(usize, u64)>, InvalidChunkSize> {
-    const RADIX: u64 = 16;
-    let mut bytes = Bytes::new(buf);
-    let mut size = 0;
-    let mut in_chunk_size = true;
-    let mut in_ext = false;
-    let mut count = 0;
-    loop {
-        let b = next!(bytes);
-        match b {
-            b'0'...b'9' if in_chunk_size => {
-                if count > 15 {
-                    return Err(InvalidChunkSize);
-                }
-                count += 1;
-                size *= RADIX;
-                size += (b - b'0') as u64;
-            },
-            b'a'...b'f' if in_chunk_size => {
-                if count > 15 {
-                    return Err(InvalidChunkSize);
-                }
-                count += 1;
-                size *= RADIX;
-                size += (b + 10 - b'a') as u64;
-            }
-            b'A'...b'F' if in_chunk_size => {
-                if count > 15 {
-                    return Err(InvalidChunkSize);
-                }
-                count += 1;
-                size *= RADIX;
-                size += (b + 10 - b'A') as u64;
-            }
-            b'\r' => {
-                match next!(bytes) {
-                    b'\n' => break,
-                    _ => return Err(InvalidChunkSize),
-                }
-            }
-            // If we weren't in the extension yet, the ";" signals its start
-            b';' if !in_ext => {
-                in_ext = true;
-                in_chunk_size = false;
-            }
-            // "Linear white space" is ignored between the chunk size and the
-            // extension separator token (";") due to the "implied *LWS rule".
-            b'\t' | b' ' if !in_ext & !in_chunk_size => {}
-            // LWS can follow the chunk size, but no more digits can come
-            b'\t' | b' ' if in_chunk_size => in_chunk_size = false,
-            // We allow any arbitrary octet once we are in the extension, since
-            // they all get ignored anyway. According to the HTTP spec, valid
-            // extensions would have a more strict syntax:
-            //     (token ["=" (token | quoted-string)])
-            // but we gain nothing by rejecting an otherwise valid chunk size.
-            _ if in_ext => {}
-            // Finally, if we aren't in the extension and we're reading any
-            // other octet, the chunk size line is invalid!
-            _ => return Err(InvalidChunkSize),
-        }
-    }
-    Ok(Status::Complete((bytes.pos(), size)))
-}
-
-#[cfg(test)]
-mod tests {
-    use super::{Request, Response, Status, EMPTY_HEADER, shrink, parse_chunk_size};
-
-    const NUM_OF_HEADERS: usize = 4;
-
-    #[test]
-    fn test_shrink() {
-        let mut arr = [EMPTY_HEADER; 16];
-        {
-            let slice = &mut &mut arr[..];
-            assert_eq!(slice.len(), 16);
-            shrink(slice, 4);
-            assert_eq!(slice.len(), 4);
-        }
-        assert_eq!(arr.len(), 16);
-    }
-
-    macro_rules! req {
-        ($name:ident, $buf:expr, |$arg:ident| $body:expr) => (
-            req! {$name, $buf, Ok(Status::Complete($buf.len())), |$arg| $body }
-        );
-        ($name:ident, $buf:expr, $len:expr, |$arg:ident| $body:expr) => (
-        #[test]
-        fn $name() {
-            let mut headers = [EMPTY_HEADER; NUM_OF_HEADERS];
-            let mut req = Request::new(&mut headers[..]);
-            let status = req.parse($buf.as_ref());
-            assert_eq!(status, $len);
-            closure(req);
-
-            fn closure($arg: Request) {
-                $body
-            }
-        }
-        )
-    }
-
-    req! {
-        test_request_simple,
-        b"GET / HTTP/1.1\r\n\r\n",
-        |req| {
-            assert_eq!(req.method.unwrap(), "GET");
-            assert_eq!(req.path.unwrap(), "/");
-            assert_eq!(req.version.unwrap(), 1);
-            assert_eq!(req.headers.len(), 0);
-        }
-    }
-
-    req! {
-        test_request_headers,
-        b"GET / HTTP/1.1\r\nHost: foo.com\r\nCookie: \r\n\r\n",
-        |req| {
-            assert_eq!(req.method.unwrap(), "GET");
-            assert_eq!(req.path.unwrap(), "/");
-            assert_eq!(req.version.unwrap(), 1);
-            assert_eq!(req.headers.len(), 2);
-            assert_eq!(req.headers[0].name, "Host");
-            assert_eq!(req.headers[0].value, b"foo.com");
-            assert_eq!(req.headers[1].name, "Cookie");
-            assert_eq!(req.headers[1].value, b"");
-        }
-    }
-
-    req! {
-        test_request_headers_max,
-        b"GET / HTTP/1.1\r\nA: A\r\nB: B\r\nC: C\r\nD: D\r\n\r\n",
-        |req| {
-            assert_eq!(req.headers.len(), NUM_OF_HEADERS);
-        }
-    }
-
-    req! {
-        test_request_multibyte,
-        b"GET / HTTP/1.1\r\nHost: foo.com\r\nUser-Agent: \xe3\x81\xb2\xe3/1.0\r\n\r\n",
-        |req| {
-            assert_eq!(req.method.unwrap(), "GET");
-            assert_eq!(req.path.unwrap(), "/");
-            assert_eq!(req.version.unwrap(), 1);
-            assert_eq!(req.headers[0].name, "Host");
-            assert_eq!(req.headers[0].value, b"foo.com");
-            assert_eq!(req.headers[1].name, "User-Agent");
-            assert_eq!(req.headers[1].value, b"\xe3\x81\xb2\xe3/1.0");
-        }
-    }
-
-
-    req! {
-        test_request_partial,
-        b"GET / HTTP/1.1\r\n\r", Ok(Status::Partial),
-        |_req| {}
-    }
-
-    req! {
-        test_request_newlines,
-        b"GET / HTTP/1.1\nHost: foo.bar\n\n",
-        |_r| {}
-    }
-
-    req! {
-        test_request_empty_lines_prefix,
-        b"\r\n\r\nGET / HTTP/1.1\r\n\r\n",
-        |req| {
-            assert_eq!(req.method.unwrap(), "GET");
-            assert_eq!(req.path.unwrap(), "/");
-            assert_eq!(req.version.unwrap(), 1);
-            assert_eq!(req.headers.len(), 0);
-        }
-    }
-
-    req! {
-        test_request_empty_lines_prefix_lf_only,
-        b"\n\nGET / HTTP/1.1\n\n",
-        |req| {
-            assert_eq!(req.method.unwrap(), "GET");
-            assert_eq!(req.path.unwrap(), "/");
-            assert_eq!(req.version.unwrap(), 1);
-            assert_eq!(req.headers.len(), 0);
-        }
-    }
-
-    req! {
-        test_request_with_invalid_token_delimiter,
-        b"GET\n/ HTTP/1.1\r\nHost: foo.bar\r\n\r\n",
-        Err(::Error::Token),
-        |_r| {}
-    }
-
-    macro_rules! res {
-        ($name:ident, $buf:expr, |$arg:ident| $body:expr) => (
-            res! {$name, $buf, Ok(Status::Complete($buf.len())), |$arg| $body }
-        );
-        ($name:ident, $buf:expr, $len:expr, |$arg:ident| $body:expr) => (
-        #[test]
-        fn $name() {
-            let mut headers = [EMPTY_HEADER; NUM_OF_HEADERS];
-            let mut res = Response::new(&mut headers[..]);
-            let status = res.parse($buf.as_ref());
-            assert_eq!(status, $len);
-            closure(res);
-
-            fn closure($arg: Response) {
-                $body
-            }
-        }
-        )
-    }
-
-    res! {
-        test_response_simple,
-        b"HTTP/1.1 200 OK\r\n\r\n",
-        |res| {
-            assert_eq!(res.version.unwrap(), 1);
-            assert_eq!(res.code.unwrap(), 200);
-            assert_eq!(res.reason.unwrap(), "OK");
-        }
-    }
-
-    res! {
-        test_response_newlines,
-        b"HTTP/1.0 403 Forbidden\nServer: foo.bar\n\n",
-        |_r| {}
-    }
-
-    res! {
-        test_response_reason_missing,
-        b"HTTP/1.1 200 \r\n\r\n",
-        |res| {
-            assert_eq!(res.version.unwrap(), 1);
-            assert_eq!(res.code.unwrap(), 200);
-            assert_eq!(res.reason.unwrap(), "");
-        }
-    }
-
-    res! {
-        test_response_reason_missing_no_space,
-        b"HTTP/1.1 200\r\n\r\n",
-        |res| {
-            assert_eq!(res.version.unwrap(), 1);
-            assert_eq!(res.code.unwrap(), 200);
-            assert_eq!(res.reason.unwrap(), "");
-        }
-    }
-
-    res! {
-        test_response_reason_with_space_and_tab,
-        b"HTTP/1.1 101 Switching Protocols\t\r\n\r\n",
-        |res| {
-            assert_eq!(res.version.unwrap(), 1);
-            assert_eq!(res.code.unwrap(), 101);
-            assert_eq!(res.reason.unwrap(), "Switching Protocols\t");
-        }
-    }
-
-    static RESPONSE_REASON_WITH_OBS_TEXT_BYTE: &'static [u8] = b"HTTP/1.1 200 X\xFFZ\r\n\r\n";
-    res! {
-        test_response_reason_with_obsolete_text_byte,
-        RESPONSE_REASON_WITH_OBS_TEXT_BYTE,
-        Err(::Error::Status),
-        |_res| {}
-    }
-
-    res! {
-        test_response_reason_with_nul_byte,
-        b"HTTP/1.1 200 \x00\r\n\r\n",
-        Err(::Error::Status),
-        |_res| {}
-    }
-
-    res! {
-        test_response_version_missing_space,
-        b"HTTP/1.1",
-        Ok(Status::Partial),
-        |_res| {}
-    }
-
-    res! {
-        test_response_code_missing_space,
-        b"HTTP/1.1 200",
-        Ok(Status::Partial),
-        |_res| {}
-    }
-
-    res! {
-        test_response_empty_lines_prefix_lf_only,
-        b"\n\nHTTP/1.1 200 OK\n\n",
-        |_res| {}
-    }
-
-    #[test]
-    fn test_chunk_size() {
-        assert_eq!(parse_chunk_size(b"0\r\n"), Ok(Status::Complete((3, 0))));
-        assert_eq!(parse_chunk_size(b"12\r\nchunk"), Ok(Status::Complete((4, 18))));
-        assert_eq!(parse_chunk_size(b"3086d\r\n"), Ok(Status::Complete((7, 198765))));
-        assert_eq!(parse_chunk_size(b"3735AB1;foo bar*\r\n"), Ok(Status::Complete((18, 57891505))));
-        assert_eq!(parse_chunk_size(b"3735ab1 ; baz \r\n"), Ok(Status::Complete((16, 57891505))));
-        assert_eq!(parse_chunk_size(b"77a65\r"), Ok(Status::Partial));
-        assert_eq!(parse_chunk_size(b"ab"), Ok(Status::Partial));
-        assert_eq!(parse_chunk_size(b"567f8a\rfoo"), Err(::InvalidChunkSize));
-        assert_eq!(parse_chunk_size(b"567f8a\rfoo"), Err(::InvalidChunkSize));
-        assert_eq!(parse_chunk_size(b"567xf8a\r\n"), Err(::InvalidChunkSize));
-        assert_eq!(parse_chunk_size(b"ffffffffffffffff\r\n"), Ok(Status::Complete((18, ::core::u64::MAX))));
-        assert_eq!(parse_chunk_size(b"1ffffffffffffffff\r\n"), Err(::InvalidChunkSize));
-        assert_eq!(parse_chunk_size(b"Affffffffffffffff\r\n"), Err(::InvalidChunkSize));
-        assert_eq!(parse_chunk_size(b"fffffffffffffffff\r\n"), Err(::InvalidChunkSize));
-    }
-
-    #[cfg(feature = "std")]
-    #[test]
-    fn test_std_error() {
-        use super::Error;
-        use std::error::Error as StdError;
-        let err = Error::HeaderName;
-        assert_eq!(err.to_string(), err.description());
-    }
-}
--- a/third_party/rust/httparse/.cargo-checksum.json
+++ b/third_party/rust/httparse/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".travis.yml":"a4625910a2bd490f87b3f8403b92b2b75cd6ca9a0640eb8a8e1e5bf8995ca6be",".travis_after.sh":"c720bd9bc4cf6920c3b6e7798db7243f25f3203124e83e2baa39bcea66f04b8f","Cargo.toml":"ce89721483a37a5e21e4c7c8bd36b64a03067c23b3c6a9569e552a2a0364522e","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"ad5ce29918424008bdd8c6e7851bb064533456cbb32ec0d0955b2bc9444613d3","README.md":"8777517c90cff609e5a00a46b548f44803a4943cc7430a0ca6ddc4712af8d4ac","benches/parse.rs":"07f7d63b625090f1ccb086679e24c104de450d8733bb517e38a6eda8511e35e3","src/iter.rs":"9782faa1736e7988feceecdd5169f51b8b7926cbcf6611bbef9e018763e3cec8","src/lib.rs":"d95d4de02b19f2f921e13f0f477092d202fe0e707dc007b9bbd05282d7e69ebc"},"package":"af2f2dd97457e8fb1ae7c5a420db346af389926e36f43768b96f101546b04a07"}
\ No newline at end of file
+{"files":{".travis.yml":"be18ed6efd3eb179681f340007aaaa2a2fdbe859dee2088268306ca771662f82",".travis_after.sh":"8a2b7facdb728db96f856211101a6ec70d08e8a6c97e2b88b95aacc6e9d43633","Cargo.toml":"8decbc46cc24226324027edebbfa878a887f2cacb2a9b4c9e9cde101a26d05b4","LICENSE-APACHE":"7cfd738c53d61c79f07e348f622bf7707c9084237054d37fbe07788a75f5881c","LICENSE-MIT":"1bc1057abd72f06decbd02da13037adbe5e8f92a719c5032e34ac52aa0f9e62f","README.md":"0d390941cb326a4a5baf06d930285192b5a98e2967e6dec2826acd593fa9bab3","benches/parse.rs":"a4927e4c379e8859b18b40c019655f2b75c3c75977eab066586a5fedee5d6b94","src/iter.rs":"e018f14fbcdcc501218737e2bfb3c44163e42f024756a5de74e9b3ed63c64fcc","src/lib.rs":"4bdb2eaf6e47468ddce4cda0d66440a31294fb6b5fc7dd0d06c032c1281c9624"},"package":"77f756bed9ee3a83ce98774f4155b42a31b787029013f3a7d83eca714e500e21"}
\ No newline at end of file
--- a/third_party/rust/httparse/.travis.yml
+++ b/third_party/rust/httparse/.travis.yml
@@ -1,35 +1,35 @@
-language: rust
-rust:
-  - stable
-  - beta
-  - nightly
-
-sudo: false
-
-cache:
-  apt: true
-  directories:
-    - target/debug/deps
-    - target/debug/build
-
-script:
-  - cargo build --verbose
-  - cargo test --verbose
-  - cargo build --verbose --no-default-features
-  - cargo test --verbose --no-default-features
-
-notifications:
-  email: false
-
-addons:
-  apt:
-    packages:
-      - libcurl4-openssl-dev
-      - libelf-dev
-      - libdw-dev
-
-after_success: ./.travis_after.sh
-
-env:
-  global:
-    secure: VhNfac39x05yr7aAwvg973wdaFxFfg0PqApgHIKyilq0aNDacpPi94sSEjSw1Qan9R6SaAH5nXj6xMst18sCw9DCLZzXr7cboun6Zd+O4eB9Kna5veXASpIa9KH/GMZvILfDFTXnIbLDpvzzEuSS5tWIUu7elikmoZhOXXP82B4=
+language: rust
+rust:
+  - stable
+  - beta
+  - nightly
+
+sudo: false
+
+cache:
+  apt: true
+  directories:
+    - target/debug/deps
+    - target/debug/build
+
+script:
+  - cargo build --verbose
+  - cargo test --verbose
+  - cargo build --verbose --no-default-features
+  - cargo test --verbose --no-default-features
+
+notifications:
+  email: false
+
+addons:
+  apt:
+    packages:
+      - libcurl4-openssl-dev
+      - libelf-dev
+      - libdw-dev
+
+after_success: ./.travis_after.sh
+
+env:
+  global:
+    secure: VhNfac39x05yr7aAwvg973wdaFxFfg0PqApgHIKyilq0aNDacpPi94sSEjSw1Qan9R6SaAH5nXj6xMst18sCw9DCLZzXr7cboun6Zd+O4eB9Kna5veXASpIa9KH/GMZvILfDFTXnIbLDpvzzEuSS5tWIUu7elikmoZhOXXP82B4=
old mode 100755
new mode 100644
--- a/third_party/rust/httparse/.travis_after.sh
+++ b/third_party/rust/httparse/.travis_after.sh
@@ -1,16 +1,16 @@
-#!/bin/bash
-set -ev
-if [[ $TRAVIS_RUST_VERSION = stable ]]; then
-  wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz
-  tar xzf master.tar.gz
-  mkdir kcov-master/build
-  cd kcov-master/build
-  cmake ..
-  make
-  make install DESTDIR=../tmp
-  cd ../..
-  ls target/debug
-  ./kcov-master/tmp/usr/local/bin/kcov --coveralls-id=$TRAVIS_JOB_ID --exclude-pattern=/.cargo target/kcov target/debug/httparse-*
-fi
-
-
+#!/bin/bash
+set -ev
+if [[ $TRAVIS_RUST_VERSION = stable ]]; then
+  wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz
+  tar xzf master.tar.gz
+  mkdir kcov-master/build
+  cd kcov-master/build
+  cmake ..
+  make
+  make install DESTDIR=../tmp
+  cd ../..
+  ls target/debug
+  ./kcov-master/tmp/usr/local/bin/kcov --coveralls-id=$TRAVIS_JOB_ID --exclude-pattern=/.cargo target/kcov target/debug/httparse-*
+fi
+
+
--- a/third_party/rust/httparse/Cargo.toml
+++ b/third_party/rust/httparse/Cargo.toml
@@ -1,29 +1,20 @@
-# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
-#
-# When uploading crates to the registry Cargo will automatically
-# "normalize" Cargo.toml files for maximal compatibility
-# with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g. crates.io) dependencies
-#
-# If you believe there's an error in this file please file an
-# issue against the rust-lang/cargo repository. If you're
-# editing this file be aware that the upstream Cargo.toml
-# will likely look very different (and much more reasonable)
-
-[package]
-name = "httparse"
-version = "1.2.3"
-authors = ["Sean McArthur <sean.monstar@gmail.com>"]
-description = "A tiny, safe, speedy, zero-copy HTTP/1.x parser."
-license = "MIT/Apache-2.0"
-repository = "https://github.com/seanmonstar/httparse"
-[profile.bench]
-opt-level = 3
-lto = true
-codegen-units = 1
-[dev-dependencies.pico-sys]
-version = "0.0"
-
-[features]
-default = ["std"]
-std = []
+[package]
+
+name = "httparse"
+version = "1.2.2"
+authors = ["Sean McArthur <sean.monstar@gmail.com>"]
+license = "MIT/Apache-2.0"
+description = "A tiny, safe, speedy, zero-copy HTTP/1.x parser."
+repository = "https://github.com/seanmonstar/httparse"
+
+[features]
+default = ["std"]
+std = []
+
+[dev-dependencies]
+pico-sys = "0.0"
+
+[profile.bench]
+lto = true
+codegen-units = 1
+opt-level = 3
--- a/third_party/rust/httparse/LICENSE-APACHE
+++ b/third_party/rust/httparse/LICENSE-APACHE
@@ -1,201 +1,201 @@
-                              Apache License
-                        Version 2.0, January 2004
-                     http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-   "License" shall mean the terms and conditions for use, reproduction,
-   and distribution as defined by Sections 1 through 9 of this document.
-
-   "Licensor" shall mean the copyright owner or entity authorized by
-   the copyright owner that is granting the License.
-
-   "Legal Entity" shall mean the union of the acting entity and all
-   other entities that control, are controlled by, or are under common
-   control with that entity. For the purposes of this definition,
-   "control" means (i) the power, direct or indirect, to cause the
-   direction or management of such entity, whether by contract or
-   otherwise, or (ii) ownership of fifty percent (50%) or more of the
-   outstanding shares, or (iii) beneficial ownership of such entity.
-
-   "You" (or "Your") shall mean an individual or Legal Entity
-   exercising permissions granted by this License.
-
-   "Source" form shall mean the preferred form for making modifications,
-   including but not limited to software source code, documentation
-   source, and configuration files.
-
-   "Object" form shall mean any form resulting from mechanical
-   transformation or translation of a Source form, including but
-   not limited to compiled object code, generated documentation,
-   and conversions to other media types.
-
-   "Work" shall mean the work of authorship, whether in Source or
-   Object form, made available under the License, as indicated by a
-   copyright notice that is included in or attached to the work
-   (an example is provided in the Appendix below).
-
-   "Derivative Works" shall mean any work, whether in Source or Object
-   form, that is based on (or derived from) the Work and for which the
-   editorial revisions, annotations, elaborations, or other modifications
-   represent, as a whole, an original work of authorship. For the purposes
-   of this License, Derivative Works shall not include works that remain
-   separable from, or merely link (or bind by name) to the interfaces of,
-   the Work and Derivative Works thereof.
-
-   "Contribution" shall mean any work of authorship, including
-   the original version of the Work and any modifications or additions
-   to that Work or Derivative Works thereof, that is intentionally
-   submitted to Licensor for inclusion in the Work by the copyright owner
-   or by an individual or Legal Entity authorized to submit on behalf of
-   the copyright owner. For the purposes of this definition, "submitted"
-   means any form of electronic, verbal, or written communication sent
-   to the Licensor or its representatives, including but not limited to
-   communication on electronic mailing lists, source code control systems,
-   and issue tracking systems that are managed by, or on behalf of, the
-   Licensor for the purpose of discussing and improving the Work, but
-   excluding communication that is conspicuously marked or otherwise
-   designated in writing by the copyright owner as "Not a Contribution."
-
-   "Contributor" shall mean Licensor and any individual or Legal Entity
-   on behalf of whom a Contribution has been received by Licensor and
-   subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   copyright license to reproduce, prepare Derivative Works of,
-   publicly display, publicly perform, sublicense, and distribute the
-   Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   (except as stated in this section) patent license to make, have made,
-   use, offer to sell, sell, import, and otherwise transfer the Work,
-   where such license applies only to those patent claims licensable
-   by such Contributor that are necessarily infringed by their
-   Contribution(s) alone or by combination of their Contribution(s)
-   with the Work to which such Contribution(s) was submitted. If You
-   institute patent litigation against any entity (including a
-   cross-claim or counterclaim in a lawsuit) alleging that the Work
-   or a Contribution incorporated within the Work constitutes direct
-   or contributory patent infringement, then any patent licenses
-   granted to You under this License for that Work shall terminate
-   as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
-   Work or Derivative Works thereof in any medium, with or without
-   modifications, and in Source or Object form, provided that You
-   meet the following conditions:
-
-   (a) You must give any other recipients of the Work or
-       Derivative Works a copy of this License; and
-
-   (b) You must cause any modified files to carry prominent notices
-       stating that You changed the files; and
-
-   (c) You must retain, in the Source form of any Derivative Works
-       that You distribute, all copyright, patent, trademark, and
-       attribution notices from the Source form of the Work,
-       excluding those notices that do not pertain to any part of
-       the Derivative Works; and
-
-   (d) If the Work includes a "NOTICE" text file as part of its
-       distribution, then any Derivative Works that You distribute must
-       include a readable copy of the attribution notices contained
-       within such NOTICE file, excluding those notices that do not
-       pertain to any part of the Derivative Works, in at least one
-       of the following places: within a NOTICE text file distributed
-       as part of the Derivative Works; within the Source form or
-       documentation, if provided along with the Derivative Works; or,
-       within a display generated by the Derivative Works, if and
-       wherever such third-party notices normally appear. The contents
-       of the NOTICE file are for informational purposes only and
-       do not modify the License. You may add Your own attribution
-       notices within Derivative Works that You distribute, alongside
-       or as an addendum to the NOTICE text from the Work, provided
-       that such additional attribution notices cannot be construed
-       as modifying the License.
-
-   You may add Your own copyright statement to Your modifications and
-   may provide additional or different license terms and conditions
-   for use, reproduction, or distribution of Your modifications, or
-   for any such Derivative Works as a whole, provided Your use,
-   reproduction, and distribution of the Work otherwise complies with
-   the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
-   any Contribution intentionally submitted for inclusion in the Work
-   by You to the Licensor shall be under the terms and conditions of
-   this License, without any additional terms or conditions.
-   Notwithstanding the above, nothing herein shall supersede or modify
-   the terms of any separate license agreement you may have executed
-   with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
-   names, trademarks, service marks, or product names of the Licensor,
-   except as required for reasonable and customary use in describing the
-   origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
-   agreed to in writing, Licensor provides the Work (and each
-   Contributor provides its Contributions) on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-   implied, including, without limitation, any warranties or conditions
-   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-   PARTICULAR PURPOSE. You are solely responsible for determining the
-   appropriateness of using or redistributing the Work and assume any
-   risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
-   whether in tort (including negligence), contract, or otherwise,
-   unless required by applicable law (such as deliberate and grossly
-   negligent acts) or agreed to in writing, shall any Contributor be
-   liable to You for damages, including any direct, indirect, special,
-   incidental, or consequential damages of any character arising as a
-   result of this License or out of the use or inability to use the
-   Work (including but not limited to damages for loss of goodwill,
-   work stoppage, computer failure or malfunction, or any and all
-   other commercial damages or losses), even if such Contributor
-   has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
-   the Work or Derivative Works thereof, You may choose to offer,
-   and charge a fee for, acceptance of support, warranty, indemnity,
-   or other liability obligations and/or rights consistent with this
-   License. However, in accepting such obligations, You may act only
-   on Your own behalf and on Your sole responsibility, not on behalf
-   of any other Contributor, and only if You agree to indemnify,
-   defend, and hold each Contributor harmless for any liability
-   incurred by, or claims asserted against, such Contributor by reason
-   of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
-   To apply the Apache License to your work, attach the following
-   boilerplate notice, with the fields enclosed by brackets "[]"
-   replaced with your own identifying information. (Don't include
-   the brackets!)  The text should be enclosed in the appropriate
-   comment syntax for the file format. We also recommend that a
-   file or class name and description of purpose be included on the
-   same "printed page" as the copyright notice for easier
-   identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-	http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+                              Apache License
+                        Version 2.0, January 2004
+                     http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+   "License" shall mean the terms and conditions for use, reproduction,
+   and distribution as defined by Sections 1 through 9 of this document.
+
+   "Licensor" shall mean the copyright owner or entity authorized by
+   the copyright owner that is granting the License.
+
+   "Legal Entity" shall mean the union of the acting entity and all
+   other entities that control, are controlled by, or are under common
+   control with that entity. For the purposes of this definition,
+   "control" means (i) the power, direct or indirect, to cause the
+   direction or management of such entity, whether by contract or
+   otherwise, or (ii) ownership of fifty percent (50%) or more of the
+   outstanding shares, or (iii) beneficial ownership of such entity.
+
+   "You" (or "Your") shall mean an individual or Legal Entity
+   exercising permissions granted by this License.
+
+   "Source" form shall mean the preferred form for making modifications,
+   including but not limited to software source code, documentation
+   source, and configuration files.
+
+   "Object" form shall mean any form resulting from mechanical
+   transformation or translation of a Source form, including but
+   not limited to compiled object code, generated documentation,
+   and conversions to other media types.
+
+   "Work" shall mean the work of authorship, whether in Source or
+   Object form, made available under the License, as indicated by a
+   copyright notice that is included in or attached to the work
+   (an example is provided in the Appendix below).
+
+   "Derivative Works" shall mean any work, whether in Source or Object
+   form, that is based on (or derived from) the Work and for which the
+   editorial revisions, annotations, elaborations, or other modifications
+   represent, as a whole, an original work of authorship. For the purposes
+   of this License, Derivative Works shall not include works that remain
+   separable from, or merely link (or bind by name) to the interfaces of,
+   the Work and Derivative Works thereof.
+
+   "Contribution" shall mean any work of authorship, including
+   the original version of the Work and any modifications or additions
+   to that Work or Derivative Works thereof, that is intentionally
+   submitted to Licensor for inclusion in the Work by the copyright owner
+   or by an individual or Legal Entity authorized to submit on behalf of
+   the copyright owner. For the purposes of this definition, "submitted"
+   means any form of electronic, verbal, or written communication sent
+   to the Licensor or its representatives, including but not limited to
+   communication on electronic mailing lists, source code control systems,
+   and issue tracking systems that are managed by, or on behalf of, the
+   Licensor for the purpose of discussing and improving the Work, but
+   excluding communication that is conspicuously marked or otherwise
+   designated in writing by the copyright owner as "Not a Contribution."
+
+   "Contributor" shall mean Licensor and any individual or Legal Entity
+   on behalf of whom a Contribution has been received by Licensor and
+   subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+   this License, each Contributor hereby grants to You a perpetual,
+   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+   copyright license to reproduce, prepare Derivative Works of,
+   publicly display, publicly perform, sublicense, and distribute the
+   Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+   this License, each Contributor hereby grants to You a perpetual,
+   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+   (except as stated in this section) patent license to make, have made,
+   use, offer to sell, sell, import, and otherwise transfer the Work,
+   where such license applies only to those patent claims licensable
+   by such Contributor that are necessarily infringed by their
+   Contribution(s) alone or by combination of their Contribution(s)
+   with the Work to which such Contribution(s) was submitted. If You
+   institute patent litigation against any entity (including a
+   cross-claim or counterclaim in a lawsuit) alleging that the Work
+   or a Contribution incorporated within the Work constitutes direct
+   or contributory patent infringement, then any patent licenses
+   granted to You under this License for that Work shall terminate
+   as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+   Work or Derivative Works thereof in any medium, with or without
+   modifications, and in Source or Object form, provided that You
+   meet the following conditions:
+
+   (a) You must give any other recipients of the Work or
+       Derivative Works a copy of this License; and
+
+   (b) You must cause any modified files to carry prominent notices
+       stating that You changed the files; and
+
+   (c) You must retain, in the Source form of any Derivative Works
+       that You distribute, all copyright, patent, trademark, and
+       attribution notices from the Source form of the Work,
+       excluding those notices that do not pertain to any part of
+       the Derivative Works; and
+
+   (d) If the Work includes a "NOTICE" text file as part of its
+       distribution, then any Derivative Works that You distribute must
+       include a readable copy of the attribution notices contained
+       within such NOTICE file, excluding those notices that do not
+       pertain to any part of the Derivative Works, in at least one
+       of the following places: within a NOTICE text file distributed
+       as part of the Derivative Works; within the Source form or
+       documentation, if provided along with the Derivative Works; or,
+       within a display generated by the Derivative Works, if and
+       wherever such third-party notices normally appear. The contents
+       of the NOTICE file are for informational purposes only and
+       do not modify the License. You may add Your own attribution
+       notices within Derivative Works that You distribute, alongside
+       or as an addendum to the NOTICE text from the Work, provided
+       that such additional attribution notices cannot be construed
+       as modifying the License.
+
+   You may add Your own copyright statement to Your modifications and
+   may provide additional or different license terms and conditions
+   for use, reproduction, or distribution of Your modifications, or
+   for any such Derivative Works as a whole, provided Your use,
+   reproduction, and distribution of the Work otherwise complies with
+   the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+   any Contribution intentionally submitted for inclusion in the Work
+   by You to the Licensor shall be under the terms and conditions of
+   this License, without any additional terms or conditions.
+   Notwithstanding the above, nothing herein shall supersede or modify
+   the terms of any separate license agreement you may have executed
+   with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+   names, trademarks, service marks, or product names of the Licensor,
+   except as required for reasonable and customary use in describing the
+   origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+   agreed to in writing, Licensor provides the Work (and each
+   Contributor provides its Contributions) on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+   implied, including, without limitation, any warranties or conditions
+   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+   PARTICULAR PURPOSE. You are solely responsible for determining the
+   appropriateness of using or redistributing the Work and assume any
+   risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+   whether in tort (including negligence), contract, or otherwise,
+   unless required by applicable law (such as deliberate and grossly
+   negligent acts) or agreed to in writing, shall any Contributor be
+   liable to You for damages, including any direct, indirect, special,
+   incidental, or consequential damages of any character arising as a
+   result of this License or out of the use or inability to use the
+   Work (including but not limited to damages for loss of goodwill,
+   work stoppage, computer failure or malfunction, or any and all
+   other commercial damages or losses), even if such Contributor
+   has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+   the Work or Derivative Works thereof, You may choose to offer,
+   and charge a fee for, acceptance of support, warranty, indemnity,
+   or other liability obligations and/or rights consistent with this
+   License. However, in accepting such obligations, You may act only
+   on Your own behalf and on Your sole responsibility, not on behalf
+   of any other Contributor, and only if You agree to indemnify,
+   defend, and hold each Contributor harmless for any liability
+   incurred by, or claims asserted against, such Contributor by reason
+   of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+   To apply the Apache License to your work, attach the following
+   boilerplate notice, with the fields enclosed by brackets "[]"
+   replaced with your own identifying information. (Don't include
+   the brackets!)  The text should be enclosed in the appropriate
+   comment syntax for the file format. We also recommend that a
+   file or class name and description of purpose be included on the
+   same "printed page" as the copyright notice for easier
+   identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+	http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
--- a/third_party/rust/httparse/LICENSE-MIT
+++ b/third_party/rust/httparse/LICENSE-MIT
@@ -1,20 +1,20 @@
-Copyright (c) 2015 Sean McArthur
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
+Copyright (c) 2015 Sean McArthur
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
--- a/third_party/rust/httparse/README.md
+++ b/third_party/rust/httparse/README.md
@@ -1,35 +1,35 @@
-# httparse
-
-[![Build Status](https://travis-ci.org/seanmonstar/httparse.svg?branch=master)](https://travis-ci.org/seanmonstar/httparse)
-[![Coverage Status](https://coveralls.io/repos/seanmonstar/httparse/badge.svg)](https://coveralls.io/r/seanmonstar/httparse)
-[![crates.io](http://meritbadge.herokuapp.com/httparse)](https://crates.io/crates/httparse)
-
-A push parser for the HTTP 1.x protocol. Avoids allocations. Fast.
-
-[Documentation](https://docs.rs/httparse)
-
-## Usage
-
-```rust
-let mut headers = [httparse::EMPTY_HEADER; 16];
-let mut req = httparse::Request::new(&mut headers);
-
-let buf = b"GET /index.html HTTP/1.1\r\nHost";
-assert!(try!(req.parse(buf)).is_partial());
-
-// a partial request, so we try again once we have more data
-
-let buf = b"GET /index.html HTTP/1.1\r\nHost: example.domain\r\n\r\n";
-assert!(try!(req.parse(buf)).is_complete());
-```
-
-## License
-
-Licensed under either of
-
-- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://apache.org/licenses/LICENSE-2.0)
-- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
-
-### Contribution
-
-Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
+# httparse
+
+[![Build Status](https://travis-ci.org/seanmonstar/httparse.svg?branch=master)](https://travis-ci.org/seanmonstar/httparse)
+[![Coverage Status](https://coveralls.io/repos/seanmonstar/httparse/badge.svg)](https://coveralls.io/r/seanmonstar/httparse)
+[![crates.io](http://meritbadge.herokuapp.com/httparse)](https://crates.io/crates/httparse)
+
+A push parser for the HTTP 1.x protocol. Avoids allocations. Fast.
+
+[Documentation](https://docs.rs/httparse)
+
+## Usage
+
+```rust
+let mut headers = [httparse::EMPTY_HEADER; 16];
+let mut req = httparse::Request::new(&mut headers);
+
+let buf = b"GET /index.html HTTP/1.1\r\nHost";
+assert!(try!(req.parse(buf)).is_partial());
+
+// a partial request, so we try again once we have more data
+
+let buf = b"GET /index.html HTTP/1.1\r\nHost: example.domain\r\n\r\n";
+assert!(try!(req.parse(buf)).is_complete());
+```
+
+## License
+
+Licensed under either of
+
+- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://apache.org/licenses/LICENSE-2.0)
+- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
+
+### Contribution
+
+Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
--- a/third_party/rust/httparse/benches/parse.rs
+++ b/third_party/rust/httparse/benches/parse.rs
@@ -1,70 +1,68 @@
-#![feature(test)]
-
-extern crate pico_sys as pico;
-extern crate httparse;
-
-extern crate test;
-
-const REQ: &'static [u8] = b"\
-GET /wp-content/uploads/2010/03/hello-kitty-darth-vader-pink.jpg HTTP/1.1\r\n\
-Host: www.kittyhell.com\r\n\
-User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; ja-JP-mac; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 Pathtraq/0.9\r\n\
-Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n\
-Accept-Language: ja,en-us;q=0.7,en;q=0.3\r\n\
-Accept-Encoding: gzip,deflate\r\n\
-Accept-Charset: Shift_JIS,utf-8;q=0.7,*;q=0.7\r\n\
-Keep-Alive: 115\r\n\
-Connection: keep-alive\r\n\
-Cookie: wp_ozh_wsa_visits=2; wp_ozh_wsa_visit_lasttime=xxxxxxxxxx; __utma=xxxxxxxxx.xxxxxxxxxx.xxxxxxxxxx.xxxxxxxxxx.xxxxxxxxxx.x; __utmz=xxxxxxxxx.xxxxxxxxxx.x.x.utmccn=(referral)|utmcsr=reader.livedoor.com|utmcct=/reader/|utmcmd=referral\r\n\r\n";
-
-
-
-
-#[bench]
-fn bench_pico(b: &mut test::Bencher) {
-    use std::mem;
-
-    #[repr(C)]
-    #[derive(Clone, Copy)]
-    struct Header<'a>(&'a [u8], &'a [u8]);
-
-
-    #[repr(C)]
-    struct Headers<'a>(&'a mut [Header<'a>]);
-    let method = [0i8; 16];
-    let path = [0i8; 16];
-    let mut minor_version = 0;
-    let mut h = [Header(&[], &[]); 16];
-    let mut h_len = h.len();
-    let headers = Headers(&mut h);
-    let prev_buf_len = 0;
-
-    b.iter(|| {
-        let ret = unsafe {
-            pico::ffi::phr_parse_request(
-                REQ.as_ptr() as *const _,
-                REQ.len(),
-                &mut method.as_ptr(),
-                &mut 16,
-                &mut path.as_ptr(),
-                &mut 16,
-                &mut minor_version,
-                mem::transmute::<*mut Header, *mut pico::ffi::phr_header>(headers.0.as_mut_ptr()),
-                &mut h_len as *mut usize as *mut _,
-                prev_buf_len
-            )
-        };
-        assert_eq!(ret, REQ.len() as i32);
-    });
-    b.bytes = REQ.len() as u64;
-}
-
-#[bench]
-fn bench_httparse(b: &mut test::Bencher) {
-    let mut headers = [httparse::Header{ name: "", value: &[] }; 16];
-    let mut req = httparse::Request::new(&mut headers);
-    b.iter(|| {
-        assert_eq!(req.parse(REQ).unwrap(), httparse::Status::Complete(REQ.len()));
-    });
-    b.bytes = REQ.len() as u64;
-}
+#![feature(test)]
+
+extern crate pico_sys as pico;
+extern crate httparse;
+
+extern crate test;
+
+const REQ: &'static [u8] = b"\
+GET /wp-content/uploads/2010/03/hello-kitty-darth-vader-pink.jpg HTTP/1.1\r\n\
+Host: www.kittyhell.com\r\n\
+User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; ja-JP-mac; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 Pathtraq/0.9\r\n\
+Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n\
+Accept-Language: ja,en-us;q=0.7,en;q=0.3\r\n\
+Accept-Encoding: gzip,deflate\r\n\
+Accept-Charset: Shift_JIS,utf-8;q=0.7,*;q=0.7\r\n\
+Keep-Alive: 115\r\n\
+Connection: keep-alive\r\n\
+Cookie: wp_ozh_wsa_visits=2; wp_ozh_wsa_visit_lasttime=xxxxxxxxxx; __utma=xxxxxxxxx.xxxxxxxxxx.xxxxxxxxxx.xxxxxxxxxx.xxxxxxxxxx.x; __utmz=xxxxxxxxx.xxxxxxxxxx.x.x.utmccn=(referral)|utmcsr=reader.livedoor.com|utmcct=/reader/|utmcmd=referral\r\n\r\n";
+
+
+
+
+#[bench]
+fn bench_pico(b: &mut test::Bencher) {
+    use std::mem;
+
+    #[repr(C)]
+    #[derive(Clone, Copy)]
+    struct Header<'a>(&'a [u8], &'a [u8]);
+
+
+    #[repr(C)]
+    struct Headers<'a>(&'a mut [Header<'a>]);
+    let method = [0i8; 16];
+    let path = [0i8; 16];
+    let mut minor_version = 0;
+    let mut h = [Header(&[], &[]); 16];
+    let mut h_len = h.len();
+    let headers = Headers(&mut h);
+    let prev_buf_len = 0;
+
+    b.iter(|| {
+        let ret = unsafe {
+            pico::ffi::phr_parse_request(
+                REQ.as_ptr() as *const _,
+                REQ.len(),
+                &mut method.as_ptr(),
+                &mut 16,
+                &mut path.as_ptr(),
+                &mut 16,
+                &mut minor_version,
+                mem::transmute::<*mut Header, *mut pico::ffi::phr_header>(headers.0.as_mut_ptr()),
+                &mut h_len as *mut usize as *mut _,
+                prev_buf_len
+            )
+        };
+        assert_eq!(ret, REQ.len() as i32);
+    })
+}
+
+#[bench]
+fn bench_httparse(b: &mut test::Bencher) {
+    let mut headers = [httparse::Header{ name: "", value: &[] }; 16];
+    let mut req = httparse::Request::new(&mut headers);
+    b.iter(|| {
+        assert_eq!(req.parse(REQ).unwrap(), httparse::Status::Complete(REQ.len()));
+    })
+}
--- a/third_party/rust/httparse/src/iter.rs
+++ b/third_party/rust/httparse/src/iter.rs
@@ -1,140 +1,116 @@
-use core::slice;
-
-pub struct Bytes<'a> {
-    slice: &'a [u8],
-    pos: usize
-}
-
-impl<'a> Bytes<'a> {
-    #[inline]
-    pub fn new(slice: &'a [u8]) -> Bytes<'a> {
-        Bytes {
-            slice: slice,
-            pos: 0
-        }
-    }
-
-    #[inline]
-    pub fn pos(&self) -> usize {
-        self.pos
-    }
-
-    #[inline]
-    pub fn peek(&self) -> Option<u8> {
-        self.slice.get(self.pos).cloned()
-    }
-
-    #[inline]
-    pub fn bump(&mut self) {
-        self.pos += 1;
-    }
-
-    #[inline]
-    pub fn len(&self) -> usize {
-        self.slice.len()
-    }
-
-    #[inline]
-    pub fn slice(&mut self) -> &'a [u8] {
-        self.slice_skip(0)
-    }
-
-    #[inline]
-    pub fn slice_skip(&mut self, skip: usize) -> &'a [u8] {
-        debug_assert!(self.pos >= skip);
-        let head_pos = self.pos - skip;
-        unsafe {
-            let ptr = self.slice.as_ptr();
-            let head = slice::from_raw_parts(ptr, head_pos);
-            let tail = slice::from_raw_parts(ptr.offset(self.pos as isize), self.slice.len() - self.pos);
-            self.pos = 0;
-            self.slice = tail;
-            head
-        }
-    }
-
-    #[inline]
-    pub fn next_8<'b>(&'b mut self) -> Option<Bytes8<'b, 'a>> {
-        if self.slice.len() > self.pos + 8 {
-            Some(Bytes8::new(self))
-        } else {
-            None
-        }
-    }
-}
-
-impl<'a> Iterator for Bytes<'a> {
-    type Item = u8;
-
-    #[inline]
-    fn next(&mut self) -> Option<u8> {
-        if self.slice.len() > self.pos {
-            let b = unsafe { *self.slice.get_unchecked(self.pos) };
-            self.pos += 1;
-            Some(b)
-        } else {
-            None
-        }
-    }
-}
-
-pub struct Bytes8<'a, 'b: 'a> {
-    bytes: &'a mut Bytes<'b>,
-    #[cfg(debug_assertions)]
-    pos: usize
-}
-
-macro_rules! bytes8_methods {
-    ($f:ident, $pos:expr) => {
-        #[inline]
-        pub fn $f(&mut self) -> u8 {
-            self.assert_pos($pos);
-            let b = unsafe { *self.bytes.slice.get_unchecked(self.bytes.pos) };
-            self.bytes.pos += 1;
-            b
-        }
-    };
-    () => {
-        bytes8_methods!(_0, 0);
-        bytes8_methods!(_1, 1);
-        bytes8_methods!(_2, 2);
-        bytes8_methods!(_3, 3);
-        bytes8_methods!(_4, 4);
-        bytes8_methods!(_5, 5);
-        bytes8_methods!(_6, 6);
-        bytes8_methods!(_7, 7);
-    }
-}
-
-impl<'a, 'b: 'a> Bytes8<'a, 'b> {
-    bytes8_methods! {}
-
-    #[cfg(not(debug_assertions))]
-    #[inline]
-    fn new(bytes: &'a mut Bytes<'b>) -> Bytes8<'a, 'b> {
-        Bytes8 {
-            bytes: bytes,
-        }
-    }
-
-    #[cfg(debug_assertions)]
-    #[inline]
-    fn new(bytes: &'a mut Bytes<'b>) -> Bytes8<'a, 'b> {
-        Bytes8 {
-            bytes: bytes,
-            pos: 0,
-        }
-    }
-
-    #[cfg(not(debug_assertions))]
-    #[inline]
-    fn assert_pos(&mut self, _pos: usize) {
-    }
-
-    #[cfg(debug_assertions)]
-    #[inline]
-    fn assert_pos(&mut self, pos: usize) {
-        assert!(self.pos == pos);
-        self.pos += 1;
-    }
-}
+use core::slice;
+
+pub struct Bytes<'a> {
+    slice: &'a [u8],
+    pos: usize
+}
+
+impl<'a> Bytes<'a> {
+    #[inline]
+    pub fn new(slice: &'a [u8]) -> Bytes<'a> {
+        Bytes {
+            slice: slice,
+            pos: 0
+        }
+    }
+
+    #[inline]
+    pub fn pos(&self) -> usize {
+        self.pos
+    }
+
+    #[inline]
+    pub fn peek(&self) -> Option<u8> {
+        self.slice.get(self.pos).cloned()
+    }
+
+    #[inline]
+    pub fn bump(&mut self) {
+        self.pos += 1;
+    }
+
+    #[inline]
+    pub fn len(&self) -> usize {
+        self.slice.len()
+    }
+
+    #[inline]
+    pub fn slice(&mut self) -> &'a [u8] {
+        self.slice_skip(0)
+    }
+
+    #[inline]
+    pub fn slice_skip(&mut self, skip: usize) -> &'a [u8] {
+        debug_assert!(self.pos >= skip);
+        let head_pos = self.pos - skip;
+        unsafe {
+            let ptr = self.slice.as_ptr();
+            let head = slice::from_raw_parts(ptr, head_pos);
+            let tail = slice::from_raw_parts(ptr.offset(self.pos as isize), self.slice.len() - self.pos);
+            self.pos = 0;
+            self.slice = tail;
+            head
+        }
+    }
+
+    #[inline]
+    pub fn next_8<'b>(&'b mut self) -> Option<Bytes8<'b, 'a>> {
+        if self.slice.len() > self.pos + 8 {
+            Some(Bytes8 { bytes: self, pos: 0 })
+        } else {
+            None
+        }
+    }
+}
+
+impl<'a> Iterator for Bytes<'a> {
+    type Item = u8;
+
+    #[inline]
+    fn next(&mut self) -> Option<u8> {
+        if self.slice.len() > self.pos {
+            let b = unsafe { *self.slice.get_unchecked(self.pos) };
+            self.pos += 1;
+            Some(b)
+        } else {
+            None
+        }
+    }
+}
+
+pub struct Bytes8<'a, 'b: 'a> {
+    bytes: &'a mut Bytes<'b>,
+    pos: usize
+}
+
+macro_rules! bytes8_methods {
+    ($f:ident, $pos:expr) => {
+        #[inline]
+        pub fn $f(&mut self) -> u8 {
+            debug_assert!(self.assert_pos($pos));
+            let b = unsafe { *self.bytes.slice.get_unchecked(self.bytes.pos) };
+            self.bytes.pos += 1;
+            b
+        }
+    };
+    () => {
+        bytes8_methods!(_0, 0);
+        bytes8_methods!(_1, 1);
+        bytes8_methods!(_2, 2);
+        bytes8_methods!(_3, 3);
+        bytes8_methods!(_4, 4);
+        bytes8_methods!(_5, 5);
+        bytes8_methods!(_6, 6);
+        bytes8_methods!(_7, 7);
+    }
+}
+
+impl<'a, 'b: 'a> Bytes8<'a, 'b> {
+    bytes8_methods! {}
+
+    fn assert_pos(&mut self, pos: usize) -> bool {
+        let ret = self.pos == pos;
+        self.pos += 1;
+        ret
+    }
+}
--- a/third_party/rust/httparse/src/lib.rs
+++ b/third_party/rust/httparse/src/lib.rs
@@ -1,994 +1,946 @@
-#![cfg_attr(not(feature = "std"),  no_std)]
-#![cfg_attr(test, deny(warnings))]
-#![deny(missing_docs)]
-//! # httparse
-//!
-//! A push library for parsing HTTP/1.x requests and responses.
-//!
-//! The focus is on speed and safety. Unsafe code is used to keep parsing fast,
-//! but unsafety is contained in a submodule, with invariants enforced. The
-//! parsing internals use an `Iterator` instead of direct indexing, while
-//! skipping bounds checks.
-//!
-//! The speed is faster than picohttpparser, when SIMD is not available.
-#[cfg(feature = "std")] extern crate std as core;
-
-use core::{fmt, result, str, slice};
-
-use iter::Bytes;
-
-mod iter;
-
-macro_rules! next {
-    ($bytes:ident) => ({
-        match $bytes.next() {
-            Some(b) => b,
-            None => return Ok(Status::Partial)
-        }
-    })
-}
-
-macro_rules! expect {
-    ($bytes:ident.next() == $pat:pat => $ret:expr) => {
-        expect!(next!($bytes) => $pat |? $ret)
-    };
-    ($e:expr => $pat:pat |? $ret:expr) => {
-        match $e {
-            v@$pat => v,
-            _ => return $ret
-        }
-    };
-}
-
-macro_rules! complete {
-    ($e:expr) => {
-        match try!($e) {
-            Status::Complete(v) => v,
-            Status::Partial => return Ok(Status::Partial)
-        }
-    }
-}
-
-#[inline]
-fn shrink<T>(slice: &mut &mut [T], len: usize) {
-    debug_assert!(slice.len() >= len);
-    let ptr = slice.as_mut_ptr();
-    *slice = unsafe { slice::from_raw_parts_mut(ptr, len) };
-}
-
-/// Determines if byte is a token char.
-///
-/// > ```notrust
-/// > token          = 1*tchar
-/// >
-/// > tchar          = "!" / "#" / "$" / "%" / "&" / "'" / "*"
-/// >                / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
-/// >                / DIGIT / ALPHA
-/// >                ; any VCHAR, except delimiters
-/// > ```
-#[inline]
-fn is_token(b: u8) -> bool {
-    b > 0x1F && b < 0x7F
-}
-macro_rules! byte_map {
-    ($($flag:expr,)*) => ([
-        $($flag != 0,)*
-    ])
-}
-
-static HEADER_NAME_MAP: [bool; 256] = byte_map![
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0,
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
-    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1,
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-];
-
-#[inline]
-fn is_header_name_token(b: u8) -> bool {
-    HEADER_NAME_MAP[b as usize]
-}
-
-static HEADER_VALUE_MAP: [bool; 256] = byte_map![
-    0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-];
-
-
-#[inline]
-fn is_header_value_token(b: u8) -> bool {
-    HEADER_VALUE_MAP[b as usize]
-}
-
-
-macro_rules! space {
-    ($bytes:ident or $err:expr) => ({
-        expect!($bytes.next() == b' ' => Err($err));
-        $bytes.slice();
-    })
-}
-
-macro_rules! newline {
-    ($bytes:ident) => ({
-        match next!($bytes) {
-            b'\r' => {
-                expect!($bytes.next() == b'\n' => Err(Error::NewLine));
-                $bytes.slice();
-            },
-            b'\n' => {
-                $bytes.slice();
-            },
-            _ => return Err(Error::NewLine)
-        }
-    })
-}
-
-/// An error in parsing.
-#[derive(Copy, Clone, PartialEq, Eq, Debug)]
-pub enum Error {
-    /// Invalid byte in header name.
-    HeaderName,
-    /// Invalid byte in header value.
-    HeaderValue,
-    /// Invalid byte in new line.
-    NewLine,
-    /// Invalid byte in Response status.
-    Status,
-    /// Invalid byte where token is required.
-    Token,
-    /// Parsed more headers than provided buffer can contain.
-    TooManyHeaders,
-    /// Invalid byte in HTTP version.
-    Version,
-}
-
-impl Error {
-    #[inline]
-    fn description_str(&self) -> &'static str {
-        match *self {
-            Error::HeaderName => "invalid header name",
-            Error::HeaderValue => "invalid header value",
-            Error::NewLine => "invalid new line",
-            Error::Status => "invalid response status",
-            Error::Token => "invalid token",
-            Error::TooManyHeaders => "too many headers",
-            Error::Version => "invalid HTTP version",
-        }
-    }
-}
-
-impl fmt::Display for Error {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.write_str(self.description_str())
-    }
-}
-
-#[cfg(feature = "std")]
-impl std::error::Error for Error {
-    fn description(&self) -> &str {
-        self.description_str()
-    }
-}
-
-/// An error in parsing a chunk size.
-// Note: Move this into the error enum once v2.0 is released.
-#[derive(Debug, PartialEq, Eq)]
-pub struct InvalidChunkSize;
-
-impl fmt::Display for InvalidChunkSize {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.write_str("invalid chunk size")
-    }
-}
-
-/// A Result of any parsing action.
-///
-/// If the input is invalid, an `Error` will be returned. Note that incomplete
-/// data is not considered invalid, and so will not return an error, but rather
-/// a `Ok(Status::Partial)`.
-pub type Result<T> = result::Result<Status<T>, Error>;
-
-/// The result of a successful parse pass.
-///
-/// `Complete` is used when the buffer contained the complete value.
-/// `Partial` is used when parsing did not reach the end of the expected value,
-/// but no invalid data was found.
-#[derive(Copy, Clone, PartialEq, Debug)]
-pub enum Status<T> {
-    /// The completed result.
-    Complete(T),
-    /// A partial result.
-    Partial
-}
-
-impl<T> Status<T> {
-    /// Convenience method to check if status is complete.
-    #[inline]
-    pub fn is_complete(&self) -> bool {
-        match *self {
-            Status::Complete(..) => true,
-            Status::Partial => false
-        }
-    }
-
-    /// Convenience method to check if status is partial.
-    #[inline]
-    pub fn is_partial(&self) -> bool {
-        match *self {
-            Status::Complete(..) => false,
-            Status::Partial => true
-        }
-    }
-
-    /// Convenience method to unwrap a Complete value. Panics if the status is
-    /// `Partial`.
-    #[inline]
-    pub fn unwrap(self) -> T {
-        match self {
-            Status::Complete(t) => t,
-            Status::Partial => panic!("Tried to unwrap Status::Partial")
-        }
-    }
-}
-
-/// A parsed Request.
-///
-/// The optional values will be `None` if a parse was not complete, and did not
-/// parse the associated property. This allows you to inspect the parts that
-/// could be parsed, before reading more, in case you wish to exit early.
-///
-/// # Example
-///
-/// ```no_run
-/// let buf = b"GET /404 HTTP/1.1\r\nHost:";
-/// let mut headers = [httparse::EMPTY_HEADER; 16];
-/// let mut req = httparse::Request::new(&mut headers);
-/// let res = req.parse(buf).unwrap();
-/// if res.is_partial() {
-///     match req.path {
-///         Some(ref path) => {
-///             // check router for path.
-///             // /404 doesn't exist? we could stop parsing
-///         },
-///         None => {
-///             // must read more and parse again
-///         }
-///     }
-/// }
-/// ```
-#[derive(Debug, PartialEq)]
-pub struct Request<'headers, 'buf: 'headers> {
-    /// The request method, such as `GET`.
-    pub method: Option<&'buf str>,
-    /// The request path, such as `/about-us`.
-    pub path: Option<&'buf str>,
-    /// The request version, such as `HTTP/1.1`.
-    pub version: Option<u8>,
-    /// The request headers.
-    pub headers: &'headers mut [Header<'buf>]
-}
-
-impl<'h, 'b> Request<'h, 'b> {
-    /// Creates a new Request, using a slice of headers you allocate.
-    #[inline]
-    pub fn new(headers: &'h mut [Header<'b>]) -> Request<'h, 'b> {
-        Request {
-            method: None,
-            path: None,
-            version: None,
-            headers: headers,
-        }
-    }
-
-    /// Try to parse a buffer of bytes into the Request.
-    pub fn parse(&mut self, buf: &'b [u8]) -> Result<usize> {
-        let orig_len = buf.len();
-        let mut bytes = Bytes::new(buf);
-        complete!(skip_empty_lines(&mut bytes));
-        self.method = Some(complete!(parse_token(&mut bytes)));
-        self.path = Some(complete!(parse_token(&mut bytes)));
-        self.version = Some(complete!(parse_version(&mut bytes)));
-        newline!(bytes);
-
-        let len = orig_len - bytes.len();
-        let headers_len = complete!(parse_headers_iter(&mut self.headers, &mut bytes));
-
-        Ok(Status::Complete(len + headers_len))
-    }
-}
-
-#[inline]
-fn skip_empty_lines(bytes: &mut Bytes) -> Result<()> {
-    loop {
-        let b = bytes.peek();
-        match b {
-            Some(b'\r') => {
-                bytes.bump();
-                expect!(bytes.next() == b'\n' => Err(Error::NewLine));
-            },
-            Some(b'\n') => {
-                bytes.bump();
-            },
-            Some(..) => {
-                bytes.slice();
-                return Ok(Status::Complete(()));
-            },
-            None => return Ok(Status::Partial)
-        }
-    }
-}
-
-/// A parsed Response.
-///
-/// See `Request` docs for explanation of optional values.
-#[derive(Debug, PartialEq)]
-pub struct Response<'headers, 'buf: 'headers> {
-    /// The response version, such as `HTTP/1.1`.
-    pub version: Option<u8>,
-    /// The response code, such as `200`.
-    pub code: Option<u16>,
-    /// The response reason-phrase, such as `OK`.
-    pub reason: Option<&'buf str>,
-    /// The response headers.
-    pub headers: &'headers mut [Header<'buf>]
-}
-
-impl<'h, 'b> Response<'h, 'b> {
-    /// Creates a new `Response` using a slice of `Header`s you have allocated.
-    #[inline]
-    pub fn new(headers: &'h mut [Header<'b>]) -> Response<'h, 'b> {
-        Response {
-            version: None,
-            code: None,
-            reason: None,
-            headers: headers,
-        }
-    }
-
-    /// Try to parse a buffer of bytes into this `Response`.
-    pub fn parse(&mut self, buf: &'b [u8]) -> Result<usize> {
-        let orig_len = buf.len();
-        let mut bytes = Bytes::new(buf);
-
-        complete!(skip_empty_lines(&mut bytes));
-        self.version = Some(complete!(parse_version(&mut bytes)));
-        space!(bytes or Error::Version);
-        self.code = Some(complete!(parse_code(&mut bytes)));
-
-        // RFC7230 says there must be 'SP' and then reason-phrase, but admits
-        // its only for legacy reasons. With the reason-phrase completely
-        // optional (and preferred to be omitted) in HTTP2, we'll just
-        // handle any response that doesn't include a reason-phrase, because
-        // it's more lenient, and we don't care anyways.
-        //
-        // So, a SP means parse a reason-phrase.
-        // A newline means go to headers.
-        // Anything else we'll say is a malformed status.
-        match next!(bytes) {
-            b' ' => {
-                bytes.slice();
-                self.reason = Some(complete!(parse_reason(&mut bytes)));
-            },
-            b'\r' => {
-                expect!(bytes.next() == b'\n' => Err(Error::Status));
-                self.reason = Some("");
-            },
-            b'\n' => self.reason = Some(""),
-            _ => return Err(Error::Status),
-        }
-
-
-        let len = orig_len - bytes.len();
-        let headers_len = complete!(parse_headers_iter(&mut self.headers, &mut bytes));
-        Ok(Status::Complete(len + headers_len))
-    }
-}
-
-/// Represents a parsed header.
-#[derive(Copy, Clone, PartialEq, Debug)]
-pub struct Header<'a> {
-    /// The name portion of a header.
-    ///
-    /// A header name must be valid ASCII-US, so it's safe to store as a `&str`.
-    pub name: &'a str,
-    /// The value portion of a header.
-    ///
-    /// While headers **should** be ASCII-US, the specification allows for
-    /// values that may not be, and so the value is stored as bytes.
-    pub value: &'a [u8],
-}
-
-/// An empty header, useful for constructing a `Header` array to pass in for
-/// parsing.
-///
-/// # Example
-///
-/// ```
-/// let headers = [httparse::EMPTY_HEADER; 64];
-/// ```
-pub const EMPTY_HEADER: Header<'static> = Header { name: "", value: b"" };
-
-#[inline]
-fn parse_version(bytes: &mut Bytes) -> Result<u8> {
-    if let Some(mut eight) = bytes.next_8() {
-        expect!(eight._0() => b'H' |? Err(Error::Version));
-        expect!(eight._1() => b'T' |? Err(Error::Version));
-        expect!(eight._2() => b'T' |? Err(Error::Version));
-        expect!(eight._3() => b'P' |? Err(Error::Version));
-        expect!(eight._4() => b'/' |? Err(Error::Version));
-        expect!(eight._5() => b'1' |? Err(Error::Version));
-        expect!(eight._6() => b'.' |? Err(Error::Version));
-        let v = match eight._7() {
-            b'0' => 0,
-            b'1' => 1,
-            _ => return Err(Error::Version)
-        };
-        Ok(Status::Complete(v))
-    } else {
-        Ok(Status::Partial)
-    }
-}
-
-/// From [RFC 7230](https://tools.ietf.org/html/rfc7230):
-///
-/// > ```notrust
-/// > reason-phrase  = *( HTAB / SP / VCHAR / obs-text )
-/// > HTAB           = %x09        ; horizontal tab
-/// > VCHAR          = %x21-7E     ; visible (printing) characters
-/// > obs-text       = %x80-FF
-/// > ```
-///
-/// > A.2.  Changes from RFC 2616
-/// >
-/// > Non-US-ASCII content in header fields and the reason phrase
-/// > has been obsoleted and made opaque (the TEXT rule was removed).
-///
-/// Note that the following implementation deliberately rejects the obsoleted (non-US-ASCII) text range.
-///
-/// The fully compliant parser should probably just return the reason-phrase as an opaque &[u8] data
-/// and leave interpretation to user or specialized helpers (akin to .display() in std::path::Path)
-#[inline]
-fn parse_reason<'a>(bytes: &mut Bytes<'a>) -> Result<&'a str> {
-    loop {
-        let b = next!(bytes);
-        if b == b'\r' {
-            expect!(bytes.next() == b'\n' => Err(Error::Status));
-            return Ok(Status::Complete(unsafe {
-                // all bytes up till `i` must have been HTAB / SP / VCHAR
-                str::from_utf8_unchecked(bytes.slice_skip(2))
-            }));
-        } else if b == b'\n' {
-            return Ok(Status::Complete(unsafe {
-                // all bytes up till `i` must have been HTAB / SP / VCHAR
-                str::from_utf8_unchecked(bytes.slice_skip(1))
-            }));
-        } else if !((b >= 0x20 && b <= 0x7E) || b == b'\t') {
-            return Err(Error::Status);
-        }
-    }
-}
-
-#[inline]
-fn parse_token<'a>(bytes: &mut Bytes<'a>) -> Result<&'a str> {
-    loop {
-        let b = next!(bytes);
-        if b == b' ' {
-            return Ok(Status::Complete(unsafe {
-                // all bytes up till `i` must have been `is_token`.
-                str::from_utf8_unchecked(bytes.slice_skip(1))
-            }));
-        } else if !is_token(b) {
-            return Err(Error::Token);
-        }
-    }
-}
-
-#[inline]
-fn parse_code(bytes: &mut Bytes) -> Result<u16> {
-    let hundreds = expect!(bytes.next() == b'0'...b'9' => Err(Error::Status));
-    let tens = expect!(bytes.next() == b'0'...b'9' => Err(Error::Status));
-    let ones = expect!(bytes.next() == b'0'...b'9' => Err(Error::Status));
-
-    Ok(Status::Complete((hundreds - b'0') as u16 * 100 +
-                        (tens - b'0') as u16 * 10 +
-                        (ones - b'0') as u16))
-}
-
-/// Parse a buffer of bytes as headers.
-///
-/// The return value, if complete and successful, includes the index of the
-/// buffer that parsing stopped at, and a sliced reference to the parsed
-/// headers. The length of the slice will be equal to the number of properly
-/// parsed headers.
-///
-/// # Example
-///
-/// ```
-/// let buf = b"Host: foo.bar\nAccept: */*\n\nblah blah";
-/// let mut headers = [httparse::EMPTY_HEADER; 4];
-/// assert_eq!(httparse::parse_headers(buf, &mut headers),
-///            Ok(httparse::Status::Complete((27, &[
-///                httparse::Header { name: "Host", value: b"foo.bar" },
-///                httparse::Header { name: "Accept", value: b"*/*" }
-///            ][..]))));
-/// ```
-pub fn parse_headers<'b: 'h, 'h>(src: &'b [u8], mut dst: &'h mut [Header<'b>])
-    -> Result<(usize, &'h [Header<'b>])> {
-    let mut iter = Bytes::new(src);
-    let pos = complete!(parse_headers_iter(&mut dst, &mut iter));
-    Ok(Status::Complete((pos, dst)))
-}
-
-#[inline]
-fn parse_headers_iter<'a, 'b>(headers: &mut &mut [Header<'a>], bytes: &'b mut Bytes<'a>)
-    -> Result<usize> {
-    let mut num_headers: usize = 0;
-    let mut count: usize = 0;
-    let mut result = Err(Error::TooManyHeaders);
-
-    {
-        let mut iter = headers.iter_mut();
-
-        'headers: loop {
-            // a newline here means the head is over!
-            let b = next!(bytes);
-            if b == b'\r' {
-                expect!(bytes.next() == b'\n' => Err(Error::NewLine));
-                result = Ok(Status::Complete(count + bytes.pos()));
-                break;
-            } else if b == b'\n' {
-                result = Ok(Status::Complete(count + bytes.pos()));
-                break;
-            } else if !is_header_name_token(b) {
-                return Err(Error::HeaderName);
-            }
-
-            let header = match iter.next() {
-                Some(header) => header,
-                None => break 'headers
-            };
-
-            num_headers += 1;
-            // parse header name until colon
-            'name: loop {
-                let b = next!(bytes);
-                if b == b':' {
-                    count += bytes.pos();
-                    header.name = unsafe {
-                        str::from_utf8_unchecked(bytes.slice_skip(1))
-                    };
-                    break 'name;
-                } else if !is_header_name_token(b) {
-                    return Err(Error::HeaderName);
-                }
-            }
-
-            let mut b;
-
-            'value: loop {
-
-                // eat white space between colon and value
-                'whitespace: loop {
-                    b = next!(bytes);
-                    if b == b' ' || b == b'\t' {
-                        count += bytes.pos();
-                        bytes.slice();
-                        continue 'whitespace;
-                    } else {
-                        if !is_header_value_token(b) {
-                            break 'value;
-                        }
-                        break 'whitespace;
-                    }
-                }
-
-                // parse value till EOL
-
-
-
-                macro_rules! check {
-                    ($bytes:ident, $i:ident) => ({
-                        b = $bytes.$i();
-                        if !is_header_value_token(b) {
-                            break 'value;
-                        }
-                    });
-                    ($bytes:ident) => ({
-                        check!($bytes, _0);
-                        check!($bytes, _1);
-                        check!($bytes, _2);
-                        check!($bytes, _3);
-                        check!($bytes, _4);
-                        check!($bytes, _5);
-                        check!($bytes, _6);
-                        check!($bytes, _7);
-                    })
-                }
-                while let Some(mut bytes8) = bytes.next_8() {
-                    check!(bytes8);
-                }
-                loop {
-                    b = next!(bytes);
-                    if !is_header_value_token(b) {
-                        break 'value;
-                    }
-                }
-            }
-
-            //found_ctl
-            if b == b'\r' {
-                expect!(bytes.next() == b'\n' => Err(Error::HeaderValue));
-                count += bytes.pos();
-                header.value = bytes.slice_skip(2);
-            } else if b == b'\n' {
-                count += bytes.pos();
-                header.value = bytes.slice_skip(1);
-            } else {
-                return Err(Error::HeaderValue);
-            }
-
-        }
-    } // drop iter
-
-    shrink(headers, num_headers);
-    result
-}
-
-/// Parse a buffer of bytes as a chunk size.
-///
-/// The return value, if complete and successful, includes the index of the
-/// buffer that parsing stopped at, and the size of the following chunk.
-///
-/// # Example
-///
-/// ```
-/// let buf = b"4\r\nRust\r\n0\r\n\r\n";
-/// assert_eq!(httparse::parse_chunk_size(buf),
-///            Ok(httparse::Status::Complete((3, 4))));
-/// ```
-pub fn parse_chunk_size(buf: &[u8])
-        -> result::Result<Status<(usize, u64)>, InvalidChunkSize> {
-    const RADIX: u64 = 16;
-    let mut bytes = Bytes::new(buf);
-    let mut size = 0;
-    let mut in_chunk_size = true;
-    let mut in_ext = false;
-    let mut count = 0;
-    loop {
-        let b = next!(bytes);
-        match b {
-            b'0'...b'9' if in_chunk_size => {
-                if count > 15 {
-                    return Err(InvalidChunkSize);
-                }
-                count += 1;
-                size *= RADIX;
-                size += (b - b'0') as u64;
-            },
-            b'a'...b'f' if in_chunk_size => {
-                if count > 15 {
-                    return Err(InvalidChunkSize);
-                }
-                count += 1;
-                size *= RADIX;
-                size += (b + 10 - b'a') as u64;
-            }
-            b'A'...b'F' if in_chunk_size => {
-                if count > 15 {
-                    return Err(InvalidChunkSize);
-                }
-                count += 1;
-                size *= RADIX;
-                size += (b + 10 - b'A') as u64;
-            }
-            b'\r' => {
-                match next!(bytes) {
-                    b'\n' => break,
-                    _ => return Err(InvalidChunkSize),
-                }
-            }
-            // If we weren't in the extension yet, the ";" signals its start
-            b';' if !in_ext => {
-                in_ext = true;
-                in_chunk_size = false;
-            }
-            // "Linear white space" is ignored between the chunk size and the
-            // extension separator token (";") due to the "implied *LWS rule".
-            b'\t' | b' ' if !in_ext & !in_chunk_size => {}
-            // LWS can follow the chunk size, but no more digits can come
-            b'\t' | b' ' if in_chunk_size => in_chunk_size = false,
-            // We allow any arbitrary octet once we are in the extension, since
-            // they all get ignored anyway. According to the HTTP spec, valid
-            // extensions would have a more strict syntax:
-            //     (token ["=" (token | quoted-string)])
-            // but we gain nothing by rejecting an otherwise valid chunk size.
-            _ if in_ext => {}
-            // Finally, if we aren't in the extension and we're reading any
-            // other octet, the chunk size line is invalid!
-            _ => return Err(InvalidChunkSize),
-        }
-    }
-    Ok(Status::Complete((bytes.pos(), size)))
-}
-
-#[cfg(test)]
-mod tests {
-    use super::{Request, Response, Status, EMPTY_HEADER, shrink, parse_chunk_size};
-
-    const NUM_OF_HEADERS: usize = 4;
-
-    #[test]
-    fn test_shrink() {
-        let mut arr = [EMPTY_HEADER; 16];
-        {
-            let slice = &mut &mut arr[..];
-            assert_eq!(slice.len(), 16);
-            shrink(slice, 4);
-            assert_eq!(slice.len(), 4);
-        }
-        assert_eq!(arr.len(), 16);
-    }
-
-    macro_rules! req {
-        ($name:ident, $buf:expr, |$arg:ident| $body:expr) => (
-            req! {$name, $buf, Ok(Status::Complete($buf.len())), |$arg| $body }
-        );
-        ($name:ident, $buf:expr, $len:expr, |$arg:ident| $body:expr) => (
-        #[test]
-        fn $name() {
-            let mut headers = [EMPTY_HEADER; NUM_OF_HEADERS];
-            let mut req = Request::new(&mut headers[..]);
-            let status = req.parse($buf.as_ref());
-            assert_eq!(status, $len);
-            closure(req);
-
-            fn closure($arg: Request) {
-                $body
-            }
-        }
-        )
-    }
-
-    req! {
-        test_request_simple,
-        b"GET / HTTP/1.1\r\n\r\n",
-        |req| {
-            assert_eq!(req.method.unwrap(), "GET");
-            assert_eq!(req.path.unwrap(), "/");
-            assert_eq!(req.version.unwrap(), 1);
-            assert_eq!(req.headers.len(), 0);
-        }
-    }
-
-    req! {
-        test_request_headers,
-        b"GET / HTTP/1.1\r\nHost: foo.com\r\nCookie: \r\n\r\n",
-        |req| {
-            assert_eq!(req.method.unwrap(), "GET");
-            assert_eq!(req.path.unwrap(), "/");
-            assert_eq!(req.version.unwrap(), 1);
-            assert_eq!(req.headers.len(), 2);
-            assert_eq!(req.headers[0].name, "Host");
-            assert_eq!(req.headers[0].value, b"foo.com");
-            assert_eq!(req.headers[1].name, "Cookie");
-            assert_eq!(req.headers[1].value, b"");
-        }
-    }
-
-    req! {
-        test_request_headers_max,
-        b"GET / HTTP/1.1\r\nA: A\r\nB: B\r\nC: C\r\nD: D\r\n\r\n",
-        |req| {
-            assert_eq!(req.headers.len(), NUM_OF_HEADERS);
-        }
-    }
-
-    req! {
-        test_request_multibyte,
-        b"GET / HTTP/1.1\r\nHost: foo.com\r\nUser-Agent: \xe3\x81\xb2\xe3/1.0\r\n\r\n",
-        |req| {
-            assert_eq!(req.method.unwrap(), "GET");
-            assert_eq!(req.path.unwrap(), "/");
-            assert_eq!(req.version.unwrap(), 1);
-            assert_eq!(req.headers[0].name, "Host");
-            assert_eq!(req.headers[0].value, b"foo.com");
-            assert_eq!(req.headers[1].name, "User-Agent");
-            assert_eq!(req.headers[1].value, b"\xe3\x81\xb2\xe3/1.0");
-        }
-    }
-
-
-    req! {
-        test_request_partial,
-        b"GET / HTTP/1.1\r\n\r", Ok(Status::Partial),
-        |_req| {}
-    }
-
-    req! {
-        test_request_newlines,
-        b"GET / HTTP/1.1\nHost: foo.bar\n\n",
-        |_r| {}
-    }
-
-    req! {
-        test_request_empty_lines_prefix,
-        b"\r\n\r\nGET / HTTP/1.1\r\n\r\n",
-        |req| {
-            assert_eq!(req.method.unwrap(), "GET");
-            assert_eq!(req.path.unwrap(), "/");
-            assert_eq!(req.version.unwrap(), 1);
-            assert_eq!(req.headers.len(), 0);
-        }
-    }
-
-    req! {
-        test_request_empty_lines_prefix_lf_only,
-        b"\n\nGET / HTTP/1.1\n\n",
-        |req| {
-            assert_eq!(req.method.unwrap(), "GET");
-            assert_eq!(req.path.unwrap(), "/");
-            assert_eq!(req.version.unwrap(), 1);
-            assert_eq!(req.headers.len(), 0);
-        }
-    }
-
-    req! {
-        test_request_with_invalid_token_delimiter,
-        b"GET\n/ HTTP/1.1\r\nHost: foo.bar\r\n\r\n",
-        Err(::Error::Token),
-        |_r| {}
-    }
-
-    macro_rules! res {
-        ($name:ident, $buf:expr, |$arg:ident| $body:expr) => (
-            res! {$name, $buf, Ok(Status::Complete($buf.len())), |$arg| $body }
-        );
-        ($name:ident, $buf:expr, $len:expr, |$arg:ident| $body:expr) => (
-        #[test]
-        fn $name() {
-            let mut headers = [EMPTY_HEADER; NUM_OF_HEADERS];
-            let mut res = Response::new(&mut headers[..]);
-            let status = res.parse($buf.as_ref());
-            assert_eq!(status, $len);
-            closure(res);
-
-            fn closure($arg: Response) {
-                $body
-            }
-        }
-        )
-    }
-
-    res! {
-        test_response_simple,
-        b"HTTP/1.1 200 OK\r\n\r\n",
-        |res| {
-            assert_eq!(res.version.unwrap(), 1);
-            assert_eq!(res.code.unwrap(), 200);
-            assert_eq!(res.reason.unwrap(), "OK");
-        }
-    }
-
-    res! {
-        test_response_newlines,
-        b"HTTP/1.0 403 Forbidden\nServer: foo.bar\n\n",
-        |_r| {}
-    }
-
-    res! {
-        test_response_reason_missing,
-        b"HTTP/1.1 200 \r\n\r\n",
-        |res| {
-            assert_eq!(res.version.unwrap(), 1);
-            assert_eq!(res.code.unwrap(), 200);
-            assert_eq!(res.reason.unwrap(), "");
-        }
-    }
-
-    res! {
-        test_response_reason_missing_no_space,
-        b"HTTP/1.1 200\r\n\r\n",
-        |res| {
-            assert_eq!(res.version.unwrap(), 1);
-            assert_eq!(res.code.unwrap(), 200);
-            assert_eq!(res.reason.unwrap(), "");
-        }
-    }
-
-    res! {
-        test_response_reason_with_space_and_tab,
-        b"HTTP/1.1 101 Switching Protocols\t\r\n\r\n",
-        |res| {
-            assert_eq!(res.version.unwrap(), 1);
-            assert_eq!(res.code.unwrap(), 101);
-            assert_eq!(res.reason.unwrap(), "Switching Protocols\t");
-        }
-    }
-
-    static RESPONSE_REASON_WITH_OBS_TEXT_BYTE: &'static [u8] = b"HTTP/1.1 200 X\xFFZ\r\n\r\n";
-    res! {
-        test_response_reason_with_obsolete_text_byte,
-        RESPONSE_REASON_WITH_OBS_TEXT_BYTE,
-        Err(::Error::Status),
-        |_res| {}
-    }
-
-    res! {
-        test_response_reason_with_nul_byte,
-        b"HTTP/1.1 200 \x00\r\n\r\n",
-        Err(::Error::Status),
-        |_res| {}
-    }
-
-    res! {
-        test_response_version_missing_space,
-        b"HTTP/1.1",
-        Ok(Status::Partial),
-        |_res| {}
-    }
-
-    res! {
-        test_response_code_missing_space,
-        b"HTTP/1.1 200",
-        Ok(Status::Partial),
-        |_res| {}
-    }
-
-    res! {
-        test_response_empty_lines_prefix_lf_only,
-        b"\n\nHTTP/1.1 200 OK\n\n",
-        |_res| {}
-    }
-
-    #[test]
-    fn test_chunk_size() {
-        assert_eq!(parse_chunk_size(b"0\r\n"), Ok(Status::Complete((3, 0))));
-        assert_eq!(parse_chunk_size(b"12\r\nchunk"), Ok(Status::Complete((4, 18))));
-        assert_eq!(parse_chunk_size(b"3086d\r\n"), Ok(Status::Complete((7, 198765))));
-        assert_eq!(parse_chunk_size(b"3735AB1;foo bar*\r\n"), Ok(Status::Complete((18, 57891505))));
-        assert_eq!(parse_chunk_size(b"3735ab1 ; baz \r\n"), Ok(Status::Complete((16, 57891505))));
-        assert_eq!(parse_chunk_size(b"77a65\r"), Ok(Status::Partial));
-        assert_eq!(parse_chunk_size(b"ab"), Ok(Status::Partial));
-        assert_eq!(parse_chunk_size(b"567f8a\rfoo"), Err(::InvalidChunkSize));
-        assert_eq!(parse_chunk_size(b"567f8a\rfoo"), Err(::InvalidChunkSize));
-        assert_eq!(parse_chunk_size(b"567xf8a\r\n"), Err(::InvalidChunkSize));
-        assert_eq!(parse_chunk_size(b"ffffffffffffffff\r\n"), Ok(Status::Complete((18, ::core::u64::MAX))));
-        assert_eq!(parse_chunk_size(b"1ffffffffffffffff\r\n"), Err(::InvalidChunkSize));
-        assert_eq!(parse_chunk_size(b"Affffffffffffffff\r\n"), Err(::InvalidChunkSize));
-        assert_eq!(parse_chunk_size(b"fffffffffffffffff\r\n"), Err(::InvalidChunkSize));
-    }
-
-    #[cfg(feature = "std")]
-    #[test]
-    fn test_std_error() {
-        use super::Error;
-        use std::error::Error as StdError;
-        let err = Error::HeaderName;
-        assert_eq!(err.to_string(), err.description());
-    }
-}
+#![cfg_attr(not(feature = "std"),  no_std)]
+#![cfg_attr(test, deny(warnings))]
+#![deny(missing_docs)]
+//! # httparse
+//!
+//! A push library for parsing HTTP/1.x requests and responses.
+//!
+//! The focus is on speed and safety. Unsafe code is used to keep parsing fast,
+//! but unsafety is contained in a submodule, with invariants enforced. The
+//! parsing internals use an `Iterator` instead of direct indexing, while
+//! skipping bounds checks.
+//!
+//! The speed is comparable to the fast picohttpparser, currently being around
+//! 1.6 times slower than pico. Improvements can be made as a `likely`
+//! intrinsic, and simd, are stabilized in rustc.
+
+#[cfg(feature = "std")] extern crate std as core;
+
+use core::{fmt, result, str, slice};
+
+use iter::Bytes;
+
+mod iter;
+
+macro_rules! next {
+    ($bytes:ident) => ({
+        match $bytes.next() {
+            Some(b) => b,
+            None => return Ok(Status::Partial)
+        }
+    })
+}
+
+macro_rules! expect {
+    ($bytes:ident.next() == $pat:pat => $ret:expr) => {
+        expect!(next!($bytes) => $pat |? $ret)
+    };
+    ($e:expr => $pat:pat |? $ret:expr) => {
+        match $e {
+            v@$pat => v,
+            _ => return $ret
+        }
+    };
+}
+
+macro_rules! complete {
+    ($e:expr) => {
+        match try!($e) {
+            Status::Complete(v) => v,
+            Status::Partial => return Ok(Status::Partial)
+        }
+    }
+}
+
+#[inline]
+fn shrink<T>(slice: &mut &mut [T], len: usize) {
+    debug_assert!(slice.len() >= len);
+    let ptr = slice.as_mut_ptr();
+    *slice = unsafe { slice::from_raw_parts_mut(ptr, len) };
+}
+
+/// Determines if byte is a token char.
+///
+/// > ```notrust
+/// > token          = 1*tchar
+/// >
+/// > tchar          = "!" / "#" / "$" / "%" / "&" / "'" / "*"
+/// >                / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
+/// >                / DIGIT / ALPHA
+/// >                ; any VCHAR, except delimiters
+/// > ```
+#[inline]
+fn is_token(b: u8) -> bool {
+    b > 0x1F && b < 0x7F
+}
+
+macro_rules! space {
+    ($bytes:ident or $err:expr) => ({
+        expect!($bytes.next() == b' ' => Err($err));
+        $bytes.slice();
+    })
+}
+
+macro_rules! newline {
+    ($bytes:ident) => ({
+        match next!($bytes) {
+            b'\r' => {
+                expect!($bytes.next() == b'\n' => Err(Error::NewLine));
+                $bytes.slice();
+            },
+            b'\n' => {
+                $bytes.slice();
+            },
+            _ => return Err(Error::NewLine)
+        }
+    })
+}
+
+/// An error in parsing.
+#[derive(Copy, Clone, PartialEq, Eq, Debug)]
+pub enum Error {
+    /// Invalid byte in header name.
+    HeaderName,
+    /// Invalid byte in header value.
+    HeaderValue,
+    /// Invalid byte in new line.
+    NewLine,
+    /// Invalid byte in Response status.
+    Status,
+    /// Invalid byte where token is required.
+    Token,
+    /// Parsed more headers than provided buffer can contain.
+    TooManyHeaders,
+    /// Invalid byte in HTTP version.
+    Version,
+}
+
+impl Error {
+    #[inline]
+    fn description_str(&self) -> &'static str {
+        match *self {
+            Error::HeaderName => "invalid header name",
+            Error::HeaderValue => "invalid header value",
+            Error::NewLine => "invalid new line",
+            Error::Status => "invalid response status",
+            Error::Token => "invalid token",
+            Error::TooManyHeaders => "too many headers",
+            Error::Version => "invalid HTTP version",
+        }
+    }
+}
+
+impl fmt::Display for Error {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        f.write_str(self.description_str())
+    }
+}
+
+#[cfg(feature = "std")]
+impl std::error::Error for Error {
+    fn description(&self) -> &str {
+        self.description_str()
+    }
+}
+
+/// An error in parsing a chunk size.
+// Note: Move this into the error enum once v2.0 is released.
+#[derive(Debug, PartialEq, Eq)]
+pub struct InvalidChunkSize;
+
+impl fmt::Display for InvalidChunkSize {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        f.write_str("invalid chunk size")
+    }
+}
+
+/// A Result of any parsing action.
+///
+/// If the input is invalid, an `Error` will be returned. Note that incomplete
+/// data is not considered invalid, and so will not return an error, but rather
+/// a `Ok(Status::Partial)`.
+pub type Result<T> = result::Result<Status<T>, Error>;
+
+/// The result of a successful parse pass.
+///
+/// `Complete` is used when the buffer contained the complete value.
+/// `Partial` is used when parsing did not reach the end of the expected value,
+/// but no invalid data was found.
+#[derive(Copy, Clone, PartialEq, Debug)]
+pub enum Status<T> {
+    /// The completed result.
+    Complete(T),
+    /// A partial result.
+    Partial
+}
+
+impl<T> Status<T> {
+    /// Convenience method to check if status is complete.
+    #[inline]
+    pub fn is_complete(&self) -> bool {
+        match *self {
+            Status::Complete(..) => true,
+            Status::Partial => false
+        }
+    }
+
+    /// Convenience method to check if status is partial.
+    #[inline]
+    pub fn is_partial(&self) -> bool {
+        match *self {
+            Status::Complete(..) => false,
+            Status::Partial => true
+        }
+    }
+
+    /// Convenience method to unwrap a Complete value. Panics if the status is
+    /// `Partial`.
+    #[inline]
+    pub fn unwrap(self) -> T {
+        match self {
+            Status::Complete(t) => t,
+            Status::Partial => panic!("Tried to unwrap Status::Partial")
+        }
+    }
+}
+
+/// A parsed Request.
+///
+/// The optional values will be `None` if a parse was not complete, and did not
+/// parse the associated property. This allows you to inspect the parts that
+/// could be parsed, before reading more, in case you wish to exit early.
+///
+/// # Example
+///
+/// ```no_run
+/// let buf = b"GET /404 HTTP/1.1\r\nHost:";
+/// let mut headers = [httparse::EMPTY_HEADER; 16];
+/// let mut req = httparse::Request::new(&mut headers);
+/// let res = req.parse(buf).unwrap();
+/// if res.is_partial() {
+///     match req.path {
+///         Some(ref path) => {
+///             // check router for path.
+///             // /404 doesn't exist? we could stop parsing
+///         },
+///         None => {
+///             // must read more and parse again
+///         }
+///     }
+/// }
+/// ```
+pub struct Request<'headers, 'buf: 'headers> {
+    /// The request method, such as `GET`.
+    pub method: Option<&'buf str>,
+    /// The request path, such as `/about-us`.
+    pub path: Option<&'buf str>,
+    /// The request version, such as `HTTP/1.1`.
+    pub version: Option<u8>,
+    /// The request headers.
+    pub headers: &'headers mut [Header<'buf>]
+}
+
+impl<'h, 'b> Request<'h, 'b> {
+    /// Creates a new Request, using a slice of headers you allocate.
+    #[inline]
+    pub fn new(headers: &'h mut [Header<'b>]) -> Request<'h, 'b> {
+        Request {
+            method: None,
+            path: None,
+            version: None,
+            headers: headers,
+        }
+    }
+
+    /// Try to parse a buffer of bytes into the Request.
+    pub fn parse(&mut self, buf: &'b [u8]) -> Result<usize> {
+        let orig_len = buf.len();
+        let mut bytes = Bytes::new(buf);
+        complete!(skip_empty_lines(&mut bytes));
+        self.method = Some(complete!(parse_token(&mut bytes)));
+        self.path = Some(complete!(parse_token(&mut bytes)));
+        self.version = Some(complete!(parse_version(&mut bytes)));
+        newline!(bytes);
+
+        let len = orig_len - bytes.len();
+        let headers_len = complete!(parse_headers_iter(&mut self.headers, &mut bytes));
+
+        Ok(Status::Complete(len + headers_len))
+    }
+}
+
+#[inline]
+fn skip_empty_lines(bytes: &mut Bytes) -> Result<()> {
+    loop {
+        let b = bytes.peek();
+        match b {
+            Some(b'\r') => {
+                bytes.bump();
+                expect!(bytes.next() == b'\n' => Err(Error::NewLine));
+            },
+            Some(b'\n') => {
+                bytes.bump();
+            },
+            Some(..) => {
+                bytes.slice();
+                return Ok(Status::Complete(()));
+            },
+            None => return Ok(Status::Partial)
+        }
+    }
+}
+
+/// A parsed Response.
+///
+/// See `Request` docs for explanation of optional values.
+pub struct Response<'headers, 'buf: 'headers> {
+    /// The response version, such as `HTTP/1.1`.
+    pub version: Option<u8>,
+    /// The response code, such as `200`.
+    pub code: Option<u16>,
+    /// The response reason-phrase, such as `OK`.
+    pub reason: Option<&'buf str>,
+    /// The response headers.
+    pub headers: &'headers mut [Header<'buf>]
+}
+
+impl<'h, 'b> Response<'h, 'b> {
+    /// Creates a new `Response` using a slice of `Header`s you have allocated.
+    #[inline]
+    pub fn new(headers: &'h mut [Header<'b>]) -> Response<'h, 'b> {
+        Response {
+            version: None,
+            code: None,
+            reason: None,
+            headers: headers,
+        }
+    }
+
+    /// Try to parse a buffer of bytes into this `Response`.
+    pub fn parse(&mut self, buf: &'b [u8]) -> Result<usize> {
+        let orig_len = buf.len();
+        let mut bytes = Bytes::new(buf);
+
+        complete!(skip_empty_lines(&mut bytes));
+        self.version = Some(complete!(parse_version(&mut bytes)));
+        space!(bytes or Error::Version);
+        self.code = Some(complete!(parse_code(&mut bytes)));
+
+        // RFC7230 says there must be 'SP' and then reason-phrase, but admits
+        // its only for legacy reasons. With the reason-phrase completely
+        // optional (and preferred to be omitted) in HTTP2, we'll just
+        // handle any response that doesn't include a reason-phrase, because
+        // it's more lenient, and we don't care anyways.
+        //
+        // So, a SP means parse a reason-phrase.
+        // A newline means go to headers.
+        // Anything else we'll say is a malformed status.
+        match next!(bytes) {
+            b' ' => {
+                bytes.slice();
+                self.reason = Some(complete!(parse_reason(&mut bytes)));
+            },
+            b'\r' => {
+                expect!(bytes.next() == b'\n' => Err(Error::Status));
+                self.reason = Some("");
+            },
+            b'\n' => self.reason = Some(""),
+            _ => return Err(Error::Status),
+        }
+
+
+        let len = orig_len - bytes.len();
+        let headers_len = complete!(parse_headers_iter(&mut self.headers, &mut bytes));
+        Ok(Status::Complete(len + headers_len))
+    }
+}
+
+/// Represents a parsed header.
+#[derive(Copy, Clone, PartialEq, Debug)]
+pub struct Header<'a> {
+    /// The name portion of a header.
+    ///
+    /// A header name must be valid ASCII-US, so it's safe to store as a `&str`.
+    pub name: &'a str,
+    /// The value portion of a header.
+    ///
+    /// While headers **should** be ASCII-US, the specification allows for
+    /// values that may not be, and so the value is stored as bytes.
+    pub value: &'a [u8],
+}
+
+/// An empty header, useful for constructing a `Header` array to pass in for
+/// parsing.
+///
+/// # Example
+///
+/// ```
+/// let headers = [httparse::EMPTY_HEADER; 64];
+/// ```
+pub const EMPTY_HEADER: Header<'static> = Header { name: "", value: b"" };
+
+#[inline]
+fn parse_version(bytes: &mut Bytes) -> Result<u8> {
+    if let Some(mut eight) = bytes.next_8() {
+        expect!(eight._0() => b'H' |? Err(Error::Version));
+        expect!(eight._1() => b'T' |? Err(Error::Version));
+        expect!(eight._2() => b'T' |? Err(Error::Version));
+        expect!(eight._3() => b'P' |? Err(Error::Version));
+        expect!(eight._4() => b'/' |? Err(Error::Version));
+        expect!(eight._5() => b'1' |? Err(Error::Version));
+        expect!(eight._6() => b'.' |? Err(Error::Version));
+        let v = match eight._7() {
+            b'0' => 0,
+            b'1' => 1,
+            _ => return Err(Error::Version)
+        };
+        Ok(Status::Complete(v))
+    } else {
+        Ok(Status::Partial)
+    }
+}
+
+/// From [RFC 7230](https://tools.ietf.org/html/rfc7230):
+///
+/// > ```notrust
+/// > reason-phrase  = *( HTAB / SP / VCHAR / obs-text )
+/// > HTAB           = %x09        ; horizontal tab
+/// > VCHAR          = %x21-7E     ; visible (printing) characters
+/// > obs-text       = %x80-FF
+/// > ```
+///
+/// > A.2.  Changes from RFC 2616
+/// >
+/// > Non-US-ASCII content in header fields and the reason phrase
+/// > has been obsoleted and made opaque (the TEXT rule was removed).
+///
+/// Note that the following implementation deliberately rejects the obsoleted (non-US-ASCII) text range.
+///
+/// The fully compliant parser should probably just return the reason-phrase as an opaque &[u8] data
+/// and leave interpretation to user or specialized helpers (akin to .display() in std::path::Path)
+#[inline]
+fn parse_reason<'a>(bytes: &mut Bytes<'a>) -> Result<&'a str> {
+    loop {
+        let b = next!(bytes);
+        if b == b'\r' {
+            expect!(bytes.next() == b'\n' => Err(Error::Status));
+            return Ok(Status::Complete(unsafe {
+                // all bytes up till `i` must have been HTAB / SP / VCHAR
+                str::from_utf8_unchecked(bytes.slice_skip(2))
+            }));
+        } else if b == b'\n' {
+            return Ok(Status::Complete(unsafe {
+                // all bytes up till `i` must have been HTAB / SP / VCHAR
+                str::from_utf8_unchecked(bytes.slice_skip(1))
+            }));
+        } else if !((b >= 0x20 && b <= 0x7E) || b == b'\t') {
+            return Err(Error::Status);
+        }
+    }
+}
+
+#[inline]
+fn parse_token<'a>(bytes: &mut Bytes<'a>) -> Result<&'a str> {
+    loop {
+        let b = next!(bytes);
+        if b == b' ' {
+            return Ok(Status::Complete(unsafe {
+                // all bytes up till `i` must have been `is_token`.
+                str::from_utf8_unchecked(bytes.slice_skip(1))
+            }));
+        } else if !is_token(b) {
+            return Err(Error::Token);
+        }
+    }
+}
+
+#[inline]
+fn parse_code(bytes: &mut Bytes) -> Result<u16> {
+    let hundreds = expect!(bytes.next() == b'0'...b'9' => Err(Error::Status));
+    let tens = expect!(bytes.next() == b'0'...b'9' => Err(Error::Status));
+    let ones = expect!(bytes.next() == b'0'...b'9' => Err(Error::Status));
+
+    Ok(Status::Complete((hundreds - b'0') as u16 * 100 +
+                        (tens - b'0') as u16 * 10 +
+                        (ones - b'0') as u16))
+}
+
+/// Parse a buffer of bytes as headers.
+///
+/// The return value, if complete and successful, includes the index of the
+/// buffer that parsing stopped at, and a sliced reference to the parsed
+/// headers. The length of the slice will be equal to the number of properly
+/// parsed headers.
+///
+/// # Example
+///
+/// ```
+/// let buf = b"Host: foo.bar\nAccept: */*\n\nblah blah";
+/// let mut headers = [httparse::EMPTY_HEADER; 4];
+/// assert_eq!(httparse::parse_headers(buf, &mut headers),
+///            Ok(httparse::Status::Complete((27, &[
+///                httparse::Header { name: "Host", value: b"foo.bar" },
+///                httparse::Header { name: "Accept", value: b"*/*" }
+///            ][..]))));
+/// ```
+pub fn parse_headers<'b: 'h, 'h>(src: &'b [u8], mut dst: &'h mut [Header<'b>])
+    -> Result<(usize, &'h [Header<'b>])> {
+    let mut iter = Bytes::new(src);
+    let pos = complete!(parse_headers_iter(&mut dst, &mut iter));
+    Ok(Status::Complete((pos, dst)))
+}
+
+#[inline]
+fn parse_headers_iter<'a, 'b>(headers: &mut &mut [Header<'a>], bytes: &'b mut Bytes<'a>)
+    -> Result<usize> {
+    let mut num_headers: usize = 0;
+    let mut count: usize = 0;
+    let mut result = Err(Error::TooManyHeaders);
+
+    {
+        let mut iter = headers.iter_mut();
+
+        'headers: loop {
+            // a newline here means the head is over!
+            let b = next!(bytes);
+            if b == b'\r' {
+                expect!(bytes.next() == b'\n' => Err(Error::NewLine));
+                result = Ok(Status::Complete(count + bytes.pos()));
+                break;
+            } else if b == b'\n' {
+                result = Ok(Status::Complete(count + bytes.pos()));
+                break;
+            } else if b == b':' || !is_token(b) {
+                return Err(Error::HeaderName);
+            }
+
+            let header = match iter.next() {
+                Some(header) => header,
+                None => break 'headers
+            };
+
+            num_headers += 1;
+            // parse header name until colon
+            loop {
+                let b = next!(bytes);
+                if b == b':' {
+                    count += bytes.pos();
+                    header.name = unsafe {
+                        str::from_utf8_unchecked(bytes.slice_skip(1))
+                    };
+                    break;
+                } else if !is_token(b) {
+                    return Err(Error::HeaderName);
+                }
+            }
+
+            let mut b;
+
+            'value: loop {
+
+                // eat white space between colon and value
+                loop {
+                    b = next!(bytes);
+                    if b == b' ' || b == b'\t' {
+                        count += bytes.pos();
+                        bytes.slice();
+                        continue;
+                    } else {
+                        if !is_token(b) {
+                            if (b < 0o40 && b != 0o11) || b == 0o177 {
+                                break 'value;
+                            }
+                        }
+                        break;
+                    }
+                }
+
+                // parse value till EOL
+
+
+
+                macro_rules! check {
+                    ($bytes:ident, $i:ident) => ({
+                        b = $bytes.$i();
+                        if !is_token(b) {
+                            if (b < 0o40 && b != 0o11) || b == 0o177 {
+                                break 'value;
+                            }
+                        }
+                    });
+                    ($bytes:ident) => ({
+                        check!($bytes, _0);
+                        check!($bytes, _1);
+                        check!($bytes, _2);
+                        check!($bytes, _3);
+                        check!($bytes, _4);
+                        check!($bytes, _5);
+                        check!($bytes, _6);
+                        check!($bytes, _7);
+                    })
+                }
+                while let Some(mut bytes8) = bytes.next_8() {
+                    check!(bytes8);
+                }
+                loop {
+                    b = next!(bytes);
+                    if !is_token(b) {
+                        if (b < 0o40 && b != 0o11) || b == 0o177 {
+                            break 'value;
+                        }
+                    }
+                }
+            }
+
+            //found_ctl
+            if b == b'\r' {
+                expect!(bytes.next() == b'\n' => Err(Error::HeaderValue));
+                count += bytes.pos();
+                header.value = bytes.slice_skip(2);
+            } else if b == b'\n' {
+                count += bytes.pos();
+                header.value = bytes.slice_skip(1);
+            } else {
+                return Err(Error::HeaderValue);
+            }
+
+        }
+    } // drop iter
+
+    shrink(headers, num_headers);
+    result
+}
+
+/// Parse a buffer of bytes as a chunk size.
+///
+/// The return value, if complete and successful, includes the index of the
+/// buffer that parsing stopped at, and the size of the following chunk.
+///
+/// # Example
+///
+/// ```
+/// let buf = b"4\r\nRust\r\n0\r\n\r\n";
+/// assert_eq!(httparse::parse_chunk_size(buf),
+///            Ok(httparse::Status::Complete((3, 4))));
+/// ```
+pub fn parse_chunk_size(buf: &[u8])
+        -> result::Result<Status<(usize, u64)>, InvalidChunkSize> {
+    const RADIX: u64 = 16;
+    let mut bytes = Bytes::new(buf);
+    let mut size = 0;
+    let mut in_chunk_size = true;
+    let mut in_ext = false;
+    let mut count = 0;
+    loop {
+        let b = next!(bytes);
+        match b {
+            b'0'...b'9' if in_chunk_size => {
+                if count > 15 {
+                    return Err(InvalidChunkSize);
+                }
+                count += 1;
+                size *= RADIX;
+                size += (b - b'0') as u64;
+            },
+            b'a'...b'f' if in_chunk_size => {
+                if count > 15 {
+                    return Err(InvalidChunkSize);
+                }
+                count += 1;
+                size *= RADIX;
+                size += (b + 10 - b'a') as u64;
+            }
+            b'A'...b'F' if in_chunk_size => {
+                if count > 15 {
+                    return Err(InvalidChunkSize);
+                }
+                count += 1;
+                size *= RADIX;
+                size += (b + 10 - b'A') as u64;
+            }
+            b'\r' => {
+                match next!(bytes) {
+                    b'\n' => break,
+                    _ => return Err(InvalidChunkSize),
+                }
+            }
+            // If we weren't in the extension yet, the ";" signals its start
+            b';' if !in_ext => {
+                in_ext = true;
+                in_chunk_size = false;
+            }
+            // "Linear white space" is ignored between the chunk size and the
+            // extension separator token (";") due to the "implied *LWS rule".
+            b'\t' | b' ' if !in_ext & !in_chunk_size => {}
+            // LWS can follow the chunk size, but no more digits can come
+            b'\t' | b' ' if in_chunk_size => in_chunk_size = false,
+            // We allow any arbitrary octet once we are in the extension, since
+            // they all get ignored anyway. According to the HTTP spec, valid
+            // extensions would have a more strict syntax:
+            //     (token ["=" (token | quoted-string)])
+            // but we gain nothing by rejecting an otherwise valid chunk size.
+            _ if in_ext => {}
+            // Finally, if we aren't in the extension and we're reading any
+            // other octet, the chunk size line is invalid!
+            _ => return Err(InvalidChunkSize),
+        }
+    }
+    Ok(Status::Complete((bytes.pos(), size)))
+}
+
+#[cfg(test)]
+mod tests {
+    use super::{Request, Response, Status, EMPTY_HEADER, shrink, parse_chunk_size};
+
+    const NUM_OF_HEADERS: usize = 4;
+
+    #[test]
+    fn test_shrink() {
+        let mut arr = [EMPTY_HEADER; 16];
+        {
+            let slice = &mut &mut arr[..];
+            assert_eq!(slice.len(), 16);
+            shrink(slice, 4);
+            assert_eq!(slice.len(), 4);
+        }
+        assert_eq!(arr.len(), 16);
+    }
+
+    macro_rules! req {
+        ($name:ident, $buf:expr, |$arg:ident| $body:expr) => (
+            req! {$name, $buf, Ok(Status::Complete($buf.len())), |$arg| $body }
+        );
+        ($name:ident, $buf:expr, $len:expr, |$arg:ident| $body:expr) => (
+        #[test]
+        fn $name() {
+            let mut headers = [EMPTY_HEADER; NUM_OF_HEADERS];
+            let mut req = Request::new(&mut headers[..]);
+            let status = req.parse($buf.as_ref());
+            assert_eq!(status, $len);
+            closure(req);
+
+            fn closure($arg: Request) {
+                $body
+            }
+        }
+        )
+    }
+
+    req! {
+        test_request_simple,
+        b"GET / HTTP/1.1\r\n\r\n",
+        |req| {
+            assert_eq!(req.method.unwrap(), "GET");
+            assert_eq!(req.path.unwrap(), "/");
+            assert_eq!(req.version.unwrap(), 1);
+            assert_eq!(req.headers.len(), 0);
+        }
+    }
+
+    req! {
+        test_request_headers,
+        b"GET / HTTP/1.1\r\nHost: foo.com\r\nCookie: \r\n\r\n",
+        |req| {
+            assert_eq!(req.method.unwrap(), "GET");
+            assert_eq!(req.path.unwrap(), "/");
+            assert_eq!(req.version.unwrap(), 1);
+            assert_eq!(req.headers.len(), 2);
+            assert_eq!(req.headers[0].name, "Host");
+            assert_eq!(req.headers[0].value, b"foo.com");
+            assert_eq!(req.headers[1].name, "Cookie");
+            assert_eq!(req.headers[1].value, b"");
+        }
+    }
+
+    req! {
+        test_request_headers_max,
+        b"GET / HTTP/1.1\r\nA: A\r\nB: B\r\nC: C\r\nD: D\r\n\r\n",
+        |req| {
+            assert_eq!(req.headers.len(), NUM_OF_HEADERS);
+        }
+    }
+
+    req! {
+        test_request_multibyte,
+        b"GET / HTTP/1.1\r\nHost: foo.com\r\nUser-Agent: \xe3\x81\xb2\xe3/1.0\r\n\r\n",
+        |req| {
+            assert_eq!(req.method.unwrap(), "GET");
+            assert_eq!(req.path.unwrap(), "/");
+            assert_eq!(req.version.unwrap(), 1);
+            assert_eq!(req.headers[0].name, "Host");
+            assert_eq!(req.headers[0].value, b"foo.com");
+            assert_eq!(req.headers[1].name, "User-Agent");
+            assert_eq!(req.headers[1].value, b"\xe3\x81\xb2\xe3/1.0");
+        }
+    }
+
+
+    req! {
+        test_request_partial,
+        b"GET / HTTP/1.1\r\n\r", Ok(Status::Partial),
+        |_req| {}
+    }
+
+    req! {
+        test_request_newlines,
+        b"GET / HTTP/1.1\nHost: foo.bar\n\n",
+        |_r| {}
+    }
+
+    req! {
+        test_request_empty_lines_prefix,
+        b"\r\n\r\nGET / HTTP/1.1\r\n\r\n",
+        |req| {
+            assert_eq!(req.method.unwrap(), "GET");
+            assert_eq!(req.path.unwrap(), "/");
+            assert_eq!(req.version.unwrap(), 1);
+            assert_eq!(req.headers.len(), 0);
+        }
+    }
+
+    req! {
+        test_request_empty_lines_prefix_lf_only,
+        b"\n\nGET / HTTP/1.1\n\n",
+        |req| {
+            assert_eq!(req.method.unwrap(), "GET");
+            assert_eq!(req.path.unwrap(), "/");
+            assert_eq!(req.version.unwrap(), 1);
+            assert_eq!(req.headers.len(), 0);
+        }
+    }
+
+    req! {
+        test_request_with_invalid_token_delimiter,
+        b"GET\n/ HTTP/1.1\r\nHost: foo.bar\r\n\r\n",
+        Err(::Error::Token),
+        |_r| {}
+    }
+
+    macro_rules! res {
+        ($name:ident, $buf:expr, |$arg:ident| $body:expr) => (
+            res! {$name, $buf, Ok(Status::Complete($buf.len())), |$arg| $body }
+        );
+        ($name:ident, $buf:expr, $len:expr, |$arg:ident| $body:expr) => (
+        #[test]
+        fn $name() {
+            let mut headers = [EMPTY_HEADER; NUM_OF_HEADERS];
+            let mut res = Response::new(&mut headers[..]);
+            let status = res.parse($buf.as_ref());
+            assert_eq!(status, $len);
+            closure(res);
+
+            fn closure($arg: Response) {
+                $body
+            }
+        }
+        )
+    }
+
+    res! {
+        test_response_simple,
+        b"HTTP/1.1 200 OK\r\n\r\n",
+        |res| {
+            assert_eq!(res.version.unwrap(), 1);
+            assert_eq!(res.code.unwrap(), 200);
+            assert_eq!(res.reason.unwrap(), "OK");
+        }
+    }
+
+    res! {
+        test_response_newlines,
+        b"HTTP/1.0 403 Forbidden\nServer: foo.bar\n\n",
+        |_r| {}
+    }
+
+    res! {
+        test_response_reason_missing,
+        b"HTTP/1.1 200 \r\n\r\n",
+        |res| {
+            assert_eq!(res.version.unwrap(), 1);
+            assert_eq!(res.code.unwrap(), 200);
+            assert_eq!(res.reason.unwrap(), "");
+        }
+    }
+
+    res! {
+        test_response_reason_missing_no_space,
+        b"HTTP/1.1 200\r\n\r\n",
+        |res| {
+            assert_eq!(res.version.unwrap(), 1);
+            assert_eq!(res.code.unwrap(), 200);
+            assert_eq!(res.reason.unwrap(), "");
+        }
+    }
+
+    res! {
+        test_response_reason_with_space_and_tab,
+        b"HTTP/1.1 101 Switching Protocols\t\r\n\r\n",
+        |res| {
+            assert_eq!(res.version.unwrap(), 1);
+            assert_eq!(res.code.unwrap(), 101);
+            assert_eq!(res.reason.unwrap(), "Switching Protocols\t");
+        }
+    }
+
+    static RESPONSE_REASON_WITH_OBS_TEXT_BYTE: &'static [u8] = b"HTTP/1.1 200 X\xFFZ\r\n\r\n";
+    res! {
+        test_response_reason_with_obsolete_text_byte,
+        RESPONSE_REASON_WITH_OBS_TEXT_BYTE,
+        Err(::Error::Status),
+        |_res| {}
+    }
+
+    res! {
+        test_response_reason_with_nul_byte,
+        b"HTTP/1.1 200 \x00\r\n\r\n",
+        Err(::Error::Status),
+        |_res| {}
+    }
+
+    res! {
+        test_response_version_missing_space,
+        b"HTTP/1.1",
+        Ok(Status::Partial),
+        |_res| {}
+    }
+
+    res! {
+        test_response_code_missing_space,
+        b"HTTP/1.1 200",
+        Ok(Status::Partial),
+        |_res| {}
+    }
+
+    res! {
+        test_response_empty_lines_prefix_lf_only,
+        b"\n\nHTTP/1.1 200 OK\n\n",
+        |_res| {}
+    }
+
+    #[test]
+    fn test_chunk_size() {
+        assert_eq!(parse_chunk_size(b"0\r\n"), Ok(Status::Complete((3, 0))));
+        assert_eq!(parse_chunk_size(b"12\r\nchunk"), Ok(Status::Complete((4, 18))));
+        assert_eq!(parse_chunk_size(b"3086d\r\n"), Ok(Status::Complete((7, 198765))));
+        assert_eq!(parse_chunk_size(b"3735AB1;foo bar*\r\n"), Ok(Status::Complete((18, 57891505))));
+        assert_eq!(parse_chunk_size(b"3735ab1 ; baz \r\n"), Ok(Status::Complete((16, 57891505))));
+        assert_eq!(parse_chunk_size(b"77a65\r"), Ok(Status::Partial));
+        assert_eq!(parse_chunk_size(b"ab"), Ok(Status::Partial));
+        assert_eq!(parse_chunk_size(b"567f8a\rfoo"), Err(::InvalidChunkSize));
+        assert_eq!(parse_chunk_size(b"567f8a\rfoo"), Err(::InvalidChunkSize));
+        assert_eq!(parse_chunk_size(b"567xf8a\r\n"), Err(::InvalidChunkSize));
+        assert_eq!(parse_chunk_size(b"ffffffffffffffff\r\n"), Ok(Status::Complete((18, ::core::u64::MAX))));
+        assert_eq!(parse_chunk_size(b"1ffffffffffffffff\r\n"), Err(::InvalidChunkSize));
+        assert_eq!(parse_chunk_size(b"Affffffffffffffff\r\n"), Err(::InvalidChunkSize));
+        assert_eq!(parse_chunk_size(b"fffffffffffffffff\r\n"), Err(::InvalidChunkSize));
+    }
+
+    #[cfg(feature = "std")]
+    #[test]
+    fn test_std_error() {
+        use super::Error;
+        use std::error::Error as StdError;
+        let err = Error::HeaderName;
+        assert_eq!(err.to_string(), err.description());
+    }
+}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{"Cargo.toml":"fdead335b20982f9530d61f0bc2049b61af773ec712d1895a780478abbcf4dfd","LICENSE":"df9cfd06d8a44d9a671eadd39ffd97f166481da015a30f45dfd27886209c5922","build.rs":"5b349037786f2f81402943423213d8c63e8fc8e321937da85f6d854ed825a84f","src/buffer.rs":"c8c7dbbb1d848b2c08a18c38b5214bfbd8aa457557c31a9a6f1de2f5aadc3d6a","src/client/mod.rs":"adca4f6090c9806641ace04488a4b28a56e8cd60411bbd9cc856b349fdb19797","src/client/pool.rs":"7c22c8e09af9d56e05a6caaf174b78043e10171982143b8e64118d0dd401efab","src/client/proxy.rs":"0fb671fddb1c377646dc86b620b086941d56354659eace4eb387f414c345fe6b","src/client/request.rs":"c9029bbf1c27ad11d78f61e1f1175b6417eecbc3b9053c33d8c08daf61f72570","src/client/response.rs":"64fa127a3d0f5b234a921eb3be26f89021a06f03e8770f7cbe64047ec40522e5","src/error.rs":"3b3d27425118d08b1205fe7a1c91037b6ad5791cb7ccfbf53207388cb4edca1b","src/header/common/accept.rs":"d4203a24788e23fcf1ef081e9d5ab010e95d48b67532417600b6f4ff7b4a103b","src/header/common/accept_charset.rs":"f2664acc80c429c32325b4128feedc12e47357be17550821929f8002c85af214","src/header/common/accept_encoding.rs":"bea61eb5cd40564a01a0cbbd139e8b070fd8b8489c7af08de9541f607e50fbb2","src/header/common/accept_language.rs":"2e0155b85d991a0b917be1e54a9eda019597aeb4bf61cbd841fbe92f186262a3","src/header/common/accept_ranges.rs":"df351621f0753340697b0a0ceab030580c8604d6a3a5c3c3415b9fca55c04330","src/header/common/access_control_allow_credentials.rs":"c68a618d51235be37d12746fad6248c07d6c904106cd0a97be2239efab8ce941","src/header/common/access_control_allow_headers.rs":"4781e3ce4ef2ee4e90a9f775742d55751c5403b0b11539f96c9e5c76d7a3029e","src/header/common/access_control_allow_methods.rs":"0f72c4e70e74f0be8ddae576220b2cea11e2d848512e5ffb329206275908383d","src/header/common/access_control_allow_origin.rs":"933fdc7d147f7706b191ad6943b341887d9260ef7480384deb2563cd31a43cd1","src/header/common/access_control_expose_headers.rs":"f026676e762ac5c5e6ae33543ceba4e484406e89306d0b3873507814675f408a","src/header/common/access_control_max_age.rs":"1c5970cfaf15ab3ab602b215ab119f100343a7f9e4f85a6711ea21a12f369402","src/header/common/access_control_request_headers.rs":"879810240d82544c581b5057808657f9445bf823e19a990e5e88d43d28b88ce6","src/header/common/access_control_request_method.rs":"fd5bc2396dbf0977c616d7b262f2441e60d3e2806c54d0838195cdedd992e7f1","src/header/common/allow.rs":"8b12d0c7f9a76f2aec826ba80097efa784304f50e2e0ce330d8ffd810bb7dd7d","src/header/common/authorization.rs":"888cca057e0c45757ccbe31c7fdf34b9fa4b62285869e4d525f338d7003ac67c","src/header/common/cache_control.rs":"de2c876b78b83ce080007d3413a13e7770963cec49cd0202a8ffb0259185f95f","src/header/common/connection.rs":"5584948f8baae51a480ab6badf23fcb2aa2df6f3db5bd12ba09dcd08d1d01643","src/header/common/content_disposition.rs":"b6be5e65ec73113e045b73a0f69f63204942e25a3b9469f2f59c032c587e111f","src/header/common/content_encoding.rs":"636e07b326036f0d903fe7bce4e49da56dc43ed53d7dd158a906c06bd7466ad2","src/header/common/content_language.rs":"0c42bebf462b570a6dae46580685cb931feaf83b8fd6a0e89a29f7383397f393","src/header/common/content_length.rs":"c792029182c0213d4e2cc90f66210c01f164a4a8b25abadaa74ce51947ad4c76","src/header/common/content_range.rs":"5fab7832b985489b76c698654a4891aaaff6b671b7174dc25c2c4abeeb0d14eb","src/header/common/content_type.rs":"cd6db1ac9159317a467df0feebf66fa0f2e976f81aa339f3e1402110ee16cdad","src/header/common/cookie.rs":"f38e0ece0f4ddf6f5bacd7b1199aab289a5943dd1151c525970837b24fb7e59c","src/header/common/date.rs":"b3516aee3bb26ee5b2a97829ea45d6440512cbd9ef862f9e7f65a39f282e207e","src/header/common/etag.rs":"d7548c554751bb74c5ef53095cd30074e48bb39802190d8caec90621d16c6e9b","src/header/common/expect.rs":"754c5d648086429d6d9c7cebcd86d59703893d6ff904ae5de5217bb71a860496","src/header/common/expires.rs":"351a28af03596aa5ae7dbe97485ef2e717bb5567d8a5ae830e8c1968bbb236ec","src/header/common/from.rs":"05d9f1675c7d3f2caa7082fe44f5e89c3a4104af26ff21b9846443ccde0df12a","src/header/common/host.rs":"f296d9c92c0462a937636190bc3aae8a8f9e3473bd8b7cd5963870fc03686bc2","src/header/common/if_match.rs":"a0919e71b40b51e447d21fce6b9fbe779de84ae228dc4769a237a2aa34cbb201","src/header/common/if_modified_since.rs":"b722b471531740b4e200da3f53182fea6d0b750931664d233674d99f7f92767f","src/header/common/if_none_match.rs":"f810a9fc0161bd293b8ea6f18d84120d7950557c46fb07028e7351c0fbaed0fa","src/header/common/if_range.rs":"bdc77ca3c6b392aaf38c778f69756933f8a59cb946839e801508548aef891153","src/header/common/if_unmodified_since.rs":"9783ab6133cab3b38800c0049338ff697390f0915f6b7d9b81a485f028ae2dbc","src/header/common/last-event-id.rs":"e773661a46c926b2ecd93cd1a1ca5a6c361b1b8d0c9d004c9ba0bb6b96995e4a","src/header/common/last_modified.rs":"26949ae19bb17e660a3c2c967a7e066c1cc79ea987e5c5b8627a211952d18eb0","src/header/common/location.rs":"ed3482f4f806e6241d70aabbc5ce409022ab5d85aa33d7c1e8a50385aec31a7a","src/header/common/mod.rs":"2af70a911729077f2bfa4fc5da46bf9adf122426ce78ef529de9317069d28117","src/header/common/origin.rs":"c5d38d5c47494038badf85154eae5aa529821adbb8d91e04845cd1939a3acb70","src/header/common/pragma.rs":"024f6d401d6a2c363fb81afcf57dd4cfb164a7ce5a5e4dc9f9b7a95d1ea829d1","src/header/common/prefer.rs":"e680be23a4ed754e357d607a3cbdd9e00d2591fd26058f7f43f7757a86be32f5","src/header/common/preference_applied.rs":"13841597fcd9f1049fc515ea0a401975b3a0c4851c6664e9e4afcba987184680","src/header/common/range.rs":"553a3cb2ba7531418ca56f39f20a6f03b7cb07258b8a70a9ff52c224ae410e93","src/header/common/referer.rs":"e40aebce1e21a8a939df1cb331ed6ab84c37a261fde83b788be1f82710bdb2ba","src/header/common/referrer_policy.rs":"a72fd93ae042aaa5ecfe548a12b6ac07dcd8efdc375591f6f851332f4398684c","src/header/common/server.rs":"e3c7963bd341573c513bf1a1a15bbe38a78f5d8029f6783a8d679ce17969cbe0","src/header/common/set_cookie.rs":"ca02d00f2ec18b4059b1979e3f66a4fadcacacb0f9a8c7faf7a2535f7ad0d6e8","src/header/common/strict_transport_security.rs":"16d20d713979143c9a22326bffc29b31d15e51937f150888c5cdf5b844c881bb","src/header/common/transfer_encoding.rs":"0ae112334bba0b5bb64e4a67059209ed5fb8f034cd24966d63cbfff714480df1","src/header/common/upgrade.rs":"caa2777900ebbd1239a322e0f84b745b688d270fac331d86b0979fe0140cfe63","src/header/common/user_agent.rs":"3f8396206a2cad8d925d391321ebc2d7625f18ea2efcb8562958748369f83111","src/header/common/vary.rs":"ea9ca2d338f01b3a60cb7734532e8717a85c93c15eb1f4701c620fee42a5e9f5","src/header/internals/cell.rs":"0dcc63cf60ce028cf5bfabfcf3e04cb295b474174807c7ea9a97e9f6b7bfadb7","src/header/internals/item.rs":"05973f19f40deaccf9b363645cc13cf4c702c4d22ddebb5e6af9a14d592e5a24","src/header/internals/mod.rs":"a7584044f256ee1be3ba1542c7ce32263aa9d62700571430b1d723c5cf53f383","src/header/internals/vec_map.rs":"5ff364116d9864d05a8488291def3b754844c082aea4cd58d6243ddae7277ce0","src/header/mod.rs":"df6412ebd012881dc188ffff1b5c4a3a0f7f271845760fdd7ffb2d8f97a67e77","src/header/parsing.rs":"5cb02c694b2bdd16abf9b6bc6af3c01b143f01e26f60ce2fb69c6b0c0c19017f","src/header/shared/charset.rs":"71087f535a425d7d17cb3de69f1016e6602032b957d49fe121f6e56f1bf26e2f","src/header/shared/encoding.rs":"9c3b39f074bcadab68e158beea5e35d43de0c717971839d2e1ae43468d7bd7f7","src/header/shared/entity.rs":"b70b08c6511f7fd5539e4e42685423bf2f5fb3d5333fe3175e9010b890d0b654","src/header/shared/httpdate.rs":"6401ebff650228ddc457e3d4b008208254c62a478ea98367e87ffe6cbb106992","src/header/shared/mod.rs":"7216081f6253959364d9aa3abf16f17462baab48f16d174078c61c71ad023c0f","src/header/shared/quality_item.rs":"284d1b35af35d2244459f4ade87c1897a949ef047d4e784738635d558ea157b4","src/http/h1.rs":"1d607c89a390d629648a2ff38ae95059a698ad0b36b925d9c7bbad7c764c8538","src/http/message.rs":"c09939bb38c40d5a8124f5b60b8fc539aa10a11b4a46c1c3f74d097fa8ecc088","src/http/mod.rs":"9112fb2e59070d105fb361afc600f85cd6a5e21d4d007eaa821145e9b7e63f55","src/lib.rs":"0c130e83db8da5d631cb10c364b879aa0b0b7926d8025a4c874de496b87fa900","src/method.rs":"f6fbd5f697cb28f073881cca26004ea3e97638a4b0e44c6192a426b9e762e9cc","src/mock.rs":"e366916d8c55099b1b9dee5cdbe26f1f2faff6ff9d659e476cbe578263dda2c6","src/net.rs":"15d6e3c20ca97641cca8bdf80a67296823e79be28b4492b48b0f74411439a105","src/server/listener.rs":"6bd4abda51fde6e38087923dff198aef7b5bc119add2e81d59173a215c512b9d","src/server/mod.rs":"d9f8796114740b08592621d9f461eb6c7d6baf692f409ebce4f0c44588148cdd","src/server/request.rs":"ce125e73bd3b9bf8b75af94c31a85fb5a5e8d3d11f7e758ecbbd51a4b2670af0","src/server/response.rs":"7b1e40ba04f2321a62042c13723596729e69883abc4912a5371911d9a0e2a474","src/status.rs":"6c3af3f4cac43748be938bfc7c2aeabe63f32fef233d7c2a7ea7a933c7c19699","src/uri.rs":"26c357704a80d5c8ffd28123617862ffff0213613f1aec6a5758be49244379c8","src/version.rs":"e56f6962a2ae701f3923bfce0a3d150f9caea28e8880598affb723190776cd4a"},"package":"36e108e0b1fa2d17491cbaac4bc460dc0956029d10ccf83c913dd0e5db3e7f07"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/Cargo.toml
+++ /dev/null
@@ -1,44 +0,0 @@
-[package]
-
-name = "hyper"
-version = "0.10.10"
-description = "A modern HTTP library."
-readme = "README.md"
-homepage = "http://hyper.rs"
-documentation = "http://hyper.rs/hyper"
-repository = "https://github.com/hyperium/hyper"
-license = "MIT"
-authors = ["Sean McArthur <sean.monstar@gmail.com>",
-           "Jonathan Reem <jonathan.reem@gmail.com>"]
-keywords = ["http", "hyper", "hyperium"]
-categories = ["web-programming::http-client", "web-programming::http-server"]
-build = "build.rs"
-
-include = [
-  "build.rs",
-  "Cargo.toml",
-  "LICENSE",
-  "src/**/*"
-]
-
-[dependencies]
-base64 = "0.5.2"
-httparse = "1.0"
-language-tags = "0.2"
-log = "0.3"
-mime = "0.2"
-num_cpus = "1.0"
-time = "0.1"
-traitobject = "0.1"
-typeable = "0.1"
-unicase = "1.0"
-url = "1.0"
-
-[dev-dependencies]
-env_logger = "0.3"
-
-[build-dependencies]
-rustc_version = "0.1"
-
-[features]
-nightly = []
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2014 Sean McArthur
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/buffer.rs
+++ /dev/null
@@ -1,197 +0,0 @@
-use std::cmp;
-use std::io::{self, Read, BufRead};
-
-pub struct BufReader<R> {
-    inner: R,
-    buf: Vec<u8>,
-    pos: usize,
-    cap: usize,
-}
-
-const INIT_BUFFER_SIZE: usize = 4096;
-const MAX_BUFFER_SIZE: usize = 8192 + 4096 * 100;
-
-impl<R: Read> BufReader<R> {
-    #[inline]
-    pub fn new(rdr: R) -> BufReader<R> {
-        BufReader::with_capacity(rdr, INIT_BUFFER_SIZE)
-    }
-
-    #[inline]
-    pub fn from_parts(rdr: R, buf: Vec<u8>, pos: usize, cap: usize) -> BufReader<R> {
-        BufReader {
-            inner: rdr,
-            buf: buf,
-            pos: pos,
-            cap: cap,
-        }
-    }
-
-    #[inline]
-    pub fn with_capacity(rdr: R, cap: usize) -> BufReader<R> {
-        BufReader {
-            inner: rdr,
-            buf: vec![0; cap],
-            pos: 0,
-            cap: 0,
-        }
-    }
-
-    #[inline]
-    pub fn get_ref(&self) -> &R { &self.inner }
-
-    #[inline]
-    pub fn get_mut(&mut self) -> &mut R { &mut self.inner }
-
-    #[inline]
-    pub fn get_buf(&self) -> &[u8] {
-        if self.pos < self.cap {
-            trace!("get_buf [u8; {}][{}..{}]", self.buf.len(), self.pos, self.cap);
-            &self.buf[self.pos..self.cap]
-        } else {
-            trace!("get_buf []");
-            &[]
-        }
-    }
-
-    /// Extracts the buffer from this reader. Return the current cursor position
-    /// and the position of the last valid byte.
-    ///
-    /// This operation does not copy the buffer. Instead, it directly returns
-    /// the internal buffer. As a result, this reader will no longer have any
-    /// buffered contents and any subsequent read from this reader will not
-    /// include the returned buffered contents.
-    #[inline]
-    pub fn take_buf(&mut self) -> (Vec<u8>, usize, usize) {
-        let (pos, cap) = (self.pos, self.cap);
-        self.pos = 0;
-        self.cap = 0;
-
-        let mut output = vec![0; INIT_BUFFER_SIZE];
-        ::std::mem::swap(&mut self.buf, &mut output);
-        (output, pos, cap)
-    }
-
-    #[inline]
-    pub fn into_inner(self) -> R { self.inner }
-
-    #[inline]
-    pub fn into_parts(self) -> (R, Vec<u8>, usize, usize) {
-        (self.inner, self.buf, self.pos, self.cap)
-    }
-
-    #[inline]
-    pub fn read_into_buf(&mut self) -> io::Result<usize> {
-        self.maybe_reserve();
-        let v = &mut self.buf;
-        trace!("read_into_buf buf[{}..{}]", self.cap, v.len());
-        if self.cap < v.capacity() {
-            let nread = try!(self.inner.read(&mut v[self.cap..]));
-            self.cap += nread;
-            Ok(nread)
-        } else {
-            trace!("read_into_buf at full capacity");
-            Ok(0)
-        }
-    }
-
-    #[inline]
-    fn maybe_reserve(&mut self) {
-        let cap = self.buf.capacity();
-        if self.cap == cap && cap < MAX_BUFFER_SIZE {
-            self.buf.reserve(cmp::min(cap * 4, MAX_BUFFER_SIZE) - cap);
-            let new = self.buf.capacity() - self.buf.len();
-            trace!("reserved {}", new);
-            unsafe { grow_zerofill(&mut self.buf, new) }
-        }
-    }
-}
-
-#[inline]
-unsafe fn grow_zerofill(buf: &mut Vec<u8>, additional: usize) {
-    use std::ptr;
-    let len = buf.len();
-    buf.set_len(len + additional);
-    ptr::write_bytes(buf.as_mut_ptr().offset(len as isize), 0, additional);
-}
-
-impl<R: Read> Read for BufReader<R> {
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        if self.cap == self.pos && buf.len() >= self.buf.len() {
-            return self.inner.read(buf);
-        }
-        let nread = {
-           let mut rem = try!(self.fill_buf());
-           try!(rem.read(buf))
-        };
-        self.consume(nread);
-        Ok(nread)
-    }
-}
-
-impl<R: Read> BufRead for BufReader<R> {
-    fn fill_buf(&mut self) -> io::Result<&[u8]> {
-        if self.pos == self.cap {
-            self.cap = try!(self.inner.read(&mut self.buf));
-            self.pos = 0;
-        }
-        Ok(&self.buf[self.pos..self.cap])
-    }
-
-    #[inline]
-    fn consume(&mut self, amt: usize) {
-        self.pos = cmp::min(self.pos + amt, self.cap);
-        if self.pos == self.cap {
-            self.pos = 0;
-            self.cap = 0;
-        }
-    }
-}
-
-#[cfg(test)]
-mod tests {
-
-    use std::io::{self, Read, BufRead};
-    use super::BufReader;
-
-    struct SlowRead(u8);
-
-    impl Read for SlowRead {
-        fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-            let state = self.0;
-            self.0 += 1;
-            (&match state % 3 {
-                0 => b"foo",
-                1 => b"bar",
-                _ => b"baz",
-            }[..]).read(buf)
-        }
-    }
-
-    #[test]
-    fn test_consume_and_get_buf() {
-        let mut rdr = BufReader::new(SlowRead(0));
-        rdr.read_into_buf().unwrap();
-        rdr.consume(1);
-        assert_eq!(rdr.get_buf(), b"oo");
-        rdr.read_into_buf().unwrap();
-        rdr.read_into_buf().unwrap();
-        assert_eq!(rdr.get_buf(), b"oobarbaz");
-        rdr.consume(5);
-        assert_eq!(rdr.get_buf(), b"baz");
-        rdr.consume(3);
-        assert_eq!(rdr.get_buf(), b"");
-        assert_eq!(rdr.pos, 0);
-        assert_eq!(rdr.cap, 0);
-    }
-
-    #[test]
-    fn test_resize() {
-        let raw = b"hello world";
-        let mut rdr = BufReader::with_capacity(&raw[..], 5);
-        rdr.read_into_buf().unwrap();
-        assert_eq!(rdr.get_buf(), b"hello");
-        rdr.read_into_buf().unwrap();
-        assert_eq!(rdr.get_buf(), b"hello world");
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/client/mod.rs
+++ /dev/null
@@ -1,724 +0,0 @@
-//! HTTP Client
-//!
-//! # Usage
-//!
-//! The `Client` API is designed for most people to make HTTP requests.
-//! It utilizes the lower level `Request` API.
-//!
-//! ## GET
-//!
-//! ```no_run
-//! # use hyper::Client;
-//! let client = Client::new();
-//!
-//! let res = client.get("http://example.domain").send().unwrap();
-//! assert_eq!(res.status, hyper::Ok);
-//! ```
-//!
-//! The returned value is a `Response`, which provides easy access to
-//! the `status`, the `headers`, and the response body via the `Read`
-//! trait.
-//!
-//! ## POST
-//!
-//! ```no_run
-//! # use hyper::Client;
-//! let client = Client::new();
-//!
-//! let res = client.post("http://example.domain")
-//!     .body("foo=bar")
-//!     .send()
-//!     .unwrap();
-//! assert_eq!(res.status, hyper::Ok);
-//! ```
-//!
-//! # Sync
-//!
-//! The `Client` implements `Sync`, so you can share it among multiple threads
-//! and make multiple requests simultaneously.
-//!
-//! ```no_run
-//! # use hyper::Client;
-//! use std::sync::Arc;
-//! use std::thread;
-//!
-//! // Note: an Arc is used here because `thread::spawn` creates threads that
-//! // can outlive the main thread, so we must use reference counting to keep
-//! // the Client alive long enough. Scoped threads could skip the Arc.
-//! let client = Arc::new(Client::new());
-//! let clone1 = client.clone();
-//! let clone2 = client.clone();
-//! thread::spawn(move || {
-//!     clone1.get("http://example.domain").send().unwrap();
-//! });
-//! thread::spawn(move || {
-//!     clone2.post("http://example.domain/post").body("foo=bar").send().unwrap();
-//! });
-//! ```
-use std::borrow::Cow;
-use std::default::Default;
-use std::io::{self, copy, Read};
-use std::fmt;
-
-use std::time::Duration;
-
-use url::Url;
-use url::ParseError as UrlError;
-
-use header::{Headers, Header, HeaderFormat};
-use header::{ContentLength, Host, Location};
-use method::Method;
-use net::{NetworkConnector, NetworkStream, SslClient};
-use Error;
-
-use self::proxy::{Proxy, tunnel};
-use self::scheme::Scheme;
-pub use self::pool::Pool;
-pub use self::request::Request;
-pub use self::response::Response;
-
-mod proxy;
-pub mod pool;
-pub mod request;
-pub mod response;
-
-use http::Protocol;
-use http::h1::Http11Protocol;
-
-
-/// A Client to use additional features with Requests.
-///
-/// Clients can handle things such as: redirect policy, connection pooling.
-pub struct Client {
-    protocol: Box<Protocol + Send + Sync>,
-    redirect_policy: RedirectPolicy,
-    read_timeout: Option<Duration>,
-    write_timeout: Option<Duration>,
-    proxy: Option<(Scheme, Cow<'static, str>, u16)>
-}
-
-impl fmt::Debug for Client {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        fmt.debug_struct("Client")
-           .field("redirect_policy", &self.redirect_policy)
-           .field("read_timeout", &self.read_timeout)
-           .field("write_timeout", &self.write_timeout)
-           .field("proxy", &self.proxy)
-           .finish()
-    }
-}
-
-impl Client {
-
-    /// Create a new Client.
-    pub fn new() -> Client {
-        Client::with_pool_config(Default::default())
-    }
-
-    /// Create a new Client with a configured Pool Config.
-    pub fn with_pool_config(config: pool::Config) -> Client {
-        Client::with_connector(Pool::new(config))
-    }
-
-    /// Create a Client with an HTTP proxy to a (host, port).
-    pub fn with_http_proxy<H>(host: H, port: u16) -> Client
-    where H: Into<Cow<'static, str>> {
-        let host = host.into();
-        let proxy = tunnel((Scheme::Http, host.clone(), port));
-        let mut client = Client::with_connector(Pool::with_connector(Default::default(), proxy));
-        client.proxy = Some((Scheme::Http, host, port));
-        client
-    }
-
-    /// Create a Client using a proxy with a custom connector and SSL client.
-    pub fn with_proxy_config<C, S>(proxy_config: ProxyConfig<C, S>) -> Client
-    where C: NetworkConnector + Send + Sync + 'static,
-          C::Stream: NetworkStream + Send + Clone,
-          S: SslClient<C::Stream> + Send + Sync + 'static {
-
-        let scheme = proxy_config.scheme;
-        let host = proxy_config.host;
-        let port = proxy_config.port;
-        let proxy = Proxy {
-            proxy: (scheme.clone(), host.clone(), port),
-            connector: proxy_config.connector,
-            ssl: proxy_config.ssl,
-        };
-
-        let mut client = match proxy_config.pool_config {
-            Some(pool_config) => Client::with_connector(Pool::with_connector(pool_config, proxy)),
-            None => Client::with_connector(proxy),
-        };
-        client.proxy = Some((scheme, host, port));
-        client
-    }
-
-    /// Create a new client with a specific connector.
-    pub fn with_connector<C, S>(connector: C) -> Client
-    where C: NetworkConnector<Stream=S> + Send + Sync + 'static, S: NetworkStream + Send {
-        Client::with_protocol(Http11Protocol::with_connector(connector))
-    }
-
-    /// Create a new client with a specific `Protocol`.
-    pub fn with_protocol<P: Protocol + Send + Sync + 'static>(protocol: P) -> Client {
-        Client {
-            protocol: Box::new(protocol),
-            redirect_policy: Default::default(),
-            read_timeout: None,
-            write_timeout: None,
-            proxy: None,
-        }
-    }
-
-    /// Set the RedirectPolicy.
-    pub fn set_redirect_policy(&mut self, policy: RedirectPolicy) {
-        self.redirect_policy = policy;
-    }
-
-    /// Set the read timeout value for all requests.
-    pub fn set_read_timeout(&mut self, dur: Option<Duration>) {
-        self.read_timeout = dur;
-    }
-
-    /// Set the write timeout value for all requests.
-    pub fn set_write_timeout(&mut self, dur: Option<Duration>) {
-        self.write_timeout = dur;
-    }
-
-    /// Build a Get request.
-    pub fn get<U: IntoUrl>(&self, url: U) -> RequestBuilder {
-        self.request(Method::Get, url)
-    }
-
-    /// Build a Head request.
-    pub fn head<U: IntoUrl>(&self, url: U) -> RequestBuilder {
-        self.request(Method::Head, url)
-    }
-
-    /// Build a Patch request.
-    pub fn patch<U: IntoUrl>(&self, url: U) -> RequestBuilder {
-        self.request(Method::Patch, url)
-    }
-
-    /// Build a Post request.
-    pub fn post<U: IntoUrl>(&self, url: U) -> RequestBuilder {
-        self.request(Method::Post, url)
-    }
-
-    /// Build a Put request.
-    pub fn put<U: IntoUrl>(&self, url: U) -> RequestBuilder {
-        self.request(Method::Put, url)
-    }
-
-    /// Build a Delete request.
-    pub fn delete<U: IntoUrl>(&self, url: U) -> RequestBuilder {
-        self.request(Method::Delete, url)
-    }
-
-
-    /// Build a new request using this Client.
-    pub fn request<U: IntoUrl>(&self, method: Method, url: U) -> RequestBuilder {
-        RequestBuilder {
-            client: self,
-            method: method,
-            url: url.into_url(),
-            body: None,
-            headers: None,
-        }
-    }
-}
-
-impl Default for Client {
-    fn default() -> Client { Client::new() }
-}
-
-/// Options for an individual Request.
-///
-/// One of these will be built for you if you use one of the convenience
-/// methods, such as `get()`, `post()`, etc.
-pub struct RequestBuilder<'a> {
-    client: &'a Client,
-    // We store a result here because it's good to keep RequestBuilder
-    // from being generic, but it is a nicer API to report the error
-    // from `send` (when other errors may be happening, so it already
-    // returns a `Result`). Why's it good to keep it non-generic? It
-    // stops downstream crates having to remonomorphise and recompile
-    // the code, which can take a while, since `send` is fairly large.
-    // (For an extreme example, a tiny crate containing
-    // `hyper::Client::new().get("x").send().unwrap();` took ~4s to
-    // compile with a generic RequestBuilder, but 2s with this scheme,)
-    url: Result<Url, UrlError>,
-    headers: Option<Headers>,
-    method: Method,
-    body: Option<Body<'a>>,
-}
-
-impl<'a> RequestBuilder<'a> {
-
-    /// Set a request body to be sent.
-    pub fn body<B: Into<Body<'a>>>(mut self, body: B) -> RequestBuilder<'a> {
-        self.body = Some(body.into());
-        self
-    }
-
-    /// Add additional headers to the request.
-    pub fn headers(mut self, headers: Headers) -> RequestBuilder<'a> {
-        self.headers = Some(headers);
-        self
-    }
-
-    /// Add an individual new header to the request.
-    pub fn header<H: Header + HeaderFormat>(mut self, header: H) -> RequestBuilder<'a> {
-        {
-            let mut headers = match self.headers {
-                Some(ref mut h) => h,
-                None => {
-                    self.headers = Some(Headers::new());
-                    self.headers.as_mut().unwrap()
-                }
-            };
-
-            headers.set(header);
-        }
-        self
-    }
-
-    /// Execute this request and receive a Response back.
-    pub fn send(self) -> ::Result<Response> {
-        let RequestBuilder { client, method, url, headers, body } = self;
-        let mut url = try!(url);
-        trace!("send method={:?}, url={:?}, client={:?}", method, url, client);
-
-        let can_have_body = match method {
-            Method::Get | Method::Head => false,
-            _ => true
-        };
-
-        let mut body = if can_have_body {
-            body
-        } else {
-            None
-        };
-
-        loop {
-            let mut req = {
-                let (host, port) = try!(get_host_and_port(&url));
-                let mut message = try!(client.protocol.new_message(&host, port, url.scheme()));
-                if url.scheme() == "http" && client.proxy.is_some() {
-                    message.set_proxied(true);
-                }
-
-                let mut h = Headers::new();
-                h.set(Host {
-                    hostname: host.to_owned(),
-                    port: Some(port),
-                });
-                if let Some(ref headers) = headers {
-                    h.extend(headers.iter());
-                }
-                let headers = h;
-                Request::with_headers_and_message(method.clone(), url.clone(), headers, message)
-            };
-
-            try!(req.set_write_timeout(client.write_timeout));
-            try!(req.set_read_timeout(client.read_timeout));
-
-            match (can_have_body, body.as_ref()) {
-                (true, Some(body)) => match body.size() {
-                    Some(size) => req.headers_mut().set(ContentLength(size)),
-                    None => (), // chunked, Request will add it automatically
-                },
-                (true, None) => req.headers_mut().set(ContentLength(0)),
-                _ => () // neither
-            }
-            let mut streaming = try!(req.start());
-            body.take().map(|mut rdr| copy(&mut rdr, &mut streaming));
-            let res = try!(streaming.send());
-            if !res.status.is_redirection() {
-                return Ok(res)
-            }
-            debug!("redirect code {:?} for {}", res.status, url);
-
-            let loc = {
-                // punching borrowck here
-                let loc = match res.headers.get::<Location>() {
-                    Some(&Location(ref loc)) => {
-                        Some(url.join(loc))
-                    }
-                    None => {
-                        debug!("no Location header");
-                        // could be 304 Not Modified?
-                        None
-                    }
-                };
-                match loc {
-                    Some(r) => r,
-                    None => return Ok(res)
-                }
-            };
-            url = match loc {
-                Ok(u) => u,
-                Err(e) => {
-                    debug!("Location header had invalid URI: {:?}", e);
-                    return Ok(res);
-                }
-            };
-            match client.redirect_policy {
-                // separate branches because they can't be one
-                RedirectPolicy::FollowAll => (), //continue
-                RedirectPolicy::FollowIf(cond) if cond(&url) => (), //continue
-                _ => return Ok(res),
-            }
-        }
-    }
-}
-
-/// An enum of possible body types for a Request.
-pub enum Body<'a> {
-    /// A Reader does not necessarily know it's size, so it is chunked.
-    ChunkedBody(&'a mut (Read + 'a)),
-    /// For Readers that can know their size, like a `File`.
-    SizedBody(&'a mut (Read + 'a), u64),
-    /// A String has a size, and uses Content-Length.
-    BufBody(&'a [u8] , usize),
-}
-
-impl<'a> Body<'a> {
-    fn size(&self) -> Option<u64> {
-        match *self {
-            Body::SizedBody(_, len) => Some(len),
-            Body::BufBody(_, len) => Some(len as u64),
-            _ => None
-        }
-    }
-}
-
-impl<'a> Read for Body<'a> {
-    #[inline]
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        match *self {
-            Body::ChunkedBody(ref mut r) => r.read(buf),
-            Body::SizedBody(ref mut r, _) => r.read(buf),
-            Body::BufBody(ref mut r, _) => Read::read(r, buf),
-        }
-    }
-}
-
-impl<'a> Into<Body<'a>> for &'a [u8] {
-    #[inline]
-    fn into(self) -> Body<'a> {
-        Body::BufBody(self, self.len())
-    }
-}
-
-impl<'a> Into<Body<'a>> for &'a str {
-    #[inline]
-    fn into(self) -> Body<'a> {
-        self.as_bytes().into()
-    }
-}
-
-impl<'a> Into<Body<'a>> for &'a String {
-    #[inline]
-    fn into(self) -> Body<'a> {
-        self.as_bytes().into()
-    }
-}
-
-impl<'a, R: Read> From<&'a mut R> for Body<'a> {
-    #[inline]
-    fn from(r: &'a mut R) -> Body<'a> {
-        Body::ChunkedBody(r)
-    }
-}
-
-/// A helper trait to convert common objects into a Url.
-pub trait IntoUrl {
-    /// Consumes the object, trying to return a Url.
-    fn into_url(self) -> Result<Url, UrlError>;
-}
-
-impl IntoUrl for Url {
-    fn into_url(self) -> Result<Url, UrlError> {
-        Ok(self)
-    }
-}
-
-impl<'a> IntoUrl for &'a str {
-    fn into_url(self) -> Result<Url, UrlError> {
-        Url::parse(self)
-    }
-}
-
-impl<'a> IntoUrl for &'a String {
-    fn into_url(self) -> Result<Url, UrlError> {
-        Url::parse(self)
-    }
-}
-
-/// Proxy server configuration with a custom connector and TLS wrapper.
-pub struct ProxyConfig<C, S>
-where C: NetworkConnector + Send + Sync + 'static,
-      C::Stream: NetworkStream + Clone + Send,
-      S: SslClient<C::Stream> + Send + Sync + 'static {
-    scheme: Scheme,
-    host: Cow<'static, str>,
-    port: u16,
-    pool_config: Option<pool::Config>,
-    connector: C,
-    ssl: S,
-}
-
-impl<C, S> ProxyConfig<C, S>
-where C: NetworkConnector + Send + Sync + 'static,
-      C::Stream: NetworkStream + Clone + Send,
-      S: SslClient<C::Stream> + Send + Sync + 'static {
-
-    /// Create a new `ProxyConfig`.
-    #[inline]
-    pub fn new<H: Into<Cow<'static, str>>>(scheme: &str, host: H, port: u16, connector: C, ssl: S) -> ProxyConfig<C, S> {
-        ProxyConfig {
-            scheme: scheme.into(),
-            host: host.into(),
-            port: port,
-            pool_config: Some(pool::Config::default()),
-            connector: connector,
-            ssl: ssl,
-        }
-    }
-
-    /// Change the `pool::Config` for the proxy.
-    ///
-    /// Passing `None` disables the `Pool`.
-    ///
-    /// The default is enabled, with the default `pool::Config`.
-    pub fn set_pool_config(&mut self, pool_config: Option<pool::Config>) {
-        self.pool_config = pool_config;
-    }
-}
-
-/// Behavior regarding how to handle redirects within a Client.
-#[derive(Copy)]
-pub enum RedirectPolicy {
-    /// Don't follow any redirects.
-    FollowNone,
-    /// Follow all redirects.
-    FollowAll,
-    /// Follow a redirect if the contained function returns true.
-    FollowIf(fn(&Url) -> bool),
-}
-
-impl fmt::Debug for RedirectPolicy {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            RedirectPolicy::FollowNone => fmt.write_str("FollowNone"),
-            RedirectPolicy::FollowAll => fmt.write_str("FollowAll"),
-            RedirectPolicy::FollowIf(_) => fmt.write_str("FollowIf"),
-        }
-    }
-}
-
-// This is a hack because of upstream typesystem issues.
-impl Clone for RedirectPolicy {
-    fn clone(&self) -> RedirectPolicy {
-        *self
-    }
-}
-
-impl Default for RedirectPolicy {
-    fn default() -> RedirectPolicy {
-        RedirectPolicy::FollowAll
-    }
-}
-
-
-fn get_host_and_port(url: &Url) -> ::Result<(&str, u16)> {
-    let host = match url.host_str() {
-        Some(host) => host,
-        None => return Err(Error::Uri(UrlError::EmptyHost)),
-    };
-    trace!("host={:?}", host);
-    let port = match url.port_or_known_default() {
-        Some(port) => port,
-        None => return Err(Error::Uri(UrlError::InvalidPort)),
-    };
-    trace!("port={:?}", port);
-    Ok((host, port))
-}
-
-mod scheme {
-
-    #[derive(Clone, PartialEq, Eq, Debug, Hash)]
-    pub enum Scheme {
-        Http,
-        Https,
-        Other(String),
-    }
-
-    impl<'a> From<&'a str> for Scheme {
-        fn from(s: &'a str) -> Scheme {
-            match s {
-                "http" => Scheme::Http,
-                "https" => Scheme::Https,
-                s => Scheme::Other(String::from(s)),
-            }
-        }
-    }
-
-    impl AsRef<str> for Scheme {
-        fn as_ref(&self) -> &str {
-            match *self {
-                Scheme::Http => "http",
-                Scheme::Https => "https",
-                Scheme::Other(ref s) => s,
-            }
-        }
-    }
-
-}
-
-#[cfg(test)]
-mod tests {
-    use std::io::Read;
-    use header::Server;
-    use http::h1::Http11Message;
-    use mock::{MockStream, MockSsl};
-    use super::{Client, RedirectPolicy};
-    use super::scheme::Scheme;
-    use super::proxy::Proxy;
-    use super::pool::Pool;
-    use url::Url;
-
-    mock_connector!(MockRedirectPolicy {
-        "http://127.0.0.1" =>       "HTTP/1.1 301 Redirect\r\n\
-                                     Location: http://127.0.0.2\r\n\
-                                     Server: mock1\r\n\
-                                     \r\n\
-                                    "
-        "http://127.0.0.2" =>       "HTTP/1.1 302 Found\r\n\
-                                     Location: https://127.0.0.3\r\n\
-                                     Server: mock2\r\n\
-                                     \r\n\
-                                    "
-        "https://127.0.0.3" =>      "HTTP/1.1 200 OK\r\n\
-                                     Server: mock3\r\n\
-                                     \r\n\
-                                    "
-    });
-
-
-    #[test]
-    fn test_proxy() {
-        use super::pool::PooledStream;
-        type MessageStream = PooledStream<super::proxy::Proxied<MockStream, MockStream>>;
-        mock_connector!(ProxyConnector {
-            b"HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"
-        });
-        let tunnel = Proxy {
-            connector: ProxyConnector,
-            proxy: (Scheme::Http, "example.proxy".into(), 8008),
-            ssl: MockSsl,
-        };
-        let mut client = Client::with_connector(Pool::with_connector(Default::default(), tunnel));
-        client.proxy = Some((Scheme::Http, "example.proxy".into(), 8008));
-        let mut dump = vec![];
-        client.get("http://127.0.0.1/foo/bar").send().unwrap().read_to_end(&mut dump).unwrap();
-
-        let box_message = client.protocol.new_message("127.0.0.1", 80, "http").unwrap();
-        let message = box_message.downcast::<Http11Message>().unwrap();
-        let stream =  message.into_inner().downcast::<MessageStream>().unwrap().into_inner().into_normal().unwrap();
-
-        let s = ::std::str::from_utf8(&stream.write).unwrap();
-        let request_line = "GET http://127.0.0.1/foo/bar HTTP/1.1\r\n";
-        assert!(s.starts_with(request_line), "{:?} doesn't start with {:?}", s, request_line);
-        assert!(s.contains("Host: 127.0.0.1\r\n"));
-    }
-
-    #[test]
-    fn test_proxy_tunnel() {
-        use super::pool::PooledStream;
-        type MessageStream = PooledStream<super::proxy::Proxied<MockStream, MockStream>>;
-
-        mock_connector!(ProxyConnector {
-            b"HTTP/1.1 200 OK\r\n\r\n",
-            b"HTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"
-        });
-        let tunnel = Proxy {
-            connector: ProxyConnector,
-            proxy: (Scheme::Http, "example.proxy".into(), 8008),
-            ssl: MockSsl,
-        };
-        let mut client = Client::with_connector(Pool::with_connector(Default::default(), tunnel));
-        client.proxy = Some((Scheme::Http, "example.proxy".into(), 8008));
-        let mut dump = vec![];
-        client.get("https://127.0.0.1/foo/bar").send().unwrap().read_to_end(&mut dump).unwrap();
-
-        let box_message = client.protocol.new_message("127.0.0.1", 443, "https").unwrap();
-        let message = box_message.downcast::<Http11Message>().unwrap();
-        let stream = message.into_inner().downcast::<MessageStream>().unwrap().into_inner().into_tunneled().unwrap();
-
-        let s = ::std::str::from_utf8(&stream.write).unwrap();
-        let connect_line = "CONNECT 127.0.0.1:443 HTTP/1.1\r\nHost: 127.0.0.1:443\r\n\r\n";
-        assert_eq!(&s[..connect_line.len()], connect_line);
-
-        let s = &s[connect_line.len()..];
-        let request_line = "GET /foo/bar HTTP/1.1\r\n";
-        assert_eq!(&s[..request_line.len()], request_line);
-        assert!(s.contains("Host: 127.0.0.1\r\n"));
-    }
-
-    #[test]
-    fn test_redirect_followall() {
-        let mut client = Client::with_connector(MockRedirectPolicy);
-        client.set_redirect_policy(RedirectPolicy::FollowAll);
-
-        let res = client.get("http://127.0.0.1").send().unwrap();
-        assert_eq!(res.headers.get(), Some(&Server("mock3".to_owned())));
-    }
-
-    #[test]
-    fn test_redirect_dontfollow() {
-        let mut client = Client::with_connector(MockRedirectPolicy);
-        client.set_redirect_policy(RedirectPolicy::FollowNone);
-        let res = client.get("http://127.0.0.1").send().unwrap();
-        assert_eq!(res.headers.get(), Some(&Server("mock1".to_owned())));
-    }
-
-    #[test]
-    fn test_redirect_followif() {
-        fn follow_if(url: &Url) -> bool {
-            !url.as_str().contains("127.0.0.3")
-        }
-        let mut client = Client::with_connector(MockRedirectPolicy);
-        client.set_redirect_policy(RedirectPolicy::FollowIf(follow_if));
-        let res = client.get("http://127.0.0.1").send().unwrap();
-        assert_eq!(res.headers.get(), Some(&Server("mock2".to_owned())));
-    }
-
-    mock_connector!(Issue640Connector {
-        b"HTTP/1.1 200 OK\r\nContent-Length: 3\r\n\r\n",
-        b"GET",
-        b"HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\n",
-        b"HEAD",
-        b"HTTP/1.1 200 OK\r\nContent-Length: 4\r\n\r\n",
-        b"POST"
-    });
-
-    // see issue #640
-    #[test]
-    fn test_head_response_body_keep_alive() {
-        let client = Client::with_connector(Pool::with_connector(Default::default(), Issue640Connector));
-
-        let mut s = String::new();
-        client.get("http://127.0.0.1").send().unwrap().read_to_string(&mut s).unwrap();
-        assert_eq!(s, "GET");
-
-        let mut s = String::new();
-        client.head("http://127.0.0.1").send().unwrap().read_to_string(&mut s).unwrap();
-        assert_eq!(s, "");
-
-        let mut s = String::new();
-        client.post("http://127.0.0.1").send().unwrap().read_to_string(&mut s).unwrap();
-        assert_eq!(s, "POST");
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/client/pool.rs
+++ /dev/null
@@ -1,305 +0,0 @@
-//! Client Connection Pooling
-use std::borrow::ToOwned;
-use std::collections::HashMap;
-use std::fmt;
-use std::io::{self, Read, Write};
-use std::net::{SocketAddr, Shutdown};
-use std::sync::{Arc, Mutex};
-use std::sync::atomic::{AtomicBool, Ordering};
-
-use std::time::Duration;
-
-use net::{NetworkConnector, NetworkStream, DefaultConnector};
-use client::scheme::Scheme;
-
-/// The `NetworkConnector` that behaves as a connection pool used by hyper's `Client`.
-pub struct Pool<C: NetworkConnector> {
-    connector: C,
-    inner: Arc<Mutex<PoolImpl<<C as NetworkConnector>::Stream>>>
-}
-
-/// Config options for the `Pool`.
-#[derive(Debug)]
-pub struct Config {
-    /// The maximum idle connections *per host*.
-    pub max_idle: usize,
-}
-
-impl Default for Config {
-    #[inline]
-    fn default() -> Config {
-        Config {
-            max_idle: 5,
-        }
-    }
-}
-
-#[derive(Debug)]
-struct PoolImpl<S> {
-    conns: HashMap<Key, Vec<PooledStreamInner<S>>>,
-    config: Config,
-}
-
-type Key = (String, u16, Scheme);
-
-fn key<T: Into<Scheme>>(host: &str, port: u16, scheme: T) -> Key {
-    (host.to_owned(), port, scheme.into())
-}
-
-impl Pool<DefaultConnector> {
-    /// Creates a `Pool` with a `DefaultConnector`.
-    #[inline]
-    pub fn new(config: Config) -> Pool<DefaultConnector> {
-        Pool::with_connector(config, DefaultConnector::default())
-    }
-}
-
-impl<C: NetworkConnector> Pool<C> {
-    /// Creates a `Pool` with a specified `NetworkConnector`.
-    #[inline]
-    pub fn with_connector(config: Config, connector: C) -> Pool<C> {
-        Pool {
-            connector: connector,
-            inner: Arc::new(Mutex::new(PoolImpl {
-                conns: HashMap::new(),
-                config: config,
-            }))
-        }
-    }
-
-    /// Clear all idle connections from the Pool, closing them.
-    #[inline]
-    pub fn clear_idle(&mut self) {
-        self.inner.lock().unwrap().conns.clear();
-    }
-}
-
-impl<S> PoolImpl<S> {
-    fn reuse(&mut self, key: Key, conn: PooledStreamInner<S>) {
-        trace!("reuse {:?}", key);
-        let conns = self.conns.entry(key).or_insert(vec![]);
-        if conns.len() < self.config.max_idle {
-            conns.push(conn);
-        }
-    }
-}
-
-impl<C: NetworkConnector<Stream=S>, S: NetworkStream + Send> NetworkConnector for Pool<C> {
-    type Stream = PooledStream<S>;
-    fn connect(&self, host: &str, port: u16, scheme: &str) -> ::Result<PooledStream<S>> {
-        let key = key(host, port, scheme);
-
-        let inner = {
-            // keep the mutex locked only in this block
-            let mut locked = self.inner.lock().unwrap();
-            let mut should_remove = false;
-            let inner = locked.conns.get_mut(&key).map(|vec| {
-                trace!("Pool had connection, using");
-                should_remove = vec.len() == 1;
-                vec.pop().unwrap()
-            });
-            if should_remove {
-                locked.conns.remove(&key);
-            }
-            inner
-        };
-
-        let inner = match inner {
-            Some(inner) => inner,
-            None => PooledStreamInner {
-                key: key.clone(),
-                stream: try!(self.connector.connect(host, port, scheme)),
-                previous_response_expected_no_content: false,
-            }
-
-        };
-        Ok(PooledStream {
-            inner: Some(inner),
-            is_closed: AtomicBool::new(false),
-            pool: self.inner.clone(),
-        })
-    }
-}
-
-/// A Stream that will try to be returned to the Pool when dropped.
-pub struct PooledStream<S> {
-    inner: Option<PooledStreamInner<S>>,
-    is_closed: AtomicBool,
-    pool: Arc<Mutex<PoolImpl<S>>>,
-}
-
-// manual impl to add the 'static bound for 1.7 compat
-impl<S> fmt::Debug for PooledStream<S> where S: fmt::Debug + 'static {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        fmt.debug_struct("PooledStream")
-           .field("inner", &self.inner)
-           .field("is_closed", &self.is_closed.load(Ordering::Relaxed))
-           .field("pool", &self.pool)
-           .finish()
-    }
-}
-
-impl<S: NetworkStream> PooledStream<S> {
-    /// Take the wrapped stream out of the pool completely.
-    pub fn into_inner(mut self) -> S {
-        self.inner.take().expect("PooledStream lost its inner stream").stream
-    }
-
-    /// Gets a borrowed reference to the underlying stream.
-    pub fn get_ref(&self) -> &S {
-        &self.inner.as_ref().expect("PooledStream lost its inner stream").stream
-    }
-}
-
-#[derive(Debug)]
-struct PooledStreamInner<S> {
-    key: Key,
-    stream: S,
-    previous_response_expected_no_content: bool,
-}
-
-impl<S: NetworkStream> Read for PooledStream<S> {
-    #[inline]
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        match self.inner.as_mut().unwrap().stream.read(buf) {
-            Ok(0) => {
-                // if the wrapped stream returns EOF (Ok(0)), that means the
-                // server has closed the stream. we must be sure this stream
-                // is dropped and not put back into the pool.
-                self.is_closed.store(true, Ordering::Relaxed);
-                Ok(0)
-            },
-            r => r
-        }
-    }
-}
-
-impl<S: NetworkStream> Write for PooledStream<S> {
-    #[inline]
-    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
-        self.inner.as_mut().unwrap().stream.write(buf)
-    }
-
-    #[inline]
-    fn flush(&mut self) -> io::Result<()> {
-        self.inner.as_mut().unwrap().stream.flush()
-    }
-}
-
-impl<S: NetworkStream> NetworkStream for PooledStream<S> {
-    #[inline]
-    fn peer_addr(&mut self) -> io::Result<SocketAddr> {
-        self.inner.as_mut().unwrap().stream.peer_addr()
-            .map_err(|e| {
-                self.is_closed.store(true, Ordering::Relaxed);
-                e
-            })
-    }
-
-    #[inline]
-    fn set_read_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        self.inner.as_ref().unwrap().stream.set_read_timeout(dur)
-            .map_err(|e| {
-                self.is_closed.store(true, Ordering::Relaxed);
-                e
-            })
-    }
-
-    #[inline]
-    fn set_write_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        self.inner.as_ref().unwrap().stream.set_write_timeout(dur)
-            .map_err(|e| {
-                self.is_closed.store(true, Ordering::Relaxed);
-                e
-            })
-    }
-
-    #[inline]
-    fn close(&mut self, how: Shutdown) -> io::Result<()> {
-        self.is_closed.store(true, Ordering::Relaxed);
-        self.inner.as_mut().unwrap().stream.close(how)
-    }
-
-    #[inline]
-    fn set_previous_response_expected_no_content(&mut self, expected: bool) {
-        trace!("set_previous_response_expected_no_content {}", expected);
-        self.inner.as_mut().unwrap().previous_response_expected_no_content = expected;
-    }
-
-    #[inline]
-    fn previous_response_expected_no_content(&self) -> bool {
-        let answer = self.inner.as_ref().unwrap().previous_response_expected_no_content;
-        trace!("previous_response_expected_no_content {}", answer);
-        answer
-    }
-}
-
-impl<S> Drop for PooledStream<S> {
-    fn drop(&mut self) {
-        let is_closed = self.is_closed.load(Ordering::Relaxed);
-        trace!("PooledStream.drop, is_closed={}", is_closed);
-        if !is_closed {
-            self.inner.take().map(|inner| {
-                if let Ok(mut pool) = self.pool.lock() {
-                    pool.reuse(inner.key.clone(), inner);
-                }
-                // else poisoned, give up
-            });
-        }
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use std::net::Shutdown;
-    use std::io::Read;
-    use mock::{MockConnector};
-    use net::{NetworkConnector, NetworkStream};
-
-    use super::{Pool, key};
-
-    macro_rules! mocked {
-        () => ({
-            Pool::with_connector(Default::default(), MockConnector)
-        })
-    }
-
-    #[test]
-    fn test_connect_and_drop() {
-        let pool = mocked!();
-        let key = key("127.0.0.1", 3000, "http");
-        pool.connect("127.0.0.1", 3000, "http").unwrap();
-        {
-            let locked = pool.inner.lock().unwrap();
-            assert_eq!(locked.conns.len(), 1);
-            assert_eq!(locked.conns.get(&key).unwrap().len(), 1);
-        }
-        pool.connect("127.0.0.1", 3000, "http").unwrap(); //reused
-        {
-            let locked = pool.inner.lock().unwrap();
-            assert_eq!(locked.conns.len(), 1);
-            assert_eq!(locked.conns.get(&key).unwrap().len(), 1);
-        }
-    }
-
-    #[test]
-    fn test_closed() {
-        let pool = mocked!();
-        let mut stream = pool.connect("127.0.0.1", 3000, "http").unwrap();
-        stream.close(Shutdown::Both).unwrap();
-        drop(stream);
-        let locked = pool.inner.lock().unwrap();
-        assert_eq!(locked.conns.len(), 0);
-    }
-
-    #[test]
-    fn test_eof_closes() {
-        let pool = mocked!();
-
-        let mut stream = pool.connect("127.0.0.1", 3000, "http").unwrap();
-        assert_eq!(stream.read(&mut [0]).unwrap(), 0);
-        drop(stream);
-        let locked = pool.inner.lock().unwrap();
-        assert_eq!(locked.conns.len(), 0);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/client/proxy.rs
+++ /dev/null
@@ -1,221 +0,0 @@
-use std::borrow::Cow;
-use std::io;
-use std::net::{SocketAddr, Shutdown};
-use std::time::Duration;
-
-use client::scheme::Scheme;
-use method::Method;
-use net::{NetworkConnector, HttpConnector, NetworkStream, SslClient};
-
-pub fn tunnel(proxy: (Scheme, Cow<'static, str>, u16)) -> Proxy<HttpConnector, self::no_ssl::Plaintext> {
-    Proxy {
-        connector: HttpConnector,
-        proxy: proxy,
-        ssl: self::no_ssl::Plaintext,
-    }
-
-}
-
-pub struct Proxy<C, S>
-where C: NetworkConnector + Send + Sync + 'static,
-      C::Stream: NetworkStream + Send + Clone,
-      S: SslClient<C::Stream> {
-    pub connector: C,
-    pub proxy: (Scheme, Cow<'static, str>, u16),
-    pub ssl: S,
-}
-
-impl<C, S> NetworkConnector for Proxy<C, S>
-where C: NetworkConnector + Send + Sync + 'static,
-      C::Stream: NetworkStream + Send + Clone,
-      S: SslClient<C::Stream> {
-    type Stream = Proxied<C::Stream, S::Stream>;
-
-    fn connect(&self, host: &str, port: u16, scheme: &str) -> ::Result<Self::Stream> {
-        use httparse;
-        use std::io::{Read, Write};
-        use ::version::HttpVersion::Http11;
-        trace!("{:?} proxy for '{}://{}:{}'", self.proxy, scheme, host, port);
-        match scheme {
-            "http" => {
-                self.connector.connect(self.proxy.1.as_ref(), self.proxy.2, self.proxy.0.as_ref())
-                    .map(Proxied::Normal)
-            },
-            "https" => {
-                let mut stream = try!(self.connector.connect(self.proxy.1.as_ref(), self.proxy.2, self.proxy.0.as_ref()));
-                trace!("{:?} CONNECT {}:{}", self.proxy, host, port);
-                try!(write!(&mut stream, "{method} {host}:{port} {version}\r\nHost: {host}:{port}\r\n\r\n",
-                            method=Method::Connect, host=host, port=port, version=Http11));
-                try!(stream.flush());
-                let mut buf = [0; 1024];
-                let mut n = 0;
-                while n < buf.len() {
-                    n += try!(stream.read(&mut buf[n..]));
-                    let mut headers = [httparse::EMPTY_HEADER; 10];
-                    let mut res = httparse::Response::new(&mut headers);
-                    if try!(res.parse(&buf[..n])).is_complete() {
-                        let code = res.code.expect("complete parsing lost code");
-                        if code >= 200 && code < 300 {
-                            trace!("CONNECT success = {:?}", code);
-                            return self.ssl.wrap_client(stream, host)
-                                .map(Proxied::Tunneled)
-                        } else {
-                            trace!("CONNECT response = {:?}", code);
-                            return Err(::Error::Status);
-                        }
-                    }
-                }
-                Err(::Error::TooLarge)
-            },
-            _ => Err(io::Error::new(io::ErrorKind::InvalidInput, "invalid scheme").into())
-        }
-    }
-}
-
-#[derive(Debug)]
-pub enum Proxied<T1, T2> {
-    Normal(T1),
-    Tunneled(T2)
-}
-
-#[cfg(test)]
-impl<T1, T2> Proxied<T1, T2> {
-    pub fn into_normal(self) -> Result<T1, Self> {
-        match self {
-            Proxied::Normal(t1) => Ok(t1),
-            _ => Err(self)
-        }
-    }
-
-    pub fn into_tunneled(self) -> Result<T2, Self> {
-        match self {
-            Proxied::Tunneled(t2) => Ok(t2),
-            _ => Err(self)
-        }
-    }
-}
-
-impl<T1: NetworkStream, T2: NetworkStream> io::Read for Proxied<T1, T2> {
-    #[inline]
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        match *self {
-            Proxied::Normal(ref mut t) => io::Read::read(t, buf),
-            Proxied::Tunneled(ref mut t) => io::Read::read(t, buf),
-        }
-    }
-}
-
-impl<T1: NetworkStream, T2: NetworkStream> io::Write for Proxied<T1, T2> {
-    #[inline]
-    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
-        match *self {
-            Proxied::Normal(ref mut t) => io::Write::write(t, buf),
-            Proxied::Tunneled(ref mut t) => io::Write::write(t, buf),
-        }
-    }
-
-    #[inline]
-    fn flush(&mut self) -> io::Result<()> {
-        match *self {
-            Proxied::Normal(ref mut t) => io::Write::flush(t),
-            Proxied::Tunneled(ref mut t) => io::Write::flush(t),
-        }
-    }
-}
-
-impl<T1: NetworkStream, T2: NetworkStream> NetworkStream for Proxied<T1, T2> {
-    #[inline]
-    fn peer_addr(&mut self) -> io::Result<SocketAddr> {
-        match *self {
-            Proxied::Normal(ref mut s) => s.peer_addr(),
-            Proxied::Tunneled(ref mut s) => s.peer_addr()
-        }
-    }
-
-    #[inline]
-    fn set_read_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        match *self {
-            Proxied::Normal(ref inner) => inner.set_read_timeout(dur),
-            Proxied::Tunneled(ref inner) => inner.set_read_timeout(dur)
-        }
-    }
-
-    #[inline]
-    fn set_write_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        match *self {
-            Proxied::Normal(ref inner) => inner.set_write_timeout(dur),
-            Proxied::Tunneled(ref inner) => inner.set_write_timeout(dur)
-        }
-    }
-
-    #[inline]
-    fn close(&mut self, how: Shutdown) -> io::Result<()> {
-        match *self {
-            Proxied::Normal(ref mut s) => s.close(how),
-            Proxied::Tunneled(ref mut s) => s.close(how)
-        }
-    }
-}
-
-#[cfg(not(any(feature = "openssl", feature = "security-framework")))]
-mod no_ssl {
-    use std::io;
-    use std::net::{Shutdown, SocketAddr};
-    use std::time::Duration;
-
-    use net::{SslClient, NetworkStream};
-
-    pub struct Plaintext;
-
-    #[derive(Clone)]
-    pub enum Void {}
-
-    impl io::Read for Void {
-        #[inline]
-        fn read(&mut self, _buf: &mut [u8]) -> io::Result<usize> {
-            match *self {}
-        }
-    }
-
-    impl io::Write for Void {
-        #[inline]
-        fn write(&mut self, _buf: &[u8]) -> io::Result<usize> {
-            match *self {}
-        }
-
-        #[inline]
-        fn flush(&mut self) -> io::Result<()> {
-            match *self {}
-        }
-    }
-
-    impl NetworkStream for Void {
-        #[inline]
-        fn peer_addr(&mut self) -> io::Result<SocketAddr> {
-            match *self {}
-        }
-
-        #[inline]
-        fn set_read_timeout(&self, _dur: Option<Duration>) -> io::Result<()> {
-            match *self {}
-        }
-
-        #[inline]
-        fn set_write_timeout(&self, _dur: Option<Duration>) -> io::Result<()> {
-            match *self {}
-        }
-
-        #[inline]
-        fn close(&mut self, _how: Shutdown) -> io::Result<()> {
-            match *self {}
-        }
-    }
-
-    impl<T: NetworkStream + Send + Clone> SslClient<T> for Plaintext {
-        type Stream = Void;
-
-        fn wrap_client(&self, _stream: T, _host: &str) -> ::Result<Self::Stream> {
-            Err(io::Error::new(io::ErrorKind::InvalidInput, "invalid scheme").into())
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/client/request.rs
+++ /dev/null
@@ -1,314 +0,0 @@
-//! Client Requests
-use std::marker::PhantomData;
-use std::io::{self, Write};
-
-use std::time::Duration;
-
-use url::Url;
-
-use method::Method;
-use header::Headers;
-use header::Host;
-use net::{NetworkStream, NetworkConnector, DefaultConnector, Fresh, Streaming};
-use version;
-use client::{Response, get_host_and_port};
-
-use http::{HttpMessage, RequestHead};
-use http::h1::Http11Message;
-
-
-/// A client request to a remote server.
-/// The W type tracks the state of the request, Fresh vs Streaming.
-pub struct Request<W> {
-    /// The target URI for this request.
-    pub url: Url,
-
-    /// The HTTP version of this request.
-    pub version: version::HttpVersion,
-
-    message: Box<HttpMessage>,
-    headers: Headers,
-    method: Method,
-
-    _marker: PhantomData<W>,
-}
-
-impl<W> Request<W> {
-    /// Read the Request headers.
-    #[inline]
-    pub fn headers(&self) -> &Headers { &self.headers }
-
-    /// Read the Request method.
-    #[inline]
-    pub fn method(&self) -> Method { self.method.clone() }
-
-    /// Set the write timeout.
-    #[inline]
-    pub fn set_write_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        self.message.set_write_timeout(dur)
-    }
-
-    /// Set the read timeout.
-    #[inline]
-    pub fn set_read_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        self.message.set_read_timeout(dur)
-    }
-}
-
-impl Request<Fresh> {
-    /// Create a new `Request<Fresh>` that will use the given `HttpMessage` for its communication
-    /// with the server. This implies that the given `HttpMessage` instance has already been
-    /// properly initialized by the caller (e.g. a TCP connection's already established).
-    pub fn with_message(method: Method, url: Url, message: Box<HttpMessage>)
-            -> ::Result<Request<Fresh>> {
-        let mut headers = Headers::new();
-        {
-            let (host, port) = try!(get_host_and_port(&url));
-            headers.set(Host {
-                hostname: host.to_owned(),
-                port: Some(port),
-            });
-        }
-
-        Ok(Request::with_headers_and_message(method, url, headers, message))
-    }
-
-    #[doc(hidden)]
-    pub fn with_headers_and_message(method: Method, url: Url, headers: Headers,  message: Box<HttpMessage>)
-                -> Request<Fresh> {
-        Request {
-            method: method,
-            headers: headers,
-            url: url,
-            version: version::HttpVersion::Http11,
-            message: message,
-            _marker: PhantomData,
-        }
-    }
-
-    /// Create a new client request.
-    pub fn new(method: Method, url: Url) -> ::Result<Request<Fresh>> {
-        let conn = DefaultConnector::default();
-        Request::with_connector(method, url, &conn)
-    }
-
-    /// Create a new client request with a specific underlying NetworkStream.
-    pub fn with_connector<C, S>(method: Method, url: Url, connector: &C)
-        -> ::Result<Request<Fresh>> where
-        C: NetworkConnector<Stream=S>,
-        S: Into<Box<NetworkStream + Send>> {
-        let stream = {
-            let (host, port) = try!(get_host_and_port(&url));
-            try!(connector.connect(host, port, url.scheme())).into()
-        };
-
-        Request::with_message(method, url, Box::new(Http11Message::with_stream(stream)))
-    }
-
-    /// Consume a Fresh Request, writing the headers and method,
-    /// returning a Streaming Request.
-    pub fn start(mut self) -> ::Result<Request<Streaming>> {
-        let head = match self.message.set_outgoing(RequestHead {
-            headers: self.headers,
-            method: self.method,
-            url: self.url,
-        }) {
-            Ok(head) => head,
-            Err(e) => {
-                let _ = self.message.close_connection();
-                return Err(From::from(e));
-            }
-        };
-
-        Ok(Request {
-            method: head.method,
-            headers: head.headers,
-            url: head.url,
-            version: self.version,
-            message: self.message,
-            _marker: PhantomData,
-        })
-    }
-
-    /// Get a mutable reference to the Request headers.
-    #[inline]
-    pub fn headers_mut(&mut self) -> &mut Headers { &mut self.headers }
-}
-
-
-
-impl Request<Streaming> {
-    /// Completes writing the request, and returns a response to read from.
-    ///
-    /// Consumes the Request.
-    pub fn send(self) -> ::Result<Response> {
-        Response::with_message(self.url, self.message)
-    }
-}
-
-impl Write for Request<Streaming> {
-    #[inline]
-    fn write(&mut self, msg: &[u8]) -> io::Result<usize> {
-        match self.message.write(msg) {
-            Ok(n) => Ok(n),
-            Err(e) => {
-                let _ = self.message.close_connection();
-                Err(e)
-            }
-        }
-    }
-
-    #[inline]
-    fn flush(&mut self) -> io::Result<()> {
-        match self.message.flush() {
-            Ok(r) => Ok(r),
-            Err(e) => {
-                let _ = self.message.close_connection();
-                Err(e)
-            }
-        }
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use std::io::Write;
-    use std::str::from_utf8;
-    use url::Url;
-    use method::Method::{Get, Head, Post};
-    use mock::{MockStream, MockConnector};
-    use net::Fresh;
-    use header::{ContentLength,TransferEncoding,Encoding};
-    use url::form_urlencoded;
-    use super::Request;
-    use http::h1::Http11Message;
-
-    fn run_request(req: Request<Fresh>) -> Vec<u8> {
-        let req = req.start().unwrap();
-        let message = req.message;
-        let mut message = message.downcast::<Http11Message>().ok().unwrap();
-        message.flush_outgoing().unwrap();
-        let stream = *message
-            .into_inner().downcast::<MockStream>().ok().unwrap();
-        stream.write
-    }
-
-    fn assert_no_body(s: &str) {
-        assert!(!s.contains("Content-Length:"));
-        assert!(!s.contains("Transfer-Encoding:"));
-    }
-
-    #[test]
-    fn test_get_empty_body() {
-        let req = Request::with_connector(
-            Get, Url::parse("http://example.dom").unwrap(), &mut MockConnector
-        ).unwrap();
-        let bytes = run_request(req);
-        let s = from_utf8(&bytes[..]).unwrap();
-        assert_no_body(s);
-    }
-
-    #[test]
-    fn test_head_empty_body() {
-        let req = Request::with_connector(
-            Head, Url::parse("http://example.dom").unwrap(), &mut MockConnector
-        ).unwrap();
-        let bytes = run_request(req);
-        let s = from_utf8(&bytes[..]).unwrap();
-        assert_no_body(s);
-    }
-
-    #[test]
-    fn test_url_query() {
-        let url = Url::parse("http://example.dom?q=value").unwrap();
-        let req = Request::with_connector(
-            Get, url, &mut MockConnector
-        ).unwrap();
-        let bytes = run_request(req);
-        let s = from_utf8(&bytes[..]).unwrap();
-        assert!(s.contains("?q=value"));
-    }
-
-    #[test]
-    fn test_post_content_length() {
-        let url = Url::parse("http://example.dom").unwrap();
-        let mut req = Request::with_connector(
-            Post, url, &mut MockConnector
-        ).unwrap();
-        let mut body = String::new();
-        form_urlencoded::Serializer::new(&mut body).append_pair("q", "value");
-        req.headers_mut().set(ContentLength(body.len() as u64));
-        let bytes = run_request(req);
-        let s = from_utf8(&bytes[..]).unwrap();
-        assert!(s.contains("Content-Length:"));
-    }
-
-    #[test]
-    fn test_post_chunked() {
-        let url = Url::parse("http://example.dom").unwrap();
-        let req = Request::with_connector(
-            Post, url, &mut MockConnector
-        ).unwrap();
-        let bytes = run_request(req);
-        let s = from_utf8(&bytes[..]).unwrap();
-        assert!(!s.contains("Content-Length:"));
-    }
-
-    #[test]
-    fn test_host_header() {
-        let url = Url::parse("http://example.dom").unwrap();
-        let req = Request::with_connector(
-            Get, url, &mut MockConnector
-        ).unwrap();
-        let bytes = run_request(req);
-        let s = from_utf8(&bytes[..]).unwrap();
-        assert!(s.contains("Host: example.dom"));
-    }
-
-    #[test]
-    fn test_proxy() {
-        let url = Url::parse("http://example.dom").unwrap();
-        let mut req = Request::with_connector(
-            Get, url, &mut MockConnector
-        ).unwrap();
-        req.message.set_proxied(true);
-        let bytes = run_request(req);
-        let s = from_utf8(&bytes[..]).unwrap();
-        let request_line = "GET http://example.dom/ HTTP/1.1";
-        assert_eq!(&s[..request_line.len()], request_line);
-        assert!(s.contains("Host: example.dom"));
-    }
-
-    #[test]
-    fn test_post_chunked_with_encoding() {
-        let url = Url::parse("http://example.dom").unwrap();
-        let mut req = Request::with_connector(
-            Post, url, &mut MockConnector
-        ).unwrap();
-        req.headers_mut().set(TransferEncoding(vec![Encoding::Chunked]));
-        let bytes = run_request(req);
-        let s = from_utf8(&bytes[..]).unwrap();
-        assert!(!s.contains("Content-Length:"));
-        assert!(s.contains("Transfer-Encoding:"));
-    }
-
-    #[test]
-    fn test_write_error_closes() {
-        let url = Url::parse("http://hyper.rs").unwrap();
-        let req = Request::with_connector(
-            Get, url, &mut MockConnector
-        ).unwrap();
-        let mut req = req.start().unwrap();
-
-        req.message.downcast_mut::<Http11Message>().unwrap()
-            .get_mut().downcast_mut::<MockStream>().unwrap()
-            .error_on_write = true;
-
-        req.write(b"foo").unwrap();
-        assert!(req.flush().is_err());
-
-        assert!(req.message.downcast_ref::<Http11Message>().unwrap()
-            .get_ref().downcast_ref::<MockStream>().unwrap()
-            .is_closed);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/client/response.rs
+++ /dev/null
@@ -1,239 +0,0 @@
-//! Client Responses
-use std::io::{self, Read};
-
-use url::Url;
-
-use header;
-use net::NetworkStream;
-use http::{self, RawStatus, ResponseHead, HttpMessage};
-use http::h1::Http11Message;
-use status;
-use version;
-
-/// A response for a client request to a remote server.
-#[derive(Debug)]
-pub struct Response {
-    /// The status from the server.
-    pub status: status::StatusCode,
-    /// The headers from the server.
-    pub headers: header::Headers,
-    /// The HTTP version of this response from the server.
-    pub version: version::HttpVersion,
-    /// The final URL of this response.
-    pub url: Url,
-    status_raw: RawStatus,
-    message: Box<HttpMessage>,
-}
-
-impl Response {
-    /// Creates a new response from a server.
-    pub fn new(url: Url, stream: Box<NetworkStream + Send>) -> ::Result<Response> {
-        trace!("Response::new");
-        Response::with_message(url, Box::new(Http11Message::with_stream(stream)))
-    }
-
-    /// Creates a new response received from the server on the given `HttpMessage`.
-    pub fn with_message(url: Url, mut message: Box<HttpMessage>) -> ::Result<Response> {
-        trace!("Response::with_message");
-        let ResponseHead { headers, raw_status, version } = match message.get_incoming() {
-            Ok(head) => head,
-            Err(e) => {
-                let _ = message.close_connection();
-                return Err(From::from(e));
-            }
-        };
-        let status = status::StatusCode::from_u16(raw_status.0);
-        debug!("version={:?}, status={:?}", version, status);
-        debug!("headers={:?}", headers);
-
-        Ok(Response {
-            status: status,
-            version: version,
-            headers: headers,
-            url: url,
-            status_raw: raw_status,
-            message: message,
-        })
-    }
-
-    /// Get the raw status code and reason.
-    #[inline]
-    pub fn status_raw(&self) -> &RawStatus {
-        &self.status_raw
-    }
-
-    /// Gets a borrowed reference to the underlying `HttpMessage`.
-    #[inline]
-    pub fn get_ref(&self) -> &HttpMessage {
-        &*self.message
-    }
-}
-
-/// Read the response body.
-impl Read for Response {
-    #[inline]
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        match self.message.read(buf) {
-            Err(e) => {
-                let _ = self.message.close_connection();
-                Err(e)
-            }
-            r => r
-        }
-    }
-}
-
-impl Drop for Response {
-    fn drop(&mut self) {
-        // if not drained, theres old bits in the Reader. we can't reuse this,
-        // since those old bits would end up in new Responses
-        //
-        // otherwise, the response has been drained. we should check that the
-        // server has agreed to keep the connection open
-        let is_drained = !self.message.has_body();
-        trace!("Response.drop is_drained={}", is_drained);
-        if !(is_drained && http::should_keep_alive(self.version, &self.headers)) {
-            trace!("Response.drop closing connection");
-            if let Err(e) = self.message.close_connection() {
-                error!("Response.drop error closing connection: {}", e);
-            }
-        }
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use std::io::{self, Read};
-
-    use url::Url;
-
-    use header::TransferEncoding;
-    use header::Encoding;
-    use http::HttpMessage;
-    use mock::MockStream;
-    use status;
-    use version;
-    use http::h1::Http11Message;
-
-    use super::Response;
-
-    fn read_to_string(mut r: Response) -> io::Result<String> {
-        let mut s = String::new();
-        try!(r.read_to_string(&mut s));
-        Ok(s)
-    }
-
-
-    #[test]
-    fn test_into_inner() {
-        let message: Box<HttpMessage> = Box::new(
-            Http11Message::with_stream(Box::new(MockStream::new())));
-        let message = message.downcast::<Http11Message>().ok().unwrap();
-        let b = message.into_inner().downcast::<MockStream>().ok().unwrap();
-        assert_eq!(b, Box::new(MockStream::new()));
-    }
-
-    #[test]
-    fn test_parse_chunked_response() {
-        let stream = MockStream::with_input(b"\
-            HTTP/1.1 200 OK\r\n\
-            Transfer-Encoding: chunked\r\n\
-            \r\n\
-            1\r\n\
-            q\r\n\
-            2\r\n\
-            we\r\n\
-            2\r\n\
-            rt\r\n\
-            0\r\n\
-            \r\n"
-        );
-
-        let url = Url::parse("http://hyper.rs").unwrap();
-        let res = Response::new(url, Box::new(stream)).unwrap();
-
-        // The status line is correct?
-        assert_eq!(res.status, status::StatusCode::Ok);
-        assert_eq!(res.version, version::HttpVersion::Http11);
-        // The header is correct?
-        match res.headers.get::<TransferEncoding>() {
-            Some(encodings) => {
-                assert_eq!(1, encodings.len());
-                assert_eq!(Encoding::Chunked, encodings[0]);
-            },
-            None => panic!("Transfer-Encoding: chunked expected!"),
-        };
-        // The body is correct?
-        assert_eq!(read_to_string(res).unwrap(), "qwert".to_owned());
-    }
-
-    /// Tests that when a chunk size is not a valid radix-16 number, an error
-    /// is returned.
-    #[test]
-    fn test_invalid_chunk_size_not_hex_digit() {
-        let stream = MockStream::with_input(b"\
-            HTTP/1.1 200 OK\r\n\
-            Transfer-Encoding: chunked\r\n\
-            \r\n\
-            X\r\n\
-            1\r\n\
-            0\r\n\
-            \r\n"
-        );
-
-        let url = Url::parse("http://hyper.rs").unwrap();
-        let res = Response::new(url, Box::new(stream)).unwrap();
-
-        assert!(read_to_string(res).is_err());
-    }
-
-    /// Tests that when a chunk size contains an invalid extension, an error is
-    /// returned.
-    #[test]
-    fn test_invalid_chunk_size_extension() {
-        let stream = MockStream::with_input(b"\
-            HTTP/1.1 200 OK\r\n\
-            Transfer-Encoding: chunked\r\n\
-            \r\n\
-            1 this is an invalid extension\r\n\
-            1\r\n\
-            0\r\n\
-            \r\n"
-        );
-
-        let url = Url::parse("http://hyper.rs").unwrap();
-        let res = Response::new(url, Box::new(stream)).unwrap();
-
-        assert!(read_to_string(res).is_err());
-    }
-
-    /// Tests that when a valid extension that contains a digit is appended to
-    /// the chunk size, the chunk is correctly read.
-    #[test]
-    fn test_chunk_size_with_extension() {
-        let stream = MockStream::with_input(b"\
-            HTTP/1.1 200 OK\r\n\
-            Transfer-Encoding: chunked\r\n\
-            \r\n\
-            1;this is an extension with a digit 1\r\n\
-            1\r\n\
-            0\r\n\
-            \r\n"
-        );
-
-        let url = Url::parse("http://hyper.rs").unwrap();
-        let res = Response::new(url, Box::new(stream)).unwrap();
-
-        assert_eq!(read_to_string(res).unwrap(), "1".to_owned());
-    }
-
-    #[test]
-    fn test_parse_error_closes() {
-        let url = Url::parse("http://hyper.rs").unwrap();
-        let stream = MockStream::with_input(b"\
-            definitely not http
-        ");
-
-        assert!(Response::new(url, Box::new(stream)).is_err());
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/error.rs
+++ /dev/null
@@ -1,219 +0,0 @@
-//! Error and Result module.
-use std::error::Error as StdError;
-use std::fmt;
-use std::io::Error as IoError;
-use std::str::Utf8Error;
-use std::string::FromUtf8Error;
-
-use httparse;
-use url;
-
-#[cfg(feature = "openssl")]
-use openssl::ssl::error::SslError;
-
-use self::Error::{
-    Method,
-    Uri,
-    Version,
-    Header,
-    Status,
-    Io,
-    Ssl,
-    TooLarge,
-    Utf8
-};
-
-pub use url::ParseError;
-
-/// Result type often returned from methods that can have hyper `Error`s.
-pub type Result<T> = ::std::result::Result<T, Error>;
-
-/// A set of errors that can occur parsing HTTP streams.
-#[derive(Debug)]
-pub enum Error {
-    /// An invalid `Method`, such as `GE,T`.
-    Method,
-    /// An invalid `RequestUri`, such as `exam ple.domain`.
-    Uri(url::ParseError),
-    /// An invalid `HttpVersion`, such as `HTP/1.1`
-    Version,
-    /// An invalid `Header`.
-    Header,
-    /// A message head is too large to be reasonable.
-    TooLarge,
-    /// An invalid `Status`, such as `1337 ELITE`.
-    Status,
-    /// An `io::Error` that occurred while trying to read or write to a network stream.
-    Io(IoError),
-    /// An error from a SSL library.
-    Ssl(Box<StdError + Send + Sync>),
-    /// Parsing a field as string failed
-    Utf8(Utf8Error),
-
-    #[doc(hidden)]
-    __Nonexhaustive(Void)
-}
-
-#[doc(hidden)]
-pub struct Void(());
-
-impl fmt::Debug for Void {
-    fn fmt(&self, _: &mut fmt::Formatter) -> fmt::Result {
-        unreachable!()
-    }
-}
-
-impl fmt::Display for Error {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            Uri(ref e) => fmt::Display::fmt(e, f),
-            Io(ref e) => fmt::Display::fmt(e, f),
-            Ssl(ref e) => fmt::Display::fmt(e, f),
-            Utf8(ref e) => fmt::Display::fmt(e, f),
-            ref e => f.write_str(e.description()),
-        }
-    }
-}
-
-impl StdError for Error {
-    fn description(&self) -> &str {
-        match *self {
-            Method => "Invalid Method specified",
-            Version => "Invalid HTTP version specified",
-            Header => "Invalid Header provided",
-            TooLarge => "Message head is too large",
-            Status => "Invalid Status provided",
-            Uri(ref e) => e.description(),
-            Io(ref e) => e.description(),
-            Ssl(ref e) => e.description(),
-            Utf8(ref e) => e.description(),
-            Error::__Nonexhaustive(..) =>  unreachable!(),
-        }
-    }
-
-    fn cause(&self) -> Option<&StdError> {
-        match *self {
-            Io(ref error) => Some(error),
-            Ssl(ref error) => Some(&**error),
-            Uri(ref error) => Some(error),
-            Utf8(ref error) => Some(error),
-            _ => None,
-        }
-    }
-}
-
-impl From<IoError> for Error {
-    fn from(err: IoError) -> Error {
-        Io(err)
-    }
-}
-
-impl From<url::ParseError> for Error {
-    fn from(err: url::ParseError) -> Error {
-        Uri(err)
-    }
-}
-
-#[cfg(feature = "openssl")]
-impl From<SslError> for Error {
-    fn from(err: SslError) -> Error {
-        match err {
-            SslError::StreamError(err) => Io(err),
-            err => Ssl(Box::new(err)),
-        }
-    }
-}
-
-impl From<Utf8Error> for Error {
-    fn from(err: Utf8Error) -> Error {
-        Utf8(err)
-    }
-}
-
-impl From<FromUtf8Error> for Error {
-    fn from(err: FromUtf8Error) -> Error {
-        Utf8(err.utf8_error())
-    }
-}
-
-impl From<httparse::Error> for Error {
-    fn from(err: httparse::Error) -> Error {
-        match err {
-            httparse::Error::HeaderName => Header,
-            httparse::Error::HeaderValue => Header,
-            httparse::Error::NewLine => Header,
-            httparse::Error::Status => Status,
-            httparse::Error::Token => Header,
-            httparse::Error::TooManyHeaders => TooLarge,
-            httparse::Error::Version => Version,
-        }
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use std::error::Error as StdError;
-    use std::io;
-    use httparse;
-    use url;
-    use super::Error;
-    use super::Error::*;
-
-    #[test]
-    fn test_cause() {
-        let orig = io::Error::new(io::ErrorKind::Other, "other");
-        let desc = orig.description().to_owned();
-        let e = Io(orig);
-        assert_eq!(e.cause().unwrap().description(), desc);
-    }
-
-    macro_rules! from {
-        ($from:expr => $error:pat) => {
-            match Error::from($from) {
-                e @ $error => {
-                    assert!(e.description().len() > 5);
-                } ,
-                _ => panic!("{:?}", $from)
-            }
-        }
-    }
-
-    macro_rules! from_and_cause {
-        ($from:expr => $error:pat) => {
-            match Error::from($from) {
-                e @ $error => {
-                    let desc = e.cause().unwrap().description();
-                    assert_eq!(desc, $from.description().to_owned());
-                    assert_eq!(desc, e.description());
-                },
-                _ => panic!("{:?}", $from)
-            }
-        }
-    }
-
-    #[test]
-    fn test_from() {
-
-        from_and_cause!(io::Error::new(io::ErrorKind::Other, "other") => Io(..));
-        from_and_cause!(url::ParseError::EmptyHost => Uri(..));
-
-        from!(httparse::Error::HeaderName => Header);
-        from!(httparse::Error::HeaderName => Header);
-        from!(httparse::Error::HeaderValue => Header);
-        from!(httparse::Error::NewLine => Header);
-        from!(httparse::Error::Status => Status);
-        from!(httparse::Error::Token => Header);
-        from!(httparse::Error::TooManyHeaders => TooLarge);
-        from!(httparse::Error::Version => Version);
-    }
-
-    #[cfg(feature = "openssl")]
-    #[test]
-    fn test_from_ssl() {
-        use openssl::ssl::error::SslError;
-
-        from!(SslError::StreamError(
-            io::Error::new(io::ErrorKind::Other, "ssl negotiation")) => Io(..));
-        from_and_cause!(SslError::SslSessionClosed => Ssl(..));
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/accept.rs
+++ /dev/null
@@ -1,143 +0,0 @@
-use mime::Mime;
-
-use header::{QualityItem, qitem};
-
-header! {
-    /// `Accept` header, defined in [RFC7231](http://tools.ietf.org/html/rfc7231#section-5.3.2)
-    ///
-    /// The `Accept` header field can be used by user agents to specify
-    /// response media types that are acceptable.  Accept header fields can
-    /// be used to indicate that the request is specifically limited to a
-    /// small set of desired types, as in the case of a request for an
-    /// in-line image
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Accept = #( media-range [ accept-params ] )
-    ///
-    /// media-range    = ( "*/*"
-    ///                  / ( type "/" "*" )
-    ///                  / ( type "/" subtype )
-    ///                  ) *( OWS ";" OWS parameter )
-    /// accept-params  = weight *( accept-ext )
-    /// accept-ext = OWS ";" OWS token [ "=" ( token / quoted-string ) ]
-    /// ```
-    ///
-    /// # Example values
-    /// * `audio/*; q=0.2, audio/basic` (`*` value won't parse correctly)
-    /// * `text/plain; q=0.5, text/html, text/x-dvi; q=0.8, text/x-c`
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, Accept, qitem};
-    /// use hyper::mime::{Mime, TopLevel, SubLevel};
-    ///
-    /// let mut headers = Headers::new();
-    ///
-    /// headers.set(
-    ///     Accept(vec![
-    ///         qitem(Mime(TopLevel::Text, SubLevel::Html, vec![])),
-    ///     ])
-    /// );
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, Accept, qitem};
-    /// use hyper::mime::{Mime, TopLevel, SubLevel, Attr, Value};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     Accept(vec![
-    ///         qitem(Mime(TopLevel::Application, SubLevel::Json,
-    ///                    vec![(Attr::Charset, Value::Utf8)])),
-    ///     ])
-    /// );
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, Accept, QualityItem, Quality, qitem};
-    /// use hyper::mime::{Mime, TopLevel, SubLevel};
-    ///
-    /// let mut headers = Headers::new();
-    ///
-    /// headers.set(
-    ///     Accept(vec![
-    ///         qitem(Mime(TopLevel::Text, SubLevel::Html, vec![])),
-    ///         qitem(Mime(TopLevel::Application,
-    ///                    SubLevel::Ext("xhtml+xml".to_owned()), vec![])),
-    ///         QualityItem::new(Mime(TopLevel::Application, SubLevel::Xml, vec![]),
-    ///                          Quality(900)),
-    ///                          qitem(Mime(TopLevel::Image,
-    ///                                     SubLevel::Ext("webp".to_owned()), vec![])),
-    ///                          QualityItem::new(Mime(TopLevel::Star, SubLevel::Star, vec![]),
-    ///                                           Quality(800))
-    ///     ])
-    /// );
-    /// ```
-    ///
-    /// # Notes
-    /// * Using always Mime types to represent `media-range` differs from the ABNF.
-    /// * **FIXME**: `accept-ext` is not supported.
-    (Accept, "Accept") => (QualityItem<Mime>)+
-
-    test_accept {
-        // Tests from the RFC
-        // FIXME: Test fails, first value containing a "*" fails to parse
-        // test_header!(
-        //    test1,
-        //    vec![b"audio/*; q=0.2, audio/basic"],
-        //    Some(HeaderField(vec![
-        //        QualityItem::new(Mime(TopLevel::Audio, SubLevel::Star, vec![]), Quality(200)),
-        //        qitem(Mime(TopLevel::Audio, SubLevel::Ext("basic".to_owned()), vec![])),
-        //        ])));
-        test_header!(
-            test2,
-            vec![b"text/plain; q=0.5, text/html, text/x-dvi; q=0.8, text/x-c"],
-            Some(HeaderField(vec![
-                QualityItem::new(Mime(TopLevel::Text, SubLevel::Plain, vec![]), Quality(500)),
-                qitem(Mime(TopLevel::Text, SubLevel::Html, vec![])),
-                QualityItem::new(
-                    Mime(TopLevel::Text, SubLevel::Ext("x-dvi".to_owned()), vec![]),
-                    Quality(800)),
-                qitem(Mime(TopLevel::Text, SubLevel::Ext("x-c".to_owned()), vec![])),
-                ])));
-        // Custom tests
-        test_header!(
-            test3,
-            vec![b"text/plain; charset=utf-8"],
-            Some(Accept(vec![
-                qitem(Mime(TopLevel::Text, SubLevel::Plain, vec![(Attr::Charset, Value::Utf8)])),
-                ])));
-        test_header!(
-            test4,
-            vec![b"text/plain; charset=utf-8; q=0.5"],
-            Some(Accept(vec![
-                QualityItem::new(Mime(TopLevel::Text,
-                    SubLevel::Plain, vec![(Attr::Charset, Value::Utf8)]),
-                    Quality(500)),
-            ])));
-    }
-}
-
-impl Accept {
-    /// A constructor to easily create `Accept: */*`.
-    pub fn star() -> Accept {
-        Accept(vec![qitem(mime!(Star/Star))])
-    }
-
-    /// A constructor to easily create `Accept: application/json`.
-    pub fn json() -> Accept {
-        Accept(vec![qitem(mime!(Application/Json))])
-    }
-
-    /// A constructor to easily create `Accept: text/*`.
-    pub fn text() -> Accept {
-        Accept(vec![qitem(mime!(Text/Star))])
-    }
-
-    /// A constructor to easily create `Accept: image/*`.
-    pub fn image() -> Accept {
-        Accept(vec![qitem(mime!(Image/Star))])
-    }
-}
-
-
-bench_header!(bench, Accept, { vec![b"text/plain; q=0.5, text/html".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/accept_charset.rs
+++ /dev/null
@@ -1,56 +0,0 @@
-use header::{Charset, QualityItem};
-
-header! {
-    /// `Accept-Charset` header, defined in
-    /// [RFC7231](http://tools.ietf.org/html/rfc7231#section-5.3.3)
-    ///
-    /// The `Accept-Charset` header field can be sent by a user agent to
-    /// indicate what charsets are acceptable in textual response content.
-    /// This field allows user agents capable of understanding more
-    /// comprehensive or special-purpose charsets to signal that capability
-    /// to an origin server that is capable of representing information in
-    /// those charsets.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Accept-Charset = 1#( ( charset / "*" ) [ weight ] )
-    /// ```
-    ///
-    /// # Example values
-    /// * `iso-8859-5, unicode-1-1;q=0.8`
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, AcceptCharset, Charset, qitem};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AcceptCharset(vec![qitem(Charset::Us_Ascii)])
-    /// );
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, AcceptCharset, Charset, Quality, QualityItem};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AcceptCharset(vec![
-    ///         QualityItem::new(Charset::Us_Ascii, Quality(900)),
-    ///         QualityItem::new(Charset::Iso_8859_10, Quality(200)),
-    ///     ])
-    /// );
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, AcceptCharset, Charset, qitem};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AcceptCharset(vec![qitem(Charset::Ext("utf-8".to_owned()))])
-    /// );
-    /// ```
-    (AcceptCharset, "Accept-Charset") => (QualityItem<Charset>)+
-
-    test_accept_charset {
-        /// Testcase from RFC
-        test_header!(test1, vec![b"iso-8859-5, unicode-1-1;q=0.8"]);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/accept_encoding.rs
+++ /dev/null
@@ -1,71 +0,0 @@
-use header::{Encoding, QualityItem};
-
-header! {
-    /// `Accept-Encoding` header, defined in
-    /// [RFC7231](http://tools.ietf.org/html/rfc7231#section-5.3.4)
-    ///
-    /// The `Accept-Encoding` header field can be used by user agents to
-    /// indicate what response content-codings are
-    /// acceptable in the response.  An  `identity` token is used as a synonym
-    /// for "no encoding" in order to communicate when no encoding is
-    /// preferred.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Accept-Encoding  = #( codings [ weight ] )
-    /// codings          = content-coding / "identity" / "*"
-    /// ```
-    ///
-    /// # Example values
-    /// * `compress, gzip`
-    /// * ``
-    /// * `*`
-    /// * `compress;q=0.5, gzip;q=1`
-    /// * `gzip;q=1.0, identity; q=0.5, *;q=0`
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, AcceptEncoding, Encoding, qitem};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AcceptEncoding(vec![qitem(Encoding::Chunked)])
-    /// );
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, AcceptEncoding, Encoding, qitem};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AcceptEncoding(vec![
-    ///         qitem(Encoding::Chunked),
-    ///         qitem(Encoding::Gzip),
-    ///         qitem(Encoding::Deflate),
-    ///     ])
-    /// );
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, AcceptEncoding, Encoding, QualityItem, Quality, qitem};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AcceptEncoding(vec![
-    ///         qitem(Encoding::Chunked),
-    ///         QualityItem::new(Encoding::Gzip, Quality(600)),
-    ///         QualityItem::new(Encoding::EncodingExt("*".to_owned()), Quality(0)),
-    ///     ])
-    /// );
-    /// ```
-    (AcceptEncoding, "Accept-Encoding") => (QualityItem<Encoding>)*
-
-    test_accept_encoding {
-        // From the RFC
-        test_header!(test1, vec![b"compress, gzip"]);
-        test_header!(test2, vec![b""], Some(AcceptEncoding(vec![])));
-        test_header!(test3, vec![b"*"]);
-        // Note: Removed quality 1 from gzip
-        test_header!(test4, vec![b"compress;q=0.5, gzip"]);
-        // Note: Removed quality 1 from gzip
-        test_header!(test5, vec![b"gzip, identity; q=0.5, *;q=0"]);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/accept_language.rs
+++ /dev/null
@@ -1,70 +0,0 @@
-use language_tags::LanguageTag;
-use header::QualityItem;
-
-header! {
-    /// `Accept-Language` header, defined in
-    /// [RFC7231](http://tools.ietf.org/html/rfc7231#section-5.3.5)
-    ///
-    /// The `Accept-Language` header field can be used by user agents to
-    /// indicate the set of natural languages that are preferred in the
-    /// response.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Accept-Language = 1#( language-range [ weight ] )
-    /// language-range  = <language-range, see [RFC4647], Section 2.1>
-    /// ```
-    ///
-    /// # Example values
-    /// * `da, en-gb;q=0.8, en;q=0.7`
-    /// * `en-us;q=1.0, en;q=0.5, fr`
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::LanguageTag;
-    /// use hyper::header::{Headers, AcceptLanguage, qitem};
-    ///
-    /// let mut headers = Headers::new();
-    /// let mut langtag: LanguageTag = Default::default();
-    /// langtag.language = Some("en".to_owned());
-    /// langtag.region = Some("US".to_owned());
-    /// headers.set(
-    ///     AcceptLanguage(vec![
-    ///         qitem(langtag),
-    ///     ])
-    /// );
-    /// ```
-    /// ```
-    /// # extern crate hyper;
-    /// # #[macro_use] extern crate language_tags;
-    /// # use hyper::header::{Headers, AcceptLanguage, QualityItem, Quality, qitem};
-    /// #
-    /// # fn main() {
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AcceptLanguage(vec![
-    ///         qitem(langtag!(da)),
-    ///         QualityItem::new(langtag!(en;;;GB), Quality(800)),
-    ///         QualityItem::new(langtag!(en), Quality(700)),
-    ///     ])
-    /// );
-    /// # }
-    /// ```
-    (AcceptLanguage, "Accept-Language") => (QualityItem<LanguageTag>)+
-
-    test_accept_language {
-        // From the RFC
-        test_header!(test1, vec![b"da, en-gb;q=0.8, en;q=0.7"]);
-        // Own test
-        test_header!(
-            test2, vec![b"en-US, en; q=0.5, fr"],
-            Some(AcceptLanguage(vec![
-                qitem(langtag!(en;;;US)),
-                QualityItem::new(langtag!(en), Quality(500)),
-                qitem(langtag!(fr)),
-        ])));
-    }
-}
-
-bench_header!(bench, AcceptLanguage,
-              { vec![b"en-us;q=1.0, en;q=0.5, fr".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/accept_ranges.rs
+++ /dev/null
@@ -1,101 +0,0 @@
-use std::fmt::{self, Display};
-use std::str::FromStr;
-
-header! {
-    /// `Accept-Ranges` header, defined in
-    /// [RFC7233](http://tools.ietf.org/html/rfc7233#section-2.3)
-    ///
-    /// The `Accept-Ranges` header field allows a server to indicate that it
-    /// supports range requests for the target resource.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Accept-Ranges     = acceptable-ranges
-    /// acceptable-ranges = 1#range-unit / \"none\"
-    ///
-    /// # Example values
-    /// * `bytes`
-    /// * `none`
-    /// * `unknown-unit`
-    /// ```
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, AcceptRanges, RangeUnit};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(AcceptRanges(vec![RangeUnit::Bytes]));
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, AcceptRanges, RangeUnit};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(AcceptRanges(vec![RangeUnit::None]));
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, AcceptRanges, RangeUnit};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AcceptRanges(vec![
-    ///         RangeUnit::Unregistered("nibbles".to_owned()),
-    ///         RangeUnit::Bytes,
-    ///         RangeUnit::Unregistered("doublets".to_owned()),
-    ///         RangeUnit::Unregistered("quadlets".to_owned()),
-    ///     ])
-    /// );
-    /// ```
-    (AcceptRanges, "Accept-Ranges") => (RangeUnit)+
-
-    test_acccept_ranges {
-        test_header!(test1, vec![b"bytes"]);
-        test_header!(test2, vec![b"none"]);
-        test_header!(test3, vec![b"unknown-unit"]);
-        test_header!(test4, vec![b"bytes, unknown-unit"]);
-    }
-}
-
-/// Range Units, described in [RFC7233](http://tools.ietf.org/html/rfc7233#section-2)
-///
-/// A representation can be partitioned into subranges according to
-/// various structural units, depending on the structure inherent in the
-/// representation's media type.
-///
-/// # ABNF
-/// ```plain
-/// range-unit       = bytes-unit / other-range-unit
-/// bytes-unit       = "bytes"
-/// other-range-unit = token
-/// ```
-#[derive(Clone, Debug, Eq, PartialEq)]
-pub enum RangeUnit {
-    /// Indicating byte-range requests are supported.
-    Bytes,
-    /// Reserved as keyword, indicating no ranges are supported.
-    None,
-    /// The given range unit is not registered at IANA.
-    Unregistered(String),
-}
-
-
-impl FromStr for RangeUnit {
-    type Err = ::Error;
-    fn from_str(s: &str) -> ::Result<Self> {
-        match s {
-            "bytes" => Ok(RangeUnit::Bytes),
-            "none" => Ok(RangeUnit::None),
-            // FIXME: Check if s is really a Token
-            _ => Ok(RangeUnit::Unregistered(s.to_owned())),
-        }
-    }
-}
-
-impl Display for RangeUnit {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            RangeUnit::Bytes => f.write_str("bytes"),
-            RangeUnit::None => f.write_str("none"),
-            RangeUnit::Unregistered(ref x) => f.write_str(&x),
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/access_control_allow_credentials.rs
+++ /dev/null
@@ -1,89 +0,0 @@
-use std::fmt::{self, Display};
-use std::str;
-use unicase::UniCase;
-use header::{Header, HeaderFormat};
-
-/// `Access-Control-Allow-Credentials` header, part of
-/// [CORS](http://www.w3.org/TR/cors/#access-control-allow-headers-response-header)
-///
-/// > The Access-Control-Allow-Credentials HTTP response header indicates whether the
-/// > response to request can be exposed when the credentials flag is true. When part
-/// > of the response to an preflight request it indicates that the actual request can
-/// > be made with credentials. The Access-Control-Allow-Credentials HTTP header must
-/// > match the following ABNF:
-///
-/// # ABNF
-/// ```plain
-/// Access-Control-Allow-Credentials: "Access-Control-Allow-Credentials" ":" "true"
-/// ```
-///
-/// Since there is only one acceptable field value, the header struct does not accept
-/// any values at all. Setting an empty `AccessControlAllowCredentials` header is
-/// sufficient. See the examples below.
-///
-/// # Example values
-/// * "true"
-///
-/// # Examples
-/// ```
-/// # extern crate hyper;
-/// # fn main() {
-///
-/// use hyper::header::{Headers, AccessControlAllowCredentials};
-///
-/// let mut headers = Headers::new();
-/// headers.set(AccessControlAllowCredentials);
-/// # }
-/// ```
-#[derive(Clone, PartialEq, Debug)]
-pub struct AccessControlAllowCredentials;
-
-const ACCESS_CONTROL_ALLOW_CREDENTIALS_TRUE: UniCase<&'static str> = UniCase("true");
-
-impl Header for AccessControlAllowCredentials {
-    fn header_name() -> &'static str {
-        "Access-Control-Allow-Credentials"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<AccessControlAllowCredentials> {
-        if raw.len() == 1 {
-            let text = unsafe {
-                // safe because:
-                // 1. we just checked raw.len == 1
-                // 2. we don't actually care if it's utf8, we just want to
-                //    compare the bytes with the "case" normalized. If it's not
-                //    utf8, then the byte comparison will fail, and we'll return
-                //    None. No big deal.
-                str::from_utf8_unchecked(raw.get_unchecked(0))
-            };
-            if UniCase(text) == ACCESS_CONTROL_ALLOW_CREDENTIALS_TRUE {
-                return Ok(AccessControlAllowCredentials);
-            }
-        }
-        Err(::Error::Header)
-    }
-}
-
-impl HeaderFormat for AccessControlAllowCredentials {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.write_str("true")
-    }
-}
-
-impl Display for AccessControlAllowCredentials {
-    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
-        self.fmt_header(f)
-    }
-}
-
-#[cfg(test)]
-mod test_access_control_allow_credentials {
-    use std::str;
-    use header::*;
-    use super::AccessControlAllowCredentials as HeaderField;
-    test_header!(works,        vec![b"true"], Some(HeaderField));
-    test_header!(ignores_case, vec![b"True"]);
-    test_header!(not_bool,     vec![b"false"], None);
-    test_header!(only_single,  vec![b"true", b"true"], None);
-    test_header!(no_gibberish, vec!["\u{645}\u{631}\u{62d}\u{628}\u{627}".as_bytes()], None);
-}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/access_control_allow_headers.rs
+++ /dev/null
@@ -1,58 +0,0 @@
-use unicase::UniCase;
-
-header! {
-    /// `Access-Control-Allow-Headers` header, part of
-    /// [CORS](http://www.w3.org/TR/cors/#access-control-allow-headers-response-header)
-    ///
-    /// The `Access-Control-Allow-Headers` header indicates, as part of the
-    /// response to a preflight request, which header field names can be used
-    /// during the actual request.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Access-Control-Allow-Headers: "Access-Control-Allow-Headers" ":" #field-name
-    /// ```
-    ///
-    /// # Example values
-    /// * `accept-language, date`
-    ///
-    /// # Examples
-    /// ```
-    /// # extern crate hyper;
-    /// # extern crate unicase;
-    /// # fn main() {
-    /// // extern crate unicase;
-    ///
-    /// use hyper::header::{Headers, AccessControlAllowHeaders};
-    /// use unicase::UniCase;
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AccessControlAllowHeaders(vec![UniCase("date".to_owned())])
-    /// );
-    /// # }
-    /// ```
-    /// ```
-    /// # extern crate hyper;
-    /// # extern crate unicase;
-    /// # fn main() {
-    /// // extern crate unicase;
-    ///
-    /// use hyper::header::{Headers, AccessControlAllowHeaders};
-    /// use unicase::UniCase;
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AccessControlAllowHeaders(vec![
-    ///         UniCase("accept-language".to_owned()),
-    ///         UniCase("date".to_owned()),
-    ///     ])
-    /// );
-    /// # }
-    /// ```
-    (AccessControlAllowHeaders, "Access-Control-Allow-Headers") => (UniCase<String>)*
-
-    test_access_control_allow_headers {
-        test_header!(test1, vec![b"accept-language, date"]);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/access_control_allow_methods.rs
+++ /dev/null
@@ -1,48 +0,0 @@
-use method::Method;
-
-header! {
-    /// `Access-Control-Allow-Methods` header, part of
-    /// [CORS](http://www.w3.org/TR/cors/#access-control-allow-methods-response-header)
-    ///
-    /// The `Access-Control-Allow-Methods` header indicates, as part of the
-    /// response to a preflight request, which methods can be used during the
-    /// actual request.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Access-Control-Allow-Methods: "Access-Control-Allow-Methods" ":" #Method
-    /// ```
-    ///
-    /// # Example values
-    /// * `PUT, DELETE, XMODIFY`
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, AccessControlAllowMethods};
-    /// use hyper::method::Method;
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AccessControlAllowMethods(vec![Method::Get])
-    /// );
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, AccessControlAllowMethods};
-    /// use hyper::method::Method;
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AccessControlAllowMethods(vec![
-    ///         Method::Get,
-    ///         Method::Post,
-    ///         Method::Patch,
-    ///         Method::Extension("COPY".to_owned()),
-    ///     ])
-    /// );
-    /// ```
-    (AccessControlAllowMethods, "Access-Control-Allow-Methods") => (Method)*
-
-    test_access_control_allow_methods {
-        test_header!(test1, vec![b"PUT, DELETE, XMODIFY"]);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/access_control_allow_origin.rs
+++ /dev/null
@@ -1,98 +0,0 @@
-use std::fmt::{self, Display};
-
-use header::{Header, HeaderFormat};
-
-/// The `Access-Control-Allow-Origin` response header,
-/// part of [CORS](http://www.w3.org/TR/cors/#access-control-allow-origin-response-header)
-///
-/// The `Access-Control-Allow-Origin` header indicates whether a resource
-/// can be shared based by returning the value of the Origin request header,
-/// "*", or "null" in the response.
-///
-/// # ABNF
-/// ```plain
-/// Access-Control-Allow-Origin = "Access-Control-Allow-Origin" ":" origin-list-or-null | "*"
-/// ```
-///
-/// # Example values
-/// * `null`
-/// * `*`
-/// * `http://google.com/`
-///
-/// # Examples
-/// ```
-/// use hyper::header::{Headers, AccessControlAllowOrigin};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     AccessControlAllowOrigin::Any
-/// );
-/// ```
-/// ```
-/// use hyper::header::{Headers, AccessControlAllowOrigin};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     AccessControlAllowOrigin::Null,
-/// );
-/// ```
-/// ```
-/// use hyper::header::{Headers, AccessControlAllowOrigin};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     AccessControlAllowOrigin::Value("http://hyper.rs".to_owned())
-/// );
-/// ```
-#[derive(Clone, PartialEq, Debug)]
-pub enum AccessControlAllowOrigin {
-    /// Allow all origins
-    Any,
-    /// A hidden origin
-    Null,
-    /// Allow one particular origin
-    Value(String),
-}
-
-impl Header for AccessControlAllowOrigin {
-    fn header_name() -> &'static str {
-        "Access-Control-Allow-Origin"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<AccessControlAllowOrigin> {
-        if raw.len() != 1 {
-            return Err(::Error::Header)
-        }
-        let value = unsafe { raw.get_unchecked(0) };
-        Ok(match &value[..] {
-            b"*" => AccessControlAllowOrigin::Any,
-            b"null" => AccessControlAllowOrigin::Null,
-            _ => AccessControlAllowOrigin::Value(try!(String::from_utf8(value.clone())))
-        })
-    }
-}
-
-impl HeaderFormat for AccessControlAllowOrigin {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            AccessControlAllowOrigin::Any => f.write_str("*"),
-            AccessControlAllowOrigin::Null => f.write_str("null"),
-            AccessControlAllowOrigin::Value(ref url) => Display::fmt(url, f),
-        }
-    }
-}
-
-impl Display for AccessControlAllowOrigin {
-    fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
-        self.fmt_header(f)
-    }
-}
-
-#[cfg(test)]
-mod test_access_control_allow_orgin {
-    use header::*;
-    use super::AccessControlAllowOrigin as HeaderField;
-    test_header!(test1, vec![b"null"]);
-    test_header!(test2, vec![b"*"]);
-    test_header!(test3, vec![b"http://google.com/"]);
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/access_control_expose_headers.rs
+++ /dev/null
@@ -1,60 +0,0 @@
-use unicase::UniCase;
-
-header! {
-    /// `Access-Control-Expose-Headers` header, part of
-    /// [CORS](http://www.w3.org/TR/cors/#access-control-expose-headers-response-header)
-    ///
-    /// The Access-Control-Expose-Headers header indicates which headers are safe to expose to the
-    /// API of a CORS API specification.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Access-Control-Expose-Headers = "Access-Control-Expose-Headers" ":" #field-name
-    /// ```
-    ///
-    /// # Example values
-    /// * `ETag, Content-Length`
-    ///
-    /// # Examples
-    /// ```
-    /// # extern crate hyper;
-    /// # extern crate unicase;
-    /// # fn main() {
-    /// // extern crate unicase;
-    ///
-    /// use hyper::header::{Headers, AccessControlExposeHeaders};
-    /// use unicase::UniCase;
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AccessControlExposeHeaders(vec![
-    ///         UniCase("etag".to_owned()),
-    ///         UniCase("content-length".to_owned())
-    ///     ])
-    /// );
-    /// # }
-    /// ```
-    /// ```
-    /// # extern crate hyper;
-    /// # extern crate unicase;
-    /// # fn main() {
-    /// // extern crate unicase;
-    ///
-    /// use hyper::header::{Headers, AccessControlExposeHeaders};
-    /// use unicase::UniCase;
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AccessControlExposeHeaders(vec![
-    ///         UniCase("etag".to_owned()),
-    ///         UniCase("content-length".to_owned())
-    ///     ])
-    /// );
-    /// # }
-    /// ```
-    (AccessControlExposeHeaders, "Access-Control-Expose-Headers") => (UniCase<String>)*
-
-    test_access_control_expose_headers {
-        test_header!(test1, vec![b"etag, content-length"]);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/access_control_max_age.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-header! {
-    /// `Access-Control-Max-Age` header, part of
-    /// [CORS](http://www.w3.org/TR/cors/#access-control-max-age-response-header)
-    ///
-    /// The `Access-Control-Max-Age` header indicates how long the results of a
-    /// preflight request can be cached in a preflight result cache.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Access-Control-Max-Age = \"Access-Control-Max-Age\" \":\" delta-seconds
-    /// ```
-    ///
-    /// # Example values
-    /// * `531`
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, AccessControlMaxAge};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(AccessControlMaxAge(1728000u32));
-    /// ```
-    (AccessControlMaxAge, "Access-Control-Max-Age") => [u32]
-
-    test_access_control_max_age {
-        test_header!(test1, vec![b"531"]);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/access_control_request_headers.rs
+++ /dev/null
@@ -1,58 +0,0 @@
-use unicase::UniCase;
-
-header! {
-    /// `Access-Control-Request-Headers` header, part of
-    /// [CORS](http://www.w3.org/TR/cors/#access-control-request-headers-request-header)
-    ///
-    /// The `Access-Control-Request-Headers` header indicates which headers will
-    /// be used in the actual request as part of the preflight request.
-    /// during the actual request.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Access-Control-Allow-Headers: "Access-Control-Allow-Headers" ":" #field-name
-    /// ```
-    ///
-    /// # Example values
-    /// * `accept-language, date`
-    ///
-    /// # Examples
-    /// ```
-    /// # extern crate hyper;
-    /// # extern crate unicase;
-    /// # fn main() {
-    /// // extern crate unicase;
-    ///
-    /// use hyper::header::{Headers, AccessControlRequestHeaders};
-    /// use unicase::UniCase;
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AccessControlRequestHeaders(vec![UniCase("date".to_owned())])
-    /// );
-    /// # }
-    /// ```
-    /// ```
-    /// # extern crate hyper;
-    /// # extern crate unicase;
-    /// # fn main() {
-    /// // extern crate unicase;
-    ///
-    /// use hyper::header::{Headers, AccessControlRequestHeaders};
-    /// use unicase::UniCase;
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     AccessControlRequestHeaders(vec![
-    ///         UniCase("accept-language".to_owned()),
-    ///         UniCase("date".to_owned()),
-    ///     ])
-    /// );
-    /// # }
-    /// ```
-    (AccessControlRequestHeaders, "Access-Control-Request-Headers") => (UniCase<String>)*
-
-    test_access_control_request_headers {
-        test_header!(test1, vec![b"accept-language, date"]);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/access_control_request_method.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-use method::Method;
-
-header! {
-    /// `Access-Control-Request-Method` header, part of
-    /// [CORS](http://www.w3.org/TR/cors/#access-control-request-method-request-header)
-    /// 
-    /// The `Access-Control-Request-Method` header indicates which method will be
-    /// used in the actual request as part of the preflight request.
-    /// # ABNF
-    /// ```plain
-    /// Access-Control-Request-Method: \"Access-Control-Request-Method\" \":\" Method
-    /// ```
-    /// 
-    /// # Example values
-    /// * `GET`
-    /// 
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, AccessControlRequestMethod};
-    /// use hyper::method::Method;
-    /// 
-    /// let mut headers = Headers::new();
-    /// headers.set(AccessControlRequestMethod(Method::Get));
-    /// ```
-    (AccessControlRequestMethod, "Access-Control-Request-Method") => [Method]
-
-    test_access_control_request_method {
-        test_header!(test1, vec![b"GET"]);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/allow.rs
+++ /dev/null
@@ -1,76 +0,0 @@
-use method::Method;
-
-header! {
-    /// `Allow` header, defined in [RFC7231](http://tools.ietf.org/html/rfc7231#section-7.4.1)
-    ///
-    /// The `Allow` header field lists the set of methods advertised as
-    /// supported by the target resource.  The purpose of this field is
-    /// strictly to inform the recipient of valid request methods associated
-    /// with the resource.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Allow = #method
-    /// ```
-    ///
-    /// # Example values
-    /// * `GET, HEAD, PUT`
-    /// * `OPTIONS, GET, PUT, POST, DELETE, HEAD, TRACE, CONNECT, PATCH, fOObAr`
-    /// * ``
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, Allow};
-    /// use hyper::method::Method;
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     Allow(vec![Method::Get])
-    /// );
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, Allow};
-    /// use hyper::method::Method;
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     Allow(vec![
-    ///         Method::Get,
-    ///         Method::Post,
-    ///         Method::Patch,
-    ///         Method::Extension("COPY".to_owned()),
-    ///     ])
-    /// );
-    /// ```
-    (Allow, "Allow") => (Method)*
-
-    test_allow {
-        // From the RFC
-        test_header!(
-            test1,
-            vec![b"GET, HEAD, PUT"],
-            Some(HeaderField(vec![Method::Get, Method::Head, Method::Put])));
-        // Own tests
-        test_header!(
-            test2,
-            vec![b"OPTIONS, GET, PUT, POST, DELETE, HEAD, TRACE, CONNECT, PATCH, fOObAr"],
-            Some(HeaderField(vec![
-                Method::Options,
-                Method::Get,
-                Method::Put,
-                Method::Post,
-                Method::Delete,
-                Method::Head,
-                Method::Trace,
-                Method::Connect,
-                Method::Patch,
-                Method::Extension("fOObAr".to_owned())])));
-        test_header!(
-            test3,
-            vec![b""],
-            Some(HeaderField(Vec::<Method>::new())));
-    }
-}
-
-bench_header!(bench,
-    Allow, { vec![b"OPTIONS,GET,PUT,POST,DELETE,HEAD,TRACE,CONNECT,PATCH,fOObAr".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/authorization.rs
+++ /dev/null
@@ -1,289 +0,0 @@
-use std::any::Any;
-use std::fmt::{self, Display};
-use std::str::{FromStr, from_utf8};
-use std::ops::{Deref, DerefMut};
-use base64::{encode, decode};
-use header::{Header, HeaderFormat};
-
-/// `Authorization` header, defined in [RFC7235](https://tools.ietf.org/html/rfc7235#section-4.2)
-///
-/// The `Authorization` header field allows a user agent to authenticate
-/// itself with an origin server -- usually, but not necessarily, after
-/// receiving a 401 (Unauthorized) response.  Its value consists of
-/// credentials containing the authentication information of the user
-/// agent for the realm of the resource being requested.
-///
-/// # ABNF
-/// ```plain
-/// Authorization = credentials
-/// ```
-///
-/// # Example values
-/// * `Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==`
-/// * `Bearer fpKL54jvWmEGVoRdCNjG`
-///
-/// # Examples
-/// ```
-/// use hyper::header::{Headers, Authorization};
-///
-/// let mut headers = Headers::new();
-/// headers.set(Authorization("let me in".to_owned()));
-/// ```
-/// ```
-/// use hyper::header::{Headers, Authorization, Basic};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///    Authorization(
-///        Basic {
-///            username: "Aladdin".to_owned(),
-///            password: Some("open sesame".to_owned())
-///        }
-///    )
-/// );
-/// ```
-/// ```
-/// use hyper::header::{Headers, Authorization, Bearer};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///    Authorization(
-///        Bearer {
-///            token: "QWxhZGRpbjpvcGVuIHNlc2FtZQ".to_owned()
-///        }
-///    )
-/// );
-/// ```
-#[derive(Clone, PartialEq, Debug)]
-pub struct Authorization<S: Scheme>(pub S);
-
-impl<S: Scheme> Deref for Authorization<S> {
-    type Target = S;
-
-    fn deref(&self) -> &S {
-        &self.0
-    }
-}
-
-impl<S: Scheme> DerefMut for Authorization<S> {
-    fn deref_mut(&mut self) -> &mut S {
-        &mut self.0
-    }
-}
-
-impl<S: Scheme + Any> Header for Authorization<S> where <S as FromStr>::Err: 'static {
-    fn header_name() -> &'static str {
-        "Authorization"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<Authorization<S>> {
-        if raw.len() != 1 {
-            return Err(::Error::Header);
-        }
-        let header = try!(from_utf8(unsafe { &raw.get_unchecked(0)[..] }));
-        if let Some(scheme) = <S as Scheme>::scheme() {
-            if header.starts_with(scheme) && header.len() > scheme.len() + 1 {
-                match header[scheme.len() + 1..].parse::<S>().map(Authorization) {
-                    Ok(h) => Ok(h),
-                    Err(_) => Err(::Error::Header)
-                }
-            } else {
-                Err(::Error::Header)
-            }
-        } else {
-            match header.parse::<S>().map(Authorization) {
-                Ok(h) => Ok(h),
-                Err(_) => Err(::Error::Header)
-            }
-        }
-    }
-}
-
-impl<S: Scheme + Any> HeaderFormat for Authorization<S> where <S as FromStr>::Err: 'static {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        if let Some(scheme) = <S as Scheme>::scheme() {
-            try!(write!(f, "{} ", scheme))
-        };
-        self.0.fmt_scheme(f)
-    }
-}
-
-/// An Authorization scheme to be used in the header.
-pub trait Scheme: FromStr + fmt::Debug + Clone + Send + Sync {
-    /// An optional Scheme name.
-    ///
-    /// Will be replaced with an associated constant once available.
-    fn scheme() -> Option<&'static str>;
-    /// Format the Scheme data into a header value.
-    fn fmt_scheme(&self, &mut fmt::Formatter) -> fmt::Result;
-}
-
-impl Scheme for String {
-    fn scheme() -> Option<&'static str> {
-        None
-    }
-
-    fn fmt_scheme(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        Display::fmt(self, f)
-    }
-}
-
-/// Credential holder for Basic Authentication
-#[derive(Clone, PartialEq, Debug)]
-pub struct Basic {
-    /// The username as a possibly empty string
-    pub username: String,
-    /// The password. `None` if the `:` delimiter character was not
-    /// part of the parsed input.
-    pub password: Option<String>
-}
-
-impl Scheme for Basic {
-    fn scheme() -> Option<&'static str> {
-        Some("Basic")
-    }
-
-    fn fmt_scheme(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        //FIXME: serialize::base64 could use some Debug implementation, so
-        //that we don't have to allocate a new string here just to write it
-        //to the formatter.
-        let mut text = self.username.clone();
-        text.push(':');
-        if let Some(ref pass) = self.password {
-            text.push_str(&pass[..]);
-        }
-
-        f.write_str(&encode(text.as_bytes()))
-    }
-}
-
-impl FromStr for Basic {
-    type Err = ::Error;
-    fn from_str(s: &str) -> ::Result<Basic> {
-        match decode(s) {
-            Ok(decoded) => match String::from_utf8(decoded) {
-                Ok(text) => {
-                    let mut parts = &mut text.split(':');
-                    let user = match parts.next() {
-                        Some(part) => part.to_owned(),
-                        None => return Err(::Error::Header)
-                    };
-                    let password = match parts.next() {
-                        Some(part) => Some(part.to_owned()),
-                        None => None
-                    };
-                    Ok(Basic {
-                        username: user,
-                        password: password
-                    })
-                },
-                Err(e) => {
-                    debug!("Basic::from_utf8 error={:?}", e);
-                    Err(::Error::Header)
-                }
-            },
-            Err(e) => {
-                debug!("Basic::from_base64 error={:?}", e);
-                Err(::Error::Header)
-            }
-        }
-    }
-}
-
-#[derive(Clone, PartialEq, Debug)]
-///Token holder for Bearer Authentication, most often seen with oauth
-pub struct Bearer {
-	///Actual bearer token as a string
-	pub token: String
-}
-
-impl Scheme for Bearer {
-	fn scheme() -> Option<&'static str> {
-		Some("Bearer")
-	}
-
-	fn fmt_scheme(&self, f: &mut fmt::Formatter) -> fmt::Result {
-		write!(f, "{}", self.token)
-	}
-}
-
-impl FromStr for Bearer {
-	type Err = ::Error;
-	fn from_str(s: &str) -> ::Result<Bearer> {
-		Ok(Bearer { token: s.to_owned()})
-	}
-}
-
-#[cfg(test)]
-mod tests {
-    use super::{Authorization, Basic, Bearer};
-    use super::super::super::{Headers, Header};
-
-    #[test]
-    fn test_raw_auth() {
-        let mut headers = Headers::new();
-        headers.set(Authorization("foo bar baz".to_owned()));
-        assert_eq!(headers.to_string(), "Authorization: foo bar baz\r\n".to_owned());
-    }
-
-    #[test]
-    fn test_raw_auth_parse() {
-        let header: Authorization<String> = Header::parse_header(
-            &[b"foo bar baz".to_vec()]).unwrap();
-        assert_eq!(header.0, "foo bar baz");
-    }
-
-    #[test]
-    fn test_basic_auth() {
-        let mut headers = Headers::new();
-        headers.set(Authorization(
-            Basic { username: "Aladdin".to_owned(), password: Some("open sesame".to_owned()) }));
-        assert_eq!(
-            headers.to_string(),
-            "Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\r\n".to_owned());
-    }
-
-    #[test]
-    fn test_basic_auth_no_password() {
-        let mut headers = Headers::new();
-        headers.set(Authorization(Basic { username: "Aladdin".to_owned(), password: None }));
-        assert_eq!(headers.to_string(), "Authorization: Basic QWxhZGRpbjo=\r\n".to_owned());
-    }
-
-    #[test]
-    fn test_basic_auth_parse() {
-        let auth: Authorization<Basic> = Header::parse_header(
-            &[b"Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==".to_vec()]).unwrap();
-        assert_eq!(auth.0.username, "Aladdin");
-        assert_eq!(auth.0.password, Some("open sesame".to_owned()));
-    }
-
-    #[test]
-    fn test_basic_auth_parse_no_password() {
-        let auth: Authorization<Basic> = Header::parse_header(
-            &[b"Basic QWxhZGRpbjo=".to_vec()]).unwrap();
-        assert_eq!(auth.0.username, "Aladdin");
-        assert_eq!(auth.0.password, Some("".to_owned()));
-    }
-
-	#[test]
-    fn test_bearer_auth() {
-        let mut headers = Headers::new();
-        headers.set(Authorization(
-            Bearer { token: "fpKL54jvWmEGVoRdCNjG".to_owned() }));
-        assert_eq!(
-            headers.to_string(),
-            "Authorization: Bearer fpKL54jvWmEGVoRdCNjG\r\n".to_owned());
-    }
-
-    #[test]
-    fn test_bearer_auth_parse() {
-        let auth: Authorization<Bearer> = Header::parse_header(
-            &[b"Bearer fpKL54jvWmEGVoRdCNjG".to_vec()]).unwrap();
-        assert_eq!(auth.0.token, "fpKL54jvWmEGVoRdCNjG");
-    }
-}
-
-bench_header!(raw, Authorization<String>, { vec![b"foo bar baz".to_vec()] });
-bench_header!(basic, Authorization<Basic>, { vec![b"Basic QWxhZGRpbjpuIHNlc2FtZQ==".to_vec()] });
-bench_header!(bearer, Authorization<Bearer>, { vec![b"Bearer fpKL54jvWmEGVoRdCNjG".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/cache_control.rs
+++ /dev/null
@@ -1,211 +0,0 @@
-use std::fmt;
-use std::str::FromStr;
-use header::{Header, HeaderFormat};
-use header::parsing::{from_comma_delimited, fmt_comma_delimited};
-
-/// `Cache-Control` header, defined in [RFC7234](https://tools.ietf.org/html/rfc7234#section-5.2)
-///
-/// The `Cache-Control` header field is used to specify directives for
-/// caches along the request/response chain.  Such cache directives are
-/// unidirectional in that the presence of a directive in a request does
-/// not imply that the same directive is to be given in the response.
-///
-/// # ABNF
-/// ```plain
-/// Cache-Control   = 1#cache-directive
-/// cache-directive = token [ "=" ( token / quoted-string ) ]
-/// ```
-///
-/// # Example values
-/// * `no-cache`
-/// * `private, community="UCI"`
-/// * `max-age=30`
-///
-/// # Examples
-/// ```
-/// use hyper::header::{Headers, CacheControl, CacheDirective};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     CacheControl(vec![CacheDirective::MaxAge(86400u32)])
-/// );
-/// ```
-/// ```
-/// use hyper::header::{Headers, CacheControl, CacheDirective};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     CacheControl(vec![
-///         CacheDirective::NoCache,
-///         CacheDirective::Private,
-///         CacheDirective::MaxAge(360u32),
-///         CacheDirective::Extension("foo".to_owned(),
-///                                   Some("bar".to_owned())),
-///     ])
-/// );
-/// ```
-#[derive(PartialEq, Clone, Debug)]
-pub struct CacheControl(pub Vec<CacheDirective>);
-
-__hyper__deref!(CacheControl => Vec<CacheDirective>);
-
-impl Header for CacheControl {
-    fn header_name() -> &'static str {
-        "Cache-Control"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<CacheControl> {
-        let directives = try!(from_comma_delimited(raw));
-        if !directives.is_empty() {
-            Ok(CacheControl(directives))
-        } else {
-            Err(::Error::Header)
-        }
-    }
-}
-
-impl HeaderFormat for CacheControl {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(self, f)
-    }
-}
-
-impl fmt::Display for CacheControl {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt_comma_delimited(f, &self[..])
-    }
-}
-
-/// `CacheControl` contains a list of these directives.
-#[derive(PartialEq, Clone, Debug)]
-pub enum CacheDirective {
-    /// "no-cache"
-    NoCache,
-    /// "no-store"
-    NoStore,
-    /// "no-transform"
-    NoTransform,
-    /// "only-if-cached"
-    OnlyIfCached,
-
-    // request directives
-    /// "max-age=delta"
-    MaxAge(u32),
-    /// "max-stale=delta"
-    MaxStale(u32),
-    /// "min-fresh=delta"
-    MinFresh(u32),
-
-    // response directives
-    /// "must-revalidate"
-    MustRevalidate,
-    /// "public"
-    Public,
-    /// "private"
-    Private,
-    /// "proxy-revalidate"
-    ProxyRevalidate,
-    /// "s-maxage=delta"
-    SMaxAge(u32),
-
-    /// Extension directives. Optionally include an argument.
-    Extension(String, Option<String>)
-}
-
-impl fmt::Display for CacheDirective {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        use self::CacheDirective::*;
-        fmt::Display::fmt(match *self {
-            NoCache => "no-cache",
-            NoStore => "no-store",
-            NoTransform => "no-transform",
-            OnlyIfCached => "only-if-cached",
-
-            MaxAge(secs) => return write!(f, "max-age={}", secs),
-            MaxStale(secs) => return write!(f, "max-stale={}", secs),
-            MinFresh(secs) => return write!(f, "min-fresh={}", secs),
-
-            MustRevalidate => "must-revalidate",
-            Public => "public",
-            Private => "private",
-            ProxyRevalidate => "proxy-revalidate",
-            SMaxAge(secs) => return write!(f, "s-maxage={}", secs),
-
-            Extension(ref name, None) => &name[..],
-            Extension(ref name, Some(ref arg)) => return write!(f, "{}={}", name, arg),
-
-        }, f)
-    }
-}
-
-impl FromStr for CacheDirective {
-    type Err = Option<<u32 as FromStr>::Err>;
-    fn from_str(s: &str) -> Result<CacheDirective, Option<<u32 as FromStr>::Err>> {
-        use self::CacheDirective::*;
-        match s {
-            "no-cache" => Ok(NoCache),
-            "no-store" => Ok(NoStore),
-            "no-transform" => Ok(NoTransform),
-            "only-if-cached" => Ok(OnlyIfCached),
-            "must-revalidate" => Ok(MustRevalidate),
-            "public" => Ok(Public),
-            "private" => Ok(Private),
-            "proxy-revalidate" => Ok(ProxyRevalidate),
-            "" => Err(None),
-            _ => match s.find('=') {
-                Some(idx) if idx+1 < s.len() => match (&s[..idx], (&s[idx+1..]).trim_matches('"')) {
-                    ("max-age" , secs) => secs.parse().map(MaxAge).map_err(Some),
-                    ("max-stale", secs) => secs.parse().map(MaxStale).map_err(Some),
-                    ("min-fresh", secs) => secs.parse().map(MinFresh).map_err(Some),
-                    ("s-maxage", secs) => secs.parse().map(SMaxAge).map_err(Some),
-                    (left, right) => Ok(Extension(left.to_owned(), Some(right.to_owned())))
-                },
-                Some(_) => Err(None),
-                None => Ok(Extension(s.to_owned(), None))
-            }
-        }
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use header::Header;
-    use super::*;
-
-    #[test]
-    fn test_parse_multiple_headers() {
-        let cache = Header::parse_header(&[b"no-cache".to_vec(), b"private".to_vec()]);
-        assert_eq!(cache.ok(), Some(CacheControl(vec![CacheDirective::NoCache,
-                                                 CacheDirective::Private])))
-    }
-
-    #[test]
-    fn test_parse_argument() {
-        let cache = Header::parse_header(&[b"max-age=100, private".to_vec()]);
-        assert_eq!(cache.ok(), Some(CacheControl(vec![CacheDirective::MaxAge(100),
-                                                 CacheDirective::Private])))
-    }
-
-    #[test]
-    fn test_parse_quote_form() {
-        let cache = Header::parse_header(&[b"max-age=\"200\"".to_vec()]);
-        assert_eq!(cache.ok(), Some(CacheControl(vec![CacheDirective::MaxAge(200)])))
-    }
-
-    #[test]
-    fn test_parse_extension() {
-        let cache = Header::parse_header(&[b"foo, bar=baz".to_vec()]);
-        assert_eq!(cache.ok(), Some(CacheControl(vec![
-            CacheDirective::Extension("foo".to_owned(), None),
-            CacheDirective::Extension("bar".to_owned(), Some("baz".to_owned()))])))
-    }
-
-    #[test]
-    fn test_parse_bad_syntax() {
-        let cache: ::Result<CacheControl> = Header::parse_header(&[b"foo=".to_vec()]);
-        assert_eq!(cache.ok(), None)
-    }
-}
-
-bench_header!(normal,
-    CacheControl, { vec![b"no-cache, private".to_vec(), b"max-age=100".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/connection.rs
+++ /dev/null
@@ -1,143 +0,0 @@
-use std::fmt::{self, Display};
-use std::str::FromStr;
-use unicase::UniCase;
-
-pub use self::ConnectionOption::{KeepAlive, Close, ConnectionHeader};
-
-const KEEP_ALIVE: UniCase<&'static str> = UniCase("keep-alive");
-const CLOSE: UniCase<&'static str> = UniCase("close");
-
-/// Values that can be in the `Connection` header.
-#[derive(Clone, PartialEq, Debug)]
-pub enum ConnectionOption {
-    /// The `keep-alive` connection value.
-    KeepAlive,
-    /// The `close` connection value.
-    Close,
-    /// Values in the Connection header that are supposed to be names of other Headers.
-    ///
-    /// > When a header field aside from Connection is used to supply control
-    /// > information for or about the current connection, the sender MUST list
-    /// > the corresponding field-name within the Connection header field.
-    // TODO: it would be nice if these "Strings" could be stronger types, since
-    // they are supposed to relate to other Header fields (which we have strong
-    // types for).
-    ConnectionHeader(UniCase<String>),
-}
-
-impl FromStr for ConnectionOption {
-    type Err = ();
-    fn from_str(s: &str) -> Result<ConnectionOption, ()> {
-        if UniCase(s) == KEEP_ALIVE {
-            Ok(KeepAlive)
-        } else if UniCase(s) == CLOSE {
-            Ok(Close)
-        } else {
-            Ok(ConnectionHeader(UniCase(s.to_owned())))
-        }
-    }
-}
-
-impl Display for ConnectionOption {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.write_str(match *self {
-            KeepAlive => "keep-alive",
-            Close => "close",
-            ConnectionHeader(UniCase(ref s)) => s.as_ref()
-        })
-    }
-}
-
-header! {
-    /// `Connection` header, defined in
-    /// [RFC7230](http://tools.ietf.org/html/rfc7230#section-6.1)
-    ///
-    /// The `Connection` header field allows the sender to indicate desired
-    /// control options for the current connection.  In order to avoid
-    /// confusing downstream recipients, a proxy or gateway MUST remove or
-    /// replace any received connection options before forwarding the
-    /// message.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Connection        = 1#connection-option
-    /// connection-option = token
-    ///
-    /// # Example values
-    /// * `close`
-    /// * `keep-alive`
-    /// * `upgrade`
-    /// ```
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, Connection};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(Connection::keep_alive());
-    /// ```
-    /// ```
-    /// # extern crate hyper;
-    /// # extern crate unicase;
-    /// # fn main() {
-    /// // extern crate unicase;
-    ///
-    /// use hyper::header::{Headers, Connection, ConnectionOption};
-    /// use unicase::UniCase;
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     Connection(vec![
-    ///         ConnectionOption::ConnectionHeader(UniCase("upgrade".to_owned())),
-    ///     ])
-    /// );
-    /// # }
-    /// ```
-    (Connection, "Connection") => (ConnectionOption)+
-
-    test_connection {
-        test_header!(test1, vec![b"close"]);
-        test_header!(test2, vec![b"keep-alive"]);
-        test_header!(test3, vec![b"upgrade"]);
-    }
-}
-
-impl Connection {
-    /// A constructor to easily create a `Connection: close` header.
-    #[inline]
-    pub fn close() -> Connection {
-        Connection(vec![ConnectionOption::Close])
-    }
-
-    /// A constructor to easily create a `Connection: keep-alive` header.
-    #[inline]
-    pub fn keep_alive() -> Connection {
-        Connection(vec![ConnectionOption::KeepAlive])
-    }
-}
-
-bench_header!(close, Connection, { vec![b"close".to_vec()] });
-bench_header!(keep_alive, Connection, { vec![b"keep-alive".to_vec()] });
-bench_header!(header, Connection, { vec![b"authorization".to_vec()] });
-
-#[cfg(test)]
-mod tests {
-    use super::{Connection,ConnectionHeader};
-    use header::Header;
-    use unicase::UniCase;
-
-    fn parse_option(header: Vec<u8>) -> Connection {
-        let val = vec![header];
-        let connection: Connection = Header::parse_header(&val[..]).unwrap();
-        connection
-    }
-
-    #[test]
-    fn test_parse() {
-        assert_eq!(Connection::close(),parse_option(b"close".to_vec()));
-        assert_eq!(Connection::keep_alive(),parse_option(b"keep-alive".to_vec()));
-        assert_eq!(Connection::keep_alive(),parse_option(b"Keep-Alive".to_vec()));
-        assert_eq!(Connection(vec![ConnectionHeader(UniCase("upgrade".to_owned()))]),
-            parse_option(b"upgrade".to_vec()));
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/content_disposition.rs
+++ /dev/null
@@ -1,265 +0,0 @@
-// # References
-//
-// "The Content-Disposition Header Field" https://www.ietf.org/rfc/rfc2183.txt
-// "The Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP)" https://www.ietf.org/rfc/rfc6266.txt
-// "Returning Values from Forms: multipart/form-data" https://www.ietf.org/rfc/rfc2388.txt
-// Browser conformance tests at: http://greenbytes.de/tech/tc2231/
-// IANA assignment: http://www.iana.org/assignments/cont-disp/cont-disp.xhtml
-
-use language_tags::LanguageTag;
-use std::fmt;
-use unicase::UniCase;
-use url::percent_encoding;
-
-use header::{Header, HeaderFormat, parsing};
-use header::parsing::{parse_extended_value, HTTP_VALUE};
-use header::shared::Charset;
-
-/// The implied disposition of the content of the HTTP body
-#[derive(Clone, Debug, PartialEq)]
-pub enum DispositionType {
-    /// Inline implies default processing
-    Inline,
-    /// Attachment implies that the recipient should prompt the user to save the response locally,
-    /// rather than process it normally (as per its media type).
-    Attachment,
-    /// Extension type.  Should be handled by recipients the same way as Attachment
-    Ext(String)
-}
-
-/// A parameter to the disposition type
-#[derive(Clone, Debug, PartialEq)]
-pub enum DispositionParam {
-    /// A Filename consisting of a Charset, an optional LanguageTag, and finally a sequence of
-    /// bytes representing the filename
-    Filename(Charset, Option<LanguageTag>, Vec<u8>),
-    /// Extension type consisting of token and value.  Recipients should ignore unrecognized
-    /// parameters.
-    Ext(String, String)
-}
-
-/// A `Content-Disposition` header, (re)defined in [RFC6266](https://tools.ietf.org/html/rfc6266)
-///
-/// The Content-Disposition response header field is used to convey
-/// additional information about how to process the response payload, and
-/// also can be used to attach additional metadata, such as the filename
-/// to use when saving the response payload locally.
-///
-/// # ABNF
-/// ```plain
-/// content-disposition = "Content-Disposition" ":"
-///                       disposition-type *( ";" disposition-parm )
-///
-/// disposition-type    = "inline" | "attachment" | disp-ext-type
-///                       ; case-insensitive
-///
-/// disp-ext-type       = token
-///
-/// disposition-parm    = filename-parm | disp-ext-parm
-///
-/// filename-parm       = "filename" "=" value
-///                     | "filename*" "=" ext-value
-///
-/// disp-ext-parm       = token "=" value
-///                     | ext-token "=" ext-value
-///
-/// ext-token           = <the characters in token, followed by "*">
-/// ```
-///
-/// # Example
-/// ```
-/// use hyper::header::{Headers, ContentDisposition, DispositionType, DispositionParam, Charset};
-///
-/// let mut headers = Headers::new();
-/// headers.set(ContentDisposition {
-///     disposition: DispositionType::Attachment,
-///     parameters: vec![DispositionParam::Filename(
-///       Charset::Iso_8859_1, // The character set for the bytes of the filename
-///       None, // The optional language tag (see `language-tag` crate)
-///       b"\xa9 Copyright 1989.txt".to_vec() // the actual bytes of the filename
-///     )]
-/// });
-/// ```
-#[derive(Clone, Debug, PartialEq)]
-pub struct ContentDisposition {
-    /// The disposition
-    pub disposition: DispositionType,
-    /// Disposition parameters
-    pub parameters: Vec<DispositionParam>,
-}
-
-impl Header for ContentDisposition {
-    fn header_name() -> &'static str {
-        "Content-Disposition"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<ContentDisposition> {
-        parsing::from_one_raw_str(raw).and_then(|s: String| {
-            let mut sections = s.split(';');
-            let disposition = match sections.next() {
-                Some(s) => s.trim(),
-                None => return Err(::Error::Header),
-            };
-
-            let mut cd = ContentDisposition {
-                disposition: if UniCase(&*disposition) == UniCase("inline") {
-                    DispositionType::Inline
-                } else if UniCase(&*disposition) == UniCase("attachment") {
-                    DispositionType::Attachment
-                } else {
-                    DispositionType::Ext(disposition.to_owned())
-                },
-                parameters: Vec::new(),
-            };
-
-            for section in sections {
-                let mut parts = section.splitn(2, '=');
-
-                let key = if let Some(key) = parts.next() {
-                    key.trim()
-                } else {
-                    return Err(::Error::Header);
-                };
-
-                let val = if let Some(val) = parts.next() {
-                    val.trim()
-                } else {
-                    return Err(::Error::Header);
-                };
-
-                cd.parameters.push(
-                    if UniCase(&*key) == UniCase("filename") {
-                        DispositionParam::Filename(
-                            Charset::Ext("UTF-8".to_owned()), None,
-                            val.trim_matches('"').as_bytes().to_owned())
-                    } else if UniCase(&*key) == UniCase("filename*") {
-                        let extended_value = try!(parse_extended_value(val));
-                        DispositionParam::Filename(extended_value.charset, extended_value.language_tag, extended_value.value)
-                    } else {
-                        DispositionParam::Ext(key.to_owned(), val.trim_matches('"').to_owned())
-                    }
-                );
-            }
-
-            Ok(cd)
-        })
-    }
-}
-
-impl HeaderFormat for ContentDisposition {
-    #[inline]
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(&self, f)
-    }
-}
-
-impl fmt::Display for ContentDisposition {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match self.disposition {
-            DispositionType::Inline => try!(write!(f, "inline")),
-            DispositionType::Attachment => try!(write!(f, "attachment")),
-            DispositionType::Ext(ref s) => try!(write!(f, "{}", s)),
-        }
-        for param in &self.parameters {
-            match *param {
-                DispositionParam::Filename(ref charset, ref opt_lang, ref bytes) => {
-                    let mut use_simple_format: bool = false;
-                    if opt_lang.is_none() {
-                        if let Charset::Ext(ref ext) = *charset {
-                            if UniCase(&**ext) == UniCase("utf-8") {
-                                use_simple_format = true;
-                            }
-                        }
-                    }
-                    if use_simple_format {
-                        try!(write!(f, "; filename=\"{}\"",
-                                    match String::from_utf8(bytes.clone()) {
-                                        Ok(s) => s,
-                                        Err(_) => return Err(fmt::Error),
-                                    }));
-                    } else {
-                        try!(write!(f, "; filename*={}'", charset));
-                        if let Some(ref lang) = *opt_lang {
-                            try!(write!(f, "{}", lang));
-                        };
-                        try!(write!(f, "'"));
-                        try!(f.write_str(
-                            &percent_encoding::percent_encode(bytes, HTTP_VALUE).to_string()))
-                    }
-                },
-                DispositionParam::Ext(ref k, ref v) => try!(write!(f, "; {}=\"{}\"", k, v)),
-            }
-        }
-        Ok(())
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use super::{ContentDisposition,DispositionType,DispositionParam};
-    use ::header::Header;
-    use ::header::shared::Charset;
-
-    #[test]
-    fn test_parse_header() {
-        assert!(ContentDisposition::parse_header([b"".to_vec()].as_ref()).is_err());
-
-        let a = [b"form-data; dummy=3; name=upload;\r\n filename=\"sample.png\"".to_vec()];
-        let a: ContentDisposition = ContentDisposition::parse_header(a.as_ref()).unwrap();
-        let b = ContentDisposition {
-            disposition: DispositionType::Ext("form-data".to_owned()),
-            parameters: vec![
-                DispositionParam::Ext("dummy".to_owned(), "3".to_owned()),
-                DispositionParam::Ext("name".to_owned(), "upload".to_owned()),
-                DispositionParam::Filename(
-                    Charset::Ext("UTF-8".to_owned()),
-                    None,
-                    "sample.png".bytes().collect()) ]
-        };
-        assert_eq!(a, b);
-
-        let a = [b"attachment; filename=\"image.jpg\"".to_vec()];
-        let a: ContentDisposition = ContentDisposition::parse_header(a.as_ref()).unwrap();
-        let b = ContentDisposition {
-            disposition: DispositionType::Attachment,
-            parameters: vec![
-                DispositionParam::Filename(
-                    Charset::Ext("UTF-8".to_owned()),
-                    None,
-                    "image.jpg".bytes().collect()) ]
-        };
-        assert_eq!(a, b);
-
-        let a = [b"attachment; filename*=UTF-8''%c2%a3%20and%20%e2%82%ac%20rates".to_vec()];
-        let a: ContentDisposition = ContentDisposition::parse_header(a.as_ref()).unwrap();
-        let b = ContentDisposition {
-            disposition: DispositionType::Attachment,
-            parameters: vec![
-                DispositionParam::Filename(
-                    Charset::Ext("UTF-8".to_owned()),
-                    None,
-                    vec![0xc2, 0xa3, 0x20, b'a', b'n', b'd', 0x20,
-                         0xe2, 0x82, 0xac, 0x20, b'r', b'a', b't', b'e', b's']) ]
-        };
-        assert_eq!(a, b);
-    }
-
-    #[test]
-    fn test_display() {
-        let a = [b"attachment; filename*=UTF-8'en'%C2%A3%20and%20%E2%82%AC%20rates".to_vec()];
-        let as_string = ::std::str::from_utf8(&(a[0])).unwrap();
-        let a: ContentDisposition = ContentDisposition::parse_header(a.as_ref()).unwrap();
-        let display_rendered = format!("{}",a);
-        assert_eq!(as_string, display_rendered);
-
-        let a = [b"attachment; filename*=UTF-8''black%20and%20white.csv".to_vec()];
-        let a: ContentDisposition = ContentDisposition::parse_header(a.as_ref()).unwrap();
-        let display_rendered = format!("{}",a);
-        assert_eq!("attachment; filename=\"black and white.csv\"".to_owned(), display_rendered);
-
-        let a = [b"attachment; filename=colourful.csv".to_vec()];
-        let a: ContentDisposition = ContentDisposition::parse_header(a.as_ref()).unwrap();
-        let display_rendered = format!("{}",a);
-        assert_eq!("attachment; filename=\"colourful.csv\"".to_owned(), display_rendered);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/content_encoding.rs
+++ /dev/null
@@ -1,50 +0,0 @@
-use header::Encoding;
-
-header! {
-    /// `Content-Encoding` header, defined in
-    /// [RFC7231](http://tools.ietf.org/html/rfc7231#section-3.1.2.2)
-    /// 
-    /// The `Content-Encoding` header field indicates what content codings
-    /// have been applied to the representation, beyond those inherent in the
-    /// media type, and thus what decoding mechanisms have to be applied in
-    /// order to obtain data in the media type referenced by the Content-Type
-    /// header field.  Content-Encoding is primarily used to allow a
-    /// representation's data to be compressed without losing the identity of
-    /// its underlying media type.
-    /// 
-    /// # ABNF
-    /// ```plain
-    /// Content-Encoding = 1#content-coding
-    /// ```
-    /// 
-    /// # Example values
-    /// * `gzip`
-    /// 
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, ContentEncoding, Encoding};
-    /// 
-    /// let mut headers = Headers::new();
-    /// headers.set(ContentEncoding(vec![Encoding::Chunked]));
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, ContentEncoding, Encoding};
-    /// 
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     ContentEncoding(vec![
-    ///         Encoding::Gzip,
-    ///         Encoding::Chunked,
-    ///     ])
-    /// );
-    /// ```
-    (ContentEncoding, "Content-Encoding") => (Encoding)+
-
-    test_content_encoding {
-        /// Testcase from the RFC
-        test_header!(test1, vec![b"gzip"], Some(ContentEncoding(vec![Encoding::Gzip])));
-    }
-}
-
-bench_header!(single, ContentEncoding, { vec![b"gzip".to_vec()] });
-bench_header!(multiple, ContentEncoding, { vec![b"gzip, deflate".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/content_language.rs
+++ /dev/null
@@ -1,59 +0,0 @@
-use language_tags::LanguageTag;
-use header::QualityItem;
-
-header! {
-    /// `Content-Language` header, defined in
-    /// [RFC7231](https://tools.ietf.org/html/rfc7231#section-3.1.3.2)
-    /// 
-    /// The `Content-Language` header field describes the natural language(s)
-    /// of the intended audience for the representation.  Note that this
-    /// might not be equivalent to all the languages used within the
-    /// representation.
-    /// 
-    /// # ABNF
-    /// ```plain
-    /// Content-Language = 1#language-tag
-    /// ```
-    /// 
-    /// # Example values
-    /// * `da`
-    /// * `mi, en`
-    /// 
-    /// # Examples
-    /// ```
-    /// # extern crate hyper;
-    /// # #[macro_use] extern crate language_tags;
-    /// # use hyper::header::{Headers, ContentLanguage, qitem};
-    /// # 
-    /// # fn main() {
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     ContentLanguage(vec![
-    ///         qitem(langtag!(en)),
-    ///     ])
-    /// );
-    /// # }
-    /// ```
-    /// ```
-    /// # extern crate hyper;
-    /// # #[macro_use] extern crate language_tags;
-    /// # use hyper::header::{Headers, ContentLanguage, qitem};
-    /// # 
-    /// # fn main() {
-    /// 
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     ContentLanguage(vec![
-    ///         qitem(langtag!(da)),
-    ///         qitem(langtag!(en;;;GB)),
-    ///     ])
-    /// );
-    /// # }
-    /// ```
-    (ContentLanguage, "Content-Language") => (QualityItem<LanguageTag>)+
-
-    test_content_language {
-        test_header!(test1, vec![b"da"]);
-        test_header!(test2, vec![b"mi, en"]);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/content_length.rs
+++ /dev/null
@@ -1,94 +0,0 @@
-use std::fmt;
-
-use header::{HeaderFormat, Header, parsing};
-
-/// `Content-Length` header, defined in
-/// [RFC7230](http://tools.ietf.org/html/rfc7230#section-3.3.2)
-/// 
-/// When a message does not have a `Transfer-Encoding` header field, a
-/// Content-Length header field can provide the anticipated size, as a
-/// decimal number of octets, for a potential payload body.  For messages
-/// that do include a payload body, the Content-Length field-value
-/// provides the framing information necessary for determining where the
-/// body (and message) ends.  For messages that do not include a payload
-/// body, the Content-Length indicates the size of the selected
-/// representation.
-/// 
-/// # ABNF
-/// ```plain
-/// Content-Length = 1*DIGIT
-/// ```
-/// 
-/// # Example values
-/// * `3495`
-/// 
-/// # Example
-/// ```
-/// use hyper::header::{Headers, ContentLength};
-/// 
-/// let mut headers = Headers::new();
-/// headers.set(ContentLength(1024u64));
-/// ```
-#[derive(Clone, Copy, Debug, PartialEq)]
-pub struct ContentLength(pub u64);
-
-impl Header for ContentLength {
-    #[inline]
-    fn header_name() -> &'static str {
-        "Content-Length"
-    }
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<ContentLength> {
-        // If multiple Content-Length headers were sent, everything can still
-        // be alright if they all contain the same value, and all parse
-        // correctly. If not, then it's an error.
-        raw.iter()
-            .map(::std::ops::Deref::deref)
-            .map(parsing::from_raw_str)
-            .fold(None, |prev, x| {
-                match (prev, x) {
-                    (None, x) => Some(x),
-                    (e@Some(Err(_)), _ ) => e,
-                    (Some(Ok(prev)), Ok(x)) if prev == x => Some(Ok(prev)),
-                    _ => Some(Err(::Error::Header))
-                }
-            })
-            .unwrap_or(Err(::Error::Header))
-            .map(ContentLength)
-    }
-}
-
-impl HeaderFormat for ContentLength {
-    #[inline]
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(&self.0, f)
-    }
-}
-
-impl fmt::Display for ContentLength {
-    #[inline]
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(&self.0, f)
-    }
-}
-
-__hyper__deref!(ContentLength => u64);
-
-__hyper__tm!(ContentLength, tests {
-    // Testcase from RFC
-    test_header!(test1, vec![b"3495"], Some(HeaderField(3495)));
-
-    test_header!(test_invalid, vec![b"34v95"], None);
-
-    // Can't use the test_header macro because "5, 5" gets cleaned to "5".
-    #[test]
-    fn test_duplicates() {
-        let parsed = HeaderField::parse_header(&[b"5"[..].into(),
-                                                 b"5"[..].into()]).unwrap();
-        assert_eq!(parsed, HeaderField(5));
-        assert_eq!(format!("{}", parsed), "5");
-    }
-
-    test_header!(test_duplicates_vary, vec![b"5", b"6", b"5"], None);
-});
-
-bench_header!(bench, ContentLength, { vec![b"42349984".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/content_range.rs
+++ /dev/null
@@ -1,189 +0,0 @@
-use std::fmt::{self, Display};
-use std::str::FromStr;
-
-header! {
-    /// `Content-Range` header, defined in
-    /// [RFC7233](http://tools.ietf.org/html/rfc7233#section-4.2)
-    (ContentRange, "Content-Range") => [ContentRangeSpec]
-
-    test_content_range {
-        test_header!(test_bytes,
-            vec![b"bytes 0-499/500"],
-            Some(ContentRange(ContentRangeSpec::Bytes {
-                range: Some((0, 499)),
-                instance_length: Some(500)
-            })));
-
-        test_header!(test_bytes_unknown_len,
-            vec![b"bytes 0-499/*"],
-            Some(ContentRange(ContentRangeSpec::Bytes {
-                range: Some((0, 499)),
-                instance_length: None
-            })));
-
-        test_header!(test_bytes_unknown_range,
-            vec![b"bytes */500"],
-            Some(ContentRange(ContentRangeSpec::Bytes {
-                range: None,
-                instance_length: Some(500)
-            })));
-
-        test_header!(test_unregistered,
-            vec![b"seconds 1-2"],
-            Some(ContentRange(ContentRangeSpec::Unregistered {
-                unit: "seconds".to_owned(),
-                resp: "1-2".to_owned()
-            })));
-
-        test_header!(test_no_len,
-            vec![b"bytes 0-499"],
-            None::<ContentRange>);
-
-        test_header!(test_only_unit,
-            vec![b"bytes"],
-            None::<ContentRange>);
-
-        test_header!(test_end_less_than_start,
-            vec![b"bytes 499-0/500"],
-            None::<ContentRange>);
-
-        test_header!(test_blank,
-            vec![b""],
-            None::<ContentRange>);
-
-        test_header!(test_bytes_many_spaces,
-            vec![b"bytes 1-2/500 3"],
-            None::<ContentRange>);
-
-        test_header!(test_bytes_many_slashes,
-            vec![b"bytes 1-2/500/600"],
-            None::<ContentRange>);
-
-        test_header!(test_bytes_many_dashes,
-            vec![b"bytes 1-2-3/500"],
-            None::<ContentRange>);
-
-    }
-}
-
-
-/// Content-Range, described in [RFC7233](https://tools.ietf.org/html/rfc7233#section-4.2)
-///
-/// # ABNF
-/// ```plain
-/// Content-Range       = byte-content-range
-///                     / other-content-range
-///
-/// byte-content-range  = bytes-unit SP
-///                       ( byte-range-resp / unsatisfied-range )
-///
-/// byte-range-resp     = byte-range "/" ( complete-length / "*" )
-/// byte-range          = first-byte-pos "-" last-byte-pos
-/// unsatisfied-range   = "*/" complete-length
-///
-/// complete-length     = 1*DIGIT
-///
-/// other-content-range = other-range-unit SP other-range-resp
-/// other-range-resp    = *CHAR
-/// ```
-#[derive(PartialEq, Clone, Debug)]
-pub enum ContentRangeSpec {
-    /// Byte range
-    Bytes {
-        /// First and last bytes of the range, omitted if request could not be
-        /// satisfied
-        range: Option<(u64, u64)>,
-
-        /// Total length of the instance, can be omitted if unknown
-        instance_length: Option<u64>
-    },
-
-    /// Custom range, with unit not registered at IANA
-    Unregistered {
-        /// other-range-unit
-        unit: String,
-
-        /// other-range-resp
-        resp: String
-    }
-}
-
-fn split_in_two(s: &str, separator: char) -> Option<(&str, &str)> {
-    let mut iter = s.splitn(2, separator);
-    match (iter.next(), iter.next()) {
-        (Some(a), Some(b)) => Some((a, b)),
-        _ => None
-    }
-}
-
-impl FromStr for ContentRangeSpec {
-    type Err = ::Error;
-
-    fn from_str(s: &str) -> ::Result<Self> {
-        let res = match split_in_two(s, ' ') {
-            Some(("bytes", resp)) => {
-                let (range, instance_length) = try!(split_in_two(resp, '/').ok_or(::Error::Header));
-
-                let instance_length = if instance_length == "*" {
-                    None
-                } else {
-                    Some(try!(instance_length.parse().map_err(|_| ::Error::Header)))
-                };
-
-                let range = if range == "*" {
-                    None
-                } else {
-                    let (first_byte, last_byte) = try!(split_in_two(range, '-').ok_or(::Error::Header));
-                    let first_byte = try!(first_byte.parse().map_err(|_| ::Error::Header));
-                    let last_byte = try!(last_byte.parse().map_err(|_| ::Error::Header));
-                    if last_byte < first_byte {
-                        return Err(::Error::Header);
-                    }
-                    Some((first_byte, last_byte))
-                };
-
-                ContentRangeSpec::Bytes {
-                    range: range,
-                    instance_length: instance_length
-                }
-            }
-            Some((unit, resp)) => {
-                ContentRangeSpec::Unregistered {
-                    unit: unit.to_owned(),
-                    resp: resp.to_owned()
-                }
-            }
-            _ => return Err(::Error::Header)
-        };
-        Ok(res)
-    }
-}
-
-impl Display for ContentRangeSpec {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            ContentRangeSpec::Bytes { range, instance_length } => {
-                try!(f.write_str("bytes "));
-                match range {
-                    Some((first_byte, last_byte)) => {
-                        try!(write!(f, "{}-{}", first_byte, last_byte));
-                    },
-                    None => {
-                        try!(f.write_str("*"));
-                    }
-                };
-                try!(f.write_str("/"));
-                if let Some(v) = instance_length {
-                    write!(f, "{}", v)
-                } else {
-                    f.write_str("*")
-                }
-            }
-            ContentRangeSpec::Unregistered { ref unit, ref resp } => {
-                try!(f.write_str(&unit));
-                try!(f.write_str(" "));
-                f.write_str(&resp)
-            }
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/content_type.rs
+++ /dev/null
@@ -1,97 +0,0 @@
-use mime::Mime;
-
-header! {
-    /// `Content-Type` header, defined in
-    /// [RFC7231](http://tools.ietf.org/html/rfc7231#section-3.1.1.5)
-    /// 
-    /// The `Content-Type` header field indicates the media type of the
-    /// associated representation: either the representation enclosed in the
-    /// message payload or the selected representation, as determined by the
-    /// message semantics.  The indicated media type defines both the data
-    /// format and how that data is intended to be processed by a recipient,
-    /// within the scope of the received message semantics, after any content
-    /// codings indicated by Content-Encoding are decoded.
-    /// 
-    /// # ABNF
-    /// ```plain
-    /// Content-Type = media-type
-    /// ```
-    /// 
-    /// # Example values
-    /// * `text/html; charset=ISO-8859-4`
-    /// 
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, ContentType};
-    /// use hyper::mime::{Mime, TopLevel, SubLevel};
-    /// 
-    /// let mut headers = Headers::new();
-    /// 
-    /// headers.set(
-    ///     ContentType(Mime(TopLevel::Text, SubLevel::Html, vec![]))
-    /// );
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, ContentType};
-    /// use hyper::mime::{Mime, TopLevel, SubLevel, Attr, Value};
-    /// 
-    /// let mut headers = Headers::new();
-    /// 
-    /// headers.set(
-    ///     ContentType(Mime(TopLevel::Application, SubLevel::Json,
-    ///                      vec![(Attr::Charset, Value::Utf8)]))
-    /// );
-    /// ```
-    (ContentType, "Content-Type") => [Mime]
-
-    test_content_type {
-        test_header!(
-            test1,
-            // FIXME: Should be b"text/html; charset=ISO-8859-4" but mime crate lowercases
-            // the whole value so parsing and formatting the value gives a different result
-            vec![b"text/html; charset=iso-8859-4"],
-            Some(HeaderField(Mime(
-                TopLevel::Text,
-                SubLevel::Html,
-                vec![(Attr::Charset, Value::Ext("iso-8859-4".to_owned()))]))));
-    }
-}
-
-impl ContentType {
-    /// A constructor  to easily create a `Content-Type: application/json` header.
-    #[inline]
-    pub fn json() -> ContentType {
-        ContentType(mime!(Application/Json))
-    }
-
-    /// A constructor  to easily create a `Content-Type: text/plain; charset=utf-8` header.
-    #[inline]
-    pub fn plaintext() -> ContentType {
-        ContentType(mime!(Text/Plain; Charset=Utf8))
-    }
-
-    /// A constructor  to easily create a `Content-Type: text/html; charset=utf-8` header.
-    #[inline]
-    pub fn html() -> ContentType {
-        ContentType(mime!(Text/Html; Charset=Utf8))
-    }
-
-    /// A constructor  to easily create a `Content-Type: application/www-form-url-encoded` header.
-    #[inline]
-    pub fn form_url_encoded() -> ContentType {
-        ContentType(mime!(Application/WwwFormUrlEncoded))
-    }
-    /// A constructor  to easily create a `Content-Type: image/jpeg` header.
-    #[inline]
-    pub fn jpeg() -> ContentType {
-        ContentType(mime!(Image/Jpeg))
-    }
-
-    /// A constructor  to easily create a `Content-Type: image/png` header.
-    #[inline]
-    pub fn png() -> ContentType {
-        ContentType(mime!(Image/Png))
-    }
-}
-
-bench_header!(bench, ContentType, { vec![b"application/json; charset=utf-8".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/cookie.rs
+++ /dev/null
@@ -1,70 +0,0 @@
-use header::{Header, HeaderFormat};
-use std::fmt::{self, Display};
-use std::str::from_utf8;
-
-/// `Cookie` header, defined in [RFC6265](http://tools.ietf.org/html/rfc6265#section-5.4)
-///
-/// If the user agent does attach a Cookie header field to an HTTP
-/// request, the user agent must send the cookie-string
-/// as the value of the header field.
-///
-/// When the user agent generates an HTTP request, the user agent MUST NOT
-/// attach more than one Cookie header field.
-///
-/// # Example values
-/// * `SID=31d4d96e407aad42`
-/// * `SID=31d4d96e407aad42; lang=en-US`
-///
-/// # Example
-/// ```
-/// use hyper::header::{Headers, Cookie};
-///
-/// let mut headers = Headers::new();
-///
-/// headers.set(
-///    Cookie(vec![
-///        String::from("foo=bar")
-///    ])
-/// );
-/// ```
-#[derive(Clone, PartialEq, Debug)]
-pub struct Cookie(pub Vec<String>);
-
-__hyper__deref!(Cookie => Vec<String>);
-
-impl Header for Cookie {
-    fn header_name() -> &'static str {
-        "Cookie"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<Cookie> {
-        let mut cookies = Vec::with_capacity(raw.len());
-        for cookies_raw in raw.iter() {
-            let cookies_str = try!(from_utf8(&cookies_raw[..]));
-            for cookie_str in cookies_str.split(';') {
-                cookies.push(cookie_str.trim().to_owned())
-            }
-        }
-
-        if !cookies.is_empty() {
-            Ok(Cookie(cookies))
-        } else {
-            Err(::Error::Header)
-        }
-    }
-}
-
-impl HeaderFormat for Cookie {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        let cookies = &self.0;
-        for (i, cookie) in cookies.iter().enumerate() {
-            if i != 0 {
-                try!(f.write_str("; "));
-            }
-            try!(Display::fmt(&cookie, f));
-        }
-        Ok(())
-    }
-}
-
-bench_header!(bench, Cookie, { vec![b"foo=bar; baz=quux".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/date.rs
+++ /dev/null
@@ -1,40 +0,0 @@
-use header::HttpDate;
-
-header! {
-    /// `Date` header, defined in [RFC7231](http://tools.ietf.org/html/rfc7231#section-7.1.1.2)
-    /// 
-    /// The `Date` header field represents the date and time at which the
-    /// message was originated.
-    /// 
-    /// # ABNF
-    /// ```plain
-    /// Date = HTTP-date
-    /// ```
-    /// 
-    /// # Example values
-    /// * `Tue, 15 Nov 1994 08:12:31 GMT`
-    /// 
-    /// # Example
-    /// ```
-    /// # extern crate time;
-    /// # extern crate hyper;
-    /// # fn main() {
-    /// // extern crate time;
-    /// 
-    /// use hyper::header::{Headers, Date, HttpDate};
-    /// use time;
-    /// 
-    /// let mut headers = Headers::new();
-    /// headers.set(Date(HttpDate(time::now())));
-    /// # }
-    /// ```
-    (Date, "Date") => [HttpDate]
-
-    test_date {
-        test_header!(test1, vec![b"Tue, 15 Nov 1994 08:12:31 GMT"]);
-    }
-}
-
-bench_header!(imf_fixdate, Date, { vec![b"Sun, 07 Nov 1994 08:48:37 GMT".to_vec()] });
-bench_header!(rfc_850, Date, { vec![b"Sunday, 06-Nov-94 08:49:37 GMT".to_vec()] });
-bench_header!(asctime, Date, { vec![b"Sun Nov  6 08:49:37 1994".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/etag.rs
+++ /dev/null
@@ -1,89 +0,0 @@
-use header::EntityTag;
-
-header! {
-    /// `ETag` header, defined in [RFC7232](http://tools.ietf.org/html/rfc7232#section-2.3)
-    ///
-    /// The `ETag` header field in a response provides the current entity-tag
-    /// for the selected representation, as determined at the conclusion of
-    /// handling the request.  An entity-tag is an opaque validator for
-    /// differentiating between multiple representations of the same
-    /// resource, regardless of whether those multiple representations are
-    /// due to resource state changes over time, content negotiation
-    /// resulting in multiple representations being valid at the same time,
-    /// or both.  An entity-tag consists of an opaque quoted string, possibly
-    /// prefixed by a weakness indicator.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// ETag       = entity-tag
-    /// ```
-    ///
-    /// # Example values
-    /// * `"xyzzy"`
-    /// * `W/"xyzzy"`
-    /// * `""`
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, ETag, EntityTag};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(ETag(EntityTag::new(false, "xyzzy".to_owned())));
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, ETag, EntityTag};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(ETag(EntityTag::new(true, "xyzzy".to_owned())));
-    /// ```
-    (ETag, "ETag") => [EntityTag]
-
-    test_etag {
-        // From the RFC
-        test_header!(test1,
-            vec![b"\"xyzzy\""],
-            Some(ETag(EntityTag::new(false, "xyzzy".to_owned()))));
-        test_header!(test2,
-            vec![b"W/\"xyzzy\""],
-            Some(ETag(EntityTag::new(true, "xyzzy".to_owned()))));
-        test_header!(test3,
-            vec![b"\"\""],
-            Some(ETag(EntityTag::new(false, "".to_owned()))));
-        // Own tests
-        test_header!(test4,
-            vec![b"\"foobar\""],
-            Some(ETag(EntityTag::new(false, "foobar".to_owned()))));
-        test_header!(test5,
-            vec![b"\"\""],
-            Some(ETag(EntityTag::new(false, "".to_owned()))));
-        test_header!(test6,
-            vec![b"W/\"weak-etag\""],
-            Some(ETag(EntityTag::new(true, "weak-etag".to_owned()))));
-        test_header!(test7,
-            vec![b"W/\"\x65\x62\""],
-            Some(ETag(EntityTag::new(true, "\u{0065}\u{0062}".to_owned()))));
-        test_header!(test8,
-            vec![b"W/\"\""],
-            Some(ETag(EntityTag::new(true, "".to_owned()))));
-        test_header!(test9,
-            vec![b"no-dquotes"],
-            None::<ETag>);
-        test_header!(test10,
-            vec![b"w/\"the-first-w-is-case-sensitive\""],
-            None::<ETag>);
-        test_header!(test11,
-            vec![b""],
-            None::<ETag>);
-        test_header!(test12,
-            vec![b"\"unmatched-dquotes1"],
-            None::<ETag>);
-        test_header!(test13,
-            vec![b"unmatched-dquotes2\""],
-            None::<ETag>);
-        test_header!(test14,
-            vec![b"matched-\"dquotes\""],
-            None::<ETag>);
-    }
-}
-
-bench_header!(bench, ETag, { vec![b"W/\"nonemptytag\"".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/expect.rs
+++ /dev/null
@@ -1,68 +0,0 @@
-use std::fmt;
-use std::str;
-
-use unicase::UniCase;
-
-use header::{Header, HeaderFormat};
-
-/// The `Expect` header.
-///
-/// > The "Expect" header field in a request indicates a certain set of
-/// > behaviors (expectations) that need to be supported by the server in
-/// > order to properly handle this request.  The only such expectation
-/// > defined by this specification is 100-continue.
-/// >
-/// >    Expect  = "100-continue"
-///
-/// # Example
-/// ```
-/// use hyper::header::{Headers, Expect};
-/// let mut headers = Headers::new();
-/// headers.set(Expect::Continue);
-/// ```
-#[derive(Copy, Clone, PartialEq, Debug)]
-pub enum Expect {
-    /// The value `100-continue`.
-    Continue
-}
-
-const EXPECT_CONTINUE: UniCase<&'static str> = UniCase("100-continue");
-
-impl Header for Expect {
-    fn header_name() -> &'static str {
-        "Expect"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<Expect> {
-        if raw.len() == 1 {
-            let text = unsafe {
-                // safe because:
-                // 1. we just checked raw.len == 1
-                // 2. we don't actually care if it's utf8, we just want to
-                //    compare the bytes with the "case" normalized. If it's not
-                //    utf8, then the byte comparison will fail, and we'll return
-                //    None. No big deal.
-                str::from_utf8_unchecked(raw.get_unchecked(0))
-            };
-            if UniCase(text) == EXPECT_CONTINUE {
-                Ok(Expect::Continue)
-            } else {
-                Err(::Error::Header)
-            }
-        } else {
-            Err(::Error::Header)
-        }
-    }
-}
-
-impl HeaderFormat for Expect {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(self, f)
-    }
-}
-
-impl fmt::Display for Expect {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.write_str("100-continue")
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/expires.rs
+++ /dev/null
@@ -1,45 +0,0 @@
-use header::HttpDate;
-
-header! {
-    /// `Expires` header, defined in [RFC7234](http://tools.ietf.org/html/rfc7234#section-5.3)
-    /// 
-    /// The `Expires` header field gives the date/time after which the
-    /// response is considered stale.
-    /// 
-    /// The presence of an Expires field does not imply that the original
-    /// resource will change or cease to exist at, before, or after that
-    /// time.
-    /// 
-    /// # ABNF
-    /// ```plain
-    /// Expires = HTTP-date
-    /// ```
-    /// 
-    /// # Example values
-    /// * `Thu, 01 Dec 1994 16:00:00 GMT`
-    /// 
-    /// # Example
-    /// ```
-    /// # extern crate hyper;
-    /// # extern crate time;
-    /// # fn main() {
-    /// // extern crate time;
-    /// 
-    /// use hyper::header::{Headers, Expires, HttpDate};
-    /// use time::{self, Duration};
-    /// 
-    /// let mut headers = Headers::new();
-    /// headers.set(Expires(HttpDate(time::now() + Duration::days(1))));
-    /// # }
-    /// ```
-    (Expires, "Expires") => [HttpDate]
-
-    test_expires {
-        // Testcase from RFC
-        test_header!(test1, vec![b"Thu, 01 Dec 1994 16:00:00 GMT"]);
-    }
-}
-
-bench_header!(imf_fixdate, Expires, { vec![b"Sun, 07 Nov 1994 08:48:37 GMT".to_vec()] });
-bench_header!(rfc_850, Expires, { vec![b"Sunday, 06-Nov-94 08:49:37 GMT".to_vec()] });
-bench_header!(asctime, Expires, { vec![b"Sun Nov  6 08:49:37 1994".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/from.rs
+++ /dev/null
@@ -1,26 +0,0 @@
-header! {
-    /// `From` header, defined in [RFC7231](http://tools.ietf.org/html/rfc7231#section-5.5.1)
-    ///
-    /// The `From` header field contains an Internet email address for a
-    /// human user who controls the requesting user agent.  The address ought
-    /// to be machine-usable.
-    /// # ABNF
-    /// ```plain
-    /// From    = mailbox
-    /// mailbox = <mailbox, see [RFC5322], Section 3.4>
-    /// ```
-    ///
-    /// # Example
-    /// ```
-    /// use hyper::header::{Headers, From};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(From("webmaster@example.org".to_owned()));
-    /// ```
-    // FIXME: Maybe use mailbox?
-    (From, "From") => [String]
-
-    test_from {
-        test_header!(test1, vec![b"webmaster@example.org"]);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/host.rs
+++ /dev/null
@@ -1,145 +0,0 @@
-use header::{Header, HeaderFormat};
-use std::fmt;
-use std::str::FromStr;
-use header::parsing::from_one_raw_str;
-use url::idna::domain_to_unicode;
-
-/// The `Host` header.
-///
-/// HTTP/1.1 requires that all requests include a `Host` header, and so hyper
-/// client requests add one automatically.
-///
-/// Currently is just a String, but it should probably become a better type,
-/// like `url::Host` or something.
-///
-/// # Examples
-/// ```
-/// use hyper::header::{Headers, Host};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     Host{
-///         hostname: "hyper.rs".to_owned(),
-///         port: None,
-///     }
-/// );
-/// ```
-/// ```
-/// use hyper::header::{Headers, Host};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     Host{
-///         hostname: "hyper.rs".to_owned(),
-///         port: Some(8080),
-///     }
-/// );
-/// ```
-#[derive(Clone, PartialEq, Debug)]
-pub struct Host {
-    /// The hostname, such a example.domain.
-    pub hostname: String,
-    /// An optional port number.
-    pub port: Option<u16>
-}
-
-impl Header for Host {
-    fn header_name() -> &'static str {
-        "Host"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<Host> {
-        from_one_raw_str(raw)
-    }
-}
-
-impl HeaderFormat for Host {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match self.port {
-            None | Some(80) | Some(443) => f.write_str(&self.hostname[..]),
-            Some(port) => write!(f, "{}:{}", self.hostname, port)
-        }
-    }
-}
-
-impl fmt::Display for Host {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        self.fmt_header(f)
-    }
-}
-
-impl FromStr for Host {
-    type Err = ::Error;
-
-    fn from_str(s: &str) -> ::Result<Host> {
-        let idx = s.rfind(':');
-        let port = idx.and_then(
-            |idx| s[idx + 1..].parse().ok()
-        );
-        let hostname_encoded = match port {
-            None => s,
-            Some(_) => &s[..idx.unwrap()]
-        };
-
-        let hostname = if hostname_encoded.starts_with("[") {
-            if !hostname_encoded.ends_with("]") {
-                return Err(::Error::Header)
-            }
-            hostname_encoded.to_owned()
-        } else {
-            let (hostname, res) = domain_to_unicode(hostname_encoded);
-            if res.is_err() {
-                return Err(::Error::Header)
-            }
-            hostname
-        };
-
-        Ok(Host {
-            hostname: hostname,
-            port: port
-        })
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use super::Host;
-    use header::Header;
-
-
-    #[test]
-    fn test_host() {
-        let host = Header::parse_header([b"foo.com".to_vec()].as_ref());
-        assert_eq!(host.ok(), Some(Host {
-            hostname: "foo.com".to_owned(),
-            port: None
-        }));
-
-
-        let host = Header::parse_header([b"foo.com:8080".to_vec()].as_ref());
-        assert_eq!(host.ok(), Some(Host {
-            hostname: "foo.com".to_owned(),
-            port: Some(8080)
-        }));
-
-        let host = Header::parse_header([b"foo.com".to_vec()].as_ref());
-        assert_eq!(host.ok(), Some(Host {
-            hostname: "foo.com".to_owned(),
-            port: None
-        }));
-
-        let host = Header::parse_header([b"[::1]:8080".to_vec()].as_ref());
-        assert_eq!(host.ok(), Some(Host {
-            hostname: "[::1]".to_owned(),
-            port: Some(8080)
-        }));
-
-        let host = Header::parse_header([b"[::1]".to_vec()].as_ref());
-        assert_eq!(host.ok(), Some(Host {
-            hostname: "[::1]".to_owned(),
-            port: None
-        }));
-    }
-}
-
-bench_header!(bench, Host, { vec![b"foo.com:3000".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/if_match.rs
+++ /dev/null
@@ -1,69 +0,0 @@
-use header::EntityTag;
-
-header! {
-    /// `If-Match` header, defined in
-    /// [RFC7232](https://tools.ietf.org/html/rfc7232#section-3.1)
-    ///
-    /// The `If-Match` header field makes the request method conditional on
-    /// the recipient origin server either having at least one current
-    /// representation of the target resource, when the field-value is "*",
-    /// or having a current representation of the target resource that has an
-    /// entity-tag matching a member of the list of entity-tags provided in
-    /// the field-value.
-    ///
-    /// An origin server MUST use the strong comparison function when
-    /// comparing entity-tags for `If-Match`, since the client
-    /// intends this precondition to prevent the method from being applied if
-    /// there have been any changes to the representation data.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// If-Match = "*" / 1#entity-tag
-    /// ```
-    ///
-    /// # Example values
-    /// * `"xyzzy"`
-    /// * "xyzzy", "r2d2xxxx", "c3piozzzz"
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, IfMatch};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(IfMatch::Any);
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, IfMatch, EntityTag};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     IfMatch::Items(vec![
-    ///         EntityTag::new(false, "xyzzy".to_owned()),
-    ///         EntityTag::new(false, "foobar".to_owned()),
-    ///         EntityTag::new(false, "bazquux".to_owned()),
-    ///     ])
-    /// );
-    /// ```
-    (IfMatch, "If-Match") => {Any / (EntityTag)+}
-
-    test_if_match {
-        test_header!(
-            test1,
-            vec![b"\"xyzzy\""],
-            Some(HeaderField::Items(
-                vec![EntityTag::new(false, "xyzzy".to_owned())])));
-        test_header!(
-            test2,
-            vec![b"\"xyzzy\", \"r2d2xxxx\", \"c3piozzzz\""],
-            Some(HeaderField::Items(
-                vec![EntityTag::new(false, "xyzzy".to_owned()),
-                     EntityTag::new(false, "r2d2xxxx".to_owned()),
-                     EntityTag::new(false, "c3piozzzz".to_owned())])));
-        test_header!(test3, vec![b"*"], Some(IfMatch::Any));
-    }
-}
-
-bench_header!(star, IfMatch, { vec![b"*".to_vec()] });
-bench_header!(single , IfMatch, { vec![b"\"xyzzy\"".to_vec()] });
-bench_header!(multi, IfMatch,
-              { vec![b"\"xyzzy\", \"r2d2xxxx\", \"c3piozzzz\"".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/if_modified_since.rs
+++ /dev/null
@@ -1,45 +0,0 @@
-use header::HttpDate;
-
-header! {
-    /// `If-Modified-Since` header, defined in
-    /// [RFC7232](http://tools.ietf.org/html/rfc7232#section-3.3)
-    /// 
-    /// The `If-Modified-Since` header field makes a GET or HEAD request
-    /// method conditional on the selected representation's modification date
-    /// being more recent than the date provided in the field-value.
-    /// Transfer of the selected representation's data is avoided if that
-    /// data has not changed.
-    /// 
-    /// # ABNF
-    /// ```plain
-    /// If-Unmodified-Since = HTTP-date
-    /// ```
-    /// 
-    /// # Example values
-    /// * `Sat, 29 Oct 1994 19:43:31 GMT`
-    /// 
-    /// # Example
-    /// ```
-    /// # extern crate hyper;
-    /// # extern crate time;
-    /// # fn main() {
-    /// // extern crate time;
-    /// 
-    /// use hyper::header::{Headers, IfModifiedSince, HttpDate};
-    /// use time::{self, Duration};
-    /// 
-    /// let mut headers = Headers::new();
-    /// headers.set(IfModifiedSince(HttpDate(time::now() - Duration::days(1))));
-    /// # }
-    /// ```
-    (IfModifiedSince, "If-Modified-Since") => [HttpDate]
-
-    test_if_modified_since {
-        // Testcase from RFC
-        test_header!(test1, vec![b"Sat, 29 Oct 1994 19:43:31 GMT"]);
-    }
-}
-
-bench_header!(imf_fixdate, IfModifiedSince, { vec![b"Sun, 07 Nov 1994 08:48:37 GMT".to_vec()] });
-bench_header!(rfc_850, IfModifiedSince, { vec![b"Sunday, 06-Nov-94 08:49:37 GMT".to_vec()] });
-bench_header!(asctime, IfModifiedSince, { vec![b"Sun Nov  6 08:49:37 1994".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/if_none_match.rs
+++ /dev/null
@@ -1,83 +0,0 @@
-use header::EntityTag;
-
-header! {
-    /// `If-None-Match` header, defined in
-    /// [RFC7232](https://tools.ietf.org/html/rfc7232#section-3.2)
-    ///
-    /// The `If-None-Match` header field makes the request method conditional
-    /// on a recipient cache or origin server either not having any current
-    /// representation of the target resource, when the field-value is "*",
-    /// or having a selected representation with an entity-tag that does not
-    /// match any of those listed in the field-value.
-    ///
-    /// A recipient MUST use the weak comparison function when comparing
-    /// entity-tags for If-None-Match (Section 2.3.2), since weak entity-tags
-    /// can be used for cache validation even if there have been changes to
-    /// the representation data.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// If-None-Match = "*" / 1#entity-tag
-    /// ```
-    ///
-    /// # Example values
-    /// * `"xyzzy"`
-    /// * `W/"xyzzy"`
-    /// * `"xyzzy", "r2d2xxxx", "c3piozzzz"`
-    /// * `W/"xyzzy", W/"r2d2xxxx", W/"c3piozzzz"`
-    /// * `*`
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, IfNoneMatch};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(IfNoneMatch::Any);
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, IfNoneMatch, EntityTag};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     IfNoneMatch::Items(vec![
-    ///         EntityTag::new(false, "xyzzy".to_owned()),
-    ///         EntityTag::new(false, "foobar".to_owned()),
-    ///         EntityTag::new(false, "bazquux".to_owned()),
-    ///     ])
-    /// );
-    /// ```
-    (IfNoneMatch, "If-None-Match") => {Any / (EntityTag)+}
-
-    test_if_none_match {
-        test_header!(test1, vec![b"\"xyzzy\""]);
-        test_header!(test2, vec![b"W/\"xyzzy\""]);
-        test_header!(test3, vec![b"\"xyzzy\", \"r2d2xxxx\", \"c3piozzzz\""]);
-        test_header!(test4, vec![b"W/\"xyzzy\", W/\"r2d2xxxx\", W/\"c3piozzzz\""]);
-        test_header!(test5, vec![b"*"]);
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use super::IfNoneMatch;
-    use header::Header;
-    use header::EntityTag;
-
-    #[test]
-    fn test_if_none_match() {
-        let mut if_none_match: ::Result<IfNoneMatch>;
-
-        if_none_match = Header::parse_header([b"*".to_vec()].as_ref());
-        assert_eq!(if_none_match.ok(), Some(IfNoneMatch::Any));
-
-        if_none_match = Header::parse_header([b"\"foobar\", W/\"weak-etag\"".to_vec()].as_ref());
-        let mut entities: Vec<EntityTag> = Vec::new();
-        let foobar_etag = EntityTag::new(false, "foobar".to_owned());
-        let weak_etag = EntityTag::new(true, "weak-etag".to_owned());
-        entities.push(foobar_etag);
-        entities.push(weak_etag);
-        assert_eq!(if_none_match.ok(), Some(IfNoneMatch::Items(entities)));
-    }
-}
-
-bench_header!(bench, IfNoneMatch, { vec![b"W/\"nonemptytag\"".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/if_range.rs
+++ /dev/null
@@ -1,96 +0,0 @@
-use std::fmt::{self, Display};
-use header::{self, Header, HeaderFormat, EntityTag, HttpDate};
-
-/// `If-Range` header, defined in [RFC7233](http://tools.ietf.org/html/rfc7233#section-3.2)
-///
-/// If a client has a partial copy of a representation and wishes to have
-/// an up-to-date copy of the entire representation, it could use the
-/// Range header field with a conditional GET (using either or both of
-/// If-Unmodified-Since and If-Match.)  However, if the precondition
-/// fails because the representation has been modified, the client would
-/// then have to make a second request to obtain the entire current
-/// representation.
-///
-/// The `If-Range` header field allows a client to \"short-circuit\" the
-/// second request.  Informally, its meaning is as follows: if the
-/// representation is unchanged, send me the part(s) that I am requesting
-/// in Range; otherwise, send me the entire representation.
-///
-/// # ABNF
-/// ```plain
-/// If-Range = entity-tag / HTTP-date
-/// ```
-///
-/// # Example values
-/// * `Sat, 29 Oct 1994 19:43:31 GMT`
-/// * `\"xyzzy\"`
-///
-/// # Examples
-/// ```
-/// use hyper::header::{Headers, IfRange, EntityTag};
-///
-/// let mut headers = Headers::new();
-/// headers.set(IfRange::EntityTag(EntityTag::new(false, "xyzzy".to_owned())));
-/// ```
-/// ```
-/// # extern crate hyper;
-/// # extern crate time;
-/// # fn main() {
-/// // extern crate time;
-///
-/// use hyper::header::{Headers, IfRange, HttpDate};
-/// use time::{self, Duration};
-///
-/// let mut headers = Headers::new();
-/// headers.set(IfRange::Date(HttpDate(time::now() - Duration::days(1))));
-/// # }
-/// ```
-#[derive(Clone, Debug, PartialEq)]
-pub enum IfRange {
-    /// The entity-tag the client has of the resource
-    EntityTag(EntityTag),
-    /// The date when the client retrieved the resource
-    Date(HttpDate),
-}
-
-impl Header for IfRange {
-    fn header_name() -> &'static str {
-        "If-Range"
-    }
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<IfRange> {
-        let etag: ::Result<EntityTag> = header::parsing::from_one_raw_str(raw);
-        if etag.is_ok() {
-            return Ok(IfRange::EntityTag(etag.unwrap()));
-        }
-        let date: ::Result<HttpDate> = header::parsing::from_one_raw_str(raw);
-        if date.is_ok() {
-            return Ok(IfRange::Date(date.unwrap()));
-        }
-        Err(::Error::Header)
-    }
-}
-
-impl HeaderFormat for IfRange {
-    fn fmt_header(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
-        match *self {
-            IfRange::EntityTag(ref x) => Display::fmt(x, f),
-            IfRange::Date(ref x) => Display::fmt(x, f),
-        }
-    }
-}
-
-impl Display for IfRange {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        self.fmt_header(f)
-    }
-}
-
-#[cfg(test)]
-mod test_if_range {
-    use std::str;
-    use header::*;
-    use super::IfRange as HeaderField;
-    test_header!(test1, vec![b"Sat, 29 Oct 1994 19:43:31 GMT"]);
-    test_header!(test2, vec![b"\"xyzzy\""]);
-    test_header!(test3, vec![b"this-is-invalid"], None::<IfRange>);
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/if_unmodified_since.rs
+++ /dev/null
@@ -1,45 +0,0 @@
-use header::HttpDate;
-
-header! {
-    /// `If-Unmodified-Since` header, defined in
-    /// [RFC7232](http://tools.ietf.org/html/rfc7232#section-3.4)
-    /// 
-    /// The `If-Unmodified-Since` header field makes the request method
-    /// conditional on the selected representation's last modification date
-    /// being earlier than or equal to the date provided in the field-value.
-    /// This field accomplishes the same purpose as If-Match for cases where
-    /// the user agent does not have an entity-tag for the representation.
-    /// 
-    /// # ABNF
-    /// ```plain
-    /// If-Unmodified-Since = HTTP-date
-    /// ```
-    /// 
-    /// # Example values
-    /// * `Sat, 29 Oct 1994 19:43:31 GMT`
-    /// 
-    /// # Example
-    /// ```
-    /// # extern crate hyper;
-    /// # extern crate time;
-    /// # fn main() {
-    /// // extern crate time;
-    /// 
-    /// use hyper::header::{Headers, IfUnmodifiedSince, HttpDate};
-    /// use time::{self, Duration};
-    /// 
-    /// let mut headers = Headers::new();
-    /// headers.set(IfUnmodifiedSince(HttpDate(time::now() - Duration::days(1))));
-    /// # }
-    /// ```
-    (IfUnmodifiedSince, "If-Unmodified-Since") => [HttpDate]
-
-    test_if_unmodified_since {
-        // Testcase from RFC
-        test_header!(test1, vec![b"Sat, 29 Oct 1994 19:43:31 GMT"]);
-    }
-}
-
-bench_header!(imf_fixdate, IfUnmodifiedSince, { vec![b"Sun, 07 Nov 1994 08:48:37 GMT".to_vec()] });
-bench_header!(rfc_850, IfUnmodifiedSince, { vec![b"Sunday, 06-Nov-94 08:49:37 GMT".to_vec()] });
-bench_header!(asctime, IfUnmodifiedSince, { vec![b"Sun Nov  6 08:49:37 1994".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/last-event-id.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-header! {
-    /// `Last-Event-ID` header, defined in
-    /// [RFC3864](https://html.spec.whatwg.org/multipage/references.html#refsRFC3864)
-    ///
-    /// The `Last-Event-ID` header contains information about
-    /// the last event in an http interaction so that it's easier to
-    /// track of event state. This is helpful when working
-    /// with [Server-Sent-Events](http://www.html5rocks.com/en/tutorials/eventsource/basics/). If the connection were to be dropped, for example, it'd
-    /// be useful to let the server know what the last event you
-    /// recieved was.
-    ///
-    /// The spec is a String with the id of the last event, it can be
-    /// an empty string which acts a sort of "reset".
-    ///
-    /// # Example
-    /// ```
-    /// use hyper::header::{Headers, LastEventID};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(LastEventID("1".to_owned()));
-    /// ```
-    (LastEventID, "Last-Event-ID") => [String]
-
-    test_last_event_id {
-        // Initial state
-        test_header!(test1, vec![b""]);
-        // Own testcase
-        test_header!(test2, vec![b"1"], Some(LastEventID("1".to_owned())));
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/last_modified.rs
+++ /dev/null
@@ -1,43 +0,0 @@
-use header::HttpDate;
-
-header! {
-    /// `Last-Modified` header, defined in
-    /// [RFC7232](http://tools.ietf.org/html/rfc7232#section-2.2)
-    /// 
-    /// The `Last-Modified` header field in a response provides a timestamp
-    /// indicating the date and time at which the origin server believes the
-    /// selected representation was last modified, as determined at the
-    /// conclusion of handling the request.
-    /// 
-    /// # ABNF
-    /// ```plain
-    /// Expires = HTTP-date
-    /// ```
-    /// 
-    /// # Example values
-    /// * `Sat, 29 Oct 1994 19:43:31 GMT`
-    /// 
-    /// # Example
-    /// ```
-    /// # extern crate hyper;
-    /// # extern crate time;
-    /// # fn main() {
-    /// // extern crate time;
-    /// 
-    /// use hyper::header::{Headers, LastModified, HttpDate};
-    /// use time::{self, Duration};
-    /// 
-    /// let mut headers = Headers::new();
-    /// headers.set(LastModified(HttpDate(time::now() - Duration::days(1))));
-    /// # }
-    /// ```
-    (LastModified, "Last-Modified") => [HttpDate]
-
-    test_last_modified {
-        // Testcase from RFC
-        test_header!(test1, vec![b"Sat, 29 Oct 1994 19:43:31 GMT"]);}
-}
-
-bench_header!(imf_fixdate, LastModified, { vec![b"Sun, 07 Nov 1994 08:48:37 GMT".to_vec()] });
-bench_header!(rfc_850, LastModified, { vec![b"Sunday, 06-Nov-94 08:49:37 GMT".to_vec()] });
-bench_header!(asctime, LastModified, { vec![b"Sun Nov  6 08:49:37 1994".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/location.rs
+++ /dev/null
@@ -1,43 +0,0 @@
-header! {
-    /// `Location` header, defined in
-    /// [RFC7231](http://tools.ietf.org/html/rfc7231#section-7.1.2)
-    ///
-    /// The `Location` header field is used in some responses to refer to a
-    /// specific resource in relation to the response.  The type of
-    /// relationship is defined by the combination of request method and
-    /// status code semantics.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Location = URI-reference
-    /// ```
-    ///
-    /// # Example values
-    /// * `/People.html#tim`
-    /// * `http://www.example.net/index.html`
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, Location};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(Location("/People.html#tim".to_owned()));
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, Location};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(Location("http://www.example.com/index.html".to_owned()));
-    /// ```
-    // TODO: Use URL
-    (Location, "Location") => [String]
-
-    test_location {
-        // Testcase from RFC
-        test_header!(test1, vec![b"/People.html#tim"]);
-        test_header!(test2, vec![b"http://www.example.net/index.html"]);
-    }
-
-}
-
-bench_header!(bench, Location, { vec![b"http://foo.com/hello:3000".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/mod.rs
+++ /dev/null
@@ -1,393 +0,0 @@
-//! A Collection of Header implementations for common HTTP Headers.
-//!
-//! ## Mime
-//!
-//! Several header fields use MIME values for their contents. Keeping with the
-//! strongly-typed theme, the [mime](http://seanmonstar.github.io/mime.rs) crate
-//! is used, such as `ContentType(pub Mime)`.
-
-pub use self::accept::Accept;
-pub use self::access_control_allow_credentials::AccessControlAllowCredentials;
-pub use self::access_control_allow_headers::AccessControlAllowHeaders;
-pub use self::access_control_allow_methods::AccessControlAllowMethods;
-pub use self::access_control_allow_origin::AccessControlAllowOrigin;
-pub use self::access_control_expose_headers::AccessControlExposeHeaders;
-pub use self::access_control_max_age::AccessControlMaxAge;
-pub use self::access_control_request_headers::AccessControlRequestHeaders;
-pub use self::access_control_request_method::AccessControlRequestMethod;
-pub use self::accept_charset::AcceptCharset;
-pub use self::accept_encoding::AcceptEncoding;
-pub use self::accept_language::AcceptLanguage;
-pub use self::accept_ranges::{AcceptRanges, RangeUnit};
-pub use self::allow::Allow;
-pub use self::authorization::{Authorization, Scheme, Basic, Bearer};
-pub use self::cache_control::{CacheControl, CacheDirective};
-pub use self::connection::{Connection, ConnectionOption};
-pub use self::content_disposition::{ContentDisposition, DispositionType, DispositionParam};
-pub use self::content_length::ContentLength;
-pub use self::content_encoding::ContentEncoding;
-pub use self::content_language::ContentLanguage;
-pub use self::content_range::{ContentRange, ContentRangeSpec};
-pub use self::content_type::ContentType;
-pub use self::cookie::Cookie;
-pub use self::date::Date;
-pub use self::etag::ETag;
-pub use self::expect::Expect;
-pub use self::expires::Expires;
-pub use self::from::From;
-pub use self::host::Host;
-pub use self::if_match::IfMatch;
-pub use self::if_modified_since::IfModifiedSince;
-pub use self::if_none_match::IfNoneMatch;
-pub use self::if_unmodified_since::IfUnmodifiedSince;
-pub use self::if_range::IfRange;
-pub use self::last_modified::LastModified;
-pub use self::location::Location;
-pub use self::origin::Origin;
-pub use self::pragma::Pragma;
-pub use self::prefer::{Prefer, Preference};
-pub use self::preference_applied::PreferenceApplied;
-pub use self::range::{Range, ByteRangeSpec};
-pub use self::referer::Referer;
-pub use self::referrer_policy::ReferrerPolicy;
-pub use self::server::Server;
-pub use self::set_cookie::SetCookie;
-pub use self::strict_transport_security::StrictTransportSecurity;
-pub use self::transfer_encoding::TransferEncoding;
-pub use self::upgrade::{Upgrade, Protocol, ProtocolName};
-pub use self::user_agent::UserAgent;
-pub use self::vary::Vary;
-
-#[doc(hidden)]
-#[macro_export]
-macro_rules! bench_header(
-    ($name:ident, $ty:ty, $value:expr) => {
-        #[cfg(test)]
-        #[cfg(feature = "nightly")]
-        #[allow(deprecated)]
-        mod $name {
-            use test::Bencher;
-            use super::*;
-
-            use header::{Header, HeaderFormatter};
-
-            #[bench]
-            fn bench_parse(b: &mut Bencher) {
-                let val = $value;
-                b.iter(|| {
-                    let _: $ty = Header::parse_header(&val[..]).unwrap();
-                });
-            }
-
-            #[bench]
-            fn bench_format(b: &mut Bencher) {
-                let val: $ty = Header::parse_header(&$value[..]).unwrap();
-                let fmt = HeaderFormatter(&val);
-                b.iter(|| {
-                    format!("{}", fmt);
-                });
-            }
-        }
-    }
-);
-
-#[doc(hidden)]
-#[macro_export]
-macro_rules! __hyper__deref {
-    ($from:ty => $to:ty) => {
-        impl ::std::ops::Deref for $from {
-            type Target = $to;
-
-            fn deref(&self) -> &$to {
-                &self.0
-            }
-        }
-
-        impl ::std::ops::DerefMut for $from {
-            fn deref_mut(&mut self) -> &mut $to {
-                &mut self.0
-            }
-        }
-    }
-}
-
-#[doc(hidden)]
-#[macro_export]
-macro_rules! __hyper__tm {
-    ($id:ident, $tm:ident{$($tf:item)*}) => {
-        #[allow(unused_imports)]
-        #[cfg(test)]
-        mod $tm{
-            use std::str;
-            use $crate::header::*;
-            use $crate::mime::*;
-            use $crate::language_tags::*;
-            use $crate::method::Method;
-            use super::$id as HeaderField;
-            $($tf)*
-        }
-
-    }
-}
-
-#[doc(hidden)]
-#[macro_export]
-macro_rules! test_header {
-    ($id:ident, $raw:expr) => {
-        #[test]
-        fn $id() {
-            use std::ascii::AsciiExt;
-            let raw = $raw;
-            let a: Vec<Vec<u8>> = raw.iter().map(|x| x.to_vec()).collect();
-            let value = HeaderField::parse_header(&a[..]);
-            let result = format!("{}", value.unwrap());
-            let expected = String::from_utf8(raw[0].to_vec()).unwrap();
-            let result_cmp: Vec<String> = result
-                .to_ascii_lowercase()
-                .split(' ')
-                .map(|x| x.to_owned())
-                .collect();
-            let expected_cmp: Vec<String> = expected
-                .to_ascii_lowercase()
-                .split(' ')
-                .map(|x| x.to_owned())
-                .collect();
-            assert_eq!(result_cmp.concat(), expected_cmp.concat());
-        }
-    };
-    ($id:ident, $raw:expr, $typed:expr) => {
-        #[test]
-        fn $id() {
-            let a: Vec<Vec<u8>> = $raw.iter().map(|x| x.to_vec()).collect();
-            let val = HeaderField::parse_header(&a[..]);
-            let typed: Option<HeaderField> = $typed;
-            // Test parsing
-            assert_eq!(val.ok(), typed);
-            // Test formatting
-            if typed.is_some() {
-                let raw = &($raw)[..];
-                let mut iter = raw.iter().map(|b|str::from_utf8(&b[..]).unwrap());
-                let mut joined = String::new();
-                joined.push_str(iter.next().unwrap());
-                for s in iter {
-                    joined.push_str(", ");
-                    joined.push_str(s);
-                }
-                assert_eq!(format!("{}", typed.unwrap()), joined);
-            }
-        }
-    }
-}
-
-#[macro_export]
-macro_rules! header {
-    // $a:meta: Attributes associated with the header item (usually docs)
-    // $id:ident: Identifier of the header
-    // $n:expr: Lowercase name of the header
-    // $nn:expr: Nice name of the header
-
-    // List header, zero or more items
-    ($(#[$a:meta])*($id:ident, $n:expr) => ($item:ty)*) => {
-        $(#[$a])*
-        #[derive(Clone, Debug, PartialEq)]
-        pub struct $id(pub Vec<$item>);
-        __hyper__deref!($id => Vec<$item>);
-        impl $crate::header::Header for $id {
-            fn header_name() -> &'static str {
-                $n
-            }
-            fn parse_header(raw: &[Vec<u8>]) -> $crate::Result<Self> {
-                $crate::header::parsing::from_comma_delimited(raw).map($id)
-            }
-        }
-        impl $crate::header::HeaderFormat for $id {
-            fn fmt_header(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
-                $crate::header::parsing::fmt_comma_delimited(f, &self.0[..])
-            }
-        }
-        impl ::std::fmt::Display for $id {
-            fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
-                use $crate::header::HeaderFormat;
-                self.fmt_header(f)
-            }
-        }
-    };
-    // List header, one or more items
-    ($(#[$a:meta])*($id:ident, $n:expr) => ($item:ty)+) => {
-        $(#[$a])*
-        #[derive(Clone, Debug, PartialEq)]
-        pub struct $id(pub Vec<$item>);
-        __hyper__deref!($id => Vec<$item>);
-        impl $crate::header::Header for $id {
-            fn header_name() -> &'static str {
-                $n
-            }
-            fn parse_header(raw: &[Vec<u8>]) -> $crate::Result<Self> {
-                $crate::header::parsing::from_comma_delimited(raw).map($id)
-            }
-        }
-        impl $crate::header::HeaderFormat for $id {
-            fn fmt_header(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
-                $crate::header::parsing::fmt_comma_delimited(f, &self.0[..])
-            }
-        }
-        impl ::std::fmt::Display for $id {
-            fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
-                use $crate::header::HeaderFormat;
-                self.fmt_header(f)
-            }
-        }
-    };
-    // Single value header
-    ($(#[$a:meta])*($id:ident, $n:expr) => [$value:ty]) => {
-        $(#[$a])*
-        #[derive(Clone, Debug, PartialEq)]
-        pub struct $id(pub $value);
-        __hyper__deref!($id => $value);
-        impl $crate::header::Header for $id {
-            fn header_name() -> &'static str {
-                $n
-            }
-            fn parse_header(raw: &[Vec<u8>]) -> $crate::Result<Self> {
-                $crate::header::parsing::from_one_raw_str(raw).map($id)
-            }
-        }
-        impl $crate::header::HeaderFormat for $id {
-            fn fmt_header(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
-                ::std::fmt::Display::fmt(&**self, f)
-            }
-        }
-        impl ::std::fmt::Display for $id {
-            fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
-                ::std::fmt::Display::fmt(&**self, f)
-            }
-        }
-    };
-    // List header, one or more items with "*" option
-    ($(#[$a:meta])*($id:ident, $n:expr) => {Any / ($item:ty)+}) => {
-        $(#[$a])*
-        #[derive(Clone, Debug, PartialEq)]
-        pub enum $id {
-            /// Any value is a match
-            Any,
-            /// Only the listed items are a match
-            Items(Vec<$item>),
-        }
-        impl $crate::header::Header for $id {
-            fn header_name() -> &'static str {
-                $n
-            }
-            fn parse_header(raw: &[Vec<u8>]) -> $crate::Result<Self> {
-                // FIXME: Return None if no item is in $id::Only
-                if raw.len() == 1 {
-                    if raw[0] == b"*" {
-                        return Ok($id::Any)
-                    }
-                }
-                $crate::header::parsing::from_comma_delimited(raw).map($id::Items)
-            }
-        }
-        impl $crate::header::HeaderFormat for $id {
-            fn fmt_header(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
-                match *self {
-                    $id::Any => f.write_str("*"),
-                    $id::Items(ref fields) => $crate::header::parsing::fmt_comma_delimited(
-                        f, &fields[..])
-                }
-            }
-        }
-        impl ::std::fmt::Display for $id {
-            fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
-                use $crate::header::HeaderFormat;
-                self.fmt_header(f)
-            }
-        }
-    };
-
-    // optional test module
-    ($(#[$a:meta])*($id:ident, $n:expr) => ($item:ty)* $tm:ident{$($tf:item)*}) => {
-        header! {
-            $(#[$a])*
-            ($id, $n) => ($item)*
-        }
-
-        __hyper__tm! { $id, $tm { $($tf)* }}
-    };
-    ($(#[$a:meta])*($id:ident, $n:expr) => ($item:ty)+ $tm:ident{$($tf:item)*}) => {
-        header! {
-            $(#[$a])*
-            ($id, $n) => ($item)+
-        }
-
-        __hyper__tm! { $id, $tm { $($tf)* }}
-    };
-    ($(#[$a:meta])*($id:ident, $n:expr) => [$item:ty] $tm:ident{$($tf:item)*}) => {
-        header! {
-            $(#[$a])*
-            ($id, $n) => [$item]
-        }
-
-        __hyper__tm! { $id, $tm { $($tf)* }}
-    };
-    ($(#[$a:meta])*($id:ident, $n:expr) => {Any / ($item:ty)+} $tm:ident{$($tf:item)*}) => {
-        header! {
-            $(#[$a])*
-            ($id, $n) => {Any / ($item)+}
-        }
-
-        __hyper__tm! { $id, $tm { $($tf)* }}
-    };
-}
-
-
-mod accept;
-mod access_control_allow_credentials;
-mod access_control_allow_headers;
-mod access_control_allow_methods;
-mod access_control_allow_origin;
-mod access_control_expose_headers;
-mod access_control_max_age;
-mod access_control_request_headers;
-mod access_control_request_method;
-mod accept_charset;
-mod accept_encoding;
-mod accept_language;
-mod accept_ranges;
-mod allow;
-mod authorization;
-mod cache_control;
-mod cookie;
-mod connection;
-mod content_disposition;
-mod content_encoding;
-mod content_language;
-mod content_length;
-mod content_range;
-mod content_type;
-mod date;
-mod etag;
-mod expect;
-mod expires;
-mod from;
-mod host;
-mod if_match;
-mod if_modified_since;
-mod if_none_match;
-mod if_range;
-mod if_unmodified_since;
-mod last_modified;
-mod location;
-mod origin;
-mod pragma;
-mod prefer;
-mod preference_applied;
-mod range;
-mod referer;
-mod referrer_policy;
-mod server;
-mod set_cookie;
-mod strict_transport_security;
-mod transfer_encoding;
-mod upgrade;
-mod user_agent;
-mod vary;
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/origin.rs
+++ /dev/null
@@ -1,119 +0,0 @@
-use header::{Header, Host, HeaderFormat};
-use std::fmt;
-use std::str::FromStr;
-use header::parsing::from_one_raw_str;
-
-/// The `Origin` header.
-///
-/// The `Origin` header is a version of the `Referer` header that is used for all HTTP fetches and `POST`s whose CORS flag is set.
-/// This header is often used to inform recipients of the security context of where the request was initiated.
-///
-///
-/// Following the spec, https://fetch.spec.whatwg.org/#origin-header, the value of this header is composed of
-/// a String (scheme), header::Host (host/port)
-///
-/// # Examples
-/// ```
-/// use hyper::header::{Headers, Origin};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     Origin::new("http", "hyper.rs", None)
-/// );
-/// ```
-/// ```
-/// use hyper::header::{Headers, Origin};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     Origin::new("https", "wikipedia.org", Some(443))
-/// );
-/// ```
-
-#[derive(Clone, Debug)]
-pub struct Origin {
-    /// The scheme, such as http or https
-    pub scheme: String,
-    /// The host, such as Host{hostname: "hyper.rs".to_owned(), port: None}
-    pub host: Host,
-}
-
-impl Origin {
-    /// Creates a new `Origin` header.
-    pub fn new<S: Into<String>, H: Into<String>>(scheme: S, hostname: H, port: Option<u16>) -> Origin{
-        Origin {
-            scheme: scheme.into(),
-            host: Host {
-                hostname: hostname.into(),
-                port: port
-            }
-        }
-    }
-}
-
-impl Header for Origin {
-    fn header_name() -> &'static str {
-        static NAME: &'static str = "Origin";
-        NAME
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<Origin> {
-        from_one_raw_str(raw)
-    }
-}
-
-impl FromStr for Origin {
-    type Err = ::Error;
-
-    fn from_str(s: &str) -> ::Result<Origin> {
-        let idx = match s.find("://") {
-            Some(idx) => idx,
-            None => return Err(::Error::Header)
-        };
-        // idx + 3 because thats how long "://" is
-        let (scheme, etc) = (&s[..idx], &s[idx + 3..]);
-        let host = try!(Host::from_str(etc));
-
-
-        Ok(Origin{
-            scheme: scheme.to_owned(),
-            host: host
-        })
-    }
-}
-
-impl HeaderFormat for Origin {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(self, f)
-    }
-}
-
-impl fmt::Display for Origin {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "{}://{}", self.scheme, self.host)
-    }
-}
-
-impl PartialEq for Origin {
-    fn eq(&self, other: &Origin) -> bool {
-        self.scheme == other.scheme && self.host == other.host
-    }
-}
-
-
-#[cfg(test)]
-mod tests {
-    use super::Origin;
-    use header::Header;
-
-    #[test]
-    fn test_origin() {
-        let origin = Header::parse_header([b"http://foo.com".to_vec()].as_ref());
-        assert_eq!(origin.ok(), Some(Origin::new("http", "foo.com", None)));
-
-        let origin = Header::parse_header([b"https://foo.com:443".to_vec()].as_ref());
-        assert_eq!(origin.ok(), Some(Origin::new("https", "foo.com", Some(443))));
-    }
-}
-
-bench_header!(bench, Origin, { vec![b"https://foo.com".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/pragma.rs
+++ /dev/null
@@ -1,82 +0,0 @@
-use std::fmt;
-use std::ascii::AsciiExt;
-
-use header::{Header, HeaderFormat, parsing};
-
-/// The `Pragma` header defined by HTTP/1.0.
-///
-/// > The "Pragma" header field allows backwards compatibility with
-/// > HTTP/1.0 caches, so that clients can specify a "no-cache" request
-/// > that they will understand (as Cache-Control was not defined until
-/// > HTTP/1.1).  When the Cache-Control header field is also present and
-/// > understood in a request, Pragma is ignored.
-
-/// > In HTTP/1.0, Pragma was defined as an extensible field for
-/// > implementation-specified directives for recipients.  This
-/// > specification deprecates such extensions to improve interoperability.
-///
-/// Spec: https://tools.ietf.org/html/rfc7234#section-5.4
-///
-/// # Examples
-/// ```
-/// use hyper::header::{Headers, Pragma};
-///
-/// let mut headers = Headers::new();
-/// headers.set(Pragma::NoCache);
-/// ```
-/// ```
-/// use hyper::header::{Headers, Pragma};
-///
-/// let mut headers = Headers::new();
-/// headers.set(Pragma::Ext("foobar".to_owned()));
-/// ```
-#[derive(Clone, PartialEq, Debug)]
-pub enum Pragma {
-    /// Corresponds to the `no-cache` value.
-    NoCache,
-    /// Every value other than `no-cache`.
-    Ext(String),
-}
-
-impl Header for Pragma {
-    fn header_name() -> &'static str {
-        "Pragma"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<Pragma> {
-        parsing::from_one_raw_str(raw).and_then(|s: String| {
-            let slice = &s.to_ascii_lowercase()[..];
-            match slice {
-                "no-cache" => Ok(Pragma::NoCache),
-                _ => Ok(Pragma::Ext(s)),
-            }
-        })
-    }
-}
-
-impl HeaderFormat for Pragma {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(self, f)
-    }
-}
-
-impl fmt::Display for Pragma {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.write_str(match *self {
-            Pragma::NoCache => "no-cache",
-            Pragma::Ext(ref string) => &string[..],
-        })
-    }
-}
-
-#[test]
-fn test_parse_header() {
-    let a: Pragma = Header::parse_header([b"no-cache".to_vec()].as_ref()).unwrap();
-    let b = Pragma::NoCache;
-    assert_eq!(a, b);
-    let c: Pragma = Header::parse_header([b"FoObar".to_vec()].as_ref()).unwrap();
-    let d = Pragma::Ext("FoObar".to_owned());
-    assert_eq!(c, d);
-    let e: ::Result<Pragma> = Header::parse_header([b"".to_vec()].as_ref());
-    assert_eq!(e.ok(), None);
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/prefer.rs
+++ /dev/null
@@ -1,209 +0,0 @@
-use std::fmt;
-use std::str::FromStr;
-use header::{Header, HeaderFormat};
-use header::parsing::{from_comma_delimited, fmt_comma_delimited};
-
-/// `Prefer` header, defined in [RFC7240](http://tools.ietf.org/html/rfc7240)
-///
-/// The `Prefer` header field is HTTP header field that can be used by a
-/// client to request that certain behaviors be employed by a server
-/// while processing a request.
-///
-/// # ABNF
-/// ```plain
-/// Prefer     = "Prefer" ":" 1#preference
-/// preference = token [ BWS "=" BWS word ]
-///              *( OWS ";" [ OWS parameter ] )
-/// parameter  = token [ BWS "=" BWS word ]
-/// ```
-///
-/// # Example values
-/// * `respond-async`
-/// * `return=minimal`
-/// * `wait=30`
-///
-/// # Examples
-/// ```
-/// use hyper::header::{Headers, Prefer, Preference};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     Prefer(vec![Preference::RespondAsync])
-/// );
-/// ```
-/// ```
-/// use hyper::header::{Headers, Prefer, Preference};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     Prefer(vec![
-///         Preference::RespondAsync,
-///         Preference::ReturnRepresentation,
-///         Preference::Wait(10u32),
-///         Preference::Extension("foo".to_owned(),
-///                               "bar".to_owned(),
-///                               vec![]),
-///     ])
-/// );
-/// ```
-#[derive(PartialEq, Clone, Debug)]
-pub struct Prefer(pub Vec<Preference>);
-
-__hyper__deref!(Prefer => Vec<Preference>);
-
-impl Header for Prefer {
-    fn header_name() -> &'static str {
-        "Prefer"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<Prefer> {
-        let preferences = try!(from_comma_delimited(raw));
-        if !preferences.is_empty() {
-            Ok(Prefer(preferences))
-        } else {
-            Err(::Error::Header)
-        }
-    }
-}
-
-impl HeaderFormat for Prefer {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(self, f)
-    }
-}
-
-impl fmt::Display for Prefer {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt_comma_delimited(f, &self[..])
-    }
-}
-
-/// Prefer contains a list of these preferences.
-#[derive(PartialEq, Clone, Debug)]
-pub enum Preference {
-    /// "respond-async"
-    RespondAsync,
-    /// "return=representation"
-    ReturnRepresentation,
-    /// "return=minimal"
-    ReturnMinimal,
-    /// "handling=strict"
-    HandlingStrict,
-    /// "handling=leniant"
-    HandlingLeniant,
-    /// "wait=delta"
-    Wait(u32),
-
-    /// Extension preferences. Always has a value, if none is specified it is
-    /// just "". A preference can also have a list of parameters.
-    Extension(String, String, Vec<(String, String)>)
-}
-
-impl fmt::Display for Preference {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        use self::Preference::*;
-        fmt::Display::fmt(match *self {
-            RespondAsync => "respond-async",
-            ReturnRepresentation => "return=representation",
-            ReturnMinimal => "return=minimal",
-            HandlingStrict => "handling=strict",
-            HandlingLeniant => "handling=leniant",
-
-            Wait(secs) => return write!(f, "wait={}", secs),
-
-            Extension(ref name, ref value, ref params) => {
-                try!(write!(f, "{}", name));
-                if value != "" { try!(write!(f, "={}", value)); }
-                if params.len() > 0 {
-                    for &(ref name, ref value) in params {
-                        try!(write!(f, "; {}", name));
-                        if value != "" { try!(write!(f, "={}", value)); }
-                    }
-                }
-                return Ok(());
-            }
-        }, f)
-    }
-}
-
-impl FromStr for Preference {
-    type Err = Option<<u32 as FromStr>::Err>;
-    fn from_str(s: &str) -> Result<Preference, Option<<u32 as FromStr>::Err>> {
-        use self::Preference::*;
-        let mut params = s.split(';').map(|p| {
-            let mut param = p.splitn(2, '=');
-            match (param.next(), param.next()) {
-                (Some(name), Some(value)) => (name.trim(), value.trim().trim_matches('"')),
-                (Some(name), None) => (name.trim(), ""),
-                // This can safely be unreachable because the [`splitn`][1]
-                // function (used above) will always have at least one value.
-                //
-                // [1]: http://doc.rust-lang.org/std/primitive.str.html#method.splitn
-                _ => { unreachable!(); }
-            }
-        });
-        match params.nth(0) {
-            Some(param) => {
-                let rest: Vec<(String, String)> = params.map(|(l, r)| (l.to_owned(), r.to_owned())).collect();
-                match param {
-                    ("respond-async", "") => if rest.len() == 0 { Ok(RespondAsync) } else { Err(None) },
-                    ("return", "representation") => if rest.len() == 0 { Ok(ReturnRepresentation) } else { Err(None) },
-                    ("return", "minimal") => if rest.len() == 0 { Ok(ReturnMinimal) } else { Err(None) },
-                    ("handling", "strict") => if rest.len() == 0 { Ok(HandlingStrict) } else { Err(None) },
-                    ("handling", "leniant") => if rest.len() == 0 { Ok(HandlingLeniant) } else { Err(None) },
-                    ("wait", secs) => if rest.len() == 0 { secs.parse().map(Wait).map_err(Some) } else { Err(None) },
-                    (left, right) => Ok(Extension(left.to_owned(), right.to_owned(), rest))
-                }
-            },
-            None => Err(None)
-        }
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use header::Header;
-    use super::*;
-
-    #[test]
-    fn test_parse_multiple_headers() {
-        let prefer = Header::parse_header(&[b"respond-async, return=representation".to_vec()]);
-        assert_eq!(prefer.ok(), Some(Prefer(vec![Preference::RespondAsync,
-                                           Preference::ReturnRepresentation])))
-    }
-
-    #[test]
-    fn test_parse_argument() {
-        let prefer = Header::parse_header(&[b"wait=100, handling=leniant, respond-async".to_vec()]);
-        assert_eq!(prefer.ok(), Some(Prefer(vec![Preference::Wait(100),
-                                           Preference::HandlingLeniant,
-                                           Preference::RespondAsync])))
-    }
-
-    #[test]
-    fn test_parse_quote_form() {
-        let prefer = Header::parse_header(&[b"wait=\"200\", handling=\"strict\"".to_vec()]);
-        assert_eq!(prefer.ok(), Some(Prefer(vec![Preference::Wait(200),
-                                           Preference::HandlingStrict])))
-    }
-
-    #[test]
-    fn test_parse_extension() {
-        let prefer = Header::parse_header(&[b"foo, bar=baz, baz; foo; bar=baz, bux=\"\"; foo=\"\", buz=\"some parameter\"".to_vec()]);
-        assert_eq!(prefer.ok(), Some(Prefer(vec![
-            Preference::Extension("foo".to_owned(), "".to_owned(), vec![]),
-            Preference::Extension("bar".to_owned(), "baz".to_owned(), vec![]),
-            Preference::Extension("baz".to_owned(), "".to_owned(), vec![("foo".to_owned(), "".to_owned()), ("bar".to_owned(), "baz".to_owned())]),
-            Preference::Extension("bux".to_owned(), "".to_owned(), vec![("foo".to_owned(), "".to_owned())]),
-            Preference::Extension("buz".to_owned(), "some parameter".to_owned(), vec![])])))
-    }
-
-    #[test]
-    fn test_fail_with_args() {
-        let prefer: ::Result<Prefer> = Header::parse_header(&[b"respond-async; foo=bar".to_vec()]);
-        assert_eq!(prefer.ok(), None);
-    }
-}
-
-bench_header!(normal,
-    Prefer, { vec![b"respond-async, return=representation".to_vec(), b"wait=100".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/preference_applied.rs
+++ /dev/null
@@ -1,107 +0,0 @@
-use std::fmt;
-use header::{Header, HeaderFormat, Preference};
-use header::parsing::{from_comma_delimited, fmt_comma_delimited};
-
-/// `Preference-Applied` header, defined in [RFC7240](http://tools.ietf.org/html/rfc7240)
-///
-/// The `Preference-Applied` response header may be included within a
-/// response message as an indication as to which `Prefer` header tokens were
-/// honored by the server and applied to the processing of a request.
-///
-/// # ABNF
-/// ```plain
-/// Preference-Applied = "Preference-Applied" ":" 1#applied-pref
-/// applied-pref = token [ BWS "=" BWS word ]
-/// ```
-///
-/// # Example values
-/// * `respond-async`
-/// * `return=minimal`
-/// * `wait=30`
-///
-/// # Examples
-/// ```
-/// use hyper::header::{Headers, PreferenceApplied, Preference};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     PreferenceApplied(vec![Preference::RespondAsync])
-/// );
-/// ```
-/// ```
-/// use hyper::header::{Headers, PreferenceApplied, Preference};
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     PreferenceApplied(vec![
-///         Preference::RespondAsync,
-///         Preference::ReturnRepresentation,
-///         Preference::Wait(10u32),
-///         Preference::Extension("foo".to_owned(),
-///                               "bar".to_owned(),
-///                               vec![]),
-///     ])
-/// );
-/// ```
-#[derive(PartialEq, Clone, Debug)]
-pub struct PreferenceApplied(pub Vec<Preference>);
-
-__hyper__deref!(PreferenceApplied => Vec<Preference>);
-
-impl Header for PreferenceApplied {
-    fn header_name() -> &'static str {
-        "Preference-Applied"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<PreferenceApplied> {
-        let preferences = try!(from_comma_delimited(raw));
-        if !preferences.is_empty() {
-            Ok(PreferenceApplied(preferences))
-        } else {
-            Err(::Error::Header)
-        }
-    }
-}
-
-impl HeaderFormat for PreferenceApplied {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(self, f)
-    }
-}
-
-impl fmt::Display for PreferenceApplied {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        //TODO: format this without allocating a Vec and cloning contents
-        let preferences: Vec<_> = self.0.iter().map(|pref| match pref {
-            // The spec ignores parameters in `Preferences-Applied`
-            &Preference::Extension(ref name, ref value, _) => Preference::Extension(
-              name.to_owned(),
-              value.to_owned(),
-              vec![]
-            ),
-            preference @ _ => preference.clone()
-        }).collect();
-        fmt_comma_delimited(f, &preferences)
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use header::{HeaderFormat, Preference};
-    use super::*;
-
-    #[test]
-    fn test_format_ignore_parameters() {
-        assert_eq!(
-            format!("{}", &PreferenceApplied(vec![Preference::Extension(
-                "foo".to_owned(),
-                "bar".to_owned(),
-                vec![("bar".to_owned(), "foo".to_owned()), ("buz".to_owned(), "".to_owned())]
-            )]) as &(HeaderFormat + Send + Sync)),
-            "foo=bar".to_owned()
-        );
-    }
-}
-
-bench_header!(normal,
-    PreferenceApplied, { vec![b"respond-async, return=representation".to_vec(), b"wait=100".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/range.rs
+++ /dev/null
@@ -1,288 +0,0 @@
-use std::fmt::{self, Display};
-use std::str::FromStr;
-
-use header::{Header, HeaderFormat};
-use header::parsing::{from_one_raw_str, from_comma_delimited};
-
-/// `Range` header, defined in [RFC7233](https://tools.ietf.org/html/rfc7233#section-3.1)
-///
-/// The "Range" header field on a GET request modifies the method
-/// semantics to request transfer of only one or more subranges of the
-/// selected representation data, rather than the entire selected
-/// representation data.
-///
-/// # ABNF
-/// ```plain
-/// Range =	byte-ranges-specifier / other-ranges-specifier
-/// other-ranges-specifier = other-range-unit "=" other-range-set
-/// other-range-set = 1*VCHAR
-///
-/// bytes-unit = "bytes"
-///
-/// byte-ranges-specifier = bytes-unit "=" byte-range-set
-/// byte-range-set = 1#(byte-range-spec / suffix-byte-range-spec)
-/// byte-range-spec = first-byte-pos "-" [last-byte-pos]
-/// first-byte-pos = 1*DIGIT
-/// last-byte-pos = 1*DIGIT
-/// ```
-///
-/// # Example values
-/// * `bytes=1000-`
-/// * `bytes=-2000`
-/// * `bytes=0-1,30-40`
-/// * `bytes=0-10,20-90,-100`
-/// * `custom_unit=0-123`
-/// * `custom_unit=xxx-yyy`
-///
-/// # Examples
-/// ```
-/// use hyper::header::{Headers, Range, ByteRangeSpec};
-///
-/// let mut headers = Headers::new();
-/// headers.set(Range::Bytes(
-///     vec![ByteRangeSpec::FromTo(1, 100), ByteRangeSpec::AllFrom(200)]
-/// ));
-///
-/// headers.clear();
-/// headers.set(Range::Unregistered("letters".to_owned(), "a-f".to_owned()));
-/// ```
-/// ```
-/// use hyper::header::{Headers, Range};
-///
-/// let mut headers = Headers::new();
-/// headers.set(Range::bytes(1, 100));
-///
-/// headers.clear();
-/// headers.set(Range::bytes_multi(vec![(1, 100), (200, 300)]));
-/// ```
-#[derive(PartialEq, Clone, Debug)]
-pub enum Range {
-    /// Byte range
-    Bytes(Vec<ByteRangeSpec>),
-    /// Custom range, with unit not registered at IANA
-    /// (`other-range-unit`: String , `other-range-set`: String)
-    Unregistered(String, String)
-}
-
-/// Each `Range::Bytes` header can contain one or more `ByteRangeSpecs`.
-/// Each `ByteRangeSpec` defines a range of bytes to fetch
-#[derive(PartialEq, Clone, Debug)]
-pub enum ByteRangeSpec {
-    /// Get all bytes between x and y ("x-y")
-    FromTo(u64, u64),
-    /// Get all bytes starting from x ("x-")
-    AllFrom(u64),
-    /// Get last x bytes ("-x")
-    Last(u64)
-}
-
-impl Range {
-    /// Get the most common byte range header ("bytes=from-to")
-    pub fn bytes(from: u64, to: u64) -> Range {
-        Range::Bytes(vec![ByteRangeSpec::FromTo(from, to)])
-    }
-
-    /// Get byte range header with multiple subranges
-    /// ("bytes=from1-to1,from2-to2,fromX-toX")
-    pub fn bytes_multi(ranges: Vec<(u64, u64)>) -> Range {
-        Range::Bytes(ranges.iter().map(|r| ByteRangeSpec::FromTo(r.0, r.1)).collect())
-    }
-}
-
-
-impl fmt::Display for ByteRangeSpec {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            ByteRangeSpec::FromTo(from, to) => write!(f, "{}-{}", from, to),
-            ByteRangeSpec::Last(pos) => write!(f, "-{}", pos),
-            ByteRangeSpec::AllFrom(pos) => write!(f, "{}-", pos),
-        }
-    }
-}
-
-
-impl fmt::Display for Range {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            Range::Bytes(ref ranges) => {
-                try!(write!(f, "bytes="));
-
-                for (i, range) in ranges.iter().enumerate() {
-                    if i != 0 {
-                        try!(f.write_str(","));
-                    }
-                    try!(Display::fmt(range, f));
-                }
-                Ok(())
-            },
-            Range::Unregistered(ref unit, ref range_str) => {
-                write!(f, "{}={}", unit, range_str)
-            },
-        }
-    }
-}
-
-impl FromStr for Range {
-    type Err = ::Error;
-
-    fn from_str(s: &str) -> ::Result<Range> {
-        let mut iter = s.splitn(2, "=");
-
-        match (iter.next(), iter.next()) {
-            (Some("bytes"), Some(ranges)) => {
-                match from_comma_delimited(&[ranges]) {
-                    Ok(ranges) => {
-                        if ranges.is_empty() {
-                            return Err(::Error::Header);
-                        }
-                        Ok(Range::Bytes(ranges))
-                    },
-                    Err(_) => Err(::Error::Header)
-                }
-            }
-            (Some(unit), Some(range_str)) if unit != "" && range_str != "" => {
-                Ok(Range::Unregistered(unit.to_owned(), range_str.to_owned()))
-
-            },
-            _ => Err(::Error::Header)
-        }
-    }
-}
-
-impl FromStr for ByteRangeSpec {
-    type Err = ::Error;
-
-    fn from_str(s: &str) -> ::Result<ByteRangeSpec> {
-        let mut parts = s.splitn(2, "-");
-
-        match (parts.next(), parts.next()) {
-            (Some(""), Some(end)) => {
-                end.parse().or(Err(::Error::Header)).map(ByteRangeSpec::Last)
-            },
-            (Some(start), Some("")) => {
-                start.parse().or(Err(::Error::Header)).map(ByteRangeSpec::AllFrom)
-            },
-            (Some(start), Some(end)) => {
-                match (start.parse(), end.parse()) {
-                    (Ok(start), Ok(end)) if start <= end => Ok(ByteRangeSpec::FromTo(start, end)),
-                    _ => Err(::Error::Header)
-                }
-            },
-            _ => Err(::Error::Header)
-        }
-    }
-}
-
-impl Header for Range {
-
-    fn header_name() -> &'static str {
-        "Range"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<Range> {
-        from_one_raw_str(raw)
-    }
-}
-
-impl HeaderFormat for Range {
-
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        Display::fmt(self, f)
-    }
-
-}
-
-#[test]
-fn test_parse_bytes_range_valid() {
-    let r: Range = Header::parse_header(&[b"bytes=1-100".to_vec()]).unwrap();
-    let r2: Range = Header::parse_header(&[b"bytes=1-100,-".to_vec()]).unwrap();
-    let r3 =  Range::bytes(1, 100);
-    assert_eq!(r, r2);
-    assert_eq!(r2, r3);
-
-    let r: Range = Header::parse_header(&[b"bytes=1-100,200-".to_vec()]).unwrap();
-    let r2: Range = Header::parse_header(&[b"bytes= 1-100 , 101-xxx,  200- ".to_vec()]).unwrap();
-    let r3 =  Range::Bytes(
-        vec![ByteRangeSpec::FromTo(1, 100), ByteRangeSpec::AllFrom(200)]
-    );
-    assert_eq!(r, r2);
-    assert_eq!(r2, r3);
-
-    let r: Range = Header::parse_header(&[b"bytes=1-100,-100".to_vec()]).unwrap();
-    let r2: Range = Header::parse_header(&[b"bytes=1-100, ,,-100".to_vec()]).unwrap();
-    let r3 =  Range::Bytes(
-        vec![ByteRangeSpec::FromTo(1, 100), ByteRangeSpec::Last(100)]
-    );
-    assert_eq!(r, r2);
-    assert_eq!(r2, r3);
-
-    let r: Range = Header::parse_header(&[b"custom=1-100,-100".to_vec()]).unwrap();
-    let r2 =  Range::Unregistered("custom".to_owned(), "1-100,-100".to_owned());
-    assert_eq!(r, r2);
-
-}
-
-#[test]
-fn test_parse_unregistered_range_valid() {
-    let r: Range = Header::parse_header(&[b"custom=1-100,-100".to_vec()]).unwrap();
-    let r2 =  Range::Unregistered("custom".to_owned(), "1-100,-100".to_owned());
-    assert_eq!(r, r2);
-
-    let r: Range = Header::parse_header(&[b"custom=abcd".to_vec()]).unwrap();
-    let r2 =  Range::Unregistered("custom".to_owned(), "abcd".to_owned());
-    assert_eq!(r, r2);
-
-    let r: Range = Header::parse_header(&[b"custom=xxx-yyy".to_vec()]).unwrap();
-    let r2 =  Range::Unregistered("custom".to_owned(), "xxx-yyy".to_owned());
-    assert_eq!(r, r2);
-}
-
-#[test]
-fn test_parse_invalid() {
-    let r: ::Result<Range> = Header::parse_header(&[b"bytes=1-a,-".to_vec()]);
-    assert_eq!(r.ok(), None);
-
-    let r: ::Result<Range> = Header::parse_header(&[b"bytes=1-2-3".to_vec()]);
-    assert_eq!(r.ok(), None);
-
-    let r: ::Result<Range> = Header::parse_header(&[b"abc".to_vec()]);
-    assert_eq!(r.ok(), None);
-
-    let r: ::Result<Range> = Header::parse_header(&[b"bytes=1-100=".to_vec()]);
-    assert_eq!(r.ok(), None);
-
-    let r: ::Result<Range> = Header::parse_header(&[b"bytes=".to_vec()]);
-    assert_eq!(r.ok(), None);
-
-    let r: ::Result<Range> = Header::parse_header(&[b"custom=".to_vec()]);
-    assert_eq!(r.ok(), None);
-
-    let r: ::Result<Range> = Header::parse_header(&[b"=1-100".to_vec()]);
-    assert_eq!(r.ok(), None);
-}
-
-#[test]
-fn test_fmt() {
-    use header::Headers;
-
-    let mut headers = Headers::new();
-
-    headers.set(
-        Range::Bytes(
-            vec![ByteRangeSpec::FromTo(0, 1000), ByteRangeSpec::AllFrom(2000)]
-    ));
-    assert_eq!(&headers.to_string(), "Range: bytes=0-1000,2000-\r\n");
-
-    headers.clear();
-    headers.set(Range::Bytes(vec![]));
-
-    assert_eq!(&headers.to_string(), "Range: bytes=\r\n");
-
-    headers.clear();
-    headers.set(Range::Unregistered("custom".to_owned(), "1-xxx".to_owned()));
-
-    assert_eq!(&headers.to_string(), "Range: custom=1-xxx\r\n");
-}
-
-bench_header!(bytes_multi, Range, { vec![b"bytes=1-1001,2001-3001,10001-".to_vec()]});
-bench_header!(custom_unit, Range, { vec![b"other=0-100000".to_vec()]});
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/referer.rs
+++ /dev/null
@@ -1,41 +0,0 @@
-header! {
-    /// `Referer` header, defined in
-    /// [RFC7231](http://tools.ietf.org/html/rfc7231#section-5.5.2)
-    ///
-    /// The `Referer` [sic] header field allows the user agent to specify a
-    /// URI reference for the resource from which the target URI was obtained
-    /// (i.e., the "referrer", though the field name is misspelled).  A user
-    /// agent MUST NOT include the fragment and userinfo components of the
-    /// URI reference, if any, when generating the Referer field value.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Referer = absolute-URI / partial-URI
-    /// ```
-    ///
-    /// # Example values
-    /// * `http://www.example.org/hypertext/Overview.html`
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, Referer};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(Referer("/People.html#tim".to_owned()));
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, Referer};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(Referer("http://www.example.com/index.html".to_owned()));
-    /// ```
-    // TODO Use URL
-    (Referer, "Referer") => [String]
-
-    test_referer {
-        // Testcase from the RFC
-        test_header!(test1, vec![b"http://www.example.org/hypertext/Overview.html"]);
-    }
-}
-
-bench_header!(bench, Referer, { vec![b"http://foo.com/hello:3000".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/referrer_policy.rs
+++ /dev/null
@@ -1,119 +0,0 @@
-use std::fmt;
-use std::ascii::AsciiExt;
-
-use header::{Header, HeaderFormat, parsing};
-
-/// `Referrer-Policy` header, part of
-/// [Referrer Policy](https://www.w3.org/TR/referrer-policy/#referrer-policy-header)
-///
-/// The `Referrer-Policy` HTTP header specifies the referrer
-/// policy that the user agent applies when determining what
-/// referrer information should be included with requests made,
-/// and with browsing contexts created from the context of the
-/// protected resource.
-///
-/// # ABNF
-/// ```plain
-/// Referrer-Policy: 1#policy-token
-/// policy-token   = "no-referrer" / "no-referrer-when-downgrade"
-///                  / "same-origin" / "origin"
-///                  / "origin-when-cross-origin" / "unsafe-url"
-/// ```
-///
-/// # Example values
-/// * `no-referrer`
-///
-/// # Example
-/// ```
-/// use hyper::header::{Headers, ReferrerPolicy};
-///
-/// let mut headers = Headers::new();
-/// headers.set(ReferrerPolicy::NoReferrer);
-/// ```
-#[derive(Clone, PartialEq, Eq, Debug)]
-pub enum ReferrerPolicy {
-    /// `no-referrer`
-    NoReferrer,
-    /// `no-referrer-when-downgrade`
-    NoReferrerWhenDowngrade,
-    /// `same-origin`
-    SameOrigin,
-    /// `origin`
-    Origin,
-    /// `origin-when-cross-origin`
-    OriginWhenCrossOrigin,
-    /// `unsafe-url`
-    UnsafeUrl,
-     /// `strict-origin`
-    StrictOrigin,
-    ///`strict-origin-when-cross-origin`
-    StrictOriginWhenCrossOrigin,
-}
-
-impl Header for ReferrerPolicy {
-    fn header_name() -> &'static str {
-        static NAME: &'static str = "Referrer-Policy";
-        NAME
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<ReferrerPolicy> {
-        use self::ReferrerPolicy::*;
-        // See https://www.w3.org/TR/referrer-policy/#determine-policy-for-token
-        let headers: Vec<String> = try!(parsing::from_comma_delimited(raw));
-
-        for h in headers.iter().rev() {
-            let slice = &h.to_ascii_lowercase()[..];
-            match slice {
-                "no-referrer" | "never" => return Ok(NoReferrer),
-                "no-referrer-when-downgrade" | "default" => return Ok(NoReferrerWhenDowngrade),
-                "same-origin" => return Ok(SameOrigin),
-                "origin" => return Ok(Origin),
-                "origin-when-cross-origin" => return Ok(OriginWhenCrossOrigin),
-                "strict-origin" => return Ok(StrictOrigin),
-                "strict-origin-when-cross-origin" => return Ok(StrictOriginWhenCrossOrigin),
-                "unsafe-url" | "always" => return Ok(UnsafeUrl),
-                _ => continue,
-            }
-        }
-
-        Err(::Error::Header)
-    }
-}
-
-impl HeaderFormat for ReferrerPolicy {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(self, f)
-    }
-}
-
-impl fmt::Display for ReferrerPolicy {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        use self::ReferrerPolicy::*;
-        f.write_str(match *self {
-            NoReferrer => "no-referrer",
-            NoReferrerWhenDowngrade => "no-referrer-when-downgrade",
-            SameOrigin => "same-origin",
-            Origin => "origin",
-            OriginWhenCrossOrigin => "origin-when-cross-origin",
-            StrictOrigin => "strict-origin",
-            StrictOriginWhenCrossOrigin => "strict-origin-when-cross-origin",
-            UnsafeUrl => "unsafe-url",
-        })
-    }
-}
-
-#[test]
-fn test_parse_header() {
-    let a: ReferrerPolicy = Header::parse_header([b"origin".to_vec()].as_ref()).unwrap();
-    let b = ReferrerPolicy::Origin;
-    assert_eq!(a, b);
-    let e: ::Result<ReferrerPolicy> = Header::parse_header([b"foobar".to_vec()].as_ref());
-    assert!(e.is_err());
-}
-
-#[test]
-fn test_rightmost_header() {
-    let a: ReferrerPolicy = Header::parse_header(&["same-origin, origin, foobar".into()]).unwrap();
-    let b = ReferrerPolicy::Origin;
-    assert_eq!(a, b);
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/server.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-header! {
-    /// `Server` header, defined in [RFC7231](http://tools.ietf.org/html/rfc7231#section-7.4.2)
-    ///
-    /// The `Server` header field contains information about the software
-    /// used by the origin server to handle the request, which is often used
-    /// by clients to help identify the scope of reported interoperability
-    /// problems, to work around or tailor requests to avoid particular
-    /// server limitations, and for analytics regarding server or operating
-    /// system use.  An origin server MAY generate a Server field in its
-    /// responses.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Server = product *( RWS ( product / comment ) )
-    /// ```
-    ///
-    /// # Example values
-    /// * `CERN/3.0 libwww/2.17`
-    ///
-    /// # Example
-    /// ```
-    /// use hyper::header::{Headers, Server};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(Server("hyper/0.5.2".to_owned()));
-    /// ```
-    // TODO: Maybe parse as defined in the spec?
-    (Server, "Server") => [String]
-
-    test_server {
-        // Testcase from RFC
-        test_header!(test1, vec![b"CERN/3.0 libwww/2.17"]);
-    }
-}
-
-bench_header!(bench, Server, { vec![b"Some String".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/set_cookie.rs
+++ /dev/null
@@ -1,121 +0,0 @@
-use header::{Header, HeaderFormat};
-use std::fmt::{self};
-use std::str::from_utf8;
-
-
-/// `Set-Cookie` header, defined [RFC6265](http://tools.ietf.org/html/rfc6265#section-4.1)
-///
-/// The Set-Cookie HTTP response header is used to send cookies from the
-/// server to the user agent.
-///
-/// Informally, the Set-Cookie response header contains the header name
-/// "Set-Cookie" followed by a ":" and a cookie.  Each cookie begins with
-/// a name-value-pair, followed by zero or more attribute-value pairs.
-///
-/// # ABNF
-/// ```plain
-///  set-cookie-header = "Set-Cookie:" SP set-cookie-string
-/// set-cookie-string = cookie-pair *( ";" SP cookie-av )
-/// cookie-pair       = cookie-name "=" cookie-value
-/// cookie-name       = token
-/// cookie-value      = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )
-/// cookie-octet      = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E
-///                       ; US-ASCII characters excluding CTLs,
-///                       ; whitespace DQUOTE, comma, semicolon,
-///                       ; and backslash
-/// token             = <token, defined in [RFC2616], Section 2.2>
-///
-/// cookie-av         = expires-av / max-age-av / domain-av /
-///                    path-av / secure-av / httponly-av /
-///                     extension-av
-/// expires-av        = "Expires=" sane-cookie-date
-/// sane-cookie-date  = <rfc1123-date, defined in [RFC2616], Section 3.3.1>
-/// max-age-av        = "Max-Age=" non-zero-digit *DIGIT
-///                       ; In practice, both expires-av and max-age-av
-///                       ; are limited to dates representable by the
-///                       ; user agent.
-/// non-zero-digit    = %x31-39
-///                       ; digits 1 through 9
-/// domain-av         = "Domain=" domain-value
-/// domain-value      = <subdomain>
-///                       ; defined in [RFC1034], Section 3.5, as
-///                       ; enhanced by [RFC1123], Section 2.1
-/// path-av           = "Path=" path-value
-/// path-value        = <any CHAR except CTLs or ";">
-/// secure-av         = "Secure"
-/// httponly-av       = "HttpOnly"
-/// extension-av      = <any CHAR except CTLs or ";">
-/// ```
-///
-/// # Example values
-/// * `SID=31d4d96e407aad42`
-/// * `lang=en-US; Expires=Wed, 09 Jun 2021 10:18:14 GMT`
-/// * `lang=; Expires=Sun, 06 Nov 1994 08:49:37 GMT`
-/// * `lang=en-US; Path=/; Domain=example.com`
-///
-/// # Example
-/// ```
-/// use hyper::header::{Headers, SetCookie};
-///
-/// let mut headers = Headers::new();
-///
-/// headers.set(
-///     SetCookie(vec![
-///         String::from("foo=bar; Path=/path; Domain=example.com")
-///     ])
-/// );
-/// ```
-#[derive(Clone, PartialEq, Debug)]
-pub struct SetCookie(pub Vec<String>);
-
-__hyper__deref!(SetCookie => Vec<String>);
-
-impl Header for SetCookie {
-    fn header_name() -> &'static str {
-        "Set-Cookie"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<SetCookie> {
-        let mut set_cookies = Vec::with_capacity(raw.len());
-        for set_cookies_raw in raw {
-            if let Ok(s) = from_utf8(&set_cookies_raw[..]) {
-                set_cookies.push(s.trim().to_owned());
-            }
-        }
-
-        if !set_cookies.is_empty() {
-            Ok(SetCookie(set_cookies))
-        } else {
-            Err(::Error::Header)
-        }
-    }
-
-}
-
-impl HeaderFormat for SetCookie {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        if self.0.len() == 1 {
-            write!(f, "{}", &self.0[0])
-        } else {
-            panic!("SetCookie with multiple cookies cannot be used with fmt_header, must use fmt_multi_header");
-        }
-    }
-
-    fn fmt_multi_header(&self, f: &mut ::header::MultilineFormatter) -> fmt::Result {
-        for cookie in &self.0 {
-            try!(f.fmt_line(cookie));
-        }
-        Ok(())
-    }
-}
-
-#[test]
-fn test_set_cookie_fmt() {
-    use ::header::Headers;
-    let mut headers = Headers::new();
-    headers.set(SetCookie(vec![
-        "foo=bar".into(),
-        "baz=quux".into(),
-    ]));
-    assert_eq!(headers.to_string(), "Set-Cookie: foo=bar\r\nSet-Cookie: baz=quux\r\n");
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/strict_transport_security.rs
+++ /dev/null
@@ -1,201 +0,0 @@
-use std::fmt;
-use std::str::{self, FromStr};
-
-use unicase::UniCase;
-
-use header::{Header, HeaderFormat, parsing};
-
-/// `StrictTransportSecurity` header, defined in [RFC6797](https://tools.ietf.org/html/rfc6797)
-///
-/// This specification defines a mechanism enabling web sites to declare
-/// themselves accessible only via secure connections and/or for users to be
-/// able to direct their user agent(s) to interact with given sites only over
-/// secure connections.  This overall policy is referred to as HTTP Strict
-/// Transport Security (HSTS).  The policy is declared by web sites via the
-/// Strict-Transport-Security HTTP response header field and/or by other means,
-/// such as user agent configuration, for example.
-///
-/// # ABNF
-///
-/// ```plain
-///      [ directive ]  *( ";" [ directive ] )
-///
-///      directive                 = directive-name [ "=" directive-value ]
-///      directive-name            = token
-///      directive-value           = token | quoted-string
-///
-/// ```
-///
-/// # Example values
-/// * `max-age=31536000`
-/// * `max-age=15768000 ; includeSubDomains`
-///
-/// # Example
-/// ```
-/// # extern crate hyper;
-/// # fn main() {
-/// use hyper::header::{Headers, StrictTransportSecurity};
-///
-/// let mut headers = Headers::new();
-///
-/// headers.set(
-///    StrictTransportSecurity::including_subdomains(31536000u64)
-/// );
-/// # }
-/// ```
-#[derive(Clone, PartialEq, Debug)]
-pub struct StrictTransportSecurity {
-    /// Signals the UA that the HSTS Policy applies to this HSTS Host as well as
-    /// any subdomains of the host's domain name.
-    pub include_subdomains: bool,
-
-    /// Specifies the number of seconds, after the reception of the STS header
-    /// field, during which the UA regards the host (from whom the message was
-    /// received) as a Known HSTS Host.
-    pub max_age: u64
-}
-
-impl StrictTransportSecurity {
-    /// Create an STS header that includes subdomains
-    pub fn including_subdomains(max_age: u64) -> StrictTransportSecurity {
-        StrictTransportSecurity {
-            max_age: max_age,
-            include_subdomains: true
-        }
-    }
-
-    /// Create an STS header that excludes subdomains
-    pub fn excluding_subdomains(max_age: u64) -> StrictTransportSecurity {
-        StrictTransportSecurity {
-            max_age: max_age,
-            include_subdomains: false
-        }
-    }
-}
-
-enum Directive {
-    MaxAge(u64),
-    IncludeSubdomains,
-    Unknown
-}
-
-impl FromStr for StrictTransportSecurity {
-    type Err = ::Error;
-
-    fn from_str(s: &str) -> ::Result<StrictTransportSecurity> {
-        s.split(';')
-            .map(str::trim)
-            .map(|sub| if UniCase(sub) == UniCase("includeSubdomains") {
-                Ok(Directive::IncludeSubdomains)
-            } else {
-                let mut sub = sub.splitn(2, '=');
-                match (sub.next(), sub.next()) {
-                    (Some(left), Some(right))
-                    if UniCase(left.trim()) == UniCase("max-age") => {
-                        right
-                            .trim()
-                            .trim_matches('"')
-                            .parse()
-                            .map(Directive::MaxAge)
-                    },
-                    _ => Ok(Directive::Unknown)
-                }
-            })
-            .fold(Ok((None, None)), |res, dir| match (res, dir) {
-                (Ok((None, sub)), Ok(Directive::MaxAge(age))) => Ok((Some(age), sub)),
-                (Ok((age, None)), Ok(Directive::IncludeSubdomains)) => Ok((age, Some(()))),
-                (Ok((Some(_), _)), Ok(Directive::MaxAge(_))) => Err(::Error::Header),
-                (Ok((_, Some(_))), Ok(Directive::IncludeSubdomains)) => Err(::Error::Header),
-                (_, Err(_)) => Err(::Error::Header),
-                (res, _) => res
-            })
-            .and_then(|res| match res {
-                (Some(age), sub) => Ok(StrictTransportSecurity {
-                    max_age: age,
-                    include_subdomains: sub.is_some()
-                }),
-                _ => Err(::Error::Header)
-            })
-    }
-}
-
-impl Header for StrictTransportSecurity {
-    fn header_name() -> &'static str {
-        "Strict-Transport-Security"
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<StrictTransportSecurity> {
-        parsing::from_one_raw_str(raw)
-    }
-}
-
-impl HeaderFormat for StrictTransportSecurity {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(self, f)
-    }
-}
-
-impl fmt::Display for StrictTransportSecurity {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        if self.include_subdomains {
-            write!(f, "max-age={}; includeSubdomains", self.max_age)
-        } else {
-            write!(f, "max-age={}", self.max_age)
-        }
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use super::StrictTransportSecurity;
-    use header::Header;
-
-    #[test]
-    fn test_parse_max_age() {
-        let h = Header::parse_header(&[b"max-age=31536000".to_vec()][..]);
-        assert_eq!(h.ok(), Some(StrictTransportSecurity { include_subdomains: false, max_age: 31536000u64 }));
-    }
-
-    #[test]
-    fn test_parse_max_age_no_value() {
-        let h: ::Result<StrictTransportSecurity> = Header::parse_header(&[b"max-age".to_vec()][..]);
-        assert!(h.is_err());
-    }
-
-    #[test]
-    fn test_parse_quoted_max_age() {
-        let h = Header::parse_header(&[b"max-age=\"31536000\"".to_vec()][..]);
-        assert_eq!(h.ok(), Some(StrictTransportSecurity { include_subdomains: false, max_age: 31536000u64 }));
-    }
-
-    #[test]
-    fn test_parse_spaces_max_age() {
-        let h = Header::parse_header(&[b"max-age = 31536000".to_vec()][..]);
-        assert_eq!(h.ok(), Some(StrictTransportSecurity { include_subdomains: false, max_age: 31536000u64 }));
-    }
-
-    #[test]
-    fn test_parse_include_subdomains() {
-        let h = Header::parse_header(&[b"max-age=15768000 ; includeSubDomains".to_vec()][..]);
-        assert_eq!(h.ok(), Some(StrictTransportSecurity { include_subdomains: true, max_age: 15768000u64 }));
-    }
-
-    #[test]
-    fn test_parse_no_max_age() {
-        let h: ::Result<StrictTransportSecurity> = Header::parse_header(&[b"includeSubDomains".to_vec()][..]);
-        assert!(h.is_err());
-    }
-
-    #[test]
-    fn test_parse_max_age_nan() {
-        let h: ::Result<StrictTransportSecurity> = Header::parse_header(&[b"max-age = derp".to_vec()][..]);
-        assert!(h.is_err());
-    }
-
-    #[test]
-    fn test_parse_duplicate_directives() {
-        assert!(StrictTransportSecurity::parse_header(&[b"max-age=100; max-age=5; max-age=0".to_vec()][..]).is_err());
-    }
-}
-
-bench_header!(bench, StrictTransportSecurity, { vec![b"max-age=15768000 ; includeSubDomains".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/transfer_encoding.rs
+++ /dev/null
@@ -1,53 +0,0 @@
-use header::Encoding;
-
-header! {
-    /// `Transfer-Encoding` header, defined in
-    /// [RFC7230](http://tools.ietf.org/html/rfc7230#section-3.3.1)
-    /// 
-    /// The `Transfer-Encoding` header field lists the transfer coding names
-    /// corresponding to the sequence of transfer codings that have been (or
-    /// will be) applied to the payload body in order to form the message
-    /// body.
-    /// 
-    /// # ABNF
-    /// ```plain
-    /// Transfer-Encoding = 1#transfer-coding
-    /// ```
-    /// 
-    /// # Example values
-    /// * `gzip, chunked`
-    /// 
-    /// # Example
-    /// ```
-    /// use hyper::header::{Headers, TransferEncoding, Encoding};
-    /// 
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     TransferEncoding(vec![
-    ///         Encoding::Gzip,
-    ///         Encoding::Chunked,
-    ///     ])
-    /// );
-    /// ```
-    (TransferEncoding, "Transfer-Encoding") => (Encoding)+
-
-    transfer_encoding {
-        test_header!(
-            test1,
-            vec![b"gzip, chunked"],
-            Some(HeaderField(
-                vec![Encoding::Gzip, Encoding::Chunked]
-                )));
-        // Issue: #683
-        test_header!(
-            test2,
-            vec![b"chunked", b"chunked"],
-            Some(HeaderField(
-                vec![Encoding::Chunked, Encoding::Chunked]
-            )));
-
-    }
-}
-
-bench_header!(normal, TransferEncoding, { vec![b"chunked, gzip".to_vec()] });
-bench_header!(ext, TransferEncoding, { vec![b"ext".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/upgrade.rs
+++ /dev/null
@@ -1,158 +0,0 @@
-use std::fmt::{self, Display};
-use std::str::FromStr;
-use unicase::UniCase;
-
-header! {
-    /// `Upgrade` header, defined in [RFC7230](http://tools.ietf.org/html/rfc7230#section-6.7)
-    ///
-    /// The `Upgrade` header field is intended to provide a simple mechanism
-    /// for transitioning from HTTP/1.1 to some other protocol on the same
-    /// connection.  A client MAY send a list of protocols in the Upgrade
-    /// header field of a request to invite the server to switch to one or
-    /// more of those protocols, in order of descending preference, before
-    /// sending the final response.  A server MAY ignore a received Upgrade
-    /// header field if it wishes to continue using the current protocol on
-    /// that connection.  Upgrade cannot be used to insist on a protocol
-    /// change.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Upgrade          = 1#protocol
-    ///
-    /// protocol         = protocol-name ["/" protocol-version]
-    /// protocol-name    = token
-    /// protocol-version = token
-    /// ```
-    ///
-    /// # Example values
-    /// * `HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11`
-    ///
-    /// # Examples
-    /// ```
-    /// use hyper::header::{Headers, Upgrade, Protocol, ProtocolName};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(Upgrade(vec![Protocol::new(ProtocolName::WebSocket, None)]));
-    /// ```
-    /// ```
-    /// use hyper::header::{Headers, Upgrade, Protocol, ProtocolName};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     Upgrade(vec![
-    ///         Protocol::new(ProtocolName::Http, Some("2.0".to_owned())),
-    ///         Protocol::new(ProtocolName::Unregistered("SHTTP".to_owned()),
-    ///             Some("1.3".to_owned())),
-    ///         Protocol::new(ProtocolName::Unregistered("IRC".to_owned()),
-    ///             Some("6.9".to_owned())),
-    ///     ])
-    /// );
-    /// ```
-    (Upgrade, "Upgrade") => (Protocol)+
-
-    test_upgrade {
-        // Testcase from the RFC
-        test_header!(
-            test1,
-            vec![b"HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11"],
-            Some(Upgrade(vec![
-                Protocol::new(ProtocolName::Http, Some("2.0".to_owned())),
-                Protocol::new(ProtocolName::Unregistered("SHTTP".to_owned()),
-                    Some("1.3".to_owned())),
-                Protocol::new(ProtocolName::Unregistered("IRC".to_owned()), Some("6.9".to_owned())),
-                Protocol::new(ProtocolName::Unregistered("RTA".to_owned()), Some("x11".to_owned())),
-                ])));
-        // Own tests
-        test_header!(
-            test2, vec![b"websocket"],
-            Some(Upgrade(vec![Protocol::new(ProtocolName::WebSocket, None)])));
-        #[test]
-        fn test3() {
-            let x: ::Result<Upgrade> = Header::parse_header(&[b"WEbSOCKet".to_vec()]);
-            assert_eq!(x.ok(), Some(Upgrade(vec![Protocol::new(ProtocolName::WebSocket, None)])));
-        }
-    }
-}
-
-/// A protocol name used to identify a spefic protocol. Names are case-sensitive
-/// except for the `WebSocket` value.
-#[derive(Clone, Debug, Eq, PartialEq)]
-pub enum ProtocolName {
-    /// `HTTP` value, Hypertext Transfer Protocol
-    Http,
-    /// `TLS` value, Transport Layer Security [RFC2817](http://tools.ietf.org/html/rfc2817)
-    Tls,
-    /// `WebSocket` value, matched case insensitively,Web Socket Protocol
-    /// [RFC6455](http://tools.ietf.org/html/rfc6455)
-    WebSocket,
-    /// `h2c` value, HTTP/2 over cleartext TCP
-    H2c,
-    /// Any other protocol name not known to hyper
-    Unregistered(String),
-}
-
-impl FromStr for ProtocolName {
-    type Err = ();
-    fn from_str(s: &str) -> Result<ProtocolName, ()> {
-        Ok(match s {
-            "HTTP" => ProtocolName::Http,
-            "TLS" => ProtocolName::Tls,
-            "h2c" => ProtocolName::H2c,
-            _ => {
-                if UniCase(s) == UniCase("websocket") {
-                    ProtocolName::WebSocket
-                } else {
-                    ProtocolName::Unregistered(s.to_owned())
-                }
-            }
-        })
-    }
-}
-
-impl Display for ProtocolName {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.write_str(match *self {
-            ProtocolName::Http => "HTTP",
-            ProtocolName::Tls => "TLS",
-            ProtocolName::WebSocket => "websocket",
-            ProtocolName::H2c => "h2c",
-            ProtocolName::Unregistered(ref s) => s,
-        })
-    }
-}
-
-/// Protocols that appear in the `Upgrade` header field
-#[derive(Clone, Debug, Eq, PartialEq)]
-pub struct Protocol {
-    /// The protocol identifier
-    pub name: ProtocolName,
-    /// The optional version of the protocol, often in the format "DIGIT.DIGIT" (e.g.. "1.2")
-    pub version: Option<String>,
-}
-
-impl Protocol {
-    /// Creates a new Protocol with the given name and version
-    pub fn new(name: ProtocolName, version: Option<String>) -> Protocol {
-        Protocol { name: name, version: version }
-    }
-}
-
-impl FromStr for Protocol {
-    type Err =();
-    fn from_str(s: &str) -> Result<Protocol, ()> {
-        let mut parts = s.splitn(2, '/');
-        Ok(Protocol::new(try!(parts.next().unwrap().parse()), parts.next().map(|x| x.to_owned())))
-    }
-}
-
-impl Display for Protocol {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(fmt::Display::fmt(&self.name, f));
-        if let Some(ref version) = self.version {
-            try!(write!(f, "/{}", version));
-        }
-        Ok(())
-    }
-}
-
-bench_header!(bench, Upgrade, { vec![b"HTTP/2.0, RTA/x11, websocket".to_vec()] });
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/user_agent.rs
+++ /dev/null
@@ -1,42 +0,0 @@
-header! {
-    /// `User-Agent` header, defined in
-    /// [RFC7231](http://tools.ietf.org/html/rfc7231#section-5.5.3)
-    ///
-    /// The `User-Agent` header field contains information about the user
-    /// agent originating the request, which is often used by servers to help
-    /// identify the scope of reported interoperability problems, to work
-    /// around or tailor responses to avoid particular user agent
-    /// limitations, and for analytics regarding browser or operating system
-    /// use.  A user agent SHOULD send a User-Agent field in each request
-    /// unless specifically configured not to do so.
-    ///
-    /// # ABNF
-    /// ```plain
-    /// User-Agent = product *( RWS ( product / comment ) )
-    /// product         = token ["/" product-version]
-    /// product-version = token
-    /// ```
-    ///
-    /// # Example values
-    /// * `CERN-LineMode/2.15 libwww/2.17b3`
-    /// * `Bunnies`
-    ///
-    /// # Notes
-    /// * The parser does not split the value
-    ///
-    /// # Example
-    /// ```
-    /// use hyper::header::{Headers, UserAgent};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(UserAgent("hyper/0.5.2".to_owned()));
-    /// ```
-    (UserAgent, "User-Agent") => [String]
-
-    test_user_agent {
-        // Testcase from RFC
-        test_header!(test1, vec![b"CERN-LineMode/2.15 libwww/2.17b3"]);
-        // Own testcase
-        test_header!(test2, vec![b"Bunnies"], Some(UserAgent("Bunnies".to_owned())));
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/common/vary.rs
+++ /dev/null
@@ -1,66 +0,0 @@
-use unicase::UniCase;
-
-header! {
-    /// `Vary` header, defined in [RFC7231](https://tools.ietf.org/html/rfc7231#section-7.1.4)
-    ///
-    /// The "Vary" header field in a response describes what parts of a
-    /// request message, aside from the method, Host header field, and
-    /// request target, might influence the origin server's process for
-    /// selecting and representing this response.  The value consists of
-    /// either a single asterisk ("*") or a list of header field names
-    /// (case-insensitive).
-    ///
-    /// # ABNF
-    /// ```plain
-    /// Vary = "*" / 1#field-name
-    /// ```
-    ///
-    /// # Example values
-    /// * `accept-encoding, accept-language`
-    ///
-    /// # Example
-    /// ```
-    /// use hyper::header::{Headers, Vary};
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(Vary::Any);
-    /// ```
-    ///
-    /// # Example
-    /// ```
-    /// # extern crate hyper;
-    /// # extern crate unicase;
-    /// # fn main() {
-    /// // extern crate unicase;
-    ///
-    /// use hyper::header::{Headers, Vary};
-    /// use unicase::UniCase;
-    ///
-    /// let mut headers = Headers::new();
-    /// headers.set(
-    ///     Vary::Items(vec![
-    ///         UniCase("accept-encoding".to_owned()),
-    ///         UniCase("accept-language".to_owned()),
-    ///     ])
-    /// );
-    /// # }
-    /// ```
-    (Vary, "Vary") => {Any / (UniCase<String>)+}
-
-    test_vary {
-        test_header!(test1, vec![b"accept-encoding, accept-language"]);
-
-        #[test]
-        fn test2() {
-            let mut vary: ::Result<Vary>;
-
-            vary = Header::parse_header([b"*".to_vec()].as_ref());
-            assert_eq!(vary.ok(), Some(Vary::Any));
-
-            vary = Header::parse_header([b"etag,cookie,allow".to_vec()].as_ref());
-            assert_eq!(vary.ok(), Some(Vary::Items(vec!["eTag".parse().unwrap(),
-                                                        "cookIE".parse().unwrap(),
-                                                        "AlLOw".parse().unwrap(),])));
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/internals/cell.rs
+++ /dev/null
@@ -1,204 +0,0 @@
-use std::any::{Any, TypeId};
-use std::cell::UnsafeCell;
-use std::collections::HashMap;
-use std::fmt;
-use std::mem;
-use std::ops::Deref;
-
-pub struct OptCell<T>(UnsafeCell<Option<T>>);
-
-impl<T> OptCell<T> {
-    #[inline]
-    pub fn new(val: Option<T>) -> OptCell<T> {
-        OptCell(UnsafeCell::new(val))
-    }
-
-    #[inline]
-    pub fn set(&self, val: T) {
-        unsafe {
-            let opt = self.0.get();
-            debug_assert!((*opt).is_none());
-            *opt = Some(val)
-        }
-    }
-
-    #[inline]
-    pub unsafe fn get_mut(&mut self) -> &mut T {
-        let opt = &mut *self.0.get();
-        opt.as_mut().unwrap()
-    }
-}
-
-impl<T> Deref for OptCell<T> {
-    type Target = Option<T>;
-    #[inline]
-    fn deref(&self) -> &Option<T> {
-        unsafe { &*self.0.get() }
-    }
-}
-
-impl<T: Clone> Clone for OptCell<T> {
-    #[inline]
-    fn clone(&self) -> OptCell<T> {
-        OptCell::new((**self).clone())
-    }
-}
-
-pub struct PtrMapCell<V: ?Sized>(UnsafeCell<PtrMap<Box<V>>>);
-
-#[derive(Clone, Debug)]
-enum PtrMap<T> {
-    Empty,
-    One(TypeId, T),
-    Many(HashMap<TypeId, T>)
-}
-
-impl<V: ?Sized + fmt::Debug + Any + 'static> PtrMapCell<V> {
-    #[inline]
-    pub fn new() -> PtrMapCell<V> {
-        PtrMapCell(UnsafeCell::new(PtrMap::Empty))
-    }
-
-    #[inline]
-    pub fn get(&self, key: TypeId) -> Option<&V> {
-        let map = unsafe { &*self.0.get() };
-        match *map {
-            PtrMap::Empty => None,
-            PtrMap::One(id, ref v) => if id == key {
-                Some(v)
-            } else {
-                None
-            },
-            PtrMap::Many(ref hm) => hm.get(&key)
-        }.map(|val| &**val)
-    }
-
-    #[inline]
-    pub fn get_mut(&mut self, key: TypeId) -> Option<&mut V> {
-        let mut map = unsafe { &mut *self.0.get() };
-        match *map {
-            PtrMap::Empty => None,
-            PtrMap::One(id, ref mut v) => if id == key {
-                Some(v)
-            } else {
-                None
-            },
-            PtrMap::Many(ref mut hm) => hm.get_mut(&key)
-        }.map(|val| &mut **val)
-    }
-
-    #[inline]
-    pub unsafe fn insert(&self, key: TypeId, val: Box<V>) {
-        let mut map = &mut *self.0.get();
-        match *map {
-            PtrMap::Empty => *map = PtrMap::One(key, val),
-            PtrMap::One(..) => {
-                let one = mem::replace(map, PtrMap::Empty);
-                match one {
-                    PtrMap::One(id, one) => {
-                        debug_assert!(id != key);
-                        let mut hm = HashMap::with_capacity(2);
-                        hm.insert(id, one);
-                        hm.insert(key, val);
-                        mem::replace(map, PtrMap::Many(hm));
-                    },
-                    _ => unreachable!()
-                }
-            },
-            PtrMap::Many(ref mut hm) => { hm.insert(key, val); }
-        }
-    }
-
-    #[inline]
-    pub unsafe fn one(&self) -> &V {
-        let map = &*self.0.get();
-        match *map {
-            PtrMap::One(_, ref one) => one,
-            _ => panic!("not PtrMap::One value, {:?}", *map)
-        }
-    }
-}
-
-impl<V: ?Sized + fmt::Debug + Any + 'static> Clone for PtrMapCell<V> where Box<V>: Clone {
-    #[inline]
-    fn clone(&self) -> PtrMapCell<V> {
-        let cell = PtrMapCell::new();
-        unsafe {
-            *cell.0.get() = (&*self.0.get()).clone()
-        }
-        cell
-    }
-}
-
-#[cfg(test)]
-mod test {
-    use std::any::TypeId;
-    use super::*;
-
-    #[test]
-    fn test_opt_cell_set() {
-        let one:OptCell<u32> = OptCell::new(None);
-        one.set(1);
-        assert_eq!(*one,Some(1));
-    }
-
-    #[test]
-    fn test_opt_cell_clone() {
-        let one:OptCell<u32> = OptCell::new(Some(3));
-        let stored = *one.clone();
-        assert_eq!(stored,Some(3));
-    }
-
-
-    #[test]
-    fn test_ptr_map_cell_none() {
-        let type_id = TypeId::of::<u32>();
-        let pm:PtrMapCell<u32> = PtrMapCell::new();
-        assert_eq!(pm.get(type_id),None);
-    }
-
-    #[test]
-    fn test_ptr_map_cell_one() {
-        let type_id = TypeId::of::<String>();
-        let pm:PtrMapCell<String> = PtrMapCell::new();
-        unsafe { pm.insert(type_id, Box::new("a".to_string())); }
-        assert_eq!(pm.get(type_id), Some(&"a".to_string()));
-        assert_eq!(unsafe {pm.one()}, "a");
-    }
-
-    #[test]
-    fn test_ptr_map_cell_two() {
-        let type_id = TypeId::of::<String>();
-        let type_id2 = TypeId::of::<Vec<u8>>();
-        let pm:PtrMapCell<String> = PtrMapCell::new();
-        unsafe { pm.insert(type_id, Box::new("a".to_string())); }
-        unsafe { pm.insert(type_id2, Box::new("b".to_string())); }
-        assert_eq!(pm.get(type_id), Some(&"a".to_string()));
-        assert_eq!(pm.get(type_id2), Some(&"b".to_string()));
-    }
-
-    #[test]
-    fn test_ptr_map_cell_many() {
-        let id1 = TypeId::of::<String>();
-        let id2 = TypeId::of::<Vec<u8>>();
-        let id3 = TypeId::of::<OptCell<String>>();
-        let pm:PtrMapCell<String> = PtrMapCell::new();
-        unsafe { pm.insert(id1, Box::new("a".to_string())); }
-        unsafe { pm.insert(id2, Box::new("b".to_string())); }
-        unsafe { pm.insert(id3, Box::new("c".to_string())); }
-        assert_eq!(pm.get(id1), Some(&"a".to_string()));
-        assert_eq!(pm.get(id2), Some(&"b".to_string()));
-        assert_eq!(pm.get(id3), Some(&"c".to_string()));
-    }
-
-
-    #[test]
-    fn test_ptr_map_cell_clone() {
-        let type_id = TypeId::of::<String>();
-        let pm:PtrMapCell<String> = PtrMapCell::new();
-        unsafe { pm.insert(type_id, Box::new("a".to_string())); }
-        let cloned = pm.clone();
-        assert_eq!(cloned.get(type_id), Some(&"a".to_string()));
-    }
-
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/internals/item.rs
+++ /dev/null
@@ -1,121 +0,0 @@
-use std::any::Any;
-use std::any::TypeId;
-use std::fmt;
-use std::str::from_utf8;
-
-use super::cell::{OptCell, PtrMapCell};
-use header::{Header, HeaderFormat, MultilineFormatter};
-
-
-#[derive(Clone)]
-pub struct Item {
-    raw: OptCell<Vec<Vec<u8>>>,
-    typed: PtrMapCell<HeaderFormat + Send + Sync>
-}
-
-impl Item {
-    #[inline]
-    pub fn new_raw(data: Vec<Vec<u8>>) -> Item {
-        Item {
-            raw: OptCell::new(Some(data)),
-            typed: PtrMapCell::new(),
-        }
-    }
-
-    #[inline]
-    pub fn new_typed(ty: Box<HeaderFormat + Send + Sync>) -> Item {
-        let map = PtrMapCell::new();
-        unsafe { map.insert((*ty).get_type(), ty); }
-        Item {
-            raw: OptCell::new(None),
-            typed: map,
-        }
-    }
-
-    #[inline]
-    pub fn raw_mut(&mut self) -> &mut Vec<Vec<u8>> {
-        self.raw();
-        self.typed = PtrMapCell::new();
-        unsafe {
-            self.raw.get_mut()
-        }
-    }
-
-    pub fn raw(&self) -> &[Vec<u8>] {
-        if let Some(ref raw) = *self.raw {
-            return &raw[..];
-        }
-
-        let raw = vec![unsafe { self.typed.one() }.to_string().into_bytes()];
-        self.raw.set(raw);
-
-        let raw = self.raw.as_ref().unwrap();
-        &raw[..]
-    }
-
-    pub fn typed<H: Header + HeaderFormat + Any>(&self) -> Option<&H> {
-        let tid = TypeId::of::<H>();
-        match self.typed.get(tid) {
-            Some(val) => Some(val),
-            None => {
-                match parse::<H>(self.raw.as_ref().expect("item.raw must exist")) {
-                    Ok(typed) => {
-                        unsafe { self.typed.insert(tid, typed); }
-                        self.typed.get(tid)
-                    },
-                    Err(_) => None
-                }
-            }
-        }.map(|typed| unsafe { typed.downcast_ref_unchecked() })
-    }
-
-    pub fn typed_mut<H: Header + HeaderFormat>(&mut self) -> Option<&mut H> {
-        let tid = TypeId::of::<H>();
-        if self.typed.get_mut(tid).is_none() {
-            match parse::<H>(self.raw.as_ref().expect("item.raw must exist")) {
-                Ok(typed) => {
-                    unsafe { self.typed.insert(tid, typed); }
-                },
-                Err(_) => ()
-            }
-        }
-        if self.raw.is_some() && self.typed.get_mut(tid).is_some() {
-            self.raw = OptCell::new(None);
-        }
-        self.typed.get_mut(tid).map(|typed| unsafe { typed.downcast_mut_unchecked() })
-    }
-
-    pub fn write_h1(&self, f: &mut MultilineFormatter) -> fmt::Result {
-        match *self.raw {
-            Some(ref raw) => {
-                for part in raw.iter() {
-                    match from_utf8(&part[..]) {
-                        Ok(s) => {
-                            try!(f.fmt_line(&s));
-                        },
-                        Err(_) => {
-                            error!("raw header value is not utf8, value={:?}", part);
-                            return Err(fmt::Error);
-                        }
-                    }
-                }
-                Ok(())
-            },
-            None => {
-                let typed = unsafe { self.typed.one() };
-                typed.fmt_multi_header(f)
-            }
-        }
-    }
-}
-
-#[inline]
-fn parse<H: Header + HeaderFormat>(raw: &Vec<Vec<u8>>) ->
-        ::Result<Box<HeaderFormat + Send + Sync>> {
-    Header::parse_header(&raw[..]).map(|h: H| {
-        // FIXME: Use Type ascription
-        let h: Box<HeaderFormat + Send + Sync> = Box::new(h);
-        h
-    })
-}
-
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/internals/mod.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-pub use self::item::Item;
-pub use self::vec_map::{VecMap, Entry};
-
-mod cell;
-mod item;
-mod vec_map;
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/internals/vec_map.rs
+++ /dev/null
@@ -1,89 +0,0 @@
-#[derive(Clone)]
-pub struct VecMap<K, V> {
-    vec: Vec<(K, V)>,
-}
-
-impl<K: PartialEq, V> VecMap<K, V> {
-    pub fn new() -> VecMap<K, V> {
-        VecMap {
-            vec: Vec::new()
-        }
-    }
-
-    pub fn insert(&mut self, key: K, value: V) {
-        match self.find(&key) {
-            Some(pos) => self.vec[pos] = (key, value),
-            None => self.vec.push((key, value))
-        }
-    }
-
-    pub fn entry(&mut self, key: K) -> Entry<K, V> {
-        match self.find(&key) {
-            Some(pos) => Entry::Occupied(OccupiedEntry {
-                vec: self,
-                pos: pos,
-            }),
-            None => Entry::Vacant(VacantEntry {
-                vec: self,
-                key: key,
-            })
-        }
-    }
-
-    pub fn get(&self, key: &K) -> Option<&V> {
-        self.find(key).map(move |pos| &self.vec[pos].1)
-    }
-
-    pub fn get_mut(&mut self, key: &K) -> Option<&mut V> {
-        self.find(key).map(move |pos| &mut self.vec[pos].1)
-    }
-
-    pub fn contains_key(&self, key: &K) -> bool {
-        self.find(key).is_some()
-    }
-
-    pub fn len(&self) -> usize { self.vec.len() }
-    pub fn iter(&self) -> ::std::slice::Iter<(K, V)> {
-        self.vec.iter()
-    }
-    pub fn remove(&mut self, key: &K) -> Option<V> {
-        self.find(key).map(|pos| self.vec.remove(pos)).map(|(_, v)| v)
-    }
-    pub fn clear(&mut self) {
-        self.vec.clear();
-    }
-
-    fn find(&self, key: &K) -> Option<usize> {
-        self.vec.iter().position(|entry| key == &entry.0)
-    }
-}
-
-pub enum Entry<'a, K: 'a, V: 'a> {
-    Vacant(VacantEntry<'a, K, V>),
-    Occupied(OccupiedEntry<'a, K, V>)
-}
-
-pub struct VacantEntry<'a, K: 'a, V: 'a> {
-    vec: &'a mut VecMap<K, V>,
-    key: K,
-}
-
-impl<'a, K, V> VacantEntry<'a, K, V> {
-    pub fn insert(self, val: V) -> &'a mut V {
-        let mut vec = self.vec;
-        vec.vec.push((self.key, val));
-        let pos = vec.vec.len() - 1;
-        &mut vec.vec[pos].1
-    }
-}
-
-pub struct OccupiedEntry<'a, K: 'a, V: 'a> {
-    vec: &'a mut VecMap<K, V>,
-    pos: usize,
-}
-
-impl<'a, K, V> OccupiedEntry<'a, K, V> {
-    pub fn into_mut(self) -> &'a mut V {
-        &mut self.vec.vec[self.pos].1
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/mod.rs
+++ /dev/null
@@ -1,918 +0,0 @@
-//! Headers container, and common header fields.
-//!
-//! hyper has the opinion that Headers should be strongly-typed, because that's
-//! why we're using Rust in the first place. To set or get any header, an object
-//! must implement the `Header` trait from this module. Several common headers
-//! are already provided, such as `Host`, `ContentType`, `UserAgent`, and others.
-//!
-//! # Why Typed?
-//!
-//! Or, why not stringly-typed? Types give the following advantages:
-//!
-//! - More difficult to typo, since typos in types should be caught by the compiler
-//! - Parsing to a proper type by default
-//!
-//! # Defining Custom Headers
-//!
-//! Hyper provides many of the most commonly used headers in HTTP. If
-//! you need to define a custom header, it's easy to do while still taking
-//! advantage of the type system. Hyper includes a `header!` macro for defining
-//! many wrapper-style headers.
-//!
-//! ```
-//! #[macro_use] extern crate hyper;
-//! use hyper::header::Headers;
-//! header! { (XRequestGuid, "X-Request-Guid") => [String] }
-//!
-//! fn main () {
-//!     let mut headers = Headers::new();
-//!
-//!     headers.set(XRequestGuid("a proper guid".to_owned()))
-//! }
-//! ```
-//!
-//! This works well for simple "string" headers. But the header system
-//! actually involves 2 parts: parsing, and formatting. If you need to
-//! customize either part, you can do so.
-//!
-//! ## `Header` and `HeaderFormat`
-//!
-//! Consider a Do Not Track header. It can be true or false, but it represents
-//! that via the numerals `1` and `0`.
-//!
-//! ```
-//! use std::fmt;
-//! use hyper::header::{Header, HeaderFormat};
-//!
-//! #[derive(Debug, Clone, Copy)]
-//! struct Dnt(bool);
-//!
-//! impl Header for Dnt {
-//!     fn header_name() -> &'static str {
-//!         "DNT"
-//!     }
-//!
-//!     fn parse_header(raw: &[Vec<u8>]) -> hyper::Result<Dnt> {
-//!         if raw.len() == 1 {
-//!             let line = &raw[0];
-//!             if line.len() == 1 {
-//!                 let byte = line[0];
-//!                 match byte {
-//!                     b'0' => return Ok(Dnt(true)),
-//!                     b'1' => return Ok(Dnt(false)),
-//!                     _ => ()
-//!                 }
-//!             }
-//!         }
-//!         Err(hyper::Error::Header)
-//!     }
-//! }
-//!
-//! impl HeaderFormat for Dnt {
-//!     fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-//!         if self.0 {
-//!             f.write_str("1")
-//!         } else {
-//!             f.write_str("0")
-//!         }
-//!     }
-//! }
-//! ```
-use std::any::Any;
-use std::borrow::{Cow, ToOwned};
-//use std::collections::HashMap;
-//use std::collections::hash_map::{Iter, Entry};
-use std::iter::{FromIterator, IntoIterator};
-use std::ops::{Deref, DerefMut};
-use std::{mem, fmt};
-
-use {httparse, traitobject};
-use typeable::Typeable;
-use unicase::UniCase;
-
-use self::internals::{Item, VecMap, Entry};
-
-pub use self::shared::*;
-pub use self::common::*;
-
-mod common;
-mod internals;
-mod shared;
-pub mod parsing;
-
-type HeaderName = UniCase<CowStr>;
-
-/// A trait for any object that will represent a header field and value.
-///
-/// This trait represents the construction and identification of headers,
-/// and contains trait-object unsafe methods.
-pub trait Header: Clone + Any + Send + Sync {
-    /// Returns the name of the header field this belongs to.
-    ///
-    /// This will become an associated constant once available.
-    fn header_name() -> &'static str;
-    /// Parse a header from a raw stream of bytes.
-    ///
-    /// It's possible that a request can include a header field more than once,
-    /// and in that case, the slice will have a length greater than 1. However,
-    /// it's not necessarily the case that a Header is *allowed* to have more
-    /// than one field value. If that's the case, you **should** return `None`
-    /// if `raw.len() > 1`.
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<Self>;
-
-}
-
-/// A trait for any object that will represent a header field and value.
-///
-/// This trait represents the formatting of a `Header` for output to a TcpStream.
-pub trait HeaderFormat: fmt::Debug + HeaderClone + Any + Typeable + Send + Sync {
-    /// Format a header to be output into a TcpStream.
-    ///
-    /// This method is not allowed to introduce an Err not produced
-    /// by the passed-in Formatter.
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result;
-
-    /// Formats a header over multiple lines.
-    ///
-    /// The main example here is `Set-Cookie`, which requires that every
-    /// cookie being set be specified in a separate line.
-    ///
-    /// The API here is still being explored, so this is hidden by default.
-    /// The passed in formatter doesn't have any public methods, so it would
-    /// be quite difficult to depend on this externally.
-    #[doc(hidden)]
-    #[inline]
-    fn fmt_multi_header(&self, f: &mut MultilineFormatter) -> fmt::Result {
-        f.fmt_line(&FmtHeader(self))
-    }
-}
-
-#[doc(hidden)]
-#[allow(missing_debug_implementations)]
-pub struct MultilineFormatter<'a, 'b: 'a>(Multi<'a, 'b>);
-
-enum Multi<'a, 'b: 'a> {
-    Line(&'a str, &'a mut fmt::Formatter<'b>),
-    Join(bool, &'a mut fmt::Formatter<'b>),
-}
-
-impl<'a, 'b> MultilineFormatter<'a, 'b> {
-    fn fmt_line(&mut self, line: &fmt::Display) -> fmt::Result {
-        use std::fmt::Write;
-        match self.0 {
-            Multi::Line(ref name, ref mut f) => {
-                try!(f.write_str(*name));
-                try!(f.write_str(": "));
-                try!(write!(NewlineReplacer(*f), "{}", line));
-                f.write_str("\r\n")
-            },
-            Multi::Join(ref mut first, ref mut f) => {
-                if !*first {
-                    try!(f.write_str(", "));
-                } else {
-                    *first = false;
-                }
-                write!(NewlineReplacer(*f), "{}", line)
-            }
-        }
-    }
-}
-
-// Internal helper to wrap fmt_header into a fmt::Display
-struct FmtHeader<'a, H: ?Sized + 'a>(&'a H);
-
-impl<'a, H: HeaderFormat + ?Sized + 'a> fmt::Display for FmtHeader<'a, H> {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        self.0.fmt_header(f)
-    }
-}
-
-struct ValueString<'a>(&'a Item);
-
-impl<'a> fmt::Display for ValueString<'a> {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        self.0.write_h1(&mut MultilineFormatter(Multi::Join(true, f)))
-    }
-}
-
-struct NewlineReplacer<'a, 'b: 'a>(&'a mut fmt::Formatter<'b>);
-
-impl<'a, 'b> fmt::Write for NewlineReplacer<'a, 'b> {
-    fn write_str(&mut self, s: &str) -> fmt::Result {
-        let mut since = 0;
-        for (i, &byte) in s.as_bytes().iter().enumerate() {
-            if byte == b'\r' || byte == b'\n' {
-                try!(self.0.write_str(&s[since..i]));
-                try!(self.0.write_str(" "));
-                since = i + 1;
-            }
-        }
-        if since < s.len() {
-            self.0.write_str(&s[since..])
-        } else {
-            Ok(())
-        }
-    }
-}
-
-#[doc(hidden)]
-pub trait HeaderClone {
-    fn clone_box(&self) -> Box<HeaderFormat + Send + Sync>;
-}
-
-impl<T: HeaderFormat + Clone> HeaderClone for T {
-    #[inline]
-    fn clone_box(&self) -> Box<HeaderFormat + Send + Sync> {
-        Box::new(self.clone())
-    }
-}
-
-impl HeaderFormat + Send + Sync {
-    #[inline]
-    unsafe fn downcast_ref_unchecked<T: 'static>(&self) -> &T {
-        mem::transmute(traitobject::data(self))
-    }
-
-    #[inline]
-    unsafe fn downcast_mut_unchecked<T: 'static>(&mut self) -> &mut T {
-        mem::transmute(traitobject::data_mut(self))
-    }
-}
-
-impl Clone for Box<HeaderFormat + Send + Sync> {
-    #[inline]
-    fn clone(&self) -> Box<HeaderFormat + Send + Sync> {
-        self.clone_box()
-    }
-}
-
-#[inline]
-fn header_name<T: Header>() -> &'static str {
-    <T as Header>::header_name()
-}
-
-/// A map of header fields on requests and responses.
-#[derive(Clone)]
-pub struct Headers {
-    //data: HashMap<HeaderName, Item>
-    data: VecMap<HeaderName, Item>,
-}
-
-impl Headers {
-
-    /// Creates a new, empty headers map.
-    pub fn new() -> Headers {
-        Headers {
-            data: VecMap::new()
-        }
-    }
-
-    #[doc(hidden)]
-    pub fn from_raw(raw: &[httparse::Header]) -> ::Result<Headers> {
-        let mut headers = Headers::new();
-        for header in raw {
-            trace!("raw header: {:?}={:?}", header.name, &header.value[..]);
-            let name = UniCase(CowStr(Cow::Owned(header.name.to_owned())));
-            let mut item = match headers.data.entry(name) {
-                Entry::Vacant(entry) => entry.insert(Item::new_raw(vec![])),
-                Entry::Occupied(entry) => entry.into_mut()
-            };
-            let trim = header.value.iter().rev().take_while(|&&x| x == b' ').count();
-            let value = &header.value[.. header.value.len() - trim];
-            item.raw_mut().push(value.to_vec());
-        }
-        Ok(headers)
-    }
-
-    /// Set a header field to the corresponding value.
-    ///
-    /// The field is determined by the type of the value being set.
-    pub fn set<H: Header + HeaderFormat>(&mut self, value: H) {
-        trace!("Headers.set( {:?}, {:?} )", header_name::<H>(), value);
-        self.data.insert(UniCase(CowStr(Cow::Borrowed(header_name::<H>()))),
-                         Item::new_typed(Box::new(value)));
-    }
-
-    /// Access the raw value of a header.
-    ///
-    /// Prefer to use the typed getters instead.
-    ///
-    /// Example:
-    ///
-    /// ```
-    /// # use hyper::header::Headers;
-    /// # let mut headers = Headers::new();
-    /// let raw_content_type = headers.get_raw("content-type");
-    /// ```
-    pub fn get_raw(&self, name: &str) -> Option<&[Vec<u8>]> {
-        self.data
-            .get(&UniCase(CowStr(Cow::Borrowed(unsafe { mem::transmute::<&str, &str>(name) }))))
-            .map(Item::raw)
-    }
-
-    /// Set the raw value of a header, bypassing any typed headers.
-    ///
-    /// Note: This will completely replace any current value for this
-    /// header name.
-    ///
-    /// Example:
-    ///
-    /// ```
-    /// # use hyper::header::Headers;
-    /// # let mut headers = Headers::new();
-    /// headers.set_raw("content-length", vec![b"5".to_vec()]);
-    /// ```
-    pub fn set_raw<K: Into<Cow<'static, str>>>(&mut self, name: K,
-            value: Vec<Vec<u8>>) {
-        let name = name.into();
-        trace!("Headers.set_raw( {:?}, {:?} )", name, value);
-        self.data.insert(UniCase(CowStr(name)), Item::new_raw(value));
-    }
-
-    /// Append a value to raw value of this header.
-    ///
-    /// If a header already contains a value, this will add another line to it.
-    ///
-    /// If a header doesnot exist for this name, a new one will be created with
-    /// the value.
-    ///
-    /// Example:
-    ///
-    /// ```
-    /// # use hyper::header::Headers;
-    /// # let mut headers = Headers::new();
-    /// headers.append_raw("x-foo", b"bar".to_vec());
-    /// headers.append_raw("x-foo", b"quux".to_vec());
-    /// ```
-    pub fn append_raw<K: Into<Cow<'static, str>>>(&mut self, name: K, value: Vec<u8>) {
-        let name = name.into();
-        trace!("Headers.append_raw( {:?}, {:?} )", name, value);
-        let name = UniCase(CowStr(name));
-        if let Some(item) = self.data.get_mut(&name) {
-            item.raw_mut().push(value);
-            return;
-        }
-        self.data.insert(name, Item::new_raw(vec![value]));
-    }
-
-    /// Remove a header set by set_raw
-    pub fn remove_raw(&mut self, name: &str) {
-        trace!("Headers.remove_raw( {:?} )", name);
-        self.data.remove(
-            &UniCase(CowStr(Cow::Borrowed(unsafe { mem::transmute::<&str, &str>(name) })))
-        );
-    }
-
-    /// Get a reference to the header field's value, if it exists.
-    pub fn get<H: Header + HeaderFormat>(&self) -> Option<&H> {
-        self.data.get(&UniCase(CowStr(Cow::Borrowed(header_name::<H>()))))
-        .and_then(Item::typed::<H>)
-    }
-
-    /// Get a mutable reference to the header field's value, if it exists.
-    pub fn get_mut<H: Header + HeaderFormat>(&mut self) -> Option<&mut H> {
-        self.data.get_mut(&UniCase(CowStr(Cow::Borrowed(header_name::<H>()))))
-        .and_then(Item::typed_mut::<H>)
-    }
-
-    /// Returns a boolean of whether a certain header is in the map.
-    ///
-    /// Example:
-    ///
-    /// ```
-    /// # use hyper::header::Headers;
-    /// # use hyper::header::ContentType;
-    /// # let mut headers = Headers::new();
-    /// let has_type = headers.has::<ContentType>();
-    /// ```
-    pub fn has<H: Header + HeaderFormat>(&self) -> bool {
-        self.data.contains_key(&UniCase(CowStr(Cow::Borrowed(header_name::<H>()))))
-    }
-
-    /// Removes a header from the map, if one existed.
-    /// Returns true if a header has been removed.
-    pub fn remove<H: Header + HeaderFormat>(&mut self) -> bool {
-        trace!("Headers.remove( {:?} )", header_name::<H>());
-        self.data.remove(&UniCase(CowStr(Cow::Borrowed(header_name::<H>())))).is_some()
-    }
-
-    /// Returns an iterator over the header fields.
-    pub fn iter(&self) -> HeadersItems {
-        HeadersItems {
-            inner: self.data.iter()
-        }
-    }
-
-    /// Returns the number of headers in the map.
-    pub fn len(&self) -> usize {
-        self.data.len()
-    }
-
-    /// Remove all headers from the map.
-    pub fn clear(&mut self) {
-        self.data.clear()
-    }
-}
-
-impl PartialEq for Headers {
-    fn eq(&self, other: &Headers) -> bool {
-        if self.len() != other.len() {
-            return false;
-        }
-
-        for header in self.iter() {
-            match other.get_raw(header.name()) {
-                Some(val) if val == self.get_raw(header.name()).unwrap() => {},
-                _ => { return false; }
-            }
-        }
-        true
-    }
-}
-
-impl fmt::Display for Headers {
-   fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        for header in self.iter() {
-            try!(fmt::Display::fmt(&header, f));
-        }
-        Ok(())
-    }
-}
-
-impl fmt::Debug for Headers {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(f.write_str("Headers { "));
-        for header in self.iter() {
-            try!(write!(f, "{:?}, ", header));
-        }
-        try!(f.write_str("}"));
-        Ok(())
-    }
-}
-
-/// An `Iterator` over the fields in a `Headers` map.
-pub struct HeadersItems<'a> {
-    inner: ::std::slice::Iter<'a, (HeaderName, Item)>
-}
-
-impl<'a> Iterator for HeadersItems<'a> {
-    type Item = HeaderView<'a>;
-
-    fn next(&mut self) -> Option<HeaderView<'a>> {
-        self.inner.next().map(|&(ref k, ref v)| HeaderView(k, v))
-    }
-}
-
-/// Returned with the `HeadersItems` iterator.
-pub struct HeaderView<'a>(&'a HeaderName, &'a Item);
-
-impl<'a> HeaderView<'a> {
-    /// Check if a HeaderView is a certain Header.
-    #[inline]
-    pub fn is<H: Header>(&self) -> bool {
-        UniCase(CowStr(Cow::Borrowed(header_name::<H>()))) == *self.0
-    }
-
-    /// Get the Header name as a slice.
-    #[inline]
-    pub fn name(&self) -> &'a str {
-        self.0.as_ref()
-    }
-
-    /// Cast the value to a certain Header type.
-    #[inline]
-    pub fn value<H: Header + HeaderFormat>(&self) -> Option<&'a H> {
-        self.1.typed::<H>()
-    }
-
-    /// Get just the header value as a String.
-    ///
-    /// This will join multiple values of this header with a `, `.
-    ///
-    /// **Warning:** This may not be the format that should be used to send
-    /// a Request or Response.
-    #[inline]
-    pub fn value_string(&self) -> String {
-        ValueString(self.1).to_string()
-    }
-}
-
-impl<'a> fmt::Display for HeaderView<'a> {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        self.1.write_h1(&mut MultilineFormatter(Multi::Line(&self.0, f)))
-    }
-}
-
-impl<'a> fmt::Debug for HeaderView<'a> {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(self, f)
-    }
-}
-
-impl<'a> Extend<HeaderView<'a>> for Headers {
-    fn extend<I: IntoIterator<Item=HeaderView<'a>>>(&mut self, iter: I) {
-        for header in iter {
-            self.data.insert((*header.0).clone(), (*header.1).clone());
-        }
-    }
-}
-
-impl<'a> FromIterator<HeaderView<'a>> for Headers {
-    fn from_iter<I: IntoIterator<Item=HeaderView<'a>>>(iter: I) -> Headers {
-        let mut headers = Headers::new();
-        headers.extend(iter);
-        headers
-    }
-}
-
-deprecated! {
-    #[deprecated(note="The semantics of formatting a HeaderFormat directly are not clear")]
-    impl<'a> fmt::Display for &'a (HeaderFormat + Send + Sync) {
-        #[inline]
-        fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-            let mut multi = MultilineFormatter(Multi::Join(true, f));
-            self.fmt_multi_header(&mut multi)
-        }
-    }
-}
-
-/// A wrapper around any Header with a Display impl that calls fmt_header.
-///
-/// This can be used like so: `format!("{}", HeaderFormatter(&header))` to
-/// get the 'value string' representation of this Header.
-///
-/// Note: This may not necessarily be the value written to stream, such
-/// as with the SetCookie header.
-deprecated! {
-    #[deprecated(note="The semantics of formatting a HeaderFormat directly are not clear")]
-    pub struct HeaderFormatter<'a, H: HeaderFormat>(pub &'a H);
-}
-
-#[allow(deprecated)]
-impl<'a, H: HeaderFormat> fmt::Display for HeaderFormatter<'a, H> {
-    #[inline]
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        let mut multi = MultilineFormatter(Multi::Join(true, f));
-        self.0.fmt_multi_header(&mut multi)
-    }
-}
-
-#[allow(deprecated)]
-impl<'a, H: HeaderFormat> fmt::Debug for HeaderFormatter<'a, H> {
-    #[inline]
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(self, f)
-    }
-}
-
-#[derive(Clone, Hash, Eq, PartialEq, PartialOrd, Ord)]
-struct CowStr(Cow<'static, str>);
-
-impl Deref for CowStr {
-    type Target = Cow<'static, str>;
-
-    fn deref(&self) -> &Cow<'static, str> {
-        &self.0
-    }
-}
-
-impl fmt::Debug for CowStr {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Debug::fmt(&self.0, f)
-    }
-}
-
-impl fmt::Display for CowStr {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(&self.0, f)
-    }
-}
-
-impl DerefMut for CowStr {
-    fn deref_mut(&mut self) -> &mut Cow<'static, str> {
-        &mut self.0
-    }
-}
-
-impl AsRef<str> for CowStr {
-    fn as_ref(&self) -> &str {
-        self
-    }
-}
-
-
-#[cfg(test)]
-mod tests {
-    use std::fmt;
-    use mime::Mime;
-    use mime::TopLevel::Text;
-    use mime::SubLevel::Plain;
-    use super::{Headers, Header, HeaderFormat, ContentLength, ContentType,
-                Accept, Host, qitem};
-    use httparse;
-
-    #[cfg(feature = "nightly")]
-    use test::Bencher;
-
-    // Slice.position_elem was unstable
-    fn index_of(slice: &[u8], byte: u8) -> Option<usize> {
-        for (index, &b) in slice.iter().enumerate() {
-            if b == byte {
-                return Some(index);
-            }
-        }
-        None
-    }
-
-    macro_rules! raw {
-        ($($line:expr),*) => ({
-            [$({
-                let line = $line;
-                let pos = index_of(line, b':').expect("raw splits on ':', not found");
-                httparse::Header {
-                    name: ::std::str::from_utf8(&line[..pos]).unwrap(),
-                    value: &line[pos + 2..]
-                }
-            }),*]
-        })
-    }
-
-    #[test]
-    fn test_from_raw() {
-        let headers = Headers::from_raw(&raw!(b"Content-Length: 10")).unwrap();
-        assert_eq!(headers.get(), Some(&ContentLength(10)));
-    }
-
-    #[test]
-    fn test_content_type() {
-        let content_type = Header::parse_header([b"text/plain".to_vec()].as_ref());
-        assert_eq!(content_type.ok(), Some(ContentType(Mime(Text, Plain, vec![]))));
-    }
-
-    #[test]
-    fn test_accept() {
-        let text_plain = qitem(Mime(Text, Plain, vec![]));
-        let application_vendor = "application/vnd.github.v3.full+json; q=0.5".parse().unwrap();
-
-        let accept = Header::parse_header([b"text/plain".to_vec()].as_ref());
-        assert_eq!(accept.ok(), Some(Accept(vec![text_plain.clone()])));
-
-        let bytevec = [b"application/vnd.github.v3.full+json; q=0.5, text/plain".to_vec()];
-        let accept = Header::parse_header(bytevec.as_ref());
-        assert_eq!(accept.ok(), Some(Accept(vec![application_vendor, text_plain])));
-    }
-
-    #[derive(Clone, PartialEq, Debug)]
-    struct CrazyLength(Option<bool>, usize);
-
-    impl Header for CrazyLength {
-        fn header_name() -> &'static str {
-            "content-length"
-        }
-        fn parse_header(raw: &[Vec<u8>]) -> ::Result<CrazyLength> {
-            use std::str::from_utf8;
-            use std::str::FromStr;
-
-            if raw.len() != 1 {
-                return Err(::Error::Header);
-            }
-            // we JUST checked that raw.len() == 1, so raw[0] WILL exist.
-            match match from_utf8(unsafe { &raw.get_unchecked(0)[..] }) {
-                Ok(s) => FromStr::from_str(s).ok(),
-                Err(_) => None
-            }.map(|u| CrazyLength(Some(false), u)) {
-                Some(x) => Ok(x),
-                None => Err(::Error::Header),
-            }
-        }
-    }
-
-    impl HeaderFormat for CrazyLength {
-        fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-            let CrazyLength(ref opt, ref value) = *self;
-            write!(f, "{:?}, {:?}", opt, value)
-        }
-    }
-
-    #[test]
-    fn test_different_structs_for_same_header() {
-        let headers = Headers::from_raw(&raw!(b"Content-Length: 10")).unwrap();
-        assert_eq!(headers.get::<ContentLength>(), Some(&ContentLength(10)));
-        assert_eq!(headers.get::<CrazyLength>(), Some(&CrazyLength(Some(false), 10)));
-    }
-
-    #[test]
-    fn test_trailing_whitespace() {
-        let headers = Headers::from_raw(&raw!(b"Content-Length: 10   ")).unwrap();
-        assert_eq!(headers.get::<ContentLength>(), Some(&ContentLength(10)));
-    }
-
-    #[test]
-    fn test_multiple_reads() {
-        let headers = Headers::from_raw(&raw!(b"Content-Length: 10")).unwrap();
-        let ContentLength(one) = *headers.get::<ContentLength>().unwrap();
-        let ContentLength(two) = *headers.get::<ContentLength>().unwrap();
-        assert_eq!(one, two);
-    }
-
-    #[test]
-    fn test_different_reads() {
-        let headers = Headers::from_raw(
-            &raw!(b"Content-Length: 10", b"Content-Type: text/plain")).unwrap();
-        let ContentLength(_) = *headers.get::<ContentLength>().unwrap();
-        let ContentType(_) = *headers.get::<ContentType>().unwrap();
-    }
-
-    #[test]
-    fn test_get_mutable() {
-        let mut headers = Headers::from_raw(&raw!(b"Content-Length: 10")).unwrap();
-        *headers.get_mut::<ContentLength>().unwrap() = ContentLength(20);
-        assert_eq!(headers.get_raw("content-length").unwrap(), &[b"20".to_vec()][..]);
-        assert_eq!(*headers.get::<ContentLength>().unwrap(), ContentLength(20));
-    }
-
-    #[test]
-    fn test_headers_fmt() {
-        let mut headers = Headers::new();
-        headers.set(ContentLength(15));
-        headers.set(Host { hostname: "foo.bar".to_owned(), port: None });
-
-        let s = headers.to_string();
-        assert!(s.contains("Host: foo.bar\r\n"));
-        assert!(s.contains("Content-Length: 15\r\n"));
-    }
-
-    #[test]
-    fn test_headers_fmt_raw() {
-        let mut headers = Headers::from_raw(&raw!(b"Content-Length: 10")).unwrap();
-        headers.set_raw("x-foo", vec![b"foo".to_vec(), b"bar".to_vec()]);
-        let s = headers.to_string();
-        assert_eq!(s, "Content-Length: 10\r\nx-foo: foo\r\nx-foo: bar\r\n");
-    }
-
-    #[test]
-    fn test_set_raw() {
-        let mut headers = Headers::new();
-        headers.set(ContentLength(10));
-        headers.set_raw("content-LENGTH", vec![b"20".to_vec()]);
-        assert_eq!(headers.get_raw("Content-length").unwrap(), &[b"20".to_vec()][..]);
-        assert_eq!(headers.get(), Some(&ContentLength(20)));
-    }
-
-    #[test]
-    fn test_append_raw() {
-        let mut headers = Headers::new();
-        headers.set(ContentLength(10));
-        headers.append_raw("content-LENGTH", b"20".to_vec());
-        assert_eq!(headers.get_raw("Content-length").unwrap(), &[b"10".to_vec(), b"20".to_vec()][..]);
-        headers.append_raw("x-foo", b"bar".to_vec());
-        assert_eq!(headers.get_raw("x-foo"), Some(&[b"bar".to_vec()][..]));
-    }
-
-    #[test]
-    fn test_remove_raw() {
-        let mut headers = Headers::new();
-        headers.set_raw("content-LENGTH", vec![b"20".to_vec()]);
-        headers.remove_raw("content-LENGTH");
-        assert_eq!(headers.get_raw("Content-length"), None);
-    }
-
-    #[test]
-    fn test_len() {
-        let mut headers = Headers::new();
-        headers.set(ContentLength(10));
-        assert_eq!(headers.len(), 1);
-        headers.set(ContentType(Mime(Text, Plain, vec![])));
-        assert_eq!(headers.len(), 2);
-        // Redundant, should not increase count.
-        headers.set(ContentLength(20));
-        assert_eq!(headers.len(), 2);
-    }
-
-    #[test]
-    fn test_clear() {
-        let mut headers = Headers::new();
-        headers.set(ContentLength(10));
-        headers.set(ContentType(Mime(Text, Plain, vec![])));
-        assert_eq!(headers.len(), 2);
-        headers.clear();
-        assert_eq!(headers.len(), 0);
-    }
-
-    #[test]
-    fn test_iter() {
-        let mut headers = Headers::new();
-        headers.set(ContentLength(11));
-        for header in headers.iter() {
-            assert!(header.is::<ContentLength>());
-            assert_eq!(header.name(), <ContentLength as Header>::header_name());
-            assert_eq!(header.value(), Some(&ContentLength(11)));
-            assert_eq!(header.value_string(), "11".to_owned());
-        }
-    }
-
-    #[test]
-    fn test_header_view_value_string() {
-        let mut headers = Headers::new();
-        headers.set_raw("foo", vec![b"one".to_vec(), b"two".to_vec()]);
-        for header in headers.iter() {
-            assert_eq!(header.name(), "foo");
-            assert_eq!(header.value_string(), "one, two");
-        }
-    }
-
-    #[test]
-    fn test_eq() {
-        let mut headers1 = Headers::new();
-        let mut headers2 = Headers::new();
-
-        assert_eq!(headers1, headers2);
-
-        headers1.set(ContentLength(11));
-        headers2.set(Host {hostname: "foo.bar".to_owned(), port: None});
-        assert!(headers1 != headers2);
-
-        headers1 = Headers::new();
-        headers2 = Headers::new();
-
-        headers1.set(ContentLength(11));
-        headers2.set(ContentLength(11));
-        assert_eq!(headers1, headers2);
-
-        headers1.set(ContentLength(10));
-        assert!(headers1 != headers2);
-
-        headers1 = Headers::new();
-        headers2 = Headers::new();
-
-        headers1.set(Host { hostname: "foo.bar".to_owned(), port: None });
-        headers1.set(ContentLength(11));
-        headers2.set(ContentLength(11));
-        assert!(headers1 != headers2);
-    }
-
-    #[cfg(feature = "nightly")]
-    #[bench]
-    fn bench_headers_new(b: &mut Bencher) {
-        b.iter(|| {
-            let mut h = Headers::new();
-            h.set(ContentLength(11));
-            h
-        })
-    }
-
-    #[cfg(feature = "nightly")]
-    #[bench]
-    fn bench_headers_from_raw(b: &mut Bencher) {
-        let raw = raw!(b"Content-Length: 10");
-        b.iter(|| Headers::from_raw(&raw).unwrap())
-    }
-
-    #[cfg(feature = "nightly")]
-    #[bench]
-    fn bench_headers_get(b: &mut Bencher) {
-        let mut headers = Headers::new();
-        headers.set(ContentLength(11));
-        b.iter(|| assert_eq!(headers.get::<ContentLength>(), Some(&ContentLength(11))))
-    }
-
-    #[cfg(feature = "nightly")]
-    #[bench]
-    fn bench_headers_get_miss(b: &mut Bencher) {
-        let headers = Headers::new();
-        b.iter(|| assert!(headers.get::<ContentLength>().is_none()))
-    }
-
-    #[cfg(feature = "nightly")]
-    #[bench]
-    fn bench_headers_set(b: &mut Bencher) {
-        let mut headers = Headers::new();
-        b.iter(|| headers.set(ContentLength(12)))
-    }
-
-    #[cfg(feature = "nightly")]
-    #[bench]
-    fn bench_headers_has(b: &mut Bencher) {
-        let mut headers = Headers::new();
-        headers.set(ContentLength(11));
-        b.iter(|| assert!(headers.has::<ContentLength>()))
-    }
-
-    #[cfg(feature = "nightly")]
-    #[bench]
-    fn bench_headers_view_is(b: &mut Bencher) {
-        let mut headers = Headers::new();
-        headers.set(ContentLength(11));
-        let mut iter = headers.iter();
-        let view = iter.next().unwrap();
-        b.iter(|| assert!(view.is::<ContentLength>()))
-    }
-
-    #[cfg(feature = "nightly")]
-    #[bench]
-    fn bench_headers_fmt(b: &mut Bencher) {
-        let mut headers = Headers::new();
-        headers.set(ContentLength(11));
-        b.iter(|| headers.to_string())
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/parsing.rs
+++ /dev/null
@@ -1,224 +0,0 @@
-//! Utility functions for Header implementations.
-
-use language_tags::LanguageTag;
-use std::str;
-use std::str::FromStr;
-use std::fmt::{self, Display};
-use url::percent_encoding;
-
-use header::shared::Charset;
-
-/// Reads a single raw string when parsing a header.
-pub fn from_one_raw_str<T: str::FromStr>(raw: &[Vec<u8>]) -> ::Result<T> {
-    if raw.len() != 1 || unsafe { raw.get_unchecked(0) } == b"" { return Err(::Error::Header) }
-    // we JUST checked that raw.len() == 1, so raw[0] WILL exist.
-    from_raw_str(& unsafe { raw.get_unchecked(0) })
-}
-
-/// Reads a raw string into a value.
-pub fn from_raw_str<T: str::FromStr>(raw: &[u8]) -> ::Result<T> {
-    let s = try!(str::from_utf8(raw));
-    T::from_str(s).or(Err(::Error::Header))
-}
-
-/// Reads a comma-delimited raw header into a Vec.
-#[inline]
-pub fn from_comma_delimited<T: str::FromStr, S: AsRef<[u8]>>(raw: &[S]) -> ::Result<Vec<T>> {
-    let mut result = Vec::new();
-    for s in raw {
-        let s = try!(str::from_utf8(s.as_ref()));
-        result.extend(s.split(',')
-                      .filter_map(|x| match x.trim() {
-                          "" => None,
-                          y => Some(y)
-                      })
-                      .filter_map(|x| x.parse().ok()))
-    }
-    Ok(result)
-}
-
-/// Format an array into a comma-delimited string.
-pub fn fmt_comma_delimited<T: Display>(f: &mut fmt::Formatter, parts: &[T]) -> fmt::Result {
-    for (i, part) in parts.iter().enumerate() {
-        if i != 0 {
-            try!(f.write_str(", "));
-        }
-        try!(Display::fmt(part, f));
-    }
-    Ok(())
-}
-
-/// An extended header parameter value (i.e., tagged with a character set and optionally,
-/// a language), as defined in [RFC 5987](https://tools.ietf.org/html/rfc5987#section-3.2).
-#[derive(Clone, Debug, PartialEq)]
-pub struct ExtendedValue {
-    /// The character set that is used to encode the `value` to a string.
-    pub charset: Charset,
-    /// The human language details of the `value`, if available.
-    pub language_tag: Option<LanguageTag>,
-    /// The parameter value, as expressed in octets.
-    pub value: Vec<u8>,
-}
-
-/// Parses extended header parameter values (`ext-value`), as defined in
-/// [RFC 5987](https://tools.ietf.org/html/rfc5987#section-3.2).
-///
-/// Extended values are denoted by parameter names that end with `*`.
-///
-/// ## ABNF
-/// ```plain
-/// ext-value     = charset  "'" [ language ] "'" value-chars
-///               ; like RFC 2231's <extended-initial-value>
-///               ; (see [RFC2231], Section 7)
-///
-/// charset       = "UTF-8" / "ISO-8859-1" / mime-charset
-///
-/// mime-charset  = 1*mime-charsetc
-/// mime-charsetc = ALPHA / DIGIT
-///               / "!" / "#" / "$" / "%" / "&"
-///               / "+" / "-" / "^" / "_" / "`"
-///               / "{" / "}" / "~"
-///               ; as <mime-charset> in Section 2.3 of [RFC2978]
-///               ; except that the single quote is not included
-///               ; SHOULD be registered in the IANA charset registry
-///
-/// language      = <Language-Tag, defined in [RFC5646], Section 2.1>
-///
-/// value-chars   = *( pct-encoded / attr-char )
-///
-/// pct-encoded   = "%" HEXDIG HEXDIG
-///               ; see [RFC3986], Section 2.1
-///
-/// attr-char     = ALPHA / DIGIT
-///               / "!" / "#" / "$" / "&" / "+" / "-" / "."
-///               / "^" / "_" / "`" / "|" / "~"
-///               ; token except ( "*" / "'" / "%" )
-/// ```
-pub fn parse_extended_value(val: &str) -> ::Result<ExtendedValue> {
-
-    // Break into three pieces separated by the single-quote character
-    let mut parts = val.splitn(3,'\'');
-
-    // Interpret the first piece as a Charset
-    let charset: Charset = match parts.next() {
-        None => return Err(::Error::Header),
-        Some(n) => try!(FromStr::from_str(n)),
-    };
-
-    // Interpret the second piece as a language tag
-    let lang: Option<LanguageTag> = match parts.next() {
-        None => return Err(::Error::Header),
-        Some("") => None,
-        Some(s) => match s.parse() {
-            Ok(lt) => Some(lt),
-            Err(_) => return Err(::Error::Header),
-        }
-    };
-
-    // Interpret the third piece as a sequence of value characters
-    let value: Vec<u8> = match parts.next() {
-        None => return Err(::Error::Header),
-        Some(v) => percent_encoding::percent_decode(v.as_bytes()).collect(),
-    };
-
-    Ok(ExtendedValue {
-        charset: charset,
-        language_tag: lang,
-        value: value,
-    })
-}
-
-define_encode_set! {
-    /// This encode set is used for HTTP header values and is defined at
-    /// https://tools.ietf.org/html/rfc5987#section-3.2
-    pub HTTP_VALUE = [percent_encoding::SIMPLE_ENCODE_SET] | {
-        ' ', '"', '%', '\'', '(', ')', '*', ',', '/', ':', ';', '<', '-', '>', '?',
-        '[', '\\', ']', '{', '}'
-    }
-}
-
-impl Display for ExtendedValue {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        let encoded_value =
-            percent_encoding::percent_encode(&self.value[..], HTTP_VALUE);
-        if let Some(ref lang) = self.language_tag {
-            write!(f, "{}'{}'{}", self.charset, lang, encoded_value)
-        } else {
-            write!(f, "{}''{}", self.charset, encoded_value)
-        }
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use header::shared::Charset;
-    use super::{ExtendedValue, parse_extended_value};
-
-    #[test]
-    fn test_parse_extended_value_with_encoding_and_language_tag() {
-        let expected_language_tag = langtag!(en);
-        // RFC 5987, Section 3.2.2
-        // Extended notation, using the Unicode character U+00A3 (POUND SIGN)
-        let result = parse_extended_value("iso-8859-1'en'%A3%20rates");
-        assert!(result.is_ok());
-        let extended_value = result.unwrap();
-        assert_eq!(Charset::Iso_8859_1, extended_value.charset);
-        assert!(extended_value.language_tag.is_some());
-        assert_eq!(expected_language_tag, extended_value.language_tag.unwrap());
-        assert_eq!(vec![163, b' ', b'r', b'a', b't', b'e', b's'], extended_value.value);
-    }
-
-    #[test]
-    fn test_parse_extended_value_with_encoding() {
-        // RFC 5987, Section 3.2.2
-        // Extended notation, using the Unicode characters U+00A3 (POUND SIGN)
-        // and U+20AC (EURO SIGN)
-        let result = parse_extended_value("UTF-8''%c2%a3%20and%20%e2%82%ac%20rates");
-        assert!(result.is_ok());
-        let extended_value = result.unwrap();
-        assert_eq!(Charset::Ext("UTF-8".to_string()), extended_value.charset);
-        assert!(extended_value.language_tag.is_none());
-        assert_eq!(vec![194, 163, b' ', b'a', b'n', b'd', b' ', 226, 130, 172, b' ', b'r', b'a', b't', b'e', b's'], extended_value.value);
-    }
-
-    #[test]
-    fn test_parse_extended_value_missing_language_tag_and_encoding() {
-        // From: https://greenbytes.de/tech/tc2231/#attwithfn2231quot2
-        let result = parse_extended_value("foo%20bar.html");
-        assert!(result.is_err());
-    }
-
-    #[test]
-    fn test_parse_extended_value_partially_formatted() {
-        let result = parse_extended_value("UTF-8'missing third part");
-        assert!(result.is_err());
-    }
-
-    #[test]
-    fn test_parse_extended_value_partially_formatted_blank() {
-        let result = parse_extended_value("blank second part'");
-        assert!(result.is_err());
-    }
-
-    #[test]
-    fn test_fmt_extended_value_with_encoding_and_language_tag() {
-        let extended_value = ExtendedValue {
-            charset: Charset::Iso_8859_1,
-            language_tag: Some("en".parse().expect("Could not parse language tag")),
-            value: vec![163, b' ', b'r', b'a', b't', b'e', b's'],
-        };
-        assert_eq!("ISO-8859-1'en'%A3%20rates", format!("{}", extended_value));
-    }
-
-    #[test]
-    fn test_fmt_extended_value_with_encoding() {
-        let extended_value = ExtendedValue {
-            charset: Charset::Ext("UTF-8".to_string()),
-            language_tag: None,
-            value: vec![194, 163, b' ', b'a', b'n', b'd', b' ', 226, 130, 172, b' ', b'r', b'a',
-                        b't', b'e', b's'],
-        };
-        assert_eq!("UTF-8''%C2%A3%20and%20%E2%82%AC%20rates",
-                   format!("{}", extended_value));
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/shared/charset.rs
+++ /dev/null
@@ -1,151 +0,0 @@
-use std::fmt::{self, Display};
-use std::str::FromStr;
-use std::ascii::AsciiExt;
-
-use self::Charset::*;
-
-/// A Mime charset.
-///
-/// The string representation is normalised to upper case.
-///
-/// See http://www.iana.org/assignments/character-sets/character-sets.xhtml
-#[derive(Clone,Debug,PartialEq)]
-#[allow(non_camel_case_types)]
-pub enum Charset{
-    /// US ASCII
-    Us_Ascii,
-    /// ISO-8859-1
-    Iso_8859_1,
-    /// ISO-8859-2
-    Iso_8859_2,
-    /// ISO-8859-3
-    Iso_8859_3,
-    /// ISO-8859-4
-    Iso_8859_4,
-    /// ISO-8859-5
-    Iso_8859_5,
-    /// ISO-8859-6
-    Iso_8859_6,
-    /// ISO-8859-7
-    Iso_8859_7,
-    /// ISO-8859-8
-    Iso_8859_8,
-    /// ISO-8859-9
-    Iso_8859_9,
-    /// ISO-8859-10
-    Iso_8859_10,
-    /// Shift_JIS
-    Shift_Jis,
-    /// EUC-JP
-    Euc_Jp,
-    /// ISO-2022-KR
-    Iso_2022_Kr,
-    /// EUC-KR
-    Euc_Kr,
-    /// ISO-2022-JP
-    Iso_2022_Jp,
-    /// ISO-2022-JP-2
-    Iso_2022_Jp_2,
-    /// ISO-8859-6-E
-    Iso_8859_6_E,
-    /// ISO-8859-6-I
-    Iso_8859_6_I,
-    /// ISO-8859-8-E
-    Iso_8859_8_E,
-    /// ISO-8859-8-I
-    Iso_8859_8_I,
-    /// GB2312
-    Gb2312,
-    /// Big5
-    Big5,
-    /// KOI8-R
-    Koi8_R,
-    /// An arbitrary charset specified as a string
-    Ext(String)
-}
-
-impl Charset {
-    fn name(&self) -> &str {
-        match *self {
-            Us_Ascii => "US-ASCII",
-            Iso_8859_1 => "ISO-8859-1",
-            Iso_8859_2 => "ISO-8859-2",
-            Iso_8859_3 => "ISO-8859-3",
-            Iso_8859_4 => "ISO-8859-4",
-            Iso_8859_5 => "ISO-8859-5",
-            Iso_8859_6 => "ISO-8859-6",
-            Iso_8859_7 => "ISO-8859-7",
-            Iso_8859_8 => "ISO-8859-8",
-            Iso_8859_9 => "ISO-8859-9",
-            Iso_8859_10 => "ISO-8859-10",
-            Shift_Jis => "Shift-JIS",
-            Euc_Jp => "EUC-JP",
-            Iso_2022_Kr => "ISO-2022-KR",
-            Euc_Kr => "EUC-KR",
-            Iso_2022_Jp => "ISO-2022-JP",
-            Iso_2022_Jp_2 => "ISO-2022-JP-2",
-            Iso_8859_6_E => "ISO-8859-6-E",
-            Iso_8859_6_I => "ISO-8859-6-I",
-            Iso_8859_8_E => "ISO-8859-8-E",
-            Iso_8859_8_I => "ISO-8859-8-I",
-            Gb2312 => "GB2312",
-            Big5 => "5",
-            Koi8_R => "KOI8-R",
-            Ext(ref s) => &s
-        }
-    }
-}
-
-impl Display for Charset {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.write_str(self.name())
-    }
-}
-
-impl FromStr for Charset {
-    type Err = ::Error;
-    fn from_str(s: &str) -> ::Result<Charset> {
-        Ok(match s.to_ascii_uppercase().as_ref() {
-            "US-ASCII" => Us_Ascii,
-            "ISO-8859-1" => Iso_8859_1,
-            "ISO-8859-2" => Iso_8859_2,
-            "ISO-8859-3" => Iso_8859_3,
-            "ISO-8859-4" => Iso_8859_4,
-            "ISO-8859-5" => Iso_8859_5,
-            "ISO-8859-6" => Iso_8859_6,
-            "ISO-8859-7" => Iso_8859_7,
-            "ISO-8859-8" => Iso_8859_8,
-            "ISO-8859-9" => Iso_8859_9,
-            "ISO-8859-10" => Iso_8859_10,
-            "SHIFT-JIS" => Shift_Jis,
-            "EUC-JP" => Euc_Jp,
-            "ISO-2022-KR" => Iso_2022_Kr,
-            "EUC-KR" => Euc_Kr,
-            "ISO-2022-JP" => Iso_2022_Jp,
-            "ISO-2022-JP-2" => Iso_2022_Jp_2,
-            "ISO-8859-6-E" => Iso_8859_6_E,
-            "ISO-8859-6-I" => Iso_8859_6_I,
-            "ISO-8859-8-E" => Iso_8859_8_E,
-            "ISO-8859-8-I" => Iso_8859_8_I,
-            "GB2312" => Gb2312,
-            "5" => Big5,
-            "KOI8-R" => Koi8_R,
-            s => Ext(s.to_owned())
-        })
-    }
-}
-
-#[test]
-fn test_parse() {
-    assert_eq!(Us_Ascii,"us-ascii".parse().unwrap());
-    assert_eq!(Us_Ascii,"US-Ascii".parse().unwrap());
-    assert_eq!(Us_Ascii,"US-ASCII".parse().unwrap());
-    assert_eq!(Shift_Jis,"Shift-JIS".parse().unwrap());
-    assert_eq!(Ext("ABCD".to_owned()),"abcd".parse().unwrap());
-}
-
-#[test]
-fn test_display() {
-    assert_eq!("US-ASCII", format!("{}", Us_Ascii));
-    assert_eq!("ABCD", format!("{}", Ext("ABCD".to_owned())));
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/shared/encoding.rs
+++ /dev/null
@@ -1,49 +0,0 @@
-use std::fmt;
-use std::str;
-
-pub use self::Encoding::{Chunked, Gzip, Deflate, Compress, Identity, EncodingExt};
-
-/// A value to represent an encoding used in `Transfer-Encoding`
-/// or `Accept-Encoding` header.
-#[derive(Clone, PartialEq, Debug)]
-pub enum Encoding {
-    /// The `chunked` encoding.
-    Chunked,
-    /// The `gzip` encoding.
-    Gzip,
-    /// The `deflate` encoding.
-    Deflate,
-    /// The `compress` encoding.
-    Compress,
-    /// The `identity` encoding.
-    Identity,
-    /// Some other encoding that is less common, can be any String.
-    EncodingExt(String)
-}
-
-impl fmt::Display for Encoding {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.write_str(match *self {
-            Chunked => "chunked",
-            Gzip => "gzip",
-            Deflate => "deflate",
-            Compress => "compress",
-            Identity => "identity",
-            EncodingExt(ref s) => s.as_ref()
-        })
-    }
-}
-
-impl str::FromStr for Encoding {
-    type Err = ::Error;
-    fn from_str(s: &str) -> ::Result<Encoding> {
-        match s {
-            "chunked" => Ok(Chunked),
-            "deflate" => Ok(Deflate),
-            "gzip" => Ok(Gzip),
-            "compress" => Ok(Compress),
-            "identity" => Ok(Identity),
-            _ => Ok(EncodingExt(s.to_owned()))
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/shared/entity.rs
+++ /dev/null
@@ -1,215 +0,0 @@
-use std::str::FromStr;
-use std::fmt::{self, Display};
-
-// check that each char in the slice is either:
-// 1. %x21, or
-// 2. in the range %x23 to %x7E, or
-// 3. in the range %x80 to %xFF
-fn check_slice_validity(slice: &str) -> bool {
-    slice.bytes().all(|c|
-        c == b'\x21' || (c >= b'\x23' && c <= b'\x7e') | (c >= b'\x80' && c <= b'\xff'))
-}
-
-/// An entity tag, defined in [RFC7232](https://tools.ietf.org/html/rfc7232#section-2.3)
-///
-/// An entity tag consists of a string enclosed by two literal double quotes.
-/// Preceding the first double quote is an optional weakness indicator,
-/// which always looks like `W/`. Examples for valid tags are `"xyzzy"` and `W/"xyzzy"`.
-///
-/// # ABNF
-/// ```plain
-/// entity-tag = [ weak ] opaque-tag
-/// weak       = %x57.2F ; "W/", case-sensitive
-/// opaque-tag = DQUOTE *etagc DQUOTE
-/// etagc      = %x21 / %x23-7E / obs-text
-///            ; VCHAR except double quotes, plus obs-text
-/// ```
-///
-/// # Comparison
-/// To check if two entity tags are equivalent in an application always use the `strong_eq` or
-/// `weak_eq` methods based on the context of the Tag. Only use `==` to check if two tags are
-/// identical.
-///
-/// The example below shows the results for a set of entity-tag pairs and
-/// both the weak and strong comparison function results:
-///
-/// | ETag 1  | ETag 2  | Strong Comparison | Weak Comparison |
-/// |---------|---------|-------------------|-----------------|
-/// | `W/"1"` | `W/"1"` | no match          | match           |
-/// | `W/"1"` | `W/"2"` | no match          | no match        |
-/// | `W/"1"` | `"1"`   | no match          | match           |
-/// | `"1"`   | `"1"`   | match             | match           |
-#[derive(Clone, Debug, Eq, PartialEq)]
-pub struct EntityTag {
-    /// Weakness indicator for the tag
-    pub weak: bool,
-    /// The opaque string in between the DQUOTEs
-    tag: String
-}
-
-impl EntityTag {
-    /// Constructs a new EntityTag.
-    /// # Panics
-    /// If the tag contains invalid characters.
-    pub fn new(weak: bool, tag: String) -> EntityTag {
-        assert!(check_slice_validity(&tag), "Invalid tag: {:?}", tag);
-        EntityTag { weak: weak, tag: tag }
-    }
-
-    /// Constructs a new weak EntityTag.
-    /// # Panics
-    /// If the tag contains invalid characters.
-    pub fn weak(tag: String) -> EntityTag {
-        EntityTag::new(true, tag)
-    }
-
-    /// Constructs a new strong EntityTag.
-    /// # Panics
-    /// If the tag contains invalid characters.
-    pub fn strong(tag: String) -> EntityTag {
-        EntityTag::new(false, tag)
-    }
-
-    /// Get the tag.
-    pub fn tag(&self) -> &str {
-        self.tag.as_ref()
-    }
-
-    /// Set the tag.
-    /// # Panics
-    /// If the tag contains invalid characters.
-    pub fn set_tag(&mut self, tag: String) {
-        assert!(check_slice_validity(&tag), "Invalid tag: {:?}", tag);
-        self.tag = tag
-    }
-
-    /// For strong comparison two entity-tags are equivalent if both are not weak and their
-    /// opaque-tags match character-by-character.
-    pub fn strong_eq(&self, other: &EntityTag) -> bool {
-        !self.weak && !other.weak && self.tag == other.tag
-    }
-
-    /// For weak comparison two entity-tags are equivalent if their
-    /// opaque-tags match character-by-character, regardless of either or
-    /// both being tagged as "weak".
-    pub fn weak_eq(&self, other: &EntityTag) -> bool {
-        self.tag == other.tag
-    }
-
-    /// The inverse of `EntityTag.strong_eq()`.
-    pub fn strong_ne(&self, other: &EntityTag) -> bool {
-        !self.strong_eq(other)
-    }
-
-    /// The inverse of `EntityTag.weak_eq()`.
-    pub fn weak_ne(&self, other: &EntityTag) -> bool {
-        !self.weak_eq(other)
-    }
-}
-
-impl Display for EntityTag {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        if self.weak {
-            write!(f, "W/\"{}\"", self.tag)
-        } else {
-            write!(f, "\"{}\"", self.tag)
-        }
-    }
-}
-
-impl FromStr for EntityTag {
-    type Err = ::Error;
-    fn from_str(s: &str) -> ::Result<EntityTag> {
-        let length: usize = s.len();
-        let slice = &s[..];
-        // Early exits if it doesn't terminate in a DQUOTE.
-        if !slice.ends_with('"') {
-            return Err(::Error::Header);
-        }
-        // The etag is weak if its first char is not a DQUOTE.
-        if slice.starts_with('"') && check_slice_validity(&slice[1..length-1]) {
-            // No need to check if the last char is a DQUOTE,
-            // we already did that above.
-            return Ok(EntityTag { weak: false, tag: slice[1..length-1].to_owned() });
-        } else if slice.starts_with("W/\"") && check_slice_validity(&slice[3..length-1]) {
-            return Ok(EntityTag { weak: true, tag: slice[3..length-1].to_owned() });
-        }
-        Err(::Error::Header)
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use super::EntityTag;
-
-    #[test]
-    fn test_etag_parse_success() {
-        // Expected success
-        assert_eq!("\"foobar\"".parse::<EntityTag>().unwrap(),
-            EntityTag::strong("foobar".to_owned()));
-        assert_eq!("\"\"".parse::<EntityTag>().unwrap(),
-            EntityTag::strong("".to_owned()));
-        assert_eq!("W/\"weaktag\"".parse::<EntityTag>().unwrap(),
-            EntityTag::weak("weaktag".to_owned()));
-        assert_eq!("W/\"\x65\x62\"".parse::<EntityTag>().unwrap(),
-            EntityTag::weak("\x65\x62".to_owned()));
-        assert_eq!("W/\"\"".parse::<EntityTag>().unwrap(), EntityTag::weak("".to_owned()));
-    }
-
-    #[test]
-    fn test_etag_parse_failures() {
-        // Expected failures
-        assert!("no-dquotes".parse::<EntityTag>().is_err());
-        assert!("w/\"the-first-w-is-case-sensitive\"".parse::<EntityTag>().is_err());
-        assert!("".parse::<EntityTag>().is_err());
-        assert!("\"unmatched-dquotes1".parse::<EntityTag>().is_err());
-        assert!("unmatched-dquotes2\"".parse::<EntityTag>().is_err());
-        assert!("matched-\"dquotes\"".parse::<EntityTag>().is_err());
-    }
-
-    #[test]
-    fn test_etag_fmt() {
-        assert_eq!(format!("{}", EntityTag::strong("foobar".to_owned())), "\"foobar\"");
-        assert_eq!(format!("{}", EntityTag::strong("".to_owned())), "\"\"");
-        assert_eq!(format!("{}", EntityTag::weak("weak-etag".to_owned())), "W/\"weak-etag\"");
-        assert_eq!(format!("{}", EntityTag::weak("\u{0065}".to_owned())), "W/\"\x65\"");
-        assert_eq!(format!("{}", EntityTag::weak("".to_owned())), "W/\"\"");
-    }
-
-    #[test]
-    fn test_cmp() {
-        // | ETag 1  | ETag 2  | Strong Comparison | Weak Comparison |
-        // |---------|---------|-------------------|-----------------|
-        // | `W/"1"` | `W/"1"` | no match          | match           |
-        // | `W/"1"` | `W/"2"` | no match          | no match        |
-        // | `W/"1"` | `"1"`   | no match          | match           |
-        // | `"1"`   | `"1"`   | match             | match           |
-        let mut etag1 = EntityTag::weak("1".to_owned());
-        let mut etag2 = EntityTag::weak("1".to_owned());
-        assert!(!etag1.strong_eq(&etag2));
-        assert!(etag1.weak_eq(&etag2));
-        assert!(etag1.strong_ne(&etag2));
-        assert!(!etag1.weak_ne(&etag2));
-
-        etag1 = EntityTag::weak("1".to_owned());
-        etag2 = EntityTag::weak("2".to_owned());
-        assert!(!etag1.strong_eq(&etag2));
-        assert!(!etag1.weak_eq(&etag2));
-        assert!(etag1.strong_ne(&etag2));
-        assert!(etag1.weak_ne(&etag2));
-
-        etag1 = EntityTag::weak("1".to_owned());
-        etag2 = EntityTag::strong("1".to_owned());
-        assert!(!etag1.strong_eq(&etag2));
-        assert!(etag1.weak_eq(&etag2));
-        assert!(etag1.strong_ne(&etag2));
-        assert!(!etag1.weak_ne(&etag2));
-
-        etag1 = EntityTag::strong("1".to_owned());
-        etag2 = EntityTag::strong("1".to_owned());
-        assert!(etag1.strong_eq(&etag2));
-        assert!(etag1.weak_eq(&etag2));
-        assert!(!etag1.strong_ne(&etag2));
-        assert!(!etag1.weak_ne(&etag2));
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/shared/httpdate.rs
+++ /dev/null
@@ -1,91 +0,0 @@
-use std::str::FromStr;
-use std::fmt::{self, Display};
-
-use time;
-
-/// A `time::Time` with HTTP formatting and parsing
-///
-//   Prior to 1995, there were three different formats commonly used by
-//   servers to communicate timestamps.  For compatibility with old
-//   implementations, all three are defined here.  The preferred format is
-//   a fixed-length and single-zone subset of the date and time
-//   specification used by the Internet Message Format [RFC5322].
-//
-//     HTTP-date    = IMF-fixdate / obs-date
-//
-//   An example of the preferred format is
-//
-//     Sun, 06 Nov 1994 08:49:37 GMT    ; IMF-fixdate
-//
-//   Examples of the two obsolete formats are
-//
-//     Sunday, 06-Nov-94 08:49:37 GMT   ; obsolete RFC 850 format
-//     Sun Nov  6 08:49:37 1994         ; ANSI C's asctime() format
-//
-//   A recipient that parses a timestamp value in an HTTP header field
-//   MUST accept all three HTTP-date formats.  When a sender generates a
-//   header field that contains one or more timestamps defined as
-//   HTTP-date, the sender MUST generate those timestamps in the
-//   IMF-fixdate format.
-#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)]
-pub struct HttpDate(pub time::Tm);
-
-impl FromStr for HttpDate {
-    type Err = ::Error;
-    fn from_str(s: &str) -> ::Result<HttpDate> {
-        match time::strptime(s, "%a, %d %b %Y %T %Z").or_else(|_| {
-            time::strptime(s, "%A, %d-%b-%y %T %Z")
-            }).or_else(|_| {
-                time::strptime(s, "%c")
-                }) {
-                    Ok(t) => Ok(HttpDate(t)),
-                    Err(_) => Err(::Error::Header),
-                    }
-    }
-}
-
-impl Display for HttpDate {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(&self.0.to_utc().rfc822(), f)
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use time::Tm;
-    use super::HttpDate;
-
-    const NOV_07: HttpDate = HttpDate(Tm {
-        tm_nsec: 0,
-        tm_sec: 37,
-        tm_min: 48,
-        tm_hour: 8,
-        tm_mday: 7,
-        tm_mon: 10,
-        tm_year: 94,
-        tm_wday: 0,
-        tm_isdst: 0,
-        tm_yday: 0,
-        tm_utcoff: 0,
-    });
-
-    #[test]
-    fn test_imf_fixdate() {
-        assert_eq!("Sun, 07 Nov 1994 08:48:37 GMT".parse::<HttpDate>().unwrap(), NOV_07);
-    }
-
-    #[test]
-    fn test_rfc_850() {
-        assert_eq!("Sunday, 07-Nov-94 08:48:37 GMT".parse::<HttpDate>().unwrap(), NOV_07);
-    }
-
-    #[test]
-    fn test_asctime() {
-        assert_eq!("Sun Nov  7 08:48:37 1994".parse::<HttpDate>().unwrap(), NOV_07);
-    }
-
-    #[test]
-    fn test_no_date() {
-        assert!("this-is-no-date".parse::<HttpDate>().is_err());
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/shared/mod.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-pub use self::charset::Charset;
-pub use self::encoding::Encoding;
-pub use self::entity::EntityTag;
-pub use self::httpdate::HttpDate;
-pub use self::quality_item::{Quality, QualityItem, qitem, q};
-
-mod charset;
-mod encoding;
-mod entity;
-mod httpdate;
-mod quality_item;
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/header/shared/quality_item.rs
+++ /dev/null
@@ -1,215 +0,0 @@
-use std::cmp;
-use std::default::Default;
-use std::fmt;
-use std::str;
-
-/// Represents a quality used in quality values.
-///
-/// Can be created with the `q` function.
-///
-/// # Implementation notes
-///
-/// The quality value is defined as a number between 0 and 1 with three decimal places. This means
-/// there are 1000 possible values. Since floating point numbers are not exact and the smallest
-/// floating point data type (`f32`) consumes four bytes, hyper uses an `u16` value to store the
-/// quality internally. For performance reasons you may set quality directly to a value between
-/// 0 and 1000 e.g. `Quality(532)` matches the quality `q=0.532`.
-///
-/// [RFC7231 Section 5.3.1](https://tools.ietf.org/html/rfc7231#section-5.3.1)
-/// gives more information on quality values in HTTP header fields.
-#[derive(Copy, Clone, Debug, Eq, Ord, PartialEq, PartialOrd)]
-pub struct Quality(pub u16);
-
-impl fmt::Display for Quality {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match self.0 {
-            1000 => Ok(()),
-            0 => f.write_str("; q=0"),
-            x => write!(f, "; q=0.{}", format!("{:03}", x).trim_right_matches('0'))
-        }
-    }
-}
-
-impl Default for Quality {
-    fn default() -> Quality {
-        Quality(1000)
-    }
-}
-
-/// Represents an item with a quality value as defined in
-/// [RFC7231](https://tools.ietf.org/html/rfc7231#section-5.3.1).
-#[derive(Clone, PartialEq, Debug)]
-pub struct QualityItem<T> {
-    /// The actual contents of the field.
-    pub item: T,
-    /// The quality (client or server preference) for the value.
-    pub quality: Quality,
-}
-
-impl<T> QualityItem<T> {
-    /// Creates a new `QualityItem` from an item and a quality.
-    /// The item can be of any type.
-    /// The quality should be a value in the range [0, 1].
-    pub fn new(item: T, quality: Quality) -> QualityItem<T> {
-        QualityItem {
-            item: item,
-            quality: quality
-        }
-    }
-}
-
-impl<T: PartialEq> cmp::PartialOrd for QualityItem<T> {
-    fn partial_cmp(&self, other: &QualityItem<T>) -> Option<cmp::Ordering> {
-        self.quality.partial_cmp(&other.quality)
-    }
-}
-
-impl<T: fmt::Display> fmt::Display for QualityItem<T> {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "{}{}", self.item, format!("{}", self.quality))
-    }
-}
-
-impl<T: str::FromStr> str::FromStr for QualityItem<T> {
-    type Err = ::Error;
-    fn from_str(s: &str) -> ::Result<QualityItem<T>> {
-        // Set defaults used if parsing fails.
-        let mut raw_item = s;
-        let mut quality = 1f32;
-
-        let parts: Vec<&str> = s.rsplitn(2, ';').map(|x| x.trim()).collect();
-        if parts.len() == 2 {
-            let start = &parts[0][0..2];
-            if start == "q=" || start == "Q=" {
-                let q_part = &parts[0][2..parts[0].len()];
-                if q_part.len() > 5 {
-                    return Err(::Error::Header);
-                }
-                match q_part.parse::<f32>() {
-                    Ok(q_value) => {
-                        if 0f32 <= q_value && q_value <= 1f32 {
-                            quality = q_value;
-                            raw_item = parts[1];
-                            } else {
-                                return Err(::Error::Header);
-                            }
-                        },
-                    Err(_) => return Err(::Error::Header),
-                }
-            }
-        }
-        match raw_item.parse::<T>() {
-            // we already checked above that the quality is within range
-            Ok(item) => Ok(QualityItem::new(item, from_f32(quality))),
-            Err(_) => Err(::Error::Header),
-        }
-    }
-}
-
-fn from_f32(f: f32) -> Quality {
-    // this function is only used internally. A check that `f` is within range
-    // should be done before calling this method. Just in case, this
-    // debug_assert should catch if we were forgetful
-    debug_assert!(f >= 0f32 && f <= 1f32, "q value must be between 0.0 and 1.0");
-    Quality((f * 1000f32) as u16)
-}
-
-/// Convinience function to wrap a value in a `QualityItem`
-/// Sets `q` to the default 1.0
-pub fn qitem<T>(item: T) -> QualityItem<T> {
-    QualityItem::new(item, Default::default())
-}
-
-/// Convenience function to create a `Quality` from a float.
-pub fn q(f: f32) -> Quality {
-    assert!(f >= 0f32 && f <= 1f32, "q value must be between 0.0 and 1.0");
-    from_f32(f)
-}
-
-#[cfg(test)]
-mod tests {
-    use super::*;
-    use super::super::encoding::*;
-
-    #[test]
-    fn test_quality_item_show1() {
-        let x = qitem(Chunked);
-        assert_eq!(format!("{}", x), "chunked");
-    }
-    #[test]
-    fn test_quality_item_show2() {
-        let x = QualityItem::new(Chunked, Quality(1));
-        assert_eq!(format!("{}", x), "chunked; q=0.001");
-    }
-    #[test]
-    fn test_quality_item_show3() {
-        // Custom value
-        let x = QualityItem{
-            item: EncodingExt("identity".to_owned()),
-            quality: Quality(500),
-        };
-        assert_eq!(format!("{}", x), "identity; q=0.5");
-    }
-
-    #[test]
-    fn test_quality_item_from_str1() {
-        let x: ::Result<QualityItem<Encoding>> = "chunked".parse();
-        assert_eq!(x.unwrap(), QualityItem{ item: Chunked, quality: Quality(1000), });
-    }
-    #[test]
-    fn test_quality_item_from_str2() {
-        let x: ::Result<QualityItem<Encoding>> = "chunked; q=1".parse();
-        assert_eq!(x.unwrap(), QualityItem{ item: Chunked, quality: Quality(1000), });
-    }
-    #[test]
-    fn test_quality_item_from_str3() {
-        let x: ::Result<QualityItem<Encoding>> = "gzip; q=0.5".parse();
-        assert_eq!(x.unwrap(), QualityItem{ item: Gzip, quality: Quality(500), });
-    }
-    #[test]
-    fn test_quality_item_from_str4() {
-        let x: ::Result<QualityItem<Encoding>> = "gzip; q=0.273".parse();
-        assert_eq!(x.unwrap(), QualityItem{ item: Gzip, quality: Quality(273), });
-    }
-    #[test]
-    fn test_quality_item_from_str5() {
-        let x: ::Result<QualityItem<Encoding>> = "gzip; q=0.2739999".parse();
-        assert!(x.is_err());
-    }
-    #[test]
-    fn test_quality_item_from_str6() {
-        let x: ::Result<QualityItem<Encoding>> = "gzip; q=2".parse();
-        assert!(x.is_err());
-    }
-    #[test]
-    fn test_quality_item_ordering() {
-        let x: QualityItem<Encoding> = "gzip; q=0.5".parse().ok().unwrap();
-        let y: QualityItem<Encoding> = "gzip; q=0.273".parse().ok().unwrap();
-        let comparision_result: bool = x.gt(&y);
-        assert!(comparision_result)
-    }
-
-    #[test]
-    fn test_quality() {
-        assert_eq!(q(0.5), Quality(500));
-    }
-
-    #[test]
-    fn test_quality2() {
-        assert_eq!(format!("{}", q(0.0)), "; q=0");
-    }
-
-    #[test]
-    #[should_panic] // FIXME - 32-bit msvc unwinding broken
-    #[cfg_attr(all(target_arch="x86", target_env="msvc"), ignore)]
-    fn test_quality_invalid() {
-        q(-1.0);
-    }
-
-    #[test]
-    #[should_panic] // FIXME - 32-bit msvc unwinding broken
-    #[cfg_attr(all(target_arch="x86", target_env="msvc"), ignore)]
-    fn test_quality_invalid2() {
-        q(2.0);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/http/h1.rs
+++ /dev/null
@@ -1,1177 +0,0 @@
-//! Adapts the HTTP/1.1 implementation into the `HttpMessage` API.
-use std::borrow::Cow;
-use std::cmp::min;
-use std::fmt;
-use std::io::{self, Write, BufWriter, BufRead, Read};
-use std::net::Shutdown;
-use std::time::Duration;
-
-use httparse;
-use url::Position as UrlPosition;
-
-use buffer::BufReader;
-use Error;
-use header::{Headers, ContentLength, TransferEncoding};
-use header::Encoding::Chunked;
-use method::{Method};
-use net::{NetworkConnector, NetworkStream};
-use status::StatusCode;
-use version::HttpVersion;
-use version::HttpVersion::{Http10, Http11};
-use uri::RequestUri;
-
-use self::HttpReader::{SizedReader, ChunkedReader, EofReader, EmptyReader};
-use self::HttpWriter::{ChunkedWriter, SizedWriter, EmptyWriter, ThroughWriter};
-
-use http::{
-    RawStatus,
-    Protocol,
-    HttpMessage,
-    RequestHead,
-    ResponseHead,
-};
-use header;
-use version;
-
-const MAX_INVALID_RESPONSE_BYTES: usize = 1024 * 128;
-
-#[derive(Debug)]
-struct Wrapper<T> {
-    obj: Option<T>,
-}
-
-impl<T> Wrapper<T> {
-    pub fn new(obj: T) -> Wrapper<T> {
-        Wrapper { obj: Some(obj) }
-    }
-
-    pub fn map_in_place<F>(&mut self, f: F) where F: FnOnce(T) -> T {
-        let obj = self.obj.take().unwrap();
-        let res = f(obj);
-        self.obj = Some(res);
-    }
-
-    pub fn into_inner(self) -> T { self.obj.unwrap() }
-    pub fn as_mut(&mut self) -> &mut T { self.obj.as_mut().unwrap() }
-    pub fn as_ref(&self) -> &T { self.obj.as_ref().unwrap() }
-}
-
-#[derive(Debug)]
-enum Stream {
-    Idle(Box<NetworkStream + Send>),
-    Writing(HttpWriter<BufWriter<Box<NetworkStream + Send>>>),
-    Reading(HttpReader<BufReader<Box<NetworkStream + Send>>>),
-}
-
-impl Stream {
-    fn writer_mut(&mut self) -> Option<&mut HttpWriter<BufWriter<Box<NetworkStream + Send>>>> {
-        match *self {
-            Stream::Writing(ref mut writer) => Some(writer),
-            _ => None,
-        }
-    }
-    fn reader_mut(&mut self) -> Option<&mut HttpReader<BufReader<Box<NetworkStream + Send>>>> {
-        match *self {
-            Stream::Reading(ref mut reader) => Some(reader),
-            _ => None,
-        }
-    }
-    fn reader_ref(&self) -> Option<&HttpReader<BufReader<Box<NetworkStream + Send>>>> {
-        match *self {
-            Stream::Reading(ref reader) => Some(reader),
-            _ => None,
-        }
-    }
-
-    fn new(stream: Box<NetworkStream + Send>) -> Stream {
-        Stream::Idle(stream)
-    }
-}
-
-/// An implementation of the `HttpMessage` trait for HTTP/1.1.
-#[derive(Debug)]
-pub struct Http11Message {
-    is_proxied: bool,
-    method: Option<Method>,
-    stream: Wrapper<Stream>,
-}
-
-impl Write for Http11Message {
-    #[inline]
-    fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
-        match self.stream.as_mut().writer_mut() {
-            None => Err(io::Error::new(io::ErrorKind::Other,
-                                          "Not in a writable state")),
-            Some(ref mut writer) => writer.write(buf),
-        }
-    }
-    #[inline]
-    fn flush(&mut self) -> io::Result<()> {
-        match self.stream.as_mut().writer_mut() {
-            None => Err(io::Error::new(io::ErrorKind::Other,
-                                          "Not in a writable state")),
-            Some(ref mut writer) => writer.flush(),
-        }
-    }
-}
-
-impl Read for Http11Message {
-    #[inline]
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        match self.stream.as_mut().reader_mut() {
-            None => Err(io::Error::new(io::ErrorKind::Other,
-                                          "Not in a readable state")),
-            Some(ref mut reader) => reader.read(buf),
-        }
-    }
-}
-
-impl HttpMessage for Http11Message {
-    fn set_outgoing(&mut self, mut head: RequestHead) -> ::Result<RequestHead> {
-        let mut res = Err(Error::from(io::Error::new(
-                            io::ErrorKind::Other,
-                            "")));
-        let mut method = None;
-        let is_proxied = self.is_proxied;
-        self.stream.map_in_place(|stream: Stream| -> Stream {
-            let stream = match stream {
-                Stream::Idle(stream) => stream,
-                _ => {
-                    res = Err(Error::from(io::Error::new(
-                                io::ErrorKind::Other,
-                                "Message not idle, cannot start new outgoing")));
-                    return stream;
-                },
-            };
-            let mut stream = BufWriter::new(stream);
-
-            {
-                let uri = if is_proxied {
-                    head.url.as_ref()
-                } else {
-                    &head.url[UrlPosition::BeforePath..UrlPosition::AfterQuery]
-                };
-
-                let version = version::HttpVersion::Http11;
-                debug!("request line: {:?} {:?} {:?}", head.method, uri, version);
-                match write!(&mut stream, "{} {} {}{}",
-                             head.method, uri, version, LINE_ENDING) {
-                                 Err(e) => {
-                                     res = Err(From::from(e));
-                                     // TODO What should we do if the BufWriter doesn't wanna
-                                     // relinquish the stream?
-                                     return Stream::Idle(stream.into_inner().ok().unwrap());
-                                 },
-                                 Ok(_) => {},
-                             };
-            }
-
-            let stream = {
-                let write_headers = |mut stream: BufWriter<Box<NetworkStream + Send>>, head: &RequestHead| {
-                    debug!("headers={:?}", head.headers);
-                    match write!(&mut stream, "{}{}", head.headers, LINE_ENDING) {
-                        Ok(_) => Ok(stream),
-                        Err(e) => {
-                            Err((e, stream.into_inner().unwrap()))
-                        }
-                    }
-                };
-                match head.method {
-                    Method::Get | Method::Head => {
-                        let writer = match write_headers(stream, &head) {
-                            Ok(w) => w,
-                            Err(e) => {
-                                res = Err(From::from(e.0));
-                                return Stream::Idle(e.1);
-                            }
-                        };
-                        EmptyWriter(writer)
-                    },
-                    _ => {
-                        let mut chunked = true;
-                        let mut len = 0;
-
-                        match head.headers.get::<header::ContentLength>() {
-                            Some(cl) => {
-                                chunked = false;
-                                len = **cl;
-                            },
-                            None => ()
-                        };
-
-                        // can't do in match above, thanks borrowck
-                        if chunked {
-                            let encodings = match head.headers.get_mut::<header::TransferEncoding>() {
-                                Some(encodings) => {
-                                    //TODO: check if chunked is already in encodings. use HashSet?
-                                    encodings.push(header::Encoding::Chunked);
-                                    false
-                                },
-                                None => true
-                            };
-
-                            if encodings {
-                                head.headers.set(
-                                    header::TransferEncoding(vec![header::Encoding::Chunked]))
-                            }
-                        }
-
-                        let stream = match write_headers(stream, &head) {
-                            Ok(s) => s,
-                            Err(e) => {
-                                res = Err(From::from(e.0));
-                                return Stream::Idle(e.1);
-                            },
-                        };
-
-                        if chunked {
-                            ChunkedWriter(stream)
-                        } else {
-                            SizedWriter(stream, len)
-                        }
-                    }
-                }
-            };
-
-            method = Some(head.method.clone());
-            res = Ok(head);
-            Stream::Writing(stream)
-        });
-
-        self.method = method;
-        res
-    }
-
-    fn get_incoming(&mut self) -> ::Result<ResponseHead> {
-        try!(self.flush_outgoing());
-        let method = self.method.take().unwrap_or(Method::Get);
-        let mut res = Err(From::from(
-                        io::Error::new(io::ErrorKind::Other,
-                        "Read already in progress")));
-        self.stream.map_in_place(|stream| {
-            let stream = match stream {
-                Stream::Idle(stream) => stream,
-                _ => {
-                    // The message was already in the reading state...
-                    // TODO Decide what happens in case we try to get a new incoming at that point
-                    res = Err(From::from(
-                            io::Error::new(io::ErrorKind::Other,
-                                           "Read already in progress")));
-                    return stream;
-                }
-            };
-
-            let expected_no_content = stream.previous_response_expected_no_content();
-            trace!("previous_response_expected_no_content = {}", expected_no_content);
-
-            let mut stream = BufReader::new(stream);
-
-            let mut invalid_bytes_read = 0;
-            let head;
-            loop {
-                head = match parse_response(&mut stream) {
-                    Ok(head) => head,
-                    Err(::Error::Version)
-                        if expected_no_content && invalid_bytes_read < MAX_INVALID_RESPONSE_BYTES => {
-                            trace!("expected_no_content, found content");
-                            invalid_bytes_read += 1;
-                            stream.consume(1);
-                            continue;
-                        }
-                    Err(e) => {
-                        res = Err(e);
-                        return Stream::Idle(stream.into_inner());
-                    }
-                };
-                break;
-            }
-
-            let raw_status = head.subject;
-            let headers = head.headers;
-
-            let is_empty = !should_have_response_body(&method, raw_status.0);
-            stream.get_mut().set_previous_response_expected_no_content(is_empty);
-            // According to https://tools.ietf.org/html/rfc7230#section-3.3.3
-            // 1. HEAD reponses, and Status 1xx, 204, and 304 cannot have a body.
-            // 2. Status 2xx to a CONNECT cannot have a body.
-            // 3. Transfer-Encoding: chunked has a chunked body.
-            // 4. If multiple differing Content-Length headers or invalid, close connection.
-            // 5. Content-Length header has a sized body.
-            // 6. Not Client.
-            // 7. Read till EOF.
-            let reader = if is_empty {
-                EmptyReader(stream)
-            } else {
-                if let Some(&TransferEncoding(ref codings)) = headers.get() {
-                    if codings.last() == Some(&Chunked) {
-                        ChunkedReader(stream, None)
-                    } else {
-                        trace!("not chuncked. read till eof");
-                        EofReader(stream)
-                    }
-                } else if let Some(&ContentLength(len)) =  headers.get() {
-                    SizedReader(stream, len)
-                } else if headers.has::<ContentLength>() {
-                    trace!("illegal Content-Length: {:?}", headers.get_raw("Content-Length"));
-                    res = Err(Error::Header);
-                    return Stream::Idle(stream.into_inner());
-                } else {
-                    trace!("neither Transfer-Encoding nor Content-Length");
-                    EofReader(stream)
-                }
-            };
-
-            trace!("Http11Message.reader = {:?}", reader);
-
-
-            res = Ok(ResponseHead {
-                headers: headers,
-                raw_status: raw_status,
-                version: head.version,
-            });
-
-            Stream::Reading(reader)
-        });
-        res
-    }
-
-    fn has_body(&self) -> bool {
-        match self.stream.as_ref().reader_ref() {
-            Some(&EmptyReader(..)) |
-            Some(&SizedReader(_, 0)) |
-            Some(&ChunkedReader(_, Some(0))) => false,
-            // specifically EofReader is always true
-            _ => true
-        }
-    }
-
-    #[inline]
-    fn set_read_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        self.get_ref().set_read_timeout(dur)
-    }
-
-    #[inline]
-    fn set_write_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        self.get_ref().set_write_timeout(dur)
-    }
-
-    #[inline]
-    fn close_connection(&mut self) -> ::Result<()> {
-        try!(self.get_mut().close(Shutdown::Both));
-        Ok(())
-    }
-
-    #[inline]
-    fn set_proxied(&mut self, val: bool) {
-        self.is_proxied = val;
-    }
-}
-
-impl Http11Message {
-    /// Consumes the `Http11Message` and returns the underlying `NetworkStream`.
-    pub fn into_inner(self) -> Box<NetworkStream + Send> {
-        match self.stream.into_inner() {
-            Stream::Idle(stream) => stream,
-            Stream::Writing(stream) => stream.into_inner().into_inner().unwrap(),
-            Stream::Reading(stream) => stream.into_inner().into_inner(),
-        }
-    }
-
-    /// Gets a borrowed reference to the underlying `NetworkStream`, regardless of the state of the
-    /// `Http11Message`.
-    pub fn get_ref(&self) -> &(NetworkStream + Send) {
-        match *self.stream.as_ref() {
-            Stream::Idle(ref stream) => &**stream,
-            Stream::Writing(ref stream) => &**stream.get_ref().get_ref(),
-            Stream::Reading(ref stream) => &**stream.get_ref().get_ref()
-        }
-    }
-
-    /// Gets a mutable reference to the underlying `NetworkStream`, regardless of the state of the
-    /// `Http11Message`.
-    pub fn get_mut(&mut self) -> &mut (NetworkStream + Send) {
-        match *self.stream.as_mut() {
-            Stream::Idle(ref mut stream) => &mut **stream,
-            Stream::Writing(ref mut stream) => &mut **stream.get_mut().get_mut(),
-            Stream::Reading(ref mut stream) => &mut **stream.get_mut().get_mut()
-        }
-    }
-
-    /// Creates a new `Http11Message` that will use the given `NetworkStream` for communicating to
-    /// the peer.
-    pub fn with_stream(stream: Box<NetworkStream + Send>) -> Http11Message {
-        Http11Message {
-            is_proxied: false,
-            method: None,
-            stream: Wrapper::new(Stream::new(stream)),
-        }
-    }
-
-    /// Flushes the current outgoing content and moves the stream into the `stream` property.
-    ///
-    /// TODO It might be sensible to lift this up to the `HttpMessage` trait itself...
-    pub fn flush_outgoing(&mut self) -> ::Result<()> {
-        let mut res = Ok(());
-        self.stream.map_in_place(|stream| {
-            let writer = match stream {
-                Stream::Writing(writer) => writer,
-                _ => {
-                    res = Ok(());
-                    return stream;
-                },
-            };
-            // end() already flushes
-            let raw = match writer.end() {
-                Ok(buf) => buf.into_inner().unwrap(),
-                Err(e) => {
-                    res = Err(From::from(e.0));
-                    return Stream::Writing(e.1);
-                }
-            };
-            Stream::Idle(raw)
-        });
-        res
-    }
-}
-
-/// The `Protocol` implementation provides HTTP/1.1 messages.
-pub struct Http11Protocol {
-    connector: Connector,
-}
-
-impl Protocol for Http11Protocol {
-    fn new_message(&self, host: &str, port: u16, scheme: &str) -> ::Result<Box<HttpMessage>> {
-        let stream = try!(self.connector.connect(host, port, scheme)).into();
-
-        Ok(Box::new(Http11Message::with_stream(stream)))
-    }
-}
-
-impl Http11Protocol {
-    /// Creates a new `Http11Protocol` instance that will use the given `NetworkConnector` for
-    /// establishing HTTP connections.
-    pub fn with_connector<C, S>(c: C) -> Http11Protocol
-            where C: NetworkConnector<Stream=S> + Send + Sync + 'static,
-                  S: NetworkStream + Send {
-        Http11Protocol {
-            connector: Connector(Box::new(ConnAdapter(c))),
-        }
-    }
-}
-
-struct ConnAdapter<C: NetworkConnector + Send + Sync>(C);
-
-impl<C: NetworkConnector<Stream=S> + Send + Sync, S: NetworkStream + Send>
-        NetworkConnector for ConnAdapter<C> {
-    type Stream = Box<NetworkStream + Send>;
-    #[inline]
-    fn connect(&self, host: &str, port: u16, scheme: &str)
-        -> ::Result<Box<NetworkStream + Send>> {
-        Ok(try!(self.0.connect(host, port, scheme)).into())
-    }
-}
-
-struct Connector(Box<NetworkConnector<Stream=Box<NetworkStream + Send>> + Send + Sync>);
-
-impl NetworkConnector for Connector {
-    type Stream = Box<NetworkStream + Send>;
-    #[inline]
-    fn connect(&self, host: &str, port: u16, scheme: &str)
-        -> ::Result<Box<NetworkStream + Send>> {
-        Ok(try!(self.0.connect(host, port, scheme)).into())
-    }
-}
-
-
-/// Readers to handle different Transfer-Encodings.
-///
-/// If a message body does not include a Transfer-Encoding, it *should*
-/// include a Content-Length header.
-pub enum HttpReader<R> {
-    /// A Reader used when a Content-Length header is passed with a positive integer.
-    SizedReader(R, u64),
-    /// A Reader used when Transfer-Encoding is `chunked`.
-    ChunkedReader(R, Option<u64>),
-    /// A Reader used for responses that don't indicate a length or chunked.
-    ///
-    /// Note: This should only used for `Response`s. It is illegal for a
-    /// `Request` to be made with both `Content-Length` and
-    /// `Transfer-Encoding: chunked` missing, as explained from the spec:
-    ///
-    /// > If a Transfer-Encoding header field is present in a response and
-    /// > the chunked transfer coding is not the final encoding, the
-    /// > message body length is determined by reading the connection until
-    /// > it is closed by the server.  If a Transfer-Encoding header field
-    /// > is present in a request and the chunked transfer coding is not
-    /// > the final encoding, the message body length cannot be determined
-    /// > reliably; the server MUST respond with the 400 (Bad Request)
-    /// > status code and then close the connection.
-    EofReader(R),
-    /// A Reader used for messages that should never have a body.
-    ///
-    /// See https://tools.ietf.org/html/rfc7230#section-3.3.3
-    EmptyReader(R),
-}
-
-impl<R: Read> HttpReader<R> {
-
-    /// Unwraps this HttpReader and returns the underlying Reader.
-    pub fn into_inner(self) -> R {
-        match self {
-            SizedReader(r, _) => r,
-            ChunkedReader(r, _) => r,
-            EofReader(r) => r,
-            EmptyReader(r) => r,
-        }
-    }
-
-    /// Gets a borrowed reference to the underlying Reader.
-    pub fn get_ref(&self) -> &R {
-        match *self {
-            SizedReader(ref r, _) => r,
-            ChunkedReader(ref r, _) => r,
-            EofReader(ref r) => r,
-            EmptyReader(ref r) => r,
-        }
-    }
-
-    /// Gets a mutable reference to the underlying Reader.
-    pub fn get_mut(&mut self) -> &mut R {
-        match *self {
-            SizedReader(ref mut r, _) => r,
-            ChunkedReader(ref mut r, _) => r,
-            EofReader(ref mut r) => r,
-            EmptyReader(ref mut r) => r,
-        }
-    }
-}
-
-impl<R> fmt::Debug for HttpReader<R> {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            SizedReader(_,rem) => write!(fmt, "SizedReader(remaining={:?})", rem),
-            ChunkedReader(_, None) => write!(fmt, "ChunkedReader(chunk_remaining=unknown)"),
-            ChunkedReader(_, Some(rem)) => write!(fmt, "ChunkedReader(chunk_remaining={:?})", rem),
-            EofReader(_) => write!(fmt, "EofReader"),
-            EmptyReader(_) => write!(fmt, "EmptyReader"),
-        }
-    }
-}
-
-impl<R: Read> Read for HttpReader<R> {
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        if buf.is_empty() {
-            return Ok(0);
-        }
-        match *self {
-            SizedReader(ref mut body, ref mut remaining) => {
-                trace!("Sized read, remaining={:?}", remaining);
-                if *remaining == 0 {
-                    Ok(0)
-                } else {
-                    let to_read = min(*remaining as usize, buf.len());
-                    let num = try!(body.read(&mut buf[..to_read])) as u64;
-                    trace!("Sized read: {}", num);
-                    if num > *remaining {
-                        *remaining = 0;
-                    } else if num == 0 {
-                        return Err(io::Error::new(io::ErrorKind::Other, "early eof"));
-                    } else {
-                        *remaining -= num;
-                    }
-                    Ok(num as usize)
-                }
-            },
-            ChunkedReader(ref mut body, ref mut opt_remaining) => {
-                let mut rem = match *opt_remaining {
-                    Some(ref rem) => *rem,
-                    // None means we don't know the size of the next chunk
-                    None => try!(read_chunk_size(body))
-                };
-                trace!("Chunked read, remaining={:?}", rem);
-
-                if rem == 0 {
-                    if opt_remaining.is_none() {
-                        try!(eat(body, LINE_ENDING.as_bytes()));
-                    }
-
-                    *opt_remaining = Some(0);
-
-                    // chunk of size 0 signals the end of the chunked stream
-                    // if the 0 digit was missing from the stream, it would
-                    // be an InvalidInput error instead.
-                    trace!("end of chunked");
-
-                    return Ok(0)
-                }
-
-                let to_read = min(rem as usize, buf.len());
-                let count = try!(body.read(&mut buf[..to_read])) as u64;
-
-                if count == 0 {
-                    *opt_remaining = Some(0);
-                    return Err(io::Error::new(io::ErrorKind::Other, "early eof"));
-                }
-
-                rem -= count;
-                *opt_remaining = if rem > 0 {
-                    Some(rem)
-                } else {
-                    try!(eat(body, LINE_ENDING.as_bytes()));
-                    None
-                };
-                Ok(count as usize)
-            },
-            EofReader(ref mut body) => {
-                let r = body.read(buf);
-                trace!("eofread: {:?}", r);
-                r
-            },
-            EmptyReader(_) => Ok(0)
-        }
-    }
-}
-
-fn eat<R: Read>(rdr: &mut R, bytes: &[u8]) -> io::Result<()> {
-    let mut buf = [0];
-    for &b in bytes.iter() {
-        match try!(rdr.read(&mut buf)) {
-            1 if buf[0] == b => (),
-            _ => return Err(io::Error::new(io::ErrorKind::InvalidInput,
-                                          "Invalid characters found")),
-        }
-    }
-    Ok(())
-}
-
-/// Chunked chunks start with 1*HEXDIGIT, indicating the size of the chunk.
-fn read_chunk_size<R: Read>(rdr: &mut R) -> io::Result<u64> {
-    macro_rules! byte (
-        ($rdr:ident) => ({
-            let mut buf = [0];
-            match try!($rdr.read(&mut buf)) {
-                1 => buf[0],
-                _ => return Err(io::Error::new(io::ErrorKind::InvalidInput,
-                                                  "Invalid chunk size line")),
-
-            }
-        })
-    );
-    let mut size = 0u64;
-    let radix = 16;
-    let mut in_ext = false;
-    let mut in_chunk_size = true;
-    loop {
-        match byte!(rdr) {
-            b@b'0'...b'9' if in_chunk_size => {
-                size *= radix;
-                size += (b - b'0') as u64;
-            },
-            b@b'a'...b'f' if in_chunk_size => {
-                size *= radix;
-                size += (b + 10 - b'a') as u64;
-            },
-            b@b'A'...b'F' if in_chunk_size => {
-                size *= radix;
-                size += (b + 10 - b'A') as u64;
-            },
-            CR => {
-                match byte!(rdr) {
-                    LF => break,
-                    _ => return Err(io::Error::new(io::ErrorKind::InvalidInput,
-                                                  "Invalid chunk size line"))
-
-                }
-            },
-            // If we weren't in the extension yet, the ";" signals its start
-            b';' if !in_ext => {
-                in_ext = true;
-                in_chunk_size = false;
-            },
-            // "Linear white space" is ignored between the chunk size and the
-            // extension separator token (";") due to the "implied *LWS rule".
-            b'\t' | b' ' if !in_ext & !in_chunk_size => {},
-            // LWS can follow the chunk size, but no more digits can come
-            b'\t' | b' ' if in_chunk_size => in_chunk_size = false,
-            // We allow any arbitrary octet once we are in the extension, since
-            // they all get ignored anyway. According to the HTTP spec, valid
-            // extensions would have a more strict syntax:
-            //     (token ["=" (token | quoted-string)])
-            // but we gain nothing by rejecting an otherwise valid chunk size.
-            ext if in_ext => {
-                todo!("chunk extension byte={}", ext);
-            },
-            // Finally, if we aren't in the extension and we're reading any
-            // other octet, the chunk size line is invalid!
-            _ => {
-                return Err(io::Error::new(io::ErrorKind::InvalidInput,
-                                         "Invalid chunk size line"));
-            }
-        }
-    }
-    trace!("chunk size={:?}", size);
-    Ok(size)
-}
-
-fn should_have_response_body(method: &Method, status: u16) -> bool {
-    trace!("should_have_response_body({:?}, {})", method, status);
-    match (method, status) {
-        (&Method::Head, _) |
-        (_, 100...199) |
-        (_, 204) |
-        (_, 304) |
-        (&Method::Connect, 200...299) => false,
-        _ => true
-    }
-}
-
-/// Writers to handle different Transfer-Encodings.
-pub enum HttpWriter<W: Write> {
-    /// A no-op Writer, used initially before Transfer-Encoding is determined.
-    ThroughWriter(W),
-    /// A Writer for when Transfer-Encoding includes `chunked`.
-    ChunkedWriter(W),
-    /// A Writer for when Content-Length is set.
-    ///
-    /// Enforces that the body is not longer than the Content-Length header.
-    SizedWriter(W, u64),
-    /// A writer that should not write any body.
-    EmptyWriter(W),
-}
-
-impl<W: Write> HttpWriter<W> {
-    /// Unwraps the HttpWriter and returns the underlying Writer.
-    #[inline]
-    pub fn into_inner(self) -> W {
-        match self {
-            ThroughWriter(w) => w,
-            ChunkedWriter(w) => w,
-            SizedWriter(w, _) => w,
-            EmptyWriter(w) => w,
-        }
-    }
-
-    /// Access the inner Writer.
-    #[inline]
-    pub fn get_ref(&self) -> &W {
-        match *self {
-            ThroughWriter(ref w) => w,
-            ChunkedWriter(ref w) => w,
-            SizedWriter(ref w, _) => w,
-            EmptyWriter(ref w) => w,
-        }
-    }
-
-    /// Access the inner Writer mutably.
-    ///
-    /// Warning: You should not write to this directly, as you can corrupt
-    /// the state.
-    #[inline]
-    pub fn get_mut(&mut self) -> &mut W {
-        match *self {
-            ThroughWriter(ref mut w) => w,
-            ChunkedWriter(ref mut w) => w,
-            SizedWriter(ref mut w, _) => w,
-            EmptyWriter(ref mut w) => w,
-        }
-    }
-
-    /// Ends the HttpWriter, and returns the underlying Writer.
-    ///
-    /// A final `write_all()` is called with an empty message, and then flushed.
-    /// The ChunkedWriter variant will use this to write the 0-sized last-chunk.
-    #[inline]
-    pub fn end(mut self) -> Result<W, EndError<W>> {
-        fn inner<W: Write>(w: &mut W) -> io::Result<()> {
-            try!(w.write(&[]));
-            w.flush()
-        }
-
-        match inner(&mut self) {
-            Ok(..) => Ok(self.into_inner()),
-            Err(e) => Err(EndError(e, self))
-        }
-    }
-}
-
-#[derive(Debug)]
-pub struct EndError<W: Write>(io::Error, HttpWriter<W>);
-
-impl<W: Write> From<EndError<W>> for io::Error {
-    fn from(e: EndError<W>) -> io::Error {
-        e.0
-    }
-}
-
-impl<W: Write> Write for HttpWriter<W> {
-    #[inline]
-    fn write(&mut self, msg: &[u8]) -> io::Result<usize> {
-        match *self {
-            ThroughWriter(ref mut w) => w.write(msg),
-            ChunkedWriter(ref mut w) => {
-                let chunk_size = msg.len();
-                trace!("chunked write, size = {:?}", chunk_size);
-                try!(write!(w, "{:X}{}", chunk_size, LINE_ENDING));
-                try!(w.write_all(msg));
-                try!(w.write_all(LINE_ENDING.as_bytes()));
-                Ok(msg.len())
-            },
-            SizedWriter(ref mut w, ref mut remaining) => {
-                let len = msg.len() as u64;
-                if len > *remaining {
-                    let len = *remaining;
-                    *remaining = 0;
-                    try!(w.write_all(&msg[..len as usize]));
-                    Ok(len as usize)
-                } else {
-                    *remaining -= len;
-                    try!(w.write_all(msg));
-                    Ok(len as usize)
-                }
-            },
-            EmptyWriter(..) => {
-                if !msg.is_empty() {
-                    error!("Cannot include a body with this kind of message");
-                }
-                Ok(0)
-            }
-        }
-    }
-
-    #[inline]
-    fn flush(&mut self) -> io::Result<()> {
-        match *self {
-            ThroughWriter(ref mut w) => w.flush(),
-            ChunkedWriter(ref mut w) => w.flush(),
-            SizedWriter(ref mut w, _) => w.flush(),
-            EmptyWriter(ref mut w) => w.flush(),
-        }
-    }
-}
-
-impl<W: Write> fmt::Debug for HttpWriter<W> {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            ThroughWriter(_) => write!(fmt, "ThroughWriter"),
-            ChunkedWriter(_) => write!(fmt, "ChunkedWriter"),
-            SizedWriter(_, rem) => write!(fmt, "SizedWriter(remaining={:?})", rem),
-            EmptyWriter(_) => write!(fmt, "EmptyWriter"),
-        }
-    }
-}
-
-const MAX_HEADERS: usize = 100;
-
-/// Parses a request into an Incoming message head.
-#[inline]
-pub fn parse_request<R: Read>(buf: &mut BufReader<R>) -> ::Result<Incoming<(Method, RequestUri)>> {
-    parse::<R, httparse::Request, (Method, RequestUri)>(buf)
-}
-
-/// Parses a response into an Incoming message head.
-#[inline]
-pub fn parse_response<R: Read>(buf: &mut BufReader<R>) -> ::Result<Incoming<RawStatus>> {
-    parse::<R, httparse::Response, RawStatus>(buf)
-}
-
-fn parse<R: Read, T: TryParse<Subject=I>, I>(rdr: &mut BufReader<R>) -> ::Result<Incoming<I>> {
-    loop {
-        match try!(try_parse::<R, T, I>(rdr)) {
-            httparse::Status::Complete((inc, len)) => {
-                rdr.consume(len);
-                return Ok(inc);
-            },
-            _partial => ()
-        }
-        match try!(rdr.read_into_buf()) {
-            0 if rdr.get_buf().is_empty() => {
-                return Err(Error::Io(io::Error::new(
-                    io::ErrorKind::ConnectionAborted,
-                    "Connection closed"
-                )))
-            },
-            0 => return Err(Error::TooLarge),
-            _ => ()
-        }
-    }
-}
-
-fn try_parse<R: Read, T: TryParse<Subject=I>, I>(rdr: &mut BufReader<R>) -> TryParseResult<I> {
-    let mut headers = [httparse::EMPTY_HEADER; MAX_HEADERS];
-    let buf = rdr.get_buf();
-    if buf.len() == 0 {
-        return Ok(httparse::Status::Partial);
-    }
-    trace!("try_parse({:?})", buf);
-    <T as TryParse>::try_parse(&mut headers, buf)
-}
-
-#[doc(hidden)]
-trait TryParse {
-    type Subject;
-    fn try_parse<'a>(headers: &'a mut [httparse::Header<'a>], buf: &'a [u8]) ->
-        TryParseResult<Self::Subject>;
-}
-
-type TryParseResult<T> = Result<httparse::Status<(Incoming<T>, usize)>, Error>;
-
-impl<'a> TryParse for httparse::Request<'a, 'a> {
-    type Subject = (Method, RequestUri);
-
-    fn try_parse<'b>(headers: &'b mut [httparse::Header<'b>], buf: &'b [u8]) ->
-            TryParseResult<(Method, RequestUri)> {
-        trace!("Request.try_parse([Header; {}], [u8; {}])", headers.len(), buf.len());
-        let mut req = httparse::Request::new(headers);
-        Ok(match try!(req.parse(buf)) {
-            httparse::Status::Complete(len) => {
-                trace!("Request.try_parse Complete({})", len);
-                httparse::Status::Complete((Incoming {
-                    version: if req.version.unwrap() == 1 { Http11 } else { Http10 },
-                    subject: (
-                        try!(req.method.unwrap().parse()),
-                        try!(req.path.unwrap().parse())
-                    ),
-                    headers: try!(Headers::from_raw(req.headers))
-                }, len))
-            },
-            httparse::Status::Partial => httparse::Status::Partial
-        })
-    }
-}
-
-impl<'a> TryParse for httparse::Response<'a, 'a> {
-    type Subject = RawStatus;
-
-    fn try_parse<'b>(headers: &'b mut [httparse::Header<'b>], buf: &'b [u8]) ->
-            TryParseResult<RawStatus> {
-        trace!("Response.try_parse([Header; {}], [u8; {}])", headers.len(), buf.len());
-        let mut res = httparse::Response::new(headers);
-        Ok(match try!(res.parse(buf)) {
-            httparse::Status::Complete(len) => {
-                trace!("Response.try_parse Complete({})", len);
-                let code = res.code.unwrap();
-                let reason = match StatusCode::from_u16(code).canonical_reason() {
-                    Some(reason) if reason == res.reason.unwrap() => Cow::Borrowed(reason),
-                    _ => Cow::Owned(res.reason.unwrap().to_owned())
-                };
-                httparse::Status::Complete((Incoming {
-                    version: if res.version.unwrap() == 1 { Http11 } else { Http10 },
-                    subject: RawStatus(code, reason),
-                    headers: try!(Headers::from_raw(res.headers))
-                }, len))
-            },
-            httparse::Status::Partial => httparse::Status::Partial
-        })
-    }
-}
-
-/// An Incoming Message head. Includes request/status line, and headers.
-#[derive(Debug)]
-pub struct Incoming<S> {
-    /// HTTP version of the message.
-    pub version: HttpVersion,
-    /// Subject (request line or status line) of Incoming message.
-    pub subject: S,
-    /// Headers of the Incoming message.
-    pub headers: Headers
-}
-
-/// The `\r` byte.
-pub const CR: u8 = b'\r';
-/// The `\n` byte.
-pub const LF: u8 = b'\n';
-/// The bytes `\r\n`.
-pub const LINE_ENDING: &'static str = "\r\n";
-
-#[cfg(test)]
-mod tests {
-    use std::error::Error;
-    use std::io::{self, Read, Write};
-
-
-    use buffer::BufReader;
-    use mock::MockStream;
-    use http::HttpMessage;
-
-    use super::{read_chunk_size, parse_request, parse_response, Http11Message};
-
-    #[test]
-    fn test_write_chunked() {
-        use std::str::from_utf8;
-        let mut w = super::HttpWriter::ChunkedWriter(Vec::new());
-        w.write_all(b"foo bar").unwrap();
-        w.write_all(b"baz quux herp").unwrap();
-        let buf = w.end().unwrap();
-        let s = from_utf8(buf.as_ref()).unwrap();
-        assert_eq!(s, "7\r\nfoo bar\r\nD\r\nbaz quux herp\r\n0\r\n\r\n");
-    }
-
-    #[test]
-    fn test_write_sized() {
-        use std::str::from_utf8;
-        let mut w = super::HttpWriter::SizedWriter(Vec::new(), 8);
-        w.write_all(b"foo bar").unwrap();
-        assert_eq!(w.write(b"baz").unwrap(), 1);
-
-        let buf = w.end().unwrap();
-        let s = from_utf8(buf.as_ref()).unwrap();
-        assert_eq!(s, "foo barb");
-    }
-
-    #[test]
-    fn test_read_chunk_size() {
-        fn read(s: &str, result: u64) {
-            assert_eq!(read_chunk_size(&mut s.as_bytes()).unwrap(), result);
-        }
-
-        fn read_err(s: &str) {
-            assert_eq!(read_chunk_size(&mut s.as_bytes()).unwrap_err().kind(),
-                io::ErrorKind::InvalidInput);
-        }
-
-        read("1\r\n", 1);
-        read("01\r\n", 1);
-        read("0\r\n", 0);
-        read("00\r\n", 0);
-        read("A\r\n", 10);
-        read("a\r\n", 10);
-        read("Ff\r\n", 255);
-        read("Ff   \r\n", 255);
-        // Missing LF or CRLF
-        read_err("F\rF");
-        read_err("F");
-        // Invalid hex digit
-        read_err("X\r\n");
-        read_err("1X\r\n");
-        read_err("-\r\n");
-        read_err("-1\r\n");
-        // Acceptable (if not fully valid) extensions do not influence the size
-        read("1;extension\r\n", 1);
-        read("a;ext name=value\r\n", 10);
-        read("1;extension;extension2\r\n", 1);
-        read("1;;;  ;\r\n", 1);
-        read("2; extension...\r\n", 2);
-        read("3   ; extension=123\r\n", 3);
-        read("3   ;\r\n", 3);
-        read("3   ;   \r\n", 3);
-        // Invalid extensions cause an error
-        read_err("1 invalid extension\r\n");
-        read_err("1 A\r\n");
-        read_err("1;no CRLF");
-    }
-
-    #[test]
-    fn test_read_sized_early_eof() {
-        let mut r = super::HttpReader::SizedReader(MockStream::with_input(b"foo bar"), 10);
-        let mut buf = [0u8; 10];
-        assert_eq!(r.read(&mut buf).unwrap(), 7);
-        let e = r.read(&mut buf).unwrap_err();
-        assert_eq!(e.kind(), io::ErrorKind::Other);
-        assert_eq!(e.description(), "early eof");
-    }
-
-    #[test]
-    fn test_read_chunked_early_eof() {
-        let mut r = super::HttpReader::ChunkedReader(MockStream::with_input(b"\
-            9\r\n\
-            foo bar\
-        "), None);
-
-        let mut buf = [0u8; 10];
-        assert_eq!(r.read(&mut buf).unwrap(), 7);
-        let e = r.read(&mut buf).unwrap_err();
-        assert_eq!(e.kind(), io::ErrorKind::Other);
-        assert_eq!(e.description(), "early eof");
-    }
-
-    #[test]
-    fn test_read_sized_zero_len_buf() {
-        let mut r = super::HttpReader::SizedReader(MockStream::with_input(b"foo bar"), 7);
-        let mut buf = [0u8; 0];
-        assert_eq!(r.read(&mut buf).unwrap(), 0);
-    }
-
-    #[test]
-    fn test_read_chunked_zero_len_buf() {
-        let mut r = super::HttpReader::ChunkedReader(MockStream::with_input(b"\
-            7\r\n\
-            foo bar\
-            0\r\n\r\n\
-        "), None);
-
-        let mut buf = [0u8; 0];
-        assert_eq!(r.read(&mut buf).unwrap(), 0);
-    }
-
-    #[test]
-    fn test_read_chunked_fully_consumes() {
-        let mut r = super::HttpReader::ChunkedReader(MockStream::with_input(b"0\r\n\r\n"), None);
-        let mut buf = [0; 1];
-        assert_eq!(r.read(&mut buf).unwrap(), 0);
-        assert_eq!(r.read(&mut buf).unwrap(), 0);
-
-        match r {
-            super::HttpReader::ChunkedReader(mut r, _) => assert_eq!(r.read(&mut buf).unwrap(), 0),
-            _ => unreachable!(),
-        }
-    }
-
-    #[test]
-    fn test_message_get_incoming_invalid_content_length() {
-        let raw = MockStream::with_input(
-            b"HTTP/1.1 200 OK\r\nContent-Length: asdf\r\n\r\n");
-        let mut msg = Http11Message::with_stream(Box::new(raw));
-        assert!(msg.get_incoming().is_err());
-        assert!(msg.close_connection().is_ok());
-    }
-
-    #[test]
-    fn test_parse_incoming() {
-        let mut raw = MockStream::with_input(b"GET /echo HTTP/1.1\r\nHost: hyper.rs\r\n\r\n");
-        let mut buf = BufReader::new(&mut raw);
-        parse_request(&mut buf).unwrap();
-    }
-
-    #[test]
-    fn test_parse_raw_status() {
-        let mut raw = MockStream::with_input(b"HTTP/1.1 200 OK\r\n\r\n");
-        let mut buf = BufReader::new(&mut raw);
-        let res = parse_response(&mut buf).unwrap();
-
-        assert_eq!(res.subject.1, "OK");
-
-        let mut raw = MockStream::with_input(b"HTTP/1.1 200 Howdy\r\n\r\n");
-        let mut buf = BufReader::new(&mut raw);
-        let res = parse_response(&mut buf).unwrap();
-
-        assert_eq!(res.subject.1, "Howdy");
-    }
-
-
-    #[test]
-    fn test_parse_tcp_closed() {
-        use std::io::ErrorKind;
-        use error::Error;
-
-        let mut empty = MockStream::new();
-        let mut buf = BufReader::new(&mut empty);
-        match parse_request(&mut buf) {
-            Err(Error::Io(ref e)) if e.kind() == ErrorKind::ConnectionAborted => (),
-            other => panic!("unexpected result: {:?}", other)
-        }
-    }
-
-    #[cfg(feature = "nightly")]
-    use test::Bencher;
-
-    #[cfg(feature = "nightly")]
-    #[bench]
-    fn bench_parse_incoming(b: &mut Bencher) {
-        let mut raw = MockStream::with_input(b"GET /echo HTTP/1.1\r\nHost: hyper.rs\r\n\r\n");
-        let mut buf = BufReader::new(&mut raw);
-        b.iter(|| {
-            parse_request(&mut buf).unwrap();
-            buf.get_mut().read.set_position(0);
-        });
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/http/message.rs
+++ /dev/null
@@ -1,133 +0,0 @@
-//! Defines the `HttpMessage` trait that serves to encapsulate the operations of a single
-//! request-response cycle on any HTTP connection.
-
-use std::any::{Any, TypeId};
-use std::fmt::Debug;
-use std::io::{Read, Write};
-use std::mem;
-
-use std::io;
-use std::time::Duration;
-
-use typeable::Typeable;
-
-use header::Headers;
-use http::RawStatus;
-use url::Url;
-
-use method;
-use version;
-use traitobject;
-
-/// The trait provides an API for creating new `HttpMessage`s depending on the underlying HTTP
-/// protocol.
-pub trait Protocol {
-    /// Creates a fresh `HttpMessage` bound to the given host, based on the given protocol scheme.
-    fn new_message(&self, host: &str, port: u16, scheme: &str) -> ::Result<Box<HttpMessage>>;
-}
-
-/// Describes a request.
-#[derive(Clone, Debug)]
-pub struct RequestHead {
-    /// The headers of the request
-    pub headers: Headers,
-    /// The method of the request
-    pub method: method::Method,
-    /// The URL of the request
-    pub url: Url,
-}
-
-/// Describes a response.
-#[derive(Clone, Debug)]
-pub struct ResponseHead {
-    /// The headers of the reponse
-    pub headers: Headers,
-    /// The raw status line of the response
-    pub raw_status: RawStatus,
-    /// The HTTP/2 version which generated the response
-    pub version: version::HttpVersion,
-}
-
-/// The trait provides an API for sending an receiving HTTP messages.
-pub trait HttpMessage: Write + Read + Send + Any + Typeable + Debug {
-    /// Initiates a new outgoing request.
-    ///
-    /// Only the request's head is provided (in terms of the `RequestHead` struct).
-    ///
-    /// After this, the `HttpMessage` instance can be used as an `io::Write` in order to write the
-    /// body of the request.
-    fn set_outgoing(&mut self, head: RequestHead) -> ::Result<RequestHead>;
-    /// Obtains the incoming response and returns its head (i.e. the `ResponseHead` struct)
-    ///
-    /// After this, the `HttpMessage` instance can be used as an `io::Read` in order to read out
-    /// the response body.
-    fn get_incoming(&mut self) -> ::Result<ResponseHead>;
-    /// Set the read timeout duration for this message.
-    fn set_read_timeout(&self, dur: Option<Duration>) -> io::Result<()>;
-    /// Set the write timeout duration for this message.
-    fn set_write_timeout(&self, dur: Option<Duration>) -> io::Result<()>;
-    /// Closes the underlying HTTP connection.
-    fn close_connection(&mut self) -> ::Result<()>;
-    /// Returns whether the incoming message has a body.
-    fn has_body(&self) -> bool;
-    /// Called when the Client wishes to use a Proxy.
-    fn set_proxied(&mut self, val: bool) {
-        // default implementation so as to not be a breaking change.
-        warn!("default set_proxied({:?})", val);
-    }
-}
-
-impl HttpMessage {
-    unsafe fn downcast_ref_unchecked<T: 'static>(&self) -> &T {
-        mem::transmute(traitobject::data(self))
-    }
-
-    unsafe fn downcast_mut_unchecked<T: 'static>(&mut self) -> &mut T {
-        mem::transmute(traitobject::data_mut(self))
-    }
-
-    unsafe fn downcast_unchecked<T: 'static>(self: Box<HttpMessage>) -> Box<T>  {
-        let raw: *mut HttpMessage = mem::transmute(self);
-        mem::transmute(traitobject::data_mut(raw))
-    }
-}
-
-impl HttpMessage {
-    /// Is the underlying type in this trait object a T?
-    #[inline]
-    pub fn is<T: Any>(&self) -> bool {
-        (*self).get_type() == TypeId::of::<T>()
-    }
-
-    /// If the underlying type is T, get a reference to the contained data.
-    #[inline]
-    pub fn downcast_ref<T: Any>(&self) -> Option<&T> {
-        if self.is::<T>() {
-            Some(unsafe { self.downcast_ref_unchecked() })
-        } else {
-            None
-        }
-    }
-
-    /// If the underlying type is T, get a mutable reference to the contained
-    /// data.
-    #[inline]
-    pub fn downcast_mut<T: Any>(&mut self) -> Option<&mut T> {
-        if self.is::<T>() {
-            Some(unsafe { self.downcast_mut_unchecked() })
-        } else {
-            None
-        }
-    }
-
-    /// If the underlying type is T, extract it.
-    #[inline]
-    pub fn downcast<T: Any>(self: Box<HttpMessage>)
-            -> Result<Box<T>, Box<HttpMessage>> {
-        if self.is::<T>() {
-            Ok(unsafe { self.downcast_unchecked() })
-        } else {
-            Err(self)
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/http/mod.rs
+++ /dev/null
@@ -1,46 +0,0 @@
-//! Pieces pertaining to the HTTP message protocol.
-use std::borrow::Cow;
-
-use header::Connection;
-use header::ConnectionOption::{KeepAlive, Close};
-use header::Headers;
-use version::HttpVersion;
-use version::HttpVersion::{Http10, Http11};
-
-
-pub use self::message::{HttpMessage, RequestHead, ResponseHead, Protocol};
-
-pub mod h1;
-pub mod message;
-
-/// The raw status code and reason-phrase.
-#[derive(Clone, PartialEq, Debug)]
-pub struct RawStatus(pub u16, pub Cow<'static, str>);
-
-/// Checks if a connection should be kept alive.
-#[inline]
-pub fn should_keep_alive(version: HttpVersion, headers: &Headers) -> bool {
-    trace!("should_keep_alive( {:?}, {:?} )", version, headers.get::<Connection>());
-    match (version, headers.get::<Connection>()) {
-        (Http10, None) => false,
-        (Http10, Some(conn)) if !conn.contains(&KeepAlive) => false,
-        (Http11, Some(conn)) if conn.contains(&Close)  => false,
-        _ => true
-    }
-}
-
-#[test]
-fn test_should_keep_alive() {
-    let mut headers = Headers::new();
-
-    assert!(!should_keep_alive(Http10, &headers));
-    assert!(should_keep_alive(Http11, &headers));
-
-    headers.set(Connection::close());
-    assert!(!should_keep_alive(Http10, &headers));
-    assert!(!should_keep_alive(Http11, &headers));
-
-    headers.set(Connection::keep_alive());
-    assert!(should_keep_alive(Http10, &headers));
-    assert!(should_keep_alive(Http11, &headers));
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/lib.rs
+++ /dev/null
@@ -1,215 +0,0 @@
-#![doc(html_root_url = "https://hyper.rs/hyper/v0.10.10/hyper")]
-#![cfg_attr(test, deny(missing_docs))]
-#![cfg_attr(test, deny(warnings))]
-#![cfg_attr(all(test, feature = "nightly"), feature(test))]
-
-//! # Hyper
-//!
-//! Hyper is a fast, modern HTTP implementation written in and for Rust. It
-//! is a low-level typesafe abstraction over raw HTTP, providing an elegant
-//! layer over "stringly-typed" HTTP.
-//!
-//! Hyper offers both a [Client](client/index.html) and a
-//! [Server](server/index.html) which can be used to drive complex web
-//! applications written entirely in Rust.
-//!
-//! ## Internal Design
-//!
-//! Hyper is designed as a relatively low-level wrapper over raw HTTP. It should
-//! allow the implementation of higher-level abstractions with as little pain as
-//! possible, and should not irrevocably hide any information from its users.
-//!
-//! ### Common Functionality
-//!
-//! Functionality and code shared between the Server and Client implementations
-//! can be found in `src` directly - this includes `NetworkStream`s, `Method`s,
-//! `StatusCode`, and so on.
-//!
-//! #### Methods
-//!
-//! Methods are represented as a single `enum` to remain as simple as possible.
-//! Extension Methods are represented as raw `String`s. A method's safety and
-//! idempotence can be accessed using the `safe` and `idempotent` methods.
-//!
-//! #### StatusCode
-//!
-//! Status codes are also represented as a single, exhaustive, `enum`. This
-//! representation is efficient, typesafe, and ergonomic as it allows the use of
-//! `match` to disambiguate known status codes.
-//!
-//! #### Headers
-//!
-//! Hyper's [header](header/index.html) representation is likely the most
-//! complex API exposed by Hyper.
-//!
-//! Hyper's headers are an abstraction over an internal `HashMap` and provides a
-//! typesafe API for interacting with headers that does not rely on the use of
-//! "string-typing."
-//!
-//! Each HTTP header in Hyper has an associated type and implementation of the
-//! `Header` trait, which defines an HTTP headers name as a string, how to parse
-//! that header, and how to format that header.
-//!
-//! Headers are then parsed from the string representation lazily when the typed
-//! representation of a header is requested and formatted back into their string
-//! representation when headers are written back to the client.
-//!
-//! #### NetworkStream and NetworkAcceptor
-//!
-//! These are found in `src/net.rs` and define the interface that acceptors and
-//! streams must fulfill for them to be used within Hyper. They are by and large
-//! internal tools and you should only need to mess around with them if you want to
-//! mock or replace `TcpStream` and `TcpAcceptor`.
-//!
-//! ### Server
-//!
-//! Server-specific functionality, such as `Request` and `Response`
-//! representations, are found in in `src/server`.
-//!
-//! #### Handler + Server
-//!
-//! A `Handler` in Hyper accepts a `Request` and `Response`. This is where
-//! user-code can handle each connection. The server accepts connections in a
-//! task pool with a customizable number of threads, and passes the Request /
-//! Response to the handler.
-//!
-//! #### Request
-//!
-//! An incoming HTTP Request is represented as a struct containing
-//! a `Reader` over a `NetworkStream`, which represents the body, headers, a remote
-//! address, an HTTP version, and a `Method` - relatively standard stuff.
-//!
-//! `Request` implements `Reader` itself, meaning that you can ergonomically get
-//! the body out of a `Request` using standard `Reader` methods and helpers.
-//!
-//! #### Response
-//!
-//! An outgoing HTTP Response is also represented as a struct containing a `Writer`
-//! over a `NetworkStream` which represents the Response body in addition to
-//! standard items such as the `StatusCode` and HTTP version. `Response`'s `Writer`
-//! implementation provides a streaming interface for sending data over to the
-//! client.
-//!
-//! One of the traditional problems with representing outgoing HTTP Responses is
-//! tracking the write-status of the Response - have we written the status-line,
-//! the headers, the body, etc.? Hyper tracks this information statically using the
-//! type system and prevents you, using the type system, from writing headers after
-//! you have started writing to the body or vice versa.
-//!
-//! Hyper does this through a phantom type parameter in the definition of Response,
-//! which tracks whether you are allowed to write to the headers or the body. This
-//! phantom type can have two values `Fresh` or `Streaming`, with `Fresh`
-//! indicating that you can write the headers and `Streaming` indicating that you
-//! may write to the body, but not the headers.
-//!
-//! ### Client
-//!
-//! Client-specific functionality, such as `Request` and `Response`
-//! representations, are found in `src/client`.
-//!
-//! #### Request
-//!
-//! An outgoing HTTP Request is represented as a struct containing a `Writer` over
-//! a `NetworkStream` which represents the Request body in addition to the standard
-//! information such as headers and the request method.
-//!
-//! Outgoing Requests track their write-status in almost exactly the same way as
-//! outgoing HTTP Responses do on the Server, so we will defer to the explanation
-//! in the documentation for server Response.
-//!
-//! Requests expose an efficient streaming interface instead of a builder pattern,
-//! but they also provide the needed interface for creating a builder pattern over
-//! the API exposed by core Hyper.
-//!
-//! #### Response
-//!
-//! Incoming HTTP Responses are represented as a struct containing a `Reader` over
-//! a `NetworkStream` and contain headers, a status, and an http version. They
-//! implement `Reader` and can be read to get the data out of a `Response`.
-//!
-
-extern crate base64;
-extern crate time;
-#[macro_use] extern crate url;
-extern crate unicase;
-extern crate httparse;
-extern crate num_cpus;
-extern crate traitobject;
-extern crate typeable;
-
-#[cfg_attr(test, macro_use)]
-extern crate language_tags;
-
-#[macro_use]
-extern crate mime as mime_crate;
-
-#[macro_use]
-extern crate log;
-
-#[cfg(all(test, feature = "nightly"))]
-extern crate test;
-
-
-pub use url::Url;
-pub use client::Client;
-pub use error::{Result, Error};
-pub use method::Method::{Get, Head, Post, Delete};
-pub use status::StatusCode::{Ok, BadRequest, NotFound};
-pub use server::Server;
-pub use language_tags::LanguageTag;
-
-macro_rules! todo(
-    ($($arg:tt)*) => (if cfg!(not(ndebug)) {
-        trace!("TODO: {:?}", format_args!($($arg)*))
-    })
-);
-
-macro_rules! inspect(
-    ($name:expr, $value:expr) => ({
-        let v = $value;
-        trace!("inspect: {:?} = {:?}", $name, v);
-        v
-    })
-);
-
-macro_rules! deprecated {
-    (#[$note:meta] $i:item) => (
-        #[cfg_attr(has_deprecated, $note)]
-        $i
-    );
-}
-
-#[cfg(test)]
-#[macro_use]
-mod mock;
-#[doc(hidden)]
-pub mod buffer;
-pub mod client;
-pub mod error;
-pub mod method;
-pub mod header;
-pub mod http;
-pub mod net;
-pub mod server;
-pub mod status;
-pub mod uri;
-pub mod version;
-
-/// Re-exporting the mime crate, for convenience.
-pub mod mime {
-    pub use mime_crate::*;
-}
-
-#[allow(unconditional_recursion)]
-fn _assert_send<T: Send>() {
-    _assert_send::<Client>();
-    _assert_send::<client::Request<net::Fresh>>();
-    _assert_send::<client::Response>();
-    _assert_send::<error::Error>();
-}
-
-#[allow(unconditional_recursion)]
-fn _assert_sync<T: Sync>() {
-    _assert_sync::<Client>();
-    _assert_sync::<error::Error>();
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/method.rs
+++ /dev/null
@@ -1,183 +0,0 @@
-//! The HTTP request method
-use std::fmt;
-use std::str::FromStr;
-use std::convert::AsRef;
-
-use error::Error;
-use self::Method::{Options, Get, Post, Put, Delete, Head, Trace, Connect, Patch,
-                   Extension};
-
-
-/// The Request Method (VERB)
-///
-/// Currently includes 8 variants representing the 8 methods defined in
-/// [RFC 7230](https://tools.ietf.org/html/rfc7231#section-4.1), plus PATCH,
-/// and an Extension variant for all extensions.
-///
-/// It may make sense to grow this to include all variants currently
-/// registered with IANA, if they are at all common to use.
-#[derive(Clone, PartialEq, Eq, Hash, Debug)]
-pub enum Method {
-    /// OPTIONS
-    Options,
-    /// GET
-    Get,
-    /// POST
-    Post,
-    /// PUT
-    Put,
-    /// DELETE
-    Delete,
-    /// HEAD
-    Head,
-    /// TRACE
-    Trace,
-    /// CONNECT
-    Connect,
-    /// PATCH
-    Patch,
-    /// Method extensions. An example would be `let m = Extension("FOO".to_string())`.
-    Extension(String)
-}
-
-impl AsRef<str> for Method {
-    fn as_ref(&self) -> &str {
-        match *self {
-            Options => "OPTIONS",
-            Get => "GET",
-            Post => "POST",
-            Put => "PUT",
-            Delete => "DELETE",
-            Head => "HEAD",
-            Trace => "TRACE",
-            Connect => "CONNECT",
-            Patch => "PATCH",
-            Extension(ref s) => s.as_ref()
-        }
-    }
-}
-
-impl Method {
-    /// Whether a method is considered "safe", meaning the request is
-    /// essentially read-only.
-    ///
-    /// See [the spec](https://tools.ietf.org/html/rfc7231#section-4.2.1)
-    /// for more words.
-    pub fn safe(&self) -> bool {
-        match *self {
-            Get | Head | Options | Trace => true,
-            _ => false
-        }
-    }
-
-    /// Whether a method is considered "idempotent", meaning the request has
-    /// the same result is executed multiple times.
-    ///
-    /// See [the spec](https://tools.ietf.org/html/rfc7231#section-4.2.2) for
-    /// more words.
-    pub fn idempotent(&self) -> bool {
-        if self.safe() {
-            true
-        } else {
-            match *self {
-                Put | Delete => true,
-                _ => false
-            }
-        }
-    }
-}
-
-impl FromStr for Method {
-    type Err = Error;
-    fn from_str(s: &str) -> Result<Method, Error> {
-        if s == "" {
-            Err(Error::Method)
-        } else {
-            Ok(match s {
-                "OPTIONS" => Options,
-                "GET" => Get,
-                "POST" => Post,
-                "PUT" => Put,
-                "DELETE" => Delete,
-                "HEAD" => Head,
-                "TRACE" => Trace,
-                "CONNECT" => Connect,
-                "PATCH" => Patch,
-                _ => Extension(s.to_owned())
-            })
-        }
-    }
-}
-
-impl fmt::Display for Method {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        fmt.write_str(match *self {
-            Options => "OPTIONS",
-            Get => "GET",
-            Post => "POST",
-            Put => "PUT",
-            Delete => "DELETE",
-            Head => "HEAD",
-            Trace => "TRACE",
-            Connect => "CONNECT",
-            Patch => "PATCH",
-            Extension(ref s) => s.as_ref()
-        })
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use std::collections::HashMap;
-    use std::str::FromStr;
-    use error::Error;
-    use super::Method;
-    use super::Method::{Get, Post, Put, Extension};
-
-    #[test]
-    fn test_safe() {
-        assert_eq!(true, Get.safe());
-        assert_eq!(false, Post.safe());
-    }
-
-    #[test]
-    fn test_idempotent() {
-        assert_eq!(true, Get.idempotent());
-        assert_eq!(true, Put.idempotent());
-        assert_eq!(false, Post.idempotent());
-    }
-
-    #[test]
-    fn test_from_str() {
-        assert_eq!(Get, FromStr::from_str("GET").unwrap());
-        assert_eq!(Extension("MOVE".to_owned()),
-                   FromStr::from_str("MOVE").unwrap());
-        let x: Result<Method, _> = FromStr::from_str("");
-        if let Err(Error::Method) = x {
-        } else {
-            panic!("An empty method is invalid!")
-        }
-    }
-
-    #[test]
-    fn test_fmt() {
-        assert_eq!("GET".to_owned(), format!("{}", Get));
-        assert_eq!("MOVE".to_owned(),
-                   format!("{}", Extension("MOVE".to_owned())));
-    }
-
-    #[test]
-    fn test_hashable() {
-        let mut counter: HashMap<Method,usize> = HashMap::new();
-        counter.insert(Get, 1);
-        assert_eq!(Some(&1), counter.get(&Get));
-    }
-
-    #[test]
-    fn test_as_str() {
-        assert_eq!(Get.as_ref(), "GET");
-        assert_eq!(Post.as_ref(), "POST");
-        assert_eq!(Put.as_ref(), "PUT");
-        assert_eq!(Extension("MOVE".to_owned()).as_ref(), "MOVE");
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/mock.rs
+++ /dev/null
@@ -1,166 +0,0 @@
-use std::io::{self, Read, Write, Cursor};
-use std::net::{SocketAddr, Shutdown};
-use std::time::Duration;
-use std::cell::Cell;
-
-use net::{NetworkStream, NetworkConnector, SslClient};
-
-#[derive(Clone, Debug)]
-pub struct MockStream {
-    pub read: Cursor<Vec<u8>>,
-    next_reads: Vec<Vec<u8>>,
-    pub write: Vec<u8>,
-    pub is_closed: bool,
-    pub error_on_write: bool,
-    pub error_on_read: bool,
-    pub read_timeout: Cell<Option<Duration>>,
-    pub write_timeout: Cell<Option<Duration>>,
-}
-
-impl PartialEq for MockStream {
-    fn eq(&self, other: &MockStream) -> bool {
-        self.read.get_ref() == other.read.get_ref() && self.write == other.write
-    }
-}
-
-impl MockStream {
-    pub fn new() -> MockStream {
-        MockStream::with_input(b"")
-    }
-
-    pub fn with_input(input: &[u8]) -> MockStream {
-        MockStream::with_responses(vec![input])
-    }
-
-    pub fn with_responses(mut responses: Vec<&[u8]>) -> MockStream {
-        MockStream {
-            read: Cursor::new(responses.remove(0).to_vec()),
-            next_reads: responses.into_iter().map(|arr| arr.to_vec()).collect(),
-            write: vec![],
-            is_closed: false,
-            error_on_write: false,
-            error_on_read: false,
-            read_timeout: Cell::new(None),
-            write_timeout: Cell::new(None),
-        }
-    }
-}
-
-impl Read for MockStream {
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        if self.error_on_read {
-            Err(io::Error::new(io::ErrorKind::Other, "mock error"))
-        } else {
-            match self.read.read(buf) {
-                Ok(n) => {
-                    if self.read.position() as usize == self.read.get_ref().len() {
-                        if self.next_reads.len() > 0 {
-                            self.read = Cursor::new(self.next_reads.remove(0));
-                        }
-                    }
-                    Ok(n)
-                },
-                r => r
-            }
-        }
-    }
-}
-
-impl Write for MockStream {
-    fn write(&mut self, msg: &[u8]) -> io::Result<usize> {
-        if self.error_on_write {
-            Err(io::Error::new(io::ErrorKind::Other, "mock error"))
-        } else {
-            Write::write(&mut self.write, msg)
-        }
-    }
-
-    fn flush(&mut self) -> io::Result<()> {
-        Ok(())
-    }
-}
-
-impl NetworkStream for MockStream {
-    fn peer_addr(&mut self) -> io::Result<SocketAddr> {
-        Ok("127.0.0.1:1337".parse().unwrap())
-    }
-
-    fn set_read_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        self.read_timeout.set(dur);
-        Ok(())
-    }
-
-    fn set_write_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        self.write_timeout.set(dur);
-        Ok(())
-    }
-
-    fn close(&mut self, _how: Shutdown) -> io::Result<()> {
-        self.is_closed = true;
-        Ok(())
-    }
-}
-
-pub struct MockConnector;
-
-impl NetworkConnector for MockConnector {
-    type Stream = MockStream;
-
-    fn connect(&self, _host: &str, _port: u16, _scheme: &str) -> ::Result<MockStream> {
-        Ok(MockStream::new())
-    }
-}
-
-/// new connectors must be created if you wish to intercept requests.
-macro_rules! mock_connector (
-    ($name:ident {
-        $($url:expr => $res:expr)*
-    }) => (
-
-        struct $name;
-
-        impl $crate::net::NetworkConnector for $name {
-            type Stream = ::mock::MockStream;
-            fn connect(&self, host: &str, port: u16, scheme: &str)
-                    -> $crate::Result<::mock::MockStream> {
-                use std::collections::HashMap;
-                debug!("MockStream::connect({:?}, {:?}, {:?})", host, port, scheme);
-                let mut map = HashMap::new();
-                $(map.insert($url, $res);)*
-
-
-                let key = format!("{}://{}", scheme, host);
-                // ignore port for now
-                match map.get(&*key) {
-                    Some(&res) => Ok($crate::mock::MockStream::with_input(res.as_bytes())),
-                    None => panic!("{:?} doesn't know url {}", stringify!($name), key)
-                }
-            }
-        }
-
-    );
-
-    ($name:ident { $($response:expr),+ }) => (
-        struct $name;
-
-        impl $crate::net::NetworkConnector for $name {
-            type Stream = $crate::mock::MockStream;
-            fn connect(&self, _: &str, _: u16, _: &str)
-                    -> $crate::Result<$crate::mock::MockStream> {
-                Ok($crate::mock::MockStream::with_responses(vec![
-                    $($response),+
-                ]))
-            }
-        }
-    );
-);
-
-#[derive(Debug, Default)]
-pub struct MockSsl;
-
-impl<T: NetworkStream + Send + Clone> SslClient<T> for MockSsl {
-    type Stream = T;
-    fn wrap_client(&self, stream: T, _host: &str) -> ::Result<T> {
-        Ok(stream)
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/net.rs
+++ /dev/null
@@ -1,638 +0,0 @@
-//! A collection of traits abstracting over Listeners and Streams.
-use std::any::{Any, TypeId};
-use std::fmt;
-use std::io::{self, ErrorKind, Read, Write};
-use std::net::{SocketAddr, ToSocketAddrs, TcpStream, TcpListener, Shutdown};
-use std::mem;
-use std::sync::Arc;
-
-use std::time::Duration;
-
-use typeable::Typeable;
-use traitobject;
-
-/// The write-status indicating headers have not been written.
-pub enum Fresh {}
-
-/// The write-status indicating headers have been written.
-pub enum Streaming {}
-
-/// An abstraction to listen for connections on a certain port.
-pub trait NetworkListener: Clone {
-    /// The stream produced for each connection.
-    type Stream: NetworkStream + Send + Clone;
-
-    /// Returns an iterator of streams.
-    fn accept(&mut self) -> ::Result<Self::Stream>;
-
-    /// Get the address this Listener ended up listening on.
-    fn local_addr(&mut self) -> io::Result<SocketAddr>;
-
-    /// Returns an iterator over incoming connections.
-    fn incoming(&mut self) -> NetworkConnections<Self> {
-        NetworkConnections(self)
-    }
-
-    /// Sets the read timeout for all streams that are accepted
-    fn set_read_timeout(&mut self, _: Option<Duration>) {
-        // This default implementation is only here to prevent the addition of
-        // these methods from being a breaking change. They should be removed
-        // when the next breaking release is made.
-        warn!("Ignoring read timeout");
-    }
-
-    /// Sets the write timeout for all streams that are accepted
-    fn set_write_timeout(&mut self, _: Option<Duration>) {
-        // This default implementation is only here to prevent the addition of
-        // these methods from being a breaking change. They should be removed
-        // when the next breaking release is made.
-        warn!("Ignoring write timeout");
-    }
-}
-
-/// An iterator wrapper over a `NetworkAcceptor`.
-pub struct NetworkConnections<'a, N: NetworkListener + 'a>(&'a mut N);
-
-impl<'a, N: NetworkListener + 'a> Iterator for NetworkConnections<'a, N> {
-    type Item = ::Result<N::Stream>;
-    fn next(&mut self) -> Option<::Result<N::Stream>> {
-        Some(self.0.accept())
-    }
-}
-
-/// An abstraction over streams that a `Server` can utilize.
-pub trait NetworkStream: Read + Write + Any + Send + Typeable {
-    /// Get the remote address of the underlying connection.
-    fn peer_addr(&mut self) -> io::Result<SocketAddr>;
-
-    /// Set the maximum time to wait for a read to complete.
-    fn set_read_timeout(&self, dur: Option<Duration>) -> io::Result<()>;
-
-    /// Set the maximum time to wait for a write to complete.
-    fn set_write_timeout(&self, dur: Option<Duration>) -> io::Result<()>;
-
-    /// This will be called when Stream should no longer be kept alive.
-    #[inline]
-    fn close(&mut self, _how: Shutdown) -> io::Result<()> {
-        Ok(())
-    }
-
-    // Unsure about name and implementation...
-
-    #[doc(hidden)]
-    fn set_previous_response_expected_no_content(&mut self, _expected: bool) { }
-
-    #[doc(hidden)]
-    fn previous_response_expected_no_content(&self) -> bool {
-        false
-    }
-}
-
-/// A connector creates a NetworkStream.
-pub trait NetworkConnector {
-    /// Type of `Stream` to create
-    type Stream: Into<Box<NetworkStream + Send>>;
-
-    /// Connect to a remote address.
-    fn connect(&self, host: &str, port: u16, scheme: &str) -> ::Result<Self::Stream>;
-}
-
-impl<T: NetworkStream + Send> From<T> for Box<NetworkStream + Send> {
-    fn from(s: T) -> Box<NetworkStream + Send> {
-        Box::new(s)
-    }
-}
-
-impl fmt::Debug for Box<NetworkStream + Send> {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        fmt.pad("Box<NetworkStream>")
-    }
-}
-
-impl NetworkStream {
-    unsafe fn downcast_ref_unchecked<T: 'static>(&self) -> &T {
-        mem::transmute(traitobject::data(self))
-    }
-
-    unsafe fn downcast_mut_unchecked<T: 'static>(&mut self) -> &mut T {
-        mem::transmute(traitobject::data_mut(self))
-    }
-
-    unsafe fn downcast_unchecked<T: 'static>(self: Box<NetworkStream>) -> Box<T>  {
-        let raw: *mut NetworkStream = mem::transmute(self);
-        mem::transmute(traitobject::data_mut(raw))
-    }
-}
-
-impl NetworkStream {
-    /// Is the underlying type in this trait object a `T`?
-    #[inline]
-    pub fn is<T: Any>(&self) -> bool {
-        (*self).get_type() == TypeId::of::<T>()
-    }
-
-    /// If the underlying type is `T`, get a reference to the contained data.
-    #[inline]
-    pub fn downcast_ref<T: Any>(&self) -> Option<&T> {
-        if self.is::<T>() {
-            Some(unsafe { self.downcast_ref_unchecked() })
-        } else {
-            None
-        }
-    }
-
-    /// If the underlying type is `T`, get a mutable reference to the contained
-    /// data.
-    #[inline]
-    pub fn downcast_mut<T: Any>(&mut self) -> Option<&mut T> {
-        if self.is::<T>() {
-            Some(unsafe { self.downcast_mut_unchecked() })
-        } else {
-            None
-        }
-    }
-
-    /// If the underlying type is `T`, extract it.
-    #[inline]
-    pub fn downcast<T: Any>(self: Box<NetworkStream>)
-            -> Result<Box<T>, Box<NetworkStream>> {
-        if self.is::<T>() {
-            Ok(unsafe { self.downcast_unchecked() })
-        } else {
-            Err(self)
-        }
-    }
-}
-
-impl NetworkStream + Send {
-    unsafe fn downcast_ref_unchecked<T: 'static>(&self) -> &T {
-        mem::transmute(traitobject::data(self))
-    }
-
-    unsafe fn downcast_mut_unchecked<T: 'static>(&mut self) -> &mut T {
-        mem::transmute(traitobject::data_mut(self))
-    }
-
-    unsafe fn downcast_unchecked<T: 'static>(self: Box<NetworkStream + Send>) -> Box<T>  {
-        let raw: *mut NetworkStream = mem::transmute(self);
-        mem::transmute(traitobject::data_mut(raw))
-    }
-}
-
-impl NetworkStream + Send {
-    /// Is the underlying type in this trait object a `T`?
-    #[inline]
-    pub fn is<T: Any>(&self) -> bool {
-        (*self).get_type() == TypeId::of::<T>()
-    }
-
-    /// If the underlying type is `T`, get a reference to the contained data.
-    #[inline]
-    pub fn downcast_ref<T: Any>(&self) -> Option<&T> {
-        if self.is::<T>() {
-            Some(unsafe { self.downcast_ref_unchecked() })
-        } else {
-            None
-        }
-    }
-
-    /// If the underlying type is `T`, get a mutable reference to the contained
-    /// data.
-    #[inline]
-    pub fn downcast_mut<T: Any>(&mut self) -> Option<&mut T> {
-        if self.is::<T>() {
-            Some(unsafe { self.downcast_mut_unchecked() })
-        } else {
-            None
-        }
-    }
-
-    /// If the underlying type is `T`, extract it.
-    #[inline]
-    pub fn downcast<T: Any>(self: Box<NetworkStream + Send>)
-            -> Result<Box<T>, Box<NetworkStream + Send>> {
-        if self.is::<T>() {
-            Ok(unsafe { self.downcast_unchecked() })
-        } else {
-            Err(self)
-        }
-    }
-}
-
-/// A `NetworkListener` for `HttpStream`s.
-#[derive(Clone)]
-pub struct HttpListener {
-    listener: Arc<TcpListener>,
-
-    read_timeout : Option<Duration>,
-    write_timeout: Option<Duration>,
-}
-
-impl From<TcpListener> for HttpListener {
-    fn from(listener: TcpListener) -> HttpListener {
-        HttpListener {
-            listener: Arc::new(listener),
-
-            read_timeout : None,
-            write_timeout: None,
-        }
-    }
-}
-
-impl HttpListener {
-    /// Start listening to an address over HTTP.
-    pub fn new<To: ToSocketAddrs>(addr: To) -> ::Result<HttpListener> {
-        Ok(HttpListener::from(try!(TcpListener::bind(addr))))
-    }
-}
-
-impl NetworkListener for HttpListener {
-    type Stream = HttpStream;
-
-    #[inline]
-    fn accept(&mut self) -> ::Result<HttpStream> {
-        let stream = HttpStream(try!(self.listener.accept()).0);
-        try!(stream.set_read_timeout(self.read_timeout));
-        try!(stream.set_write_timeout(self.write_timeout));
-        Ok(stream)
-    }
-
-    #[inline]
-    fn local_addr(&mut self) -> io::Result<SocketAddr> {
-        self.listener.local_addr()
-    }
-
-    fn set_read_timeout(&mut self, duration: Option<Duration>) {
-        self.read_timeout = duration;
-    }
-
-    fn set_write_timeout(&mut self, duration: Option<Duration>) {
-        self.write_timeout = duration;
-    }
-}
-
-#[cfg(windows)]
-impl ::std::os::windows::io::AsRawSocket for HttpListener {
-    fn as_raw_socket(&self) -> ::std::os::windows::io::RawSocket {
-        self.listener.as_raw_socket()
-    }
-}
-
-#[cfg(windows)]
-impl ::std::os::windows::io::FromRawSocket for HttpListener {
-    unsafe fn from_raw_socket(sock: ::std::os::windows::io::RawSocket) -> HttpListener {
-        HttpListener::from(TcpListener::from_raw_socket(sock))
-    }
-}
-
-#[cfg(unix)]
-impl ::std::os::unix::io::AsRawFd for HttpListener {
-    fn as_raw_fd(&self) -> ::std::os::unix::io::RawFd {
-        self.listener.as_raw_fd()
-    }
-}
-
-#[cfg(unix)]
-impl ::std::os::unix::io::FromRawFd for HttpListener {
-    unsafe fn from_raw_fd(fd: ::std::os::unix::io::RawFd) -> HttpListener {
-        HttpListener::from(TcpListener::from_raw_fd(fd))
-    }
-}
-
-/// A wrapper around a `TcpStream`.
-pub struct HttpStream(pub TcpStream);
-
-impl Clone for HttpStream {
-    #[inline]
-    fn clone(&self) -> HttpStream {
-        HttpStream(self.0.try_clone().unwrap())
-    }
-}
-
-impl fmt::Debug for HttpStream {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.write_str("HttpStream(_)")
-    }
-}
-
-impl Read for HttpStream {
-    #[inline]
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        self.0.read(buf)
-    }
-}
-
-impl Write for HttpStream {
-    #[inline]
-    fn write(&mut self, msg: &[u8]) -> io::Result<usize> {
-        self.0.write(msg)
-    }
-    #[inline]
-    fn flush(&mut self) -> io::Result<()> {
-        self.0.flush()
-    }
-}
-
-#[cfg(windows)]
-impl ::std::os::windows::io::AsRawSocket for HttpStream {
-    fn as_raw_socket(&self) -> ::std::os::windows::io::RawSocket {
-        self.0.as_raw_socket()
-    }
-}
-
-#[cfg(windows)]
-impl ::std::os::windows::io::FromRawSocket for HttpStream {
-    unsafe fn from_raw_socket(sock: ::std::os::windows::io::RawSocket) -> HttpStream {
-        HttpStream(TcpStream::from_raw_socket(sock))
-    }
-}
-
-#[cfg(unix)]
-impl ::std::os::unix::io::AsRawFd for HttpStream {
-    fn as_raw_fd(&self) -> ::std::os::unix::io::RawFd {
-        self.0.as_raw_fd()
-    }
-}
-
-#[cfg(unix)]
-impl ::std::os::unix::io::FromRawFd for HttpStream {
-    unsafe fn from_raw_fd(fd: ::std::os::unix::io::RawFd) -> HttpStream {
-        HttpStream(TcpStream::from_raw_fd(fd))
-    }
-}
-
-impl NetworkStream for HttpStream {
-    #[inline]
-    fn peer_addr(&mut self) -> io::Result<SocketAddr> {
-            self.0.peer_addr()
-    }
-
-    #[inline]
-    fn set_read_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        self.0.set_read_timeout(dur)
-    }
-
-    #[inline]
-    fn set_write_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        self.0.set_write_timeout(dur)
-    }
-
-    #[inline]
-    fn close(&mut self, how: Shutdown) -> io::Result<()> {
-        match self.0.shutdown(how) {
-            Ok(_) => Ok(()),
-            // see https://github.com/hyperium/hyper/issues/508
-            Err(ref e) if e.kind() == ErrorKind::NotConnected => Ok(()),
-            err => err
-        }
-    }
-}
-
-/// A connector that will produce HttpStreams.
-#[derive(Debug, Clone, Default)]
-pub struct HttpConnector;
-
-impl NetworkConnector for HttpConnector {
-    type Stream = HttpStream;
-
-    fn connect(&self, host: &str, port: u16, scheme: &str) -> ::Result<HttpStream> {
-        let addr = &(host, port);
-        Ok(try!(match scheme {
-            "http" => {
-                debug!("http scheme");
-                Ok(HttpStream(try!(TcpStream::connect(addr))))
-            },
-            _ => {
-                Err(io::Error::new(io::ErrorKind::InvalidInput,
-                                "Invalid scheme for Http"))
-            }
-        }))
-    }
-}
-
-/// A closure as a connector used to generate `TcpStream`s per request
-///
-/// # Example
-///
-/// Basic example:
-///
-/// ```norun
-/// Client::with_connector(|addr: &str, port: u16, scheme: &str| {
-///     TcpStream::connect(&(addr, port))
-/// });
-/// ```
-///
-/// Example using `TcpBuilder` from the net2 crate if you want to configure your source socket:
-///
-/// ```norun
-/// Client::with_connector(|addr: &str, port: u16, scheme: &str| {
-///     let b = try!(TcpBuilder::new_v4());
-///     try!(b.bind("127.0.0.1:0"));
-///     b.connect(&(addr, port))
-/// });
-/// ```
-impl<F> NetworkConnector for F where F: Fn(&str, u16, &str) -> io::Result<TcpStream> {
-    type Stream = HttpStream;
-
-    fn connect(&self, host: &str, port: u16, scheme: &str) -> ::Result<HttpStream> {
-        Ok(HttpStream(try!((*self)(host, port, scheme))))
-    }
-}
-
-/// An abstraction to allow any SSL implementation to be used with client-side HttpsStreams.
-pub trait SslClient<T: NetworkStream + Send + Clone = HttpStream> {
-    /// The protected stream.
-    type Stream: NetworkStream + Send + Clone;
-    /// Wrap a client stream with SSL.
-    fn wrap_client(&self, stream: T, host: &str) -> ::Result<Self::Stream>;
-}
-
-/// An abstraction to allow any SSL implementation to be used with server-side HttpsStreams.
-pub trait SslServer<T: NetworkStream + Send + Clone = HttpStream> {
-    /// The protected stream.
-    type Stream: NetworkStream + Send + Clone;
-    /// Wrap a server stream with SSL.
-    fn wrap_server(&self, stream: T) -> ::Result<Self::Stream>;
-}
-
-/// A stream over the HTTP protocol, possibly protected by SSL.
-#[derive(Debug, Clone)]
-pub enum HttpsStream<S: NetworkStream> {
-    /// A plain text stream.
-    Http(HttpStream),
-    /// A stream protected by SSL.
-    Https(S)
-}
-
-impl<S: NetworkStream> Read for HttpsStream<S> {
-    #[inline]
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        match *self {
-            HttpsStream::Http(ref mut s) => s.read(buf),
-            HttpsStream::Https(ref mut s) => s.read(buf)
-        }
-    }
-}
-
-impl<S: NetworkStream> Write for HttpsStream<S> {
-    #[inline]
-    fn write(&mut self, msg: &[u8]) -> io::Result<usize> {
-        match *self {
-            HttpsStream::Http(ref mut s) => s.write(msg),
-            HttpsStream::Https(ref mut s) => s.write(msg)
-        }
-    }
-
-    #[inline]
-    fn flush(&mut self) -> io::Result<()> {
-        match *self {
-            HttpsStream::Http(ref mut s) => s.flush(),
-            HttpsStream::Https(ref mut s) => s.flush()
-        }
-    }
-}
-
-impl<S: NetworkStream> NetworkStream for HttpsStream<S> {
-    #[inline]
-    fn peer_addr(&mut self) -> io::Result<SocketAddr> {
-        match *self {
-            HttpsStream::Http(ref mut s) => s.peer_addr(),
-            HttpsStream::Https(ref mut s) => s.peer_addr()
-        }
-    }
-
-    #[inline]
-    fn set_read_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        match *self {
-            HttpsStream::Http(ref inner) => inner.0.set_read_timeout(dur),
-            HttpsStream::Https(ref inner) => inner.set_read_timeout(dur)
-        }
-    }
-
-    #[inline]
-    fn set_write_timeout(&self, dur: Option<Duration>) -> io::Result<()> {
-        match *self {
-            HttpsStream::Http(ref inner) => inner.0.set_write_timeout(dur),
-            HttpsStream::Https(ref inner) => inner.set_write_timeout(dur)
-        }
-    }
-
-    #[inline]
-    fn close(&mut self, how: Shutdown) -> io::Result<()> {
-        match *self {
-            HttpsStream::Http(ref mut s) => s.close(how),
-            HttpsStream::Https(ref mut s) => s.close(how)
-        }
-    }
-}
-
-/// A Http Listener over SSL.
-#[derive(Clone)]
-pub struct HttpsListener<S: SslServer> {
-    listener: HttpListener,
-    ssl: S,
-}
-
-impl<S: SslServer> HttpsListener<S> {
-    /// Start listening to an address over HTTPS.
-    pub fn new<To: ToSocketAddrs>(addr: To, ssl: S) -> ::Result<HttpsListener<S>> {
-        HttpListener::new(addr).map(|l| HttpsListener {
-            listener: l,
-            ssl: ssl
-        })
-    }
-
-    /// Construct an HttpsListener from a bound `TcpListener`.
-    pub fn with_listener(listener: HttpListener, ssl: S) -> HttpsListener<S> {
-        HttpsListener {
-            listener: listener,
-            ssl: ssl
-        }
-    }
-}
-
-impl<S: SslServer + Clone> NetworkListener for HttpsListener<S> {
-    type Stream = S::Stream;
-
-    #[inline]
-    fn accept(&mut self) -> ::Result<S::Stream> {
-        self.listener.accept().and_then(|s| self.ssl.wrap_server(s))
-    }
-
-    #[inline]
-    fn local_addr(&mut self) -> io::Result<SocketAddr> {
-        self.listener.local_addr()
-    }
-
-    fn set_read_timeout(&mut self, duration: Option<Duration>) {
-        self.listener.set_read_timeout(duration)
-    }
-
-    fn set_write_timeout(&mut self, duration: Option<Duration>) {
-        self.listener.set_write_timeout(duration)
-    }
-}
-
-/// A connector that can protect HTTP streams using SSL.
-#[derive(Debug, Default)]
-pub struct HttpsConnector<S: SslClient, C: NetworkConnector = HttpConnector> {
-    ssl: S,
-    connector: C,
-}
-
-impl<S: SslClient> HttpsConnector<S, HttpConnector> {
-    /// Create a new connector using the provided SSL implementation.
-    pub fn new(s: S) -> HttpsConnector<S, HttpConnector> {
-        HttpsConnector::with_connector(s, HttpConnector)
-    }
-}
-
-impl<S: SslClient, C: NetworkConnector> HttpsConnector<S, C> {
-    /// Create a new connector using the provided SSL implementation.
-    pub fn with_connector(s: S, connector: C) -> HttpsConnector<S, C> {
-        HttpsConnector { ssl: s, connector: connector }
-    }
-}
-
-impl<S: SslClient, C: NetworkConnector<Stream=HttpStream>> NetworkConnector for HttpsConnector<S, C> {
-    type Stream = HttpsStream<S::Stream>;
-
-    fn connect(&self, host: &str, port: u16, scheme: &str) -> ::Result<Self::Stream> {
-        let stream = try!(self.connector.connect(host, port, "http"));
-        if scheme == "https" {
-            debug!("https scheme");
-            self.ssl.wrap_client(stream, host).map(HttpsStream::Https)
-        } else {
-            Ok(HttpsStream::Http(stream))
-        }
-    }
-}
-
-
-#[doc(hidden)]
-pub type DefaultConnector = HttpConnector;
-
-#[cfg(test)]
-mod tests {
-    use mock::MockStream;
-    use super::{NetworkStream};
-
-    #[test]
-    fn test_downcast_box_stream() {
-        // FIXME: Use Type ascription
-        let stream: Box<NetworkStream + Send> = Box::new(MockStream::new());
-
-        let mock = stream.downcast::<MockStream>().ok().unwrap();
-        assert_eq!(mock, Box::new(MockStream::new()));
-    }
-
-    #[test]
-    fn test_downcast_unchecked_box_stream() {
-        // FIXME: Use Type ascription
-        let stream: Box<NetworkStream + Send> = Box::new(MockStream::new());
-
-        let mock = unsafe { stream.downcast_unchecked::<MockStream>() };
-        assert_eq!(mock, Box::new(MockStream::new()));
-    }
-}
-
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/server/listener.rs
+++ /dev/null
@@ -1,79 +0,0 @@
-use std::sync::{Arc, mpsc};
-use std::thread;
-
-use net::NetworkListener;
-
-pub struct ListenerPool<A: NetworkListener> {
-    acceptor: A
-}
-
-impl<A: NetworkListener + Send + 'static> ListenerPool<A> {
-    /// Create a thread pool to manage the acceptor.
-    pub fn new(acceptor: A) -> ListenerPool<A> {
-        ListenerPool { acceptor: acceptor }
-    }
-
-    /// Runs the acceptor pool. Blocks until the acceptors are closed.
-    ///
-    /// ## Panics
-    ///
-    /// Panics if threads == 0.
-    pub fn accept<F>(self, work: F, threads: usize)
-        where F: Fn(A::Stream) + Send + Sync + 'static {
-        assert!(threads != 0, "Can't accept on 0 threads.");
-
-        let (super_tx, supervisor_rx) = mpsc::channel();
-
-        let work = Arc::new(work);
-
-        // Begin work.
-        for _ in 0..threads {
-            spawn_with(super_tx.clone(), work.clone(), self.acceptor.clone())
-        }
-
-        // Monitor for panics.
-        // FIXME(reem): This won't ever exit since we still have a super_tx handle.
-        for _ in supervisor_rx.iter() {
-            spawn_with(super_tx.clone(), work.clone(), self.acceptor.clone());
-        }
-    }
-}
-
-fn spawn_with<A, F>(supervisor: mpsc::Sender<()>, work: Arc<F>, mut acceptor: A)
-where A: NetworkListener + Send + 'static,
-      F: Fn(<A as NetworkListener>::Stream) + Send + Sync + 'static {
-    thread::spawn(move || {
-        let _sentinel = Sentinel::new(supervisor, ());
-
-        loop {
-            match acceptor.accept() {
-                Ok(stream) => work(stream),
-                Err(e) => {
-                    error!("Connection failed: {}", e);
-                }
-            }
-        }
-    });
-}
-
-struct Sentinel<T: Send + 'static> {
-    value: Option<T>,
-    supervisor: mpsc::Sender<T>,
-}
-
-impl<T: Send + 'static> Sentinel<T> {
-    fn new(channel: mpsc::Sender<T>, data: T) -> Sentinel<T> {
-        Sentinel {
-            value: Some(data),
-            supervisor: channel,
-        }
-    }
-}
-
-impl<T: Send + 'static> Drop for Sentinel<T> {
-    fn drop(&mut self) {
-        // Respawn ourselves
-        let _ = self.supervisor.send(self.value.take().unwrap());
-    }
-}
-
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/server/mod.rs
+++ /dev/null
@@ -1,500 +0,0 @@
-//! HTTP Server
-//!
-//! # Server
-//!
-//! A `Server` is created to listen on port, parse HTTP requests, and hand
-//! them off to a `Handler`. By default, the Server will listen across multiple
-//! threads, but that can be configured to a single thread if preferred.
-//!
-//! # Handling requests
-//!
-//! You must pass a `Handler` to the Server that will handle requests. There is
-//! a default implementation for `fn`s and closures, allowing you pass one of
-//! those easily.
-//!
-//!
-//! ```no_run
-//! use hyper::server::{Server, Request, Response};
-//!
-//! fn hello(req: Request, res: Response) {
-//!     // handle things here
-//! }
-//!
-//! Server::http("0.0.0.0:0").unwrap().handle(hello).unwrap();
-//! ```
-//!
-//! As with any trait, you can also define a struct and implement `Handler`
-//! directly on your own type, and pass that to the `Server` instead.
-//!
-//! ```no_run
-//! use std::sync::Mutex;
-//! use std::sync::mpsc::{channel, Sender};
-//! use hyper::server::{Handler, Server, Request, Response};
-//!
-//! struct SenderHandler {
-//!     sender: Mutex<Sender<&'static str>>
-//! }
-//!
-//! impl Handler for SenderHandler {
-//!     fn handle(&self, req: Request, res: Response) {
-//!         self.sender.lock().unwrap().send("start").unwrap();
-//!     }
-//! }
-//!
-//!
-//! let (tx, rx) = channel();
-//! Server::http("0.0.0.0:0").unwrap().handle(SenderHandler {
-//!     sender: Mutex::new(tx)
-//! }).unwrap();
-//! ```
-//!
-//! Since the `Server` will be listening on multiple threads, the `Handler`
-//! must implement `Sync`: any mutable state must be synchronized.
-//!
-//! ```no_run
-//! use std::sync::atomic::{AtomicUsize, Ordering};
-//! use hyper::server::{Server, Request, Response};
-//!
-//! let counter = AtomicUsize::new(0);
-//! Server::http("0.0.0.0:0").unwrap().handle(move |req: Request, res: Response| {
-//!     counter.fetch_add(1, Ordering::Relaxed);
-//! }).unwrap();
-//! ```
-//!
-//! # The `Request` and `Response` pair
-//!
-//! A `Handler` receives a pair of arguments, a `Request` and a `Response`. The
-//! `Request` includes access to the `method`, `uri`, and `headers` of the
-//! incoming HTTP request. It also implements `std::io::Read`, in order to
-//! read any body, such as with `POST` or `PUT` messages.
-//!
-//! Likewise, the `Response` includes ways to set the `status` and `headers`,
-//! and implements `std::io::Write` to allow writing the response body.
-//!
-//! ```no_run
-//! use std::io;
-//! use hyper::server::{Server, Request, Response};
-//! use hyper::status::StatusCode;
-//!
-//! Server::http("0.0.0.0:0").unwrap().handle(|mut req: Request, mut res: Response| {
-//!     match req.method {
-//!         hyper::Post => {
-//!             io::copy(&mut req, &mut res.start().unwrap()).unwrap();
-//!         },
-//!         _ => *res.status_mut() = StatusCode::MethodNotAllowed
-//!     }
-//! }).unwrap();
-//! ```
-//!
-//! ## An aside: Write Status
-//!
-//! The `Response` uses a phantom type parameter to determine its write status.
-//! What does that mean? In short, it ensures you never write a body before
-//! adding all headers, and never add a header after writing some of the body.
-//!
-//! This is often done in most implementations by include a boolean property
-//! on the response, such as `headers_written`, checking that each time the
-//! body has something to write, so as to make sure the headers are sent once,
-//! and only once. But this has 2 downsides:
-//!
-//! 1. You are typically never notified that your late header is doing nothing.
-//! 2. There's a runtime cost to checking on every write.
-//!
-//! Instead, hyper handles this statically, or at compile-time. A
-//! `Response<Fresh>` includes a `headers_mut()` method, allowing you add more
-//! headers. It also does not implement `Write`, so you can't accidentally
-//! write early. Once the "head" of the response is correct, you can "send" it
-//! out by calling `start` on the `Response<Fresh>`. This will return a new
-//! `Response<Streaming>` object, that no longer has `headers_mut()`, but does
-//! implement `Write`.
-use std::fmt;
-use std::io::{self, ErrorKind, BufWriter, Write};
-use std::net::{SocketAddr, ToSocketAddrs};
-use std::thread::{self, JoinHandle};
-use std::time::Duration;
-
-use num_cpus;
-
-pub use self::request::Request;
-pub use self::response::Response;
-
-pub use net::{Fresh, Streaming};
-
-use Error;
-use buffer::BufReader;
-use header::{Headers, Expect, Connection};
-use http;
-use method::Method;
-use net::{NetworkListener, NetworkStream, HttpListener, HttpsListener, SslServer};
-use status::StatusCode;
-use uri::RequestUri;
-use version::HttpVersion::Http11;
-
-use self::listener::ListenerPool;
-
-pub mod request;
-pub mod response;
-
-mod listener;
-
-/// A server can listen on a TCP socket.
-///
-/// Once listening, it will create a `Request`/`Response` pair for each
-/// incoming connection, and hand them to the provided handler.
-#[derive(Debug)]
-pub struct Server<L = HttpListener> {
-    listener: L,
-    timeouts: Timeouts,
-}
-
-#[derive(Clone, Copy, Debug)]
-struct Timeouts {
-    read: Option<Duration>,
-    keep_alive: Option<Duration>,
-}
-
-impl Default for Timeouts {
-    fn default() -> Timeouts {
-        Timeouts {
-            read: None,
-            keep_alive: Some(Duration::from_secs(5))
-        }
-    }
-}
-
-macro_rules! try_option(
-    ($e:expr) => {{
-        match $e {
-            Some(v) => v,
-            None => return None
-        }
-    }}
-);
-
-impl<L: NetworkListener> Server<L> {
-    /// Creates a new server with the provided handler.
-    #[inline]
-    pub fn new(listener: L) -> Server<L> {
-        Server {
-            listener: listener,
-            timeouts: Timeouts::default()
-        }
-    }
-
-    /// Controls keep-alive for this server.
-    ///
-    /// The timeout duration passed will be used to determine how long
-    /// to keep the connection alive before dropping it.
-    ///
-    /// Passing `None` will disable keep-alive.
-    ///
-    /// Default is enabled with a 5 second timeout.
-    #[inline]
-    pub fn keep_alive(&mut self, timeout: Option<Duration>) {
-        self.timeouts.keep_alive = timeout;
-    }
-
-    /// Sets the read timeout for all Request reads.
-    pub fn set_read_timeout(&mut self, dur: Option<Duration>) {
-        self.listener.set_read_timeout(dur);
-        self.timeouts.read = dur;
-    }
-
-    /// Sets the write timeout for all Response writes.
-    pub fn set_write_timeout(&mut self, dur: Option<Duration>) {
-        self.listener.set_write_timeout(dur);
-    }
-
-    /// Get the address that the server is listening on.
-    pub fn local_addr(&mut self) -> io::Result<SocketAddr> {
-        self.listener.local_addr()
-    }
-}
-
-impl Server<HttpListener> {
-    /// Creates a new server that will handle `HttpStream`s.
-    pub fn http<To: ToSocketAddrs>(addr: To) -> ::Result<Server<HttpListener>> {
-        HttpListener::new(addr).map(Server::new)
-    }
-}
-
-impl<S: SslServer + Clone + Send> Server<HttpsListener<S>> {
-    /// Creates a new server that will handle `HttpStream`s over SSL.
-    ///
-    /// You can use any SSL implementation, as long as implements `hyper::net::Ssl`.
-    pub fn https<A: ToSocketAddrs>(addr: A, ssl: S) -> ::Result<Server<HttpsListener<S>>> {
-        HttpsListener::new(addr, ssl).map(Server::new)
-    }
-}
-
-impl<L: NetworkListener + Send + 'static> Server<L> {
-    /// Binds to a socket and starts handling connections.
-    pub fn handle<H: Handler + 'static>(self, handler: H) -> ::Result<Listening> {
-        self.handle_threads(handler, num_cpus::get() * 5 / 4)
-    }
-
-    /// Binds to a socket and starts handling connections with the provided
-    /// number of threads.
-    pub fn handle_threads<H: Handler + 'static>(self, handler: H,
-            threads: usize) -> ::Result<Listening> {
-        handle(self, handler, threads)
-    }
-}
-
-fn handle<H, L>(mut server: Server<L>, handler: H, threads: usize) -> ::Result<Listening>
-where H: Handler + 'static, L: NetworkListener + Send + 'static {
-    let socket = try!(server.listener.local_addr());
-
-    debug!("threads = {:?}", threads);
-    let pool = ListenerPool::new(server.listener);
-    let worker = Worker::new(handler, server.timeouts);
-    let work = move |mut stream| worker.handle_connection(&mut stream);
-
-    let guard = thread::spawn(move || pool.accept(work, threads));
-
-    Ok(Listening {
-        _guard: Some(guard),
-        socket: socket,
-    })
-}
-
-struct Worker<H: Handler + 'static> {
-    handler: H,
-    timeouts: Timeouts,
-}
-
-impl<H: Handler + 'static> Worker<H> {
-    fn new(handler: H, timeouts: Timeouts) -> Worker<H> {
-        Worker {
-            handler: handler,
-            timeouts: timeouts,
-        }
-    }
-
-    fn handle_connection<S>(&self, mut stream: &mut S) where S: NetworkStream + Clone {
-        debug!("Incoming stream");
-
-        self.handler.on_connection_start();
-
-        let addr = match stream.peer_addr() {
-            Ok(addr) => addr,
-            Err(e) => {
-                error!("Peer Name error: {:?}", e);
-                return;
-            }
-        };
-
-        // FIXME: Use Type ascription
-        let stream_clone: &mut NetworkStream = &mut stream.clone();
-        let mut rdr = BufReader::new(stream_clone);
-        let mut wrt = BufWriter::new(stream);
-
-        while self.keep_alive_loop(&mut rdr, &mut wrt, addr) {
-            if let Err(e) = self.set_read_timeout(*rdr.get_ref(), self.timeouts.keep_alive) {
-                error!("set_read_timeout keep_alive {:?}", e);
-                break;
-            }
-        }
-
-        self.handler.on_connection_end();
-
-        debug!("keep_alive loop ending for {}", addr);
-    }
-
-    fn set_read_timeout(&self, s: &NetworkStream, timeout: Option<Duration>) -> io::Result<()> {
-        s.set_read_timeout(timeout)
-    }
-
-    fn keep_alive_loop<W: Write>(&self, mut rdr: &mut BufReader<&mut NetworkStream>,
-            wrt: &mut W, addr: SocketAddr) -> bool {
-        let req = match Request::new(rdr, addr) {
-            Ok(req) => req,
-            Err(Error::Io(ref e)) if e.kind() == ErrorKind::ConnectionAborted => {
-                trace!("tcp closed, cancelling keep-alive loop");
-                return false;
-            }
-            Err(Error::Io(e)) => {
-                debug!("ioerror in keepalive loop = {:?}", e);
-                return false;
-            }
-            Err(e) => {
-                //TODO: send a 400 response
-                error!("request error = {:?}", e);
-                return false;
-            }
-        };
-
-        if !self.handle_expect(&req, wrt) {
-            return false;
-        }
-
-        if let Err(e) = req.set_read_timeout(self.timeouts.read) {
-            error!("set_read_timeout {:?}", e);
-            return false;
-        }
-
-        let mut keep_alive = self.timeouts.keep_alive.is_some() &&
-            http::should_keep_alive(req.version, &req.headers);
-        let version = req.version;
-        let mut res_headers = Headers::new();
-        if !keep_alive {
-            res_headers.set(Connection::close());
-        }
-        {
-            let mut res = Response::new(wrt, &mut res_headers);
-            res.version = version;
-            self.handler.handle(req, res);
-        }
-
-        // if the request was keep-alive, we need to check that the server agrees
-        // if it wasn't, then the server cannot force it to be true anyways
-        if keep_alive {
-            keep_alive = http::should_keep_alive(version, &res_headers);
-        }
-
-        debug!("keep_alive = {:?} for {}", keep_alive, addr);
-        keep_alive
-    }
-
-    fn handle_expect<W: Write>(&self, req: &Request, wrt: &mut W) -> bool {
-         if req.version == Http11 && req.headers.get() == Some(&Expect::Continue) {
-            let status = self.handler.check_continue((&req.method, &req.uri, &req.headers));
-            match write!(wrt, "{} {}\r\n\r\n", Http11, status).and_then(|_| wrt.flush()) {
-                Ok(..) => (),
-                Err(e) => {
-                    error!("error writing 100-continue: {:?}", e);
-                    return false;
-                }
-            }
-
-            if status != StatusCode::Continue {
-                debug!("non-100 status ({}) for Expect 100 request", status);
-                return false;
-            }
-        }
-
-        true
-    }
-}
-
-/// A listening server, which can later be closed.
-pub struct Listening {
-    _guard: Option<JoinHandle<()>>,
-    /// The socket addresses that the server is bound to.
-    pub socket: SocketAddr,
-}
-
-impl fmt::Debug for Listening {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "Listening {{ socket: {:?} }}", self.socket)
-    }
-}
-
-impl Drop for Listening {
-    fn drop(&mut self) {
-        let _ = self._guard.take().map(|g| g.join());
-    }
-}
-
-impl Listening {
-    /// Warning: This function doesn't work. The server remains listening after you called
-    /// it. See https://github.com/hyperium/hyper/issues/338 for more details.
-    ///
-    /// Stop the server from listening to its socket address.
-    pub fn close(&mut self) -> ::Result<()> {
-        let _ = self._guard.take();
-        debug!("closing server");
-        Ok(())
-    }
-}
-
-/// A handler that can handle incoming requests for a server.
-pub trait Handler: Sync + Send {
-    /// Receives a `Request`/`Response` pair, and should perform some action on them.
-    ///
-    /// This could reading from the request, and writing to the response.
-    fn handle<'a, 'k>(&'a self, Request<'a, 'k>, Response<'a, Fresh>);
-
-    /// Called when a Request includes a `Expect: 100-continue` header.
-    ///
-    /// By default, this will always immediately response with a `StatusCode::Continue`,
-    /// but can be overridden with custom behavior.
-    fn check_continue(&self, _: (&Method, &RequestUri, &Headers)) -> StatusCode {
-        StatusCode::Continue
-    }
-
-    /// This is run after a connection is received, on a per-connection basis (not a
-    /// per-request basis, as a connection with keep-alive may handle multiple
-    /// requests)
-    fn on_connection_start(&self) { }
-
-    /// This is run before a connection is closed, on a per-connection basis (not a
-    /// per-request basis, as a connection with keep-alive may handle multiple
-    /// requests)
-    fn on_connection_end(&self) { }
-}
-
-impl<F> Handler for F where F: Fn(Request, Response<Fresh>), F: Sync + Send {
-    fn handle<'a, 'k>(&'a self, req: Request<'a, 'k>, res: Response<'a, Fresh>) {
-        self(req, res)
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use header::Headers;
-    use method::Method;
-    use mock::MockStream;
-    use status::StatusCode;
-    use uri::RequestUri;
-
-    use super::{Request, Response, Fresh, Handler, Worker};
-
-    #[test]
-    fn test_check_continue_default() {
-        let mut mock = MockStream::with_input(b"\
-            POST /upload HTTP/1.1\r\n\
-            Host: example.domain\r\n\
-            Expect: 100-continue\r\n\
-            Content-Length: 10\r\n\
-            \r\n\
-            1234567890\
-        ");
-
-        fn handle(_: Request, res: Response<Fresh>) {
-            res.start().unwrap().end().unwrap();
-        }
-
-        Worker::new(handle, Default::default()).handle_connection(&mut mock);
-        let cont = b"HTTP/1.1 100 Continue\r\n\r\n";
-        assert_eq!(&mock.write[..cont.len()], cont);
-        let res = b"HTTP/1.1 200 OK\r\n";
-        assert_eq!(&mock.write[cont.len()..cont.len() + res.len()], res);
-    }
-
-    #[test]
-    fn test_check_continue_reject() {
-        struct Reject;
-        impl Handler for Reject {
-            fn handle<'a, 'k>(&'a self, _: Request<'a, 'k>, res: Response<'a, Fresh>) {
-                res.start().unwrap().end().unwrap();
-            }
-
-            fn check_continue(&self, _: (&Method, &RequestUri, &Headers)) -> StatusCode {
-                StatusCode::ExpectationFailed
-            }
-        }
-
-        let mut mock = MockStream::with_input(b"\
-            POST /upload HTTP/1.1\r\n\
-            Host: example.domain\r\n\
-            Expect: 100-continue\r\n\
-            Content-Length: 10\r\n\
-            \r\n\
-            1234567890\
-        ");
-
-        Worker::new(Reject, Default::default()).handle_connection(&mut mock);
-        assert_eq!(mock.write, &b"HTTP/1.1 417 Expectation Failed\r\n\r\n"[..]);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/server/request.rs
+++ /dev/null
@@ -1,307 +0,0 @@
-//! Server Requests
-//!
-//! These are requests that a `hyper::Server` receives, and include its method,
-//! target URI, headers, and message body.
-use std::io::{self, Read};
-use std::net::SocketAddr;
-use std::time::Duration;
-
-use buffer::BufReader;
-use net::NetworkStream;
-use version::{HttpVersion};
-use method::Method;
-use header::{Headers, ContentLength, TransferEncoding};
-use http::h1::{self, Incoming, HttpReader};
-use http::h1::HttpReader::{SizedReader, ChunkedReader, EmptyReader};
-use uri::RequestUri;
-
-/// A request bundles several parts of an incoming `NetworkStream`, given to a `Handler`.
-pub struct Request<'a, 'b: 'a> {
-    /// The IP address of the remote connection.
-    pub remote_addr: SocketAddr,
-    /// The `Method`, such as `Get`, `Post`, etc.
-    pub method: Method,
-    /// The headers of the incoming request.
-    pub headers: Headers,
-    /// The target request-uri for this request.
-    pub uri: RequestUri,
-    /// The version of HTTP for this request.
-    pub version: HttpVersion,
-    body: HttpReader<&'a mut BufReader<&'b mut NetworkStream>>
-}
-
-
-impl<'a, 'b: 'a> Request<'a, 'b> {
-    /// Create a new Request, reading the StartLine and Headers so they are
-    /// immediately useful.
-    pub fn new(mut stream: &'a mut BufReader<&'b mut NetworkStream>, addr: SocketAddr)
-        -> ::Result<Request<'a, 'b>> {
-
-        let Incoming { version, subject: (method, uri), headers } = try!(h1::parse_request(stream));
-        debug!("Request Line: {:?} {:?} {:?}", method, uri, version);
-        debug!("{:?}", headers);
-
-        let body = if headers.has::<ContentLength>() {
-            match headers.get::<ContentLength>() {
-                Some(&ContentLength(len)) => SizedReader(stream, len),
-                None => unreachable!()
-            }
-        } else if headers.has::<TransferEncoding>() {
-            todo!("check for Transfer-Encoding: chunked");
-            ChunkedReader(stream, None)
-        } else {
-            EmptyReader(stream)
-        };
-
-        Ok(Request {
-            remote_addr: addr,
-            method: method,
-            uri: uri,
-            headers: headers,
-            version: version,
-            body: body
-        })
-    }
-
-    /// Set the read timeout of the underlying NetworkStream.
-    #[inline]
-    pub fn set_read_timeout(&self, timeout: Option<Duration>) -> io::Result<()> {
-        self.body.get_ref().get_ref().set_read_timeout(timeout)
-    }
-
-    /// Get a reference to the underlying `NetworkStream`.
-    #[inline]
-    pub fn downcast_ref<T: NetworkStream>(&self) -> Option<&T> {
-        self.body.get_ref().get_ref().downcast_ref()
-    }
-
-    /// Get a reference to the underlying Ssl stream, if connected
-    /// over HTTPS.
-    ///
-    /// This is actually just an alias for `downcast_ref`.
-    #[inline]
-    pub fn ssl<T: NetworkStream>(&self) -> Option<&T> {
-        self.downcast_ref()
-    }
-
-    /// Deconstruct a Request into its constituent parts.
-    #[inline]
-    pub fn deconstruct(self) -> (SocketAddr, Method, Headers,
-                                 RequestUri, HttpVersion,
-                                 HttpReader<&'a mut BufReader<&'b mut NetworkStream>>) {
-        (self.remote_addr, self.method, self.headers,
-         self.uri, self.version, self.body)
-    }
-}
-
-impl<'a, 'b> Read for Request<'a, 'b> {
-    #[inline]
-    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        self.body.read(buf)
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use buffer::BufReader;
-    use header::{Host, TransferEncoding, Encoding};
-    use net::NetworkStream;
-    use mock::MockStream;
-    use super::Request;
-
-    use std::io::{self, Read};
-    use std::net::SocketAddr;
-
-    fn sock(s: &str) -> SocketAddr {
-        s.parse().unwrap()
-    }
-
-    fn read_to_string(mut req: Request) -> io::Result<String> {
-        let mut s = String::new();
-        try!(req.read_to_string(&mut s));
-        Ok(s)
-    }
-
-    #[test]
-    fn test_get_empty_body() {
-        let mut mock = MockStream::with_input(b"\
-            GET / HTTP/1.1\r\n\
-            Host: example.domain\r\n\
-            \r\n\
-            I'm a bad request.\r\n\
-        ");
-
-        // FIXME: Use Type ascription
-        let mock: &mut NetworkStream = &mut mock;
-        let mut stream = BufReader::new(mock);
-
-        let req = Request::new(&mut stream, sock("127.0.0.1:80")).unwrap();
-        assert_eq!(read_to_string(req).unwrap(), "".to_owned());
-    }
-
-    #[test]
-    fn test_get_with_body() {
-        let mut mock = MockStream::with_input(b"\
-            GET / HTTP/1.1\r\n\
-            Host: example.domain\r\n\
-            Content-Length: 19\r\n\
-            \r\n\
-            I'm a good request.\r\n\
-        ");
-
-        // FIXME: Use Type ascription
-        let mock: &mut NetworkStream = &mut mock;
-        let mut stream = BufReader::new(mock);
-
-        let req = Request::new(&mut stream, sock("127.0.0.1:80")).unwrap();
-        assert_eq!(read_to_string(req).unwrap(), "I'm a good request.".to_owned());
-    }
-
-    #[test]
-    fn test_head_empty_body() {
-        let mut mock = MockStream::with_input(b"\
-            HEAD / HTTP/1.1\r\n\
-            Host: example.domain\r\n\
-            \r\n\
-            I'm a bad request.\r\n\
-        ");
-
-        // FIXME: Use Type ascription
-        let mock: &mut NetworkStream = &mut mock;
-        let mut stream = BufReader::new(mock);
-
-        let req = Request::new(&mut stream, sock("127.0.0.1:80")).unwrap();
-        assert_eq!(read_to_string(req).unwrap(), "".to_owned());
-    }
-
-    #[test]
-    fn test_post_empty_body() {
-        let mut mock = MockStream::with_input(b"\
-            POST / HTTP/1.1\r\n\
-            Host: example.domain\r\n\
-            \r\n\
-            I'm a bad request.\r\n\
-        ");
-
-        // FIXME: Use Type ascription
-        let mock: &mut NetworkStream = &mut mock;
-        let mut stream = BufReader::new(mock);
-
-        let req = Request::new(&mut stream, sock("127.0.0.1:80")).unwrap();
-        assert_eq!(read_to_string(req).unwrap(), "".to_owned());
-    }
-
-    #[test]
-    fn test_parse_chunked_request() {
-        let mut mock = MockStream::with_input(b"\
-            POST / HTTP/1.1\r\n\
-            Host: example.domain\r\n\
-            Transfer-Encoding: chunked\r\n\
-            \r\n\
-            1\r\n\
-            q\r\n\
-            2\r\n\
-            we\r\n\
-            2\r\n\
-            rt\r\n\
-            0\r\n\
-            \r\n"
-        );
-
-        // FIXME: Use Type ascription
-        let mock: &mut NetworkStream = &mut mock;
-        let mut stream = BufReader::new(mock);
-
-        let req = Request::new(&mut stream, sock("127.0.0.1:80")).unwrap();
-
-        // The headers are correct?
-        match req.headers.get::<Host>() {
-            Some(host) => {
-                assert_eq!("example.domain", host.hostname);
-            },
-            None => panic!("Host header expected!"),
-        };
-        match req.headers.get::<TransferEncoding>() {
-            Some(encodings) => {
-                assert_eq!(1, encodings.len());
-                assert_eq!(Encoding::Chunked, encodings[0]);
-            }
-            None => panic!("Transfer-Encoding: chunked expected!"),
-        };
-        // The content is correctly read?
-        assert_eq!(read_to_string(req).unwrap(), "qwert".to_owned());
-    }
-
-    /// Tests that when a chunk size is not a valid radix-16 number, an error
-    /// is returned.
-    #[test]
-    fn test_invalid_chunk_size_not_hex_digit() {
-        let mut mock = MockStream::with_input(b"\
-            POST / HTTP/1.1\r\n\
-            Host: example.domain\r\n\
-            Transfer-Encoding: chunked\r\n\
-            \r\n\
-            X\r\n\
-            1\r\n\
-            0\r\n\
-            \r\n"
-        );
-
-        // FIXME: Use Type ascription
-        let mock: &mut NetworkStream = &mut mock;
-        let mut stream = BufReader::new(mock);
-
-        let req = Request::new(&mut stream, sock("127.0.0.1:80")).unwrap();
-
-        assert!(read_to_string(req).is_err());
-    }
-
-    /// Tests that when a chunk size contains an invalid extension, an error is
-    /// returned.
-    #[test]
-    fn test_invalid_chunk_size_extension() {
-        let mut mock = MockStream::with_input(b"\
-            POST / HTTP/1.1\r\n\
-            Host: example.domain\r\n\
-            Transfer-Encoding: chunked\r\n\
-            \r\n\
-            1 this is an invalid extension\r\n\
-            1\r\n\
-            0\r\n\
-            \r\n"
-        );
-
-        // FIXME: Use Type ascription
-        let mock: &mut NetworkStream = &mut mock;
-        let mut stream = BufReader::new(mock);
-
-        let req = Request::new(&mut stream, sock("127.0.0.1:80")).unwrap();
-
-        assert!(read_to_string(req).is_err());
-    }
-
-    /// Tests that when a valid extension that contains a digit is appended to
-    /// the chunk size, the chunk is correctly read.
-    #[test]
-    fn test_chunk_size_with_extension() {
-        let mut mock = MockStream::with_input(b"\
-            POST / HTTP/1.1\r\n\
-            Host: example.domain\r\n\
-            Transfer-Encoding: chunked\r\n\
-            \r\n\
-            1;this is an extension with a digit 1\r\n\
-            1\r\n\
-            0\r\n\
-            \r\n"
-        );
-
-        // FIXME: Use Type ascription
-        let mock: &mut NetworkStream = &mut mock;
-        let mut stream = BufReader::new(mock);
-
-        let req = Request::new(&mut stream, sock("127.0.0.1:80")).unwrap();
-
-        assert_eq!(read_to_string(req).unwrap(), "1".to_owned());
-    }
-
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/server/response.rs
+++ /dev/null
@@ -1,432 +0,0 @@
-//! Server Responses
-//!
-//! These are responses sent by a `hyper::Server` to clients, after
-//! receiving a request.
-use std::any::{Any, TypeId};
-use std::marker::PhantomData;
-use std::mem;
-use std::io::{self, Write};
-use std::ptr;
-use std::thread;
-
-use time::now_utc;
-
-use header;
-use http::h1::{LINE_ENDING, HttpWriter};
-use http::h1::HttpWriter::{ThroughWriter, ChunkedWriter, SizedWriter, EmptyWriter};
-use status;
-use net::{Fresh, Streaming};
-use version;
-
-
-/// The outgoing half for a Tcp connection, created by a `Server` and given to a `Handler`.
-///
-/// The default `StatusCode` for a `Response` is `200 OK`.
-///
-/// There is a `Drop` implementation for `Response` that will automatically
-/// write the head and flush the body, if the handler has not already done so,
-/// so that the server doesn't accidentally leave dangling requests.
-#[derive(Debug)]
-pub struct Response<'a, W: Any = Fresh> {
-    /// The HTTP version of this response.
-    pub version: version::HttpVersion,
-    // Stream the Response is writing to, not accessible through UnwrittenResponse
-    body: HttpWriter<&'a mut (Write + 'a)>,
-    // The status code for the request.
-    status: status::StatusCode,
-    // The outgoing headers on this response.
-    headers: &'a mut header::Headers,
-
-    _writing: PhantomData<W>
-}
-
-impl<'a, W: Any> Response<'a, W> {
-    /// The status of this response.
-    #[inline]
-    pub fn status(&self) -> status::StatusCode { self.status }
-
-    /// The headers of this response.
-    #[inline]
-    pub fn headers(&self) -> &header::Headers { &*self.headers }
-
-    /// Construct a Response from its constituent parts.
-    #[inline]
-    pub fn construct(version: version::HttpVersion,
-                     body: HttpWriter<&'a mut (Write + 'a)>,
-                     status: status::StatusCode,
-                     headers: &'a mut header::Headers) -> Response<'a, Fresh> {
-        Response {
-            status: status,
-            version: version,
-            body: body,
-            headers: headers,
-            _writing: PhantomData,
-        }
-    }
-
-    /// Deconstruct this Response into its constituent parts.
-    #[inline]
-    pub fn deconstruct(self) -> (version::HttpVersion, HttpWriter<&'a mut (Write + 'a)>,
-                                 status::StatusCode, &'a mut header::Headers) {
-        unsafe {
-            let parts = (
-                self.version,
-                ptr::read(&self.body),
-                self.status,
-                ptr::read(&self.headers)
-            );
-            mem::forget(self);
-            parts
-        }
-    }
-
-    fn write_head(&mut self) -> io::Result<Body> {
-        debug!("writing head: {:?} {:?}", self.version, self.status);
-        try!(write!(&mut self.body, "{} {}\r\n", self.version, self.status));
-
-        if !self.headers.has::<header::Date>() {
-            self.headers.set(header::Date(header::HttpDate(now_utc())));
-        }
-
-        let body_type = match self.status {
-            status::StatusCode::NoContent | status::StatusCode::NotModified => Body::Empty,
-            c if c.class() == status::StatusClass::Informational => Body::Empty,
-            _ => if let Some(cl) = self.headers.get::<header::ContentLength>() {
-                Body::Sized(**cl)
-            } else {
-                Body::Chunked
-            }
-        };
-
-        // can't do in match above, thanks borrowck
-        if body_type == Body::Chunked {
-            let encodings = match self.headers.get_mut::<header::TransferEncoding>() {
-                Some(&mut header::TransferEncoding(ref mut encodings)) => {
-                    //TODO: check if chunked is already in encodings. use HashSet?
-                    encodings.push(header::Encoding::Chunked);
-                    false
-                },
-                None => true
-            };
-
-            if encodings {
-                self.headers.set::<header::TransferEncoding>(
-                    header::TransferEncoding(vec![header::Encoding::Chunked]))
-            }
-        }
-
-
-        debug!("headers [\n{:?}]", self.headers);
-        try!(write!(&mut self.body, "{}", self.headers));
-        try!(write!(&mut self.body, "{}", LINE_ENDING));
-
-        Ok(body_type)
-    }
-}
-
-impl<'a> Response<'a, Fresh> {
-    /// Creates a new Response that can be used to write to a network stream.
-    #[inline]
-    pub fn new(stream: &'a mut (Write + 'a), headers: &'a mut header::Headers) ->
-            Response<'a, Fresh> {
-        Response {
-            status: status::StatusCode::Ok,
-            version: version::HttpVersion::Http11,
-            headers: headers,
-            body: ThroughWriter(stream),
-            _writing: PhantomData,
-        }
-    }
-
-    /// Writes the body and ends the response.
-    ///
-    /// This is a shortcut method for when you have a response with a fixed
-    /// size, and would only need a single `write` call normally.
-    ///
-    /// # Example
-    ///
-    /// ```
-    /// # use hyper::server::Response;
-    /// fn handler(res: Response) {
-    ///     res.send(b"Hello World!").unwrap();
-    /// }
-    /// ```
-    ///
-    /// The above is the same, but shorter, than the longer:
-    ///
-    /// ```
-    /// # use hyper::server::Response;
-    /// use std::io::Write;
-    /// use hyper::header::ContentLength;
-    /// fn handler(mut res: Response) {
-    ///     let body = b"Hello World!";
-    ///     res.headers_mut().set(ContentLength(body.len() as u64));
-    ///     let mut res = res.start().unwrap();
-    ///     res.write_all(body).unwrap();
-    /// }
-    /// ```
-    #[inline]
-    pub fn send(mut self, body: &[u8]) -> io::Result<()> {
-        self.headers.set(header::ContentLength(body.len() as u64));
-        let mut stream = try!(self.start());
-        try!(stream.write_all(body));
-        stream.end()
-    }
-
-    /// Consume this Response<Fresh>, writing the Headers and Status and
-    /// creating a Response<Streaming>
-    pub fn start(mut self) -> io::Result<Response<'a, Streaming>> {
-        let body_type = try!(self.write_head());
-        let (version, body, status, headers) = self.deconstruct();
-        let stream = match body_type {
-            Body::Chunked => ChunkedWriter(body.into_inner()),
-            Body::Sized(len) => SizedWriter(body.into_inner(), len),
-            Body::Empty => EmptyWriter(body.into_inner()),
-        };
-
-        // "copy" to change the phantom type
-        Ok(Response {
-            version: version,
-            body: stream,
-            status: status,
-            headers: headers,
-            _writing: PhantomData,
-        })
-    }
-    /// Get a mutable reference to the status.
-    #[inline]
-    pub fn status_mut(&mut self) -> &mut status::StatusCode { &mut self.status }
-
-    /// Get a mutable reference to the Headers.
-    #[inline]
-    pub fn headers_mut(&mut self) -> &mut header::Headers { self.headers }
-}
-
-
-impl<'a> Response<'a, Streaming> {
-    /// Flushes all writing of a response to the client.
-    #[inline]
-    pub fn end(self) -> io::Result<()> {
-        trace!("ending");
-        let (_, body, _, _) = self.deconstruct();
-        try!(body.end());
-        Ok(())
-    }
-}
-
-impl<'a> Write for Response<'a, Streaming> {
-    #[inline]
-    fn write(&mut self, msg: &[u8]) -> io::Result<usize> {
-        debug!("write {:?} bytes", msg.len());
-        self.body.write(msg)
-    }
-
-    #[inline]
-    fn flush(&mut self) -> io::Result<()> {
-        self.body.flush()
-    }
-}
-
-#[derive(PartialEq)]
-enum Body {
-    Chunked,
-    Sized(u64),
-    Empty,
-}
-
-impl<'a, T: Any> Drop for Response<'a, T> {
-    fn drop(&mut self) {
-        if TypeId::of::<T>() == TypeId::of::<Fresh>() {
-            if thread::panicking() {
-                self.status = status::StatusCode::InternalServerError;
-            }
-
-            let mut body = match self.write_head() {
-                Ok(Body::Chunked) => ChunkedWriter(self.body.get_mut()),
-                Ok(Body::Sized(len)) => SizedWriter(self.body.get_mut(), len),
-                Ok(Body::Empty) => EmptyWriter(self.body.get_mut()),
-                Err(e) => {
-                    debug!("error dropping request: {:?}", e);
-                    return;
-                }
-            };
-            end(&mut body);
-        } else {
-            end(&mut self.body);
-        };
-
-
-        #[inline]
-        fn end<W: Write>(w: &mut W) {
-            match w.write(&[]) {
-                Ok(_) => match w.flush() {
-                    Ok(_) => debug!("drop successful"),
-                    Err(e) => debug!("error dropping request: {:?}", e)
-                },
-                Err(e) => debug!("error dropping request: {:?}", e)
-            }
-        }
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use header::Headers;
-    use mock::MockStream;
-    use super::Response;
-
-    macro_rules! lines {
-        ($s:ident = $($line:pat),+) => ({
-            let s = String::from_utf8($s.write).unwrap();
-            let mut lines = s.split_terminator("\r\n");
-
-            $(
-                match lines.next() {
-                    Some($line) => (),
-                    other => panic!("line mismatch: {:?} != {:?}", other, stringify!($line))
-                }
-            )+
-
-            assert_eq!(lines.next(), None);
-        })
-    }
-
-    #[test]
-    fn test_fresh_start() {
-        let mut headers = Headers::new();
-        let mut stream = MockStream::new();
-        {
-            let res = Response::new(&mut stream, &mut headers);
-            res.start().unwrap().deconstruct();
-        }
-
-        lines! { stream =
-            "HTTP/1.1 200 OK",
-            _date,
-            _transfer_encoding,
-            ""
-        }
-    }
-
-    #[test]
-    fn test_streaming_end() {
-        let mut headers = Headers::new();
-        let mut stream = MockStream::new();
-        {
-            let res = Response::new(&mut stream, &mut headers);
-            res.start().unwrap().end().unwrap();
-        }
-
-        lines! { stream =
-            "HTTP/1.1 200 OK",
-            _date,
-            _transfer_encoding,
-            "",
-            "0",
-            "" // empty zero body
-        }
-    }
-
-    #[test]
-    fn test_fresh_drop() {
-        use status::StatusCode;
-        let mut headers = Headers::new();
-        let mut stream = MockStream::new();
-        {
-            let mut res = Response::new(&mut stream, &mut headers);
-            *res.status_mut() = StatusCode::NotFound;
-        }
-
-        lines! { stream =
-            "HTTP/1.1 404 Not Found",
-            _date,
-            _transfer_encoding,
-            "",
-            "0",
-            "" // empty zero body
-        }
-    }
-
-    // x86 windows msvc does not support unwinding
-    // See https://github.com/rust-lang/rust/issues/25869
-    #[cfg(not(all(windows, target_arch="x86", target_env="msvc")))]
-    #[test]
-    fn test_fresh_drop_panicing() {
-        use std::thread;
-        use std::sync::{Arc, Mutex};
-
-        use status::StatusCode;
-
-        let stream = MockStream::new();
-        let stream = Arc::new(Mutex::new(stream));
-        let inner_stream = stream.clone();
-        let join_handle = thread::spawn(move || {
-            let mut headers = Headers::new();
-            let mut stream = inner_stream.lock().unwrap();
-            let mut res = Response::new(&mut *stream, &mut headers);
-            *res.status_mut() = StatusCode::NotFound;
-
-            panic!("inside")
-        });
-
-        assert!(join_handle.join().is_err());
-
-        let stream = match stream.lock() {
-            Err(poisoned) => poisoned.into_inner().clone(),
-            Ok(_) => unreachable!()
-        };
-
-        lines! { stream =
-            "HTTP/1.1 500 Internal Server Error",
-            _date,
-            _transfer_encoding,
-            "",
-            "0",
-            "" // empty zero body
-        }
-    }
-
-
-    #[test]
-    fn test_streaming_drop() {
-        use std::io::Write;
-        use status::StatusCode;
-        let mut headers = Headers::new();
-        let mut stream = MockStream::new();
-        {
-            let mut res = Response::new(&mut stream, &mut headers);
-            *res.status_mut() = StatusCode::NotFound;
-            let mut stream = res.start().unwrap();
-            stream.write_all(b"foo").unwrap();
-        }
-
-        lines! { stream =
-            "HTTP/1.1 404 Not Found",
-            _date,
-            _transfer_encoding,
-            "",
-            "3",
-            "foo",
-            "0",
-            "" // empty zero body
-        }
-    }
-
-    #[test]
-    fn test_no_content() {
-        use status::StatusCode;
-        let mut headers = Headers::new();
-        let mut stream = MockStream::new();
-        {
-            let mut res = Response::new(&mut stream, &mut headers);
-            *res.status_mut() = StatusCode::NoContent;
-            res.start().unwrap();
-        }
-
-        lines! { stream =
-            "HTTP/1.1 204 No Content",
-            _date,
-            ""
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/status.rs
+++ /dev/null
@@ -1,748 +0,0 @@
-//! HTTP status codes
-use std::fmt;
-use std::cmp::Ordering;
-
-// shamelessly lifted from Teepee. I tried a few schemes, this really
-// does seem like the best. Improved scheme to support arbitrary status codes.
-
-/// An HTTP status code (`status-code` in RFC 7230 et al.).
-///
-/// This enum contains all common status codes and an Unregistered
-/// extension variant. It allows status codes in the range [0, 65535], as any
-/// `u16` integer may be used as a status code for XHR requests. It is
-/// recommended to only use values between [100, 599], since only these are
-/// defined as valid status codes with a status class by HTTP.
-///
-/// If you encounter a status code that you do not know how to deal with, you
-/// should treat it as the `x00` status code—e.g. for code 123, treat it as
-/// 100 (Continue). This can be achieved with
-/// `self.class().default_code()`:
-///
-/// ```rust
-/// # use hyper::status::StatusCode;
-/// let status = StatusCode::Unregistered(123);
-/// assert_eq!(status.class().default_code(), StatusCode::Continue);
-/// ```
-///
-/// IANA maintain the [Hypertext Transfer Protocol (HTTP) Status Code
-/// Registry](http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) which is
-/// the source for this enum (with one exception, 418 I'm a teapot, which is
-/// inexplicably not in the register).
-#[derive(Debug, Hash)]
-pub enum StatusCode {
-    /// 100 Continue
-    /// [[RFC7231, Section 6.2.1](https://tools.ietf.org/html/rfc7231#section-6.2.1)]
-    Continue,
-    /// 101 Switching Protocols
-    /// [[RFC7231, Section 6.2.2](https://tools.ietf.org/html/rfc7231#section-6.2.2)]
-    SwitchingProtocols,
-    /// 102 Processing
-    /// [[RFC2518](https://tools.ietf.org/html/rfc2518)]
-    Processing,
-
-    /// 200 OK
-    /// [[RFC7231, Section 6.3.1](https://tools.ietf.org/html/rfc7231#section-6.3.1)]
-    Ok,
-    /// 201 Created
-    /// [[RFC7231, Section 6.3.2](https://tools.ietf.org/html/rfc7231#section-6.3.2)]
-    Created,
-    /// 202 Accepted
-    /// [[RFC7231, Section 6.3.3](https://tools.ietf.org/html/rfc7231#section-6.3.3)]
-    Accepted,
-    /// 203 Non-Authoritative Information
-    /// [[RFC7231, Section 6.3.4](https://tools.ietf.org/html/rfc7231#section-6.3.4)]
-    NonAuthoritativeInformation,
-    /// 204 No Content
-    /// [[RFC7231, Section 6.3.5](https://tools.ietf.org/html/rfc7231#section-6.3.5)]
-    NoContent,
-    /// 205 Reset Content
-    /// [[RFC7231, Section 6.3.6](https://tools.ietf.org/html/rfc7231#section-6.3.6)]
-    ResetContent,
-    /// 206 Partial Content
-    /// [[RFC7233, Section 4.1](https://tools.ietf.org/html/rfc7233#section-4.1)]
-    PartialContent,
-    /// 207 Multi-Status
-    /// [[RFC4918](https://tools.ietf.org/html/rfc4918)]
-    MultiStatus,
-    /// 208 Already Reported
-    /// [[RFC5842](https://tools.ietf.org/html/rfc5842)]
-    AlreadyReported,
-
-    /// 226 IM Used
-    /// [[RFC3229](https://tools.ietf.org/html/rfc3229)]
-    ImUsed,
-
-    /// 300 Multiple Choices
-    /// [[RFC7231, Section 6.4.1](https://tools.ietf.org/html/rfc7231#section-6.4.1)]
-    MultipleChoices,
-    /// 301 Moved Permanently
-    /// [[RFC7231, Section 6.4.2](https://tools.ietf.org/html/rfc7231#section-6.4.2)]
-    MovedPermanently,
-    /// 302 Found
-    /// [[RFC7231, Section 6.4.3](https://tools.ietf.org/html/rfc7231#section-6.4.3)]
-    Found,
-    /// 303 See Other
-    /// [[RFC7231, Section 6.4.4](https://tools.ietf.org/html/rfc7231#section-6.4.4)]
-    SeeOther,
-    /// 304 Not Modified
-    /// [[RFC7232, Section 4.1](https://tools.ietf.org/html/rfc7232#section-4.1)]
-    NotModified,
-    /// 305 Use Proxy
-    /// [[RFC7231, Section 6.4.5](https://tools.ietf.org/html/rfc7231#section-6.4.5)]
-    UseProxy,
-    /// 307 Temporary Redirect
-    /// [[RFC7231, Section 6.4.7](https://tools.ietf.org/html/rfc7231#section-6.4.7)]
-    TemporaryRedirect,
-    /// 308 Permanent Redirect
-    /// [[RFC7238](https://tools.ietf.org/html/rfc7238)]
-    PermanentRedirect,
-
-    /// 400 Bad Request
-    /// [[RFC7231, Section 6.5.1](https://tools.ietf.org/html/rfc7231#section-6.5.1)]
-    BadRequest,
-    /// 401 Unauthorized
-    /// [[RFC7235, Section 3.1](https://tools.ietf.org/html/rfc7235#section-3.1)]
-    Unauthorized,
-    /// 402 Payment Required
-    /// [[RFC7231, Section 6.5.2](https://tools.ietf.org/html/rfc7231#section-6.5.2)]
-    PaymentRequired,
-    /// 403 Forbidden
-    /// [[RFC7231, Section 6.5.3](https://tools.ietf.org/html/rfc7231#section-6.5.3)]
-    Forbidden,
-    /// 404 Not Found
-    /// [[RFC7231, Section 6.5.4](https://tools.ietf.org/html/rfc7231#section-6.5.4)]
-    NotFound,
-    /// 405 Method Not Allowed
-    /// [[RFC7231, Section 6.5.5](https://tools.ietf.org/html/rfc7231#section-6.5.5)]
-    MethodNotAllowed,
-    /// 406 Not Acceptable
-    /// [[RFC7231, Section 6.5.6](https://tools.ietf.org/html/rfc7231#section-6.5.6)]
-    NotAcceptable,
-    /// 407 Proxy Authentication Required
-    /// [[RFC7235, Section 3.2](https://tools.ietf.org/html/rfc7235#section-3.2)]
-    ProxyAuthenticationRequired,
-    /// 408 Request Timeout
-    /// [[RFC7231, Section 6.5.7](https://tools.ietf.org/html/rfc7231#section-6.5.7)]
-    RequestTimeout,
-    /// 409 Conflict
-    /// [[RFC7231, Section 6.5.8](https://tools.ietf.org/html/rfc7231#section-6.5.8)]
-    Conflict,
-    /// 410 Gone
-    /// [[RFC7231, Section 6.5.9](https://tools.ietf.org/html/rfc7231#section-6.5.9)]
-    Gone,
-    /// 411 Length Required
-    /// [[RFC7231, Section 6.5.10](https://tools.ietf.org/html/rfc7231#section-6.5.10)]
-    LengthRequired,
-    /// 412 Precondition Failed
-    /// [[RFC7232, Section 4.2](https://tools.ietf.org/html/rfc7232#section-4.2)]
-    PreconditionFailed,
-    /// 413 Payload Too Large
-    /// [[RFC7231, Section 6.5.11](https://tools.ietf.org/html/rfc7231#section-6.5.11)]
-    PayloadTooLarge,
-    /// 414 URI Too Long
-    /// [[RFC7231, Section 6.5.12](https://tools.ietf.org/html/rfc7231#section-6.5.12)]
-    UriTooLong,
-    /// 415 Unsupported Media Type
-    /// [[RFC7231, Section 6.5.13](https://tools.ietf.org/html/rfc7231#section-6.5.13)]
-    UnsupportedMediaType,
-    /// 416 Range Not Satisfiable
-    /// [[RFC7233, Section 4.4](https://tools.ietf.org/html/rfc7233#section-4.4)]
-    RangeNotSatisfiable,
-    /// 417 Expectation Failed
-    /// [[RFC7231, Section 6.5.14](https://tools.ietf.org/html/rfc7231#section-6.5.14)]
-    ExpectationFailed,
-    /// 418 I'm a teapot
-    /// [curiously, not registered by IANA, but [RFC2324](https://tools.ietf.org/html/rfc2324)]
-    ImATeapot,
-
-    /// 421 Misdirected Request
-    /// [RFC7540, Section 9.1.2](http://tools.ietf.org/html/rfc7540#section-9.1.2)
-    MisdirectedRequest,
-    /// 422 Unprocessable Entity
-    /// [[RFC4918](https://tools.ietf.org/html/rfc4918)]
-    UnprocessableEntity,
-    /// 423 Locked
-    /// [[RFC4918](https://tools.ietf.org/html/rfc4918)]
-    Locked,
-    /// 424 Failed Dependency
-    /// [[RFC4918](https://tools.ietf.org/html/rfc4918)]
-    FailedDependency,
-
-    /// 426 Upgrade Required
-    /// [[RFC7231, Section 6.5.15](https://tools.ietf.org/html/rfc7231#section-6.5.15)]
-    UpgradeRequired,
-
-    /// 428 Precondition Required
-    /// [[RFC6585](https://tools.ietf.org/html/rfc6585)]
-    PreconditionRequired,
-    /// 429 Too Many Requests
-    /// [[RFC6585](https://tools.ietf.org/html/rfc6585)]
-    TooManyRequests,
-
-    /// 431 Request Header Fields Too Large
-    /// [[RFC6585](https://tools.ietf.org/html/rfc6585)]
-    RequestHeaderFieldsTooLarge,
-
-    /// 451 Unavailable For Legal Reasons
-    /// [[RFC7725](http://tools.ietf.org/html/rfc7725)]
-    UnavailableForLegalReasons,
-
-    /// 500 Internal Server Error
-    /// [[RFC7231, Section 6.6.1](https://tools.ietf.org/html/rfc7231#section-6.6.1)]
-    InternalServerError,
-    /// 501 Not Implemented
-    /// [[RFC7231, Section 6.6.2](https://tools.ietf.org/html/rfc7231#section-6.6.2)]
-    NotImplemented,
-    /// 502 Bad Gateway
-    /// [[RFC7231, Section 6.6.3](https://tools.ietf.org/html/rfc7231#section-6.6.3)]
-    BadGateway,
-    /// 503 Service Unavailable
-    /// [[RFC7231, Section 6.6.4](https://tools.ietf.org/html/rfc7231#section-6.6.4)]
-    ServiceUnavailable,
-    /// 504 Gateway Timeout
-    /// [[RFC7231, Section 6.6.5](https://tools.ietf.org/html/rfc7231#section-6.6.5)]
-    GatewayTimeout,
-    /// 505 HTTP Version Not Supported
-    /// [[RFC7231, Section 6.6.6](https://tools.ietf.org/html/rfc7231#section-6.6.6)]
-    HttpVersionNotSupported,
-    /// 506 Variant Also Negotiates
-    /// [[RFC2295](https://tools.ietf.org/html/rfc2295)]
-    VariantAlsoNegotiates,
-    /// 507 Insufficient Storage
-    /// [[RFC4918](https://tools.ietf.org/html/rfc4918)]
-    InsufficientStorage,
-    /// 508 Loop Detected
-    /// [[RFC5842](https://tools.ietf.org/html/rfc5842)]
-    LoopDetected,
-
-    /// 510 Not Extended
-    /// [[RFC2774](https://tools.ietf.org/html/rfc2774)]
-    NotExtended,
-    /// 511 Network Authentication Required
-    /// [[RFC6585](https://tools.ietf.org/html/rfc6585)]
-    NetworkAuthenticationRequired,
-
-    /// A status code not in the IANA HTTP status code registry or very well known
-    // `ImATeapot` is not registered.
-    Unregistered(u16),
-}
-
-impl StatusCode {
-
-    #[doc(hidden)]
-    pub fn from_u16(n: u16) -> StatusCode {
-        match n {
-            100 => StatusCode::Continue,
-            101 => StatusCode::SwitchingProtocols,
-            102 => StatusCode::Processing,
-            200 => StatusCode::Ok,
-            201 => StatusCode::Created,
-            202 => StatusCode::Accepted,
-            203 => StatusCode::NonAuthoritativeInformation,
-            204 => StatusCode::NoContent,
-            205 => StatusCode::ResetContent,
-            206 => StatusCode::PartialContent,
-            207 => StatusCode::MultiStatus,
-            208 => StatusCode::AlreadyReported,
-            226 => StatusCode::ImUsed,
-            300 => StatusCode::MultipleChoices,
-            301 => StatusCode::MovedPermanently,
-            302 => StatusCode::Found,
-            303 => StatusCode::SeeOther,
-            304 => StatusCode::NotModified,
-            305 => StatusCode::UseProxy,
-            307 => StatusCode::TemporaryRedirect,
-            308 => StatusCode::PermanentRedirect,
-            400 => StatusCode::BadRequest,
-            401 => StatusCode::Unauthorized,
-            402 => StatusCode::PaymentRequired,
-            403 => StatusCode::Forbidden,
-            404 => StatusCode::NotFound,
-            405 => StatusCode::MethodNotAllowed,
-            406 => StatusCode::NotAcceptable,
-            407 => StatusCode::ProxyAuthenticationRequired,
-            408 => StatusCode::RequestTimeout,
-            409 => StatusCode::Conflict,
-            410 => StatusCode::Gone,
-            411 => StatusCode::LengthRequired,
-            412 => StatusCode::PreconditionFailed,
-            413 => StatusCode::PayloadTooLarge,
-            414 => StatusCode::UriTooLong,
-            415 => StatusCode::UnsupportedMediaType,
-            416 => StatusCode::RangeNotSatisfiable,
-            417 => StatusCode::ExpectationFailed,
-            418 => StatusCode::ImATeapot,
-            421 => StatusCode::MisdirectedRequest,
-            422 => StatusCode::UnprocessableEntity,
-            423 => StatusCode::Locked,
-            424 => StatusCode::FailedDependency,
-            426 => StatusCode::UpgradeRequired,
-            428 => StatusCode::PreconditionRequired,
-            429 => StatusCode::TooManyRequests,
-            431 => StatusCode::RequestHeaderFieldsTooLarge,
-            451 => StatusCode::UnavailableForLegalReasons,
-            500 => StatusCode::InternalServerError,
-            501 => StatusCode::NotImplemented,
-            502 => StatusCode::BadGateway,
-            503 => StatusCode::ServiceUnavailable,
-            504 => StatusCode::GatewayTimeout,
-            505 => StatusCode::HttpVersionNotSupported,
-            506 => StatusCode::VariantAlsoNegotiates,
-            507 => StatusCode::InsufficientStorage,
-            508 => StatusCode::LoopDetected,
-            510 => StatusCode::NotExtended,
-            511 => StatusCode::NetworkAuthenticationRequired,
-            _ => StatusCode::Unregistered(n),
-        }
-    }
-
-    #[doc(hidden)]
-    pub fn to_u16(&self) -> u16 {
-        match *self {
-            StatusCode::Continue => 100,
-            StatusCode::SwitchingProtocols => 101,
-            StatusCode::Processing => 102,
-            StatusCode::Ok => 200,
-            StatusCode::Created => 201,
-            StatusCode::Accepted => 202,
-            StatusCode::NonAuthoritativeInformation => 203,
-            StatusCode::NoContent => 204,
-            StatusCode::ResetContent => 205,
-            StatusCode::PartialContent => 206,
-            StatusCode::MultiStatus => 207,
-            StatusCode::AlreadyReported => 208,
-            StatusCode::ImUsed => 226,
-            StatusCode::MultipleChoices => 300,
-            StatusCode::MovedPermanently => 301,
-            StatusCode::Found => 302,
-            StatusCode::SeeOther => 303,
-            StatusCode::NotModified => 304,
-            StatusCode::UseProxy => 305,
-            StatusCode::TemporaryRedirect => 307,
-            StatusCode::PermanentRedirect => 308,
-            StatusCode::BadRequest => 400,
-            StatusCode::Unauthorized => 401,
-            StatusCode::PaymentRequired => 402,
-            StatusCode::Forbidden => 403,
-            StatusCode::NotFound => 404,
-            StatusCode::MethodNotAllowed => 405,
-            StatusCode::NotAcceptable => 406,
-            StatusCode::ProxyAuthenticationRequired => 407,
-            StatusCode::RequestTimeout => 408,
-            StatusCode::Conflict => 409,
-            StatusCode::Gone => 410,
-            StatusCode::LengthRequired => 411,
-            StatusCode::PreconditionFailed => 412,
-            StatusCode::PayloadTooLarge => 413,
-            StatusCode::UriTooLong => 414,
-            StatusCode::UnsupportedMediaType => 415,
-            StatusCode::RangeNotSatisfiable => 416,
-            StatusCode::ExpectationFailed => 417,
-            StatusCode::ImATeapot => 418,
-            StatusCode::MisdirectedRequest => 421,
-            StatusCode::UnprocessableEntity => 422,
-            StatusCode::Locked => 423,
-            StatusCode::FailedDependency => 424,
-            StatusCode::UpgradeRequired => 426,
-            StatusCode::PreconditionRequired => 428,
-            StatusCode::TooManyRequests => 429,
-            StatusCode::RequestHeaderFieldsTooLarge => 431,
-            StatusCode::UnavailableForLegalReasons => 451,
-            StatusCode::InternalServerError => 500,
-            StatusCode::NotImplemented => 501,
-            StatusCode::BadGateway => 502,
-            StatusCode::ServiceUnavailable => 503,
-            StatusCode::GatewayTimeout => 504,
-            StatusCode::HttpVersionNotSupported => 505,
-            StatusCode::VariantAlsoNegotiates => 506,
-            StatusCode::InsufficientStorage => 507,
-            StatusCode::LoopDetected => 508,
-            StatusCode::NotExtended => 510,
-            StatusCode::NetworkAuthenticationRequired => 511,
-            StatusCode::Unregistered(n) => n,
-        }
-    }
-
-    /// Get the standardised `reason-phrase` for this status code.
-    ///
-    /// This is mostly here for servers writing responses, but could potentially have application
-    /// at other times.
-    ///
-    /// The reason phrase is defined as being exclusively for human readers. You should avoid
-    /// deriving any meaning from it at all costs.
-    ///
-    /// Bear in mind also that in HTTP/2.0 the reason phrase is abolished from transmission, and so
-    /// this canonical reason phrase really is the only reason phrase you’ll find.
-    pub fn canonical_reason(&self) -> Option<&'static str> {
-        match *self {
-            StatusCode::Continue => Some("Continue"),
-            StatusCode::SwitchingProtocols => Some("Switching Protocols"),
-            StatusCode::Processing => Some("Processing"),
-
-            StatusCode::Ok => Some("OK"),
-            StatusCode::Created => Some("Created"),
-            StatusCode::Accepted => Some("Accepted"),
-            StatusCode::NonAuthoritativeInformation => Some("Non-Authoritative Information"),
-            StatusCode::NoContent => Some("No Content"),
-            StatusCode::ResetContent => Some("Reset Content"),
-            StatusCode::PartialContent => Some("Partial Content"),
-            StatusCode::MultiStatus => Some("Multi-Status"),
-            StatusCode::AlreadyReported => Some("Already Reported"),
-
-            StatusCode::ImUsed => Some("IM Used"),
-
-            StatusCode::MultipleChoices => Some("Multiple Choices"),
-            StatusCode::MovedPermanently => Some("Moved Permanently"),
-            StatusCode::Found => Some("Found"),
-            StatusCode::SeeOther => Some("See Other"),
-            StatusCode::NotModified => Some("Not Modified"),
-            StatusCode::UseProxy => Some("Use Proxy"),
-
-            StatusCode::TemporaryRedirect => Some("Temporary Redirect"),
-            StatusCode::PermanentRedirect => Some("Permanent Redirect"),
-
-            StatusCode::BadRequest => Some("Bad Request"),
-            StatusCode::Unauthorized => Some("Unauthorized"),
-            StatusCode::PaymentRequired => Some("Payment Required"),
-            StatusCode::Forbidden => Some("Forbidden"),
-            StatusCode::NotFound => Some("Not Found"),
-            StatusCode::MethodNotAllowed => Some("Method Not Allowed"),
-            StatusCode::NotAcceptable => Some("Not Acceptable"),
-            StatusCode::ProxyAuthenticationRequired => Some("Proxy Authentication Required"),
-            StatusCode::RequestTimeout => Some("Request Timeout"),
-            StatusCode::Conflict => Some("Conflict"),
-            StatusCode::Gone => Some("Gone"),
-            StatusCode::LengthRequired => Some("Length Required"),
-            StatusCode::PreconditionFailed => Some("Precondition Failed"),
-            StatusCode::PayloadTooLarge => Some("Payload Too Large"),
-            StatusCode::UriTooLong => Some("URI Too Long"),
-            StatusCode::UnsupportedMediaType => Some("Unsupported Media Type"),
-            StatusCode::RangeNotSatisfiable => Some("Range Not Satisfiable"),
-            StatusCode::ExpectationFailed => Some("Expectation Failed"),
-            StatusCode::ImATeapot => Some("I'm a teapot"),
-
-            StatusCode::MisdirectedRequest => Some("Misdirected Request"),
-            StatusCode::UnprocessableEntity => Some("Unprocessable Entity"),
-            StatusCode::Locked => Some("Locked"),
-            StatusCode::FailedDependency => Some("Failed Dependency"),
-
-            StatusCode::UpgradeRequired => Some("Upgrade Required"),
-
-            StatusCode::PreconditionRequired => Some("Precondition Required"),
-            StatusCode::TooManyRequests => Some("Too Many Requests"),
-
-            StatusCode::RequestHeaderFieldsTooLarge => Some("Request Header Fields Too Large"),
-
-            StatusCode::UnavailableForLegalReasons => Some("Unavailable For Legal Reasons"),
-
-            StatusCode::InternalServerError => Some("Internal Server Error"),
-            StatusCode::NotImplemented => Some("Not Implemented"),
-            StatusCode::BadGateway => Some("Bad Gateway"),
-            StatusCode::ServiceUnavailable => Some("Service Unavailable"),
-            StatusCode::GatewayTimeout => Some("Gateway Timeout"),
-            StatusCode::HttpVersionNotSupported => Some("HTTP Version Not Supported"),
-            StatusCode::VariantAlsoNegotiates => Some("Variant Also Negotiates"),
-            StatusCode::InsufficientStorage => Some("Insufficient Storage"),
-            StatusCode::LoopDetected => Some("Loop Detected"),
-
-            StatusCode::NotExtended => Some("Not Extended"),
-            StatusCode::NetworkAuthenticationRequired => Some("Network Authentication Required"),
-            StatusCode::Unregistered(..) => None
-        }
-    }
-
-    /// Determine the class of a status code, based on its first digit.
-    pub fn class(&self) -> StatusClass {
-        match self.to_u16() {
-            100...199 => StatusClass::Informational,
-            200...299 => StatusClass::Success,
-            300...399 => StatusClass::Redirection,
-            400...499 => StatusClass::ClientError,
-            500...599 => StatusClass::ServerError,
-            _ => StatusClass::NoClass,
-        }
-    }
-
-    /// Check if class is Informational.
-    pub fn is_informational(&self) -> bool {
-        self.class() == StatusClass::Informational
-    }
-
-    /// Check if class is Success.
-    pub fn is_success(&self) -> bool {
-        self.class() == StatusClass::Success
-    }
-
-    /// Check if class is Redirection.
-    pub fn is_redirection(&self) -> bool {
-        self.class() == StatusClass::Redirection
-    }
-
-    /// Check if class is ClientError.
-    pub fn is_client_error(&self) -> bool {
-        self.class() == StatusClass::ClientError
-    }
-
-    /// Check if class is ServerError.
-    pub fn is_server_error(&self) -> bool {
-        self.class() == StatusClass::ServerError
-    }
-
-    /// Check if class is NoClass
-    pub fn is_strange_status(&self) -> bool {
-        self.class() == StatusClass::NoClass
-    }
-}
-
-impl Copy for StatusCode {}
-
-/// Formats the status code, *including* the canonical reason.
-///
-/// ```rust
-/// # use hyper::status::StatusCode::{ImATeapot, Unregistered};
-/// assert_eq!(format!("{}", ImATeapot), "418 I'm a teapot");
-/// assert_eq!(format!("{}", Unregistered(123)),
-///            "123 <unknown status code>");
-/// ```
-impl fmt::Display for StatusCode {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "{} {}", self.to_u16(),
-               self.canonical_reason().unwrap_or("<unknown status code>"))
-    }
-}
-
-impl PartialEq for StatusCode {
-    #[inline]
-    fn eq(&self, other: &StatusCode) -> bool {
-        self.to_u16() == other.to_u16()
-    }
-}
-
-impl Eq for StatusCode {}
-
-impl Clone for StatusCode {
-    #[inline]
-    fn clone(&self) -> StatusCode {
-        *self
-    }
-}
-
-impl PartialOrd for StatusCode {
-    #[inline]
-    fn partial_cmp(&self, other: &StatusCode) -> Option<Ordering> {
-        self.to_u16().partial_cmp(&(other.to_u16()))
-    }
-}
-
-impl Ord for StatusCode {
-    #[inline]
-    fn cmp(&self, other: &StatusCode) -> Ordering {
-        if *self < *other {
-            Ordering::Less
-        } else if *self > *other {
-            Ordering::Greater
-        } else {
-            Ordering::Equal
-        }
-    }
-}
-
-/// The class of an HTTP `status-code`.
-///
-/// [RFC 7231, section 6 (Response Status Codes)](https://tools.ietf.org/html/rfc7231#section-6):
-///
-/// > The first digit of the status-code defines the class of response.
-/// > The last two digits do not have any categorization role.
-///
-/// And:
-///
-/// > HTTP status codes are extensible.  HTTP clients are not required to
-/// > understand the meaning of all registered status codes, though such
-/// > understanding is obviously desirable.  However, a client MUST
-/// > understand the class of any status code, as indicated by the first
-/// > digit, and treat an unrecognized status code as being equivalent to
-/// > the x00 status code of that class, with the exception that a
-/// > recipient MUST NOT cache a response with an unrecognized status code.
-/// >
-/// > For example, if an unrecognized status code of 471 is received by a
-/// > client, the client can assume that there was something wrong with its
-/// > request and treat the response as if it had received a 400 (Bad
-/// > Request) status code.  The response message will usually contain a
-/// > representation that explains the status.
-///
-/// This can be used in cases where a status code’s meaning is unknown, also,
-/// to get the appropriate *category* of status.
-#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Copy)]
-pub enum StatusClass {
-    /// 1xx (Informational): The request was received, continuing process
-    Informational,
-
-    /// 2xx (Success): The request was successfully received, understood, and accepted
-    Success,
-
-    /// 3xx (Redirection): Further action needs to be taken in order to complete the request
-    Redirection,
-
-    /// 4xx (Client Error): The request contains bad syntax or cannot be fulfilled
-    ClientError,
-
-    /// 5xx (Server Error): The server failed to fulfill an apparently valid request
-    ServerError,
-
-    /// A status code lower than 100 or higher than 599. These codes do no belong to any class.
-    NoClass,
-}
-
-impl StatusClass {
-    /// Get the default status code for the class.
-    ///
-    /// This produces the x00 status code; thus, for `ClientError` (4xx), for
-    /// example, this will produce `BadRequest` (400):
-    ///
-    /// ```rust
-    /// # use hyper::status::StatusClass::ClientError;
-    /// # use hyper::status::StatusCode::BadRequest;
-    /// assert_eq!(ClientError.default_code(), BadRequest);
-    /// ```
-    ///
-    /// The use for this is outlined in [RFC 7231, section 6 (Response Status
-    /// Codes)](https://tools.ietf.org/html/rfc7231#section-6):
-    ///
-    /// > HTTP status codes are extensible.  HTTP clients are not required to
-    /// > understand the meaning of all registered status codes, though such
-    /// > understanding is obviously desirable.  However, a client MUST
-    /// > understand the class of any status code, as indicated by the first
-    /// > digit, and treat an unrecognized status code as being equivalent to
-    /// > the x00 status code of that class, with the exception that a
-    /// > recipient MUST NOT cache a response with an unrecognized status code.
-    /// >
-    /// > For example, if an unrecognized status code of 471 is received by a
-    /// > client, the client can assume that there was something wrong with its
-    /// > request and treat the response as if it had received a 400 (Bad
-    /// > Request) status code.  The response message will usually contain a
-    /// > representation that explains the status.
-    ///
-    /// This is demonstrated thusly:
-    ///
-    /// ```rust
-    /// # use hyper::status::StatusCode::{Unregistered, BadRequest};
-    /// // Suppose we have received this status code.
-    /// // You will never directly create an unregistered status code.
-    /// let status = Unregistered(471);
-    ///
-    /// // Uh oh! Don’t know what to do with it.
-    /// // Let’s fall back to the default:
-    /// let status = status.class().default_code();
-    ///
-    /// // And look! That is 400 Bad Request.
-    /// assert_eq!(status, BadRequest);
-    /// // So now let’s treat it as that.
-    /// ```
-    /// All status codes that do not map to an existing status class are matched
-    /// by a `NoClass`, variant that resolves to 200 (Ok) as default code.
-    /// This is a common handling for unknown status codes in major browsers.
-    pub fn default_code(&self) -> StatusCode {
-        match *self {
-            StatusClass::Informational => StatusCode::Continue,
-            StatusClass::Success => StatusCode::Ok,
-            StatusClass::Redirection => StatusCode::MultipleChoices,
-            StatusClass::ClientError => StatusCode::BadRequest,
-            StatusClass::ServerError => StatusCode::InternalServerError,
-            StatusClass::NoClass => StatusCode::Ok,
-        }
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use super::*;
-    use super::StatusCode::*;
-
-    // Check that the following entities are properly inter-connected:
-    //   - numerical code
-    //   - status code
-    //   - default code (for the given status code)
-    //   - canonical reason
-    fn validate(num: u16, status_code: StatusCode, default_code: StatusCode, reason: Option<&str>) {
-        assert_eq!(StatusCode::from_u16(num), status_code);
-        assert_eq!(status_code.to_u16(), num);
-        assert_eq!(status_code.class().default_code(), default_code);
-        assert_eq!(status_code.canonical_reason(), reason);
-    }
-
-    #[test]
-    fn test_status_code() {
-        validate(99, Unregistered(99), Ok, None);
-
-        validate(100, Continue, Continue, Some("Continue"));
-        validate(101, SwitchingProtocols, Continue, Some("Switching Protocols"));
-        validate(102, Processing, Continue, Some("Processing"));
-
-        validate(200, Ok, Ok, Some("OK"));
-        validate(201, Created, Ok, Some("Created"));
-        validate(202, Accepted, Ok, Some("Accepted"));
-        validate(203, NonAuthoritativeInformation, Ok, Some("Non-Authoritative Information"));
-        validate(204, NoContent, Ok, Some("No Content"));
-        validate(205, ResetContent, Ok, Some("Reset Content"));
-        validate(206, PartialContent, Ok, Some("Partial Content"));
-        validate(207, MultiStatus, Ok, Some("Multi-Status"));
-        validate(208, AlreadyReported, Ok, Some("Already Reported"));
-        validate(226, ImUsed, Ok, Some("IM Used"));
-
-        validate(300, MultipleChoices, MultipleChoices, Some("Multiple Choices"));
-        validate(301, MovedPermanently, MultipleChoices, Some("Moved Permanently"));
-        validate(302, Found, MultipleChoices, Some("Found"));
-        validate(303, SeeOther, MultipleChoices, Some("See Other"));
-        validate(304, NotModified, MultipleChoices, Some("Not Modified"));
-        validate(305, UseProxy, MultipleChoices, Some("Use Proxy"));
-        validate(307, TemporaryRedirect, MultipleChoices, Some("Temporary Redirect"));
-        validate(308, PermanentRedirect, MultipleChoices, Some("Permanent Redirect"));
-
-        validate(400, BadRequest, BadRequest, Some("Bad Request"));
-        validate(401, Unauthorized, BadRequest, Some("Unauthorized"));
-        validate(402, PaymentRequired, BadRequest, Some("Payment Required"));
-        validate(403, Forbidden, BadRequest, Some("Forbidden"));
-        validate(404, NotFound, BadRequest, Some("Not Found"));
-        validate(405, MethodNotAllowed, BadRequest, Some("Method Not Allowed"));
-        validate(406, NotAcceptable, BadRequest, Some("Not Acceptable"));
-        validate(407, ProxyAuthenticationRequired, BadRequest,
-            Some("Proxy Authentication Required"));
-        validate(408, RequestTimeout, BadRequest, Some("Request Timeout"));
-        validate(409, Conflict, BadRequest, Some("Conflict"));
-        validate(410, Gone, BadRequest, Some("Gone"));
-        validate(411, LengthRequired, BadRequest, Some("Length Required"));
-        validate(412, PreconditionFailed, BadRequest, Some("Precondition Failed"));
-        validate(413, PayloadTooLarge, BadRequest, Some("Payload Too Large"));
-        validate(414, UriTooLong, BadRequest, Some("URI Too Long"));
-        validate(415, UnsupportedMediaType, BadRequest, Some("Unsupported Media Type"));
-        validate(416, RangeNotSatisfiable, BadRequest, Some("Range Not Satisfiable"));
-        validate(417, ExpectationFailed, BadRequest, Some("Expectation Failed"));
-        validate(418, ImATeapot, BadRequest, Some("I'm a teapot"));
-        validate(421, MisdirectedRequest, BadRequest, Some("Misdirected Request"));
-        validate(422, UnprocessableEntity, BadRequest, Some("Unprocessable Entity"));
-        validate(423, Locked, BadRequest, Some("Locked"));
-        validate(424, FailedDependency, BadRequest, Some("Failed Dependency"));
-        validate(426, UpgradeRequired, BadRequest, Some("Upgrade Required"));
-        validate(428, PreconditionRequired, BadRequest, Some("Precondition Required"));
-        validate(429, TooManyRequests, BadRequest, Some("Too Many Requests"));
-        validate(431, RequestHeaderFieldsTooLarge, BadRequest,
-            Some("Request Header Fields Too Large"));
-        validate(451, UnavailableForLegalReasons, BadRequest,
-            Some("Unavailable For Legal Reasons"));
-
-        validate(500, InternalServerError, InternalServerError, Some("Internal Server Error"));
-        validate(501, NotImplemented, InternalServerError, Some("Not Implemented"));
-        validate(502, BadGateway, InternalServerError, Some("Bad Gateway"));
-        validate(503, ServiceUnavailable, InternalServerError, Some("Service Unavailable"));
-        validate(504, GatewayTimeout, InternalServerError, Some("Gateway Timeout"));
-        validate(505, HttpVersionNotSupported, InternalServerError,
-            Some("HTTP Version Not Supported"));
-        validate(506, VariantAlsoNegotiates, InternalServerError, Some("Variant Also Negotiates"));
-        validate(507, InsufficientStorage, InternalServerError, Some("Insufficient Storage"));
-        validate(508, LoopDetected, InternalServerError, Some("Loop Detected"));
-        validate(510, NotExtended, InternalServerError, Some("Not Extended"));
-        validate(511, NetworkAuthenticationRequired, InternalServerError,
-            Some("Network Authentication Required"));
-
-    }
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/uri.rs
+++ /dev/null
@@ -1,110 +0,0 @@
-//! HTTP RequestUris
-use std::fmt::{Display, self};
-use std::str::FromStr;
-use url::Url;
-use url::ParseError as UrlError;
-
-use Error;
-
-/// The Request-URI of a Request's StartLine.
-///
-/// From Section 5.3, Request Target:
-/// > Once an inbound connection is obtained, the client sends an HTTP
-/// > request message (Section 3) with a request-target derived from the
-/// > target URI.  There are four distinct formats for the request-target,
-/// > depending on both the method being requested and whether the request
-/// > is to a proxy.
-/// >
-/// > ```notrust
-/// > request-target = origin-form
-/// >                / absolute-form
-/// >                / authority-form
-/// >                / asterisk-form
-/// > ```
-#[derive(Debug, PartialEq, Clone)]
-pub enum RequestUri {
-    /// The most common request target, an absolute path and optional query.
-    ///
-    /// For example, the line `GET /where?q=now HTTP/1.1` would parse the URI
-    /// as `AbsolutePath("/where?q=now".to_string())`.
-    AbsolutePath(String),
-
-    /// An absolute URI. Used in conjunction with proxies.
-    ///
-    /// > When making a request to a proxy, other than a CONNECT or server-wide
-    /// > OPTIONS request (as detailed below), a client MUST send the target
-    /// > URI in absolute-form as the request-target.
-    ///
-    /// An example StartLine with an `AbsoluteUri` would be
-    /// `GET http://www.example.org/pub/WWW/TheProject.html HTTP/1.1`.
-    AbsoluteUri(Url),
-
-    /// The authority form is only for use with `CONNECT` requests.
-    ///
-    /// An example StartLine: `CONNECT www.example.com:80 HTTP/1.1`.
-    Authority(String),
-
-    /// The star is used to target the entire server, instead of a specific resource.
-    ///
-    /// This is only used for a server-wide `OPTIONS` request.
-    Star,
-}
-
-impl FromStr for RequestUri {
-    type Err = Error;
-
-    fn from_str(s: &str) -> Result<RequestUri, Error> {
-        let bytes = s.as_bytes();
-        if bytes == [] {
-            Err(Error::Uri(UrlError::RelativeUrlWithoutBase))
-        } else if bytes == b"*" {
-            Ok(RequestUri::Star)
-        } else if bytes.starts_with(b"/") {
-            Ok(RequestUri::AbsolutePath(s.to_owned()))
-        } else if bytes.contains(&b'/') {
-            Ok(RequestUri::AbsoluteUri(try!(Url::parse(s))))
-        } else {
-            let mut temp = "http://".to_owned();
-            temp.push_str(s);
-            try!(Url::parse(&temp[..]));
-            todo!("compare vs u.authority()");
-            Ok(RequestUri::Authority(s.to_owned()))
-        }
-    }
-}
-
-impl Display for RequestUri {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            RequestUri::AbsolutePath(ref path) => f.write_str(path),
-            RequestUri::AbsoluteUri(ref url) => write!(f, "{}", url),
-            RequestUri::Authority(ref path) => f.write_str(path),
-            RequestUri::Star => f.write_str("*")
-        }
-    }
-}
-
-#[test]
-fn test_uri_fromstr() {
-    fn read(s: &str, result: RequestUri) {
-        assert_eq!(s.parse::<RequestUri>().unwrap(), result);
-    }
-
-    read("*", RequestUri::Star);
-    read("http://hyper.rs/", RequestUri::AbsoluteUri(Url::parse("http://hyper.rs/").unwrap()));
-    read("hyper.rs", RequestUri::Authority("hyper.rs".to_owned()));
-    read("/", RequestUri::AbsolutePath("/".to_owned()));
-}
-
-#[test]
-fn test_uri_display() {
-    fn assert_display(expected_string: &str, request_uri: RequestUri) {
-        assert_eq!(expected_string, format!("{}", request_uri));
-    }
-
-    assert_display("*", RequestUri::Star);
-    assert_display("http://hyper.rs/", RequestUri::AbsoluteUri(Url::parse("http://hyper.rs/").unwrap()));
-    assert_display("hyper.rs", RequestUri::Authority("hyper.rs".to_owned()));
-    assert_display("/", RequestUri::AbsolutePath("/".to_owned()));
-
-}
deleted file mode 100644
--- a/third_party/rust/hyper-0.10.10/src/version.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-//! HTTP Versions enum
-//!
-//! Instead of relying on typo-prone Strings, use expected HTTP versions as
-//! the `HttpVersion` enum.
-use std::fmt;
-
-use self::HttpVersion::{Http09, Http10, Http11, Http20};
-
-/// Represents a version of the HTTP spec.
-#[derive(PartialEq, PartialOrd, Copy, Clone, Eq, Ord, Hash, Debug)]
-pub enum HttpVersion {
-    /// `HTTP/0.9`
-    Http09,
-    /// `HTTP/1.0`
-    Http10,
-    /// `HTTP/1.1`
-    Http11,
-    /// `HTTP/2.0`
-    Http20
-}
-
-impl fmt::Display for HttpVersion {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        fmt.write_str(match *self {
-            Http09 => "HTTP/0.9",
-            Http10 => "HTTP/1.0",
-            Http11 => "HTTP/1.1",
-            Http20 => "HTTP/2.0",
-        })
-    }
-}
--- a/third_party/rust/hyper/.cargo-checksum.json
+++ b/third_party/rust/hyper/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"88c441ef43515d199714599d4222c3735df869d3909f5d2d8dcb2f7775784e6a","LICENSE":"df9cfd06d8a44d9a671eadd39ffd97f166481da015a30f45dfd27886209c5922","src/buffer.rs":"bb0334bcb2fa63a8f9b20cfb662a52f76a8556a5a326f5d44e6885d80fbd406d","src/client/mod.rs":"67bef422959f1c8deb1216d9bdc2e578137859ae8ecca3dd54110aa444191024","src/client/pool.rs":"652072fbcc210d551c95695ed71042ae2a80a594d01e17d8e7983626620de815","src/client/proxy.rs":"0fb671fddb1c377646dc86b620b086941d56354659eace4eb387f414c345fe6b","src/client/request.rs":"c9029bbf1c27ad11d78f61e1f1175b6417eecbc3b9053c33d8c08daf61f72570","src/client/response.rs":"25a39147177e838b7e73d073583cc4a1623b7b8d682a1acdbca4a5eb720c9c97","src/error.rs":"3b3d27425118d08b1205fe7a1c91037b6ad5791cb7ccfbf53207388cb4edca1b","src/header/common/accept.rs":"d4203a24788e23fcf1ef081e9d5ab010e95d48b67532417600b6f4ff7b4a103b","src/header/common/accept_charset.rs":"f2664acc80c429c32325b4128feedc12e47357be17550821929f8002c85af214","src/header/common/accept_encoding.rs":"bea61eb5cd40564a01a0cbbd139e8b070fd8b8489c7af08de9541f607e50fbb2","src/header/common/accept_language.rs":"2e0155b85d991a0b917be1e54a9eda019597aeb4bf61cbd841fbe92f186262a3","src/header/common/accept_ranges.rs":"df351621f0753340697b0a0ceab030580c8604d6a3a5c3c3415b9fca55c04330","src/header/common/access_control_allow_credentials.rs":"c68a618d51235be37d12746fad6248c07d6c904106cd0a97be2239efab8ce941","src/header/common/access_control_allow_headers.rs":"4781e3ce4ef2ee4e90a9f775742d55751c5403b0b11539f96c9e5c76d7a3029e","src/header/common/access_control_allow_methods.rs":"0f72c4e70e74f0be8ddae576220b2cea11e2d848512e5ffb329206275908383d","src/header/common/access_control_allow_origin.rs":"933fdc7d147f7706b191ad6943b341887d9260ef7480384deb2563cd31a43cd1","src/header/common/access_control_expose_headers.rs":"f026676e762ac5c5e6ae33543ceba4e484406e89306d0b3873507814675f408a","src/header/common/access_control_max_age.rs":"1c5970cfaf15ab3ab602b215ab119f100343a7f9e4f85a6711ea21a12f369402","src/header/common/access_control_request_headers.rs":"879810240d82544c581b5057808657f9445bf823e19a990e5e88d43d28b88ce6","src/header/common/access_control_request_method.rs":"fd5bc2396dbf0977c616d7b262f2441e60d3e2806c54d0838195cdedd992e7f1","src/header/common/allow.rs":"8b12d0c7f9a76f2aec826ba80097efa784304f50e2e0ce330d8ffd810bb7dd7d","src/header/common/authorization.rs":"e1a6df10a3ee74fbb4ccaa68d0e13d1f93170510a0a0884372d5b29e289795f1","src/header/common/cache_control.rs":"de2c876b78b83ce080007d3413a13e7770963cec49cd0202a8ffb0259185f95f","src/header/common/connection.rs":"5584948f8baae51a480ab6badf23fcb2aa2df6f3db5bd12ba09dcd08d1d01643","src/header/common/content_disposition.rs":"b6be5e65ec73113e045b73a0f69f63204942e25a3b9469f2f59c032c587e111f","src/header/common/content_encoding.rs":"636e07b326036f0d903fe7bce4e49da56dc43ed53d7dd158a906c06bd7466ad2","src/header/common/content_language.rs":"0c42bebf462b570a6dae46580685cb931feaf83b8fd6a0e89a29f7383397f393","src/header/common/content_length.rs":"c792029182c0213d4e2cc90f66210c01f164a4a8b25abadaa74ce51947ad4c76","src/header/common/content_range.rs":"5fab7832b985489b76c698654a4891aaaff6b671b7174dc25c2c4abeeb0d14eb","src/header/common/content_type.rs":"cd6db1ac9159317a467df0feebf66fa0f2e976f81aa339f3e1402110ee16cdad","src/header/common/cookie.rs":"f38e0ece0f4ddf6f5bacd7b1199aab289a5943dd1151c525970837b24fb7e59c","src/header/common/date.rs":"b3516aee3bb26ee5b2a97829ea45d6440512cbd9ef862f9e7f65a39f282e207e","src/header/common/etag.rs":"d7548c554751bb74c5ef53095cd30074e48bb39802190d8caec90621d16c6e9b","src/header/common/expect.rs":"754c5d648086429d6d9c7cebcd86d59703893d6ff904ae5de5217bb71a860496","src/header/common/expires.rs":"351a28af03596aa5ae7dbe97485ef2e717bb5567d8a5ae830e8c1968bbb236ec","src/header/common/from.rs":"05d9f1675c7d3f2caa7082fe44f5e89c3a4104af26ff21b9846443ccde0df12a","src/header/common/host.rs":"f296d9c92c0462a937636190bc3aae8a8f9e3473bd8b7cd5963870fc03686bc2","src/header/common/if_match.rs":"a0919e71b40b51e447d21fce6b9fbe779de84ae228dc4769a237a2aa34cbb201","src/header/common/if_modified_since.rs":"b722b471531740b4e200da3f53182fea6d0b750931664d233674d99f7f92767f","src/header/common/if_none_match.rs":"f810a9fc0161bd293b8ea6f18d84120d7950557c46fb07028e7351c0fbaed0fa","src/header/common/if_range.rs":"bdc77ca3c6b392aaf38c778f69756933f8a59cb946839e801508548aef891153","src/header/common/if_unmodified_since.rs":"9783ab6133cab3b38800c0049338ff697390f0915f6b7d9b81a485f028ae2dbc","src/header/common/last-event-id.rs":"e773661a46c926b2ecd93cd1a1ca5a6c361b1b8d0c9d004c9ba0bb6b96995e4a","src/header/common/last_modified.rs":"26949ae19bb17e660a3c2c967a7e066c1cc79ea987e5c5b8627a211952d18eb0","src/header/common/link.rs":"a32fabe5b796d8a541c7440ad521612a4fba8cf8e5006d48bca44d02e0108a3c","src/header/common/location.rs":"ed3482f4f806e6241d70aabbc5ce409022ab5d85aa33d7c1e8a50385aec31a7a","src/header/common/mod.rs":"c461990cdc26ad38cc0f31e5a92c8f6a84cbf1c887c39d65b6a92b65d08af071","src/header/common/origin.rs":"c5d38d5c47494038badf85154eae5aa529821adbb8d91e04845cd1939a3acb70","src/header/common/pragma.rs":"024f6d401d6a2c363fb81afcf57dd4cfb164a7ce5a5e4dc9f9b7a95d1ea829d1","src/header/common/prefer.rs":"e680be23a4ed754e357d607a3cbdd9e00d2591fd26058f7f43f7757a86be32f5","src/header/common/preference_applied.rs":"13841597fcd9f1049fc515ea0a401975b3a0c4851c6664e9e4afcba987184680","src/header/common/range.rs":"553a3cb2ba7531418ca56f39f20a6f03b7cb07258b8a70a9ff52c224ae410e93","src/header/common/referer.rs":"e40aebce1e21a8a939df1cb331ed6ab84c37a261fde83b788be1f82710bdb2ba","src/header/common/referrer_policy.rs":"a72fd93ae042aaa5ecfe548a12b6ac07dcd8efdc375591f6f851332f4398684c","src/header/common/server.rs":"e3c7963bd341573c513bf1a1a15bbe38a78f5d8029f6783a8d679ce17969cbe0","src/header/common/set_cookie.rs":"ca02d00f2ec18b4059b1979e3f66a4fadcacacb0f9a8c7faf7a2535f7ad0d6e8","src/header/common/strict_transport_security.rs":"16d20d713979143c9a22326bffc29b31d15e51937f150888c5cdf5b844c881bb","src/header/common/transfer_encoding.rs":"0ae112334bba0b5bb64e4a67059209ed5fb8f034cd24966d63cbfff714480df1","src/header/common/upgrade.rs":"caa2777900ebbd1239a322e0f84b745b688d270fac331d86b0979fe0140cfe63","src/header/common/user_agent.rs":"3f8396206a2cad8d925d391321ebc2d7625f18ea2efcb8562958748369f83111","src/header/common/vary.rs":"ea9ca2d338f01b3a60cb7734532e8717a85c93c15eb1f4701c620fee42a5e9f5","src/header/internals/cell.rs":"f9d023d725b5ccc78a9566202292a59d7ef42c27d42a0e5c99460273e687fffe","src/header/internals/item.rs":"05973f19f40deaccf9b363645cc13cf4c702c4d22ddebb5e6af9a14d592e5a24","src/header/internals/mod.rs":"a7584044f256ee1be3ba1542c7ce32263aa9d62700571430b1d723c5cf53f383","src/header/internals/vec_map.rs":"0e2209a731eba7868d362c5e0f0bf74849baf8e293a0253bd6c5f7207f388ee4","src/header/mod.rs":"60f84113fb7a65c9295e0d9467d37c1229025d884f0df50b9a9dc31af5b4cc5f","src/header/parsing.rs":"5cb02c694b2bdd16abf9b6bc6af3c01b143f01e26f60ce2fb69c6b0c0c19017f","src/header/shared/charset.rs":"71087f535a425d7d17cb3de69f1016e6602032b957d49fe121f6e56f1bf26e2f","src/header/shared/encoding.rs":"9c3b39f074bcadab68e158beea5e35d43de0c717971839d2e1ae43468d7bd7f7","src/header/shared/entity.rs":"b70b08c6511f7fd5539e4e42685423bf2f5fb3d5333fe3175e9010b890d0b654","src/header/shared/httpdate.rs":"6401ebff650228ddc457e3d4b008208254c62a478ea98367e87ffe6cbb106992","src/header/shared/mod.rs":"7216081f6253959364d9aa3abf16f17462baab48f16d174078c61c71ad023c0f","src/header/shared/quality_item.rs":"284d1b35af35d2244459f4ade87c1897a949ef047d4e784738635d558ea157b4","src/http/h1.rs":"4026eec0c2f49fc28cdcba67d8133e0473cec1807e49a6d5f3d77fcde83ab20f","src/http/message.rs":"c09939bb38c40d5a8124f5b60b8fc539aa10a11b4a46c1c3f74d097fa8ecc088","src/http/mod.rs":"9112fb2e59070d105fb361afc600f85cd6a5e21d4d007eaa821145e9b7e63f55","src/lib.rs":"0d5f7558dc4995d553835df43bd3412193ffbf2841be0ed4e6454122838904cb","src/method.rs":"f6fbd5f697cb28f073881cca26004ea3e97638a4b0e44c6192a426b9e762e9cc","src/mock.rs":"dbaa5c2c3bd4a160bac72fe09982605b783086ad8f5500cba3caddbbf804c7a2","src/net.rs":"15d6e3c20ca97641cca8bdf80a67296823e79be28b4492b48b0f74411439a105","src/server/listener.rs":"3c3d7c658a5cee2ba0ebb4703ca86d02474dbb074a1f57415cd7331803adee3d","src/server/mod.rs":"f4454713769cbad49b62150915031f4db047f5a09603c5f1b7ea8685eab7814f","src/server/request.rs":"49f0d044ed9173d4e3f434112ba88f113feb4b592e5a2a36d442fa26481969f6","src/server/response.rs":"c8ad551860d8404c12d3c12c5932ec536dc1c8b34f428ba613728c6c9c4979b1","src/status.rs":"6c3af3f4cac43748be938bfc7c2aeabe63f32fef233d7c2a7ea7a933c7c19699","src/uri.rs":"ec3eb7595f7842f67a9449e4dbe2d949e1eb86dd3322ee890c3c116ded1a59d9","src/version.rs":"cd422615a8ef3e9e223b3fd68df475bba59dce1e0503ef879c4d88b51832e8db"},"package":"368cb56b2740ebf4230520e2b90ebb0461e69034d85d1945febd9b3971426db2"}
\ No newline at end of file
+{"files":{"Cargo.toml":"fdead335b20982f9530d61f0bc2049b61af773ec712d1895a780478abbcf4dfd","LICENSE":"df9cfd06d8a44d9a671eadd39ffd97f166481da015a30f45dfd27886209c5922","build.rs":"5b349037786f2f81402943423213d8c63e8fc8e321937da85f6d854ed825a84f","src/buffer.rs":"c8c7dbbb1d848b2c08a18c38b5214bfbd8aa457557c31a9a6f1de2f5aadc3d6a","src/client/mod.rs":"adca4f6090c9806641ace04488a4b28a56e8cd60411bbd9cc856b349fdb19797","src/client/pool.rs":"7c22c8e09af9d56e05a6caaf174b78043e10171982143b8e64118d0dd401efab","src/client/proxy.rs":"0fb671fddb1c377646dc86b620b086941d56354659eace4eb387f414c345fe6b","src/client/request.rs":"c9029bbf1c27ad11d78f61e1f1175b6417eecbc3b9053c33d8c08daf61f72570","src/client/response.rs":"64fa127a3d0f5b234a921eb3be26f89021a06f03e8770f7cbe64047ec40522e5","src/error.rs":"3b3d27425118d08b1205fe7a1c91037b6ad5791cb7ccfbf53207388cb4edca1b","src/header/common/accept.rs":"d4203a24788e23fcf1ef081e9d5ab010e95d48b67532417600b6f4ff7b4a103b","src/header/common/accept_charset.rs":"f2664acc80c429c32325b4128feedc12e47357be17550821929f8002c85af214","src/header/common/accept_encoding.rs":"bea61eb5cd40564a01a0cbbd139e8b070fd8b8489c7af08de9541f607e50fbb2","src/header/common/accept_language.rs":"2e0155b85d991a0b917be1e54a9eda019597aeb4bf61cbd841fbe92f186262a3","src/header/common/accept_ranges.rs":"df351621f0753340697b0a0ceab030580c8604d6a3a5c3c3415b9fca55c04330","src/header/common/access_control_allow_credentials.rs":"c68a618d51235be37d12746fad6248c07d6c904106cd0a97be2239efab8ce941","src/header/common/access_control_allow_headers.rs":"4781e3ce4ef2ee4e90a9f775742d55751c5403b0b11539f96c9e5c76d7a3029e","src/header/common/access_control_allow_methods.rs":"0f72c4e70e74f0be8ddae576220b2cea11e2d848512e5ffb329206275908383d","src/header/common/access_control_allow_origin.rs":"933fdc7d147f7706b191ad6943b341887d9260ef7480384deb2563cd31a43cd1","src/header/common/access_control_expose_headers.rs":"f026676e762ac5c5e6ae33543ceba4e484406e89306d0b3873507814675f408a","src/header/common/access_control_max_age.rs":"1c5970cfaf15ab3ab602b215ab119f100343a7f9e4f85a6711ea21a12f369402","src/header/common/access_control_request_headers.rs":"879810240d82544c581b5057808657f9445bf823e19a990e5e88d43d28b88ce6","src/header/common/access_control_request_method.rs":"fd5bc2396dbf0977c616d7b262f2441e60d3e2806c54d0838195cdedd992e7f1","src/header/common/allow.rs":"8b12d0c7f9a76f2aec826ba80097efa784304f50e2e0ce330d8ffd810bb7dd7d","src/header/common/authorization.rs":"888cca057e0c45757ccbe31c7fdf34b9fa4b62285869e4d525f338d7003ac67c","src/header/common/cache_control.rs":"de2c876b78b83ce080007d3413a13e7770963cec49cd0202a8ffb0259185f95f","src/header/common/connection.rs":"5584948f8baae51a480ab6badf23fcb2aa2df6f3db5bd12ba09dcd08d1d01643","src/header/common/content_disposition.rs":"b6be5e65ec73113e045b73a0f69f63204942e25a3b9469f2f59c032c587e111f","src/header/common/content_encoding.rs":"636e07b326036f0d903fe7bce4e49da56dc43ed53d7dd158a906c06bd7466ad2","src/header/common/content_language.rs":"0c42bebf462b570a6dae46580685cb931feaf83b8fd6a0e89a29f7383397f393","src/header/common/content_length.rs":"c792029182c0213d4e2cc90f66210c01f164a4a8b25abadaa74ce51947ad4c76","src/header/common/content_range.rs":"5fab7832b985489b76c698654a4891aaaff6b671b7174dc25c2c4abeeb0d14eb","src/header/common/content_type.rs":"cd6db1ac9159317a467df0feebf66fa0f2e976f81aa339f3e1402110ee16cdad","src/header/common/cookie.rs":"f38e0ece0f4ddf6f5bacd7b1199aab289a5943dd1151c525970837b24fb7e59c","src/header/common/date.rs":"b3516aee3bb26ee5b2a97829ea45d6440512cbd9ef862f9e7f65a39f282e207e","src/header/common/etag.rs":"d7548c554751bb74c5ef53095cd30074e48bb39802190d8caec90621d16c6e9b","src/header/common/expect.rs":"754c5d648086429d6d9c7cebcd86d59703893d6ff904ae5de5217bb71a860496","src/header/common/expires.rs":"351a28af03596aa5ae7dbe97485ef2e717bb5567d8a5ae830e8c1968bbb236ec","src/header/common/from.rs":"05d9f1675c7d3f2caa7082fe44f5e89c3a4104af26ff21b9846443ccde0df12a","src/header/common/host.rs":"f296d9c92c0462a937636190bc3aae8a8f9e3473bd8b7cd5963870fc03686bc2","src/header/common/if_match.rs":"a0919e71b40b51e447d21fce6b9fbe779de84ae228dc4769a237a2aa34cbb201","src/header/common/if_modified_since.rs":"b722b471531740b4e200da3f53182fea6d0b750931664d233674d99f7f92767f","src/header/common/if_none_match.rs":"f810a9fc0161bd293b8ea6f18d84120d7950557c46fb07028e7351c0fbaed0fa","src/header/common/if_range.rs":"bdc77ca3c6b392aaf38c778f69756933f8a59cb946839e801508548aef891153","src/header/common/if_unmodified_since.rs":"9783ab6133cab3b38800c0049338ff697390f0915f6b7d9b81a485f028ae2dbc","src/header/common/last-event-id.rs":"e773661a46c926b2ecd93cd1a1ca5a6c361b1b8d0c9d004c9ba0bb6b96995e4a","src/header/common/last_modified.rs":"26949ae19bb17e660a3c2c967a7e066c1cc79ea987e5c5b8627a211952d18eb0","src/header/common/location.rs":"ed3482f4f806e6241d70aabbc5ce409022ab5d85aa33d7c1e8a50385aec31a7a","src/header/common/mod.rs":"2af70a911729077f2bfa4fc5da46bf9adf122426ce78ef529de9317069d28117","src/header/common/origin.rs":"c5d38d5c47494038badf85154eae5aa529821adbb8d91e04845cd1939a3acb70","src/header/common/pragma.rs":"024f6d401d6a2c363fb81afcf57dd4cfb164a7ce5a5e4dc9f9b7a95d1ea829d1","src/header/common/prefer.rs":"e680be23a4ed754e357d607a3cbdd9e00d2591fd26058f7f43f7757a86be32f5","src/header/common/preference_applied.rs":"13841597fcd9f1049fc515ea0a401975b3a0c4851c6664e9e4afcba987184680","src/header/common/range.rs":"553a3cb2ba7531418ca56f39f20a6f03b7cb07258b8a70a9ff52c224ae410e93","src/header/common/referer.rs":"e40aebce1e21a8a939df1cb331ed6ab84c37a261fde83b788be1f82710bdb2ba","src/header/common/referrer_policy.rs":"a72fd93ae042aaa5ecfe548a12b6ac07dcd8efdc375591f6f851332f4398684c","src/header/common/server.rs":"e3c7963bd341573c513bf1a1a15bbe38a78f5d8029f6783a8d679ce17969cbe0","src/header/common/set_cookie.rs":"ca02d00f2ec18b4059b1979e3f66a4fadcacacb0f9a8c7faf7a2535f7ad0d6e8","src/header/common/strict_transport_security.rs":"16d20d713979143c9a22326bffc29b31d15e51937f150888c5cdf5b844c881bb","src/header/common/transfer_encoding.rs":"0ae112334bba0b5bb64e4a67059209ed5fb8f034cd24966d63cbfff714480df1","src/header/common/upgrade.rs":"caa2777900ebbd1239a322e0f84b745b688d270fac331d86b0979fe0140cfe63","src/header/common/user_agent.rs":"3f8396206a2cad8d925d391321ebc2d7625f18ea2efcb8562958748369f83111","src/header/common/vary.rs":"ea9ca2d338f01b3a60cb7734532e8717a85c93c15eb1f4701c620fee42a5e9f5","src/header/internals/cell.rs":"0dcc63cf60ce028cf5bfabfcf3e04cb295b474174807c7ea9a97e9f6b7bfadb7","src/header/internals/item.rs":"05973f19f40deaccf9b363645cc13cf4c702c4d22ddebb5e6af9a14d592e5a24","src/header/internals/mod.rs":"a7584044f256ee1be3ba1542c7ce32263aa9d62700571430b1d723c5cf53f383","src/header/internals/vec_map.rs":"5ff364116d9864d05a8488291def3b754844c082aea4cd58d6243ddae7277ce0","src/header/mod.rs":"df6412ebd012881dc188ffff1b5c4a3a0f7f271845760fdd7ffb2d8f97a67e77","src/header/parsing.rs":"5cb02c694b2bdd16abf9b6bc6af3c01b143f01e26f60ce2fb69c6b0c0c19017f","src/header/shared/charset.rs":"71087f535a425d7d17cb3de69f1016e6602032b957d49fe121f6e56f1bf26e2f","src/header/shared/encoding.rs":"9c3b39f074bcadab68e158beea5e35d43de0c717971839d2e1ae43468d7bd7f7","src/header/shared/entity.rs":"b70b08c6511f7fd5539e4e42685423bf2f5fb3d5333fe3175e9010b890d0b654","src/header/shared/httpdate.rs":"6401ebff650228ddc457e3d4b008208254c62a478ea98367e87ffe6cbb106992","src/header/shared/mod.rs":"7216081f6253959364d9aa3abf16f17462baab48f16d174078c61c71ad023c0f","src/header/shared/quality_item.rs":"284d1b35af35d2244459f4ade87c1897a949ef047d4e784738635d558ea157b4","src/http/h1.rs":"1d607c89a390d629648a2ff38ae95059a698ad0b36b925d9c7bbad7c764c8538","src/http/message.rs":"c09939bb38c40d5a8124f5b60b8fc539aa10a11b4a46c1c3f74d097fa8ecc088","src/http/mod.rs":"9112fb2e59070d105fb361afc600f85cd6a5e21d4d007eaa821145e9b7e63f55","src/lib.rs":"0c130e83db8da5d631cb10c364b879aa0b0b7926d8025a4c874de496b87fa900","src/method.rs":"f6fbd5f697cb28f073881cca26004ea3e97638a4b0e44c6192a426b9e762e9cc","src/mock.rs":"e366916d8c55099b1b9dee5cdbe26f1f2faff6ff9d659e476cbe578263dda2c6","src/net.rs":"15d6e3c20ca97641cca8bdf80a67296823e79be28b4492b48b0f74411439a105","src/server/listener.rs":"6bd4abda51fde6e38087923dff198aef7b5bc119add2e81d59173a215c512b9d","src/server/mod.rs":"d9f8796114740b08592621d9f461eb6c7d6baf692f409ebce4f0c44588148cdd","src/server/request.rs":"ce125e73bd3b9bf8b75af94c31a85fb5a5e8d3d11f7e758ecbbd51a4b2670af0","src/server/response.rs":"7b1e40ba04f2321a62042c13723596729e69883abc4912a5371911d9a0e2a474","src/status.rs":"6c3af3f4cac43748be938bfc7c2aeabe63f32fef233d7c2a7ea7a933c7c19699","src/uri.rs":"26c357704a80d5c8ffd28123617862ffff0213613f1aec6a5758be49244379c8","src/version.rs":"e56f6962a2ae701f3923bfce0a3d150f9caea28e8880598affb723190776cd4a"},"package":"36e108e0b1fa2d17491cbaac4bc460dc0956029d10ccf83c913dd0e5db3e7f07"}
\ No newline at end of file
--- a/third_party/rust/hyper/Cargo.toml
+++ b/third_party/rust/hyper/Cargo.toml
@@ -1,62 +1,44 @@
-# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
-#
-# When uploading crates to the registry Cargo will automatically
-# "normalize" Cargo.toml files for maximal compatibility
-# with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g. crates.io) dependencies
-#
-# If you believe there's an error in this file please file an
-# issue against the rust-lang/cargo repository. If you're
-# editing this file be aware that the upstream Cargo.toml
-# will likely look very different (and much more reasonable)
+[package]
 
-[package]
 name = "hyper"
-version = "0.10.13"
-authors = ["Sean McArthur <sean.monstar@gmail.com>", "Jonathan Reem <jonathan.reem@gmail.com>"]
-include = ["Cargo.toml", "LICENSE", "src/**/*"]
+version = "0.10.10"
 description = "A modern HTTP library."
+readme = "README.md"
 homepage = "http://hyper.rs"
-documentation = "https://docs.rs/hyper"
-readme = "README.md"
+documentation = "http://hyper.rs/hyper"
+repository = "https://github.com/hyperium/hyper"
+license = "MIT"
+authors = ["Sean McArthur <sean.monstar@gmail.com>",
+           "Jonathan Reem <jonathan.reem@gmail.com>"]
 keywords = ["http", "hyper", "hyperium"]
 categories = ["web-programming::http-client", "web-programming::http-server"]
-license = "MIT"
-repository = "https://github.com/hyperium/hyper"
-[dependencies.mime]
-version = "0.2"
-
-[dependencies.traitobject]
-version = "0.1"
+build = "build.rs"
 
-[dependencies.unicase]
-version = "1.0"
-
-[dependencies.language-tags]
-version = "0.2"
-
-[dependencies.httparse]
-version = "1.0"
+include = [
+  "build.rs",
+  "Cargo.toml",
+  "LICENSE",
+  "src/**/*"
+]
 
-[dependencies.typeable]
-version = "0.1"
-
-[dependencies.time]
-version = "0.1"
-
-[dependencies.url]
-version = "1.0"
+[dependencies]
+base64 = "0.5.2"
+httparse = "1.0"
+language-tags = "0.2"
+log = "0.3"
+mime = "0.2"
+num_cpus = "1.0"
+time = "0.1"
+traitobject = "0.1"
+typeable = "0.1"
+unicase = "1.0"
+url = "1.0"
 
-[dependencies.log]
-version = "0.3"
+[dev-dependencies]
+env_logger = "0.3"
 
-[dependencies.num_cpus]
-version = "1.0"
-
-[dependencies.base64]
-version = "0.6.0"
-[dev-dependencies.env_logger]
-version = "0.4"
+[build-dependencies]
+rustc_version = "0.1"
 
 [features]
 nightly = []
rename from third_party/rust/hyper-0.10.10/build.rs
rename to third_party/rust/hyper/build.rs
--- a/third_party/rust/hyper/src/buffer.rs
+++ b/third_party/rust/hyper/src/buffer.rs
@@ -4,17 +4,17 @@ use std::io::{self, Read, BufRead};
 pub struct BufReader<R> {
     inner: R,
     buf: Vec<u8>,
     pos: usize,
     cap: usize,
 }
 
 const INIT_BUFFER_SIZE: usize = 4096;
-pub const MAX_BUFFER_SIZE: usize = 8192 + 4096 * 100;
+const MAX_BUFFER_SIZE: usize = 8192 + 4096 * 100;
 
 impl<R: Read> BufReader<R> {
     #[inline]
     pub fn new(rdr: R) -> BufReader<R> {
         BufReader::with_capacity(rdr, INIT_BUFFER_SIZE)
     }
 
     #[inline]
--- a/third_party/rust/hyper/src/client/mod.rs
+++ b/third_party/rust/hyper/src/client/mod.rs
@@ -265,17 +265,17 @@ impl<'a> RequestBuilder<'a> {
     pub fn headers(mut self, headers: Headers) -> RequestBuilder<'a> {
         self.headers = Some(headers);
         self
     }
 
     /// Add an individual new header to the request.
     pub fn header<H: Header + HeaderFormat>(mut self, header: H) -> RequestBuilder<'a> {
         {
-            let headers = match self.headers {
+            let mut headers = match self.headers {
                 Some(ref mut h) => h,
                 None => {
                     self.headers = Some(Headers::new());
                     self.headers.as_mut().unwrap()
                 }
             };
 
             headers.set(header);
@@ -327,19 +327,17 @@ impl<'a> RequestBuilder<'a> {
                 (true, Some(body)) => match body.size() {
                     Some(size) => req.headers_mut().set(ContentLength(size)),
                     None => (), // chunked, Request will add it automatically
                 },
                 (true, None) => req.headers_mut().set(ContentLength(0)),
                 _ => () // neither
             }
             let mut streaming = try!(req.start());
-            if let Some(mut rdr) = body.take() {
-                try!(copy(&mut rdr, &mut streaming));
-            }
+            body.take().map(|mut rdr| copy(&mut rdr, &mut streaming));
             let res = try!(streaming.send());
             if !res.status.is_redirection() {
                 return Ok(res)
             }
             debug!("redirect code {:?} for {}", res.status, url);
 
             let loc = {
                 // punching borrowck here
@@ -718,29 +716,9 @@ mod tests {
         let mut s = String::new();
         client.head("http://127.0.0.1").send().unwrap().read_to_string(&mut s).unwrap();
         assert_eq!(s, "");
 
         let mut s = String::new();
         client.post("http://127.0.0.1").send().unwrap().read_to_string(&mut s).unwrap();
         assert_eq!(s, "POST");
     }
-
-    #[test]
-    fn test_request_body_error_is_returned() {
-        mock_connector!(Connector {
-            b"HTTP/1.1 200 OK\r\nContent-Length: 5\r\n\r\n",
-            b"HELLO"
-        });
-
-        struct BadBody;
-
-        impl ::std::io::Read for BadBody {
-            fn read(&mut self, _buf: &mut [u8]) -> ::std::io::Result<usize> {
-                Err(::std::io::Error::new(::std::io::ErrorKind::Other, "BadBody read"))
-            }
-        }
-
-        let client = Client::with_connector(Connector);
-        let err = client.post("http://127.0.0.1").body(&mut BadBody).send().unwrap_err();
-        assert_eq!(err.to_string(), "BadBody read");
-    }
 }
--- a/third_party/rust/hyper/src/client/pool.rs
+++ b/third_party/rust/hyper/src/client/pool.rs
@@ -2,28 +2,25 @@
 use std::borrow::ToOwned;
 use std::collections::HashMap;
 use std::fmt;
 use std::io::{self, Read, Write};
 use std::net::{SocketAddr, Shutdown};
 use std::sync::{Arc, Mutex};
 use std::sync::atomic::{AtomicBool, Ordering};
 
-use std::time::{Duration, Instant};
+use std::time::Duration;
 
 use net::{NetworkConnector, NetworkStream, DefaultConnector};
 use client::scheme::Scheme;
 
-use self::stale::{StaleCheck, Stale};
-
 /// The `NetworkConnector` that behaves as a connection pool used by hyper's `Client`.
 pub struct Pool<C: NetworkConnector> {
     connector: C,
-    inner: Arc<Mutex<PoolImpl<<C as NetworkConnector>::Stream>>>,
-    stale_check: Option<StaleCallback<C::Stream>>,
+    inner: Arc<Mutex<PoolImpl<<C as NetworkConnector>::Stream>>>
 }
 
 /// Config options for the `Pool`.
 #[derive(Debug)]
 pub struct Config {
     /// The maximum idle connections *per host*.
     pub max_idle: usize,
 }
@@ -32,29 +29,20 @@ impl Default for Config {
     #[inline]
     fn default() -> Config {
         Config {
             max_idle: 5,
         }
     }
 }
 
-// Because `Config` has all its properties public, it would be a breaking
-// change to add new ones. Sigh.
-#[derive(Debug)]
-struct Config2 {
-    idle_timeout: Option<Duration>,
-    max_idle: usize,
-}
-
-
 #[derive(Debug)]
 struct PoolImpl<S> {
     conns: HashMap<Key, Vec<PooledStreamInner<S>>>,
-    config: Config2,
+    config: Config,
 }
 
 type Key = (String, u16, Scheme);
 
 fn key<T: Into<Scheme>>(host: &str, port: u16, scheme: T) -> Key {
     (host.to_owned(), port, scheme.into())
 }
 
@@ -69,253 +57,124 @@ impl Pool<DefaultConnector> {
 impl<C: NetworkConnector> Pool<C> {
     /// Creates a `Pool` with a specified `NetworkConnector`.
     #[inline]
     pub fn with_connector(config: Config, connector: C) -> Pool<C> {
         Pool {
             connector: connector,
             inner: Arc::new(Mutex::new(PoolImpl {
                 conns: HashMap::new(),
-                config: Config2 {
-                    idle_timeout: None,
-                    max_idle: config.max_idle,
-                }
-            })),
-            stale_check: None,
+                config: config,
+            }))
         }
     }
 
-    /// Set a duration for how long an idle connection is still valid.
-    pub fn set_idle_timeout(&mut self, timeout: Option<Duration>) {
-        self.inner.lock().unwrap().config.idle_timeout = timeout;
-    }
-
-    pub fn set_stale_check<F>(&mut self, callback: F)
-    where F: Fn(StaleCheck<C::Stream>) -> Stale + Send + Sync + 'static {
-        self.stale_check = Some(Box::new(callback));
-    }
-
     /// Clear all idle connections from the Pool, closing them.
     #[inline]
     pub fn clear_idle(&mut self) {
         self.inner.lock().unwrap().conns.clear();
     }
-
-    // private
-
-    fn checkout(&self, key: &Key) -> Option<PooledStreamInner<C::Stream>> {
-        while let Some(mut inner) = self.lookup(key) {
-            if let Some(ref stale_check) = self.stale_check {
-                let dur = inner.idle.expect("idle is never missing inside pool").elapsed();
-                let arg = stale::check(&mut inner.stream, dur);
-                if stale_check(arg).is_stale() {
-                    trace!("ejecting stale connection");
-                    continue;
-                }
-            }
-            return Some(inner);
-        }
-        None
-    }
-
-
-    fn lookup(&self, key: &Key) -> Option<PooledStreamInner<C::Stream>> {
-        let mut locked = self.inner.lock().unwrap();
-        let mut should_remove = false;
-        let deadline = locked.config.idle_timeout.map(|dur| Instant::now() - dur);
-        let inner = locked.conns.get_mut(key).and_then(|vec| {
-            while let Some(inner) = vec.pop() {
-                should_remove = vec.is_empty();
-                if let Some(deadline) = deadline {
-                    if inner.idle.expect("idle is never missing inside pool") < deadline {
-                        trace!("ejecting expired connection");
-                        continue;
-                    }
-                }
-                return Some(inner);
-            }
-            None
-        });
-        if should_remove {
-            locked.conns.remove(key);
-        }
-        inner
-    }
 }
 
 impl<S> PoolImpl<S> {
     fn reuse(&mut self, key: Key, conn: PooledStreamInner<S>) {
         trace!("reuse {:?}", key);
         let conns = self.conns.entry(key).or_insert(vec![]);
         if conns.len() < self.config.max_idle {
             conns.push(conn);
         }
     }
 }
 
 impl<C: NetworkConnector<Stream=S>, S: NetworkStream + Send> NetworkConnector for Pool<C> {
     type Stream = PooledStream<S>;
     fn connect(&self, host: &str, port: u16, scheme: &str) -> ::Result<PooledStream<S>> {
         let key = key(host, port, scheme);
-        let inner = match self.checkout(&key) {
-            Some(inner) => {
+
+        let inner = {
+            // keep the mutex locked only in this block
+            let mut locked = self.inner.lock().unwrap();
+            let mut should_remove = false;
+            let inner = locked.conns.get_mut(&key).map(|vec| {
                 trace!("Pool had connection, using");
-                inner
-            },
+                should_remove = vec.len() == 1;
+                vec.pop().unwrap()
+            });
+            if should_remove {
+                locked.conns.remove(&key);
+            }
+            inner
+        };
+
+        let inner = match inner {
+            Some(inner) => inner,
             None => PooledStreamInner {
                 key: key.clone(),
-                idle: None,
                 stream: try!(self.connector.connect(host, port, scheme)),
                 previous_response_expected_no_content: false,
             }
 
         };
         Ok(PooledStream {
-            has_read: false,
             inner: Some(inner),
             is_closed: AtomicBool::new(false),
             pool: self.inner.clone(),
         })
     }
 }
 
-type StaleCallback<S> = Box<Fn(StaleCheck<S>) -> Stale + Send + Sync + 'static>;
-
-// private on purpose
-//
-// Yes, I know! Shame on me! This hurts docs! And it means it only
-// works with closures! I know!
-//
-// The thing is, this is experiemental. I'm not certain about the naming.
-// Or other things. So I don't really want it in the docs, yet.
-//
-// As for only working with closures, that's fine. A closure is probably
-// enough, and if it isn't, well you can grab the stream and duration and
-// pass those to a function, and then figure out whether to call stale()
-// or fresh() based on the return value.
-//
-// Point is, it's not that bad. And it's not ready to publicize.
-mod stale {
-    use std::time::Duration;
-
-    pub struct StaleCheck<'a, S: 'a> {
-        stream: &'a mut S,
-        duration: Duration,
-    }
-
-    #[inline]
-    pub fn check<'a, S: 'a>(stream: &'a mut S, dur: Duration) -> StaleCheck<'a, S> {
-        StaleCheck {
-            stream: stream,
-            duration: dur,
-        }
-    }
-
-    impl<'a, S: 'a> StaleCheck<'a, S> {
-        pub fn stream(&mut self) -> &mut S {
-            self.stream
-        }
-
-        pub fn idle_duration(&self) -> Duration {
-            self.duration
-        }
-
-        pub fn stale(self) -> Stale {
-            Stale(true)
-        }
-
-        pub fn fresh(self) -> Stale {
-            Stale(false)
-        }
-    }
-
-    pub struct Stale(bool);
-
-
-    impl Stale {
-        #[inline]
-        pub fn is_stale(self) -> bool {
-            self.0
-        }
-    }
-}
-
-
 /// A Stream that will try to be returned to the Pool when dropped.
 pub struct PooledStream<S> {
-    has_read: bool,
     inner: Option<PooledStreamInner<S>>,
-    // mutated in &self methods
     is_closed: AtomicBool,
     pool: Arc<Mutex<PoolImpl<S>>>,
 }
 
 // manual impl to add the 'static bound for 1.7 compat
 impl<S> fmt::Debug for PooledStream<S> where S: fmt::Debug + 'static {
     fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
         fmt.debug_struct("PooledStream")
            .field("inner", &self.inner)
-           .field("has_read", &self.has_read)
            .field("is_closed", &self.is_closed.load(Ordering::Relaxed))
            .field("pool", &self.pool)
            .finish()
     }
 }
 
 impl<S: NetworkStream> PooledStream<S> {
     /// Take the wrapped stream out of the pool completely.
     pub fn into_inner(mut self) -> S {
         self.inner.take().expect("PooledStream lost its inner stream").stream
     }
 
     /// Gets a borrowed reference to the underlying stream.
     pub fn get_ref(&self) -> &S {
         &self.inner.as_ref().expect("PooledStream lost its inner stream").stream
     }
-
-    #[cfg(test)]
-    fn get_mut(&mut self) -> &mut S {
-        &mut self.inner.as_mut().expect("PooledStream lost its inner stream").stream
-    }
 }
 
 #[derive(Debug)]
 struct PooledStreamInner<S> {
     key: Key,
-    idle: Option<Instant>,
     stream: S,
     previous_response_expected_no_content: bool,
 }
 
 impl<S: NetworkStream> Read for PooledStream<S> {
     #[inline]
     fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
-        let inner = self.inner.as_mut().unwrap();
-        let n = try!(inner.stream.read(buf));
-        if n == 0 {
-            // if the wrapped stream returns EOF (Ok(0)), that means the
-            // server has closed the stream. we must be sure this stream
-            // is dropped and not put back into the pool.
-            self.is_closed.store(true, Ordering::Relaxed);
-
-            // if the stream has never read bytes before, then the pooled
-            // stream may have been disconnected by the server while
-            // we checked it back out
-            if !self.has_read && inner.idle.is_some() {
-                // idle being some means this is a reused stream
-                Err(io::Error::new(
-                    io::ErrorKind::ConnectionAborted,
-                    "Pooled stream disconnected"
-                ))
-            } else {
+        match self.inner.as_mut().unwrap().stream.read(buf) {
+            Ok(0) => {
+                // if the wrapped stream returns EOF (Ok(0)), that means the
+                // server has closed the stream. we must be sure this stream
+                // is dropped and not put back into the pool.
+                self.is_closed.store(true, Ordering::Relaxed);
                 Ok(0)
-            }
-        } else {
-            self.has_read = true;
-            Ok(n)
+            },
+            r => r
         }
     }
 }
 
 impl<S: NetworkStream> Write for PooledStream<S> {
     #[inline]
     fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
         self.inner.as_mut().unwrap().stream.write(buf)
@@ -375,87 +234,60 @@ impl<S: NetworkStream> NetworkStream for
     }
 }
 
 impl<S> Drop for PooledStream<S> {
     fn drop(&mut self) {
         let is_closed = self.is_closed.load(Ordering::Relaxed);
         trace!("PooledStream.drop, is_closed={}", is_closed);
         if !is_closed {
-            self.inner.take().map(|mut inner| {
-                let now = Instant::now();
-                inner.idle = Some(now);
+            self.inner.take().map(|inner| {
                 if let Ok(mut pool) = self.pool.lock() {
                     pool.reuse(inner.key.clone(), inner);
                 }
                 // else poisoned, give up
             });
         }
     }
 }
 
 #[cfg(test)]
 mod tests {
     use std::net::Shutdown;
     use std::io::Read;
-    use std::time::Duration;
     use mock::{MockConnector};
     use net::{NetworkConnector, NetworkStream};
 
     use super::{Pool, key};
 
     macro_rules! mocked {
         () => ({
             Pool::with_connector(Default::default(), MockConnector)
         })
     }
 
     #[test]
     fn test_connect_and_drop() {
-        let mut pool = mocked!();
-        pool.set_idle_timeout(Some(Duration::from_millis(100)));
+        let pool = mocked!();
         let key = key("127.0.0.1", 3000, "http");
-        let mut stream = pool.connect("127.0.0.1", 3000, "http").unwrap();
-        assert_eq!(stream.get_ref().id, 0);
-        stream.get_mut().id = 9;
-        drop(stream);
+        pool.connect("127.0.0.1", 3000, "http").unwrap();
         {
             let locked = pool.inner.lock().unwrap();
             assert_eq!(locked.conns.len(), 1);
             assert_eq!(locked.conns.get(&key).unwrap().len(), 1);
         }
-        let stream = pool.connect("127.0.0.1", 3000, "http").unwrap(); //reused
-        assert_eq!(stream.get_ref().id, 9);
-        drop(stream);
+        pool.connect("127.0.0.1", 3000, "http").unwrap(); //reused
         {
             let locked = pool.inner.lock().unwrap();
             assert_eq!(locked.conns.len(), 1);
             assert_eq!(locked.conns.get(&key).unwrap().len(), 1);
         }
     }
 
     #[test]
-    fn test_double_connect_reuse() {
-        let mut pool = mocked!();
-        pool.set_idle_timeout(Some(Duration::from_millis(100)));
-        let key = key("127.0.0.1", 3000, "http");
-        let stream1 = pool.connect("127.0.0.1", 3000, "http").unwrap();
-        let stream2 = pool.connect("127.0.0.1", 3000, "http").unwrap();
-        drop(stream1);
-        drop(stream2);
-        let stream1 = pool.connect("127.0.0.1", 3000, "http").unwrap();
-        {
-            let locked = pool.inner.lock().unwrap();
-            assert_eq!(locked.conns.len(), 1);
-            assert_eq!(locked.conns.get(&key).unwrap().len(), 1);
-        }
-        let _ = stream1;
-    }
-
-    #[test]
     fn test_closed() {
         let pool = mocked!();
         let mut stream = pool.connect("127.0.0.1", 3000, "http").unwrap();
         stream.close(Shutdown::Both).unwrap();
         drop(stream);
         let locked = pool.inner.lock().unwrap();
         assert_eq!(locked.conns.len(), 0);
     }
@@ -465,35 +297,9 @@ mod tests {
         let pool = mocked!();
 
         let mut stream = pool.connect("127.0.0.1", 3000, "http").unwrap();
         assert_eq!(stream.read(&mut [0]).unwrap(), 0);
         drop(stream);
         let locked = pool.inner.lock().unwrap();
         assert_eq!(locked.conns.len(), 0);
     }
-
-    #[test]
-    fn test_read_conn_aborted() {
-        let pool = mocked!();
-
-        pool.connect("127.0.0.1", 3000, "http").unwrap();
-        let mut stream = pool.connect("127.0.0.1", 3000, "http").unwrap();
-        let err = stream.read(&mut [0]).unwrap_err();
-        assert_eq!(err.kind(), ::std::io::ErrorKind::ConnectionAborted);
-        drop(stream);
-        let locked = pool.inner.lock().unwrap();
-        assert_eq!(locked.conns.len(), 0);
-    }
-
-    #[test]
-    fn test_idle_timeout() {
-        let mut pool = mocked!();
-        pool.set_idle_timeout(Some(Duration::from_millis(10)));
-        let mut stream = pool.connect("127.0.0.1", 3000, "http").unwrap();
-        assert_eq!(stream.get_ref().id, 0);
-        stream.get_mut().id = 1337;
-        drop(stream);
-        ::std::thread::sleep(Duration::from_millis(100));
-        let stream = pool.connect("127.0.0.1", 3000, "http").unwrap();
-        assert_eq!(stream.get_ref().id, 0);
-    }
 }
--- a/third_party/rust/hyper/src/client/response.rs
+++ b/third_party/rust/hyper/src/client/response.rs
@@ -90,17 +90,17 @@ impl Drop for Response {
         //
         // otherwise, the response has been drained. we should check that the
         // server has agreed to keep the connection open
         let is_drained = !self.message.has_body();
         trace!("Response.drop is_drained={}", is_drained);
         if !(is_drained && http::should_keep_alive(self.version, &self.headers)) {
             trace!("Response.drop closing connection");
             if let Err(e) = self.message.close_connection() {
-                info!("Response.drop error closing connection: {}", e);
+                error!("Response.drop error closing connection: {}", e);
             }
         }
     }
 }
 
 #[cfg(test)]
 mod tests {
     use std::io::{self, Read};
--- a/third_party/rust/hyper/src/header/common/authorization.rs
+++ b/third_party/rust/hyper/src/header/common/authorization.rs
@@ -158,17 +158,17 @@ impl Scheme for Basic {
 }
 
 impl FromStr for Basic {
     type Err = ::Error;
     fn from_str(s: &str) -> ::Result<Basic> {
         match decode(s) {
             Ok(decoded) => match String::from_utf8(decoded) {
                 Ok(text) => {
-                    let parts = &mut text.split(':');
+                    let mut parts = &mut text.split(':');
                     let user = match parts.next() {
                         Some(part) => part.to_owned(),
                         None => return Err(::Error::Header)
                     };
                     let password = match parts.next() {
                         Some(part) => Some(part.to_owned()),
                         None => None
                     };
deleted file mode 100644
--- a/third_party/rust/hyper/src/header/common/link.rs
+++ /dev/null
@@ -1,1110 +0,0 @@
-use std::fmt;
-use std::borrow::Cow;
-use std::str::FromStr;
-use std::ascii::AsciiExt;
-
-use mime::Mime;
-use language_tags::LanguageTag;
-
-use header::parsing;
-use header::{Header, HeaderFormat};
-
-/// The `Link` header, defined in
-/// [RFC5988](http://tools.ietf.org/html/rfc5988#section-5)
-///
-/// # ABNF
-/// ```plain
-/// Link           = "Link" ":" #link-value
-/// link-value     = "<" URI-Reference ">" *( ";" link-param )
-/// link-param     = ( ( "rel" "=" relation-types )
-///                | ( "anchor" "=" <"> URI-Reference <"> )
-///                | ( "rev" "=" relation-types )
-///                | ( "hreflang" "=" Language-Tag )
-///                | ( "media" "=" ( MediaDesc | ( <"> MediaDesc <"> ) ) )
-///                | ( "title" "=" quoted-string )
-///                | ( "title*" "=" ext-value )
-///                | ( "type" "=" ( media-type | quoted-mt ) )
-///                | ( link-extension ) )
-/// link-extension = ( parmname [ "=" ( ptoken | quoted-string ) ] )
-///                | ( ext-name-star "=" ext-value )
-/// ext-name-star  = parmname "*" ; reserved for RFC2231-profiled
-/// ; extensions.  Whitespace NOT
-/// ; allowed in between.
-/// ptoken         = 1*ptokenchar
-/// ptokenchar     = "!" | "#" | "$" | "%" | "&" | "'" | "("
-///                | ")" | "*" | "+" | "-" | "." | "/" | DIGIT
-///                | ":" | "<" | "=" | ">" | "?" | "@" | ALPHA
-///                | "[" | "]" | "^" | "_" | "`" | "{" | "|"
-///                | "}" | "~"
-/// media-type     = type-name "/" subtype-name
-/// quoted-mt      = <"> media-type <">
-/// relation-types = relation-type
-///                | <"> relation-type *( 1*SP relation-type ) <">
-/// relation-type  = reg-rel-type | ext-rel-type
-/// reg-rel-type   = LOALPHA *( LOALPHA | DIGIT | "." | "-" )
-/// ext-rel-type   = URI
-/// ```
-///
-/// # Example values
-///
-/// `Link: <http://example.com/TheBook/chapter2>; rel="previous";
-///        title="previous chapter"`
-///
-/// `Link: </TheBook/chapter2>; rel="previous"; title*=UTF-8'de'letztes%20Kapitel,
-///        </TheBook/chapter4>; rel="next"; title*=UTF-8'de'n%c3%a4chstes%20Kapitel`
-///
-/// # Examples
-/// ```
-/// use hyper::header::{Headers, Link, LinkValue, RelationType};
-///
-/// let link_value = LinkValue::new("http://example.com/TheBook/chapter2")
-///     .push_rel(RelationType::Previous)
-///     .set_title("previous chapter");
-///
-/// let mut headers = Headers::new();
-/// headers.set(
-///     Link::new(vec![link_value])
-/// );
-/// ```
-#[derive(Clone, PartialEq, Debug)]
-pub struct Link {
-    /// A list of the `link-value`s of the Link entity-header.
-    values: Vec<LinkValue>
-}
-
-/// A single `link-value` of a `Link` header, based on:
-/// [RFC5988](http://tools.ietf.org/html/rfc5988#section-5)
-#[derive(Clone, PartialEq, Debug)]
-pub struct LinkValue {
-    /// Target IRI: `link-value`.
-    link: Cow<'static, str>,
-
-    /// Forward Relation Types: `rel`.
-    rel: Option<Vec<RelationType>>,
-
-    /// Context IRI: `anchor`.
-    anchor: Option<String>,
-
-    /// Reverse Relation Types: `rev`.
-    rev: Option<Vec<RelationType>>,
-
-    /// Hint on the language of the result of dereferencing
-    /// the link: `hreflang`.
-    href_lang: Option<Vec<LanguageTag>>,
-
-    /// Destination medium or media: `media`.
-    media_desc: Option<Vec<MediaDesc>>,
-
-    /// Label of the destination of a Link: `title`.
-    title: Option<String>,
-
-    /// The `title` encoded in a different charset: `title*`.
-    title_star: Option<String>,
-
-    /// Hint on the media type of the result of dereferencing
-    /// the link: `type`.
-    media_type: Option<Mime>,
-}
-
-/// A Media Descriptors Enum based on:
-/// https://www.w3.org/TR/html401/types.html#h-6.13
-#[derive(Clone, PartialEq, Debug)]
-pub enum MediaDesc {
-    /// screen.
-    Screen,
-    /// tty.
-    Tty,
-    /// tv.
-    Tv,
-    /// projection.
-    Projection,
-    /// handheld.
-    Handheld,
-    /// print.
-    Print,
-    /// braille.
-    Braille,
-    /// aural.
-    Aural,
-    /// all.
-    All,
-    /// Unrecognized media descriptor extension.
-    Extension(String)
-}
-
-/// A Link Relation Type Enum based on:
-/// [RFC5988](https://tools.ietf.org/html/rfc5988#section-6.2.2)
-#[derive(Clone, PartialEq, Debug)]
-pub enum RelationType {
-    /// alternate.
-    Alternate,
-    /// appendix.
-    Appendix,
-    /// bookmark.
-    Bookmark,
-    /// chapter.
-    Chapter,
-    /// contents.
-    Contents,
-    /// copyright.
-    Copyright,
-    /// current.
-    Current,
-    /// describedby.
-    DescribedBy,
-    /// edit.
-    Edit,
-    /// edit-media.
-    EditMedia,
-    /// enclosure.
-    Enclosure,
-    /// first.
-    First,
-    /// glossary.
-    Glossary,
-    /// help.
-    Help,
-    /// hub.
-    Hub,
-    /// index.
-    Index,
-    /// last.
-    Last,
-    /// latest-version.
-    LatestVersion,
-    /// license.
-    License,
-    /// next.
-    Next,
-    /// next-archive.
-    NextArchive,
-    /// payment.
-    Payment,
-    /// prev.
-    Prev,
-    /// predecessor-version.
-    PredecessorVersion,
-    /// previous.
-    Previous,
-    /// prev-archive.
-    PrevArchive,
-    /// related.
-    Related,
-    /// replies.
-    Replies,
-    /// section.
-    Section,
-    /// self.
-    RelationTypeSelf,
-    /// service.
-    Service,
-    /// start.
-    Start,
-    /// stylesheet.
-    Stylesheet,
-    /// subsection.
-    Subsection,
-    /// successor-version.
-    SuccessorVersion,
-    /// up.
-    Up,
-    /// versionHistory.
-    VersionHistory,
-    /// via.
-    Via,
-    /// working-copy.
-    WorkingCopy,
-    /// working-copy-of.
-    WorkingCopyOf,
-    /// ext-rel-type.
-    ExtRelType(String)
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Struct methods
-////////////////////////////////////////////////////////////////////////////////
-
-impl Link {
-    /// Create `Link` from a `Vec<LinkValue>`.
-    pub fn new(link_values: Vec<LinkValue>) -> Link {
-        Link { values: link_values }
-    }
-
-    /// Get the `Link` header's `LinkValue`s.
-    pub fn values(&self) -> &[LinkValue] {
-        self.values.as_ref()
-    }
-
-    /// Add a `LinkValue` instance to the `Link` header's values.
-    pub fn push_value(&mut self, link_value: LinkValue) {
-        self.values.push(link_value);
-    }
-}
-
-impl LinkValue {
-    /// Create `LinkValue` from URI-Reference.
-    pub fn new<T>(uri: T) -> LinkValue
-        where T: Into<Cow<'static, str>> {
-        LinkValue {
-            link: uri.into(),
-            rel: None,
-            anchor: None,
-            rev: None,
-            href_lang: None,
-            media_desc: None,
-            title: None,
-            title_star: None,
-            media_type: None,
-        }
-    }
-
-    /// Get the `LinkValue`'s value.
-    pub fn link(&self) -> &str {
-        self.link.as_ref()
-    }
-
-    /// Get the `LinkValue`'s `rel` parameter(s).
-    pub fn rel(&self) -> Option<&[RelationType]> {
-        self.rel.as_ref().map(AsRef::as_ref)
-    }
-
-    /// Get the `LinkValue`'s `anchor` parameter.
-    pub fn anchor(&self) -> Option<&str> {
-        self.anchor.as_ref().map(AsRef::as_ref)
-    }
-
-    /// Get the `LinkValue`'s `rev` parameter(s).
-    pub fn rev(&self) -> Option<&[RelationType]> {
-        self.rev.as_ref().map(AsRef::as_ref)
-    }
-
-    /// Get the `LinkValue`'s `hreflang` parameter(s).
-    pub fn href_lang(&self) -> Option<&[LanguageTag]> {
-        self.href_lang.as_ref().map(AsRef::as_ref)
-    }
-
-    /// Get the `LinkValue`'s `media` parameter(s).
-    pub fn media_desc(&self) -> Option<&[MediaDesc]> {
-        self.media_desc.as_ref().map(AsRef::as_ref)
-    }
-
-    /// Get the `LinkValue`'s `title` parameter.
-    pub fn title(&self) -> Option<&str> {
-        self.title.as_ref().map(AsRef::as_ref)
-    }
-
-    /// Get the `LinkValue`'s `title*` parameter.
-    pub fn title_star(&self) -> Option<&str> {
-        self.title_star.as_ref().map(AsRef::as_ref)
-    }
-
-    /// Get the `LinkValue`'s `type` parameter.
-    pub fn media_type(&self) -> Option<&Mime> {
-        self.media_type.as_ref()
-    }
-
-    /// Add a `RelationType` to the `LinkValue`'s `rel` parameter.
-    pub fn push_rel(mut self, rel: RelationType) -> LinkValue {
-        let mut v = self.rel.take().unwrap_or(Vec::new());
-
-        v.push(rel);
-
-        self.rel = Some(v);
-
-        self
-    }
-
-    /// Set `LinkValue`'s `anchor` parameter.
-    pub fn set_anchor<T: Into<String>>(mut self, anchor: T) -> LinkValue {
-        self.anchor = Some(anchor.into());
-
-        self
-    }
-
-    /// Add a `RelationType` to the `LinkValue`'s `rev` parameter.
-    pub fn push_rev(mut self, rev: RelationType) -> LinkValue {
-        let mut v = self.rev.take().unwrap_or(Vec::new());
-
-        v.push(rev);
-
-        self.rev = Some(v);
-
-        self
-    }
-
-    /// Add a `LanguageTag` to the `LinkValue`'s `hreflang` parameter.
-    pub fn push_href_lang(mut self, language_tag: LanguageTag) -> LinkValue {
-        let mut v = self.href_lang.take().unwrap_or(Vec::new());
-
-        v.push(language_tag);
-
-        self.href_lang = Some(v);
-
-        self
-    }
-
-    /// Add a `MediaDesc` to the `LinkValue`'s `media_desc` parameter.
-    pub fn push_media_desc(mut self, media_desc: MediaDesc) -> LinkValue {
-        let mut v = self.media_desc.take().unwrap_or(Vec::new());
-
-        v.push(media_desc);
-
-        self.media_desc = Some(v);
-
-        self
-    }
-
-    /// Set `LinkValue`'s `title` parameter.
-    pub fn set_title<T: Into<String>>(mut self, title: T) -> LinkValue {
-        self.title = Some(title.into());
-
-        self
-    }
-
-    /// Set `LinkValue`'s `title*` parameter.
-    pub fn set_title_star<T: Into<String>>(mut self, title_star: T) -> LinkValue {
-        self.title_star = Some(title_star.into());
-
-        self
-    }
-
-    /// Set `LinkValue`'s `type` parameter.
-    pub fn set_media_type(mut self, media_type: Mime) -> LinkValue {
-        self.media_type = Some(media_type);
-
-        self
-    }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Trait implementations
-////////////////////////////////////////////////////////////////////////////////
-
-impl Header for Link {
-    fn header_name() -> &'static str {
-        static NAME: &'static str = "Link";
-        NAME
-    }
-
-    fn parse_header(raw: &[Vec<u8>]) -> ::Result<Link> {
-        // If more that one `Link` headers are present in a request's
-        // headers they are combined in a single `Link` header containing
-        // all the `link-value`s present in each of those `Link` headers.
-        raw.iter()
-            .map(|v| parsing::from_raw_str::<Link>(&v))
-            .fold(None, |p, c| match (p, c) {
-                (None, c) => Some(c),
-                (e @ Some(Err(_)), _) => e,
-                (Some(Ok(mut p)), Ok(c)) => {
-                    p.values.extend(c.values);
-
-                    Some(Ok(p))
-                }
-                _ => Some(Err(::Error::Header)),
-            })
-            .unwrap_or(Err(::Error::Header))
-    }
-}
-impl HeaderFormat for Link {
-    fn fmt_header(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        fmt_delimited(f, self.values.as_slice(), ", ", ("", ""))
-    }
-}
-
-impl fmt::Display for Link {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        self.fmt_header(f)
-    }
-}
-
-impl fmt::Display for LinkValue {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(write!(f, "<{}>", self.link));
-
-        if let Some(ref rel) = self.rel {
-            try!(fmt_delimited(f, rel.as_slice(), " ", ("; rel=\"", "\"")));
-        }
-        if let Some(ref anchor) = self.anchor {
-            try!(write!(f, "; anchor=\"{}\"", anchor));
-        }
-        if let Some(ref rev) = self.rev {
-            try!(fmt_delimited(f, rev.as_slice(), " ", ("; rev=\"", "\"")));
-        }
-        if let Some(ref href_lang) = self.href_lang {
-            for tag in href_lang {
-                try!(write!(f, "; hreflang={}", tag));
-            }
-        }
-        if let Some(ref media_desc) = self.media_desc {
-            try!(fmt_delimited(f, media_desc.as_slice(), ", ", ("; media=\"", "\"")));
-        }
-        if let Some(ref title) = self.title {
-            try!(write!(f, "; title=\"{}\"", title));
-        }
-        if let Some(ref title_star) = self.title_star {
-            try!(write!(f, "; title*={}", title_star));
-        }
-        if let Some(ref media_type) = self.media_type {
-            try!(write!(f, "; type=\"{}\"", media_type));
-        }
-
-        Ok(())
-    }
-}
-
-impl FromStr for Link {
-    type Err = ::Error;
-
-    fn from_str(s: &str) -> ::Result<Link> {
-        // Create a split iterator with delimiters: `;`, `,`
-        let link_split = SplitAsciiUnquoted::new(s, ";,");
-
-        let mut link_values: Vec<LinkValue> = Vec::new();
-
-        // Loop over the splits parsing the Link header into
-        // a `Vec<LinkValue>`
-        for segment in link_split {
-            // Parse the `Target IRI`
-            // https://tools.ietf.org/html/rfc5988#section-5.1
-            if segment.trim().starts_with('<') {
-                link_values.push(
-                    match verify_and_trim(segment.trim(), (b'<', b'>')) {
-                        Err(_) => return Err(::Error::Header),
-                        Ok(s) => {
-                            LinkValue {
-                                link: s.to_owned().into(),
-                                rel: None,
-                                anchor: None,
-                                rev: None,
-                                href_lang: None,
-                                media_desc: None,
-                                title: None,
-                                title_star: None,
-                                media_type: None,
-                            }
-                        },
-                    }
-                );
-            } else {
-                // Parse the current link-value's parameters
-                let mut link_param_split = segment.splitn(2, '=');
-
-                let link_param_name = match link_param_split.next() {
-                    None => return Err(::Error::Header),
-                    Some(p) => p.trim(),
-                };
-
-                let link_header = match link_values.last_mut() {
-                    None => return Err(::Error::Header),
-                    Some(l) => l,
-                };
-
-                if "rel".eq_ignore_ascii_case(link_param_name) {
-                    // Parse relation type: `rel`.
-                    // https://tools.ietf.org/html/rfc5988#section-5.3
-                    if link_header.rel.is_none() {
-                        link_header.rel = match link_param_split.next() {
-                            None => return Err(::Error::Header),
-                            Some("") =>  return Err(::Error::Header),
-                            Some(s) => {
-                                s.trim_matches(|c: char| c == '"' || c.is_whitespace())
-                                    .split(' ')
-                                    .map(|t| t.trim().parse())
-                                    .collect::<Result<Vec<RelationType>, _>>()
-                                    .or_else(|_| return Err(::Error::Header))
-                                    .ok()
-                            },
-                        };
-                    }
-                } else if "anchor".eq_ignore_ascii_case(link_param_name) {
-                    // Parse the `Context IRI`.
-                    // https://tools.ietf.org/html/rfc5988#section-5.2
-                    link_header.anchor = match link_param_split.next() {
-                        None => return Err(::Error::Header),
-                        Some("") =>  return Err(::Error::Header),
-                        Some(s) => match verify_and_trim(s.trim(), (b'"', b'"')) {
-                            Err(_) => return Err(::Error::Header),
-                            Ok(a) => Some(String::from(a)),
-                        },
-                    };
-                } else if "rev".eq_ignore_ascii_case(link_param_name) {
-                    // Parse relation type: `rev`.
-                    // https://tools.ietf.org/html/rfc5988#section-5.3
-                    if link_header.rev.is_none() {
-                        link_header.rev = match link_param_split.next() {
-                            None => return Err(::Error::Header),
-                            Some("") =>  return Err(::Error::Header),
-                            Some(s) => {
-                                s.trim_matches(|c: char| c == '"' || c.is_whitespace())
-                                    .split(' ')
-                                    .map(|t| t.trim().parse())
-                                    .collect::<Result<Vec<RelationType>, _>>()
-                                    .or_else(|_| return Err(::Error::Header))
-                                    .ok()
-                            },
-                        }
-                    }
-                } else if "hreflang".eq_ignore_ascii_case(link_param_name) {
-                    // Parse target attribute: `hreflang`.
-                    // https://tools.ietf.org/html/rfc5988#section-5.4
-                    let mut v = link_header.href_lang.take().unwrap_or(Vec::new());
-
-                    v.push(
-                        match link_param_split.next() {
-                            None => return Err(::Error::Header),
-                            Some("") =>  return Err(::Error::Header),
-                            Some(s) => match s.trim().parse() {
-                                Err(_) => return Err(::Error::Header),
-                                Ok(t) => t,
-                            },
-                        }
-                    );
-
-                    link_header.href_lang = Some(v);
-                } else if "media".eq_ignore_ascii_case(link_param_name) {
-                    // Parse target attribute: `media`.
-                    // https://tools.ietf.org/html/rfc5988#section-5.4
-                    if link_header.media_desc.is_none() {
-                        link_header.media_desc = match link_param_split.next() {
-                            None => return Err(::Error::Header),
-                            Some("") =>  return Err(::Error::Header),
-                            Some(s) => {
-                                s.trim_matches(|c: char| c == '"' || c.is_whitespace())
-                                    .split(',')
-                                    .map(|t| t.trim().parse())
-                                    .collect::<Result<Vec<MediaDesc>, _>>()
-                                    .or_else(|_| return Err(::Error::Header))
-                                    .ok()
-                            },
-                        };
-                    }
-                } else if "title".eq_ignore_ascii_case(link_param_name) {
-                    // Parse target attribute: `title`.
-                    // https://tools.ietf.org/html/rfc5988#section-5.4
-                    if link_header.title.is_none() {
-                        link_header.title = match link_param_split.next() {
-                            None => return Err(::Error::Header),
-                            Some("") =>  return Err(::Error::Header),
-                            Some(s) => match verify_and_trim(s.trim(), (b'"', b'"')) {
-                                Err(_) => return Err(::Error::Header),
-                                Ok(t) => Some(String::from(t)),
-                            },
-                        };
-                    }
-                } else if "title*".eq_ignore_ascii_case(link_param_name) {
-                    // Parse target attribute: `title*`.
-                    // https://tools.ietf.org/html/rfc5988#section-5.4
-                    //
-                    // Definition of `ext-value`:
-                    //       https://tools.ietf.org/html/rfc5987#section-3.2.1
-                    if link_header.title_star.is_none() {
-                        link_header.title_star = match link_param_split.next() {
-                            None => return Err(::Error::Header),
-                            Some("") =>  return Err(::Error::Header),
-                            Some(s) => Some(String::from(s.trim())),
-                        };
-                    }
-                } else if "type".eq_ignore_ascii_case(link_param_name) {
-                    // Parse target attribute: `type`.
-                    // https://tools.ietf.org/html/rfc5988#section-5.4
-                    if link_header.media_type.is_none() {
-                        link_header.media_type = match link_param_split.next() {
-                            None => return Err(::Error::Header),
-                            Some("") =>  return Err(::Error::Header),
-                            Some(s) => match verify_and_trim(s.trim(), (b'"', b'"')) {
-                                Err(_) => return Err(::Error::Header),
-                                Ok(t) => match t.parse() {
-                                    Err(_) => return Err(::Error::Header),
-                                    Ok(m) => Some(m),
-                                },
-                            },
-
-                        };
-                    }
-                } else {
-                    return Err(::Error::Header);
-                }
-            }
-        }
-
-        Ok(Link::new(link_values))
-    }
-}
-
-impl fmt::Display for MediaDesc {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            MediaDesc::Screen => write!(f, "screen"),
-            MediaDesc::Tty => write!(f, "tty"),
-            MediaDesc::Tv => write!(f, "tv"),
-            MediaDesc::Projection => write!(f, "projection"),
-            MediaDesc::Handheld => write!(f, "handheld"),
-            MediaDesc::Print => write!(f, "print"),
-            MediaDesc::Braille => write!(f, "braille"),
-            MediaDesc::Aural => write!(f, "aural"),
-            MediaDesc::All => write!(f, "all"),
-            MediaDesc::Extension(ref other) => write!(f, "{}", other),
-         }
-    }
-}
-
-impl FromStr for MediaDesc {
-    type Err = ::Error;
-
-    fn from_str(s: &str) -> ::Result<MediaDesc> {
-        match s {
-            "screen" => Ok(MediaDesc::Screen),
-            "tty" => Ok(MediaDesc::Tty),
-            "tv" => Ok(MediaDesc::Tv),
-            "projection" => Ok(MediaDesc::Projection),
-            "handheld" => Ok(MediaDesc::Handheld),
-            "print" => Ok(MediaDesc::Print),
-            "braille" => Ok(MediaDesc::Braille),
-            "aural" => Ok(MediaDesc::Aural),
-            "all" => Ok(MediaDesc::All),
-             _ => Ok(MediaDesc::Extension(String::from(s))),
-        }
-    }
-}
-
-impl fmt::Display for RelationType {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            RelationType::Alternate => write!(f, "alternate"),
-            RelationType::Appendix => write!(f, "appendix"),
-            RelationType::Bookmark => write!(f, "bookmark"),
-            RelationType::Chapter => write!(f, "chapter"),
-            RelationType::Contents => write!(f, "contents"),
-            RelationType::Copyright => write!(f, "copyright"),
-            RelationType::Current => write!(f, "current"),
-            RelationType::DescribedBy => write!(f, "describedby"),
-            RelationType::Edit => write!(f, "edit"),
-            RelationType::EditMedia => write!(f, "edit-media"),
-            RelationType::Enclosure => write!(f, "enclosure"),
-            RelationType::First => write!(f, "first"),
-            RelationType::Glossary => write!(f, "glossary"),
-            RelationType::Help => write!(f, "help"),
-            RelationType::Hub => write!(f, "hub"),
-            RelationType::Index => write!(f, "index"),
-            RelationType::Last => write!(f, "last"),
-            RelationType::LatestVersion => write!(f, "latest-version"),
-            RelationType::License => write!(f, "license"),
-            RelationType::Next => write!(f, "next"),
-            RelationType::NextArchive => write!(f, "next-archive"),
-            RelationType::Payment => write!(f, "payment"),
-            RelationType::Prev => write!(f, "prev"),
-            RelationType::PredecessorVersion => write!(f, "predecessor-version"),
-            RelationType::Previous => write!(f, "previous"),
-            RelationType::PrevArchive => write!(f, "prev-archive"),
-            RelationType::Related => write!(f, "related"),
-            RelationType::Replies => write!(f, "replies"),
-            RelationType::Section => write!(f, "section"),
-            RelationType::RelationTypeSelf => write!(f, "self"),
-            RelationType::Service => write!(f, "service"),
-            RelationType::Start => write!(f, "start"),
-            RelationType::Stylesheet => write!(f, "stylesheet"),
-            RelationType::Subsection => write!(f, "subsection"),
-            RelationType::SuccessorVersion => write!(f, "successor-version"),
-            RelationType::Up => write!(f, "up"),
-            RelationType::VersionHistory => write!(f, "version-history"),
-            RelationType::Via => write!(f, "via"),
-            RelationType::WorkingCopy => write!(f, "working-copy"),
-            RelationType::WorkingCopyOf => write!(f, "working-copy-of"),
-            RelationType::ExtRelType(ref uri) => write!(f, "{}", uri),
-         }
-    }
-}
-
-impl FromStr for RelationType {
-    type Err = ::Error;
-
-    fn from_str(s: &str) -> ::Result<RelationType> {
-        if "alternate".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Alternate)
-        } else if "appendix".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Appendix)
-        } else if "bookmark".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Bookmark)
-        } else if "chapter".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Chapter)
-        } else if "contents".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Contents)
-        } else if "copyright".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Copyright)
-        } else if "current".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Current)
-        } else if "describedby".eq_ignore_ascii_case(s) {
-            Ok(RelationType::DescribedBy)
-        } else if "edit".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Edit)
-        } else if "edit-media".eq_ignore_ascii_case(s) {
-            Ok(RelationType::EditMedia)
-        } else if "enclosure".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Enclosure)
-        } else if "first".eq_ignore_ascii_case(s) {
-            Ok(RelationType::First)
-        } else if "glossary".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Glossary)
-        } else if "help".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Help)
-        } else if "hub".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Hub)
-        } else if "index".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Index)
-        } else if "last".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Last)
-        } else if "latest-version".eq_ignore_ascii_case(s) {
-            Ok(RelationType::LatestVersion)
-        } else if "license".eq_ignore_ascii_case(s) {
-            Ok(RelationType::License)
-        } else if "next".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Next)
-        } else if "next-archive".eq_ignore_ascii_case(s) {
-            Ok(RelationType::NextArchive)
-        } else if "payment".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Payment)
-        } else if "prev".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Prev)
-        } else if "predecessor-version".eq_ignore_ascii_case(s) {
-            Ok(RelationType::PredecessorVersion)
-        } else if "previous".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Previous)
-        } else if "prev-archive".eq_ignore_ascii_case(s) {
-            Ok(RelationType::PrevArchive)
-        } else if "related".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Related)
-        } else if "replies".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Replies)
-        } else if "section".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Section)
-        } else if "self".eq_ignore_ascii_case(s) {
-            Ok(RelationType::RelationTypeSelf)
-        } else if "service".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Service)
-        } else if "start".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Start)
-        } else if "stylesheet".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Stylesheet)
-        } else if "subsection".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Subsection)
-        } else if "successor-version".eq_ignore_ascii_case(s) {
-            Ok(RelationType::SuccessorVersion)
-        } else if "up".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Up)
-        } else if "version-history".eq_ignore_ascii_case(s) {
-            Ok(RelationType::VersionHistory)
-        } else if "via".eq_ignore_ascii_case(s) {
-            Ok(RelationType::Via)
-        } else if "working-copy".eq_ignore_ascii_case(s) {
-            Ok(RelationType::WorkingCopy)
-        } else if "working-copy-of".eq_ignore_ascii_case(s) {
-            Ok(RelationType::WorkingCopyOf)
-        } else {
-            Ok(RelationType::ExtRelType(String::from(s)))
-        }
-    }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Utilities
-////////////////////////////////////////////////////////////////////////////////
-
-struct SplitAsciiUnquoted<'a> {
-    src: &'a str,
-    pos: usize,
-    del: &'a str
-}
-
-impl<'a> SplitAsciiUnquoted<'a> {
-    fn new(s: &'a str, d: &'a str) -> SplitAsciiUnquoted<'a> {
-        SplitAsciiUnquoted{
-            src: s,
-            pos: 0,
-            del: d,
-        }
-    }
-}
-
-impl<'a> Iterator for SplitAsciiUnquoted<'a> {
-    type Item = &'a str;
-
-    fn next(&mut self) -> Option<&'a str> {
-        if self.pos < self.src.len() {
-            let prev_pos = self.pos;
-            let mut pos = self.pos;
-
-            let mut in_quotes = false;
-
-            for c in self.src[prev_pos..].as_bytes().iter() {
-                in_quotes ^= *c == b'"';
-
-                // Ignore `c` if we're `in_quotes`.
-                if !in_quotes && self.del.as_bytes().contains(c) {
-                    break;
-                }
-
-                pos += 1;
-            }
-
-            self.pos = pos + 1;
-
-            Some(&self.src[prev_pos..pos])
-        } else {
-            None
-        }
-    }
-}
-
-fn fmt_delimited<T: fmt::Display>(f: &mut fmt::Formatter, p: &[T], d: &str, b: (&str, &str)) -> fmt::Result {
-    if p.len() != 0 {
-        // Write a starting string `b.0` before the first element
-        try!(write!(f, "{}{}", b.0, p[0]));
-
-        for i in &p[1..] {
-            // Write the next element preceded by the delimiter `d`
-            try!(write!(f, "{}{}", d, i));
-        }
-
-        // Write a ending string `b.1` before the first element
-        try!(write!(f, "{}", b.1));
-    }
-
-    Ok(())
-}
-
-fn verify_and_trim(s: &str, b: (u8, u8)) -> ::Result<&str> {
-    let length = s.len();
-    let byte_array = s.as_bytes();
-
-    // Verify that `s` starts with `b.0` and ends with `b.1` and return
-    // the contained substring after triming whitespace.
-    if length > 1 && b.0 == byte_array[0] && b.1 == byte_array[length - 1] {
-        Ok(s.trim_matches(
-            |c: char| c == b.0 as char || c == b.1 as char || c.is_whitespace())
-        )
-    } else {
-        Err(::Error::Header)
-    }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Tests
-////////////////////////////////////////////////////////////////////////////////
-
-#[cfg(test)]
-mod tests {
-    use std::fmt;
-    use std::fmt::Write;
-
-    use super::{Link, LinkValue, MediaDesc, RelationType, SplitAsciiUnquoted};
-    use super::{fmt_delimited, verify_and_trim};
-
-    use header::Header;
-
-    use buffer::BufReader;
-    use mock::MockStream;
-    use http::h1::parse_request;
-
-    use mime::Mime;
-    use mime::TopLevel::Text;
-    use mime::SubLevel::Plain;
-
-    #[test]
-    fn test_link() {
-        let link_value = LinkValue::new("http://example.com/TheBook/chapter2")
-            .push_rel(RelationType::Previous)
-            .push_rev(RelationType::Next)
-            .set_title("previous chapter");
-
-        let link_header = b"<http://example.com/TheBook/chapter2>; \
-            rel=\"previous\"; rev=next; title=\"previous chapter\"";
-
-        let expected_link = Link::new(vec![link_value]);
-
-        let link = Header::parse_header(&vec![link_header.to_vec()]);
-        assert_eq!(link.ok(), Some(expected_link));
-    }
-
-    #[test]
-    fn test_link_multiple_values() {
-        let first_link = LinkValue::new("/TheBook/chapter2")
-            .push_rel(RelationType::Previous)
-            .set_title_star("UTF-8'de'letztes%20Kapitel");
-
-        let second_link = LinkValue::new("/TheBook/chapter4")
-            .push_rel(RelationType::Next)
-            .set_title_star("UTF-8'de'n%c3%a4chstes%20Kapitel");
-
-        let link_header = b"</TheBook/chapter2>; \
-            rel=\"previous\"; title*=UTF-8'de'letztes%20Kapitel, \
-            </TheBook/chapter4>; \
-            rel=\"next\"; title*=UTF-8'de'n%c3%a4chstes%20Kapitel";
-
-        let expected_link = Link::new(vec![first_link, second_link]);
-
-        let link = Header::parse_header(&vec![link_header.to_vec()]);
-        assert_eq!(link.ok(), Some(expected_link));
-    }
-
-    #[test]
-    fn test_link_all_attributes() {
-        let link_value = LinkValue::new("http://example.com/TheBook/chapter2")
-            .push_rel(RelationType::Previous)
-            .set_anchor("../anchor/example/")
-            .push_rev(RelationType::Next)
-            .push_href_lang(langtag!(de))
-            .push_media_desc(MediaDesc::Screen)
-            .set_title("previous chapter")
-            .set_title_star("title* unparsed")
-            .set_media_type(Mime(Text, Plain, vec![]));
-
-        let link_header = b"<http://example.com/TheBook/chapter2>; \
-            rel=\"previous\"; anchor=\"../anchor/example/\"; \
-            rev=\"next\"; hreflang=de; media=\"screen\"; \
-            title=\"previous chapter\"; title*=title* unparsed; \
-            type=\"text/plain\"";
-
-        let expected_link = Link::new(vec![link_value]);
-
-        let link = Header::parse_header(&vec![link_header.to_vec()]);
-        assert_eq!(link.ok(), Some(expected_link));
-    }
-
-    #[test]
-    fn test_link_multiple_link_headers() {
-        let first_link = LinkValue::new("/TheBook/chapter2")
-            .push_rel(RelationType::Previous)
-            .set_title_star("UTF-8'de'letztes%20Kapitel");
-
-        let second_link = LinkValue::new("/TheBook/chapter4")
-            .push_rel(RelationType::Next)
-            .set_title_star("UTF-8'de'n%c3%a4chstes%20Kapitel");
-
-        let third_link = LinkValue::new("http://example.com/TheBook/chapter2")
-            .push_rel(RelationType::Previous)
-            .push_rev(RelationType::Next)
-            .set_title("previous chapter");
-
-        let expected_link = Link::new(vec![first_link, second_link, third_link]);
-
-        let mut raw = MockStream::with_input(b"GET /super_short_uri/and_whatever HTTP/1.1\r\nHost: \
-                                  hyper.rs\r\nAccept: a lot of things\r\nAccept-Charset: \
-                                  utf8\r\nAccept-Encoding: *\r\nLink: </TheBook/chapter2>; \
-                                  rel=\"previous\"; title*=UTF-8'de'letztes%20Kapitel, \
-                                  </TheBook/chapter4>; rel=\"next\"; title*=\
-                                  UTF-8'de'n%c3%a4chstes%20Kapitel\r\n\
-                                  Access-Control-Allow-Credentials: None\r\nLink: \
-                                  <http://example.com/TheBook/chapter2>; \
-                                  rel=\"previous\"; rev=next; title=\"previous chapter\"\
-                                  \r\n\r\n");
-
-        let mut buf = BufReader::new(&mut raw);
-        let res = parse_request(&mut buf).unwrap();
-
-        let link = res.headers.get::<Link>().unwrap();
-
-        assert_eq!(*link, expected_link);
-    }
-
-    #[test]
-    fn test_link_display() {
-        let link_value = LinkValue::new("http://example.com/TheBook/chapter2")
-            .push_rel(RelationType::Previous)
-            .set_anchor("/anchor/example/")
-            .push_rev(RelationType::Next)
-            .push_href_lang(langtag!(de))
-            .push_media_desc(MediaDesc::Screen)
-            .set_title("previous chapter")
-            .set_title_star("title* unparsed")
-            .set_media_type(Mime(Text, Plain, vec![]));
-
-        let link = Link::new(vec![link_value]);
-
-        let mut link_header = String::new();
-        write!(&mut link_header, "{}", link).unwrap();
-
-        let expected_link_header = "<http://example.com/TheBook/chapter2>; \
-            rel=\"previous\"; anchor=\"/anchor/example/\"; \
-            rev=\"next\"; hreflang=de; media=\"screen\"; \
-            title=\"previous chapter\"; title*=title* unparsed; \
-            type=\"text/plain\"";
-
-        assert_eq!(link_header, expected_link_header);
-    }
-
-    #[test]
-    fn test_link_parsing_errors() {
-        let link_a = b"http://example.com/TheBook/chapter2; \
-            rel=\"previous\"; rev=next; title=\"previous chapter\"";
-
-        let mut err: Result<Link, _> = Header::parse_header(&vec![link_a.to_vec()]);
-        assert_eq!(err.is_err(), true);
-
-        let link_b = b"<http://example.com/TheBook/chapter2>; \
-            =\"previous\"; rev=next; title=\"previous chapter\"";
-
-        err = Header::parse_header(&vec![link_b.to_vec()]);
-        assert_eq!(err.is_err(), true);
-
-        let link_c = b"<http://example.com/TheBook/chapter2>; \
-            rel=; rev=next; title=\"previous chapter\"";
-
-        err = Header::parse_header(&vec![link_c.to_vec()]);
-        assert_eq!(err.is_err(), true);
-
-        let link_d = b"<http://example.com/TheBook/chapter2>; \
-            rel=\"previous\"; rev=next; title=";
-
-        err = Header::parse_header(&vec![link_d.to_vec()]);
-        assert_eq!(err.is_err(), true);
-
-        let link_e = b"<http://example.com/TheBook/chapter2>; \
-            rel=\"previous\"; rev=next; attr=unknown";
-
-        err = Header::parse_header(&vec![link_e.to_vec()]);
-        assert_eq!(err.is_err(), true);
-    }
-
-    #[test]
-    fn test_link_split_ascii_unquoted_iterator() {
-        let string = "some, text; \"and, more; in quotes\", or not";
-        let mut string_split = SplitAsciiUnquoted::new(string, ";,");
-
-        assert_eq!(Some("some"), string_split.next());
-        assert_eq!(Some(" text"), string_split.next());
-        assert_eq!(Some(" \"and, more; in quotes\""), string_split.next());
-        assert_eq!(Some(" or not"), string_split.next());
-        assert_eq!(None, string_split.next());
-    }
-
-    #[test]
-    fn test_link_fmt_delimited() {
-        struct TestFormatterStruct<'a> { v: Vec<&'a str> };
-
-        impl<'a> fmt::Display for TestFormatterStruct<'a> {
-            fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-                fmt_delimited(f, self.v.as_slice(), ", ", (">>", "<<"))
-            }
-        }
-
-        let test_formatter = TestFormatterStruct { v: vec!["first", "second"] };
-
-        let mut string = String::new();
-        write!(&mut string, "{}", test_formatter).unwrap();
-
-        let expected_string = ">>first, second<<";
-
-        assert_eq!(string, expected_string);
-    }
-
-    #[test]
-    fn test_link_verify_and_trim() {
-        let string = verify_and_trim(">  some string   <", (b'>', b'<'));
-        assert_eq!(string.ok(), Some("some string"));
-
-        let err = verify_and_trim(" >  some string   <", (b'>', b'<'));
-        assert_eq!(err.is_err(), true);
-    }
-}
-
-bench_header!(bench_link, Link, { vec![b"<http://example.com/TheBook/chapter2>; rel=\"previous\"; rev=next; title=\"previous chapter\"; type=\"text/html\"; media=\"screen, tty\"".to_vec()] });
--- a/third_party/rust/hyper/src/header/common/mod.rs
+++ b/third_party/rust/hyper/src/header/common/mod.rs
@@ -52,17 +52,16 @@ pub use self::referer::Referer;
 pub use self::referrer_policy::ReferrerPolicy;
 pub use self::server::Server;
 pub use self::set_cookie::SetCookie;
 pub use self::strict_transport_security::StrictTransportSecurity;
 pub use self::transfer_encoding::TransferEncoding;
 pub use self::upgrade::{Upgrade, Protocol, ProtocolName};
 pub use self::user_agent::UserAgent;
 pub use self::vary::Vary;
-pub use self::link::{Link, LinkValue, RelationType, MediaDesc};
 
 #[doc(hidden)]
 #[macro_export]
 macro_rules! bench_header(
     ($name:ident, $ty:ty, $value:expr) => {
         #[cfg(test)]
         #[cfg(feature = "nightly")]
         #[allow(deprecated)]
@@ -387,9 +386,8 @@ mod referer;
 mod referrer_policy;
 mod server;
 mod set_cookie;
 mod strict_transport_security;
 mod transfer_encoding;
 mod upgrade;
 mod user_agent;
 mod vary;
-mod link;
--- a/third_party/rust/hyper/src/header/internals/cell.rs
+++ b/third_party/rust/hyper/src/header/internals/cell.rs
@@ -70,31 +70,31 @@ impl<V: ?Sized + fmt::Debug + Any + 'sta
                 None
             },
             PtrMap::Many(ref hm) => hm.get(&key)
         }.map(|val| &**val)
     }
 
     #[inline]
     pub fn get_mut(&mut self, key: TypeId) -> Option<&mut V> {
-        let map = unsafe { &mut *self.0.get() };
+        let mut map = unsafe { &mut *self.0.get() };
         match *map {
             PtrMap::Empty => None,
             PtrMap::One(id, ref mut v) => if id == key {
                 Some(v)
             } else {
                 None
             },
             PtrMap::Many(ref mut hm) => hm.get_mut(&key)
         }.map(|val| &mut **val)
     }
 
     #[inline]
     pub unsafe fn insert(&self, key: TypeId, val: Box<V>) {
-        let map = &mut *self.0.get();
+        let mut map = &mut *self.0.get();
         match *map {
             PtrMap::Empty => *map = PtrMap::One(key, val),
             PtrMap::One(..) => {
                 let one = mem::replace(map, PtrMap::Empty);
                 match one {
                     PtrMap::One(id, one) => {
                         debug_assert!(id != key);
                         let mut hm = HashMap::with_capacity(2);
--- a/third_party/rust/hyper/src/header/internals/vec_map.rs
+++ b/third_party/rust/hyper/src/header/internals/vec_map.rs
@@ -65,17 +65,17 @@ pub enum Entry<'a, K: 'a, V: 'a> {
 
 pub struct VacantEntry<'a, K: 'a, V: 'a> {
     vec: &'a mut VecMap<K, V>,
     key: K,
 }
 
 impl<'a, K, V> VacantEntry<'a, K, V> {
     pub fn insert(self, val: V) -> &'a mut V {
-        let vec = self.vec;
+        let mut vec = self.vec;
         vec.vec.push((self.key, val));
         let pos = vec.vec.len() - 1;
         &mut vec.vec[pos].1
     }
 }
 
 pub struct OccupiedEntry<'a, K: 'a, V: 'a> {
     vec: &'a mut VecMap<K, V>,
--- a/third_party/rust/hyper/src/header/mod.rs
+++ b/third_party/rust/hyper/src/header/mod.rs
@@ -86,17 +86,16 @@ use std::iter::{FromIterator, IntoIterat
 use std::ops::{Deref, DerefMut};
 use std::{mem, fmt};
 
 use {httparse, traitobject};
 use typeable::Typeable;
 use unicase::UniCase;
 
 use self::internals::{Item, VecMap, Entry};
-use self::sealed::Sealed;
 
 pub use self::shared::*;
 pub use self::common::*;
 
 mod common;
 mod internals;
 mod shared;
 pub mod parsing;
@@ -211,39 +210,25 @@ impl<'a, 'b> fmt::Write for NewlineRepla
         if since < s.len() {
             self.0.write_str(&s[since..])
         } else {
             Ok(())
         }
     }
 }
 
-/// Internal implementation detail.
-///
-/// This trait is automatically implemented for all types that implement
-/// `HeaderFormat + Clone`. No methods are exposed, and so is not useful
-/// outside this crate.
-pub trait HeaderClone: Sealed {}
-impl<T: Sealed> HeaderClone for T {}
-
-mod sealed {
-    use super::HeaderFormat;
+#[doc(hidden)]
+pub trait HeaderClone {
+    fn clone_box(&self) -> Box<HeaderFormat + Send + Sync>;
+}
 
-    #[doc(hidden)]
-    pub trait Sealed {
-        #[doc(hidden)]
-        fn clone_box(&self) -> Box<HeaderFormat + Send + Sync>;
-    }
-
-    #[doc(hidden)]
-    impl<T: HeaderFormat + Clone> Sealed for T {
-        #[inline]
-        fn clone_box(&self) -> Box<HeaderFormat + Send + Sync> {
-            Box::new(self.clone())
-        }
+impl<T: HeaderFormat + Clone> HeaderClone for T {
+    #[inline]
+    fn clone_box(&self) -> Box<HeaderFormat + Send + Sync> {
+        Box::new(self.clone())
     }
 }
 
 impl HeaderFormat + Send + Sync {
     #[inline]
     unsafe fn downcast_ref_unchecked<T: 'static>(&self) -> &T {
         mem::transmute(traitobject::data(self))
     }
@@ -283,17 +268,17 @@ impl Headers {
     }
 
     #[doc(hidden)]
     pub fn from_raw(raw: &[httparse::Header]) -> ::Result<Headers> {
         let mut headers = Headers::new();
         for header in raw {
             trace!("raw header: {:?}={:?}", header.name, &header.value[..]);
             let name = UniCase(CowStr(Cow::Owned(header.name.to_owned())));
-            let item = match headers.data.entry(name) {
+            let mut item = match headers.data.entry(name) {
                 Entry::Vacant(entry) => entry.insert(Item::new_raw(vec![])),
                 Entry::Occupied(entry) => entry.into_mut()
             };
             let trim = header.value.iter().rev().take_while(|&&x| x == b' ').count();
             let value = &header.value[.. header.value.len() - trim];
             item.raw_mut().push(value.to_vec());
         }
         Ok(headers)
@@ -535,34 +520,38 @@ impl<'a> Extend<HeaderView<'a>> for Head
 impl<'a> FromIterator<HeaderView<'a>> for Headers {
     fn from_iter<I: IntoIterator<Item=HeaderView<'a>>>(iter: I) -> Headers {
         let mut headers = Headers::new();
         headers.extend(iter);
         headers
     }
 }
 
-#[deprecated(note="The semantics of formatting a HeaderFormat directly are not clear")]
-impl<'a> fmt::Display for &'a (HeaderFormat + Send + Sync) {
-    #[inline]
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        let mut multi = MultilineFormatter(Multi::Join(true, f));
-        self.fmt_multi_header(&mut multi)
+deprecated! {
+    #[deprecated(note="The semantics of formatting a HeaderFormat directly are not clear")]
+    impl<'a> fmt::Display for &'a (HeaderFormat + Send + Sync) {
+        #[inline]
+        fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+            let mut multi = MultilineFormatter(Multi::Join(true, f));
+            self.fmt_multi_header(&mut multi)
+        }
     }
 }
 
 /// A wrapper around any Header with a Display impl that calls fmt_header.
 ///
 /// This can be used like so: `format!("{}", HeaderFormatter(&header))` to
 /// get the 'value string' representation of this Header.
 ///
 /// Note: This may not necessarily be the value written to stream, such
 /// as with the SetCookie header.
-#[deprecated(note="The semantics of formatting a HeaderFormat directly are not clear")]
-pub struct HeaderFormatter<'a, H: HeaderFormat>(pub &'a H);
+deprecated! {
+    #[deprecated(note="The semantics of formatting a HeaderFormat directly are not clear")]
+    pub struct HeaderFormatter<'a, H: HeaderFormat>(pub &'a H);
+}
 
 #[allow(deprecated)]
 impl<'a, H: HeaderFormat> fmt::Display for HeaderFormatter<'a, H> {
     #[inline]
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         let mut multi = MultilineFormatter(Multi::Join(true, f));
         self.0.fmt_multi_header(&mut multi)
     }
--- a/third_party/rust/hyper/src/http/h1.rs
+++ b/third_party/rust/hyper/src/http/h1.rs
@@ -878,27 +878,25 @@ fn parse<R: Read, T: TryParse<Subject=I>
     loop {
         match try!(try_parse::<R, T, I>(rdr)) {
             httparse::Status::Complete((inc, len)) => {
                 rdr.consume(len);
                 return Ok(inc);
             },
             _partial => ()
         }
-        let n = try!(rdr.read_into_buf());
-        if n == 0 {
-            let buffered = rdr.get_buf().len();
-            if buffered == ::buffer::MAX_BUFFER_SIZE {
-                return Err(Error::TooLarge);
-            } else {
+        match try!(rdr.read_into_buf()) {
+            0 if rdr.get_buf().is_empty() => {
                 return Err(Error::Io(io::Error::new(
-                    io::ErrorKind::UnexpectedEof,
-                    "end of stream before headers finished"
-                )));
-            }
+                    io::ErrorKind::ConnectionAborted,
+                    "Connection closed"
+                )))
+            },
+            0 => return Err(Error::TooLarge),
+            _ => ()
         }
     }
 }
 
 fn try_parse<R: Read, T: TryParse<Subject=I>, I>(rdr: &mut BufReader<R>) -> TryParseResult<I> {
     let mut headers = [httparse::EMPTY_HEADER; MAX_HEADERS];
     let buf = rdr.get_buf();
     if buf.len() == 0 {
@@ -1153,17 +1151,17 @@ mod tests {
     #[test]
     fn test_parse_tcp_closed() {
         use std::io::ErrorKind;
         use error::Error;
 
         let mut empty = MockStream::new();
         let mut buf = BufReader::new(&mut empty);
         match parse_request(&mut buf) {
-            Err(Error::Io(ref e)) if e.kind() == ErrorKind::UnexpectedEof => (),
+            Err(Error::Io(ref e)) if e.kind() == ErrorKind::ConnectionAborted => (),
             other => panic!("unexpected result: {:?}", other)
         }
     }
 
     #[cfg(feature = "nightly")]
     use test::Bencher;
 
     #[cfg(feature = "nightly")]
--- a/third_party/rust/hyper/src/lib.rs
+++ b/third_party/rust/hyper/src/lib.rs
@@ -1,9 +1,9 @@
-#![doc(html_root_url = "https://docs.rs/hyper/v0.10.13")]
+#![doc(html_root_url = "https://hyper.rs/hyper/v0.10.10/hyper")]
 #![cfg_attr(test, deny(missing_docs))]
 #![cfg_attr(test, deny(warnings))]
 #![cfg_attr(all(test, feature = "nightly"), feature(test))]
 
 //! # Hyper
 //!
 //! Hyper is a fast, modern HTTP implementation written in and for Rust. It
 //! is a low-level typesafe abstraction over raw HTTP, providing an elegant
@@ -159,16 +159,31 @@ pub use server::Server;
 pub use language_tags::LanguageTag;
 
 macro_rules! todo(
     ($($arg:tt)*) => (if cfg!(not(ndebug)) {
         trace!("TODO: {:?}", format_args!($($arg)*))
     })
 );
 
+macro_rules! inspect(
+    ($name:expr, $value:expr) => ({
+        let v = $value;
+        trace!("inspect: {:?} = {:?}", $name, v);
+        v
+    })
+);
+
+macro_rules! deprecated {
+    (#[$note:meta] $i:item) => (
+        #[cfg_attr(has_deprecated, $note)]
+        $i
+    );
+}
+
 #[cfg(test)]
 #[macro_use]
 mod mock;
 #[doc(hidden)]
 pub mod buffer;
 pub mod client;
 pub mod error;
 pub mod method;
@@ -180,23 +195,21 @@ pub mod status;
 pub mod uri;
 pub mod version;
 
 /// Re-exporting the mime crate, for convenience.
 pub mod mime {
     pub use mime_crate::*;
 }
 
-
-fn _assert_types() {
-    fn _assert_send<T: Send>() {}
-    fn _assert_sync<T: Sync>() {}
-
+#[allow(unconditional_recursion)]
+fn _assert_send<T: Send>() {
     _assert_send::<Client>();
     _assert_send::<client::Request<net::Fresh>>();
     _assert_send::<client::Response>();
     _assert_send::<error::Error>();
-    _assert_send::<::client::pool::Pool<::net::DefaultConnector>>();
+}
 
+#[allow(unconditional_recursion)]
+fn _assert_sync<T: Sync>() {
     _assert_sync::<Client>();
     _assert_sync::<error::Error>();
-    _assert_sync::<::client::pool::Pool<::net::DefaultConnector>>();
 }
--- a/third_party/rust/hyper/src/mock.rs
+++ b/third_party/rust/hyper/src/mock.rs
@@ -10,17 +10,16 @@ pub struct MockStream {
     pub read: Cursor<Vec<u8>>,
     next_reads: Vec<Vec<u8>>,
     pub write: Vec<u8>,
     pub is_closed: bool,
     pub error_on_write: bool,
     pub error_on_read: bool,
     pub read_timeout: Cell<Option<Duration>>,
     pub write_timeout: Cell<Option<Duration>>,
-    pub id: u64,
 }
 
 impl PartialEq for MockStream {
     fn eq(&self, other: &MockStream) -> bool {
         self.read.get_ref() == other.read.get_ref() && self.write == other.write
     }
 }
 
@@ -38,17 +37,16 @@ impl MockStream {
             read: Cursor::new(responses.remove(0).to_vec()),
             next_reads: responses.into_iter().map(|arr| arr.to_vec()).collect(),
             write: vec![],
             is_closed: false,
             error_on_write: false,
             error_on_read: false,
             read_timeout: Cell::new(None),
             write_timeout: Cell::new(None),
-            id: 0,
         }
     }
 }
 
 impl Read for MockStream {
     fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
         if self.error_on_read {
             Err(io::Error::new(io::ErrorKind::Other, "mock error"))
--- a/third_party/rust/hyper/src/server/listener.rs
+++ b/third_party/rust/hyper/src/server/listener.rs
@@ -44,17 +44,17 @@ where A: NetworkListener + Send + 'stati
       F: Fn(<A as NetworkListener>::Stream) + Send + Sync + 'static {
     thread::spawn(move || {
         let _sentinel = Sentinel::new(supervisor, ());
 
         loop {
             match acceptor.accept() {
                 Ok(stream) => work(stream),
                 Err(e) => {
-                    info!("Connection failed: {}", e);
+                    error!("Connection failed: {}", e);
                 }
             }
         }
     });
 }
 
 struct Sentinel<T: Send + 'static> {
     value: Option<T>,
--- a/third_party/rust/hyper/src/server/mod.rs
+++ b/third_party/rust/hyper/src/server/mod.rs
@@ -157,16 +157,25 @@ impl Default for Timeouts {
     fn default() -> Timeouts {
         Timeouts {
             read: None,
             keep_alive: Some(Duration::from_secs(5))
         }
     }
 }
 
+macro_rules! try_option(
+    ($e:expr) => {{
+        match $e {
+            Some(v) => v,
+            None => return None
+        }
+    }}
+);
+
 impl<L: NetworkListener> Server<L> {
     /// Creates a new server with the provided handler.
     #[inline]
     pub fn new(listener: L) -> Server<L> {
         Server {
             listener: listener,
             timeouts: Timeouts::default()
         }
@@ -257,75 +266,75 @@ struct Worker<H: Handler + 'static> {
 impl<H: Handler + 'static> Worker<H> {
     fn new(handler: H, timeouts: Timeouts) -> Worker<H> {
         Worker {
             handler: handler,
             timeouts: timeouts,
         }
     }
 
-    fn handle_connection<S>(&self, stream: &mut S) where S: NetworkStream + Clone {
+    fn handle_connection<S>(&self, mut stream: &mut S) where S: NetworkStream + Clone {
         debug!("Incoming stream");
 
         self.handler.on_connection_start();
 
         let addr = match stream.peer_addr() {
             Ok(addr) => addr,
             Err(e) => {
-                info!("Peer Name error: {:?}", e);
+                error!("Peer Name error: {:?}", e);
                 return;
             }
         };
 
         // FIXME: Use Type ascription
         let stream_clone: &mut NetworkStream = &mut stream.clone();
         let mut rdr = BufReader::new(stream_clone);
         let mut wrt = BufWriter::new(stream);
 
         while self.keep_alive_loop(&mut rdr, &mut wrt, addr) {
             if let Err(e) = self.set_read_timeout(*rdr.get_ref(), self.timeouts.keep_alive) {
-                info!("set_read_timeout keep_alive {:?}", e);
+                error!("set_read_timeout keep_alive {:?}", e);
                 break;
             }
         }
 
         self.handler.on_connection_end();
 
         debug!("keep_alive loop ending for {}", addr);
     }
 
     fn set_read_timeout(&self, s: &NetworkStream, timeout: Option<Duration>) -> io::Result<()> {
         s.set_read_timeout(timeout)
     }
 
-    fn keep_alive_loop<W: Write>(&self, rdr: &mut BufReader<&mut NetworkStream>,
+    fn keep_alive_loop<W: Write>(&self, mut rdr: &mut BufReader<&mut NetworkStream>,
             wrt: &mut W, addr: SocketAddr) -> bool {
         let req = match Request::new(rdr, addr) {
             Ok(req) => req,
             Err(Error::Io(ref e)) if e.kind() == ErrorKind::ConnectionAborted => {
                 trace!("tcp closed, cancelling keep-alive loop");
                 return false;
             }
             Err(Error::Io(e)) => {
                 debug!("ioerror in keepalive loop = {:?}", e);
                 return false;
             }
             Err(e) => {
                 //TODO: send a 400 response
-                info!("request error = {:?}", e);
+                error!("request error = {:?}", e);
                 return false;
             }
         };
 
         if !self.handle_expect(&req, wrt) {
             return false;
         }
 
         if let Err(e) = req.set_read_timeout(self.timeouts.read) {
-            info!("set_read_timeout {:?}", e);
+            error!("set_read_timeout {:?}", e);
             return false;
         }
 
         let mut keep_alive = self.timeouts.keep_alive.is_some() &&
             http::should_keep_alive(req.version, &req.headers);
         let version = req.version;
         let mut res_headers = Headers::new();
         if !keep_alive {
@@ -348,17 +357,17 @@ impl<H: Handler + 'static> Worker<H> {
     }
 
     fn handle_expect<W: Write>(&self, req: &Request, wrt: &mut W) -> bool {
          if req.version == Http11 && req.headers.get() == Some(&Expect::Continue) {
             let status = self.handler.check_continue((&req.method, &req.uri, &req.headers));
             match write!(wrt, "{} {}\r\n\r\n", Http11, status).and_then(|_| wrt.flush()) {
                 Ok(..) => (),
                 Err(e) => {
-                    info!("error writing 100-continue: {:?}", e);
+                    error!("error writing 100-continue: {:?}", e);
                     return false;
                 }
             }
 
             if status != StatusCode::Continue {
                 debug!("non-100 status ({}) for Expect 100 request", status);
                 return false;
             }
--- a/third_party/rust/hyper/src/server/request.rs
+++ b/third_party/rust/hyper/src/server/request.rs
@@ -29,17 +29,17 @@ pub struct Request<'a, 'b: 'a> {
     pub version: HttpVersion,
     body: HttpReader<&'a mut BufReader<&'b mut NetworkStream>>
 }
 
 
 impl<'a, 'b: 'a> Request<'a, 'b> {
     /// Create a new Request, reading the StartLine and Headers so they are
     /// immediately useful.
-    pub fn new(stream: &'a mut BufReader<&'b mut NetworkStream>, addr: SocketAddr)
+    pub fn new(mut stream: &'a mut BufReader<&'b mut NetworkStream>, addr: SocketAddr)
         -> ::Result<Request<'a, 'b>> {
 
         let Incoming { version, subject: (method, uri), headers } = try!(h1::parse_request(stream));
         debug!("Request Line: {:?} {:?} {:?}", method, uri, version);
         debug!("{:?}", headers);
 
         let body = if headers.has::<ContentLength>() {
             match headers.get::<ContentLength>() {
--- a/third_party/rust/hyper/src/server/response.rs
+++ b/third_party/rust/hyper/src/server/response.rs
@@ -161,17 +161,17 @@ impl<'a> Response<'a, Fresh> {
     /// fn handler(mut res: Response) {
     ///     let body = b"Hello World!";
     ///     res.headers_mut().set(ContentLength(body.len() as u64));
     ///     let mut res = res.start().unwrap();
     ///     res.write_all(body).unwrap();
     /// }
     /// ```
     #[inline]
-    pub fn send(self, body: &[u8]) -> io::Result<()> {
+    pub fn send(mut self, body: &[u8]) -> io::Result<()> {
         self.headers.set(header::ContentLength(body.len() as u64));
         let mut stream = try!(self.start());
         try!(stream.write_all(body));
         stream.end()
     }
 
     /// Consume this Response<Fresh>, writing the Headers and Status and
     /// creating a Response<Streaming>
--- a/third_party/rust/hyper/src/uri.rs
+++ b/third_party/rust/hyper/src/uri.rs
@@ -50,17 +50,17 @@ pub enum RequestUri {
     Star,
 }
 
 impl FromStr for RequestUri {
     type Err = Error;
 
     fn from_str(s: &str) -> Result<RequestUri, Error> {
         let bytes = s.as_bytes();
-        if bytes.is_empty() {
+        if bytes == [] {
             Err(Error::Uri(UrlError::RelativeUrlWithoutBase))
         } else if bytes == b"*" {
             Ok(RequestUri::Star)
         } else if bytes.starts_with(b"/") {
             Ok(RequestUri::AbsolutePath(s.to_owned()))
         } else if bytes.contains(&b'/') {
             Ok(RequestUri::AbsoluteUri(try!(Url::parse(s))))
         } else {
--- a/third_party/rust/hyper/src/version.rs
+++ b/third_party/rust/hyper/src/version.rs
@@ -1,53 +1,31 @@
 //! HTTP Versions enum
 //!
 //! Instead of relying on typo-prone Strings, use expected HTTP versions as
 //! the `HttpVersion` enum.
 use std::fmt;
-use std::str::FromStr;
 
-use error::Error;
 use self::HttpVersion::{Http09, Http10, Http11, Http20};
 
 /// Represents a version of the HTTP spec.
 #[derive(PartialEq, PartialOrd, Copy, Clone, Eq, Ord, Hash, Debug)]
 pub enum HttpVersion {
     /// `HTTP/0.9`
     Http09,
     /// `HTTP/1.0`
     Http10,
     /// `HTTP/1.1`
     Http11,
     /// `HTTP/2.0`
-    Http20,
+    Http20
 }
 
 impl fmt::Display for HttpVersion {
     fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        fmt.write_str(self.as_ref())
-    }
-}
-
-impl AsRef<str> for HttpVersion {
-    fn as_ref(&self) -> &str {
-        match *self {
+        fmt.write_str(match *self {
             Http09 => "HTTP/0.9",
             Http10 => "HTTP/1.0",
             Http11 => "HTTP/1.1",
             Http20 => "HTTP/2.0",
-        }
+        })
     }
 }
-
-impl FromStr for HttpVersion {
-    type Err = Error;
-
-    fn from_str(s: &str) -> Result<Self, Self::Err> {
-        match s {
-            "HTTP/0.9" => Ok(Http09),
-            "HTTP/1.0" => Ok(Http10),
-            "HTTP/1.1" => Ok(Http11),
-            "HTTP/2.0" => Ok(Http20),
-            _ => Err(Error::Version),
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/lazy_static-0.2.8/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".travis.yml":"b6983ce563e5ec756033bfef06e2f2b5f0ac2c1e8eb15803051c1929a328ce30","Cargo.toml":"23508414c154ab5ce9d5fc317a87f118395efc77c1edd9cbe75a08b11e4510c5","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0621878e61f0d0fda054bcbe02df75192c28bde1ecc8289cbd86aeba2dd72720","README.md":"ba1c9a9259f38b2db08a7d1edbfba89716aa23a4d4d0180a70ec74b33034ef05","src/core_lazy.rs":"9ecb52f663255829381bd8f00b295b915ea1beeac94e9db6ade3114b047e74ff","src/lazy.rs":"ddc4fd3c57910d89337705484882d3e5a611afc4e8342948dff901425a759463","src/lib.rs":"b480331f63e3e4a309b7d34c8e7d73a0d53332d30b7de2c56c90400422733634","src/nightly_lazy.rs":"4324572c84b8fbdfc7ddb1a6b3dbda843e95706272fc976ac9565f2875187fed","tests/no_std.rs":"2a5236bd3892a253855b4dc192f63138239165fa23b9c3421a9faa5482c780aa","tests/test.rs":"cfaf50ee913f63b7141a8f5ec537b481cde0a52d29dd900ddb0294f0b8925c93"},"package":"3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/lazy_static-0.2.8/.travis.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-language: rust
-rust:
-- nightly
-- beta
-- stable
-before_script:
-- |
-  pip install 'travis-cargo<0.2' --user &&
-  export PATH=$HOME/.local/bin:$PATH
-script:
-- |
-  travis-cargo build &&
-  travis-cargo test &&
-  travis-cargo bench &&
-  travis-cargo --only nightly build -- --features spin_no_std &&
-  travis-cargo --only nightly test -- --features spin_no_std &&
-  travis-cargo --only nightly bench -- --features spin_no_std &&
-  travis-cargo --only stable doc
-after_success:
-- travis-cargo --only stable doc-upload
-env:
-  global:
-  - TRAVIS_CARGO_NIGHTLY_FEATURE=nightly
-  - secure: YXu24LptjeYirjWYjWGsMT2m3mB7LvQATE6TVo7VEUXv8GYoy2ORIHD83PeImxC93MmZ01QeUezRzuCW51ZcK92VnNSBttlF60SvIX18VsJrV92tsAhievFstqYQ+fB8DIuQ8noU0jPz7GpI+R9dlTRSImAqWOnVIghA+Wzz7Js=
deleted file mode 100644
--- a/third_party/rust/lazy_static-0.2.8/Cargo.toml
+++ /dev/null
@@ -1,21 +0,0 @@
-[package]
-name = "lazy_static"
-# NB: When modifying, also modify html_root_url in lib.rs
-version = "0.2.8"
-authors = ["Marvin Löbel <loebel.marvin@gmail.com>"]
-license = "MIT/Apache-2.0"
-
-description = "A macro for declaring lazily evaluated statics in Rust."
-readme = "README.md"
-documentation = "https://docs.rs/lazy_static"
-
-repository = "https://github.com/rust-lang-nursery/lazy-static.rs"
-keywords = ["macro", "lazy", "static"]
-
-[dependencies.spin]
-version = "0.4"
-optional = true
-
-[features]
-nightly = []
-spin_no_std = ["nightly", "spin"]
deleted file mode 100644
--- a/third_party/rust/lazy_static-0.2.8/LICENSE-APACHE
+++ /dev/null
@@ -1,201 +0,0 @@
-                              Apache License
-                        Version 2.0, January 2004
-                     http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-   "License" shall mean the terms and conditions for use, reproduction,
-   and distribution as defined by Sections 1 through 9 of this document.
-
-   "Licensor" shall mean the copyright owner or entity authorized by
-   the copyright owner that is granting the License.
-
-   "Legal Entity" shall mean the union of the acting entity and all
-   other entities that control, are controlled by, or are under common
-   control with that entity. For the purposes of this definition,
-   "control" means (i) the power, direct or indirect, to cause the
-   direction or management of such entity, whether by contract or
-   otherwise, or (ii) ownership of fifty percent (50%) or more of the
-   outstanding shares, or (iii) beneficial ownership of such entity.
-
-   "You" (or "Your") shall mean an individual or Legal Entity
-   exercising permissions granted by this License.
-
-   "Source" form shall mean the preferred form for making modifications,
-   including but not limited to software source code, documentation
-   source, and configuration files.
-
-   "Object" form shall mean any form resulting from mechanical
-   transformation or translation of a Source form, including but
-   not limited to compiled object code, generated documentation,
-   and conversions to other media types.
-
-   "Work" shall mean the work of authorship, whether in Source or
-   Object form, made available under the License, as indicated by a
-   copyright notice that is included in or attached to the work
-   (an example is provided in the Appendix below).
-
-   "Derivative Works" shall mean any work, whether in Source or Object
-   form, that is based on (or derived from) the Work and for which the
-   editorial revisions, annotations, elaborations, or other modifications
-   represent, as a whole, an original work of authorship. For the purposes
-   of this License, Derivative Works shall not include works that remain
-   separable from, or merely link (or bind by name) to the interfaces of,
-   the Work and Derivative Works thereof.
-
-   "Contribution" shall mean any work of authorship, including
-   the original version of the Work and any modifications or additions
-   to that Work or Derivative Works thereof, that is intentionally
-   submitted to Licensor for inclusion in the Work by the copyright owner
-   or by an individual or Legal Entity authorized to submit on behalf of
-   the copyright owner. For the purposes of this definition, "submitted"
-   means any form of electronic, verbal, or written communication sent
-   to the Licensor or its representatives, including but not limited to
-   communication on electronic mailing lists, source code control systems,
-   and issue tracking systems that are managed by, or on behalf of, the
-   Licensor for the purpose of discussing and improving the Work, but
-   excluding communication that is conspicuously marked or otherwise
-   designated in writing by the copyright owner as "Not a Contribution."
-
-   "Contributor" shall mean Licensor and any individual or Legal Entity
-   on behalf of whom a Contribution has been received by Licensor and
-   subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   copyright license to reproduce, prepare Derivative Works of,
-   publicly display, publicly perform, sublicense, and distribute the
-   Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   (except as stated in this section) patent license to make, have made,
-   use, offer to sell, sell, import, and otherwise transfer the Work,
-   where such license applies only to those patent claims licensable
-   by such Contributor that are necessarily infringed by their
-   Contribution(s) alone or by combination of their Contribution(s)
-   with the Work to which such Contribution(s) was submitted. If You
-   institute patent litigation against any entity (including a
-   cross-claim or counterclaim in a lawsuit) alleging that the Work
-   or a Contribution incorporated within the Work constitutes direct
-   or contributory patent infringement, then any patent licenses
-   granted to You under this License for that Work shall terminate
-   as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
-   Work or Derivative Works thereof in any medium, with or without
-   modifications, and in Source or Object form, provided that You
-   meet the following conditions:
-
-   (a) You must give any other recipients of the Work or
-       Derivative Works a copy of this License; and
-
-   (b) You must cause any modified files to carry prominent notices
-       stating that You changed the files; and
-
-   (c) You must retain, in the Source form of any Derivative Works
-       that You distribute, all copyright, patent, trademark, and
-       attribution notices from the Source form of the Work,
-       excluding those notices that do not pertain to any part of
-       the Derivative Works; and
-
-   (d) If the Work includes a "NOTICE" text file as part of its
-       distribution, then any Derivative Works that You distribute must
-       include a readable copy of the attribution notices contained
-       within such NOTICE file, excluding those notices that do not
-       pertain to any part of the Derivative Works, in at least one
-       of the following places: within a NOTICE text file distributed
-       as part of the Derivative Works; within the Source form or
-       documentation, if provided along with the Derivative Works; or,
-       within a display generated by the Derivative Works, if and
-       wherever such third-party notices normally appear. The contents
-       of the NOTICE file are for informational purposes only and
-       do not modify the License. You may add Your own attribution
-       notices within Derivative Works that You distribute, alongside
-       or as an addendum to the NOTICE text from the Work, provided
-       that such additional attribution notices cannot be construed
-       as modifying the License.
-
-   You may add Your own copyright statement to Your modifications and
-   may provide additional or different license terms and conditions
-   for use, reproduction, or distribution of Your modifications, or
-   for any such Derivative Works as a whole, provided Your use,
-   reproduction, and distribution of the Work otherwise complies with
-   the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
-   any Contribution intentionally submitted for inclusion in the Work
-   by You to the Licensor shall be under the terms and conditions of
-   this License, without any additional terms or conditions.
-   Notwithstanding the above, nothing herein shall supersede or modify
-   the terms of any separate license agreement you may have executed
-   with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
-   names, trademarks, service marks, or product names of the Licensor,
-   except as required for reasonable and customary use in describing the
-   origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
-   agreed to in writing, Licensor provides the Work (and each
-   Contributor provides its Contributions) on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-   implied, including, without limitation, any warranties or conditions
-   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-   PARTICULAR PURPOSE. You are solely responsible for determining the
-   appropriateness of using or redistributing the Work and assume any
-   risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
-   whether in tort (including negligence), contract, or otherwise,
-   unless required by applicable law (such as deliberate and grossly
-   negligent acts) or agreed to in writing, shall any Contributor be
-   liable to You for damages, including any direct, indirect, special,
-   incidental, or consequential damages of any character arising as a
-   result of this License or out of the use or inability to use the
-   Work (including but not limited to damages for loss of goodwill,
-   work stoppage, computer failure or malfunction, or any and all
-   other commercial damages or losses), even if such Contributor
-   has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
-   the Work or Derivative Works thereof, You may choose to offer,
-   and charge a fee for, acceptance of support, warranty, indemnity,
-   or other liability obligations and/or rights consistent with this
-   License. However, in accepting such obligations, You may act only
-   on Your own behalf and on Your sole responsibility, not on behalf
-   of any other Contributor, and only if You agree to indemnify,
-   defend, and hold each Contributor harmless for any liability
-   incurred by, or claims asserted against, such Contributor by reason
-   of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
-   To apply the Apache License to your work, attach the following
-   boilerplate notice, with the fields enclosed by brackets "[]"
-   replaced with your own identifying information. (Don't include
-   the brackets!)  The text should be enclosed in the appropriate
-   comment syntax for the file format. We also recommend that a
-   file or class name and description of purpose be included on the
-   same "printed page" as the copyright notice for easier
-   identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-	http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
deleted file mode 100644
--- a/third_party/rust/lazy_static-0.2.8/LICENSE-MIT
+++ /dev/null
@@ -1,25 +0,0 @@
-Copyright (c) 2010 The Rust Project Developers
-
-Permission is hereby granted, free of charge, to any
-person obtaining a copy of this software and associated
-documentation files (the "Software"), to deal in the
-Software without restriction, including without
-limitation the rights to use, copy, modify, merge,
-publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software
-is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice
-shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
-ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
-TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
deleted file mode 100644
--- a/third_party/rust/lazy_static-0.2.8/README.md
+++ /dev/null
@@ -1,69 +0,0 @@
-lazy-static.rs
-==============
-
-A macro for declaring lazily evaluated statics in Rust.
-
-Using this macro, it is possible to have `static`s that require code to be
-executed at runtime in order to be initialized.
-This includes anything requiring heap allocations, like vectors or hash maps,
-as well as anything that requires non-const function calls to be computed.
-
-[![Travis-CI Status](https://travis-ci.org/rust-lang-nursery/lazy-static.rs.svg?branch=master)](https://travis-ci.org/rust-lang-nursery/lazy-static.rs)
-
-# Getting Started
-
-[lazy-static.rs is available on crates.io](https://crates.io/crates/lazy_static).
-It is recommended to look there for the newest released version, as well as links to the newest builds of the docs.
-
-At the point of the last update of this README, the latest published version could be used like this:
-
-Add the following dependency to your Cargo manifest...
-
-```toml
-[dependencies]
-lazy_static = "0.2"
-```
-
-...and see the [docs](http://rust-lang-nursery.github.io/lazy-static.rs/lazy_static/index.html) for how to use it.
-
-# Example
-
-```rust
-#[macro_use]
-extern crate lazy_static;
-
-use std::collections::HashMap;
-
-lazy_static! {
-    static ref HASHMAP: HashMap<u32, &'static str> = {
-        let mut m = HashMap::new();
-        m.insert(0, "foo");
-        m.insert(1, "bar");
-        m.insert(2, "baz");
-        m
-    };
-}
-
-fn main() {
-    // First access to `HASHMAP` initializes it
-    println!("The entry for `0` is \"{}\".", HASHMAP.get(&0).unwrap());
-
-    // Any further access to `HASHMAP` just returns the computed value
-    println!("The entry for `1` is \"{}\".", HASHMAP.get(&1).unwrap());
-}
-```
-
-## License
-
-Licensed under either of
-
- * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
- * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
-
-at your option.
-
-### Contribution
-
-Unless you explicitly state otherwise, any contribution intentionally submitted
-for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
-additional terms or conditions.
deleted file mode 100644
--- a/third_party/rust/lazy_static-0.2.8/src/core_lazy.rs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2016 lazy-static.rs Developers
-//
-// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
-// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
-// http://opensource.org/licenses/MIT>, at your option. This file may not be
-// copied, modified, or distributed except according to those terms.
-
-extern crate spin;
-
-use self::spin::Once;
-
-pub struct Lazy<T: Sync>(Once<T>);
-
-impl<T: Sync> Lazy<T> {
-    #[inline(always)]
-    pub const fn new() -> Self {
-        Lazy(Once::new())
-    }
-
-    #[inline(always)]
-    pub fn get<F>(&'static self, builder: F) -> &T
-        where F: FnOnce() -> T
-    {
-        self.0.call_once(builder)
-    }
-}
-
-#[macro_export]
-#[allow_internal_unstable]
-#[doc(hidden)]
-macro_rules! __lazy_static_create {
-    ($NAME:ident, $T:ty) => {
-        static $NAME: $crate::lazy::Lazy<$T> = $crate::lazy::Lazy::new();
-    }
-}
deleted file mode 100644
--- a/third_party/rust/lazy_static-0.2.8/src/lazy.rs
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2016 lazy-static.rs Developers
-//
-// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
-// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
-// http://opensource.org/licenses/MIT>, at your option. This file may not be
-// copied, modified, or distributed except according to those terms.
-
-extern crate std;
-
-use self::std::prelude::v1::*;
-use self::std::sync::Once;
-
-pub struct Lazy<T: Sync>(pub *const T, pub Once);
-
-impl<T: Sync> Lazy<T> {
-    #[inline(always)]
-    pub fn get<F>(&'static mut self, f: F) -> &T
-        where F: FnOnce() -> T
-    {
-        unsafe {
-            let r = &mut self.0;
-            self.1.call_once(|| {
-                *r = Box::into_raw(Box::new(f()));
-            });
-
-            &*self.0
-        }
-    }
-}
-
-unsafe impl<T: Sync> Sync for Lazy<T> {}
-
-#[macro_export]
-#[doc(hidden)]
-macro_rules! __lazy_static_create {
-    ($NAME:ident, $T:ty) => {
-        use std::sync::ONCE_INIT;
-        static mut $NAME: $crate::lazy::Lazy<$T> = $crate::lazy::Lazy(0 as *const $T, ONCE_INIT);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/lazy_static-0.2.8/src/lib.rs
+++ /dev/null
@@ -1,218 +0,0 @@
-// Copyright 2016 lazy-static.rs Developers
-//
-// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
-// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
-// http://opensource.org/licenses/MIT>, at your option. This file may not be
-// copied, modified, or distributed except according to those terms.
-
-/*!
-A macro for declaring lazily evaluated statics.
-
-Using this macro, it is possible to have `static`s that require code to be
-executed at runtime in order to be initialized.
-This includes anything requiring heap allocations, like vectors or hash maps,
-as well as anything that requires function calls to be computed.
-
-# Syntax
-
-```ignore
-lazy_static! {
-    [pub] static ref NAME_1: TYPE_1 = EXPR_1;
-    [pub] static ref NAME_2: TYPE_2 = EXPR_2;
-    ...
-    [pub] static ref NAME_N: TYPE_N = EXPR_N;
-}
-```
-
-Attributes (including doc comments) are supported as well:
-
-```rust
-# #[macro_use]
-# extern crate lazy_static;
-# fn main() {
-lazy_static! {
-    /// This is an example for using doc comment attributes
-    static ref EXAMPLE: u8 = 42;
-}
-# }
-```
-
-# Semantics
-
-For a given `static ref NAME: TYPE = EXPR;`, the macro generates a unique type that
-implements `Deref<TYPE>` and stores it in a static with name `NAME`. (Attributes end up
-attaching to this type.)
-
-On first deref, `EXPR` gets evaluated and stored internally, such that all further derefs
-can return a reference to the same object. Note that this can lead to deadlocks
-if you have multiple lazy statics that depend on each other in their initialization.
-
-Apart from the lazy initialization, the resulting "static ref" variables
-have generally the same properties as regular "static" variables:
-
-- Any type in them needs to fulfill the `Sync` trait.
-- If the type has a destructor, then it will not run when the process exits.
-
-# Example
-
-Using the macro:
-
-```rust
-#[macro_use]
-extern crate lazy_static;
-
-use std::collections::HashMap;
-
-lazy_static! {
-    static ref HASHMAP: HashMap<u32, &'static str> = {
-        let mut m = HashMap::new();
-        m.insert(0, "foo");
-        m.insert(1, "bar");
-        m.insert(2, "baz");
-        m
-    };
-    static ref COUNT: usize = HASHMAP.len();
-    static ref NUMBER: u32 = times_two(21);
-}
-
-fn times_two(n: u32) -> u32 { n * 2 }
-
-fn main() {
-    println!("The map has {} entries.", *COUNT);
-    println!("The entry for `0` is \"{}\".", HASHMAP.get(&0).unwrap());
-    println!("A expensive calculation on a static results in: {}.", *NUMBER);
-}
-```
-
-# Implementation details
-
-The `Deref` implementation uses a hidden static variable that is guarded by a atomic check on each access. On stable Rust, the macro may need to allocate each static on the heap.
-
-*/
-
-#![cfg_attr(feature="nightly", feature(const_fn, allow_internal_unstable, core_intrinsics))]
-
-#![doc(html_root_url = "https://docs.rs/lazy_static/0.2.8")]
-#![no_std]
-
-#[cfg(not(feature="nightly"))]
-#[doc(hidden)]
-pub mod lazy;
-
-#[cfg(all(feature="nightly", not(feature="spin_no_std")))]
-#[path="nightly_lazy.rs"]
-#[doc(hidden)]
-pub mod lazy;
-
-#[cfg(all(feature="nightly", feature="spin_no_std"))]
-#[path="core_lazy.rs"]
-#[doc(hidden)]
-pub mod lazy;
-
-#[doc(hidden)]
-pub use core::ops::Deref as __Deref;
-
-#[macro_export]
-#[cfg_attr(feature="nightly", allow_internal_unstable)]
-#[doc(hidden)]
-macro_rules! __lazy_static_internal {
-    ($(#[$attr:meta])* static ref $N:ident : $T:ty = $e:expr; $($t:tt)*) => {
-        __lazy_static_internal!(@PRIV, $(#[$attr])* static ref $N : $T = $e; $($t)*);
-    };
-    ($(#[$attr:meta])* pub static ref $N:ident : $T:ty = $e:expr; $($t:tt)*) => {
-        __lazy_static_internal!(@PUB, $(#[$attr])* static ref $N : $T = $e; $($t)*);
-    };
-    (@$VIS:ident, $(#[$attr:meta])* static ref $N:ident : $T:ty = $e:expr; $($t:tt)*) => {
-        __lazy_static_internal!(@MAKE TY, $VIS, $(#[$attr])*, $N);
-        impl $crate::__Deref for $N {
-            type Target = $T;
-            #[allow(unsafe_code)]
-            fn deref(&self) -> &$T {
-                unsafe {
-                    #[inline(always)]
-                    fn __static_ref_initialize() -> $T { $e }
-
-                    #[inline(always)]
-                    unsafe fn __stability() -> &'static $T {
-                        __lazy_static_create!(LAZY, $T);
-                        LAZY.get(__static_ref_initialize)
-                    }
-                    __stability()
-                }
-            }
-        }
-        impl $crate::LazyStatic for $N {
-            fn initialize(lazy: &Self) {
-                let _ = &**lazy;
-            }
-        }
-        __lazy_static_internal!($($t)*);
-    };
-    (@MAKE TY, PUB, $(#[$attr:meta])*, $N:ident) => {
-        #[allow(missing_copy_implementations)]
-        #[allow(non_camel_case_types)]
-        #[allow(dead_code)]
-        $(#[$attr])*
-        pub struct $N {__private_field: ()}
-        #[doc(hidden)]
-        pub static $N: $N = $N {__private_field: ()};
-    };
-    (@MAKE TY, PRIV, $(#[$attr:meta])*, $N:ident) => {
-        #[allow(missing_copy_implementations)]
-        #[allow(non_camel_case_types)]
-        #[allow(dead_code)]
-        $(#[$attr])*
-        struct $N {__private_field: ()}
-        #[doc(hidden)]
-        static $N: $N = $N {__private_field: ()};
-    };
-    () => ()
-}
-
-#[macro_export]
-#[cfg_attr(feature="nightly", allow_internal_unstable)]
-macro_rules! lazy_static {
-    ($(#[$attr:meta])* static ref $N:ident : $T:ty = $e:expr; $($t:tt)*) => {
-        __lazy_static_internal!(@PRIV, $(#[$attr])* static ref $N : $T = $e; $($t)*);
-    };
-    ($(#[$attr:meta])* pub static ref $N:ident : $T:ty = $e:expr; $($t:tt)*) => {
-        __lazy_static_internal!(@PUB, $(#[$attr])* static ref $N : $T = $e; $($t)*);
-    };
-    () => ()
-}
-
-/// Support trait for enabling a few common operation on lazy static values.
-///
-/// This is implemented by each defined lazy static, and
-/// used by the free functions in this crate.
-pub trait LazyStatic {
-    #[doc(hidden)]
-    fn initialize(lazy: &Self);
-}
-
-/// Takes a shared reference to a lazy static and initializes
-/// it if it has not been already.
-///
-/// This can be used to control the initialization point of a lazy static.
-///
-/// Example:
-///
-/// ```rust
-/// #[macro_use]
-/// extern crate lazy_static;
-///
-/// lazy_static! {
-///     static ref BUFFER: Vec<u8> = (0..65537).collect();
-/// }
-///
-/// fn main() {
-///     lazy_static::initialize(&BUFFER);
-///
-///     // ...
-///     work_with_initialized_data(&BUFFER);
-/// }
-/// # fn work_with_initialized_data(_: &[u8]) {}
-/// ```
-pub fn initialize<T: LazyStatic>(lazy: &T) {
-    LazyStatic::initialize(lazy);
-}
deleted file mode 100644
--- a/third_party/rust/lazy_static-0.2.8/src/nightly_lazy.rs
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright 2016 lazy-static.rs Developers
-//
-// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
-// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
-// http://opensource.org/licenses/MIT>, at your option. This file may not be
-// copied, modified, or distributed except according to those terms.
-
-extern crate std;
-
-use self::std::prelude::v1::*;
-use self::std::cell::UnsafeCell;
-use self::std::sync::{Once, ONCE_INIT};
-
-pub struct Lazy<T: Sync>(UnsafeCell<Option<T>>, Once);
-
-impl<T: Sync> Lazy<T> {
-    #[inline(always)]
-    pub const fn new() -> Self {
-        Lazy(UnsafeCell::new(None), ONCE_INIT)
-    }
-
-    #[inline(always)]
-    pub fn get<F>(&'static self, f: F) -> &T
-        where F: FnOnce() -> T
-    {
-        unsafe {
-            self.1.call_once(|| {
-                *self.0.get() = Some(f());
-            });
-
-            match *self.0.get() {
-                Some(ref x) => x,
-                None => std::intrinsics::unreachable(),
-            }
-        }
-    }
-}
-
-unsafe impl<T: Sync> Sync for Lazy<T> {}
-
-#[macro_export]
-#[allow_internal_unstable]
-#[doc(hidden)]
-macro_rules! __lazy_static_create {
-    ($NAME:ident, $T:ty) => {
-        static $NAME: $crate::lazy::Lazy<$T> = $crate::lazy::Lazy::new();
-    }
-}
deleted file mode 100644
--- a/third_party/rust/lazy_static-0.2.8/tests/no_std.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-#![cfg(feature="spin_no_std")]
-#![feature(const_fn)]
-
-#![no_std]
-
-#[macro_use]
-extern crate lazy_static;
-
-lazy_static! {
-    /// Documentation!
-    pub static ref NUMBER: u32 = times_two(3);
-}
-
-fn times_two(n: u32) -> u32 {
-    n * 2
-}
-
-#[test]
-fn test_basic() {
-    assert_eq!(*NUMBER, 6);
-}
deleted file mode 100644
--- a/third_party/rust/lazy_static-0.2.8/tests/test.rs
+++ /dev/null
@@ -1,158 +0,0 @@
-#![cfg_attr(feature="nightly", feature(const_fn))]
-
-#[macro_use]
-extern crate lazy_static;
-use std::collections::HashMap;
-
-lazy_static! {
-    /// Documentation!
-    pub static ref NUMBER: u32 = times_two(3);
-
-    static ref ARRAY_BOXES: [Box<u32>; 3] = [Box::new(1), Box::new(2), Box::new(3)];
-
-    /// More documentation!
-    #[allow(unused_variables)]
-    #[derive(Copy, Clone, Debug)]
-    pub static ref STRING: String = "hello".to_string();
-
-    static ref HASHMAP: HashMap<u32, &'static str> = {
-        let mut m = HashMap::new();
-        m.insert(0, "abc");
-        m.insert(1, "def");
-        m.insert(2, "ghi");
-        m
-    };
-
-    // This should not compile if the unsafe is removed.
-    static ref UNSAFE: u32 = unsafe {
-        std::mem::transmute::<i32, u32>(-1)
-    };
-
-    // This *should* triggger warn(dead_code) by design.
-    static ref UNUSED: () = ();
-
-}
-
-lazy_static! {
-    static ref S1: &'static str = "a";
-    static ref S2: &'static str = "b";
-}
-lazy_static! {
-    static ref S3: String = [*S1, *S2].join("");
-}
-
-#[test]
-fn s3() {
-    assert_eq!(&*S3, "ab");
-}
-
-fn times_two(n: u32) -> u32 {
-    n * 2
-}
-
-#[test]
-fn test_basic() {
-    assert_eq!(&**STRING, "hello");
-    assert_eq!(*NUMBER, 6);
-    assert!(HASHMAP.get(&1).is_some());
-    assert!(HASHMAP.get(&3).is_none());
-    assert_eq!(&*ARRAY_BOXES, &[Box::new(1), Box::new(2), Box::new(3)]);
-    assert_eq!(*UNSAFE, std::u32::MAX);
-}
-
-#[test]
-fn test_repeat() {
-    assert_eq!(*NUMBER, 6);
-    assert_eq!(*NUMBER, 6);
-    assert_eq!(*NUMBER, 6);
-}
-
-#[test]
-fn test_meta() {
-    // this would not compile if STRING were not marked #[derive(Copy, Clone)]
-    let copy_of_string = STRING;
-    // just to make sure it was copied
-    assert!(&STRING as *const _ != &copy_of_string as *const _);
-
-    // this would not compile if STRING were not marked #[derive(Debug)]
-    assert_eq!(format!("{:?}", STRING), "STRING { __private_field: () }".to_string());
-}
-
-mod visibility {
-    lazy_static! {
-        pub static ref FOO: Box<u32> = Box::new(0);
-        static ref BAR: Box<u32> = Box::new(98);
-    }
-
-    #[test]
-    fn sub_test() {
-        assert_eq!(**FOO, 0);
-        assert_eq!(**BAR, 98);
-    }
-}
-
-#[test]
-fn test_visibility() {
-    assert_eq!(*visibility::FOO, Box::new(0));
-}
-
-// This should not cause a warning about a missing Copy implementation
-lazy_static! {
-    pub static ref VAR: i32 = { 0 };
-}
-
-#[derive(Copy, Clone, Debug, PartialEq)]
-struct X;
-struct Once(X);
-const ONCE_INIT: Once = Once(X);
-static DATA: X = X;
-static ONCE: X = X;
-fn require_sync() -> X { X }
-fn transmute() -> X { X }
-fn __static_ref_initialize() -> X { X }
-fn test(_: Vec<X>) -> X { X }
-
-// All these names should not be shadowed
-lazy_static! {
-    static ref ITEM_NAME_TEST: X = {
-        test(vec![X, Once(X).0, ONCE_INIT.0, DATA, ONCE,
-                  require_sync(), transmute(),
-                  // Except this, which will sadly be shadowed by internals:
-                  // __static_ref_initialize()
-                  ])
-    };
-}
-
-#[test]
-fn item_name_shadowing() {
-    assert_eq!(*ITEM_NAME_TEST, X);
-}
-
-use std::sync::atomic::AtomicBool;
-use std::sync::atomic::ATOMIC_BOOL_INIT;
-use std::sync::atomic::Ordering::SeqCst;
-
-static PRE_INIT_FLAG: AtomicBool = ATOMIC_BOOL_INIT;
-
-lazy_static! {
-    static ref PRE_INIT: () = {
-        PRE_INIT_FLAG.store(true, SeqCst);
-        ()
-    };
-}
-
-#[test]
-fn pre_init() {
-    assert_eq!(PRE_INIT_FLAG.load(SeqCst), false);
-    lazy_static::initialize(&PRE_INIT);
-    assert_eq!(PRE_INIT_FLAG.load(SeqCst), true);
-}
-
-lazy_static! {
-    static ref LIFETIME_NAME: for<'a> fn(&'a u8) = { fn f(_: &u8) {} f };
-}
-
-#[test]
-fn lifetime_name() {
-    let _ = LIFETIME_NAME;
-}
--- a/third_party/rust/lazy_static/.cargo-checksum.json
+++ b/third_party/rust/lazy_static/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".travis.yml":"c4736f91b288af76d37be054444139cbde202ce0694aca5d0fd8d78e75c098fc","Cargo.toml":"931c84434a9ec6a4e98b7fe0287aa795971c1e981d697236544f878036657e94","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0621878e61f0d0fda054bcbe02df75192c28bde1ecc8289cbd86aeba2dd72720","README.md":"c305f498e6d89730d84eaf92e980ba001e259dd40fcb40855947baece2af0895","appveyor.yml":"58b03a74386dac972230381a831b582ec3992aab1256c06f22bc6130784bf3ec","src/core_lazy.rs":"9ecb52f663255829381bd8f00b295b915ea1beeac94e9db6ade3114b047e74ff","src/lazy.rs":"ddc4fd3c57910d89337705484882d3e5a611afc4e8342948dff901425a759463","src/lib.rs":"a3fd642b35c05e44df84a434dcbcc12bbfb78e21fa332f2057701076642a0dac","src/nightly_lazy.rs":"4324572c84b8fbdfc7ddb1a6b3dbda843e95706272fc976ac9565f2875187fed","tests/no_std.rs":"2a5236bd3892a253855b4dc192f63138239165fa23b9c3421a9faa5482c780aa","tests/test.rs":"cfaf50ee913f63b7141a8f5ec537b481cde0a52d29dd900ddb0294f0b8925c93"},"package":"c9e5e58fa1a4c3b915a561a78a22ee0cac6ab97dca2504428bc1cb074375f8d5"}
\ No newline at end of file
+{"files":{".travis.yml":"b6983ce563e5ec756033bfef06e2f2b5f0ac2c1e8eb15803051c1929a328ce30","Cargo.toml":"23508414c154ab5ce9d5fc317a87f118395efc77c1edd9cbe75a08b11e4510c5","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0621878e61f0d0fda054bcbe02df75192c28bde1ecc8289cbd86aeba2dd72720","README.md":"ba1c9a9259f38b2db08a7d1edbfba89716aa23a4d4d0180a70ec74b33034ef05","src/core_lazy.rs":"9ecb52f663255829381bd8f00b295b915ea1beeac94e9db6ade3114b047e74ff","src/lazy.rs":"ddc4fd3c57910d89337705484882d3e5a611afc4e8342948dff901425a759463","src/lib.rs":"b480331f63e3e4a309b7d34c8e7d73a0d53332d30b7de2c56c90400422733634","src/nightly_lazy.rs":"4324572c84b8fbdfc7ddb1a6b3dbda843e95706272fc976ac9565f2875187fed","tests/no_std.rs":"2a5236bd3892a253855b4dc192f63138239165fa23b9c3421a9faa5482c780aa","tests/test.rs":"cfaf50ee913f63b7141a8f5ec537b481cde0a52d29dd900ddb0294f0b8925c93"},"package":"3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf"}
\ No newline at end of file
--- a/third_party/rust/lazy_static/.travis.yml
+++ b/third_party/rust/lazy_static/.travis.yml
@@ -1,27 +1,24 @@
 language: rust
 rust:
 - nightly
 - beta
 - stable
 before_script:
 - |
   pip install 'travis-cargo<0.2' --user &&
-  export PATH=`python -m site --user-base`/bin:$PATH
+  export PATH=$HOME/.local/bin:$PATH
 script:
 - |
   travis-cargo build &&
   travis-cargo test &&
   travis-cargo bench &&
   travis-cargo --only nightly build -- --features spin_no_std &&
   travis-cargo --only nightly test -- --features spin_no_std &&
   travis-cargo --only nightly bench -- --features spin_no_std &&
   travis-cargo --only stable doc
 after_success:
 - travis-cargo --only stable doc-upload
 env:
   global:
   - TRAVIS_CARGO_NIGHTLY_FEATURE=nightly
   - secure: YXu24LptjeYirjWYjWGsMT2m3mB7LvQATE6TVo7VEUXv8GYoy2ORIHD83PeImxC93MmZ01QeUezRzuCW51ZcK92VnNSBttlF60SvIX18VsJrV92tsAhievFstqYQ+fB8DIuQ8noU0jPz7GpI+R9dlTRSImAqWOnVIghA+Wzz7Js=
-os:
-  - linux
-  - osx
--- a/third_party/rust/lazy_static/Cargo.toml
+++ b/third_party/rust/lazy_static/Cargo.toml
@@ -1,35 +1,21 @@
-# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
-#
-# When uploading crates to the registry Cargo will automatically
-# "normalize" Cargo.toml files for maximal compatibility
-# with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g. crates.io) dependencies
-#
-# If you believe there's an error in this file please file an
-# issue against the rust-lang/cargo repository. If you're
-# editing this file be aware that the upstream Cargo.toml
-# will likely look very different (and much more reasonable)
-
 [package]
 name = "lazy_static"
-version = "0.2.9"
+# NB: When modifying, also modify html_root_url in lib.rs
+version = "0.2.8"
 authors = ["Marvin Löbel <loebel.marvin@gmail.com>"]
+license = "MIT/Apache-2.0"
+
 description = "A macro for declaring lazily evaluated statics in Rust."
-documentation = "https://docs.rs/lazy_static"
 readme = "README.md"
+documentation = "https://docs.rs/lazy_static"
+
+repository = "https://github.com/rust-lang-nursery/lazy-static.rs"
 keywords = ["macro", "lazy", "static"]
-categories = ["no-std", "rust-patterns"]
-license = "MIT/Apache-2.0"
-repository = "https://github.com/rust-lang-nursery/lazy-static.rs"
+
 [dependencies.spin]
 version = "0.4"
 optional = true
 
 [features]
+nightly = []
 spin_no_std = ["nightly", "spin"]
-nightly = []
-[badges.appveyor]
-repository = "rust-lang-nursery/lazy-static.rs"
-
-[badges.travis-ci]
-repository = "rust-lang-nursery/lazy-static.rs"
--- a/third_party/rust/lazy_static/README.md
+++ b/third_party/rust/lazy_static/README.md
@@ -19,17 +19,17 @@ At the point of the last update of this 
 
 Add the following dependency to your Cargo manifest...
 
 ```toml
 [dependencies]
 lazy_static = "0.2"
 ```
 
-...and see the [docs](https://docs.rs/lazy_static) for how to use it.
+...and see the [docs](http://rust-lang-nursery.github.io/lazy-static.rs/lazy_static/index.html) for how to use it.
 
 # Example
 
 ```rust
 #[macro_use]
 extern crate lazy_static;
 
 use std::collections::HashMap;
deleted file mode 100644
--- a/third_party/rust/lazy_static/appveyor.yml
+++ /dev/null
@@ -1,51 +0,0 @@
-environment:
-  global:
-    PROJECT_NAME: lazy_static
-  matrix:
-    # Stable channel
-    - TARGET: i686-pc-windows-gnu
-      CHANNEL: stable
-    - TARGET: i686-pc-windows-msvc
-      CHANNEL: stable
-    - TARGET: x86_64-pc-windows-gnu
-      CHANNEL: stable
-    - TARGET: x86_64-pc-windows-msvc
-      CHANNEL: stable
-    # Beta channel
-    - TARGET: i686-pc-windows-gnu
-      CHANNEL: beta
-    - TARGET: i686-pc-windows-msvc
-      CHANNEL: beta
-    - TARGET: x86_64-pc-windows-gnu
-      CHANNEL: beta
-    - TARGET: x86_64-pc-windows-msvc
-      CHANNEL: beta
-    # Nightly channel
-    - TARGET: i686-pc-windows-gnu
-      CHANNEL: nightly
-    - TARGET: i686-pc-windows-msvc
-      CHANNEL: nightly
-    - TARGET: x86_64-pc-windows-gnu
-      CHANNEL: nightly
-    - TARGET: x86_64-pc-windows-msvc
-      CHANNEL: nightly
-
-# Install Rust and Cargo
-# (Based on from https://github.com/rust-lang/libc/blob/master/appveyor.yml)
-install:
-  - ps: Start-FileDownload "https://static.rust-lang.org/dist/channel-rust-stable"
-  - ps: $env:RUST_VERSION = Get-Content channel-rust-stable | select -first 1 | %{$_.split('-')[1]}
-  - if NOT "%CHANNEL%" == "stable" set RUST_VERSION=%CHANNEL%
-  - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-${env:RUST_VERSION}-${env:TARGET}.exe"
-  - rust-%RUST_VERSION%-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
-  - SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin
-  - if "%TARGET%" == "i686-pc-windows-gnu" set PATH=%PATH%;C:\msys64\mingw32\bin
-  - if "%TARGET%" == "x86_64-pc-windows-gnu" set PATH=%PATH%;C:\msys64\mingw64\bin
-  - rustc -V
-  - cargo -V
-
-build: false
-
-test_script:
-  - cargo build --verbose
-  - cargo test
--- a/third_party/rust/lazy_static/src/lib.rs
+++ b/third_party/rust/lazy_static/src/lib.rs
@@ -85,17 +85,17 @@ fn main() {
 ```
 
 # Implementation details
 
 The `Deref` implementation uses a hidden static variable that is guarded by a atomic check on each access. On stable Rust, the macro may need to allocate each static on the heap.
 
 */
 
-#![cfg_attr(feature="nightly", feature(const_fn, allow_internal_unstable, core_intrinsics, const_unsafe_cell_new))]
+#![cfg_attr(feature="nightly", feature(const_fn, allow_internal_unstable, core_intrinsics))]
 
 #![doc(html_root_url = "https://docs.rs/lazy_static/0.2.8")]
 #![no_std]
 
 #[cfg(not(feature="nightly"))]
 #[doc(hidden)]
 pub mod lazy;
 
@@ -114,33 +114,21 @@ pub use core::ops::Deref as __Deref;
 
 #[macro_export]
 #[cfg_attr(feature="nightly", allow_internal_unstable)]
 #[doc(hidden)]
 macro_rules! __lazy_static_internal {
     ($(#[$attr:meta])* static ref $N:ident : $T:ty = $e:expr; $($t:tt)*) => {
         __lazy_static_internal!(@PRIV, $(#[$attr])* static ref $N : $T = $e; $($t)*);
     };
-    ($(#[$attr:meta])* pub(in $pub_in:path) static ref $N:ident : $T:ty = $e:expr; $($t:tt)*) => {
-        __lazy_static_internal!(@PUB_IN, $pub_in, $(#[$attr])* static ref $N : $T = $e; $($t)*);
-    };
     ($(#[$attr:meta])* pub static ref $N:ident : $T:ty = $e:expr; $($t:tt)*) => {
         __lazy_static_internal!(@PUB, $(#[$attr])* static ref $N : $T = $e; $($t)*);
     };
-    (@PUB_IN, $pub_in:path, $(#[$attr:meta])* static ref $N:ident : $T:ty = $e:expr; $($t:tt)*) => {
-        __lazy_static_internal!(@MAKE TY, PUB_IN, $pub_in, $(#[$attr])*, $N);
-        __lazy_static_internal!(@TAIL, $N : $T = $e);
-        __lazy_static_internal!($($t)*);
-    };
     (@$VIS:ident, $(#[$attr:meta])* static ref $N:ident : $T:ty = $e:expr; $($t:tt)*) => {
         __lazy_static_internal!(@MAKE TY, $VIS, $(#[$attr])*, $N);
-        __lazy_static_internal!(@TAIL, $N : $T = $e);
-        __lazy_static_internal!($($t)*);
-    };
-    (@TAIL, $N:ident : $T:ty = $e:expr) => {
         impl $crate::__Deref for $N {
             type Target = $T;
             #[allow(unsafe_code)]
             fn deref(&self) -> &$T {
                 unsafe {
                     #[inline(always)]
                     fn __static_ref_initialize() -> $T { $e }
 
@@ -153,35 +141,27 @@ macro_rules! __lazy_static_internal {
                 }
             }
         }
         impl $crate::LazyStatic for $N {
             fn initialize(lazy: &Self) {
                 let _ = &**lazy;
             }
         }
+        __lazy_static_internal!($($t)*);
     };
     (@MAKE TY, PUB, $(#[$attr:meta])*, $N:ident) => {
         #[allow(missing_copy_implementations)]
         #[allow(non_camel_case_types)]
         #[allow(dead_code)]
         $(#[$attr])*
         pub struct $N {__private_field: ()}
         #[doc(hidden)]
         pub static $N: $N = $N {__private_field: ()};
     };
-    (@MAKE TY, PUB_IN, $pub_in:path, $(#[$attr:meta])*, $N:ident) => {
-        #[allow(missing_copy_implementations)]
-        #[allow(non_camel_case_types)]
-        #[allow(dead_code)]
-        $(#[$attr])*
-        pub(in $pub_in) struct $N {__private_field: ()}
-        #[doc(hidden)]
-        pub(in $pub_in) static $N: $N = $N {__private_field: ()};
-    };
     (@MAKE TY, PRIV, $(#[$attr:meta])*, $N:ident) => {
         #[allow(missing_copy_implementations)]
         #[allow(non_camel_case_types)]
         #[allow(dead_code)]
         $(#[$attr])*
         struct $N {__private_field: ()}
         #[doc(hidden)]
         static $N: $N = $N {__private_field: ()};
@@ -190,19 +170,16 @@ macro_rules! __lazy_static_internal {
 }
 
 #[macro_export]
 #[cfg_attr(feature="nightly", allow_internal_unstable)]
 macro_rules! lazy_static {
     ($(#[$attr:meta])* static ref $N:ident : $T:ty = $e:expr; $($t:tt)*) => {
         __lazy_static_internal!(@PRIV, $(#[$attr])* static ref $N : $T = $e; $($t)*);
     };
-    ($(#[$attr:meta])* pub (in $pub_in:path) static ref $N:ident : $T:ty = $e:expr; $($t:tt)*) => {
-        __lazy_static_internal!(@PUB_IN, $pub_in, $(#[$attr])* static ref $N : $T = $e; $($t)*);
-    };
     ($(#[$attr:meta])* pub static ref $N:ident : $T:ty = $e:expr; $($t:tt)*) => {
         __lazy_static_internal!(@PUB, $(#[$attr])* static ref $N : $T = $e; $($t)*);
     };
     () => ()
 }
 
 /// Support trait for enabling a few common operation on lazy static values.
 ///
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".travis.yml":"85d7a35a85a0653ea7072811fd0ba37cf00df4e0b2bcc3781bfc171220046001","Cargo.toml":"7ea5ce66ef7d756befcc155bdeb4135171920a934ecd384eb9f54359a4ce547a","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"8a9859c60f78d9075e22bc9f85b40e0b0216cccaeb7025c9f464cc33dcddaf5c","appveyor.yml":"483ae27670e061eb91f055699a9ad88255050b7b300f183b8580340407751bb4","ci/README.md":"be804f15e2128e5fd4b160cb0b13cff5f19e7d77b55ec5254aa6fd8731c84f0d","ci/android-accept-licenses.sh":"84ad00815f628005ed22c5d6cd14990ebc97812a7163bd275b2877904eddab53","ci/android-install-ndk.sh":"73c5f21438c024ce1b8c793184447ff9aecd83c87cbde8de580b782842b3563f","ci/android-install-sdk.sh":"891900fe4e4ceb04717b91a253753858270defc6d6401936d08c09801c1de178","ci/android-sysimage.sh":"901415631752827454c827e8c51906ba4260612e4021eda98eb7fff771c7d0e8","ci/docker/aarch64-linux-android/Dockerfile":"68f375c6e0b3716f8c0b6ed217bc6c3631fa2b86c578b983a0bf60d0344efd74","ci/docker/aarch64-unknown-linux-gnu/Dockerfile":"62ca7317439f9c303990e897450a91cd467be05eb75dfc01456d417932ac8672","ci/docker/arm-linux-androideabi/Dockerfile":"1193bf048efbeb9be3c9fac0836dcf6ae07e12cdf09b36b386dd4cbd62abbffa","ci/docker/arm-unknown-linux-gnueabihf/Dockerfile":"e349f7caa463adbde8d6ec4d2b9f7720ed81c77f48d75bbfb78c89751f55c2dc","ci/docker/i686-linux-android/Dockerfile":"7c353aecdf0b21d8584392cc6ea31d455adad769034c3ea09191a1b26a2521e1","ci/docker/i686-unknown-linux-gnu/Dockerfile":"07e9df6ba91025cbec7ae81ade63f8cfb8a54c5e1e5a8f8def0617e17bd59db0","ci/docker/i686-unknown-linux-musl/Dockerfile":"fcaedc90fbb90375186b36b4324bff0a042aae70695be0f2b632e3cf7479eae6","ci/docker/mips-unknown-linux-gnu/Dockerfile":"860299d96ee50ebdbd788e65eb6ba1f561ef66107647bddffcb2567ac350896b","ci/docker/mips-unknown-linux-musl/Dockerfile":"711c43122fa34cee83a69944493213924b0ff1fccd78c7a141cb2b2127526484","ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile":"163776e0fd38f66df7415421202ac29efc7d345a628947434e573c3885594ab5","ci/docker/mipsel-unknown-linux-musl/Dockerfile":"aef213df08da03ab6a723c3e6e5594a0586251950d81482cf53179d8e64e95c7","ci/docker/powerpc-unknown-linux-gnu/Dockerfile":"08b846a338c2ee70100f4e80db812668dc58bfb536c44a95cd1cf004d965186b","ci/docker/powerpc64-unknown-linux-gnu/Dockerfile":"4da285ffd035d16f5da9e3701841eb86049c8cfa417fa81e53da4ef74152eac0","ci/docker/x86_64-linux-android/Dockerfile":"a73a344c60575b8ef78b0178f93285ffa2e2d9aa5eb0d2e86d4bad3cab63276f","ci/docker/x86_64-rumprun-netbsd/Dockerfile":"44c3107fb30380785aaed6ff73fa334017a5bb4e3b5c7d4876154f09023a2b99","ci/docker/x86_64-unknown-freebsd/Dockerfile":"ef0f9f63065218728d2daafaa5ba71b17e4ccc23d72e859e0a7133fc64c0815e","ci/docker/x86_64-unknown-linux-gnu/Dockerfile":"67fabbc8c6ac02376cf9344251ad49ecdac396b71accb572fd1ae65225325bc0","ci/docker/x86_64-unknown-linux-musl/Dockerfile":"f71019fed5204b950843ef5e56144161fda7e27fad68ed0e8bc4353c388c7bcf","ci/docker/x86_64-unknown-openbsd/Dockerfile":"dfa5c23a6cff8c7a9a846668118c71a8406a360801fd3632fb12e8fbda6b7338","ci/dox.sh":"9ea240a4a607036235fd68c01b5d2a59f365768d103d3be774dcf34aa3ff563e","ci/ios/deploy_and_run_on_ios_simulator.rs":"3175066fd7f82390f6226d881e1a1dda9767ea2705656870e0d7774e2731800e","ci/landing-page-footer.html":"b70b3112c2147f5c967e7481061ef38bc2d79a28dd55a16fb916d9c9426da2c4","ci/landing-page-head.html":"ad69663fac7924f27d0209bc519d55838e86edfc4133713a6fd08caadac1b142","ci/run-docker.sh":"655712ba6127eb2efe2c641cf4cf1246f3e485096d72ec57b423e9d2bff6fb73","ci/run-qemu.sh":"bb859421170871ef23a8940c5e150efec0c01b95e32d2ce2d37b79a45d9d346c","ci/run.sh":"48c0318287f02889cb73a55e3e2058e79c556d11797d47a1ed66d7c55d1be12f","ci/style.rs":"60564abc1d5197ed1598426dd0d6ee9939a16d2875b03373538f58843bb616c4","src/dox.rs":"bb9a85519e0d4a8d3bfb81301759b9b938435d79da9ce2918248fb2b0df19638","src/lib.rs":"651696755aed40230cde8a505a2dfef61bea52d6349c9b9343497a5c7158ec92","src/macros.rs":"bd9802772b0e5c8b3c550d1c24307f06c0d1e4ce656b4ae1cf092142bbe5412c","src/redox.rs":"3dd158ba9fbbabe96ce2607e91dbf07b93b37c0427734118702dcb4901fe8964","src/unix/bsd/apple/b32.rs":"110ecff78da0e8d405d861447904da403d8b3f6da1f0f9dc9987633f3f04fe46","src/unix/bsd/apple/b64.rs":"2c51c1c063bfb5076ecf08fbc9371ce9473878d2e046c186eb9433955f6f8ba6","src/unix/bsd/apple/mod.rs":"8e437addefb32336671f46b93a5a8827260163abcf623c0f1613d4d685faca34","src/unix/bsd/freebsdlike/dragonfly/mod.rs":"54b3b30c4cac35ced9197e7267f209b0f168de8a6899ab0cba290c5ae399f0e7","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"c7f46b9ae23fde5a9e245a28ed1380066e67f081323b4d253a18e9da3b97b860","src/unix/bsd/freebsdlike/freebsd/mod.rs":"ba1bd1487b41be91115a21e3968d15e4d877043ba4946cd11ed2be2ee66afc19","src/unix/bsd/freebsdlike/freebsd/x86.rs":"54311d3ebf2bb091ab22361e377e6ef9224aec2ecfe459fbfcedde4932db9c58","src/unix/bsd/freebsdlike/freebsd/x86_64.rs":"c7f46b9ae23fde5a9e245a28ed1380066e67f081323b4d253a18e9da3b97b860","src/unix/bsd/freebsdlike/mod.rs":"6b184872bf7979e5da042399a8aa3a46fff6716301f3d068912a2d6296c6ab94","src/unix/bsd/mod.rs":"c75c328dc62a621ce2a9408cb8764206e365e6f14db1bfe535a23c4728521d97","src/unix/bsd/netbsdlike/mod.rs":"50ca4e29f06669a0ebff72f2f24b2b08ff55478f580b1684e16a0cf6938a6a50","src/unix/bsd/netbsdlike/netbsd/mod.rs":"51f6f2309d59f8fb5dbd6b29ac4aa7ad431f1dddae151aef2db9f66c5f3362b0","src/unix/bsd/netbsdlike/netbsd/other/b32/mod.rs":"bd251a102bed65d5cb3459275f6ec3310fe5803ff4c9651212115548f86256d0","src/unix/bsd/netbsdlike/netbsd/other/b64/mod.rs":"927eeccaf3269d299db4c2a55f8010807bf43dfa894aea6a783215f5d3560baa","src/unix/bsd/netbsdlike/netbsd/other/mod.rs":"4d9f7091af8e166943ac6f42ce85558909e5b6e61325039bff7adfbcf4b90212","src/unix/bsd/netbsdlike/openbsdlike/bitrig.rs":"f8cd05dacd3a3136c58da5a2fbe26f703767823b28e74fe8a2b57a7bd98d6d5c","src/unix/bsd/netbsdlike/openbsdlike/mod.rs":"97a7cdb8824949e6ca7202691bde4e1c46c2cfdeb5f3735a033448b52da1bb59","src/unix/bsd/netbsdlike/openbsdlike/openbsd.rs":"31686679c2df5f11437a338b9281fa0dd4f8d061dcd895d67619992171e115c9","src/unix/bsd/netbsdlike/openbsdlike/other/b32/mod.rs":"bd251a102bed65d5cb3459275f6ec3310fe5803ff4c9651212115548f86256d0","src/unix/bsd/netbsdlike/openbsdlike/other/b64/mod.rs":"927eeccaf3269d299db4c2a55f8010807bf43dfa894aea6a783215f5d3560baa","src/unix/bsd/netbsdlike/openbsdlike/other/mod.rs":"f5d8db6f54efd05520b31b764a6bacbf612e1aebce097d2d5bfaaef3b91f37b5","src/unix/haiku/b32.rs":"bd251a102bed65d5cb3459275f6ec3310fe5803ff4c9651212115548f86256d0","src/unix/haiku/b64.rs":"b422430c550c0ba833c9206d1350861e344e3a2eb33d7d58693efb35044be1cc","src/unix/haiku/mod.rs":"f0daa9910d2beade8be1d67bab652c239e779a27e4be54f93b7bceb7afe45d30","src/unix/mod.rs":"841d523014553865ee35355425da44fe1a31944a991831efc7c046263ad44a89","src/unix/notbsd/android/b32/arm.rs":"d63a234f3a2399bdef1fa13c6a209386cb5ddac04c90f2c6d42badc8235dc49d","src/unix/notbsd/android/b32/mod.rs":"c09b53e42b286a7ec56fb28d0a3e71ec42fecaec39b2015d1d4a3338b172c570","src/unix/notbsd/android/b32/x86.rs":"10e6879dcbf136f0e907337987a0609b357e27e0f24ccb907525fcad881c24c3","src/unix/notbsd/android/b64/aarch64.rs":"d0a25e73f8d02f8412fa9237e41d3f4993b45603a2a8f8d1690bc6624a190d42","src/unix/notbsd/android/b64/mod.rs":"172d704a50d6fb9f67683c7e66ff15b5c9f7b11e7064aa8bd129228ff074393f","src/unix/notbsd/android/b64/x86_64.rs":"a2b048dad18c60ede035645bbfea2ba3dd75197c1ee0d54fb5fcab14d6c35194","src/unix/notbsd/android/mod.rs":"25d09d308f0beb7925a3efdf1fae8412251ea04f595f6852e52114df51b6747e","src/unix/notbsd/linux/mips/mips32.rs":"003b4e204e13380cd7f1ce783a0eded0f520f4e7d25634738e8ee50fc09b07c9","src/unix/notbsd/linux/mips/mips64.rs":"a8d3e38e9f9359233db04c66d7a8de957530ad2b8596661d3ac25ea81ee44a78","src/unix/notbsd/linux/mips/mod.rs":"7157a427fabff6e970288c75cb246981e316f76f3c2bb59b254d613a8389f859","src/unix/notbsd/linux/mod.rs":"c200ff5e7c7ad5d0b4c01531384acd408057665cb49175fba0d453b08c166bcf","src/unix/notbsd/linux/musl/b32/arm.rs":"d43ba5c528926261b1ccd529ab55636254360a084ab84a7ec22a4eb5afddb8f8","src/unix/notbsd/linux/musl/b32/asmjs.rs":"085e410f990312de76f74cb9bbf9fcc27d686e94334143b34511f565d1b8bb91","src/unix/notbsd/linux/musl/b32/mips.rs":"941c88bc413ba2b87eb6a6cfe03355ee148b865f39598456965b3d04b3adbbe6","src/unix/notbsd/linux/musl/b32/mod.rs":"fc7e055edbe6fa170c2bda6b3415066c1871b3e60ebb70a6329d008f77100f0b","src/unix/notbsd/linux/musl/b32/x86.rs":"ffa5781b52a7d2774a34b1e3e2034a498b919fd96eb85e88098dba2e674a3797","src/unix/notbsd/linux/musl/b64/aarch64.rs":"4009c7eaf703472daef2a70bdac910d9fc395a33689ef2e8cf1c4e692445d3f0","src/unix/notbsd/linux/musl/b64/mod.rs":"d9b03a59a54a568b07ffa4380103a926cbb45dbfd87745edef79cd971ef31283","src/unix/notbsd/linux/musl/b64/powerpc64.rs":"dc28f5b7284235d6cf5519053cac59a1c16dc39223b71cca0871e4880755f852","src/unix/notbsd/linux/musl/b64/x86_64.rs":"43291acc0dfc92c2fec8ba6ce77ee9ca3c20bcdccec18e149f95ba911cee704b","src/unix/notbsd/linux/musl/mod.rs":"0bd97702f5c84181c53f45466fb04afb9441f6950580b6ad59257e5c73089796","src/unix/notbsd/linux/other/b32/arm.rs":"d373022fd152341ec8f5d106937c7898dd68fb4c0346bd94a37526542a605e9a","src/unix/notbsd/linux/other/b32/mod.rs":"6122be151c5d85b9df6a3aaefc5cafd0657b371cafa9cb31ed9b1a394976af45","src/unix/notbsd/linux/other/b32/powerpc.rs":"cc85e75675abc37414fc7701dda7c3f6396e7b2d3c52eea7febdc41f7b033ea9","src/unix/notbsd/linux/other/b32/x86.rs":"5a6c789355da5abf64c2a0c867d2dfd4f72f004d0bd6c476fd34172b340ea1c3","src/unix/notbsd/linux/other/b64/aarch64.rs":"ce342b37a4a60c216625c8e177a50b3f328bdfd5c527e32e06c73f4aa5926829","src/unix/notbsd/linux/other/b64/mod.rs":"bee90e8d9217ee344d0e99fd483766a1b28e8b1ded930d44a0400a5e5224bb6a","src/unix/notbsd/linux/other/b64/powerpc64.rs":"fc7131f39a75a9e35d474d70b0bc829c52590dadf472ae5785972a94ffb95f12","src/unix/notbsd/linux/other/b64/sparc64.rs":"0ba7f399349bc586ebb73d0caef5c67f195c9e3a942eabfb2efd133b4cea9872","src/unix/notbsd/linux/other/b64/x86_64.rs":"bf17645b237d8059da5e9cc0f6d2d56bc665b0946a6deb8aedf46e5b44578fa6","src/unix/notbsd/linux/other/mod.rs":"46b060787a60493e71406be35b77c24048cdc54326b65c9961fbb1fb9d354de3","src/unix/notbsd/linux/s390x.rs":"2dec96036cadd8354cd56ef8dd7018e75ae92326ec7b5963bc9cdbba0c7d694b","src/unix/notbsd/mod.rs":"bb4550e749328a3aebc450a1684c136821babc3fc161093eecb231f3998cfe8c","src/unix/solaris/mod.rs":"ba70c4ebd371f2580c1fb8f3f6cd32a391ec017e1eed9812137caa94e5149a03","src/unix/uclibc/mips/mips32.rs":"31b23e466cffb86116421ec9240b86e7419aacd84b0b1b04d23c7142c8717566","src/unix/uclibc/mips/mips64.rs":"e67eec1636a998b047d89a4cda1c99cb6bc3071db017762675179a68201c4438","src/unix/uclibc/mips/mod.rs":"74817a9b1ee3998d8e0b751a555d57225f70fd979c283c94ada344a162a8b856","src/unix/uclibc/mod.rs":"3cef4087b743e5af239a8c699c2eeaeda4e19bb57a3683736c8bd87dc71e0a2d","src/unix/uclibc/x86_64/mod.rs":"98e6685519372f7b247e3bb0008ed2ee8d94fd7cca0ed2f0b9336485c734d8a9","src/windows.rs":"acccbd341e81206cb1dc66af41762c193ac0dd719d700b64f7e26c967ee7d670"},"package":"38f5c2b18a287cf78b4097db62e20f43cace381dc76ae5c0a3073067f78b7ddc"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/.travis.yml
+++ /dev/null
@@ -1,136 +0,0 @@
-language: rust
-sudo: required
-dist: trusty
-services:
-  - docker
-install:
-  - if [ -z "$NO_ADD" ]; then rustup target add $TARGET; fi
-script:
-  - cargo build
-  - cargo build --no-default-features
-  - cargo generate-lockfile --manifest-path libc-test/Cargo.toml
-  - if [[ $TRAVIS_OS_NAME = "linux" ]]; then
-      sh ci/run-docker.sh $TARGET;
-    else
-      export CARGO_TARGET_DIR=`pwd`/target;
-      sh ci/run.sh $TARGET;
-    fi
-  - rustc ci/style.rs && ./style src
-env:
-  global:
-    secure: "e2/3QjgRN9atOuSHp22TrYG7QVKcYUWY48Hi9b60w+r1+BhPkTseIJLte7WefRhdXtqpjjUJTooKDhnurFOeHaCT+nmBgiv+FPU893sBl4bhesY4m0vgUJVbNZcs6lTImYekWVb+aqjGdgV/XAgCw7c3kPmrZV0MzGDWL64Xaps="
-matrix:
-  include:
-    # 1.0.0 compat
-    - os: linux
-      env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
-      rust: 1.0.0
-      script: cargo build
-      install:
-
-    # build documentation
-    - os: linux
-      env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
-      rust: nightly
-      script: sh ci/dox.sh
-
-    # stable compat
-    - os: linux
-      env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
-      rust: stable
-    - os: linux
-      env: TARGET=i686-unknown-linux-gnu
-      rust: stable
-    - os: osx
-      env: TARGET=x86_64-apple-darwin NO_ADD=1
-      rust: stable
-    - os: osx
-      env: TARGET=i686-apple-darwin
-      rust: stable
-    - os: linux
-      env: TARGET=arm-linux-androideabi
-      rust: stable
-    - os: linux
-      env: TARGET=aarch64-linux-android
-      rust: stable
-    - os: linux
-      env: TARGET=i686-linux-android
-      rust: stable
-    # as of 2017/05/03 x86_64-linux-android are not on stable
-    - os: linux
-      env: TARGET=x86_64-linux-android
-      rust: beta
-    - os: linux
-      env: TARGET=x86_64-unknown-linux-musl
-      rust: stable
-    - os: linux
-      env: TARGET=i686-unknown-linux-musl
-      rust: stable
-    - os: linux
-      env: TARGET=arm-unknown-linux-gnueabihf
-      rust: stable
-    - os: linux
-      env: TARGET=aarch64-unknown-linux-gnu
-      rust: stable
-    - os: osx
-      osx_image: xcode8.2
-      env: TARGET=i386-apple-ios
-      rust: stable
-    - os: osx
-      osx_image: xcode8.2
-      env: TARGET=x86_64-apple-ios
-      rust: stable
-    - os: linux
-      env: TARGET=x86_64-rumprun-netbsd
-      rust: stable
-    - os: linux
-      env: TARGET=powerpc-unknown-linux-gnu
-      rust: stable
-    - os: linux
-      env: TARGET=powerpc64-unknown-linux-gnu
-      rust: beta
-    - os: linux
-      env: TARGET=mips-unknown-linux-musl
-      rust: stable
-    - os: linux
-      env: TARGET=mipsel-unknown-linux-musl
-      rust: stable
-    - os: linux
-      env: TARGET=mips64-unknown-linux-gnuabi64
-      rust: beta
-    - os: linux
-      env: TARGET=mips-unknown-linux-gnu
-      rust: beta
-
-    # beta
-    - os: linux
-      env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
-      rust: beta
-    - os: osx
-      env: TARGET=x86_64-apple-darwin NO_ADD=1
-      rust: beta
-
-    # nightly
-    - os: linux
-      env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
-      rust: nightly
-    - os: osx
-      env: TARGET=x86_64-apple-darwin NO_ADD=1
-      rust: nightly
-
-    # QEMU based targets that compile in an emulator
-    - os: linux
-      env: TARGET=x86_64-unknown-freebsd
-      rust: stable
-    - os: linux
-      env: TARGET=x86_64-unknown-openbsd QEMU=openbsd.qcow2
-      rust: stable
-      script: sh ci/run-docker.sh $TARGET
-      install:
-
-cache: cargo
-
-notifications:
-  email:
-    on_success: never
-  webhooks: https://buildbot.rust-lang.org/homu/travis
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/Cargo.toml
+++ /dev/null
@@ -1,21 +0,0 @@
-[package]
-
-name = "libc"
-version = "0.2.24"
-authors = ["The Rust Project Developers"]
-license = "MIT/Apache-2.0"
-readme = "README.md"
-repository = "https://github.com/rust-lang/libc"
-homepage = "https://github.com/rust-lang/libc"
-documentation = "http://doc.rust-lang.org/libc"
-description = """
-A library for types and bindings to native C functions often found in libc or
-other common platform libraries.
-"""
-
-[features]
-default = ["use_std"]
-use_std = []
-
-[workspace]
-members = ["libc-test", "libc-test/generate-files"]
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/LICENSE-APACHE
+++ /dev/null
@@ -1,201 +0,0 @@
-                              Apache License
-                        Version 2.0, January 2004
-                     http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-   "License" shall mean the terms and conditions for use, reproduction,
-   and distribution as defined by Sections 1 through 9 of this document.
-
-   "Licensor" shall mean the copyright owner or entity authorized by
-   the copyright owner that is granting the License.
-
-   "Legal Entity" shall mean the union of the acting entity and all
-   other entities that control, are controlled by, or are under common
-   control with that entity. For the purposes of this definition,
-   "control" means (i) the power, direct or indirect, to cause the
-   direction or management of such entity, whether by contract or
-   otherwise, or (ii) ownership of fifty percent (50%) or more of the
-   outstanding shares, or (iii) beneficial ownership of such entity.
-
-   "You" (or "Your") shall mean an individual or Legal Entity
-   exercising permissions granted by this License.
-
-   "Source" form shall mean the preferred form for making modifications,
-   including but not limited to software source code, documentation
-   source, and configuration files.
-
-   "Object" form shall mean any form resulting from mechanical
-   transformation or translation of a Source form, including but
-   not limited to compiled object code, generated documentation,
-   and conversions to other media types.
-
-   "Work" shall mean the work of authorship, whether in Source or
-   Object form, made available under the License, as indicated by a
-   copyright notice that is included in or attached to the work
-   (an example is provided in the Appendix below).
-
-   "Derivative Works" shall mean any work, whether in Source or Object
-   form, that is based on (or derived from) the Work and for which the
-   editorial revisions, annotations, elaborations, or other modifications
-   represent, as a whole, an original work of authorship. For the purposes
-   of this License, Derivative Works shall not include works that remain
-   separable from, or merely link (or bind by name) to the interfaces of,
-   the Work and Derivative Works thereof.
-
-   "Contribution" shall mean any work of authorship, including
-   the original version of the Work and any modifications or additions
-   to that Work or Derivative Works thereof, that is intentionally
-   submitted to Licensor for inclusion in the Work by the copyright owner
-   or by an individual or Legal Entity authorized to submit on behalf of
-   the copyright owner. For the purposes of this definition, "submitted"
-   means any form of electronic, verbal, or written communication sent
-   to the Licensor or its representatives, including but not limited to
-   communication on electronic mailing lists, source code control systems,
-   and issue tracking systems that are managed by, or on behalf of, the
-   Licensor for the purpose of discussing and improving the Work, but
-   excluding communication that is conspicuously marked or otherwise
-   designated in writing by the copyright owner as "Not a Contribution."
-
-   "Contributor" shall mean Licensor and any individual or Legal Entity
-   on behalf of whom a Contribution has been received by Licensor and
-   subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   copyright license to reproduce, prepare Derivative Works of,
-   publicly display, publicly perform, sublicense, and distribute the
-   Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   (except as stated in this section) patent license to make, have made,
-   use, offer to sell, sell, import, and otherwise transfer the Work,
-   where such license applies only to those patent claims licensable
-   by such Contributor that are necessarily infringed by their
-   Contribution(s) alone or by combination of their Contribution(s)
-   with the Work to which such Contribution(s) was submitted. If You
-   institute patent litigation against any entity (including a
-   cross-claim or counterclaim in a lawsuit) alleging that the Work
-   or a Contribution incorporated within the Work constitutes direct
-   or contributory patent infringement, then any patent licenses
-   granted to You under this License for that Work shall terminate
-   as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
-   Work or Derivative Works thereof in any medium, with or without
-   modifications, and in Source or Object form, provided that You
-   meet the following conditions:
-
-   (a) You must give any other recipients of the Work or
-       Derivative Works a copy of this License; and
-
-   (b) You must cause any modified files to carry prominent notices
-       stating that You changed the files; and
-
-   (c) You must retain, in the Source form of any Derivative Works
-       that You distribute, all copyright, patent, trademark, and
-       attribution notices from the Source form of the Work,
-       excluding those notices that do not pertain to any part of
-       the Derivative Works; and
-
-   (d) If the Work includes a "NOTICE" text file as part of its
-       distribution, then any Derivative Works that You distribute must
-       include a readable copy of the attribution notices contained
-       within such NOTICE file, excluding those notices that do not
-       pertain to any part of the Derivative Works, in at least one
-       of the following places: within a NOTICE text file distributed
-       as part of the Derivative Works; within the Source form or
-       documentation, if provided along with the Derivative Works; or,
-       within a display generated by the Derivative Works, if and
-       wherever such third-party notices normally appear. The contents
-       of the NOTICE file are for informational purposes only and
-       do not modify the License. You may add Your own attribution
-       notices within Derivative Works that You distribute, alongside
-       or as an addendum to the NOTICE text from the Work, provided
-       that such additional attribution notices cannot be construed
-       as modifying the License.
-
-   You may add Your own copyright statement to Your modifications and
-   may provide additional or different license terms and conditions
-   for use, reproduction, or distribution of Your modifications, or
-   for any such Derivative Works as a whole, provided Your use,
-   reproduction, and distribution of the Work otherwise complies with
-   the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
-   any Contribution intentionally submitted for inclusion in the Work
-   by You to the Licensor shall be under the terms and conditions of
-   this License, without any additional terms or conditions.
-   Notwithstanding the above, nothing herein shall supersede or modify
-   the terms of any separate license agreement you may have executed
-   with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
-   names, trademarks, service marks, or product names of the Licensor,
-   except as required for reasonable and customary use in describing the
-   origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
-   agreed to in writing, Licensor provides the Work (and each
-   Contributor provides its Contributions) on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-   implied, including, without limitation, any warranties or conditions
-   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-   PARTICULAR PURPOSE. You are solely responsible for determining the
-   appropriateness of using or redistributing the Work and assume any
-   risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
-   whether in tort (including negligence), contract, or otherwise,
-   unless required by applicable law (such as deliberate and grossly
-   negligent acts) or agreed to in writing, shall any Contributor be
-   liable to You for damages, including any direct, indirect, special,
-   incidental, or consequential damages of any character arising as a
-   result of this License or out of the use or inability to use the
-   Work (including but not limited to damages for loss of goodwill,
-   work stoppage, computer failure or malfunction, or any and all
-   other commercial damages or losses), even if such Contributor
-   has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
-   the Work or Derivative Works thereof, You may choose to offer,
-   and charge a fee for, acceptance of support, warranty, indemnity,
-   or other liability obligations and/or rights consistent with this
-   License. However, in accepting such obligations, You may act only
-   on Your own behalf and on Your sole responsibility, not on behalf
-   of any other Contributor, and only if You agree to indemnify,
-   defend, and hold each Contributor harmless for any liability
-   incurred by, or claims asserted against, such Contributor by reason
-   of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
-   To apply the Apache License to your work, attach the following
-   boilerplate notice, with the fields enclosed by brackets "[]"
-   replaced with your own identifying information. (Don't include
-   the brackets!)  The text should be enclosed in the appropriate
-   comment syntax for the file format. We also recommend that a
-   file or class name and description of purpose be included on the
-   same "printed page" as the copyright notice for easier
-   identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-	http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/LICENSE-MIT
+++ /dev/null
@@ -1,25 +0,0 @@
-Copyright (c) 2014 The Rust Project Developers
-
-Permission is hereby granted, free of charge, to any
-person obtaining a copy of this software and associated
-documentation files (the "Software"), to deal in the
-Software without restriction, including without
-limitation the rights to use, copy, modify, merge,
-publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software
-is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice
-shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
-ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
-TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/README.md
+++ /dev/null
@@ -1,156 +0,0 @@
-libc
-====
-
-A Rust library with native bindings to the types and functions commonly found on
-various systems, including libc.
-
-[![Build Status](https://travis-ci.org/rust-lang/libc.svg?branch=master)](https://travis-ci.org/rust-lang/libc)
-[![Build status](https://ci.appveyor.com/api/projects/status/github/rust-lang/libc?svg=true)](https://ci.appveyor.com/project/rust-lang-libs/libc)
-
-[Documentation](#platforms-and-documentation)
-
-## Usage
-
-First, add the following to your `Cargo.toml`:
-
-```toml
-[dependencies]
-libc = "0.2"
-```
-
-Next, add this to your crate root:
-
-```rust
-extern crate libc;
-```
-
-Currently libc by default links to the standard library, but if you would
-instead like to use libc in a `#![no_std]` situation or crate you can request
-this via:
-
-```toml
-[dependencies]
-libc = { version = "0.2", default-features = false }
-```
-
-## What is libc?
-
-The primary purpose of this crate is to provide all of the definitions necessary
-to easily interoperate with C code (or "C-like" code) on each of the platforms
-that Rust supports. This includes type definitions (e.g. `c_int`), constants
-(e.g. `EINVAL`) as well as function headers (e.g. `malloc`).
-
-This crate does not strive to have any form of compatibility across platforms,
-but rather it is simply a straight binding to the system libraries on the
-platform in question.
-
-## Public API
-
-This crate exports all underlying platform types, functions, and constants under
-the crate root, so all items are accessible as `libc::foo`. The types and values
-of all the exported APIs match the platform that libc is compiled for.
-
-More detailed information about the design of this library can be found in its
-[associated RFC][rfc].
-
-[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1291-promote-libc.md
-
-## Adding an API
-
-Want to use an API which currently isn't bound in `libc`? It's quite easy to add
-one!
-
-The internal structure of this crate is designed to minimize the number of
-`#[cfg]` attributes in order to easily be able to add new items which apply
-to all platforms in the future. As a result, the crate is organized
-hierarchically based on platform. Each module has a number of `#[cfg]`'d
-children, but only one is ever actually compiled. Each module then reexports all
-the contents of its children.
-
-This means that for each platform that libc supports, the path from a
-leaf module to the root will contain all bindings for the platform in question.
-Consequently, this indicates where an API should be added! Adding an API at a
-particular level in the hierarchy means that it is supported on all the child
-platforms of that level. For example, when adding a Unix API it should be added
-to `src/unix/mod.rs`, but when adding a Linux-only API it should be added to
-`src/unix/notbsd/linux/mod.rs`.
-
-If you're not 100% sure at what level of the hierarchy an API should be added
-at, fear not! This crate has CI support which tests any binding against all
-platforms supported, so you'll see failures if an API is added at the wrong
-level or has different signatures across platforms.
-
-With that in mind, the steps for adding a new API are:
-
-1. Determine where in the module hierarchy your API should be added.
-2. Add the API.
-3. Send a PR to this repo.
-4. Wait for CI to pass, fixing errors.
-5. Wait for a merge!
-
-### Test before you commit
-
-We have two automated tests running on [Travis](https://travis-ci.org/rust-lang/libc):
-
-1. [`libc-test`](https://github.com/alexcrichton/ctest)
-  - `cd libc-test && cargo run`
-  - Use the `skip_*()` functions in `build.rs` if you really need a workaround.
-2. Style checker
-  - `rustc ci/style.rs && ./style src`
-
-### Releasing your change to crates.io
-
-Now that you've done the amazing job of landing your new API or your new
-platform in this crate, the next step is to get that sweet, sweet usage from
-crates.io! The only next step is to bump the version of libc and then publish
-it. If you'd like to get a release out ASAP you can follow these steps:
-
-1. Update the version number in `Cargo.toml`, you'll just be bumping the patch
-   version number.
-2. Run `cargo update` to regenerate the lockfile to encode your version bump in
-   the lock file. You may pull in some other updated dependencies, that's ok.
-3. Send a PR to this repository. It should [look like this][example], but it'd
-   also be nice to fill out the description with a small rationale for the
-   release (any rationale is ok though!)
-4. Once merged the release will be tagged and published by one of the libc crate
-   maintainers.
-
-[example]: https://github.com/rust-lang/libc/pull/583
-
-## Platforms and Documentation
-
-The following platforms are currently tested and have documentation available:
-
-Tested:
-  * [`i686-pc-windows-msvc`](https://doc.rust-lang.org/libc/i686-pc-windows-msvc/libc/)
-  * [`x86_64-pc-windows-msvc`](https://doc.rust-lang.org/libc/x86_64-pc-windows-msvc/libc/)
-    (Windows)
-  * [`i686-pc-windows-gnu`](https://doc.rust-lang.org/libc/i686-pc-windows-gnu/libc/)
-  * [`x86_64-pc-windows-gnu`](https://doc.rust-lang.org/libc/x86_64-pc-windows-gnu/libc/)
-  * [`i686-apple-darwin`](https://doc.rust-lang.org/libc/i686-apple-darwin/libc/)
-  * [`x86_64-apple-darwin`](https://doc.rust-lang.org/libc/x86_64-apple-darwin/libc/)
-    (OSX)
-  * `i386-apple-ios`
-  * `x86_64-apple-ios`
-  * [`i686-unknown-linux-gnu`](https://doc.rust-lang.org/libc/i686-unknown-linux-gnu/libc/)
-  * [`x86_64-unknown-linux-gnu`](https://doc.rust-lang.org/libc/x86_64-unknown-linux-gnu/libc/)
-    (Linux)
-  * [`x86_64-unknown-linux-musl`](https://doc.rust-lang.org/libc/x86_64-unknown-linux-musl/libc/)
-    (Linux MUSL)
-  * [`aarch64-unknown-linux-gnu`](https://doc.rust-lang.org/libc/aarch64-unknown-linux-gnu/libc/)
-  * [`mips-unknown-linux-gnu`](https://doc.rust-lang.org/libc/mips-unknown-linux-gnu/libc/)
-  * [`arm-unknown-linux-gnueabihf`](https://doc.rust-lang.org/libc/arm-unknown-linux-gnueabihf/libc/)
-  * [`arm-linux-androideabi`](https://doc.rust-lang.org/libc/arm-linux-androideabi/libc/)
-    (Android)
-  * [`x86_64-unknown-freebsd`](https://doc.rust-lang.org/libc/x86_64-unknown-freebsd/libc/)
-  * [`x86_64-unknown-openbsd`](https://doc.rust-lang.org/libc/x86_64-unknown-openbsd/libc/)
-  * [`x86_64-rumprun-netbsd`](https://doc.rust-lang.org/libc/x86_64-unknown-netbsd/libc/)
-
-The following may be supported, but are not guaranteed to always work:
-
-  * `i686-unknown-freebsd`
-  * [`x86_64-unknown-bitrig`](https://doc.rust-lang.org/libc/x86_64-unknown-bitrig/libc/)
-  * [`x86_64-unknown-dragonfly`](https://doc.rust-lang.org/libc/x86_64-unknown-dragonfly/libc/)
-  * `i686-unknown-haiku`
-  * `x86_64-unknown-haiku`
-  * [`x86_64-unknown-netbsd`](https://doc.rust-lang.org/libc/x86_64-unknown-netbsd/libc/)
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/appveyor.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-environment:
-  matrix:
-  - TARGET: x86_64-pc-windows-gnu
-    MSYS2_BITS: 64
-  - TARGET: i686-pc-windows-gnu
-    MSYS2_BITS: 32
-  - TARGET: x86_64-pc-windows-msvc
-  - TARGET: i686-pc-windows-msvc
-install:
-  - appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
-  - rustup-init.exe -y --default-host %TARGET%
-  - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
-  - if defined MSYS2_BITS set PATH=%PATH%;C:\msys64\mingw%MSYS2_BITS%\bin
-  - rustc -V
-  - cargo -V
-
-build: false
-
-test_script:
-  - cargo test --target %TARGET%
-  - cargo run --manifest-path libc-test/Cargo.toml --target %TARGET%
-
-cache:
-  - target
-  - C:\Users\appveyor\.cargo\registry
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/README.md
+++ /dev/null
@@ -1,203 +0,0 @@
-The goal of the libc crate is to have CI running everywhere to have the
-strongest guarantees about the definitions that this library contains, and as a
-result the CI is pretty complicated and also pretty large! Hopefully this can
-serve as a guide through the sea of scripts in this directory and elsewhere in
-this project.
-
-# Files
-
-First up, let's talk about the files in this directory:
-
-* `run-travis.sh` - a shell script run by all Travis builders, this is
-  responsible for setting up the rest of the environment such as installing new
-  packages, downloading Rust target libraries, etc.
-
-* `run.sh` - the actual script which runs tests for a particular architecture.
-  Called from the `run-travis.sh` script this will run all tests for the target
-  specified.
-
-* `cargo-config` - Cargo configuration of linkers to use copied into place by
-  the `run-travis.sh` script before builds are run.
-
-* `dox.sh` - script called from `run-travis.sh` on only the linux 64-bit nightly
-  Travis bots to build documentation for this crate.
-
-* `landing-page-*.html` - used by `dox.sh` to generate a landing page for all
-  architectures' documentation.
-
-* `run-qemu.sh` - see discussion about QEMU below
-
-* `mips`, `rumprun` - instructions to build the docker image for each respective
-  CI target
-
-# CI Systems
-
-Currently this repository leverages a combination of Travis CI and AppVeyor for
-running tests. The triples tested are:
-
-* AppVeyor
-  * `{i686,x86_64}-pc-windows-{msvc,gnu}`
-* Travis
-  * `{i686,x86_64,mips,aarch64}-unknown-linux-gnu`
-  * `x86_64-unknown-linux-musl`
-  * `arm-unknown-linux-gnueabihf`
-  * `arm-linux-androideabi`
-  * `{i686,x86_64}-apple-{darwin,ios}`
-  * `x86_64-rumprun-netbsd`
-  * `x86_64-unknown-freebsd`
-  * `x86_64-unknown-openbsd`
-
-The Windows triples are all pretty standard, they just set up their environment
-then run tests, no need for downloading any extra target libs (we just download
-the right installer). The Intel Linux/OSX builds are similar in that we just
-download the right target libs and run tests. Note that the Intel Linux/OSX
-builds are run on stable/beta/nightly, but are the only ones that do so.
-
-The remaining architectures look like:
-
-* Android runs in a [docker image][android-docker] with an emulator, the NDK,
-  and the SDK already set up. The entire build happens within the docker image.
-* The MIPS, ARM, and AArch64 builds all use the QEMU userspace emulator to run
-  the generated binary to actually verify the tests pass.
-* The MUSL build just has to download a MUSL compiler and target libraries and
-  then otherwise runs tests normally.
-* iOS builds need an extra linker flag currently, but beyond that they're built
-  as standard as everything else.
-* The rumprun target builds an entire kernel from the test suite and then runs
-  it inside QEMU using the serial console to test whether it succeeded or
-  failed.
-* The BSD builds, currently OpenBSD and FreeBSD, use QEMU to boot up a system
-  and compile/run tests. More information on that below.
-
-[android-docker]: https://github.com/rust-lang/rust-buildbot/blob/master/slaves/android/Dockerfile
-
-## QEMU
-
-Lots of the architectures tested here use QEMU in the tests, so it's worth going
-over all the crazy capabilities QEMU has and the various flavors in which we use
-it!
-
-First up, QEMU has userspace emulation where it doesn't boot a full kernel, it
-just runs a binary from another architecture (using the `qemu-<arch>` wrappers).
-We provide it the runtime path for the dynamically loaded system libraries,
-however. This strategy is used for all Linux architectures that aren't intel.
-Note that one downside of this QEMU system is that threads are barely
-implemented, so we're careful to not spawn many threads.
-
-For the rumprun target the only output is a kernel image, so we just use that
-plus the `rumpbake` command to create a full kernel image which is then run from
-within QEMU.
-
-Finally, the fun part, the BSDs. Quite a few hoops are jumped through to get CI
-working for these platforms, but the gist of it looks like:
-
-* Cross compiling from Linux to any of the BSDs seems to be quite non-standard.
-  We may be able to get it working but it might be difficult at that point to
-  ensure that the libc definitions align with what you'd get on the BSD itself.
-  As a result, we try to do compiles within the BSD distro.
-* On Travis we can't run a VM-in-a-VM, so we resort to userspace emulation
-  (QEMU).
-* Unfortunately on Travis we also can't use KVM, so the emulation is super slow.
-
-With all that in mind, the way BSD is tested looks like:
-
-1. Download a pre-prepared image for the OS being tested.
-2. Generate the tests for the OS being tested. This involves running the `ctest`
-   library over libc to generate a Rust file and a C file which will then be
-   compiled into the final test.
-3. Generate a disk image which will later be mounted by the OS being tested.
-   This image is mostly just the libc directory, but some modifications are made
-   to compile the generated files from step 2.
-4. The kernel is booted in QEMU, and it is configured to detect the libc-test
-   image being available, run the test script, and then shut down afterwards.
-5. Look for whether the tests passed in the serial console output of the kernel.
-
-There's some pretty specific instructions for setting up each image (detailed
-below), but the main gist of this is that we must avoid a vanilla `cargo run`
-inside of the `libc-test` directory (which is what it's intended for) because
-that would compile `syntex_syntax`, a large library, with userspace emulation.
-This invariably times out on Travis, so we can't do that.
-
-Once all those hoops are jumped through, however, we can be happy that we're
-testing almost everything!
-
-Below are some details of how to set up the initial OS images which are
-downloaded. Each image must be enabled have input/output over the serial
-console, log in automatically at the serial console, detect if a second drive in
-QEMU is available, and if so mount it, run a script (it'll specifically be
-`run-qemu.sh` in this folder which is copied into the generated image talked
-about above), and then shut down.
-
-### QEMU setup - FreeBSD
-
-1. Download CD installer (most minimal is fine)
-2. `qemu-img create -f qcow2 foo.qcow2 2G`
-3. `qemu -cdrom foo.iso -drive if=virtio,file=foo.qcow2 -net nic,model=virtio -net user`
-4. run installer
-5. `echo 'console="comconsole"' >> /boot/loader.conf`
-6. `echo 'autoboot_delay="0"' >> /boot/loader.conf`
-7. look at /etc/ttys, see what getty argument is for ttyu0
-8. edit /etc/gettytab, look for ttyu0 argument, prepend `:al=root` to line
-   beneath
-
-(note that the current image has a `freebsd` user, but this isn't really
-necessary)
-
-Once that's done, arrange for this script to run at login:
-
-```
-#!/bin/sh
-
-sudo kldload ext2fs
-[ -e /dev/vtbd1 ] || exit 0
-sudo mount -t ext2fs /dev/vtbd1 /mnt
-sh /mnt/run.sh /mnt
-sudo poweroff
-```
-
-Helpful links
-
-* https://en.wikibooks.org/wiki/QEMU/Images
-* https://blog.nekoconeko.nl/blog/2015/06/04/creating-an-openstack-freebsd-image.html
-* https://www.freebsd.org/doc/handbook/serialconsole-setup.html
-
-
-### QEMU setup - OpenBSD
-
-1. Download CD installer
-2. `qemu-img create -f qcow2 foo.qcow2 2G`
-3. `qemu -cdrom foo.iso -drive if=virtio,file=foo.qcow2 -net nic,model=virtio -net user`
-4. run installer
-5. `echo 'set tty com0' >> /etc/boot.conf`
-6. `echo 'boot' >> /etc/boot.conf`
-7. Modify /etc/ttys, change the `tty00` at the end from 'unknown off' to
-   'vt220 on secure'
-8. Modify same line in /etc/ttys to have `"/root/foo.sh"` as the shell
-9. Add this script to `/root/foo.sh`
-
-```
-#!/bin/sh
-exec 1>/dev/tty00
-exec 2>&1
-
-if mount -t ext2fs /dev/sd1c /mnt; then
-  sh /mnt/run.sh /mnt
-  shutdown -ph now
-fi
-
-# limited shell...
-exec /bin/sh < /dev/tty00
-```
-
-10. `chmod +x /root/foo.sh`
-
-Helpful links:
-
-* https://en.wikibooks.org/wiki/QEMU/Images
-* http://www.openbsd.org/faq/faq7.html#SerCon
-
-# Questions?
-
-Hopefully that's at least somewhat of an introduction to everything going on
-here, and feel free to ping @alexcrichton with questions!
-
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/android-install-ndk.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-# file at the top-level directory of this distribution and at
-# http://rust-lang.org/COPYRIGHT.
-#
-# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-# option. This file may not be copied, modified, or distributed
-# except according to those terms.
-
-set -ex
-
-curl -O https://dl.google.com/android/repository/android-ndk-r13b-linux-x86_64.zip
-unzip -q android-ndk-r13b-linux-x86_64.zip
-
-case "$1" in
-  aarch64)
-    arch=arm64
-    ;;
-
-  i686)
-    arch=x86
-    ;;
-
-  *)
-    arch=$1
-    ;;
-esac;
-
-android-ndk-r13b/build/tools/make_standalone_toolchain.py \
-        --install-dir /android/ndk-$1 \
-        --arch $arch \
-        --api 24
-
-rm -rf ./android-ndk-r13b-linux-x86_64.zip ./android-ndk-r13b
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/android-install-sdk.sh
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/bin/sh
-# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-# file at the top-level directory of this distribution and at
-# http://rust-lang.org/COPYRIGHT.
-#
-# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-# option. This file may not be copied, modified, or distributed
-# except according to those terms.
-
-set -ex
-
-# Prep the SDK and emulator
-#
-# Note that the update process requires that we accept a bunch of licenses, and
-# we can't just pipe `yes` into it for some reason, so we take the same strategy
-# located in https://github.com/appunite/docker by just wrapping it in a script
-# which apparently magically accepts the licenses.
-
-mkdir sdk
-curl https://dl.google.com/android/repository/tools_r25.2.5-linux.zip -O
-unzip -d sdk tools_r25.2.5-linux.zip
-
-filter="platform-tools,android-24"
-
-case "$1" in
-  arm | armv7)
-    abi=armeabi-v7a
-    ;;
-
-  aarch64)
-    abi=arm64-v8a
-    ;;
-
-  i686)
-    abi=x86
-    ;;
-
-  x86_64)
-    abi=x86_64
-    ;;
-
-  *)
-    echo "invalid arch: $1"
-    exit 1
-    ;;
-esac;
-
-filter="$filter,sys-img-$abi-android-24"
-
-./android-accept-licenses.sh "android - update sdk -a --no-ui --filter $filter"
-
-echo "no" | android create avd \
-                --name $1 \
-                --target android-24 \
-                --abi $abi
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/android-sysimage.sh
+++ /dev/null
@@ -1,52 +0,0 @@
-# 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.
-#
-# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-# option. This file may not be copied, modified, or distributed
-# except according to those terms.
-
-set -ex
-
-URL=https://dl.google.com/android/repository/sys-img/android
-
-main() {
-    local arch=$1
-    local name=$2
-    local dest=/system
-    local td=$(mktemp -d)
-
-    apt-get install --no-install-recommends e2tools
-
-    pushd $td
-    curl -O $URL/$name
-    unzip -q $name
-
-    local system=$(find . -name system.img)
-    mkdir -p $dest/{bin,lib,lib64}
-
-    # Extract android linker and libraries to /system
-    # This allows android executables to be run directly (or with qemu)
-    if [ $arch = "x86_64" -o $arch = "arm64" ]; then
-        e2cp -p $system:/bin/linker64 $dest/bin/
-        e2cp -p $system:/lib64/libdl.so $dest/lib64/
-        e2cp -p $system:/lib64/libc.so $dest/lib64/
-        e2cp -p $system:/lib64/libm.so $dest/lib64/
-    else
-        e2cp -p $system:/bin/linker $dest/bin/
-        e2cp -p $system:/lib/libdl.so $dest/lib/
-        e2cp -p $system:/lib/libc.so $dest/lib/
-        e2cp -p $system:/lib/libm.so $dest/lib/
-    fi
-
-    # clean up
-    apt-get purge --auto-remove -y e2tools
-
-    popd
-
-    rm -rf $td
-}
-
-main "${@}"
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/docker/aarch64-linux-android/Dockerfile
+++ /dev/null
@@ -1,32 +0,0 @@
-FROM ubuntu:16.04
-
-RUN dpkg --add-architecture i386 && \
-    apt-get update && \
-    apt-get install -y --no-install-recommends \
-  file \
-  curl \
-  ca-certificates \
-  python \
-  unzip \
-  expect \
-  openjdk-9-jre \
-  libstdc++6:i386 \
-  libpulse0 \
-  gcc \
-  libc6-dev
-
-WORKDIR /android/
-COPY android* /android/
-
-ENV ANDROID_ARCH=aarch64
-ENV PATH=$PATH:/android/ndk-$ANDROID_ARCH/bin:/android/sdk/tools:/android/sdk/platform-tools
-
-RUN sh /android/android-install-ndk.sh $ANDROID_ARCH
-RUN sh /android/android-install-sdk.sh $ANDROID_ARCH
-RUN mv /root/.android /tmp
-RUN chmod 777 -R /tmp/.android
-RUN chmod 755 /android/sdk/tools/* /android/sdk/tools/qemu/linux-x86_64/*
-
-ENV PATH=$PATH:/rust/bin \
-    CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=aarch64-linux-android-gcc \
-    HOME=/tmp
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/docker/aarch64-unknown-linux-gnu/Dockerfile
+++ /dev/null
@@ -1,7 +0,0 @@
-FROM ubuntu:16.10
-RUN apt-get update
-RUN apt-get install -y --no-install-recommends \
-  gcc libc6-dev ca-certificates \
-  gcc-aarch64-linux-gnu libc6-dev-arm64-cross qemu-user
-ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
-    PATH=$PATH:/rust/bin
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/docker/arm-linux-androideabi/Dockerfile
+++ /dev/null
@@ -1,32 +0,0 @@
-FROM ubuntu:16.04
-
-RUN dpkg --add-architecture i386 && \
-    apt-get update && \
-    apt-get install -y --no-install-recommends \
-  file \
-  curl \
-  ca-certificates \
-  python \
-  unzip \
-  expect \
-  openjdk-9-jre \
-  libstdc++6:i386 \
-  libpulse0 \
-  gcc \
-  libc6-dev
-
-WORKDIR /android/
-COPY android* /android/
-
-ENV ANDROID_ARCH=arm
-ENV PATH=$PATH:/android/ndk-$ANDROID_ARCH/bin:/android/sdk/tools:/android/sdk/platform-tools
-
-RUN sh /android/android-install-ndk.sh $ANDROID_ARCH
-RUN sh /android/android-install-sdk.sh $ANDROID_ARCH
-RUN mv /root/.android /tmp
-RUN chmod 777 -R /tmp/.android
-RUN chmod 755 /android/sdk/tools/* /android/sdk/tools/qemu/linux-x86_64/*
-
-ENV PATH=$PATH:/rust/bin \
-    CARGO_TARGET_ARM_LINUX_ANDROIDEABI_LINKER=arm-linux-androideabi-gcc \
-    HOME=/tmp
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/docker/arm-unknown-linux-gnueabihf/Dockerfile
+++ /dev/null
@@ -1,7 +0,0 @@
-FROM ubuntu:16.10
-RUN apt-get update
-RUN apt-get install -y --no-install-recommends \
-  gcc libc6-dev ca-certificates \
-  gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user
-ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
-    PATH=$PATH:/rust/bin
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/docker/i686-linux-android/Dockerfile
+++ /dev/null
@@ -1,32 +0,0 @@
-FROM ubuntu:16.04
-
-RUN dpkg --add-architecture i386 && \
-    apt-get update && \
-    apt-get install -y --no-install-recommends \
-  file \
-  curl \
-  ca-certificates \
-  python \
-  unzip \
-  expect \
-  openjdk-9-jre \
-  libstdc++6:i386 \
-  libpulse0 \
-  gcc \
-  libc6-dev
-
-WORKDIR /android/
-COPY android* /android/
-
-ENV ANDROID_ARCH=i686
-ENV PATH=$PATH:/android/ndk-$ANDROID_ARCH/bin:/android/sdk/tools:/android/sdk/platform-tools
-
-RUN sh /android/android-install-ndk.sh $ANDROID_ARCH
-RUN sh /android/android-install-sdk.sh $ANDROID_ARCH
-RUN mv /root/.android /tmp
-RUN chmod 777 -R /tmp/.android
-RUN chmod 755 /android/sdk/tools/* /android/sdk/tools/qemu/linux-x86_64/*
-
-ENV PATH=$PATH:/rust/bin \
-    CARGO_TARGET_I686_LINUX_ANDROID_LINKER=i686-linux-android-gcc \
-    HOME=/tmp
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/docker/i686-unknown-linux-gnu/Dockerfile
+++ /dev/null
@@ -1,5 +0,0 @@
-FROM ubuntu:16.10
-RUN apt-get update
-RUN apt-get install -y --no-install-recommends \
-  gcc-multilib libc6-dev ca-certificates
-ENV PATH=$PATH:/rust/bin
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/docker/i686-unknown-linux-musl/Dockerfile
+++ /dev/null
@@ -1,23 +0,0 @@
-FROM ubuntu:16.10
-
-RUN dpkg --add-architecture i386
-RUN apt-get update
-RUN apt-get install -y --no-install-recommends \
-  gcc-multilib make libc6-dev git curl ca-certificates libc6:i386
-# Below we're cross-compiling musl for i686 using the system compiler on an
-# x86_64 system. This is an awkward thing to be doing and so we have to jump
-# through a couple hoops to get musl to be happy. In particular:
-#
-# * We specifically pass -m32 in CFLAGS and override CC when running ./configure,
-#   since otherwise the script will fail to find a compiler.
-# * We manually unset CROSS_COMPILE when running make; otherwise the makefile
-#   will call the non-existent binary 'i686-ar'.
-RUN curl https://www.musl-libc.org/releases/musl-1.1.15.tar.gz | \
-    tar xzf - && \
-    cd musl-1.1.15 && \
-    CC=gcc CFLAGS=-m32 ./configure --prefix=/musl-i686 --disable-shared --target=i686 && \
-    make CROSS_COMPILE= install -j4 && \
-    cd .. && \
-    rm -rf musl-1.1.15
-ENV PATH=$PATH:/musl-i686/bin:/rust/bin \
-    CC_i686_unknown_linux_musl=musl-gcc
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/docker/mips-unknown-linux-gnu/Dockerfile
+++ /dev/null
@@ -1,10 +0,0 @@
-FROM ubuntu:16.10
-
-RUN apt-get update
-RUN apt-get install -y --no-install-recommends \
-        gcc libc6-dev qemu-user ca-certificates \
-        gcc-mips-linux-gnu libc6-dev-mips-cross \
-        qemu-system-mips
-
-ENV CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_LINKER=mips-linux-gnu-gcc \
-    PATH=$PATH:/rust/bin
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/docker/mips-unknown-linux-musl/Dockerfile
+++ /dev/null
@@ -1,17 +0,0 @@
-FROM ubuntu:16.10
-
-RUN apt-get update
-RUN apt-get install -y --no-install-recommends \
-        gcc libc6-dev qemu-user ca-certificates qemu-system-mips curl \
-        bzip2
-
-RUN mkdir /toolchain
-
-# Note that this originally came from:
-# https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/OpenWrt-SDK-ar71xx-generic_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2
-RUN curl -L https://s3.amazonaws.com/rust-lang-ci/libc/OpenWrt-SDK-ar71xx-generic_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | \
-      tar xjf - -C /toolchain --strip-components=1
-
-ENV PATH=$PATH:/rust/bin:/toolchain/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.15/bin \
-    CC_mips_unknown_linux_musl=mips-openwrt-linux-gcc \
-    CARGO_TARGET_MIPS_UNKNOWN_LINUX_MUSL_LINKER=mips-openwrt-linux-gcc
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile
+++ /dev/null
@@ -1,11 +0,0 @@
-FROM ubuntu:16.10
-
-RUN apt-get update
-RUN apt-get install -y --no-install-recommends \
-        gcc libc6-dev qemu-user ca-certificates \
-        gcc-mips64-linux-gnuabi64 libc6-dev-mips64-cross \
-        qemu-system-mips64
-
-ENV CARGO_TARGET_MIPS64_UNKNOWN_LINUX_GNUABI64_LINKER=mips64-linux-gnuabi64-gcc \
-    CC_mips64_unknown_linux_gnuabi64=mips64-linux-gnuabi64-gcc \
-    PATH=$PATH:/rust/bin
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/docker/mipsel-unknown-linux-musl/Dockerfile
+++ /dev/null
@@ -1,17 +0,0 @@
-FROM ubuntu:16.10
-
-RUN apt-get update
-RUN apt-get install -y --no-install-recommends \
-        gcc libc6-dev qemu-user ca-certificates qemu-system-mips curl \
-        bzip2
-
-RUN mkdir /toolchain
-
-# Note that this originally came from:
-# https://downloads.openwrt.org/snapshots/trunk/malta/generic/OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2
-RUN curl -L https://s3.amazonaws.com/rust-lang-ci/libc/OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | \
-      tar xjf - -C /toolchain --strip-components=2
-
-ENV PATH=$PATH:/rust/bin:/toolchain/bin \
-    CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \
-    CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_MUSL_LINKER=mipsel-openwrt-linux-gcc
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/docker/powerpc-unknown-linux-gnu/Dockerfile
+++ /dev/null
@@ -1,10 +0,0 @@
-FROM ubuntu:16.10
-
-RUN apt-get update
-RUN apt-get install -y --no-install-recommends \
-        gcc libc6-dev qemu-user ca-certificates \
-        gcc-powerpc-linux-gnu libc6-dev-powerpc-cross \
-        qemu-system-ppc
-
-ENV CARGO_TARGET_POWERPC_UNKNOWN_LINUX_GNU_LINKER=powerpc-linux-gnu-gcc \
-    PATH=$PATH:/rust/bin
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile
+++ /dev/null
@@ -1,11 +0,0 @@
-FROM ubuntu:16.10
-
-RUN apt-get update
-RUN apt-get install -y --no-install-recommends \
-        gcc libc6-dev qemu-user ca-certificates \
-        gcc-powerpc64-linux-gnu libc6-dev-ppc64-cross \
-        qemu-system-ppc
-
-ENV CARGO_TARGET_POWERPC64_UNKNOWN_LINUX_GNU_LINKER=powerpc64-linux-gnu-gcc \
-    CC=powerpc64-linux-gnu-gcc \
-    PATH=$PATH:/rust/bin
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/docker/x86_64-linux-android/Dockerfile
+++ /dev/null
@@ -1,26 +0,0 @@
-FROM ubuntu:16.04
-
-RUN apt-get update && \
-    apt-get install -y --no-install-recommends \
-  ca-certificates \
-  curl \
-  gcc \
-  libc-dev \
-  python \
-  unzip
-
-WORKDIR /android/
-ENV ANDROID_ARCH=x86_64
-COPY android-install-ndk.sh /android/
-RUN sh /android/android-install-ndk.sh $ANDROID_ARCH
-
-# We do not run x86_64-linux-android tests on an android emulator.
-# See ci/android-sysimage.sh for informations about how tests are run.
-COPY android-sysimage.sh /android/
-RUN bash /android/android-sysimage.sh x86_64 x86_64-21_r04.zip
-
-ENV PATH=$PATH:/rust/bin:/android/ndk-$ANDROID_ARCH/bin \
-    CARGO_TARGET_X86_64_LINUX_ANDROID_LINKER=x86_64-linux-android-gcc \
-    CC_x86_64_linux_android=x86_64-linux-android-gcc \
-    CXX_x86_64_linux_android=x86_64-linux-android-g++ \
-    HOME=/tmp
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/docker/x86_64-rumprun-netbsd/Dockerfile
+++ /dev/null
@@ -1,6 +0,0 @@
-FROM mato/rumprun-toolchain-hw-x86_64
-USER root
-RUN apt-get update
-RUN apt-get install -y --no-install-recommends \
-  qemu
-ENV PATH=$PATH:/rust/bin
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/docker/x86_64-unknown-freebsd/Dockerfile
+++ /dev/null
@@ -1,13 +0,0 @@
-FROM alexcrichton/rust-slave-linux-cross:2016-04-15
-USER root
-
-RUN apt-get update
-RUN apt-get install -y --no-install-recommends \
-  qemu genext2fs
-
-ENTRYPOINT ["sh"]
-
-ENV PATH=$PATH:/rust/bin \
-    QEMU=2016-11-06/freebsd.qcow2.gz \
-    CAN_CROSS=1 \
-    CARGO_TARGET_X86_64_UNKNOWN_FREEBSD_LINKER=x86_64-unknown-freebsd10-gcc
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/docker/x86_64-unknown-linux-gnu/Dockerfile
+++ /dev/null
@@ -1,5 +0,0 @@
-FROM ubuntu:16.10
-RUN apt-get update
-RUN apt-get install -y --no-install-recommends \
-  gcc libc6-dev ca-certificates
-ENV PATH=$PATH:/rust/bin
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/docker/x86_64-unknown-linux-musl/Dockerfile
+++ /dev/null
@@ -1,13 +0,0 @@
-FROM ubuntu:16.10
-
-RUN apt-get update
-RUN apt-get install -y --no-install-recommends \
-  gcc make libc6-dev git curl ca-certificates
-RUN curl https://www.musl-libc.org/releases/musl-1.1.15.tar.gz | \
-    tar xzf - && \
-    cd musl-1.1.15 && \
-    ./configure --prefix=/musl-x86_64 && \
-    make install -j4 && \
-    cd .. && \
-    rm -rf musl-1.1.15
-ENV PATH=$PATH:/musl-x86_64/bin:/rust/bin
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/dox.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-# Builds documentation for all target triples that we have a registered URL for
-# in liblibc. This scrapes the list of triples to document from `src/lib.rs`
-# which has a bunch of `html_root_url` directives we pick up.
-
-set -e
-
-TARGETS=`grep html_root_url src/lib.rs | sed 's/.*".*\/\(.*\)"/\1/'`
-
-rm -rf target/doc
-mkdir -p target/doc
-
-cp ci/landing-page-head.html target/doc/index.html
-
-for target in $TARGETS; do
-  echo documenting $target
-
-  rustdoc -o target/doc/$target --target $target src/lib.rs --cfg dox \
-    --crate-name libc
-
-  echo "<li><a href="/libc/$target/libc/index.html">$target</a></li>" \
-    >> target/doc/index.html
-done
-
-cat ci/landing-page-footer.html >> target/doc/index.html
-
-# If we're on travis, not a PR, and on the right branch, publish!
-if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then
-  pip install ghp_import --install-option="--prefix=$HOME/.local"
-  $HOME/.local/bin/ghp-import -n target/doc
-  git push -qf https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
-fi
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/ios/deploy_and_run_on_ios_simulator.rs
+++ /dev/null
@@ -1,171 +0,0 @@
-// 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.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// This is a script to deploy and execute a binary on an iOS simulator.
-// The primary use of this is to be able to run unit tests on the simulator and
-// retrieve the results.
-//
-// To do this through Cargo instead, use Dinghy
-// (https://github.com/snipsco/dinghy): cargo dinghy install, then cargo dinghy
-// test.
-
-use std::env;
-use std::fs::{self, File};
-use std::io::Write;
-use std::path::Path;
-use std::process;
-use std::process::Command;
-
-macro_rules! t {
-    ($e:expr) => (match $e {
-        Ok(e) => e,
-        Err(e) => panic!("{} failed with: {}", stringify!($e), e),
-    })
-}
-
-// Step one: Wrap as an app
-fn package_as_simulator_app(crate_name: &str, test_binary_path: &Path) {
-    println!("Packaging simulator app");
-    drop(fs::remove_dir_all("ios_simulator_app"));
-    t!(fs::create_dir("ios_simulator_app"));
-    t!(fs::copy(test_binary_path,
-                Path::new("ios_simulator_app").join(crate_name)));
-
-    let mut f = t!(File::create("ios_simulator_app/Info.plist"));
-    t!(f.write_all(format!(r#"
-        <?xml version="1.0" encoding="UTF-8"?>
-        <!DOCTYPE plist PUBLIC
-                "-//Apple//DTD PLIST 1.0//EN"
-                "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-        <plist version="1.0">
-            <dict>
-                <key>CFBundleExecutable</key>
-                <string>{}</string>
-                <key>CFBundleIdentifier</key>
-                <string>com.rust.unittests</string>
-            </dict>
-        </plist>
-    "#, crate_name).as_bytes()));
-}
-
-// Step two: Start the iOS simulator
-fn start_simulator() {
-    println!("Looking for iOS simulator");
-    let output = t!(Command::new("xcrun").arg("simctl").arg("list").output());
-    assert!(output.status.success());
-    let mut simulator_exists = false;
-    let mut simulator_booted = false;
-    let mut found_rust_sim = false;
-    let stdout = t!(String::from_utf8(output.stdout));
-    for line in stdout.lines() {
-        if line.contains("rust_ios") {
-            if found_rust_sim {
-                panic!("Duplicate rust_ios simulators found. Please \
-                        double-check xcrun simctl list.");
-            }
-            simulator_exists = true;
-            simulator_booted = line.contains("(Booted)");
-            found_rust_sim = true;
-        }
-    }
-
-    if simulator_exists == false {
-        println!("Creating iOS simulator");
-        Command::new("xcrun")
-                .arg("simctl")
-                .arg("create")
-                .arg("rust_ios")
-                .arg("com.apple.CoreSimulator.SimDeviceType.iPhone-SE")
-                .arg("com.apple.CoreSimulator.SimRuntime.iOS-10-2")
-                .check_status();
-    } else if simulator_booted == true {
-        println!("Shutting down already-booted simulator");
-        Command::new("xcrun")
-                .arg("simctl")
-                .arg("shutdown")
-                .arg("rust_ios")
-                .check_status();
-    }
-
-    println!("Starting iOS simulator");
-    // We can't uninstall the app (if present) as that will hang if the
-    // simulator isn't completely booted; just erase the simulator instead.
-    Command::new("xcrun").arg("simctl").arg("erase").arg("rust_ios").check_status();
-    Command::new("xcrun").arg("simctl").arg("boot").arg("rust_ios").check_status();
-}
-
-// Step three: Install the app
-fn install_app_to_simulator() {
-    println!("Installing app to simulator");
-    Command::new("xcrun")
-            .arg("simctl")
-            .arg("install")
-            .arg("booted")
-            .arg("ios_simulator_app/")
-            .check_status();
-}
-
-// Step four: Run the app
-fn run_app_on_simulator() {
-    println!("Running app");
-    let output = t!(Command::new("xcrun")
-                    .arg("simctl")
-                    .arg("launch")
-                    .arg("--console")
-                    .arg("booted")
-                    .arg("com.rust.unittests")
-                    .output());
-
-    println!("stdout --\n{}\n", String::from_utf8_lossy(&output.stdout));
-    println!("stderr --\n{}\n", String::from_utf8_lossy(&output.stderr));
-
-    let stdout = String::from_utf8_lossy(&output.stdout);
-    let passed = stdout.lines()
-                       .find(|l| l.contains("PASSED"))
-                       .map(|l| l.contains("tests"))
-                       .unwrap_or(false);
-
-    println!("Shutting down simulator");
-    Command::new("xcrun")
-        .arg("simctl")
-        .arg("shutdown")
-        .arg("rust_ios")
-        .check_status();
-    if !passed {
-        panic!("tests didn't pass");
-    }
-}
-
-trait CheckStatus {
-    fn check_status(&mut self);
-}
-
-impl CheckStatus for Command {
-    fn check_status(&mut self) {
-        println!("\trunning: {:?}", self);
-        assert!(t!(self.status()).success());
-    }
-}
-
-fn main() {
-    let args: Vec<String> = env::args().collect();
-    if args.len() != 2 {
-        println!("Usage: {} <executable>", args[0]);
-        process::exit(-1);
-    }
-
-    let test_binary_path = Path::new(&args[1]);
-    let crate_name = test_binary_path.file_name().unwrap();
-
-    package_as_simulator_app(crate_name.to_str().unwrap(), test_binary_path);
-    start_simulator();
-    install_app_to_simulator();
-    run_app_on_simulator();
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/landing-page-footer.html
+++ /dev/null
@@ -1,3 +0,0 @@
-    </ul>
-  </body>
-</html>
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/landing-page-head.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-  <head>
-    <meta charset="utf-8">
-  </head>
-  <body>
-    <ul>
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/run-docker.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-# Small script to run tests for a target (or all targets) inside all the
-# respective docker images.
-
-set -ex
-
-run() {
-    echo $1
-    # use -f so we can use ci/ as build context
-    docker build -t libc -f ci/docker/$1/Dockerfile ci/
-    mkdir -p target
-    if [ -w /dev/kvm ]; then
-      kvm="--volume /dev/kvm:/dev/kvm"
-    fi
-    docker run \
-      --user `id -u`:`id -g` \
-      --rm \
-      --volume $HOME/.cargo:/cargo \
-      $kvm \
-      --env CARGO_HOME=/cargo \
-      --volume `rustc --print sysroot`:/rust:ro \
-      --volume `pwd`:/checkout:ro \
-      --volume `pwd`/target:/checkout/target \
-      --env CARGO_TARGET_DIR=/checkout/target \
-      --workdir /checkout \
-      --privileged \
-      libc \
-      ci/run.sh $1
-}
-
-if [ -z "$1" ]; then
-  for d in `ls ci/docker/`; do
-    run $d
-  done
-else
-  run $1
-fi
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/run-qemu.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-# Initial script which is run inside of all qemu images. The first argument to
-# this script (as arranged by the qemu image itself) is the path to where the
-# libc crate is mounted.
-#
-# For qemu images we currently need to install Rust manually as this wasn't done
-# by the initial run-travis.sh script
-#
-# FIXME: feels like run-travis.sh should be responsible for downloading the
-#        compiler.
-
-set -ex
-
-ROOT=$1
-cp -r $ROOT/libc /tmp/libc
-cd /tmp/libc
-
-TARGET=$(cat $ROOT/TARGET)
-export CARGO_TARGET_DIR=/tmp
-
-case $TARGET in
-  *-openbsd)
-    pkg_add cargo gcc%4.9 rust
-    export CC=egcc
-    ;;
-
-  *)
-    echo "Unknown target: $TARGET"
-    exit 1
-    ;;
-esac
-
-exec sh ci/run.sh $TARGET
deleted file mode 100755
--- a/third_party/rust/libc-0.2.24/ci/run.sh
+++ /dev/null
@@ -1,182 +0,0 @@
-#!/bin/sh
-
-# Builds and runs tests for a particular target passed as an argument to this
-# script.
-
-set -ex
-
-TARGET=$1
-
-# If we're going to run tests inside of a qemu image, then we don't need any of
-# the scripts below. Instead, download the image, prepare a filesystem which has
-# the current state of this repository, and then run the image.
-#
-# It's assume that all images, when run with two disks, will run the `run.sh`
-# script from the second which we place inside.
-if [ "$QEMU" != "" ]; then
-  tmpdir=/tmp/qemu-img-creation
-  mkdir -p $tmpdir
-
-  if [ -z "${QEMU#*.gz}" ]; then
-    # image is .gz : download and uncompress it
-    qemufile=$(echo ${QEMU%.gz} | sed 's/\//__/g')
-    if [ ! -f $tmpdir/$qemufile ]; then
-      curl https://s3.amazonaws.com/rust-lang-ci/libc/$QEMU | \
-        gunzip -d > $tmpdir/$qemufile
-    fi
-  else
-    # plain qcow2 image: just download it
-    qemufile=$(echo ${QEMU} | sed 's/\//__/g')
-    if [ ! -f $tmpdir/$qemufile ]; then
-      curl https://s3.amazonaws.com/rust-lang-ci/libc/$QEMU \
-        > $tmpdir/$qemufile
-    fi
-  fi
-
-  # Create a mount a fresh new filesystem image that we'll later pass to QEMU.
-  # This will have a `run.sh` script will which use the artifacts inside to run
-  # on the host.
-  rm -f $tmpdir/libc-test.img
-  mkdir $tmpdir/mount
-
-  # If we have a cross compiler, then we just do the standard rigamarole of
-  # cross-compiling an executable and then the script to run just executes the
-  # binary.
-  #
-  # If we don't have a cross-compiler, however, then we need to do some crazy
-  # acrobatics to get this to work.  Generate all.{c,rs} on the host which will
-  # be compiled inside QEMU. Do this here because compiling syntex_syntax in
-  # QEMU would time out basically everywhere.
-  if [ "$CAN_CROSS" = "1" ]; then
-    cargo build --manifest-path libc-test/Cargo.toml --target $TARGET
-    cp $CARGO_TARGET_DIR/$TARGET/debug/libc-test $tmpdir/mount/
-    echo 'exec $1/libc-test' > $tmpdir/mount/run.sh
-  else
-    rm -rf $tmpdir/generated
-    mkdir -p $tmpdir/generated
-    cargo build --manifest-path libc-test/generate-files/Cargo.toml
-    (cd libc-test && TARGET=$TARGET OUT_DIR=$tmpdir/generated SKIP_COMPILE=1 \
-      $CARGO_TARGET_DIR/debug/generate-files)
-
-    # Copy this folder into the mounted image, the `run.sh` entry point, and
-    # overwrite the standard libc-test Cargo.toml with the overlay one which will
-    # assume the all.{c,rs} test files have already been generated
-    mkdir $tmpdir/mount/libc
-    cp -r Cargo.* libc-test src ci $tmpdir/mount/libc/
-    ln -s libc-test/target $tmpdir/mount/libc/target
-    cp ci/run-qemu.sh $tmpdir/mount/run.sh
-    echo $TARGET | tee -a $tmpdir/mount/TARGET
-    cp $tmpdir/generated/* $tmpdir/mount/libc/libc-test
-    cp libc-test/run-generated-Cargo.toml $tmpdir/mount/libc/libc-test/Cargo.toml
-  fi
-
-  du -sh $tmpdir/mount
-  genext2fs \
-      --root $tmpdir/mount \
-      --size-in-blocks 100000 \
-      $tmpdir/libc-test.img
-
-  # Pass -snapshot to prevent tampering with the disk images, this helps when
-  # running this script in development. The two drives are then passed next,
-  # first is the OS and second is the one we just made. Next the network is
-  # configured to work (I'm not entirely sure how), and then finally we turn off
-  # graphics and redirect the serial console output to out.log.
-  qemu-system-x86_64 \
-    -m 1024 \
-    -snapshot \
-    -drive if=virtio,file=$tmpdir/$qemufile \
-    -drive if=virtio,file=$tmpdir/libc-test.img \
-    -net nic,model=virtio \
-    -net user \
-    -nographic \
-    -vga none 2>&1 | tee $CARGO_TARGET_DIR/out.log
-  exec grep "^PASSED .* tests" $CARGO_TARGET_DIR/out.log
-fi
-
-case "$TARGET" in
-  *-apple-ios)
-    cargo rustc --manifest-path libc-test/Cargo.toml --target $TARGET -- \
-        -C link-args=-mios-simulator-version-min=7.0
-    ;;
-
-  *)
-    cargo build --manifest-path libc-test/Cargo.toml --target $TARGET
-    ;;
-esac
-
-case "$TARGET" in
-  # Android emulator for x86_64 does not work on travis (missing hardware
-  # acceleration). Tests are run on case *). See ci/android-sysimage.sh for
-  # informations about how tests are run.
-  arm-linux-androideabi | aarch64-linux-android | i686-linux-android)
-    # set SHELL so android can detect a 64bits system, see
-    # http://stackoverflow.com/a/41789144
-    # https://issues.jenkins-ci.org/browse/JENKINS-26930?focusedCommentId=230791&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-230791
-    export SHELL=/bin/dash
-    arch=$(echo $TARGET | cut -d- -f1)
-    accel="-no-accel"
-    if emulator -accel-check; then
-      accel=""
-    fi
-    emulator @$arch -no-window $accel &
-    adb wait-for-device
-    adb push $CARGO_TARGET_DIR/$TARGET/debug/libc-test /data/local/tmp/libc-test
-    adb shell /data/local/tmp/libc-test 2>&1 | tee /tmp/out
-    grep "^PASSED .* tests" /tmp/out
-    ;;
-
-  i386-apple-ios)
-    rustc -O ./ci/ios/deploy_and_run_on_ios_simulator.rs
-    ./deploy_and_run_on_ios_simulator $CARGO_TARGET_DIR/$TARGET/debug/libc-test
-    ;;
-
-  x86_64-apple-ios)
-    rustc -O ./ci/ios/deploy_and_run_on_ios_simulator.rs
-    ./deploy_and_run_on_ios_simulator $CARGO_TARGET_DIR/$TARGET/debug/libc-test
-    ;;
-
-  arm-unknown-linux-gnueabihf)
-    qemu-arm -L /usr/arm-linux-gnueabihf $CARGO_TARGET_DIR/$TARGET/debug/libc-test
-    ;;
-
-  mips-unknown-linux-gnu)
-    qemu-mips -L /usr/mips-linux-gnu $CARGO_TARGET_DIR/$TARGET/debug/libc-test
-    ;;
-
-  mips64-unknown-linux-gnuabi64)
-    qemu-mips64 -L /usr/mips64-linux-gnuabi64 $CARGO_TARGET_DIR/$TARGET/debug/libc-test
-    ;;
-
-  mips-unknown-linux-musl)
-    qemu-mips -L /toolchain/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.15 \
-              $CARGO_TARGET_DIR/$TARGET/debug/libc-test
-    ;;
-
-  mipsel-unknown-linux-musl)
-      qemu-mipsel -L /toolchain $CARGO_TARGET_DIR/$TARGET/debug/libc-test
-      ;;
-
-  powerpc-unknown-linux-gnu)
-    qemu-ppc -L /usr/powerpc-linux-gnu $CARGO_TARGET_DIR/$TARGET/debug/libc-test
-    ;;
-
-  powerpc64-unknown-linux-gnu)
-    qemu-ppc64 -L /usr/powerpc64-linux-gnu $CARGO_TARGET_DIR/$TARGET/debug/libc-test
-    ;;
-
-  aarch64-unknown-linux-gnu)
-    qemu-aarch64 -L /usr/aarch64-linux-gnu/ $CARGO_TARGET_DIR/$TARGET/debug/libc-test
-    ;;
-
-  *-rumprun-netbsd)
-    rumprun-bake hw_virtio /tmp/libc-test.img $CARGO_TARGET_DIR/$TARGET/debug/libc-test
-    qemu-system-x86_64 -nographic -vga none -m 64 \
-        -kernel /tmp/libc-test.img 2>&1 | tee /tmp/out &
-    sleep 5
-    grep "^PASSED .* tests" /tmp/out
-    ;;
-
-  *)
-    $CARGO_TARGET_DIR/$TARGET/debug/libc-test
-    ;;
-esac
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/ci/style.rs
+++ /dev/null
@@ -1,204 +0,0 @@
-//! Simple script to verify the coding style of this library
-//!
-//! ## How to run
-//!
-//! The first argument to this script is the directory to run on, so running
-//! this script should be as simple as:
-//!
-//! ```notrust
-//! rustc ci/style.rs
-//! ./style src
-//! ```
-//!
-//! ## Guidelines
-//!
-//! The current style is:
-//!
-//! * No trailing whitespace
-//! * No tabs
-//! * 80-character lines
-//! * `extern` instead of `extern "C"`
-//! * Specific module layout:
-//!     1. use directives
-//!     2. typedefs
-//!     3. structs
-//!     4. constants
-//!     5. f! { ... } functions
-//!     6. extern functions
-//!     7. modules + pub use
-//!
-//! Things not verified:
-//!
-//! * alignment
-//! * 4-space tabs
-//! * leading colons on paths
-
-use std::env;
-use std::fs;
-use std::io::prelude::*;
-use std::path::Path;
-
-macro_rules! t {
-    ($e:expr) => (match $e {
-        Ok(e) => e,
-        Err(e) => panic!("{} failed with {}", stringify!($e), e),
-    })
-}
-
-fn main() {
-    let arg = env::args().skip(1).next().unwrap_or(".".to_string());
-
-    let mut errors = Errors { errs: false };
-    walk(Path::new(&arg), &mut errors);
-
-    if errors.errs {
-        panic!("found some lint errors");
-    } else {
-        println!("good style!");
-    }
-}
-
-fn walk(path: &Path, err: &mut Errors) {
-    for entry in t!(path.read_dir()).map(|e| t!(e)) {
-        let path = entry.path();
-        if t!(entry.file_type()).is_dir() {
-            walk(&path, err);
-            continue
-        }
-
-        let name = entry.file_name().into_string().unwrap();
-        match &name[..] {
-            n if !n.ends_with(".rs") => continue,
-
-            "dox.rs" |
-            "lib.rs" |
-            "macros.rs" => continue,
-
-            _ => {}
-        }
-
-        let mut contents = String::new();
-        t!(t!(fs::File::open(&path)).read_to_string(&mut contents));
-
-        check_style(&contents, &path, err);
-    }
-}
-
-struct Errors {
-    errs: bool,
-}
-
-#[derive(Clone, Copy, PartialEq)]
-enum State {
-    Start,
-    Imports,
-    Typedefs,
-    Structs,
-    Constants,
-    FunctionDefinitions,
-    Functions,
-    Modules,
-}
-
-fn check_style(file: &str, path: &Path, err: &mut Errors) {
-    let mut state = State::Start;
-    let mut s_macros = 0;
-    let mut f_macros = 0;
-    let mut prev_blank = false;
-
-    for (i, line) in file.lines().enumerate() {
-        if line == "" {
-            if prev_blank {
-                err.error(path, i, "double blank line");
-            }
-            prev_blank = true;
-        } else {
-            prev_blank = false;
-        }
-        if line != line.trim_right() {
-            err.error(path, i, "trailing whitespace");
-        }
-        if line.contains("\t") {
-            err.error(path, i, "tab character");
-        }
-        if line.len() > 80 {
-            err.error(path, i, "line longer than 80 chars");
-        }
-        if line.contains("extern \"C\"") {
-            err.error(path, i, "use `extern` instead of `extern \"C\"");
-        }
-        if line.contains("#[cfg(") && !line.contains(" if ") {
-            if state != State::Structs {
-                err.error(path, i, "use cfg_if! and submodules \
-                                    instead of #[cfg]");
-            }
-        }
-
-        let line = line.trim_left();
-        let is_pub = line.starts_with("pub ");
-        let line = if is_pub {&line[4..]} else {line};
-
-        let line_state = if line.starts_with("use ") {
-            if is_pub {
-                State::Modules
-            } else {
-                State::Imports
-            }
-        } else if line.starts_with("const ") {
-            State::Constants
-        } else if line.starts_with("type ") {
-            State::Typedefs
-        } else if line.starts_with("s! {") {
-            s_macros += 1;
-            State::Structs
-        } else if line.starts_with("f! {") {
-            f_macros += 1;
-            State::FunctionDefinitions
-        } else if line.starts_with("extern ") {
-            State::Functions
-        } else if line.starts_with("mod ") {
-            State::Modules
-        } else {
-            continue
-        };
-
-        if state as usize > line_state as usize {
-            err.error(path, i, &format!("{} found after {} when \
-                                         it belongs before",
-                                        line_state.desc(), state.desc()));
-        }
-
-        if f_macros == 2 {
-            f_macros += 1;
-            err.error(path, i, "multiple f! macros in one module");
-        }
-        if s_macros == 2 {
-            s_macros += 1;
-            err.error(path, i, "multiple s! macros in one module");
-        }
-
-        state = line_state;
-    }
-}
-
-impl State {
-    fn desc(&self) -> &str {
-        match *self {
-            State::Start => "start",
-            State::Imports => "import",
-            State::Typedefs => "typedef",
-            State::Structs => "struct",
-            State::Constants => "constant",
-            State::FunctionDefinitions => "function definition",
-            State::Functions => "extern function",
-            State::Modules => "module",
-        }
-    }
-}
-
-impl Errors {
-    fn error(&mut self, path: &Path, line: usize, msg: &str) {
-        self.errs = true;
-        println!("{}:{} - {}", path.display(), line + 1, msg);
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/dox.rs
+++ /dev/null
@@ -1,175 +0,0 @@
-pub use self::imp::*;
-
-#[cfg(not(dox))]
-mod imp {
-    pub use core::option::Option;
-    pub use core::clone::Clone;
-    pub use core::marker::Copy;
-    pub use core::mem;
-}
-
-#[cfg(dox)]
-mod imp {
-    pub enum Option<T> {
-        Some(T),
-        None,
-    }
-    impl<T: Copy> Copy for Option<T> {}
-    impl<T: Clone> Clone for Option<T> {
-        fn clone(&self) -> Option<T> { loop {} }
-    }
-
-    pub trait Clone {
-        fn clone(&self) -> Self;
-    }
-
-    #[lang = "copy"]
-    pub trait Copy {}
-
-    #[lang = "freeze"]
-    pub trait Freeze {}
-
-    #[lang = "sync"]
-    pub trait Sync {}
-    impl<T> Sync for T {}
-
-    #[lang = "sized"]
-    pub trait Sized {}
-
-    macro_rules! each_int {
-        ($mac:ident) => (
-            $mac!(u8);
-            $mac!(u16);
-            $mac!(u32);
-            $mac!(u64);
-            $mac!(usize);
-            each_signed_int!($mac);
-        )
-    }
-
-    macro_rules! each_signed_int {
-        ($mac:ident) => (
-            $mac!(i8);
-            $mac!(i16);
-            $mac!(i32);
-            $mac!(i64);
-            $mac!(isize);
-        )
-    }
-
-    #[lang = "div"]
-    pub trait Div<RHS> {
-        type Output;
-        fn div(self, rhs: RHS) -> Self::Output;
-    }
-
-    macro_rules! impl_div {
-        ($($i:ident)*) => ($(
-            impl Div<$i> for $i {
-                type Output = $i;
-                fn div(self, rhs: $i) -> $i { self / rhs }
-            }
-        )*)
-    }
-    each_int!(impl_div);
-
-    #[lang = "shl"]
-    pub trait Shl<RHS> {
-        type Output;
-        fn shl(self, rhs: RHS) -> Self::Output;
-    }
-
-    macro_rules! impl_shl {
-        ($($i:ident)*) => ($(
-            impl Shl<$i> for $i {
-                type Output = $i;
-                fn shl(self, rhs: $i) -> $i { self << rhs }
-            }
-        )*)
-    }
-    each_int!(impl_shl);
-
-    #[lang = "mul"]
-    pub trait Mul<RHS=Self> {
-        type Output;
-        fn mul(self, rhs: RHS) -> Self::Output;
-    }
-
-    macro_rules! impl_mul {
-        ($($i:ident)*) => ($(
-            impl Mul for $i {
-                type Output = $i;
-                fn mul(self, rhs: $i) -> $i { self * rhs }
-            }
-        )*)
-    }
-    each_int!(impl_mul);
-
-    #[lang = "sub"]
-    pub trait Sub<RHS=Self> {
-        type Output;
-        fn sub(self, rhs: RHS) -> Self::Output;
-    }
-
-    macro_rules! impl_sub {
-        ($($i:ident)*) => ($(
-            impl Sub for $i {
-                type Output = $i;
-                fn sub(self, rhs: $i) -> $i { self - rhs }
-            }
-        )*)
-    }
-    each_int!(impl_sub);
-
-    #[lang = "bitor"]
-    pub trait Bitor<RHS=Self> {
-        type Output;
-        fn bitor(self, rhs: RHS) -> Self::Output;
-    }
-
-    macro_rules! impl_bitor {
-        ($($i:ident)*) => ($(
-            impl Bitor for $i {
-                type Output = $i;
-                fn bitor(self, rhs: $i) -> $i { self | rhs }
-            }
-        )*)
-    }
-    each_int!(impl_bitor);
-
-    #[lang = "neg"]
-    pub trait Neg {
-        type Output;
-        fn neg(self) -> Self::Output;
-    }
-
-    macro_rules! impl_neg {
-        ($($i:ident)*) => ($(
-            impl Neg for $i {
-                type Output = $i;
-                fn neg(self) -> $i { -self }
-            }
-        )*)
-    }
-    each_signed_int!(impl_neg);
-
-    #[lang = "not"]
-    pub trait Not {
-        type Output;
-        fn not(self) -> Self::Output;
-    }
-
-    macro_rules! impl_not {
-        ($($i:ident)*) => ($(
-            impl Not for $i {
-                type Output = $i;
-                fn not(self) -> $i { !self }
-            }
-        )*)
-    }
-    each_int!(impl_not);
-
-    pub mod mem {
-        pub fn size_of_val<T>(_: &T) -> usize { 4 }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/lib.rs
+++ /dev/null
@@ -1,279 +0,0 @@
-// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! Crate docs
-
-#![allow(bad_style, overflowing_literals, improper_ctypes)]
-#![crate_type = "rlib"]
-#![crate_name = "libc"]
-#![cfg_attr(dox, feature(no_core, lang_items))]
-#![cfg_attr(dox, no_core)]
-#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
-       html_favicon_url = "https://doc.rust-lang.org/favicon.ico")]
-
-#![cfg_attr(all(target_os = "linux", target_arch = "x86_64"), doc(
-    html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-linux-gnu"
-))]
-#![cfg_attr(all(target_os = "linux", target_arch = "x86"), doc(
-    html_root_url = "https://doc.rust-lang.org/libc/i686-unknown-linux-gnu"
-))]
-#![cfg_attr(all(target_os = "linux", target_arch = "arm"), doc(
-    html_root_url = "https://doc.rust-lang.org/libc/arm-unknown-linux-gnueabihf"
-))]
-#![cfg_attr(all(target_os = "linux", target_arch = "mips"), doc(
-    html_root_url = "https://doc.rust-lang.org/libc/mips-unknown-linux-gnu"
-))]
-#![cfg_attr(all(target_os = "linux", target_arch = "aarch64"), doc(
-    html_root_url = "https://doc.rust-lang.org/libc/aarch64-unknown-linux-gnu"
-))]
-#![cfg_attr(all(target_os = "linux", target_env = "musl"), doc(
-    html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-linux-musl"
-))]
-#![cfg_attr(all(target_os = "macos", target_arch = "x86_64"), doc(
-    html_root_url = "https://doc.rust-lang.org/libc/x86_64-apple-darwin"
-))]
-#![cfg_attr(all(target_os = "macos", target_arch = "x86"), doc(
-    html_root_url = "https://doc.rust-lang.org/libc/i686-apple-darwin"
-))]
-#![cfg_attr(all(windows, target_arch = "x86_64", target_env = "gnu"), doc(
-    html_root_url = "https://doc.rust-lang.org/libc/x86_64-pc-windows-gnu"
-))]
-#![cfg_attr(all(windows, target_arch = "x86", target_env = "gnu"), doc(
-    html_root_url = "https://doc.rust-lang.org/libc/i686-pc-windows-gnu"
-))]
-#![cfg_attr(all(windows, target_arch = "x86_64", target_env = "msvc"), doc(
-    html_root_url = "https://doc.rust-lang.org/libc/x86_64-pc-windows-msvc"
-))]
-#![cfg_attr(all(windows, target_arch = "x86", target_env = "msvc"), doc(
-    html_root_url = "https://doc.rust-lang.org/libc/i686-pc-windows-msvc"
-))]
-#![cfg_attr(target_os = "android", doc(
-    html_root_url = "https://doc.rust-lang.org/libc/arm-linux-androideabi"
-))]
-#![cfg_attr(target_os = "freebsd", doc(
-    html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-freebsd"
-))]
-#![cfg_attr(target_os = "openbsd", doc(
-    html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-openbsd"
-))]
-#![cfg_attr(target_os = "bitrig", doc(
-    html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-bitrig"
-))]
-#![cfg_attr(target_os = "netbsd", doc(
-    html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-netbsd"
-))]
-#![cfg_attr(target_os = "dragonfly", doc(
-    html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-dragonfly"
-))]
-
-// Attributes needed when building as part of the standard library
-#![cfg_attr(stdbuild, feature(no_std, core, core_slice_ext, staged_api, custom_attribute, cfg_target_vendor))]
-#![cfg_attr(stdbuild, feature(link_cfg))]
-#![cfg_attr(stdbuild, no_std)]
-#![cfg_attr(stdbuild, staged_api)]
-#![cfg_attr(stdbuild, allow(warnings))]
-#![cfg_attr(stdbuild, unstable(feature = "libc",
-                               reason = "use `libc` from crates.io",
-                               issue = "27783"))]
-
-#![cfg_attr(not(feature = "use_std"), no_std)]
-
-#[cfg(all(not(stdbuild), not(dox), feature = "use_std"))]
-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 {
-    // 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 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 enum FILE {}
-pub enum fpos_t {} // TODO: fill this out with a struct
-
-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;
-    pub fn isdigit(c: c_int) -> c_int;
-    pub fn isgraph(c: c_int) -> c_int;
-    pub fn islower(c: c_int) -> c_int;
-    pub fn isprint(c: c_int) -> c_int;
-    pub fn ispunct(c: c_int) -> c_int;
-    pub fn isspace(c: c_int) -> c_int;
-    pub fn isupper(c: c_int) -> c_int;
-    pub fn isxdigit(c: c_int) -> c_int;
-    pub fn tolower(c: c_int) -> c_int;
-    pub fn toupper(c: c_int) -> c_int;
-
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "fopen$UNIX2003")]
-    pub fn fopen(filename: *const c_char,
-                 mode: *const c_char) -> *mut FILE;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "freopen$UNIX2003")]
-    pub fn freopen(filename: *const c_char, mode: *const c_char,
-                   file: *mut FILE) -> *mut FILE;
-    pub fn fflush(file: *mut FILE) -> c_int;
-    pub fn fclose(file: *mut FILE) -> c_int;
-    pub fn remove(filename: *const c_char) -> c_int;
-    pub fn rename(oldname: *const c_char, newname: *const c_char) -> c_int;
-    pub fn tmpfile() -> *mut FILE;
-    pub fn setvbuf(stream: *mut FILE,
-                   buffer: *mut c_char,
-                   mode: c_int,
-                   size: size_t) -> c_int;
-    pub fn setbuf(stream: *mut FILE, buf: *mut c_char);
-    pub fn getchar() -> c_int;
-    pub fn putchar(c: c_int) -> c_int;
-    pub fn fgetc(stream: *mut FILE) -> c_int;
-    pub fn fgets(buf: *mut c_char, n: c_int, stream: *mut FILE) -> *mut c_char;
-    pub fn fputc(c: c_int, stream: *mut FILE) -> c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "fputs$UNIX2003")]
-    pub fn fputs(s: *const c_char, stream: *mut FILE)-> c_int;
-    pub fn puts(s: *const c_char) -> c_int;
-    pub fn ungetc(c: c_int, stream: *mut FILE) -> c_int;
-    pub fn fread(ptr: *mut c_void,
-                 size: size_t,
-                 nobj: size_t,
-                 stream: *mut FILE)
-                 -> size_t;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "fwrite$UNIX2003")]
-    pub fn fwrite(ptr: *const c_void,
-                  size: size_t,
-                  nobj: size_t,
-                  stream: *mut FILE)
-                  -> size_t;
-    pub fn fseek(stream: *mut FILE, offset: c_long, whence: c_int) -> c_int;
-    pub fn ftell(stream: *mut FILE) -> c_long;
-    pub fn rewind(stream: *mut FILE);
-    #[cfg_attr(target_os = "netbsd", link_name = "__fgetpos50")]
-    pub fn fgetpos(stream: *mut FILE, ptr: *mut fpos_t) -> c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__fsetpos50")]
-    pub fn fsetpos(stream: *mut FILE, ptr: *const fpos_t) -> c_int;
-    pub fn feof(stream: *mut FILE) -> c_int;
-    pub fn ferror(stream: *mut FILE) -> c_int;
-    pub fn perror(s: *const c_char);
-    pub fn atoi(s: *const c_char) -> c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "strtod$UNIX2003")]
-    pub fn strtod(s: *const c_char, endp: *mut *mut c_char) -> c_double;
-    pub fn strtol(s: *const c_char,
-                  endp: *mut *mut c_char, base: c_int) -> c_long;
-    pub fn strtoul(s: *const c_char, endp: *mut *mut c_char,
-                   base: c_int) -> c_ulong;
-    pub fn calloc(nobj: size_t, size: size_t) -> *mut c_void;
-    pub fn malloc(size: size_t) -> *mut c_void;
-    pub fn realloc(p: *mut c_void, size: size_t) -> *mut c_void;
-    pub fn free(p: *mut c_void);
-    pub fn abort() -> !;
-    pub fn exit(status: c_int) -> !;
-    pub fn _exit(status: c_int) -> !;
-    pub fn atexit(cb: extern fn()) -> c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "system$UNIX2003")]
-    pub fn system(s: *const c_char) -> c_int;
-    pub fn getenv(s: *const c_char) -> *mut c_char;
-
-    pub fn strcpy(dst: *mut c_char, src: *const c_char) -> *mut c_char;
-    pub fn strncpy(dst: *mut c_char, src: *const c_char, n: size_t)
-                   -> *mut c_char;
-    pub fn strcat(s: *mut c_char, ct: *const c_char) -> *mut c_char;
-    pub fn strncat(s: *mut c_char, ct: *const c_char, n: size_t) -> *mut c_char;
-    pub fn strcmp(cs: *const c_char, ct: *const c_char) -> c_int;
-    pub fn strncmp(cs: *const c_char, ct: *const c_char, n: size_t) -> c_int;
-    pub fn strcoll(cs: *const c_char, ct: *const c_char) -> c_int;
-    pub fn strchr(cs: *const c_char, c: c_int) -> *mut c_char;
-    pub fn strrchr(cs: *const c_char, c: c_int) -> *mut c_char;
-    pub fn strspn(cs: *const c_char, ct: *const c_char) -> size_t;
-    pub fn strcspn(cs: *const c_char, ct: *const c_char) -> size_t;
-    pub fn strdup(cs: *const c_char) -> *mut c_char;
-    pub fn strpbrk(cs: *const c_char, ct: *const c_char) -> *mut c_char;
-    pub fn strstr(cs: *const c_char, ct: *const c_char) -> *mut c_char;
-    pub fn strlen(cs: *const c_char) -> size_t;
-    pub fn strnlen(cs: *const c_char, maxlen: size_t) -> size_t;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "strerror$UNIX2003")]
-    pub fn strerror(n: c_int) -> *mut c_char;
-    pub fn strtok(s: *mut c_char, t: *const c_char) -> *mut c_char;
-    pub fn strxfrm(s: *mut c_char, ct: *const c_char, n: size_t) -> size_t;
-    pub fn wcslen(buf: *const wchar_t) -> size_t;
-    pub fn wcstombs(dest: *mut c_char, src: *const wchar_t, n: size_t) -> ::size_t;
-
-    pub fn memchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void;
-    pub fn memcmp(cx: *const c_void, ct: *const c_void, n: size_t) -> c_int;
-    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 {
-    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! {
-    if #[cfg(windows)] {
-        mod windows;
-        pub use windows::*;
-    } else if #[cfg(target_os = "redox")] {
-        mod redox;
-        pub use redox::*;
-    } else if #[cfg(unix)] {
-        mod unix;
-        pub use unix::*;
-    } else {
-        // Unknown target_family
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/macros.rs
+++ /dev/null
@@ -1,108 +0,0 @@
-/// A macro for defining #[cfg] if-else statements.
-///
-/// This is similar to the `if/elif` C preprocessor macro by allowing definition
-/// of a cascade of `#[cfg]` cases, emitting the implementation which matches
-/// first.
-///
-/// This allows you to conveniently provide a long list #[cfg]'d blocks of code
-/// without having to rewrite each clause multiple times.
-macro_rules! cfg_if {
-    ($(
-        if #[cfg($($meta:meta),*)] { $($it:item)* }
-    ) else * else {
-        $($it2:item)*
-    }) => {
-        __cfg_if_items! {
-            () ;
-            $( ( ($($meta),*) ($($it)*) ), )*
-            ( () ($($it2)*) ),
-        }
-    }
-}
-
-macro_rules! __cfg_if_items {
-    (($($not:meta,)*) ; ) => {};
-    (($($not:meta,)*) ; ( ($($m:meta),*) ($($it:item)*) ), $($rest:tt)*) => {
-        __cfg_if_apply! { cfg(all(not(any($($not),*)), $($m,)*)), $($it)* }
-        __cfg_if_items! { ($($not,)* $($m,)*) ; $($rest)* }
-    }
-}
-
-macro_rules! __cfg_if_apply {
-    ($m:meta, $($it:item)*) => {
-        $(#[$m] $it)*
-    }
-}
-
-macro_rules! s {
-    ($($(#[$attr:meta])* pub struct $i:ident { $($field:tt)* })*) => ($(
-        __item! {
-            #[repr(C)]
-            $(#[$attr])*
-            pub struct $i { $($field)* }
-        }
-        impl ::dox::Copy for $i {}
-        impl ::dox::Clone for $i {
-            fn clone(&self) -> $i { *self }
-        }
-    )*)
-}
-
-macro_rules! f {
-    ($(pub fn $i:ident($($arg:ident: $argty:ty),*) -> $ret:ty {
-        $($body:stmt);*
-    })*) => ($(
-        #[inline]
-        #[cfg(not(dox))]
-        pub unsafe extern fn $i($($arg: $argty),*) -> $ret {
-            $($body);*
-        }
-
-        #[cfg(dox)]
-        #[allow(dead_code)]
-        pub unsafe extern fn $i($($arg: $argty),*) -> $ret {
-            loop {}
-        }
-    )*)
-}
-
-macro_rules! __item {
-    ($i:item) => ($i)
-}
-
-#[cfg(test)]
-mod tests {
-    cfg_if! {
-        if #[cfg(test)] {
-            use std::option::Option as Option2;
-            fn works1() -> Option2<u32> { Some(1) }
-        } else {
-            fn works1() -> Option<u32> { None }
-        }
-    }
-
-    cfg_if! {
-        if #[cfg(foo)] {
-            fn works2() -> bool { false }
-        } else if #[cfg(test)] {
-            fn works2() -> bool { true }
-        } else {
-            fn works2() -> bool { false }
-        }
-    }
-
-    cfg_if! {
-        if #[cfg(foo)] {
-            fn works3() -> bool { false }
-        } else {
-            fn works3() -> bool { true }
-        }
-    }
-
-    #[test]
-    fn it_works() {
-        assert!(works1().is_some());
-        assert!(works2());
-        assert!(works3());
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/bsd/apple/b32.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-//! 32-bit specific Apple (ios/darwin) definitions
-
-pub type c_long = i32;
-pub type c_ulong = u32;
-
-s! {
-    pub struct pthread_attr_t {
-        __sig: c_long,
-        __opaque: [::c_char; 36]
-    }
-}
-
-pub const __PTHREAD_MUTEX_SIZE__: usize = 40;
-pub const __PTHREAD_COND_SIZE__: usize = 24;
-pub const __PTHREAD_CONDATTR_SIZE__: usize = 4;
-pub const __PTHREAD_RWLOCK_SIZE__: usize = 124;
-
-pub const TIOCTIMESTAMP: ::c_ulong = 0x40087459;
-pub const TIOCDCDTIMESTAMP: ::c_ulong = 0x40087458;
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/bsd/apple/b64.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-//! 64-bit specific Apple (ios/darwin) definitions
-
-pub type c_long = i64;
-pub type c_ulong = u64;
-
-s! {
-    pub struct pthread_attr_t {
-        __sig: c_long,
-        __opaque: [::c_char; 56]
-    }
-}
-
-pub const __PTHREAD_MUTEX_SIZE__: usize = 56;
-pub const __PTHREAD_COND_SIZE__: usize = 40;
-pub const __PTHREAD_CONDATTR_SIZE__: usize = 8;
-pub const __PTHREAD_RWLOCK_SIZE__: usize = 192;
-
-pub const TIOCTIMESTAMP: ::c_ulong = 0x40107459;
-pub const TIOCDCDTIMESTAMP: ::c_ulong = 0x40107458;
-
-pub const FIONREAD: ::c_ulong = 0x4004667f;
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/bsd/apple/mod.rs
+++ /dev/null
@@ -1,1719 +0,0 @@
-//! Apple (ios/darwin)-specific definitions
-//!
-//! This covers *-apple-* triples currently
-
-pub type clock_t = c_ulong;
-pub type time_t = c_long;
-pub type suseconds_t = i32;
-pub type dev_t = i32;
-pub type ino_t = u64;
-pub type mode_t = u16;
-pub type nlink_t = u16;
-pub type blksize_t = i32;
-pub type rlim_t = u64;
-pub type mach_timebase_info_data_t = mach_timebase_info;
-pub type pthread_key_t = c_ulong;
-pub type sigset_t = u32;
-pub type fsblkcnt_t = ::c_uint;
-pub type fsfilcnt_t = ::c_uint;
-pub type speed_t = ::c_ulong;
-pub type tcflag_t = ::c_ulong;
-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 enum timezone {}
-
-s! {
-    pub struct aiocb {
-        pub aio_fildes: ::c_int,
-        pub aio_offset: ::off_t,
-        pub aio_buf: *mut ::c_void,
-        pub aio_nbytes: ::size_t,
-        pub aio_reqprio: ::c_int,
-        pub aio_sigevent: sigevent,
-        pub aio_lio_opcode: ::c_int
-    }
-
-    pub struct utmpx {
-        pub ut_user: [::c_char; _UTX_USERSIZE],
-        pub ut_id: [::c_char; _UTX_IDSIZE],
-        pub ut_line: [::c_char; _UTX_LINESIZE],
-        pub ut_pid: ::pid_t,
-        pub ut_type: ::c_short,
-        pub ut_tv: ::timeval,
-        pub ut_host: [::c_char; _UTX_HOSTSIZE],
-        ut_pad: [::uint32_t; 16],
-    }
-
-    pub struct glob_t {
-        pub gl_pathc:  ::size_t,
-        __unused1: ::c_int,
-        pub gl_offs:   ::size_t,
-        __unused2: ::c_int,
-        pub gl_pathv:  *mut *mut ::c_char,
-
-        __unused3: *mut ::c_void,
-
-        __unused4: *mut ::c_void,
-        __unused5: *mut ::c_void,
-        __unused6: *mut ::c_void,
-        __unused7: *mut ::c_void,
-        __unused8: *mut ::c_void,
-    }
-
-    pub struct sockaddr_storage {
-        pub ss_len: u8,
-        pub ss_family: ::sa_family_t,
-        __ss_pad1: [u8; 6],
-        __ss_align: i64,
-        __ss_pad2: [u8; 112],
-    }
-
-    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_canonname: *mut ::c_char,
-        pub ai_addr: *mut ::sockaddr,
-        pub ai_next: *mut addrinfo,
-    }
-
-    pub struct mach_timebase_info {
-        pub numer: u32,
-        pub denom: u32,
-    }
-
-    pub struct stat {
-        pub st_dev: dev_t,
-        pub st_mode: mode_t,
-        pub st_nlink: nlink_t,
-        pub st_ino: ino_t,
-        pub st_uid: ::uid_t,
-        pub st_gid: ::gid_t,
-        pub st_rdev: dev_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,
-        pub st_birthtime: time_t,
-        pub st_birthtime_nsec: c_long,
-        pub st_size: ::off_t,
-        pub st_blocks: ::blkcnt_t,
-        pub st_blksize: blksize_t,
-        pub st_flags: ::uint32_t,
-        pub st_gen: ::uint32_t,
-        pub st_lspare: ::int32_t,
-        pub st_qspare: [::int64_t; 2],
-    }
-
-    pub struct dirent {
-        pub d_ino: u64,
-        pub d_seekoff: u64,
-        pub d_reclen: u16,
-        pub d_namlen: u16,
-        pub d_type: u8,
-        pub d_name: [::c_char; 1024],
-    }
-
-    pub struct pthread_mutex_t {
-        __sig: ::c_long,
-        __opaque: [u8; __PTHREAD_MUTEX_SIZE__],
-    }
-
-    pub struct pthread_mutexattr_t {
-        __sig: ::c_long,
-        __opaque: [u8; 8],
-    }
-
-    pub struct pthread_cond_t {
-        __sig: ::c_long,
-        __opaque: [u8; __PTHREAD_COND_SIZE__],
-    }
-
-    pub struct pthread_condattr_t {
-        __sig: ::c_long,
-        __opaque: [u8; __PTHREAD_CONDATTR_SIZE__],
-    }
-
-    pub struct pthread_rwlock_t {
-        __sig: ::c_long,
-        __opaque: [u8; __PTHREAD_RWLOCK_SIZE__],
-    }
-
-    pub struct siginfo_t {
-        pub si_signo: ::c_int,
-        pub si_errno: ::c_int,
-        pub si_code: ::c_int,
-        pub si_pid: ::pid_t,
-        pub si_uid: ::uid_t,
-        pub si_status: ::c_int,
-        pub si_addr: *mut ::c_void,
-        _pad: [usize; 9],
-    }
-
-    pub struct sigaction {
-        pub sa_sigaction: ::sighandler_t,
-        pub sa_mask: sigset_t,
-        pub sa_flags: ::c_int,
-    }
-
-    pub struct stack_t {
-        pub ss_sp: *mut ::c_void,
-        pub ss_size: ::size_t,
-        pub ss_flags: ::c_int,
-    }
-
-    pub struct fstore_t {
-        pub fst_flags: ::c_uint,
-        pub fst_posmode: ::c_int,
-        pub fst_offset: ::off_t,
-        pub fst_length: ::off_t,
-        pub fst_bytesalloc: ::off_t,
-    }
-
-    pub struct radvisory {
-        pub ra_offset: ::off_t,
-        pub ra_count: ::c_int,
-    }
-
-    pub struct statvfs {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_files: ::fsfilcnt_t,
-        pub f_ffree: ::fsfilcnt_t,
-        pub f_favail: ::fsfilcnt_t,
-        pub f_fsid: ::c_ulong,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-    }
-
-    pub struct Dl_info {
-        pub dli_fname: *const ::c_char,
-        pub dli_fbase: *mut ::c_void,
-        pub dli_sname: *const ::c_char,
-        pub dli_saddr: *mut ::c_void,
-    }
-
-    pub struct sockaddr_in {
-        pub sin_len: u8,
-        pub sin_family: ::sa_family_t,
-        pub sin_port: ::in_port_t,
-        pub sin_addr: ::in_addr,
-        pub sin_zero: [::c_char; 8],
-    }
-
-    pub struct statfs {
-        pub f_bsize: ::uint32_t,
-        pub f_iosize: ::int32_t,
-        pub f_blocks: ::uint64_t,
-        pub f_bfree: ::uint64_t,
-        pub f_bavail: ::uint64_t,
-        pub f_files: ::uint64_t,
-        pub f_ffree: ::uint64_t,
-        pub f_fsid: ::fsid_t,
-        pub f_owner: ::uid_t,
-        pub f_type: ::uint32_t,
-        pub f_flags: ::uint32_t,
-        pub f_fssubtype: ::uint32_t,
-        pub f_fstypename: [::c_char; 16],
-        pub f_mntonname: [::c_char; 1024],
-        pub f_mntfromname: [::c_char; 1024],
-        pub f_reserved: [::uint32_t; 8],
-    }
-
-    // FIXME: this should have align 4 but it's got align 8 on 64-bit
-    pub struct kevent {
-        pub ident: ::uintptr_t,
-        pub filter: ::int16_t,
-        pub flags: ::uint16_t,
-        pub fflags: ::uint32_t,
-        pub data: ::intptr_t,
-        pub udata: *mut ::c_void,
-    }
-
-    pub struct kevent64_s {
-        pub ident: ::uint64_t,
-        pub filter: ::int16_t,
-        pub flags: ::uint16_t,
-        pub fflags: ::uint32_t,
-        pub data: ::int64_t,
-        pub udata: ::uint64_t,
-        pub ext: [::uint64_t; 2],
-    }
-
-    pub struct dqblk {
-        pub dqb_bhardlimit: ::uint64_t,
-        pub dqb_bsoftlimit: ::uint64_t,
-        pub dqb_curbytes: ::uint64_t,
-        pub dqb_ihardlimit: ::uint32_t,
-        pub dqb_isoftlimit: ::uint32_t,
-        pub dqb_curinodes: ::uint32_t,
-        pub dqb_btime: ::uint32_t,
-        pub dqb_itime: ::uint32_t,
-        pub dqb_id: ::uint32_t,
-        pub dqb_spare: [::uint32_t; 4],
-    }
-
-    pub struct termios {
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_cc: [::cc_t; ::NCCS],
-        pub c_ispeed: ::speed_t,
-        pub c_ospeed: ::speed_t,
-    }
-
-    pub struct flock {
-        pub l_start: ::off_t,
-        pub l_len: ::off_t,
-        pub l_pid: ::pid_t,
-        pub l_type: ::c_short,
-        pub l_whence: ::c_short,
-    }
-
-    pub struct sf_hdtr {
-        pub headers: *mut ::iovec,
-        pub hdr_cnt: ::c_int,
-        pub trailers: *mut ::iovec,
-        pub trl_cnt: ::c_int,
-    }
-
-    pub struct lconv {
-        pub decimal_point: *mut ::c_char,
-        pub thousands_sep: *mut ::c_char,
-        pub grouping: *mut ::c_char,
-        pub int_curr_symbol: *mut ::c_char,
-        pub currency_symbol: *mut ::c_char,
-        pub mon_decimal_point: *mut ::c_char,
-        pub mon_thousands_sep: *mut ::c_char,
-        pub mon_grouping: *mut ::c_char,
-        pub positive_sign: *mut ::c_char,
-        pub negative_sign: *mut ::c_char,
-        pub int_frac_digits: ::c_char,
-        pub frac_digits: ::c_char,
-        pub p_cs_precedes: ::c_char,
-        pub p_sep_by_space: ::c_char,
-        pub n_cs_precedes: ::c_char,
-        pub n_sep_by_space: ::c_char,
-        pub p_sign_posn: ::c_char,
-        pub n_sign_posn: ::c_char,
-        pub int_p_cs_precedes: ::c_char,
-        pub int_n_cs_precedes: ::c_char,
-        pub int_p_sep_by_space: ::c_char,
-        pub int_n_sep_by_space: ::c_char,
-        pub int_p_sign_posn: ::c_char,
-        pub int_n_sign_posn: ::c_char,
-    }
-
-    pub struct sigevent {
-        pub sigev_notify: ::c_int,
-        pub sigev_signo: ::c_int,
-        pub sigev_value: ::sigval,
-        __unused1: *mut ::c_void,       //actually a function pointer
-        pub sigev_notify_attributes: *mut ::pthread_attr_t
-    }
-}
-
-pub const _UTX_USERSIZE: usize = 256;
-pub const _UTX_LINESIZE: usize = 32;
-pub const _UTX_IDSIZE: usize = 4;
-pub const _UTX_HOSTSIZE: usize = 256;
-
-pub const EMPTY: ::c_short = 0;
-pub const RUN_LVL: ::c_short = 1;
-pub const BOOT_TIME: ::c_short = 2;
-pub const OLD_TIME: ::c_short = 3;
-pub const NEW_TIME: ::c_short = 4;
-pub const INIT_PROCESS: ::c_short = 5;
-pub const LOGIN_PROCESS: ::c_short = 6;
-pub const USER_PROCESS: ::c_short = 7;
-pub const DEAD_PROCESS: ::c_short = 8;
-pub const ACCOUNTING: ::c_short = 9;
-pub const SIGNATURE: ::c_short = 10;
-pub const SHUTDOWN_TIME: ::c_short = 11;
-
-pub const LC_COLLATE_MASK: ::c_int = (1 << 0);
-pub const LC_CTYPE_MASK: ::c_int = (1 << 1);
-pub const LC_MESSAGES_MASK: ::c_int = (1 << 2);
-pub const LC_MONETARY_MASK: ::c_int = (1 << 3);
-pub const LC_NUMERIC_MASK: ::c_int = (1 << 4);
-pub const LC_TIME_MASK: ::c_int = (1 << 5);
-pub const LC_ALL_MASK: ::c_int = LC_COLLATE_MASK
-                               | LC_CTYPE_MASK
-                               | LC_MESSAGES_MASK
-                               | LC_MONETARY_MASK
-                               | LC_NUMERIC_MASK
-                               | LC_TIME_MASK;
-
-pub const CODESET: ::nl_item = 0;
-pub const D_T_FMT: ::nl_item = 1;
-pub const D_FMT: ::nl_item = 2;
-pub const T_FMT: ::nl_item = 3;
-pub const T_FMT_AMPM: ::nl_item = 4;
-pub const AM_STR: ::nl_item = 5;
-pub const PM_STR: ::nl_item = 6;
-
-pub const DAY_1: ::nl_item = 7;
-pub const DAY_2: ::nl_item = 8;
-pub const DAY_3: ::nl_item = 9;
-pub const DAY_4: ::nl_item = 10;
-pub const DAY_5: ::nl_item = 11;
-pub const DAY_6: ::nl_item = 12;
-pub const DAY_7: ::nl_item = 13;
-
-pub const ABDAY_1: ::nl_item = 14;
-pub const ABDAY_2: ::nl_item = 15;
-pub const ABDAY_3: ::nl_item = 16;
-pub const ABDAY_4: ::nl_item = 17;
-pub const ABDAY_5: ::nl_item = 18;
-pub const ABDAY_6: ::nl_item = 19;
-pub const ABDAY_7: ::nl_item = 20;
-
-pub const MON_1: ::nl_item = 21;
-pub const MON_2: ::nl_item = 22;
-pub const MON_3: ::nl_item = 23;
-pub const MON_4: ::nl_item = 24;
-pub const MON_5: ::nl_item = 25;
-pub const MON_6: ::nl_item = 26;
-pub const MON_7: ::nl_item = 27;
-pub const MON_8: ::nl_item = 28;
-pub const MON_9: ::nl_item = 29;
-pub const MON_10: ::nl_item = 30;
-pub const MON_11: ::nl_item = 31;
-pub const MON_12: ::nl_item = 32;
-
-pub const ABMON_1: ::nl_item = 33;
-pub const ABMON_2: ::nl_item = 34;
-pub const ABMON_3: ::nl_item = 35;
-pub const ABMON_4: ::nl_item = 36;
-pub const ABMON_5: ::nl_item = 37;
-pub const ABMON_6: ::nl_item = 38;
-pub const ABMON_7: ::nl_item = 39;
-pub const ABMON_8: ::nl_item = 40;
-pub const ABMON_9: ::nl_item = 41;
-pub const ABMON_10: ::nl_item = 42;
-pub const ABMON_11: ::nl_item = 43;
-pub const ABMON_12: ::nl_item = 44;
-
-pub const ERA: ::nl_item = 45;
-pub const ERA_D_FMT: ::nl_item = 46;
-pub const ERA_D_T_FMT: ::nl_item = 47;
-pub const ERA_T_FMT: ::nl_item = 48;
-pub const ALT_DIGITS: ::nl_item = 49;
-
-pub const RADIXCHAR: ::nl_item = 50;
-pub const THOUSEP: ::nl_item = 51;
-
-pub const YESEXPR: ::nl_item = 52;
-pub const NOEXPR: ::nl_item = 53;
-
-pub const YESSTR: ::nl_item = 54;
-pub const NOSTR: ::nl_item = 55;
-
-pub const CRNCYSTR: ::nl_item = 56;
-
-pub const D_MD_ORDER: ::nl_item = 57;
-
-pub const EXIT_FAILURE: ::c_int = 1;
-pub const EXIT_SUCCESS: ::c_int = 0;
-pub const RAND_MAX: ::c_int = 2147483647;
-pub const EOF: ::c_int = -1;
-pub const SEEK_SET: ::c_int = 0;
-pub const SEEK_CUR: ::c_int = 1;
-pub const SEEK_END: ::c_int = 2;
-pub const _IOFBF: ::c_int = 0;
-pub const _IONBF: ::c_int = 2;
-pub const _IOLBF: ::c_int = 1;
-pub const BUFSIZ: ::c_uint = 1024;
-pub const FOPEN_MAX: ::c_uint = 20;
-pub const FILENAME_MAX: ::c_uint = 1024;
-pub const L_tmpnam: ::c_uint = 1024;
-pub const TMP_MAX: ::c_uint = 308915776;
-pub const _PC_LINK_MAX: ::c_int = 1;
-pub const _PC_MAX_CANON: ::c_int = 2;
-pub const _PC_MAX_INPUT: ::c_int = 3;
-pub const _PC_NAME_MAX: ::c_int = 4;
-pub const _PC_PATH_MAX: ::c_int = 5;
-pub const _PC_PIPE_BUF: ::c_int = 6;
-pub const _PC_CHOWN_RESTRICTED: ::c_int = 7;
-pub const _PC_NO_TRUNC: ::c_int = 8;
-pub const _PC_VDISABLE: ::c_int = 9;
-pub const O_RDONLY: ::c_int = 0;
-pub const O_WRONLY: ::c_int = 1;
-pub const O_RDWR: ::c_int = 2;
-pub const O_APPEND: ::c_int = 8;
-pub const O_CREAT: ::c_int = 512;
-pub const O_EXCL: ::c_int = 2048;
-pub const O_NOCTTY: ::c_int = 131072;
-pub const O_TRUNC: ::c_int = 1024;
-pub const O_CLOEXEC: ::c_int = 0x1000000;
-pub const O_DIRECTORY: ::c_int = 0x100000;
-pub const S_IFIFO: mode_t = 4096;
-pub const S_IFCHR: mode_t = 8192;
-pub const S_IFBLK: mode_t = 24576;
-pub const S_IFDIR: mode_t = 16384;
-pub const S_IFREG: mode_t = 32768;
-pub const S_IFLNK: mode_t = 40960;
-pub const S_IFSOCK: mode_t = 49152;
-pub const S_IFMT: mode_t = 61440;
-pub const S_IEXEC: mode_t = 64;
-pub const S_IWRITE: mode_t = 128;
-pub const S_IREAD: mode_t = 256;
-pub const S_IRWXU: mode_t = 448;
-pub const S_IXUSR: mode_t = 64;
-pub const S_IWUSR: mode_t = 128;
-pub const S_IRUSR: mode_t = 256;
-pub const S_IRWXG: mode_t = 56;
-pub const S_IXGRP: mode_t = 8;
-pub const S_IWGRP: mode_t = 16;
-pub const S_IRGRP: mode_t = 32;
-pub const S_IRWXO: mode_t = 7;
-pub const S_IXOTH: mode_t = 1;
-pub const S_IWOTH: mode_t = 2;
-pub const S_IROTH: mode_t = 4;
-pub const F_OK: ::c_int = 0;
-pub const R_OK: ::c_int = 4;
-pub const W_OK: ::c_int = 2;
-pub const X_OK: ::c_int = 1;
-pub const STDIN_FILENO: ::c_int = 0;
-pub const STDOUT_FILENO: ::c_int = 1;
-pub const STDERR_FILENO: ::c_int = 2;
-pub const F_LOCK: ::c_int = 1;
-pub const F_TEST: ::c_int = 3;
-pub const F_TLOCK: ::c_int = 2;
-pub const F_ULOCK: ::c_int = 0;
-pub const F_GETLK: ::c_int = 7;
-pub const F_SETLK: ::c_int = 8;
-pub const F_SETLKW: ::c_int = 9;
-pub const SIGHUP: ::c_int = 1;
-pub const SIGINT: ::c_int = 2;
-pub const SIGQUIT: ::c_int = 3;
-pub const SIGILL: ::c_int = 4;
-pub const SIGABRT: ::c_int = 6;
-pub const SIGEMT: ::c_int = 7;
-pub const SIGFPE: ::c_int = 8;
-pub const SIGKILL: ::c_int = 9;
-pub const SIGSEGV: ::c_int = 11;
-pub const SIGPIPE: ::c_int = 13;
-pub const SIGALRM: ::c_int = 14;
-pub const SIGTERM: ::c_int = 15;
-
-pub const PROT_NONE: ::c_int = 0;
-pub const PROT_READ: ::c_int = 1;
-pub const PROT_WRITE: ::c_int = 2;
-pub const PROT_EXEC: ::c_int = 4;
-
-pub const MAP_FILE: ::c_int = 0x0000;
-pub const MAP_SHARED: ::c_int = 0x0001;
-pub const MAP_PRIVATE: ::c_int = 0x0002;
-pub const MAP_FIXED: ::c_int = 0x0010;
-pub const MAP_ANON: ::c_int = 0x1000;
-
-pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
-
-pub const MCL_CURRENT: ::c_int = 0x0001;
-pub const MCL_FUTURE: ::c_int = 0x0002;
-
-pub const MS_ASYNC: ::c_int = 0x0001;
-pub const MS_INVALIDATE: ::c_int = 0x0002;
-pub const MS_SYNC: ::c_int = 0x0010;
-
-pub const MS_KILLPAGES: ::c_int = 0x0004;
-pub const MS_DEACTIVATE: ::c_int = 0x0008;
-
-pub const EPERM: ::c_int = 1;
-pub const ENOENT: ::c_int = 2;
-pub const ESRCH: ::c_int = 3;
-pub const EINTR: ::c_int = 4;
-pub const EIO: ::c_int = 5;
-pub const ENXIO: ::c_int = 6;
-pub const E2BIG: ::c_int = 7;
-pub const ENOEXEC: ::c_int = 8;
-pub const EBADF: ::c_int = 9;
-pub const ECHILD: ::c_int = 10;
-pub const EDEADLK: ::c_int = 11;
-pub const ENOMEM: ::c_int = 12;
-pub const EACCES: ::c_int = 13;
-pub const EFAULT: ::c_int = 14;
-pub const ENOTBLK: ::c_int = 15;
-pub const EBUSY: ::c_int = 16;
-pub const EEXIST: ::c_int = 17;
-pub const EXDEV: ::c_int = 18;
-pub const ENODEV: ::c_int = 19;
-pub const ENOTDIR: ::c_int = 20;
-pub const EISDIR: ::c_int = 21;
-pub const EINVAL: ::c_int = 22;
-pub const ENFILE: ::c_int = 23;
-pub const EMFILE: ::c_int = 24;
-pub const ENOTTY: ::c_int = 25;
-pub const ETXTBSY: ::c_int = 26;
-pub const EFBIG: ::c_int = 27;
-pub const ENOSPC: ::c_int = 28;
-pub const ESPIPE: ::c_int = 29;
-pub const EROFS: ::c_int = 30;
-pub const EMLINK: ::c_int = 31;
-pub const EPIPE: ::c_int = 32;
-pub const EDOM: ::c_int = 33;
-pub const ERANGE: ::c_int = 34;
-pub const EAGAIN: ::c_int = 35;
-pub const EWOULDBLOCK: ::c_int = EAGAIN;
-pub const EINPROGRESS: ::c_int = 36;
-pub const EALREADY: ::c_int = 37;
-pub const ENOTSOCK: ::c_int = 38;
-pub const EDESTADDRREQ: ::c_int = 39;
-pub const EMSGSIZE: ::c_int = 40;
-pub const EPROTOTYPE: ::c_int = 41;
-pub const ENOPROTOOPT: ::c_int = 42;
-pub const EPROTONOSUPPORT: ::c_int = 43;
-pub const ESOCKTNOSUPPORT: ::c_int = 44;
-pub const ENOTSUP: ::c_int = 45;
-pub const EPFNOSUPPORT: ::c_int = 46;
-pub const EAFNOSUPPORT: ::c_int = 47;
-pub const EADDRINUSE: ::c_int = 48;
-pub const EADDRNOTAVAIL: ::c_int = 49;
-pub const ENETDOWN: ::c_int = 50;
-pub const ENETUNREACH: ::c_int = 51;
-pub const ENETRESET: ::c_int = 52;
-pub const ECONNABORTED: ::c_int = 53;
-pub const ECONNRESET: ::c_int = 54;
-pub const ENOBUFS: ::c_int = 55;
-pub const EISCONN: ::c_int = 56;
-pub const ENOTCONN: ::c_int = 57;
-pub const ESHUTDOWN: ::c_int = 58;
-pub const ETOOMANYREFS: ::c_int = 59;
-pub const ETIMEDOUT: ::c_int = 60;
-pub const ECONNREFUSED: ::c_int = 61;
-pub const ELOOP: ::c_int = 62;
-pub const ENAMETOOLONG: ::c_int = 63;
-pub const EHOSTDOWN: ::c_int = 64;
-pub const EHOSTUNREACH: ::c_int = 65;
-pub const ENOTEMPTY: ::c_int = 66;
-pub const EPROCLIM: ::c_int = 67;
-pub const EUSERS: ::c_int = 68;
-pub const EDQUOT: ::c_int = 69;
-pub const ESTALE: ::c_int = 70;
-pub const EREMOTE: ::c_int = 71;
-pub const EBADRPC: ::c_int = 72;
-pub const ERPCMISMATCH: ::c_int = 73;
-pub const EPROGUNAVAIL: ::c_int = 74;
-pub const EPROGMISMATCH: ::c_int = 75;
-pub const EPROCUNAVAIL: ::c_int = 76;
-pub const ENOLCK: ::c_int = 77;
-pub const ENOSYS: ::c_int = 78;
-pub const EFTYPE: ::c_int = 79;
-pub const EAUTH: ::c_int = 80;
-pub const ENEEDAUTH: ::c_int = 81;
-pub const EPWROFF: ::c_int = 82;
-pub const EDEVERR: ::c_int = 83;
-pub const EOVERFLOW: ::c_int = 84;
-pub const EBADEXEC: ::c_int = 85;
-pub const EBADARCH: ::c_int = 86;
-pub const ESHLIBVERS: ::c_int = 87;
-pub const EBADMACHO: ::c_int = 88;
-pub const ECANCELED: ::c_int = 89;
-pub const EIDRM: ::c_int = 90;
-pub const ENOMSG: ::c_int = 91;
-pub const EILSEQ: ::c_int = 92;
-pub const ENOATTR: ::c_int = 93;
-pub const EBADMSG: ::c_int = 94;
-pub const EMULTIHOP: ::c_int = 95;
-pub const ENODATA: ::c_int = 96;
-pub const ENOLINK: ::c_int = 97;
-pub const ENOSR: ::c_int = 98;
-pub const ENOSTR: ::c_int = 99;
-pub const EPROTO: ::c_int = 100;
-pub const ETIME: ::c_int = 101;
-pub const EOPNOTSUPP: ::c_int = 102;
-pub const ENOPOLICY: ::c_int = 103;
-pub const ENOTRECOVERABLE: ::c_int = 104;
-pub const EOWNERDEAD: ::c_int = 105;
-pub const EQFULL: ::c_int = 106;
-pub const ELAST: ::c_int = 106;
-
-pub const EAI_SYSTEM: ::c_int = 11;
-
-pub const F_DUPFD: ::c_int = 0;
-pub const F_DUPFD_CLOEXEC: ::c_int = 67;
-pub const F_GETFD: ::c_int = 1;
-pub const F_SETFD: ::c_int = 2;
-pub const F_GETFL: ::c_int = 3;
-pub const F_SETFL: ::c_int = 4;
-pub const F_PREALLOCATE: ::c_int = 42;
-pub const F_RDADVISE: ::c_int = 44;
-pub const F_RDAHEAD: ::c_int = 45;
-pub const F_NOCACHE: ::c_int = 48;
-pub const F_GETPATH: ::c_int = 50;
-pub const F_FULLFSYNC: ::c_int = 51;
-pub const F_FREEZE_FS: ::c_int = 53;
-pub const F_THAW_FS: ::c_int = 54;
-pub const F_GLOBAL_NOCACHE: ::c_int = 55;
-pub const F_NODIRECT: ::c_int = 62;
-
-pub const F_ALLOCATECONTIG: ::c_uint = 0x02;
-pub const F_ALLOCATEALL: ::c_uint = 0x04;
-
-pub const F_PEOFPOSMODE: ::c_int = 3;
-pub const F_VOLPOSMODE: ::c_int = 4;
-
-pub const AT_FDCWD: ::c_int = -2;
-pub const AT_EACCESS: ::c_int = 0x0010;
-pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x0020;
-pub const AT_SYMLINK_FOLLOW: ::c_int = 0x0040;
-pub const AT_REMOVEDIR: ::c_int = 0x0080;
-
-pub const O_ACCMODE: ::c_int = 3;
-
-pub const TIOCMODG: ::c_ulong = 0x40047403;
-pub const TIOCMODS: ::c_ulong = 0x80047404;
-pub const TIOCM_LE: ::c_int = 0x1;
-pub const TIOCM_DTR: ::c_int = 0x2;
-pub const TIOCM_RTS: ::c_int = 0x4;
-pub const TIOCM_ST: ::c_int = 0x8;
-pub const TIOCM_SR: ::c_int = 0x10;
-pub const TIOCM_CTS: ::c_int = 0x20;
-pub const TIOCM_CAR: ::c_int = 0x40;
-pub const TIOCM_CD: ::c_int = 0x40;
-pub const TIOCM_RNG: ::c_int = 0x80;
-pub const TIOCM_RI: ::c_int = 0x80;
-pub const TIOCM_DSR: ::c_int = 0x100;
-pub const TIOCEXCL: ::c_int = 0x2000740d;
-pub const TIOCNXCL: ::c_int = 0x2000740e;
-pub const TIOCFLUSH: ::c_ulong = 0x80047410;
-pub const TIOCGETD: ::c_ulong = 0x4004741a;
-pub const TIOCSETD: ::c_ulong = 0x8004741b;
-pub const TIOCIXON: ::c_uint = 0x20007481;
-pub const TIOCIXOFF: ::c_uint = 0x20007480;
-pub const TIOCSBRK: ::c_uint = 0x2000747b;
-pub const TIOCCBRK: ::c_uint = 0x2000747a;
-pub const TIOCSDTR: ::c_uint = 0x20007479;
-pub const TIOCCDTR: ::c_uint = 0x20007478;
-pub const TIOCGPGRP: ::c_ulong = 0x40047477;
-pub const TIOCSPGRP: ::c_ulong = 0x80047476;
-pub const TIOCOUTQ: ::c_ulong = 0x40047473;
-pub const TIOCSTI: ::c_ulong = 0x80017472;
-pub const TIOCNOTTY: ::c_uint = 0x20007471;
-pub const TIOCPKT: ::c_ulong = 0x80047470;
-pub const TIOCPKT_DATA: ::c_int = 0x0;
-pub const TIOCPKT_FLUSHREAD: ::c_int = 0x1;
-pub const TIOCPKT_FLUSHWRITE: ::c_int = 0x2;
-pub const TIOCPKT_STOP: ::c_int = 0x4;
-pub const TIOCPKT_START: ::c_int = 0x8;
-pub const TIOCPKT_NOSTOP: ::c_int = 0x10;
-pub const TIOCPKT_DOSTOP: ::c_int = 0x20;
-pub const TIOCPKT_IOCTL: ::c_int = 0x40;
-pub const TIOCSTOP: ::c_uint = 0x2000746f;
-pub const TIOCSTART: ::c_uint = 0x2000746e;
-pub const TIOCMSET: ::c_ulong = 0x8004746d;
-pub const TIOCMBIS: ::c_ulong = 0x8004746c;
-pub const TIOCMBIC: ::c_ulong = 0x8004746b;
-pub const TIOCMGET: ::c_ulong = 0x4004746a;
-pub const TIOCREMOTE: ::c_ulong = 0x80047469;
-pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
-pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
-pub const TIOCUCNTL: ::c_ulong = 0x80047466;
-pub const TIOCSTAT: ::c_uint = 0x20007465;
-pub const TIOCSCONS: ::c_uint = 0x20007463;
-pub const TIOCCONS: ::c_ulong = 0x80047462;
-pub const TIOCSCTTY: ::c_uint = 0x20007461;
-pub const TIOCEXT: ::c_ulong = 0x80047460;
-pub const TIOCSIG: ::c_uint = 0x2000745f;
-pub const TIOCDRAIN: ::c_uint = 0x2000745e;
-pub const TIOCMSDTRWAIT: ::c_ulong = 0x8004745b;
-pub const TIOCMGDTRWAIT: ::c_ulong = 0x4004745a;
-pub const TIOCSDRAINWAIT: ::c_ulong = 0x80047457;
-pub const TIOCGDRAINWAIT: ::c_ulong = 0x40047456;
-pub const TIOCDSIMICROCODE: ::c_uint = 0x20007455;
-pub const TIOCPTYGRANT: ::c_uint = 0x20007454;
-pub const TIOCPTYGNAME: ::c_uint = 0x40807453;
-pub const TIOCPTYUNLK: ::c_uint = 0x20007452;
-
-pub const B0: speed_t = 0;
-pub const B50: speed_t = 50;
-pub const B75: speed_t = 75;
-pub const B110: speed_t = 110;
-pub const B134: speed_t = 134;
-pub const B150: speed_t = 150;
-pub const B200: speed_t = 200;
-pub const B300: speed_t = 300;
-pub const B600: speed_t = 600;
-pub const B1200: speed_t = 1200;
-pub const B1800: speed_t = 1800;
-pub const B2400: speed_t = 2400;
-pub const B4800: speed_t = 4800;
-pub const B9600: speed_t = 9600;
-pub const B19200: speed_t = 19200;
-pub const B38400: speed_t = 38400;
-pub const B7200: speed_t = 7200;
-pub const B14400: speed_t = 14400;
-pub const B28800: speed_t = 28800;
-pub const B57600: speed_t = 57600;
-pub const B76800: speed_t = 76800;
-pub const B115200: speed_t = 115200;
-pub const B230400: speed_t = 230400;
-pub const EXTA: speed_t = 19200;
-pub const EXTB: speed_t = 38400;
-
-pub const SIGTRAP: ::c_int = 5;
-
-pub const GLOB_APPEND  : ::c_int = 0x0001;
-pub const GLOB_DOOFFS  : ::c_int = 0x0002;
-pub const GLOB_ERR     : ::c_int = 0x0004;
-pub const GLOB_MARK    : ::c_int = 0x0008;
-pub const GLOB_NOCHECK : ::c_int = 0x0010;
-pub const GLOB_NOSORT  : ::c_int = 0x0020;
-pub const GLOB_NOESCAPE: ::c_int = 0x2000;
-
-pub const GLOB_NOSPACE : ::c_int = -1;
-pub const GLOB_ABORTED : ::c_int = -2;
-pub const GLOB_NOMATCH : ::c_int = -3;
-
-pub const POSIX_MADV_NORMAL: ::c_int = 0;
-pub const POSIX_MADV_RANDOM: ::c_int = 1;
-pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2;
-pub const POSIX_MADV_WILLNEED: ::c_int = 3;
-pub const POSIX_MADV_DONTNEED: ::c_int = 4;
-
-pub const _SC_IOV_MAX: ::c_int = 56;
-pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 70;
-pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 71;
-pub const _SC_LOGIN_NAME_MAX: ::c_int = 73;
-pub const _SC_MQ_PRIO_MAX: ::c_int = 75;
-pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 82;
-pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 83;
-pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 85;
-pub const _SC_THREAD_KEYS_MAX: ::c_int = 86;
-pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 87;
-pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 88;
-pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 89;
-pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 90;
-pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 91;
-pub const _SC_THREAD_STACK_MIN: ::c_int = 93;
-pub const _SC_THREAD_THREADS_MAX: ::c_int = 94;
-pub const _SC_THREADS: ::c_int = 96;
-pub const _SC_TTY_NAME_MAX: ::c_int = 101;
-pub const _SC_ATEXIT_MAX: ::c_int = 107;
-pub const _SC_XOPEN_CRYPT: ::c_int = 108;
-pub const _SC_XOPEN_ENH_I18N: ::c_int = 109;
-pub const _SC_XOPEN_LEGACY: ::c_int = 110;
-pub const _SC_XOPEN_REALTIME: ::c_int = 111;
-pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 112;
-pub const _SC_XOPEN_SHM: ::c_int = 113;
-pub const _SC_XOPEN_UNIX: ::c_int = 115;
-pub const _SC_XOPEN_VERSION: ::c_int = 116;
-pub const _SC_XOPEN_XCU_VERSION: ::c_int = 121;
-
-pub const PTHREAD_CREATE_JOINABLE: ::c_int = 1;
-pub const PTHREAD_CREATE_DETACHED: ::c_int = 2;
-pub const PTHREAD_STACK_MIN: ::size_t = 8192;
-
-pub const RLIMIT_CPU: ::c_int = 0;
-pub const RLIMIT_FSIZE: ::c_int = 1;
-pub const RLIMIT_DATA: ::c_int = 2;
-pub const RLIMIT_STACK: ::c_int = 3;
-pub const RLIMIT_CORE: ::c_int = 4;
-pub const RLIMIT_AS: ::c_int = 5;
-pub const RLIMIT_RSS: ::c_int = RLIMIT_AS;
-pub const RLIMIT_MEMLOCK: ::c_int = 6;
-pub const RLIMIT_NPROC: ::c_int = 7;
-pub const RLIMIT_NOFILE: ::c_int = 8;
-pub const RLIM_NLIMITS: ::c_int = 9;
-pub const _RLIMIT_POSIX_FLAG: ::c_int = 0x1000;
-
-pub const RLIM_INFINITY: rlim_t = 0x7fff_ffff_ffff_ffff;
-
-pub const RUSAGE_SELF: ::c_int = 0;
-pub const RUSAGE_CHILDREN: ::c_int = -1;
-
-pub const MADV_NORMAL: ::c_int = 0;
-pub const MADV_RANDOM: ::c_int = 1;
-pub const MADV_SEQUENTIAL: ::c_int = 2;
-pub const MADV_WILLNEED: ::c_int = 3;
-pub const MADV_DONTNEED: ::c_int = 4;
-pub const MADV_FREE: ::c_int = 5;
-pub const MADV_ZERO_WIRED_PAGES: ::c_int = 6;
-pub const MADV_FREE_REUSABLE: ::c_int = 7;
-pub const MADV_FREE_REUSE: ::c_int = 8;
-pub const MADV_CAN_REUSE: ::c_int = 9;
-
-pub const MINCORE_INCORE: ::c_int =  0x1;
-pub const MINCORE_REFERENCED: ::c_int = 0x2;
-pub const MINCORE_MODIFIED: ::c_int = 0x4;
-pub const MINCORE_REFERENCED_OTHER: ::c_int = 0x8;
-pub const MINCORE_MODIFIED_OTHER: ::c_int = 0x10;
-
-pub const AF_UNSPEC: ::c_int = 0;
-pub const AF_LOCAL: ::c_int = 1;
-pub const AF_UNIX: ::c_int = AF_LOCAL;
-pub const AF_INET: ::c_int = 2;
-pub const AF_IMPLINK: ::c_int = 3;
-pub const AF_PUP: ::c_int = 4;
-pub const AF_CHAOS: ::c_int = 5;
-pub const AF_NS: ::c_int = 6;
-pub const AF_ISO: ::c_int = 7;
-pub const AF_OSI: ::c_int = AF_ISO;
-pub const AF_ECMA: ::c_int = 8;
-pub const AF_DATAKIT: ::c_int = 9;
-pub const AF_CCITT: ::c_int = 10;
-pub const AF_SNA: ::c_int = 11;
-pub const AF_DECnet: ::c_int = 12;
-pub const AF_DLI: ::c_int = 13;
-pub const AF_LAT: ::c_int = 14;
-pub const AF_HYLINK: ::c_int = 15;
-pub const AF_APPLETALK: ::c_int = 16;
-pub const AF_ROUTE: ::c_int = 17;
-pub const AF_LINK: ::c_int = 18;
-pub const pseudo_AF_XTP: ::c_int = 19;
-pub const AF_COIP: ::c_int = 20;
-pub const AF_CNT: ::c_int = 21;
-pub const pseudo_AF_RTIP: ::c_int = 22;
-pub const AF_IPX: ::c_int = 23;
-pub const AF_SIP: ::c_int = 24;
-pub const pseudo_AF_PIP: ::c_int = 25;
-pub const AF_ISDN: ::c_int = 28;
-pub const AF_E164: ::c_int = AF_ISDN;
-pub const pseudo_AF_KEY: ::c_int = 29;
-pub const AF_INET6: ::c_int = 30;
-pub const AF_NATM: ::c_int = 31;
-pub const AF_SYSTEM: ::c_int = 32;
-pub const AF_NETBIOS: ::c_int = 33;
-pub const AF_PPP: ::c_int = 34;
-pub const pseudo_AF_HDRCMPLT: ::c_int = 35;
-#[doc(hidden)]
-pub const AF_MAX: ::c_int = 40;
-
-pub const PF_UNSPEC: ::c_int = AF_UNSPEC;
-pub const PF_LOCAL: ::c_int = AF_LOCAL;
-pub const PF_UNIX: ::c_int =  PF_LOCAL;
-pub const PF_INET: ::c_int =  AF_INET;
-pub const PF_IMPLINK: ::c_int = AF_IMPLINK;
-pub const PF_PUP: ::c_int =  AF_PUP;
-pub const PF_CHAOS: ::c_int = AF_CHAOS;
-pub const PF_NS: ::c_int =  AF_NS;
-pub const PF_ISO: ::c_int =  AF_ISO;
-pub const PF_OSI: ::c_int =  AF_ISO;
-pub const PF_ECMA: ::c_int =  AF_ECMA;
-pub const PF_DATAKIT: ::c_int = AF_DATAKIT;
-pub const PF_CCITT: ::c_int = AF_CCITT;
-pub const PF_SNA: ::c_int =  AF_SNA;
-pub const PF_DECnet: ::c_int = AF_DECnet;
-pub const PF_DLI: ::c_int =  AF_DLI;
-pub const PF_LAT: ::c_int =  AF_LAT;
-pub const PF_HYLINK: ::c_int = AF_HYLINK;
-pub const PF_APPLETALK: ::c_int = AF_APPLETALK;
-pub const PF_ROUTE: ::c_int = AF_ROUTE;
-pub const PF_LINK: ::c_int =  AF_LINK;
-pub const PF_XTP: ::c_int =  pseudo_AF_XTP;
-pub const PF_COIP: ::c_int =  AF_COIP;
-pub const PF_CNT: ::c_int =  AF_CNT;
-pub const PF_SIP: ::c_int =  AF_SIP;
-pub const PF_IPX: ::c_int =  AF_IPX;
-pub const PF_RTIP: ::c_int =  pseudo_AF_RTIP;
-pub const PF_PIP: ::c_int =  pseudo_AF_PIP;
-pub const PF_ISDN: ::c_int =  AF_ISDN;
-pub const PF_KEY: ::c_int =  pseudo_AF_KEY;
-pub const PF_INET6: ::c_int = AF_INET6;
-pub const PF_NATM: ::c_int =  AF_NATM;
-pub const PF_SYSTEM: ::c_int = AF_SYSTEM;
-pub const PF_NETBIOS: ::c_int = AF_NETBIOS;
-pub const PF_PPP: ::c_int =  AF_PPP;
-#[doc(hidden)]
-pub const PF_MAX: ::c_int =  AF_MAX;
-
-#[doc(hidden)]
-pub const NET_MAXID: ::c_int = AF_MAX;
-
-pub const NET_RT_DUMP: ::c_int = 1;
-pub const NET_RT_FLAGS: ::c_int = 2;
-pub const NET_RT_IFLIST: ::c_int = 3;
-#[doc(hidden)]
-pub const NET_RT_MAXID: ::c_int = 10;
-
-pub const SOMAXCONN: ::c_int = 128;
-
-pub const SOCK_MAXADDRLEN: ::c_int = 255;
-
-pub const SOCK_STREAM: ::c_int = 1;
-pub const SOCK_DGRAM: ::c_int = 2;
-pub const SOCK_RAW: ::c_int = 3;
-pub const SOCK_RDM: ::c_int = 4;
-pub const SOCK_SEQPACKET: ::c_int = 5;
-pub const IPPROTO_ICMP: ::c_int = 1;
-pub const IPPROTO_ICMPV6: ::c_int = 58;
-pub const IPPROTO_TCP: ::c_int = 6;
-pub const IPPROTO_IP: ::c_int = 0;
-pub const IPPROTO_IPV6: ::c_int = 41;
-pub const IP_MULTICAST_TTL: ::c_int = 10;
-pub const IP_MULTICAST_LOOP: ::c_int = 11;
-pub const IP_TTL: ::c_int = 4;
-pub const IP_HDRINCL: ::c_int = 2;
-pub const IP_ADD_MEMBERSHIP: ::c_int = 12;
-pub const IP_DROP_MEMBERSHIP: ::c_int = 13;
-pub const IPV6_JOIN_GROUP: ::c_int = 12;
-pub const IPV6_LEAVE_GROUP: ::c_int = 13;
-
-pub const TCP_NODELAY: ::c_int = 0x01;
-pub const TCP_KEEPALIVE: ::c_int = 0x10;
-pub const SOL_SOCKET: ::c_int = 0xffff;
-
-pub const SO_DEBUG: ::c_int = 0x01;
-pub const SO_ACCEPTCONN: ::c_int = 0x0002;
-pub const SO_REUSEADDR: ::c_int = 0x0004;
-pub const SO_KEEPALIVE: ::c_int = 0x0008;
-pub const SO_DONTROUTE: ::c_int = 0x0010;
-pub const SO_BROADCAST: ::c_int = 0x0020;
-pub const SO_USELOOPBACK: ::c_int = 0x0040;
-pub const SO_LINGER: ::c_int = 0x0080;
-pub const SO_OOBINLINE: ::c_int = 0x0100;
-pub const SO_REUSEPORT: ::c_int = 0x0200;
-pub const SO_TIMESTAMP: ::c_int = 0x0400;
-pub const SO_DONTTRUNC: ::c_int = 0x2000;
-pub const SO_WANTMORE: ::c_int = 0x4000;
-pub const SO_WANTOOBFLAG: ::c_int = 0x8000;
-pub const SO_SNDBUF: ::c_int = 0x1001;
-pub const SO_RCVBUF: ::c_int = 0x1002;
-pub const SO_SNDLOWAT: ::c_int = 0x1003;
-pub const SO_RCVLOWAT: ::c_int = 0x1004;
-pub const SO_SNDTIMEO: ::c_int = 0x1005;
-pub const SO_RCVTIMEO: ::c_int = 0x1006;
-pub const SO_ERROR: ::c_int = 0x1007;
-pub const SO_TYPE: ::c_int = 0x1008;
-pub const SO_NREAD: ::c_int = 0x1020;
-pub const SO_NKE: ::c_int = 0x1021;
-pub const SO_NOSIGPIPE: ::c_int = 0x1022;
-pub const SO_NOADDRERR: ::c_int = 0x1023;
-pub const SO_NWRITE: ::c_int = 0x1024;
-
-pub const MSG_OOB: ::c_int =  0x1;
-pub const MSG_PEEK: ::c_int = 0x2;
-pub const MSG_DONTROUTE: ::c_int = 0x4;
-pub const MSG_EOR: ::c_int =  0x8;
-pub const MSG_TRUNC: ::c_int = 0x10;
-pub const MSG_CTRUNC: ::c_int = 0x20;
-pub const MSG_WAITALL: ::c_int = 0x40;
-pub const MSG_DONTWAIT: ::c_int = 0x80;
-pub const MSG_EOF: ::c_int =  0x100;
-pub const MSG_FLUSH: ::c_int = 0x400;
-pub const MSG_HOLD: ::c_int = 0x800;
-pub const MSG_SEND: ::c_int = 0x1000;
-pub const MSG_HAVEMORE: ::c_int = 0x2000;
-pub const MSG_RCVMORE: ::c_int = 0x4000;
-// pub const MSG_COMPAT: ::c_int = 0x8000;
-
-pub const SCM_RIGHTS: ::c_int = 0x01;
-pub const SCM_TIMESTAMP: ::c_int = 0x02;
-pub const SCM_CREDS: ::c_int = 0x03;
-
-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;
-
-pub const LOCK_SH: ::c_int = 1;
-pub const LOCK_EX: ::c_int = 2;
-pub const LOCK_NB: ::c_int = 4;
-pub const LOCK_UN: ::c_int = 8;
-
-pub const O_DSYNC: ::c_int = 4194304;
-pub const O_SYNC: ::c_int = 128;
-pub const O_NONBLOCK: ::c_int = 4;
-
-pub const MAP_COPY: ::c_int = 0x0002;
-pub const MAP_RENAME: ::c_int = 0x0020;
-pub const MAP_NORESERVE: ::c_int = 0x0040;
-pub const MAP_NOEXTEND: ::c_int = 0x0100;
-pub const MAP_HASSEMAPHORE: ::c_int = 0x0200;
-pub const MAP_NOCACHE: ::c_int = 0x0400;
-pub const MAP_JIT: ::c_int = 0x0800;
-
-pub const IPPROTO_RAW: ::c_int = 255;
-
-pub const _SC_ARG_MAX: ::c_int = 1;
-pub const _SC_CHILD_MAX: ::c_int = 2;
-pub const _SC_CLK_TCK: ::c_int = 3;
-pub const _SC_NGROUPS_MAX: ::c_int = 4;
-pub const _SC_OPEN_MAX: ::c_int = 5;
-pub const _SC_JOB_CONTROL: ::c_int = 6;
-pub const _SC_SAVED_IDS: ::c_int = 7;
-pub const _SC_VERSION: ::c_int = 8;
-pub const _SC_BC_BASE_MAX: ::c_int = 9;
-pub const _SC_BC_DIM_MAX: ::c_int = 10;
-pub const _SC_BC_SCALE_MAX: ::c_int = 11;
-pub const _SC_BC_STRING_MAX: ::c_int = 12;
-pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 13;
-pub const _SC_EXPR_NEST_MAX: ::c_int = 14;
-pub const _SC_LINE_MAX: ::c_int = 15;
-pub const _SC_RE_DUP_MAX: ::c_int = 16;
-pub const _SC_2_VERSION: ::c_int = 17;
-pub const _SC_2_C_BIND: ::c_int = 18;
-pub const _SC_2_C_DEV: ::c_int = 19;
-pub const _SC_2_CHAR_TERM: ::c_int = 20;
-pub const _SC_2_FORT_DEV: ::c_int = 21;
-pub const _SC_2_FORT_RUN: ::c_int = 22;
-pub const _SC_2_LOCALEDEF: ::c_int = 23;
-pub const _SC_2_SW_DEV: ::c_int = 24;
-pub const _SC_2_UPE: ::c_int = 25;
-pub const _SC_STREAM_MAX: ::c_int = 26;
-pub const _SC_TZNAME_MAX: ::c_int = 27;
-pub const _SC_ASYNCHRONOUS_IO: ::c_int = 28;
-pub const _SC_PAGESIZE: ::c_int = 29;
-pub const _SC_MEMLOCK: ::c_int = 30;
-pub const _SC_MEMLOCK_RANGE: ::c_int = 31;
-pub const _SC_MEMORY_PROTECTION: ::c_int = 32;
-pub const _SC_MESSAGE_PASSING: ::c_int = 33;
-pub const _SC_PRIORITIZED_IO: ::c_int = 34;
-pub const _SC_PRIORITY_SCHEDULING: ::c_int = 35;
-pub const _SC_REALTIME_SIGNALS: ::c_int = 36;
-pub const _SC_SEMAPHORES: ::c_int = 37;
-pub const _SC_FSYNC: ::c_int = 38;
-pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 39;
-pub const _SC_SYNCHRONIZED_IO: ::c_int = 40;
-pub const _SC_TIMERS: ::c_int = 41;
-pub const _SC_AIO_LISTIO_MAX: ::c_int = 42;
-pub const _SC_AIO_MAX: ::c_int = 43;
-pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 44;
-pub const _SC_DELAYTIMER_MAX: ::c_int = 45;
-pub const _SC_MQ_OPEN_MAX: ::c_int = 46;
-pub const _SC_MAPPED_FILES: ::c_int = 47;
-pub const _SC_RTSIG_MAX: ::c_int = 48;
-pub const _SC_SEM_NSEMS_MAX: ::c_int = 49;
-pub const _SC_SEM_VALUE_MAX: ::c_int = 50;
-pub const _SC_SIGQUEUE_MAX: ::c_int = 51;
-pub const _SC_TIMER_MAX: ::c_int = 52;
-pub const _SC_NPROCESSORS_CONF: ::c_int = 57;
-pub const _SC_NPROCESSORS_ONLN: ::c_int = 58;
-pub const _SC_2_PBS: ::c_int = 59;
-pub const _SC_2_PBS_ACCOUNTING: ::c_int = 60;
-pub const _SC_2_PBS_CHECKPOINT: ::c_int = 61;
-pub const _SC_2_PBS_LOCATE: ::c_int = 62;
-pub const _SC_2_PBS_MESSAGE: ::c_int = 63;
-pub const _SC_2_PBS_TRACK: ::c_int = 64;
-pub const _SC_ADVISORY_INFO: ::c_int = 65;
-pub const _SC_BARRIERS: ::c_int = 66;
-pub const _SC_CLOCK_SELECTION: ::c_int = 67;
-pub const _SC_CPUTIME: ::c_int = 68;
-pub const _SC_FILE_LOCKING: ::c_int = 69;
-pub const _SC_HOST_NAME_MAX: ::c_int = 72;
-pub const _SC_MONOTONIC_CLOCK: ::c_int = 74;
-pub const _SC_READER_WRITER_LOCKS: ::c_int = 76;
-pub const _SC_REGEXP: ::c_int = 77;
-pub const _SC_SHELL: ::c_int = 78;
-pub const _SC_SPAWN: ::c_int = 79;
-pub const _SC_SPIN_LOCKS: ::c_int = 80;
-pub const _SC_SPORADIC_SERVER: ::c_int = 81;
-pub const _SC_THREAD_CPUTIME: ::c_int = 84;
-pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 92;
-pub const _SC_TIMEOUTS: ::c_int = 95;
-pub const _SC_TRACE: ::c_int = 97;
-pub const _SC_TRACE_EVENT_FILTER: ::c_int = 98;
-pub const _SC_TRACE_INHERIT: ::c_int = 99;
-pub const _SC_TRACE_LOG: ::c_int = 100;
-pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 102;
-pub const _SC_V6_ILP32_OFF32: ::c_int = 103;
-pub const _SC_V6_ILP32_OFFBIG: ::c_int = 104;
-pub const _SC_V6_LP64_OFF64: ::c_int = 105;
-pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 106;
-pub const _SC_IPV6: ::c_int = 118;
-pub const _SC_RAW_SOCKETS: ::c_int = 119;
-pub const _SC_SYMLOOP_MAX: ::c_int = 120;
-pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
-pub const _SC_XOPEN_STREAMS: ::c_int = 114;
-pub const _SC_XBS5_ILP32_OFF32: ::c_int = 122;
-pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 123;
-pub const _SC_XBS5_LP64_OFF64: ::c_int = 124;
-pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 125;
-pub const _SC_SS_REPL_MAX: ::c_int = 126;
-pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 127;
-pub const _SC_TRACE_NAME_MAX: ::c_int = 128;
-pub const _SC_TRACE_SYS_MAX: ::c_int = 129;
-pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 130;
-pub const _SC_PASS_MAX: ::c_int = 131;
-
-pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
-pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 1;
-pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2;
-pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
-pub const _PTHREAD_MUTEX_SIG_init: ::c_long = 0x32AAABA7;
-pub const _PTHREAD_COND_SIG_init: ::c_long = 0x3CB0B1BB;
-pub const _PTHREAD_RWLOCK_SIG_init: ::c_long = 0x2DA8B3B4;
-pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
-    __sig: _PTHREAD_MUTEX_SIG_init,
-    __opaque: [0; __PTHREAD_MUTEX_SIZE__],
-};
-pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
-    __sig: _PTHREAD_COND_SIG_init,
-    __opaque: [0; __PTHREAD_COND_SIZE__],
-};
-pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
-    __sig: _PTHREAD_RWLOCK_SIG_init,
-    __opaque: [0; __PTHREAD_RWLOCK_SIZE__],
-};
-
-pub const SIGSTKSZ: ::size_t = 131072;
-
-pub const FD_SETSIZE: usize = 1024;
-
-pub const ST_NOSUID: ::c_ulong = 2;
-
-pub const EVFILT_READ: ::int16_t = -1;
-pub const EVFILT_WRITE: ::int16_t = -2;
-pub const EVFILT_AIO: ::int16_t = -3;
-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_MACHPORT: ::int16_t = -8;
-pub const EVFILT_FS: ::int16_t = -9;
-pub const EVFILT_USER: ::int16_t = -10;
-pub const EVFILT_VM: ::int16_t = -12;
-
-pub const EV_ADD: ::uint16_t = 0x1;
-pub const EV_DELETE: ::uint16_t = 0x2;
-pub const EV_ENABLE: ::uint16_t = 0x4;
-pub const EV_DISABLE: ::uint16_t = 0x8;
-pub const EV_ONESHOT: ::uint16_t = 0x10;
-pub const EV_CLEAR: ::uint16_t = 0x20;
-pub const EV_RECEIPT: ::uint16_t = 0x40;
-pub const EV_DISPATCH: ::uint16_t = 0x80;
-pub const EV_FLAG0: ::uint16_t = 0x1000;
-pub const EV_POLL: ::uint16_t = 0x1000;
-pub const EV_FLAG1: ::uint16_t = 0x2000;
-pub const EV_OOBAND: ::uint16_t = 0x2000;
-pub const EV_ERROR: ::uint16_t = 0x4000;
-pub const EV_EOF: ::uint16_t = 0x8000;
-pub const EV_SYSFLAGS: ::uint16_t = 0xf000;
-
-pub const NOTE_TRIGGER: ::uint32_t = 0x01000000;
-pub const NOTE_FFNOP: ::uint32_t = 0x00000000;
-pub const NOTE_FFAND: ::uint32_t = 0x40000000;
-pub const NOTE_FFOR: ::uint32_t = 0x80000000;
-pub const NOTE_FFCOPY: ::uint32_t = 0xc0000000;
-pub const NOTE_FFCTRLMASK: ::uint32_t = 0xc0000000;
-pub const NOTE_FFLAGSMASK: ::uint32_t = 0x00ffffff;
-pub const NOTE_LOWAT: ::uint32_t = 0x00000001;
-pub const NOTE_DELETE: ::uint32_t = 0x00000001;
-pub const NOTE_WRITE: ::uint32_t = 0x00000002;
-pub const NOTE_EXTEND: ::uint32_t = 0x00000004;
-pub const NOTE_ATTRIB: ::uint32_t = 0x00000008;
-pub const NOTE_LINK: ::uint32_t = 0x00000010;
-pub const NOTE_RENAME: ::uint32_t = 0x00000020;
-pub const NOTE_REVOKE: ::uint32_t = 0x00000040;
-pub const NOTE_NONE: ::uint32_t = 0x00000080;
-pub const NOTE_EXIT: ::uint32_t = 0x80000000;
-pub const NOTE_FORK: ::uint32_t = 0x40000000;
-pub const NOTE_EXEC: ::uint32_t = 0x20000000;
-pub const NOTE_REAP: ::uint32_t = 0x10000000;
-pub const NOTE_SIGNAL: ::uint32_t = 0x08000000;
-pub const NOTE_EXITSTATUS: ::uint32_t = 0x04000000;
-pub const NOTE_EXIT_DETAIL: ::uint32_t = 0x02000000;
-pub const NOTE_PDATAMASK: ::uint32_t = 0x000fffff;
-pub const NOTE_PCTRLMASK: ::uint32_t = 0xfff00000;
-pub const NOTE_EXIT_REPARENTED: ::uint32_t = 0x00080000;
-pub const NOTE_EXIT_DETAIL_MASK: ::uint32_t = 0x00070000;
-pub const NOTE_EXIT_DECRYPTFAIL: ::uint32_t = 0x00010000;
-pub const NOTE_EXIT_MEMORY: ::uint32_t = 0x00020000;
-pub const NOTE_EXIT_CSERROR: ::uint32_t = 0x00040000;
-pub const NOTE_VM_PRESSURE: ::uint32_t = 0x80000000;
-pub const NOTE_VM_PRESSURE_TERMINATE: ::uint32_t = 0x40000000;
-pub const NOTE_VM_PRESSURE_SUDDEN_TERMINATE: ::uint32_t = 0x20000000;
-pub const NOTE_VM_ERROR: ::uint32_t = 0x10000000;
-pub const NOTE_SECONDS: ::uint32_t = 0x00000001;
-pub const NOTE_USECONDS: ::uint32_t = 0x00000002;
-pub const NOTE_NSECONDS: ::uint32_t = 0x00000004;
-pub const NOTE_ABSOLUTE: ::uint32_t = 0x00000008;
-pub const NOTE_LEEWAY: ::uint32_t = 0x00000010;
-pub const NOTE_CRITICAL: ::uint32_t = 0x00000020;
-pub const NOTE_BACKGROUND: ::uint32_t = 0x00000040;
-pub const NOTE_TRACK: ::uint32_t = 0x00000001;
-pub const NOTE_TRACKERR: ::uint32_t = 0x00000002;
-pub const NOTE_CHILD: ::uint32_t = 0x00000004;
-
-pub const NL0: ::c_int  = 0x00000000;
-pub const NL1: ::c_int  = 0x00000100;
-pub const TAB0: ::c_int = 0x00000000;
-pub const TAB1: ::c_int = 0x00000400;
-pub const TAB2: ::c_int = 0x00000800;
-pub const CR0: ::c_int  = 0x00000000;
-pub const CR1: ::c_int  = 0x00001000;
-pub const CR2: ::c_int  = 0x00002000;
-pub const CR3: ::c_int  = 0x00003000;
-pub const FF0: ::c_int  = 0x00000000;
-pub const FF1: ::c_int  = 0x00004000;
-pub const BS0: ::c_int  = 0x00000000;
-pub const BS1: ::c_int  = 0x00008000;
-pub const TAB3: ::c_int = 0x00000004;
-pub const VT0: ::c_int  = 0x00000000;
-pub const VT1: ::c_int  = 0x00010000;
-pub const IUTF8: ::tcflag_t = 0x00004000;
-pub const CRTSCTS: ::tcflag_t = 0x00030000;
-
-pub const NI_MAXHOST: ::socklen_t = 1025;
-
-pub const Q_GETQUOTA: ::c_int = 0x300;
-pub const Q_SETQUOTA: ::c_int = 0x400;
-
-pub const RTLD_LOCAL: ::c_int = 0x4;
-pub const RTLD_FIRST: ::c_int = 0x100;
-pub const RTLD_NODELETE: ::c_int = 0x80;
-pub const RTLD_NOLOAD: ::c_int = 0x10;
-pub const RTLD_GLOBAL: ::c_int = 0x8;
-
-pub const _WSTOPPED: ::c_int = 0o177;
-
-pub const LOG_NETINFO: ::c_int = 12 << 3;
-pub const LOG_REMOTEAUTH: ::c_int = 13 << 3;
-pub const LOG_INSTALL: ::c_int = 14 << 3;
-pub const LOG_RAS: ::c_int = 15 << 3;
-pub const LOG_LAUNCHD: ::c_int = 24 << 3;
-pub const LOG_NFACILITIES: ::c_int = 25;
-
-pub const CTLTYPE: ::c_int = 0xf;
-pub const CTLTYPE_NODE: ::c_int = 1;
-pub const CTLTYPE_INT: ::c_int = 2;
-pub const CTLTYPE_STRING: ::c_int = 3;
-pub const CTLTYPE_QUAD: ::c_int = 4;
-pub const CTLTYPE_OPAQUE: ::c_int = 5;
-pub const CTLTYPE_STRUCT: ::c_int = CTLTYPE_OPAQUE;
-pub const CTLFLAG_RD: ::c_int = 0x80000000;
-pub const CTLFLAG_WR: ::c_int = 0x40000000;
-pub const CTLFLAG_RW: ::c_int = CTLFLAG_RD | CTLFLAG_WR;
-pub const CTLFLAG_NOLOCK: ::c_int = 0x20000000;
-pub const CTLFLAG_ANYBODY: ::c_int = 0x10000000;
-pub const CTLFLAG_SECURE: ::c_int = 0x08000000;
-pub const CTLFLAG_MASKED: ::c_int = 0x04000000;
-pub const CTLFLAG_NOAUTO: ::c_int = 0x02000000;
-pub const CTLFLAG_KERN: ::c_int = 0x01000000;
-pub const CTLFLAG_LOCKED: ::c_int = 0x00800000;
-pub const CTLFLAG_OID2: ::c_int = 0x00400000;
-pub const CTL_UNSPEC: ::c_int = 0;
-pub const CTL_KERN: ::c_int = 1;
-pub const CTL_VM: ::c_int = 2;
-pub const CTL_VFS: ::c_int = 3;
-pub const CTL_NET: ::c_int = 4;
-pub const CTL_DEBUG: ::c_int = 5;
-pub const CTL_HW: ::c_int = 6;
-pub const CTL_MACHDEP: ::c_int = 7;
-pub const CTL_USER: ::c_int = 8;
-pub const CTL_MAXID: ::c_int = 9;
-pub const KERN_OSTYPE: ::c_int = 1;
-pub const KERN_OSRELEASE: ::c_int = 2;
-pub const KERN_OSREV: ::c_int = 3;
-pub const KERN_VERSION: ::c_int = 4;
-pub const KERN_MAXVNODES: ::c_int = 5;
-pub const KERN_MAXPROC: ::c_int = 6;
-pub const KERN_MAXFILES: ::c_int = 7;
-pub const KERN_ARGMAX: ::c_int = 8;
-pub const KERN_SECURELVL: ::c_int = 9;
-pub const KERN_HOSTNAME: ::c_int = 10;
-pub const KERN_HOSTID: ::c_int = 11;
-pub const KERN_CLOCKRATE: ::c_int = 12;
-pub const KERN_VNODE: ::c_int = 13;
-pub const KERN_PROC: ::c_int = 14;
-pub const KERN_FILE: ::c_int = 15;
-pub const KERN_PROF: ::c_int = 16;
-pub const KERN_POSIX1: ::c_int = 17;
-pub const KERN_NGROUPS: ::c_int = 18;
-pub const KERN_JOB_CONTROL: ::c_int = 19;
-pub const KERN_SAVED_IDS: ::c_int = 20;
-pub const KERN_BOOTTIME: ::c_int = 21;
-pub const KERN_NISDOMAINNAME: ::c_int = 22;
-pub const KERN_DOMAINNAME: ::c_int = KERN_NISDOMAINNAME;
-pub const KERN_MAXPARTITIONS: ::c_int = 23;
-pub const KERN_KDEBUG: ::c_int = 24;
-pub const KERN_UPDATEINTERVAL: ::c_int = 25;
-pub const KERN_OSRELDATE: ::c_int = 26;
-pub const KERN_NTP_PLL: ::c_int = 27;
-pub const KERN_BOOTFILE: ::c_int = 28;
-pub const KERN_MAXFILESPERPROC: ::c_int = 29;
-pub const KERN_MAXPROCPERUID: ::c_int = 30;
-pub const KERN_DUMPDEV: ::c_int = 31;
-pub const KERN_IPC: ::c_int = 32;
-pub const KERN_DUMMY: ::c_int = 33;
-pub const KERN_PS_STRINGS: ::c_int = 34;
-pub const KERN_USRSTACK32: ::c_int = 35;
-pub const KERN_LOGSIGEXIT: ::c_int = 36;
-pub const KERN_SYMFILE: ::c_int = 37;
-pub const KERN_PROCARGS: ::c_int = 38;
-pub const KERN_NETBOOT: ::c_int = 40;
-pub const KERN_SYSV: ::c_int = 42;
-pub const KERN_AFFINITY: ::c_int = 43;
-pub const KERN_TRANSLATE: ::c_int = 44;
-pub const KERN_CLASSIC: ::c_int = KERN_TRANSLATE;
-pub const KERN_EXEC: ::c_int = 45;
-pub const KERN_CLASSICHANDLER: ::c_int = KERN_EXEC;
-pub const KERN_AIOMAX: ::c_int = 46;
-pub const KERN_AIOPROCMAX: ::c_int = 47;
-pub const KERN_AIOTHREADS: ::c_int = 48;
-pub const KERN_COREFILE: ::c_int = 50;
-pub const KERN_COREDUMP: ::c_int = 51;
-pub const KERN_SUGID_COREDUMP: ::c_int = 52;
-pub const KERN_PROCDELAYTERM: ::c_int = 53;
-pub const KERN_SHREG_PRIVATIZABLE: ::c_int = 54;
-pub const KERN_LOW_PRI_WINDOW: ::c_int = 56;
-pub const KERN_LOW_PRI_DELAY: ::c_int = 57;
-pub const KERN_POSIX: ::c_int = 58;
-pub const KERN_USRSTACK64: ::c_int = 59;
-pub const KERN_NX_PROTECTION: ::c_int = 60;
-pub const KERN_TFP: ::c_int = 61;
-pub const KERN_PROCNAME: ::c_int = 62;
-pub const KERN_THALTSTACK: ::c_int = 63;
-pub const KERN_SPECULATIVE_READS: ::c_int = 64;
-pub const KERN_OSVERSION: ::c_int = 65;
-pub const KERN_SAFEBOOT: ::c_int = 66;
-pub const KERN_RAGEVNODE: ::c_int = 68;
-pub const KERN_TTY: ::c_int = 69;
-pub const KERN_CHECKOPENEVT: ::c_int = 70;
-pub const KERN_THREADNAME: ::c_int = 71;
-pub const KERN_MAXID: ::c_int = 72;
-pub const KERN_RAGE_PROC: ::c_int = 1;
-pub const KERN_RAGE_THREAD: ::c_int = 2;
-pub const KERN_UNRAGE_PROC: ::c_int = 3;
-pub const KERN_UNRAGE_THREAD: ::c_int = 4;
-pub const KERN_OPENEVT_PROC: ::c_int = 1;
-pub const KERN_UNOPENEVT_PROC: ::c_int = 2;
-pub const KERN_TFP_POLICY: ::c_int = 1;
-pub const KERN_TFP_POLICY_DENY: ::c_int = 0;
-pub const KERN_TFP_POLICY_DEFAULT: ::c_int = 2;
-pub const KERN_KDEFLAGS: ::c_int = 1;
-pub const KERN_KDDFLAGS: ::c_int = 2;
-pub const KERN_KDENABLE: ::c_int = 3;
-pub const KERN_KDSETBUF: ::c_int = 4;
-pub const KERN_KDGETBUF: ::c_int = 5;
-pub const KERN_KDSETUP: ::c_int = 6;
-pub const KERN_KDREMOVE: ::c_int = 7;
-pub const KERN_KDSETREG: ::c_int = 8;
-pub const KERN_KDGETREG: ::c_int = 9;
-pub const KERN_KDREADTR: ::c_int = 10;
-pub const KERN_KDPIDTR: ::c_int = 11;
-pub const KERN_KDTHRMAP: ::c_int = 12;
-pub const KERN_KDPIDEX: ::c_int = 14;
-pub const KERN_KDSETRTCDEC: ::c_int = 15;
-pub const KERN_KDGETENTROPY: ::c_int = 16;
-pub const KERN_KDWRITETR: ::c_int = 17;
-pub const KERN_KDWRITEMAP: ::c_int = 18;
-pub const KERN_KDENABLE_BG_TRACE: ::c_int = 19;
-pub const KERN_KDDISABLE_BG_TRACE: ::c_int = 20;
-pub const KERN_KDREADCURTHRMAP: ::c_int = 21;
-pub const KERN_KDSET_TYPEFILTER: ::c_int = 22;
-pub const KERN_KDBUFWAIT: ::c_int = 23;
-pub const KERN_KDCPUMAP: ::c_int = 24;
-pub const KERN_PROC_ALL: ::c_int = 0;
-pub const KERN_PROC_PID: ::c_int = 1;
-pub const KERN_PROC_PGRP: ::c_int = 2;
-pub const KERN_PROC_SESSION: ::c_int = 3;
-pub const KERN_PROC_TTY: ::c_int = 4;
-pub const KERN_PROC_UID: ::c_int = 5;
-pub const KERN_PROC_RUID: ::c_int = 6;
-pub const KERN_PROC_LCID: ::c_int = 7;
-pub const KIPC_MAXSOCKBUF: ::c_int = 1;
-pub const KIPC_SOCKBUF_WASTE: ::c_int = 2;
-pub const KIPC_SOMAXCONN: ::c_int = 3;
-pub const KIPC_MAX_LINKHDR: ::c_int = 4;
-pub const KIPC_MAX_PROTOHDR: ::c_int = 5;
-pub const KIPC_MAX_HDR: ::c_int = 6;
-pub const KIPC_MAX_DATALEN: ::c_int = 7;
-pub const KIPC_MBSTAT: ::c_int = 8;
-pub const KIPC_NMBCLUSTERS: ::c_int = 9;
-pub const KIPC_SOQLIMITCOMPAT: ::c_int = 10;
-pub const VM_METER: ::c_int = 1;
-pub const VM_LOADAVG: ::c_int = 2;
-pub const VM_MACHFACTOR: ::c_int = 4;
-pub const VM_SWAPUSAGE: ::c_int = 5;
-pub const VM_MAXID: ::c_int = 6;
-pub const HW_MACHINE: ::c_int = 1;
-pub const HW_MODEL: ::c_int = 2;
-pub const HW_NCPU: ::c_int = 3;
-pub const HW_BYTEORDER: ::c_int = 4;
-pub const HW_PHYSMEM: ::c_int = 5;
-pub const HW_USERMEM: ::c_int = 6;
-pub const HW_PAGESIZE: ::c_int = 7;
-pub const HW_DISKNAMES: ::c_int = 8;
-pub const HW_DISKSTATS: ::c_int = 9;
-pub const HW_EPOCH: ::c_int = 10;
-pub const HW_FLOATINGPT: ::c_int = 11;
-pub const HW_MACHINE_ARCH: ::c_int = 12;
-pub const HW_VECTORUNIT: ::c_int = 13;
-pub const HW_BUS_FREQ: ::c_int = 14;
-pub const HW_CPU_FREQ: ::c_int = 15;
-pub const HW_CACHELINE: ::c_int = 16;
-pub const HW_L1ICACHESIZE: ::c_int = 17;
-pub const HW_L1DCACHESIZE: ::c_int = 18;
-pub const HW_L2SETTINGS: ::c_int = 19;
-pub const HW_L2CACHESIZE: ::c_int = 20;
-pub const HW_L3SETTINGS: ::c_int = 21;
-pub const HW_L3CACHESIZE: ::c_int = 22;
-pub const HW_TB_FREQ: ::c_int = 23;
-pub const HW_MEMSIZE: ::c_int = 24;
-pub const HW_AVAILCPU: ::c_int = 25;
-pub const HW_MAXID: ::c_int = 26;
-pub const USER_CS_PATH: ::c_int = 1;
-pub const USER_BC_BASE_MAX: ::c_int = 2;
-pub const USER_BC_DIM_MAX: ::c_int = 3;
-pub const USER_BC_SCALE_MAX: ::c_int = 4;
-pub const USER_BC_STRING_MAX: ::c_int = 5;
-pub const USER_COLL_WEIGHTS_MAX: ::c_int = 6;
-pub const USER_EXPR_NEST_MAX: ::c_int = 7;
-pub const USER_LINE_MAX: ::c_int = 8;
-pub const USER_RE_DUP_MAX: ::c_int = 9;
-pub const USER_POSIX2_VERSION: ::c_int = 10;
-pub const USER_POSIX2_C_BIND: ::c_int = 11;
-pub const USER_POSIX2_C_DEV: ::c_int = 12;
-pub const USER_POSIX2_CHAR_TERM: ::c_int = 13;
-pub const USER_POSIX2_FORT_DEV: ::c_int = 14;
-pub const USER_POSIX2_FORT_RUN: ::c_int = 15;
-pub const USER_POSIX2_LOCALEDEF: ::c_int = 16;
-pub const USER_POSIX2_SW_DEV: ::c_int = 17;
-pub const USER_POSIX2_UPE: ::c_int = 18;
-pub const USER_STREAM_MAX: ::c_int = 19;
-pub const USER_TZNAME_MAX: ::c_int = 20;
-pub const USER_MAXID: ::c_int = 21;
-pub const CTL_DEBUG_NAME: ::c_int = 0;
-pub const CTL_DEBUG_VALUE: ::c_int = 1;
-pub const CTL_DEBUG_MAXID: ::c_int = 20;
-
-pub const POLLRDNORM: ::c_short = 0x040;
-pub const POLLWRNORM: ::c_short = 0x004;
-pub const POLLRDBAND: ::c_short = 0x080;
-pub const POLLWRBAND: ::c_short = 0x100;
-
-pub const PRIO_DARWIN_THREAD: ::c_int = 3;
-pub const PRIO_DARWIN_PROCESS: ::c_int = 4;
-pub const PRIO_DARWIN_BG: ::c_int = 0x1000;
-pub const PRIO_DARWIN_NONUI: ::c_int = 0x1001;
-
-pub const SEM_FAILED: *mut sem_t = -1isize as *mut ::sem_t;
-
-pub const SIGEV_NONE: ::c_int = 0;
-pub const SIGEV_SIGNAL: ::c_int = 1;
-pub const SIGEV_THREAD: ::c_int = 3;
-
-pub const AIO_CANCELED: ::c_int = 2;
-pub const AIO_NOTCANCELED: ::c_int = 4;
-pub const AIO_ALLDONE: ::c_int = 1;
-pub const AIO_LISTIO_MAX: ::c_int = 16;
-pub const LIO_NOP: ::c_int = 0;
-pub const LIO_WRITE: ::c_int = 2;
-pub const LIO_READ: ::c_int = 1;
-pub const LIO_WAIT: ::c_int = 2;
-pub const LIO_NOWAIT: ::c_int = 1;
-
-pub const WEXITED: ::c_int = 0x00000004;
-pub const WSTOPPED: ::c_int = 0x00000008;
-pub const WCONTINUED: ::c_int = 0x00000010;
-pub const WNOWAIT: ::c_int = 0x00000020;
-
-pub const P_ALL: idtype_t = 0;
-pub const P_PID: idtype_t = 1;
-pub const P_PGID: idtype_t = 2;
-
-pub const XATTR_NOFOLLOW: ::c_int = 0x0001;
-pub const XATTR_CREATE: ::c_int = 0x0002;
-pub const XATTR_REPLACE: ::c_int = 0x0004;
-pub const XATTR_NOSECURITY: ::c_int = 0x0008;
-pub const XATTR_NODEFAULT: ::c_int = 0x0010;
-pub const XATTR_SHOWCOMPRESSION: ::c_int = 0x0020;
-
-f! {
-    pub fn WSTOPSIG(status: ::c_int) -> ::c_int {
-        status >> 8
-    }
-
-    pub fn _WSTATUS(status: ::c_int) -> ::c_int {
-        status & 0x7f
-    }
-
-    pub fn WIFCONTINUED(status: ::c_int) -> bool {
-        _WSTATUS(status) == _WSTOPPED && WSTOPSIG(status) == 0x13
-    }
-
-    pub fn WIFSIGNALED(status: ::c_int) -> bool {
-        _WSTATUS(status) != _WSTOPPED && _WSTATUS(status) != 0
-    }
-
-    pub fn WIFSTOPPED(status: ::c_int) -> bool {
-        _WSTATUS(status) == _WSTOPPED && WSTOPSIG(status) != 0x13
-    }
-}
-
-extern {
-    pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int;
-    pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
-    pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
-    pub fn aio_error(aiocbp: *const aiocb) -> ::c_int;
-    pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "aio_suspend$UNIX2003")]
-    pub fn aio_suspend(aiocb_list: *const *const aiocb, nitems: ::c_int,
-                       timeout: *const ::timespec) -> ::c_int;
-    pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
-    pub fn lio_listio(mode: ::c_int, aiocb_list: *const *mut aiocb,
-                      nitems: ::c_int, sevp: *mut sigevent) -> ::c_int;
-
-    pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
-
-    pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
-
-    pub fn getutxent() -> *mut utmpx;
-    pub fn getutxid(ut: *const utmpx) -> *mut utmpx;
-    pub fn getutxline(ut: *const utmpx) -> *mut utmpx;
-    pub fn pututxline(ut: *const utmpx) -> *mut utmpx;
-    pub fn setutxent();
-    pub fn endutxent();
-    pub fn utmpxname(file: *const ::c_char) -> ::c_int;
-
-    pub fn getnameinfo(sa: *const ::sockaddr,
-                       salen: ::socklen_t,
-                       host: *mut ::c_char,
-                       hostlen: ::socklen_t,
-                       serv: *mut ::c_char,
-                       sevlen: ::socklen_t,
-                       flags: ::c_int) -> ::c_int;
-    pub fn mincore(addr: *const ::c_void, len: ::size_t,
-                   vec: *mut ::c_char) -> ::c_int;
-    pub fn sysctlnametomib(name: *const ::c_char,
-                           mibp: *mut ::c_int,
-                           sizep: *mut ::size_t)
-                           -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "mprotect$UNIX2003")]
-    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 sysctl(name: *mut ::c_int,
-                  namelen: ::c_uint,
-                  oldp: *mut ::c_void,
-                  oldlenp: *mut ::size_t,
-                  newp: *mut ::c_void,
-                  newlen: ::size_t)
-                  -> ::c_int;
-    pub fn sysctlbyname(name: *const ::c_char,
-                        oldp: *mut ::c_void,
-                        oldlenp: *mut ::size_t,
-                        newp: *mut ::c_void,
-                        newlen: ::size_t)
-                        -> ::c_int;
-    pub fn mach_absolute_time() -> u64;
-    pub fn mach_timebase_info(info: *mut ::mach_timebase_info) -> ::c_int;
-    pub fn pthread_setname_np(name: *const ::c_char) -> ::c_int;
-    pub fn pthread_get_stackaddr_np(thread: ::pthread_t) -> *mut ::c_void;
-    pub fn pthread_get_stacksize_np(thread: ::pthread_t) -> ::size_t;
-    pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t,
-                                       pshared: ::c_int) -> ::c_int;
-    pub fn pthread_condattr_getpshared(attr: *const pthread_condattr_t,
-                                       pshared: *mut ::c_int) -> ::c_int;
-    pub fn pthread_mutexattr_setpshared(attr: *mut pthread_mutexattr_t,
-                                        pshared: ::c_int) -> ::c_int;
-    pub fn pthread_mutexattr_getpshared(attr: *const pthread_mutexattr_t,
-                                        pshared: *mut ::c_int) -> ::c_int;
-    pub fn __error() -> *mut ::c_int;
-    pub fn backtrace(buf: *mut *mut ::c_void,
-                     sz: ::c_int) -> ::c_int;
-    #[cfg_attr(target_os = "macos", link_name = "statfs$INODE64")]
-    pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int;
-    #[cfg_attr(target_os = "macos", link_name = "fstatfs$INODE64")]
-    pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int;
-    pub fn kevent(kq: ::c_int,
-                  changelist: *const ::kevent,
-                  nchanges: ::c_int,
-                  eventlist: *mut ::kevent,
-                  nevents: ::c_int,
-                  timeout: *const ::timespec) -> ::c_int;
-    pub fn kevent64(kq: ::c_int,
-                    changelist: *const ::kevent64_s,
-                    nchanges: ::c_int,
-                    eventlist: *mut ::kevent64_s,
-                    nevents: ::c_int,
-                    flags: ::c_uint,
-                    timeout: *const ::timespec) -> ::c_int;
-    pub fn mount(src: *const ::c_char,
-                 target: *const ::c_char,
-                 flags: ::c_int,
-                 data: *mut ::c_void) -> ::c_int;
-    pub fn ptrace(requeset: ::c_int,
-                  pid: ::pid_t,
-                  addr: *mut ::c_char,
-                  data: ::c_int) -> ::c_int;
-    pub fn quotactl(special: *const ::c_char,
-                    cmd: ::c_int,
-                    id: ::c_int,
-                    data: *mut ::c_char) -> ::c_int;
-    pub fn sethostname(name: *const ::c_char, len: ::c_int) -> ::c_int;
-    pub fn sendfile(fd: ::c_int,
-                    s: ::c_int,
-                    offset: ::off_t,
-                    len: *mut ::off_t,
-                    hdtr: *mut ::sf_hdtr,
-                    flags: ::c_int) -> ::c_int;
-    pub fn openpty(amaster: *mut ::c_int,
-                   aslave: *mut ::c_int,
-                   name: *mut ::c_char,
-                   termp: *mut termios,
-                   winp: *mut ::winsize) -> ::c_int;
-    pub fn forkpty(amaster: *mut ::c_int,
-                   name: *mut ::c_char,
-                   termp: *mut termios,
-                   winp: *mut ::winsize) -> ::pid_t;
-    pub fn duplocale(base: ::locale_t) -> ::locale_t;
-    pub fn freelocale(loc: ::locale_t) -> ::c_int;
-    pub fn localeconv_l(loc: ::locale_t) -> *mut lconv;
-    pub fn newlocale(mask: ::c_int,
-                     locale: *const ::c_char,
-                     base: ::locale_t) -> ::locale_t;
-    pub fn uselocale(loc: ::locale_t) -> ::locale_t;
-    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 getxattr(path: *const ::c_char, name: *const ::c_char,
-                    value: *mut ::c_void, size: ::size_t, position: u32,
-                    flags: ::c_int) -> ::ssize_t;
-    pub fn fgetxattr(filedes: ::c_int, name: *const ::c_char,
-                     value: *mut ::c_void, size: ::size_t, position: u32,
-                     flags: ::c_int) -> ::ssize_t;
-    pub fn setxattr(path: *const ::c_char, name: *const ::c_char,
-                    value: *const ::c_void, size: ::size_t, position: u32,
-                    flags: ::c_int) -> ::c_int;
-    pub fn fsetxattr(filedes: ::c_int, name: *const ::c_char,
-                     value: *const ::c_void, size: ::size_t, position: u32,
-                     flags: ::c_int) -> ::c_int;
-    pub fn listxattr(path: *const ::c_char, list: *mut ::c_char,
-                     size: ::size_t, flags: ::c_int) -> ::ssize_t;
-    pub fn flistxattr(filedes: ::c_int, list: *mut ::c_char,
-                      size: ::size_t, flags: ::c_int) -> ::ssize_t;
-    pub fn removexattr(path: *const ::c_char, name: *const ::c_char,
-                       flags: ::c_int) -> ::c_int;
-    pub fn fremovexattr(filedes: ::c_int, name: *const ::c_char,
-                        flags: ::c_int) -> ::c_int;
-
-    pub fn initgroups(user: *const ::c_char, basegroup: ::c_int) -> ::c_int;
-
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "waitid$UNIX2003")]
-    pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t,
-                  options: ::c_int) -> ::c_int;
-    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;
-}
-
-cfg_if! {
-    if #[cfg(any(target_arch = "arm", target_arch = "x86"))] {
-        mod b32;
-        pub use self::b32::*;
-    } else if #[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))] {
-        mod b64;
-        pub use self::b64::*;
-    } else {
-        // Unknown target_arch
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/bsd/freebsdlike/dragonfly/mod.rs
+++ /dev/null
@@ -1,420 +0,0 @@
-pub type clock_t = u64;
-pub type ino_t = u64;
-pub type nlink_t = u32;
-pub type blksize_t = i64;
-pub type clockid_t = ::c_ulong;
-
-pub type c_long = i64;
-pub type c_ulong = u64;
-pub type time_t = i64;
-pub type suseconds_t = i64;
-
-pub type uuid_t = ::uuid;
-
-pub type fsblkcnt_t = u64;
-pub type fsfilcnt_t = u64;
-
-pub type sem_t = *mut sem;
-
-pub enum sem {}
-
-s! {
-
-    pub struct exit_status {
-        pub e_termination: u16,
-        pub e_exit: u16
-    }
-
-    pub struct utmpx {
-        pub ut_name: [::c_char; 32],
-        pub ut_id: [::c_char; 4],
-
-        pub ut_line: [::c_char; 32],
-        pub ut_host: [::c_char; 256],
-
-        pub ut_unused: [u8; 16],
-        pub ut_session: u16,
-        pub ut_type: u16,
-        pub ut_pid: ::pid_t,
-        ut_exit: exit_status,
-        ut_ss: ::sockaddr_storage,
-        pub ut_tv: ::timeval,
-        pub ut_unused2: [u8; 16],
-    }
-
-    pub struct aiocb {
-        pub aio_fildes: ::c_int,
-        pub aio_offset: ::off_t,
-        pub aio_buf: *mut ::c_void,
-        pub aio_nbytes: ::size_t,
-        pub aio_sigevent: sigevent,
-        pub aio_lio_opcode: ::c_int,
-        pub aio_reqprio: ::c_int,
-        _aio_val: ::c_int,
-        _aio_err: ::c_int
-    }
-
-    pub struct dirent {
-        pub d_fileno: ::ino_t,
-        pub d_namlen: u16,
-        pub d_type: u8,
-        __unused1: u8,
-        __unused2: u32,
-        pub d_name: [::c_char; 256],
-    }
-
-    pub struct uuid {
-        pub time_low: u32,
-        pub time_mid: u16,
-        pub time_hi_and_version: u16,
-        pub clock_seq_hi_and_reserved: u8,
-        pub clock_seq_low: u8,
-        pub node: [u8; 6],
-    }
-
-    pub struct sigevent {
-        pub sigev_notify: ::c_int,
-        // The union is 8-byte in size, so it is aligned at a 8-byte offset.
-        #[cfg(target_pointer_width = "64")]
-        __unused1: ::c_int,
-        pub sigev_signo: ::c_int,       //actually a union
-        // pad the union
-        #[cfg(target_pointer_width = "64")]
-        __unused2: ::c_int,
-        pub sigev_value: ::sigval,
-        __unused3: *mut ::c_void        //actually a function pointer
-    }
-
-    pub struct statvfs {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_files: ::fsfilcnt_t,
-        pub f_ffree: ::fsfilcnt_t,
-        pub f_favail: ::fsfilcnt_t,
-        pub f_fsid: ::c_ulong,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-        pub f_owner: ::uid_t,
-        pub f_type: ::c_uint,
-        pub f_syncreads: u64,
-        pub f_syncwrites: u64,
-        pub f_asyncreads: u64,
-        pub f_asyncwrites: u64,
-        pub f_fsid_uuid: ::uuid_t,
-        pub f_uid_uuid: ::uuid_t,
-    }
-
-    pub struct stat {
-        pub st_ino: ::ino_t,
-        pub st_nlink: ::nlink_t,
-        pub st_dev: ::dev_t,
-        pub st_mode: ::mode_t,
-        pub st_padding1: ::uint16_t,
-        pub st_uid: ::uid_t,
-        pub st_gid: ::gid_t,
-        pub st_rdev: ::dev_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,
-        pub st_size: ::off_t,
-        pub st_blocks: ::int64_t,
-        pub st_blksize: ::uint32_t,
-        pub st_flags: ::uint32_t,
-        pub st_gen: ::uint32_t,
-        pub st_lspare: ::int32_t,
-        pub st_qspare1: ::int64_t,
-        pub st_qspare2: ::int64_t,
-    }
-}
-
-pub const RAND_MAX: ::c_int = 0x7fff_ffff;
-pub const PTHREAD_STACK_MIN: ::size_t = 1024;
-pub const SIGSTKSZ: ::size_t = 40960;
-pub const MADV_INVAL: ::c_int = 10;
-pub const O_CLOEXEC: ::c_int = 0x00020000;
-pub const F_GETLK: ::c_int = 7;
-pub const F_SETLK: ::c_int = 8;
-pub const F_SETLKW: ::c_int = 9;
-pub const ELAST: ::c_int = 99;
-pub const RLIMIT_POSIXLOCKS: ::c_int = 11;
-pub const RLIM_NLIMITS: ::rlim_t = 12;
-
-pub const Q_GETQUOTA: ::c_int = 0x300;
-pub const Q_SETQUOTA: ::c_int = 0x400;
-
-pub const CLOCK_REALTIME: clockid_t = 0;
-pub const CLOCK_VIRTUAL: clockid_t = 1;
-pub const CLOCK_PROF: clockid_t = 2;
-pub const CLOCK_MONOTONIC: clockid_t = 4;
-pub const CLOCK_UPTIME: clockid_t = 5;
-pub const CLOCK_UPTIME_PRECISE: clockid_t = 7;
-pub const CLOCK_UPTIME_FAST: clockid_t = 8;
-pub const CLOCK_REALTIME_PRECISE: clockid_t = 9;
-pub const CLOCK_REALTIME_FAST: clockid_t = 10;
-pub const CLOCK_MONOTONIC_PRECISE: clockid_t = 11;
-pub const CLOCK_MONOTONIC_FAST: clockid_t = 12;
-pub const CLOCK_SECOND: clockid_t = 13;
-pub const CLOCK_THREAD_CPUTIME_ID: clockid_t = 14;
-pub const CLOCK_PROCESS_CPUTIME_ID: clockid_t = 15;
-
-pub const CTL_UNSPEC: ::c_int = 0;
-pub const CTL_KERN: ::c_int = 1;
-pub const CTL_VM: ::c_int = 2;
-pub const CTL_VFS: ::c_int = 3;
-pub const CTL_NET: ::c_int = 4;
-pub const CTL_DEBUG: ::c_int = 5;
-pub const CTL_HW: ::c_int = 6;
-pub const CTL_MACHDEP: ::c_int = 7;
-pub const CTL_USER: ::c_int = 8;
-pub const CTL_P1003_1B: ::c_int = 9;
-pub const CTL_LWKT: ::c_int = 10;
-pub const CTL_MAXID: ::c_int = 11;
-pub const KERN_OSTYPE: ::c_int = 1;
-pub const KERN_OSRELEASE: ::c_int = 2;
-pub const KERN_OSREV: ::c_int = 3;
-pub const KERN_VERSION: ::c_int = 4;
-pub const KERN_MAXVNODES: ::c_int = 5;
-pub const KERN_MAXPROC: ::c_int = 6;
-pub const KERN_MAXFILES: ::c_int = 7;
-pub const KERN_ARGMAX: ::c_int = 8;
-pub const KERN_SECURELVL: ::c_int = 9;
-pub const KERN_HOSTNAME: ::c_int = 10;
-pub const KERN_HOSTID: ::c_int = 11;
-pub const KERN_CLOCKRATE: ::c_int = 12;
-pub const KERN_VNODE: ::c_int = 13;
-pub const KERN_PROC: ::c_int = 14;
-pub const KERN_FILE: ::c_int = 15;
-pub const KERN_PROF: ::c_int = 16;
-pub const KERN_POSIX1: ::c_int = 17;
-pub const KERN_NGROUPS: ::c_int = 18;
-pub const KERN_JOB_CONTROL: ::c_int = 19;
-pub const KERN_SAVED_IDS: ::c_int = 20;
-pub const KERN_BOOTTIME: ::c_int = 21;
-pub const KERN_NISDOMAINNAME: ::c_int = 22;
-pub const KERN_UPDATEINTERVAL: ::c_int = 23;
-pub const KERN_OSRELDATE: ::c_int = 24;
-pub const KERN_NTP_PLL: ::c_int = 25;
-pub const KERN_BOOTFILE: ::c_int = 26;
-pub const KERN_MAXFILESPERPROC: ::c_int = 27;
-pub const KERN_MAXPROCPERUID: ::c_int = 28;
-pub const KERN_DUMPDEV: ::c_int = 29;
-pub const KERN_IPC: ::c_int = 30;
-pub const KERN_DUMMY: ::c_int = 31;
-pub const KERN_PS_STRINGS: ::c_int = 32;
-pub const KERN_USRSTACK: ::c_int = 33;
-pub const KERN_LOGSIGEXIT: ::c_int = 34;
-pub const KERN_IOV_MAX: ::c_int = 35;
-pub const KERN_MAXPOSIXLOCKSPERUID: ::c_int = 36;
-pub const KERN_MAXID: ::c_int = 37;
-pub const KERN_PROC_ALL: ::c_int = 0;
-pub const KERN_PROC_PID: ::c_int = 1;
-pub const KERN_PROC_PGRP: ::c_int = 2;
-pub const KERN_PROC_SESSION: ::c_int = 3;
-pub const KERN_PROC_TTY: ::c_int = 4;
-pub const KERN_PROC_UID: ::c_int = 5;
-pub const KERN_PROC_RUID: ::c_int = 6;
-pub const KERN_PROC_ARGS: ::c_int = 7;
-pub const KERN_PROC_CWD: ::c_int = 8;
-pub const KERN_PROC_PATHNAME: ::c_int = 9;
-pub const KERN_PROC_FLAGMASK: ::c_int = 0x10;
-pub const KERN_PROC_FLAG_LWP: ::c_int = 0x10;
-pub const KIPC_MAXSOCKBUF: ::c_int = 1;
-pub const KIPC_SOCKBUF_WASTE: ::c_int = 2;
-pub const KIPC_SOMAXCONN: ::c_int = 3;
-pub const KIPC_MAX_LINKHDR: ::c_int = 4;
-pub const KIPC_MAX_PROTOHDR: ::c_int = 5;
-pub const KIPC_MAX_HDR: ::c_int = 6;
-pub const KIPC_MAX_DATALEN: ::c_int = 7;
-pub const KIPC_MBSTAT: ::c_int = 8;
-pub const KIPC_NMBCLUSTERS: ::c_int = 9;
-pub const HW_MACHINE: ::c_int = 1;
-pub const HW_MODEL: ::c_int = 2;
-pub const HW_NCPU: ::c_int = 3;
-pub const HW_BYTEORDER: ::c_int = 4;
-pub const HW_PHYSMEM: ::c_int = 5;
-pub const HW_USERMEM: ::c_int = 6;
-pub const HW_PAGESIZE: ::c_int = 7;
-pub const HW_DISKNAMES: ::c_int = 8;
-pub const HW_DISKSTATS: ::c_int = 9;
-pub const HW_FLOATINGPT: ::c_int = 10;
-pub const HW_MACHINE_ARCH: ::c_int = 11;
-pub const HW_MACHINE_PLATFORM: ::c_int = 12;
-pub const HW_SENSORS: ::c_int = 13;
-pub const HW_MAXID: ::c_int = 14;
-pub const USER_CS_PATH: ::c_int = 1;
-pub const USER_BC_BASE_MAX: ::c_int = 2;
-pub const USER_BC_DIM_MAX: ::c_int = 3;
-pub const USER_BC_SCALE_MAX: ::c_int = 4;
-pub const USER_BC_STRING_MAX: ::c_int = 5;
-pub const USER_COLL_WEIGHTS_MAX: ::c_int = 6;
-pub const USER_EXPR_NEST_MAX: ::c_int = 7;
-pub const USER_LINE_MAX: ::c_int = 8;
-pub const USER_RE_DUP_MAX: ::c_int = 9;
-pub const USER_POSIX2_VERSION: ::c_int = 10;
-pub const USER_POSIX2_C_BIND: ::c_int = 11;
-pub const USER_POSIX2_C_DEV: ::c_int = 12;
-pub const USER_POSIX2_CHAR_TERM: ::c_int = 13;
-pub const USER_POSIX2_FORT_DEV: ::c_int = 14;
-pub const USER_POSIX2_FORT_RUN: ::c_int = 15;
-pub const USER_POSIX2_LOCALEDEF: ::c_int = 16;
-pub const USER_POSIX2_SW_DEV: ::c_int = 17;
-pub const USER_POSIX2_UPE: ::c_int = 18;
-pub const USER_STREAM_MAX: ::c_int = 19;
-pub const USER_TZNAME_MAX: ::c_int = 20;
-pub const USER_MAXID: ::c_int = 21;
-pub const CTL_P1003_1B_ASYNCHRONOUS_IO: ::c_int = 1;
-pub const CTL_P1003_1B_MAPPED_FILES: ::c_int = 2;
-pub const CTL_P1003_1B_MEMLOCK: ::c_int = 3;
-pub const CTL_P1003_1B_MEMLOCK_RANGE: ::c_int = 4;
-pub const CTL_P1003_1B_MEMORY_PROTECTION: ::c_int = 5;
-pub const CTL_P1003_1B_MESSAGE_PASSING: ::c_int = 6;
-pub const CTL_P1003_1B_PRIORITIZED_IO: ::c_int = 7;
-pub const CTL_P1003_1B_PRIORITY_SCHEDULING: ::c_int = 8;
-pub const CTL_P1003_1B_REALTIME_SIGNALS: ::c_int = 9;
-pub const CTL_P1003_1B_SEMAPHORES: ::c_int = 10;
-pub const CTL_P1003_1B_FSYNC: ::c_int = 11;
-pub const CTL_P1003_1B_SHARED_MEMORY_OBJECTS: ::c_int = 12;
-pub const CTL_P1003_1B_SYNCHRONIZED_IO: ::c_int = 13;
-pub const CTL_P1003_1B_TIMERS: ::c_int = 14;
-pub const CTL_P1003_1B_AIO_LISTIO_MAX: ::c_int = 15;
-pub const CTL_P1003_1B_AIO_MAX: ::c_int = 16;
-pub const CTL_P1003_1B_AIO_PRIO_DELTA_MAX: ::c_int = 17;
-pub const CTL_P1003_1B_DELAYTIMER_MAX: ::c_int = 18;
-pub const CTL_P1003_1B_UNUSED1: ::c_int = 19;
-pub const CTL_P1003_1B_PAGESIZE: ::c_int = 20;
-pub const CTL_P1003_1B_RTSIG_MAX: ::c_int = 21;
-pub const CTL_P1003_1B_SEM_NSEMS_MAX: ::c_int = 22;
-pub const CTL_P1003_1B_SEM_VALUE_MAX: ::c_int = 23;
-pub const CTL_P1003_1B_SIGQUEUE_MAX: ::c_int = 24;
-pub const CTL_P1003_1B_TIMER_MAX: ::c_int = 25;
-pub const CTL_P1003_1B_MAXID: ::c_int = 26;
-
-pub const EVFILT_READ: ::int16_t = -1;
-pub const EVFILT_WRITE: ::int16_t = -2;
-pub const EVFILT_AIO: ::int16_t = -3;
-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_USER: ::int16_t = -9;
-pub const EVFILT_FS: ::int16_t = -10;
-
-pub const EV_ADD: ::uint16_t = 0x1;
-pub const EV_DELETE: ::uint16_t = 0x2;
-pub const EV_ENABLE: ::uint16_t = 0x4;
-pub const EV_DISABLE: ::uint16_t = 0x8;
-pub const EV_ONESHOT: ::uint16_t = 0x10;
-pub const EV_CLEAR: ::uint16_t = 0x20;
-pub const EV_RECEIPT: ::uint16_t = 0x40;
-pub const EV_DISPATCH: ::uint16_t = 0x80;
-pub const EV_NODATA: ::uint16_t = 0x1000;
-pub const EV_FLAG1: ::uint16_t = 0x2000;
-pub const EV_ERROR: ::uint16_t = 0x4000;
-pub const EV_EOF: ::uint16_t = 0x8000;
-pub const EV_SYSFLAGS: ::uint16_t = 0xf000;
-
-pub const NOTE_TRIGGER: ::uint32_t = 0x01000000;
-pub const NOTE_FFNOP: ::uint32_t = 0x00000000;
-pub const NOTE_FFAND: ::uint32_t = 0x40000000;
-pub const NOTE_FFOR: ::uint32_t = 0x80000000;
-pub const NOTE_FFCOPY: ::uint32_t = 0xc0000000;
-pub const NOTE_FFCTRLMASK: ::uint32_t = 0xc0000000;
-pub const NOTE_FFLAGSMASK: ::uint32_t = 0x00ffffff;
-pub const NOTE_LOWAT: ::uint32_t = 0x00000001;
-pub const NOTE_OOB: ::uint32_t = 0x00000002;
-pub const NOTE_DELETE: ::uint32_t = 0x00000001;
-pub const NOTE_WRITE: ::uint32_t = 0x00000002;
-pub const NOTE_EXTEND: ::uint32_t = 0x00000004;
-pub const NOTE_ATTRIB: ::uint32_t = 0x00000008;
-pub const NOTE_LINK: ::uint32_t = 0x00000010;
-pub const NOTE_RENAME: ::uint32_t = 0x00000020;
-pub const NOTE_REVOKE: ::uint32_t = 0x00000040;
-pub const NOTE_EXIT: ::uint32_t = 0x80000000;
-pub const NOTE_FORK: ::uint32_t = 0x40000000;
-pub const NOTE_EXEC: ::uint32_t = 0x20000000;
-pub const NOTE_PDATAMASK: ::uint32_t = 0x000fffff;
-pub const NOTE_PCTRLMASK: ::uint32_t = 0xf0000000;
-pub const NOTE_TRACK: ::uint32_t = 0x00000001;
-pub const NOTE_TRACKERR: ::uint32_t = 0x00000002;
-pub const NOTE_CHILD: ::uint32_t = 0x00000004;
-
-pub const SO_SNDSPACE: ::c_int = 0x100a;
-pub const SO_CPUHINT: ::c_int = 0x1030;
-
-pub const AF_BLUETOOTH: ::c_int = 33;
-pub const AF_MPLS: ::c_int = 34;
-pub const AF_IEEE80211: ::c_int = 35;
-pub const AF_MAX: ::c_int = 36;
-
-pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
-pub const PF_MAX: ::c_int = AF_MAX;
-
-pub const NET_RT_DUMP: ::c_int = 1;
-pub const NET_RT_FLAGS: ::c_int = 2;
-pub const NET_RT_IFLIST: ::c_int = 3;
-pub const NET_RT_MAXID: ::c_int = 4;
-
-pub const SOMAXOPT_SIZE: ::c_int = 65536;
-
-#[doc(hidden)]
-pub const NET_MAXID: ::c_int = AF_MAX;
-
-pub const MSG_UNUSED09: ::c_int = 0x00000200;
-pub const MSG_NOSIGNAL: ::c_int = 0x00000400;
-pub const MSG_SYNC: ::c_int = 0x00000800;
-pub const MSG_CMSG_CLOEXEC: ::c_int = 0x00001000;
-pub const MSG_FBLOCKING: ::c_int = 0x00010000;
-pub const MSG_FNONBLOCKING: ::c_int = 0x00020000;
-pub const MSG_FMASK: ::c_int = 0xFFFF0000;
-
-pub const EMPTY: ::c_short = 0;
-pub const RUN_LVL: ::c_short = 1;
-pub const BOOT_TIME: ::c_short = 2;
-pub const OLD_TIME: ::c_short = 3;
-pub const NEW_TIME: ::c_short = 4;
-pub const INIT_PROCESS: ::c_short = 5;
-pub const LOGIN_PROCESS: ::c_short = 6;
-pub const USER_PROCESS: ::c_short = 7;
-pub const DEAD_PROCESS: ::c_short = 8;
-
-pub const LC_COLLATE_MASK: ::c_int = (1 << 0);
-pub const LC_CTYPE_MASK: ::c_int = (1 << 1);
-pub const LC_MONETARY_MASK: ::c_int = (1 << 2);
-pub const LC_NUMERIC_MASK: ::c_int = (1 << 3);
-pub const LC_TIME_MASK: ::c_int = (1 << 4);
-pub const LC_MESSAGES_MASK: ::c_int = (1 << 5);
-pub const LC_ALL_MASK: ::c_int = LC_COLLATE_MASK
-                               | LC_CTYPE_MASK
-                               | LC_MESSAGES_MASK
-                               | LC_MONETARY_MASK
-                               | LC_NUMERIC_MASK
-                               | LC_TIME_MASK;
-
-pub const TIOCSIG: ::c_uint = 0x2000745f;
-pub const BTUARTDISC: ::c_int = 0x7;
-pub const TIOCDCDTIMESTAMP: ::c_uint = 0x40107458;
-pub const TIOCISPTMASTER: ::c_uint = 0x20007455;
-pub const TIOCMODG: ::c_uint = 0x40047403;
-pub const TIOCMODS: ::c_ulong = 0x80047404;
-pub const TIOCREMOTE: ::c_ulong = 0x80047469;
-
-extern {
-    pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
-                    -> ::c_int;
-    pub fn clock_getres(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
-    pub fn clock_gettime(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
-    pub fn clock_settime(clk_id: clockid_t, tp: *const ::timespec) -> ::c_int;
-
-    pub fn setutxdb(_type: ::c_uint, file: *mut ::c_char) -> ::c_int;
-
-    pub fn aio_waitcomplete(iocbp: *mut *mut aiocb,
-                            timeout: *mut ::timespec) -> ::c_int;
-
-    pub fn freelocale(loc: ::locale_t);
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/bsd/freebsdlike/freebsd/aarch64.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-pub type c_long = i64;
-pub type c_ulong = u64;
-pub type time_t = i64;
-pub type suseconds_t = i64;
-
-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,
-        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,
-        pub st_size: ::off_t,
-        pub st_blocks: ::blkcnt_t,
-        pub st_blksize: ::blksize_t,
-        pub st_flags: ::fflags_t,
-        pub st_gen: ::uint32_t,
-        pub st_lspare: ::int32_t,
-        pub st_birthtime: ::time_t,
-        pub st_birthtime_nsec: ::c_long,
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/bsd/freebsdlike/freebsd/mod.rs
+++ /dev/null
@@ -1,577 +0,0 @@
-pub type fflags_t = u32;
-pub type clock_t = i32;
-pub type ino_t = u32;
-pub type lwpid_t = i32;
-pub type nlink_t = u16;
-pub type blksize_t = u32;
-pub type clockid_t = ::c_int;
-pub type sem_t = _sem;
-
-pub type fsblkcnt_t = ::uint64_t;
-pub type fsfilcnt_t = ::uint64_t;
-pub type idtype_t = ::c_uint;
-
-pub type key_t = ::c_long;
-pub type msglen_t = ::c_ulong;
-pub type msgqnum_t = ::c_ulong;
-
-s! {
-    pub struct utmpx {
-        pub ut_type: ::c_short,
-        pub ut_tv: ::timeval,
-        pub ut_id: [::c_char; 8],
-        pub ut_pid: ::pid_t,
-        pub ut_user: [::c_char; 32],
-        pub ut_line: [::c_char; 16],
-        pub ut_host: [::c_char; 128],
-        pub __ut_spare: [::c_char; 64],
-    }
-
-    pub struct aiocb {
-        pub aio_fildes: ::c_int,
-        pub aio_offset: ::off_t,
-        pub aio_buf: *mut ::c_void,
-        pub aio_nbytes: ::size_t,
-        __unused1: [::c_int; 2],
-        __unused2: *mut ::c_void,
-        pub aio_lio_opcode: ::c_int,
-        pub aio_reqprio: ::c_int,
-        // unused 3 through 5 are the __aiocb_private structure
-        __unused3: ::c_long,
-        __unused4: ::c_long,
-        __unused5: *mut ::c_void,
-        pub aio_sigevent: sigevent
-    }
-
-    pub struct dirent {
-        pub d_fileno: u32,
-        pub d_reclen: u16,
-        pub d_type: u8,
-        pub d_namlen: u8,
-        pub d_name: [::c_char; 256],
-    }
-
-    pub struct jail {
-        pub version: u32,
-        pub path: *mut ::c_char,
-        pub hostname: *mut ::c_char,
-        pub jailname: *mut ::c_char,
-        pub ip4s: ::c_uint,
-        pub ip6s: ::c_uint,
-        pub ip4: *mut ::in_addr,
-        pub ip6: *mut ::in6_addr,
-    }
-
-    pub struct sigevent {
-        pub sigev_notify: ::c_int,
-        pub sigev_signo: ::c_int,
-        pub sigev_value: ::sigval,
-        //The rest of the structure is actually a union.  We expose only
-        //sigev_notify_thread_id because it's the most useful union member.
-        pub sigev_notify_thread_id: ::lwpid_t,
-        #[cfg(target_pointer_width = "64")]
-        __unused1: ::c_int,
-        __unused2: [::c_long; 7]
-    }
-
-    pub struct statvfs {
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_favail: ::fsfilcnt_t,
-        pub f_ffree: ::fsfilcnt_t,
-        pub f_files: ::fsfilcnt_t,
-        pub f_bsize: ::c_ulong,
-        pub f_flag: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_fsid: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-    }
-
-    // internal structure has changed over time
-    pub struct _sem {
-        data: [u32; 4],
-    }
-
-    pub struct ipc_perm {
-        pub cuid: ::uid_t,
-        pub cgid: ::gid_t,
-        pub uid: ::uid_t,
-        pub gid: ::gid_t,
-        pub mode: ::mode_t,
-        pub seq: ::c_ushort,
-        pub key: ::key_t,
-    }
-
-    pub struct msqid_ds {
-        pub msg_perm: ::ipc_perm,
-        __unused1: *mut ::c_void,
-        __unused2: *mut ::c_void,
-        pub msg_cbytes: ::msglen_t,
-        pub msg_qnum: ::msgqnum_t,
-        pub msg_qbytes: ::msglen_t,
-        pub msg_lspid: ::pid_t,
-        pub msg_lrpid: ::pid_t,
-        pub msg_stime: ::time_t,
-        pub msg_rtime: ::time_t,
-        pub msg_ctime: ::time_t,
-    }
-
-    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: ::c_int,
-        pub shm_atime: ::time_t,
-        pub shm_dtime: ::time_t,
-        pub shm_ctime: ::time_t,
-    }
-}
-
-pub const SIGEV_THREAD_ID: ::c_int = 4;
-
-pub const RAND_MAX: ::c_int = 0x7fff_fffd;
-pub const PTHREAD_STACK_MIN: ::size_t = 2048;
-pub const PTHREAD_MUTEX_ADAPTIVE_NP: ::c_int = 4;
-pub const SIGSTKSZ: ::size_t = 34816;
-pub const SF_NODISKIO: ::c_int = 0x00000001;
-pub const SF_MNOWAIT: ::c_int = 0x00000002;
-pub const SF_SYNC: ::c_int = 0x00000004;
-pub const O_CLOEXEC: ::c_int = 0x00100000;
-pub const F_GETLK: ::c_int = 11;
-pub const F_SETLK: ::c_int = 12;
-pub const F_SETLKW: ::c_int = 13;
-pub const ELAST: ::c_int = 96;
-pub const RLIMIT_NPTS: ::c_int = 11;
-pub const RLIMIT_SWAP: ::c_int = 12;
-pub const RLIM_NLIMITS: ::rlim_t = 13;
-
-pub const Q_GETQUOTA: ::c_int = 0x700;
-pub const Q_SETQUOTA: ::c_int = 0x800;
-
-pub const POSIX_FADV_NORMAL: ::c_int = 0;
-pub const POSIX_FADV_RANDOM: ::c_int = 1;
-pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2;
-pub const POSIX_FADV_WILLNEED: ::c_int = 3;
-pub const POSIX_FADV_DONTNEED: ::c_int = 4;
-pub const POSIX_FADV_NOREUSE: ::c_int = 5;
-
-pub const EVFILT_READ: ::int16_t = -1;
-pub const EVFILT_WRITE: ::int16_t = -2;
-pub const EVFILT_AIO: ::int16_t = -3;
-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_FS: ::int16_t = -9;
-pub const EVFILT_LIO: ::int16_t = -10;
-pub const EVFILT_USER: ::int16_t = -11;
-
-pub const EV_ADD: ::uint16_t = 0x1;
-pub const EV_DELETE: ::uint16_t = 0x2;
-pub const EV_ENABLE: ::uint16_t = 0x4;
-pub const EV_DISABLE: ::uint16_t = 0x8;
-pub const EV_ONESHOT: ::uint16_t = 0x10;
-pub const EV_CLEAR: ::uint16_t = 0x20;
-pub const EV_RECEIPT: ::uint16_t = 0x40;
-pub const EV_DISPATCH: ::uint16_t = 0x80;
-pub const EV_DROP: ::uint16_t = 0x1000;
-pub const EV_FLAG1: ::uint16_t = 0x2000;
-pub const EV_ERROR: ::uint16_t = 0x4000;
-pub const EV_EOF: ::uint16_t = 0x8000;
-pub const EV_SYSFLAGS: ::uint16_t = 0xf000;
-
-pub const NOTE_TRIGGER: ::uint32_t = 0x01000000;
-pub const NOTE_FFNOP: ::uint32_t = 0x00000000;
-pub const NOTE_FFAND: ::uint32_t = 0x40000000;
-pub const NOTE_FFOR: ::uint32_t = 0x80000000;
-pub const NOTE_FFCOPY: ::uint32_t = 0xc0000000;
-pub const NOTE_FFCTRLMASK: ::uint32_t = 0xc0000000;
-pub const NOTE_FFLAGSMASK: ::uint32_t = 0x00ffffff;
-pub const NOTE_LOWAT: ::uint32_t = 0x00000001;
-pub const NOTE_DELETE: ::uint32_t = 0x00000001;
-pub const NOTE_WRITE: ::uint32_t = 0x00000002;
-pub const NOTE_EXTEND: ::uint32_t = 0x00000004;
-pub const NOTE_ATTRIB: ::uint32_t = 0x00000008;
-pub const NOTE_LINK: ::uint32_t = 0x00000010;
-pub const NOTE_RENAME: ::uint32_t = 0x00000020;
-pub const NOTE_REVOKE: ::uint32_t = 0x00000040;
-pub const NOTE_EXIT: ::uint32_t = 0x80000000;
-pub const NOTE_FORK: ::uint32_t = 0x40000000;
-pub const NOTE_EXEC: ::uint32_t = 0x20000000;
-pub const NOTE_PDATAMASK: ::uint32_t = 0x000fffff;
-pub const NOTE_PCTRLMASK: ::uint32_t = 0xf0000000;
-pub const NOTE_TRACK: ::uint32_t = 0x00000001;
-pub const NOTE_TRACKERR: ::uint32_t = 0x00000002;
-pub const NOTE_CHILD: ::uint32_t = 0x00000004;
-pub const NOTE_SECONDS: ::uint32_t = 0x00000001;
-pub const NOTE_MSECONDS: ::uint32_t = 0x00000002;
-pub const NOTE_USECONDS: ::uint32_t = 0x00000004;
-pub const NOTE_NSECONDS: ::uint32_t = 0x00000008;
-
-pub const MADV_PROTECT: ::c_int = 10;
-pub const RUSAGE_THREAD: ::c_int = 1;
-
-pub const CLOCK_REALTIME: clockid_t = 0;
-pub const CLOCK_VIRTUAL: clockid_t = 1;
-pub const CLOCK_PROF: clockid_t = 2;
-pub const CLOCK_MONOTONIC: clockid_t = 4;
-pub const CLOCK_UPTIME: clockid_t = 5;
-pub const CLOCK_UPTIME_PRECISE: clockid_t = 7;
-pub const CLOCK_UPTIME_FAST: clockid_t = 8;
-pub const CLOCK_REALTIME_PRECISE: clockid_t = 9;
-pub const CLOCK_REALTIME_FAST: clockid_t = 10;
-pub const CLOCK_MONOTONIC_PRECISE: clockid_t = 11;
-pub const CLOCK_MONOTONIC_FAST: clockid_t = 12;
-pub const CLOCK_SECOND: clockid_t = 13;
-pub const CLOCK_THREAD_CPUTIME_ID: clockid_t = 14;
-pub const CLOCK_PROCESS_CPUTIME_ID: clockid_t = 15;
-
-pub const CTL_UNSPEC: ::c_int = 0;
-pub const CTL_KERN: ::c_int = 1;
-pub const CTL_VM: ::c_int = 2;
-pub const CTL_VFS: ::c_int = 3;
-pub const CTL_NET: ::c_int = 4;
-pub const CTL_DEBUG: ::c_int = 5;
-pub const CTL_HW: ::c_int = 6;
-pub const CTL_MACHDEP: ::c_int = 7;
-pub const CTL_USER: ::c_int = 8;
-pub const CTL_P1003_1B: ::c_int = 9;
-pub const KERN_OSTYPE: ::c_int = 1;
-pub const KERN_OSRELEASE: ::c_int = 2;
-pub const KERN_OSREV: ::c_int = 3;
-pub const KERN_VERSION: ::c_int = 4;
-pub const KERN_MAXVNODES: ::c_int = 5;
-pub const KERN_MAXPROC: ::c_int = 6;
-pub const KERN_MAXFILES: ::c_int = 7;
-pub const KERN_ARGMAX: ::c_int = 8;
-pub const KERN_SECURELVL: ::c_int = 9;
-pub const KERN_HOSTNAME: ::c_int = 10;
-pub const KERN_HOSTID: ::c_int = 11;
-pub const KERN_CLOCKRATE: ::c_int = 12;
-pub const KERN_VNODE: ::c_int = 13;
-pub const KERN_PROC: ::c_int = 14;
-pub const KERN_FILE: ::c_int = 15;
-pub const KERN_PROF: ::c_int = 16;
-pub const KERN_POSIX1: ::c_int = 17;
-pub const KERN_NGROUPS: ::c_int = 18;
-pub const KERN_JOB_CONTROL: ::c_int = 19;
-pub const KERN_SAVED_IDS: ::c_int = 20;
-pub const KERN_BOOTTIME: ::c_int = 21;
-pub const KERN_NISDOMAINNAME: ::c_int = 22;
-pub const KERN_UPDATEINTERVAL: ::c_int = 23;
-pub const KERN_OSRELDATE: ::c_int = 24;
-pub const KERN_NTP_PLL: ::c_int = 25;
-pub const KERN_BOOTFILE: ::c_int = 26;
-pub const KERN_MAXFILESPERPROC: ::c_int = 27;
-pub const KERN_MAXPROCPERUID: ::c_int = 28;
-pub const KERN_DUMPDEV: ::c_int = 29;
-pub const KERN_IPC: ::c_int = 30;
-pub const KERN_DUMMY: ::c_int = 31;
-pub const KERN_PS_STRINGS: ::c_int = 32;
-pub const KERN_USRSTACK: ::c_int = 33;
-pub const KERN_LOGSIGEXIT: ::c_int = 34;
-pub const KERN_IOV_MAX: ::c_int = 35;
-pub const KERN_HOSTUUID: ::c_int = 36;
-pub const KERN_ARND: ::c_int = 37;
-pub const KERN_PROC_ALL: ::c_int = 0;
-pub const KERN_PROC_PID: ::c_int = 1;
-pub const KERN_PROC_PGRP: ::c_int = 2;
-pub const KERN_PROC_SESSION: ::c_int = 3;
-pub const KERN_PROC_TTY: ::c_int = 4;
-pub const KERN_PROC_UID: ::c_int = 5;
-pub const KERN_PROC_RUID: ::c_int = 6;
-pub const KERN_PROC_ARGS: ::c_int = 7;
-pub const KERN_PROC_PROC: ::c_int = 8;
-pub const KERN_PROC_SV_NAME: ::c_int = 9;
-pub const KERN_PROC_RGID: ::c_int = 10;
-pub const KERN_PROC_GID: ::c_int = 11;
-pub const KERN_PROC_PATHNAME: ::c_int = 12;
-pub const KERN_PROC_OVMMAP: ::c_int = 13;
-pub const KERN_PROC_OFILEDESC: ::c_int = 14;
-pub const KERN_PROC_KSTACK: ::c_int = 15;
-pub const KERN_PROC_INC_THREAD: ::c_int = 0x10;
-pub const KERN_PROC_VMMAP: ::c_int = 32;
-pub const KERN_PROC_FILEDESC: ::c_int = 33;
-pub const KERN_PROC_GROUPS: ::c_int = 34;
-pub const KERN_PROC_ENV: ::c_int = 35;
-pub const KERN_PROC_AUXV: ::c_int = 36;
-pub const KERN_PROC_RLIMIT: ::c_int = 37;
-pub const KERN_PROC_PS_STRINGS: ::c_int = 38;
-pub const KERN_PROC_UMASK: ::c_int = 39;
-pub const KERN_PROC_OSREL: ::c_int = 40;
-pub const KERN_PROC_SIGTRAMP: ::c_int = 41;
-pub const KIPC_MAXSOCKBUF: ::c_int = 1;
-pub const KIPC_SOCKBUF_WASTE: ::c_int = 2;
-pub const KIPC_SOMAXCONN: ::c_int = 3;
-pub const KIPC_MAX_LINKHDR: ::c_int = 4;
-pub const KIPC_MAX_PROTOHDR: ::c_int = 5;
-pub const KIPC_MAX_HDR: ::c_int = 6;
-pub const KIPC_MAX_DATALEN: ::c_int = 7;
-pub const HW_MACHINE: ::c_int = 1;
-pub const HW_MODEL: ::c_int = 2;
-pub const HW_NCPU: ::c_int = 3;
-pub const HW_BYTEORDER: ::c_int = 4;
-pub const HW_PHYSMEM: ::c_int = 5;
-pub const HW_USERMEM: ::c_int = 6;
-pub const HW_PAGESIZE: ::c_int = 7;
-pub const HW_DISKNAMES: ::c_int = 8;
-pub const HW_DISKSTATS: ::c_int = 9;
-pub const HW_FLOATINGPT: ::c_int = 10;
-pub const HW_MACHINE_ARCH: ::c_int = 11;
-pub const HW_REALMEM: ::c_int = 12;
-pub const USER_CS_PATH: ::c_int = 1;
-pub const USER_BC_BASE_MAX: ::c_int = 2;
-pub const USER_BC_DIM_MAX: ::c_int = 3;
-pub const USER_BC_SCALE_MAX: ::c_int = 4;
-pub const USER_BC_STRING_MAX: ::c_int = 5;
-pub const USER_COLL_WEIGHTS_MAX: ::c_int = 6;
-pub const USER_EXPR_NEST_MAX: ::c_int = 7;
-pub const USER_LINE_MAX: ::c_int = 8;
-pub const USER_RE_DUP_MAX: ::c_int = 9;
-pub const USER_POSIX2_VERSION: ::c_int = 10;
-pub const USER_POSIX2_C_BIND: ::c_int = 11;
-pub const USER_POSIX2_C_DEV: ::c_int = 12;
-pub const USER_POSIX2_CHAR_TERM: ::c_int = 13;
-pub const USER_POSIX2_FORT_DEV: ::c_int = 14;
-pub const USER_POSIX2_FORT_RUN: ::c_int = 15;
-pub const USER_POSIX2_LOCALEDEF: ::c_int = 16;
-pub const USER_POSIX2_SW_DEV: ::c_int = 17;
-pub const USER_POSIX2_UPE: ::c_int = 18;
-pub const USER_STREAM_MAX: ::c_int = 19;
-pub const USER_TZNAME_MAX: ::c_int = 20;
-pub const CTL_P1003_1B_ASYNCHRONOUS_IO: ::c_int = 1;
-pub const CTL_P1003_1B_MAPPED_FILES: ::c_int = 2;
-pub const CTL_P1003_1B_MEMLOCK: ::c_int = 3;
-pub const CTL_P1003_1B_MEMLOCK_RANGE: ::c_int = 4;
-pub const CTL_P1003_1B_MEMORY_PROTECTION: ::c_int = 5;
-pub const CTL_P1003_1B_MESSAGE_PASSING: ::c_int = 6;
-pub const CTL_P1003_1B_PRIORITIZED_IO: ::c_int = 7;
-pub const CTL_P1003_1B_PRIORITY_SCHEDULING: ::c_int = 8;
-pub const CTL_P1003_1B_REALTIME_SIGNALS: ::c_int = 9;
-pub const CTL_P1003_1B_SEMAPHORES: ::c_int = 10;
-pub const CTL_P1003_1B_FSYNC: ::c_int = 11;
-pub const CTL_P1003_1B_SHARED_MEMORY_OBJECTS: ::c_int = 12;
-pub const CTL_P1003_1B_SYNCHRONIZED_IO: ::c_int = 13;
-pub const CTL_P1003_1B_TIMERS: ::c_int = 14;
-pub const CTL_P1003_1B_AIO_LISTIO_MAX: ::c_int = 15;
-pub const CTL_P1003_1B_AIO_MAX: ::c_int = 16;
-pub const CTL_P1003_1B_AIO_PRIO_DELTA_MAX: ::c_int = 17;
-pub const CTL_P1003_1B_DELAYTIMER_MAX: ::c_int = 18;
-pub const CTL_P1003_1B_MQ_OPEN_MAX: ::c_int = 19;
-pub const CTL_P1003_1B_PAGESIZE: ::c_int = 20;
-pub const CTL_P1003_1B_RTSIG_MAX: ::c_int = 21;
-pub const CTL_P1003_1B_SEM_NSEMS_MAX: ::c_int = 22;
-pub const CTL_P1003_1B_SEM_VALUE_MAX: ::c_int = 23;
-pub const CTL_P1003_1B_SIGQUEUE_MAX: ::c_int = 24;
-pub const CTL_P1003_1B_TIMER_MAX: ::c_int = 25;
-pub const TIOCGPTN: ::c_uint = 0x4004740f;
-pub const TIOCPTMASTER: ::c_uint = 0x2000741c;
-pub const TIOCSIG: ::c_uint = 0x2004745f;
-pub const TIOCM_DCD: ::c_int = 0x40;
-pub const H4DISC: ::c_int = 0x7;
-
-pub const JAIL_API_VERSION: u32 = 2;
-pub const JAIL_CREATE: ::c_int = 0x01;
-pub const JAIL_UPDATE: ::c_int = 0x02;
-pub const JAIL_ATTACH: ::c_int = 0x04;
-pub const JAIL_DYING: ::c_int = 0x08;
-pub const JAIL_SET_MASK: ::c_int = 0x0f;
-pub const JAIL_GET_MASK: ::c_int = 0x08;
-pub const JAIL_SYS_DISABLE: ::c_int = 0;
-pub const JAIL_SYS_NEW: ::c_int = 1;
-pub const JAIL_SYS_INHERIT: ::c_int = 2;
-
-pub const SO_BINTIME: ::c_int = 0x2000;
-pub const SO_NO_OFFLOAD: ::c_int = 0x4000;
-pub const SO_NO_DDP: ::c_int = 0x8000;
-pub const SO_LABEL: ::c_int = 0x1009;
-pub const SO_PEERLABEL: ::c_int = 0x1010;
-pub const SO_LISTENQLIMIT: ::c_int = 0x1011;
-pub const SO_LISTENQLEN: ::c_int = 0x1012;
-pub const SO_LISTENINCQLEN: ::c_int = 0x1013;
-pub const SO_SETFIB: ::c_int = 0x1014;
-pub const SO_USER_COOKIE: ::c_int = 0x1015;
-pub const SO_PROTOCOL: ::c_int = 0x1016;
-pub const SO_PROTOTYPE: ::c_int = SO_PROTOCOL;
-pub const SO_VENDOR: ::c_int = 0x80000000;
-
-pub const AF_SLOW: ::c_int = 33;
-pub const AF_SCLUSTER: ::c_int = 34;
-pub const AF_ARP: ::c_int = 35;
-pub const AF_BLUETOOTH: ::c_int = 36;
-pub const AF_IEEE80211: ::c_int = 37;
-pub const AF_INET_SDP: ::c_int = 40;
-pub const AF_INET6_SDP: ::c_int = 42;
-#[doc(hidden)]
-pub const AF_MAX: ::c_int = 42;
-
-pub const IPPROTO_DIVERT: ::c_int = 258;
-
-pub const PF_SLOW: ::c_int = AF_SLOW;
-pub const PF_SCLUSTER: ::c_int = AF_SCLUSTER;
-pub const PF_ARP: ::c_int = AF_ARP;
-pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
-pub const PF_IEEE80211: ::c_int = AF_IEEE80211;
-pub const PF_INET_SDP: ::c_int = AF_INET_SDP;
-pub const PF_INET6_SDP: ::c_int = AF_INET6_SDP;
-#[doc(hidden)]
-pub const PF_MAX: ::c_int = AF_MAX;
-
-pub const NET_RT_DUMP: ::c_int = 1;
-pub const NET_RT_FLAGS: ::c_int = 2;
-pub const NET_RT_IFLIST: ::c_int = 3;
-pub const NET_RT_IFMALIST: ::c_int = 4;
-pub const NET_RT_IFLISTL: ::c_int = 5;
-
-// System V IPC
-pub const IPC_PRIVATE: ::key_t = 0;
-pub const IPC_CREAT: ::c_int = 0o1000;
-pub const IPC_EXCL: ::c_int = 0o2000;
-pub const IPC_NOWAIT: ::c_int = 0o4000;
-pub const IPC_RMID: ::c_int = 0;
-pub const IPC_SET: ::c_int = 1;
-pub const IPC_STAT: ::c_int = 2;
-pub const IPC_INFO: ::c_int = 3;
-pub const IPC_R : ::c_int = 0o400;
-pub const IPC_W : ::c_int = 0o200;
-pub const IPC_M : ::c_int = 0o10000;
-pub const MSG_NOERROR: ::c_int = 0o10000;
-pub const SHM_RDONLY: ::c_int = 0o10000;
-pub const SHM_RND: ::c_int = 0o20000;
-pub const SHM_R: ::c_int = 0o400;
-pub const SHM_W: ::c_int = 0o200;
-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;
-
-// The *_MAXID constants never should've been used outside of the
-// FreeBSD base system.  And with the exception of CTL_P1003_1B_MAXID,
-// they were all removed in svn r262489.  They remain here for backwards
-// compatibility only, and are scheduled to be removed in libc 1.0.0.
-#[doc(hidden)]
-pub const NET_MAXID: ::c_int = AF_MAX;
-#[doc(hidden)]
-pub const CTL_MAXID: ::c_int = 10;
-#[doc(hidden)]
-pub const KERN_MAXID: ::c_int = 38;
-#[doc(hidden)]
-pub const HW_MAXID: ::c_int = 13;
-#[doc(hidden)]
-pub const USER_MAXID: ::c_int = 21;
-#[doc(hidden)]
-pub const CTL_P1003_1B_MAXID: ::c_int = 26;
-
-pub const MSG_NOTIFICATION: ::c_int = 0x00002000;
-pub const MSG_NBIO: ::c_int = 0x00004000;
-pub const MSG_COMPAT: ::c_int = 0x00008000;
-pub const MSG_CMSG_CLOEXEC: ::c_int = 0x00040000;
-pub const MSG_NOSIGNAL: ::c_int = 0x20000;
-
-pub const EMPTY: ::c_short = 0;
-pub const BOOT_TIME: ::c_short = 1;
-pub const OLD_TIME: ::c_short = 2;
-pub const NEW_TIME: ::c_short = 3;
-pub const USER_PROCESS: ::c_short = 4;
-pub const INIT_PROCESS: ::c_short = 5;
-pub const LOGIN_PROCESS: ::c_short = 6;
-pub const DEAD_PROCESS: ::c_short = 7;
-pub const SHUTDOWN_TIME: ::c_short = 8;
-
-pub const LC_COLLATE_MASK: ::c_int = (1 << 0);
-pub const LC_CTYPE_MASK: ::c_int = (1 << 1);
-pub const LC_MESSAGES_MASK: ::c_int = (1 << 2);
-pub const LC_MONETARY_MASK: ::c_int = (1 << 3);
-pub const LC_NUMERIC_MASK: ::c_int = (1 << 4);
-pub const LC_TIME_MASK: ::c_int = (1 << 5);
-pub const LC_ALL_MASK: ::c_int = LC_COLLATE_MASK
-                               | LC_CTYPE_MASK
-                               | LC_MESSAGES_MASK
-                               | LC_MONETARY_MASK
-                               | LC_NUMERIC_MASK
-                               | LC_TIME_MASK;
-
-pub const WSTOPPED: ::c_int = 2; // same as WUNTRACED
-pub const WCONTINUED: ::c_int = 4;
-pub const WNOWAIT: ::c_int = 8;
-pub const WEXITED: ::c_int = 16;
-pub const WTRAPPED: ::c_int = 32;
-
-// FreeBSD defines a great many more of these, we only expose the
-// standardized ones.
-pub const P_PID: idtype_t = 0;
-pub const P_PGID: idtype_t = 2;
-pub const P_ALL: idtype_t = 7;
-
-pub const B460800: ::speed_t = 460800;
-pub const B921600: ::speed_t = 921600;
-
-extern {
-    pub fn __error() -> *mut ::c_int;
-
-    pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int)
-                    -> ::c_int;
-
-    pub fn clock_getres(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
-    pub fn clock_gettime(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
-    pub fn clock_settime(clk_id: clockid_t, tp: *const ::timespec) -> ::c_int;
-
-    pub fn jail(jail: *mut ::jail) -> ::c_int;
-    pub fn jail_attach(jid: ::c_int) -> ::c_int;
-    pub fn jail_remove(jid: ::c_int) -> ::c_int;
-    pub fn jail_get(iov: *mut ::iovec, niov: ::c_uint, flags: ::c_int)
-                    -> ::c_int;
-    pub fn jail_set(iov: *mut ::iovec, niov: ::c_uint, flags: ::c_int)
-                    -> ::c_int;
-
-    pub fn posix_fallocate(fd: ::c_int, offset: ::off_t,
-                           len: ::off_t) -> ::c_int;
-    pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t,
-                         advise: ::c_int) -> ::c_int;
-    pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int;
-    pub fn mkostemps(template: *mut ::c_char,
-                     suffixlen: ::c_int,
-                     flags: ::c_int) -> ::c_int;
-
-    pub fn getutxuser(user: *const ::c_char) -> *mut utmpx;
-    pub fn setutxdb(_type: ::c_int, file: *const ::c_char) -> ::c_int;
-
-    pub fn aio_waitcomplete(iocbp: *mut *mut aiocb,
-                            timeout: *mut ::timespec) -> ::ssize_t;
-
-    pub fn freelocale(loc: ::locale_t) -> ::c_int;
-    pub fn waitid(idtype: idtype_t, id: ::id_t, infop: *mut ::siginfo_t,
-                  options: ::c_int) -> ::c_int;
-
-    pub fn ftok(pathname: *const ::c_char, proj_id: ::c_int) -> ::key_t;
-    pub fn shmget(key: ::key_t, size: ::size_t, shmflg: ::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;
-    pub fn shmctl(shmid: ::c_int, cmd: ::c_int,
-        buf: *mut ::shmid_ds) -> ::c_int;
-    pub fn msgctl(msqid: ::c_int, cmd: ::c_int,
-        buf: *mut ::msqid_ds) -> ::c_int;
-    pub fn msgget(key: ::key_t, msgflg: ::c_int) -> ::c_int;
-    pub fn msgrcv(msqid: ::c_int, msgp: *mut ::c_void, msgsz: ::size_t,
-        msgtyp: ::c_long, msgflg: ::c_int) -> ::c_int;
-    pub fn msgsnd(msqid: ::c_int, msgp: *const ::c_void, msgsz: ::size_t,
-        msgflg: ::c_int) -> ::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
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/bsd/freebsdlike/freebsd/x86.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-pub type c_long = i32;
-pub type c_ulong = u32;
-pub type time_t = i32;
-pub type suseconds_t = i32;
-
-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,
-        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,
-        pub st_size: ::off_t,
-        pub st_blocks: ::blkcnt_t,
-        pub st_blksize: ::blksize_t,
-        pub st_flags: ::fflags_t,
-        pub st_gen: ::uint32_t,
-        pub st_lspare: ::int32_t,
-        pub st_birthtime: ::time_t,
-        pub st_birthtime_nsec: ::c_long,
-        __unused: [u8; 8],
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/bsd/freebsdlike/freebsd/x86_64.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-pub type c_long = i64;
-pub type c_ulong = u64;
-pub type time_t = i64;
-pub type suseconds_t = i64;
-
-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,
-        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,
-        pub st_size: ::off_t,
-        pub st_blocks: ::blkcnt_t,
-        pub st_blksize: ::blksize_t,
-        pub st_flags: ::fflags_t,
-        pub st_gen: ::uint32_t,
-        pub st_lspare: ::int32_t,
-        pub st_birthtime: ::time_t,
-        pub st_birthtime_nsec: ::c_long,
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/bsd/freebsdlike/mod.rs
+++ /dev/null
@@ -1,1045 +0,0 @@
-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 pthread_mutex_t = *mut ::c_void;
-pub type pthread_mutexattr_t = *mut ::c_void;
-pub type pthread_cond_t = *mut ::c_void;
-pub type pthread_condattr_t = *mut ::c_void;
-pub type pthread_rwlock_t = *mut ::c_void;
-pub type pthread_key_t = ::c_int;
-pub type tcflag_t = ::c_uint;
-pub type speed_t = ::c_uint;
-pub type nl_item = ::c_int;
-pub type id_t = i64;
-
-pub enum timezone {}
-
-s! {
-    pub struct glob_t {
-        pub gl_pathc:  ::size_t,
-        pub gl_matchc: ::size_t,
-        pub gl_offs:   ::size_t,
-        pub gl_flags:  ::c_int,
-        pub gl_pathv:  *mut *mut ::c_char,
-        __unused3: *mut ::c_void,
-        __unused4: *mut ::c_void,
-        __unused5: *mut ::c_void,
-        __unused6: *mut ::c_void,
-        __unused7: *mut ::c_void,
-        __unused8: *mut ::c_void,
-    }
-
-    pub struct kevent {
-        pub ident: ::uintptr_t,
-        pub filter: ::c_short,
-        pub flags: ::c_ushort,
-        pub fflags: ::c_uint,
-        pub data: ::intptr_t,
-        pub udata: *mut ::c_void,
-    }
-
-    pub struct sockaddr_storage {
-        pub ss_len: u8,
-        pub ss_family: ::sa_family_t,
-        __ss_pad1: [u8; 6],
-        __ss_align: i64,
-        __ss_pad2: [u8; 112],
-    }
-
-    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_canonname: *mut ::c_char,
-        pub ai_addr: *mut ::sockaddr,
-        pub ai_next: *mut addrinfo,
-    }
-
-    pub struct sigset_t {
-        bits: [u32; 4],
-    }
-
-    pub struct siginfo_t {
-        pub si_signo: ::c_int,
-        pub si_errno: ::c_int,
-        pub si_code: ::c_int,
-        pub si_pid: ::pid_t,
-        pub si_uid: ::uid_t,
-        pub si_status: ::c_int,
-        pub si_addr: *mut ::c_void,
-        _pad: [::c_int; 12],
-    }
-
-    pub struct sigaction {
-        pub sa_sigaction: ::sighandler_t,
-        pub sa_flags: ::c_int,
-        pub sa_mask: sigset_t,
-    }
-
-    pub struct stack_t {
-        // In FreeBSD 11 and later, ss_sp is actually a void*
-        pub ss_sp: *mut ::c_char,
-        pub ss_size: ::size_t,
-        pub ss_flags: ::c_int,
-    }
-
-    pub struct sched_param {
-        pub sched_priority: ::c_int,
-    }
-
-    pub struct Dl_info {
-        pub dli_fname: *const ::c_char,
-        pub dli_fbase: *mut ::c_void,
-        pub dli_sname: *const ::c_char,
-        pub dli_saddr: *mut ::c_void,
-    }
-
-    pub struct sockaddr_in {
-        pub sin_len: u8,
-        pub sin_family: ::sa_family_t,
-        pub sin_port: ::in_port_t,
-        pub sin_addr: ::in_addr,
-        pub sin_zero: [::c_char; 8],
-    }
-
-    pub struct termios {
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_cc: [::cc_t; ::NCCS],
-        pub c_ispeed: ::speed_t,
-        pub c_ospeed: ::speed_t,
-    }
-
-    pub struct flock {
-        pub l_start: ::off_t,
-        pub l_len: ::off_t,
-        pub l_pid: ::pid_t,
-        pub l_type: ::c_short,
-        pub l_whence: ::c_short,
-        #[cfg(not(target_os = "dragonfly"))]
-        pub l_sysid: ::c_int,
-    }
-
-    pub struct sf_hdtr {
-        pub headers: *mut ::iovec,
-        pub hdr_cnt: ::c_int,
-        pub trailers: *mut ::iovec,
-        pub trl_cnt: ::c_int,
-    }
-
-    pub struct lconv {
-        pub decimal_point: *mut ::c_char,
-        pub thousands_sep: *mut ::c_char,
-        pub grouping: *mut ::c_char,
-        pub int_curr_symbol: *mut ::c_char,
-        pub currency_symbol: *mut ::c_char,
-        pub mon_decimal_point: *mut ::c_char,
-        pub mon_thousands_sep: *mut ::c_char,
-        pub mon_grouping: *mut ::c_char,
-        pub positive_sign: *mut ::c_char,
-        pub negative_sign: *mut ::c_char,
-        pub int_frac_digits: ::c_char,
-        pub frac_digits: ::c_char,
-        pub p_cs_precedes: ::c_char,
-        pub p_sep_by_space: ::c_char,
-        pub n_cs_precedes: ::c_char,
-        pub n_sep_by_space: ::c_char,
-        pub p_sign_posn: ::c_char,
-        pub n_sign_posn: ::c_char,
-        pub int_p_cs_precedes: ::c_char,
-        pub int_n_cs_precedes: ::c_char,
-        pub int_p_sep_by_space: ::c_char,
-        pub int_n_sep_by_space: ::c_char,
-        pub int_p_sign_posn: ::c_char,
-        pub int_n_sign_posn: ::c_char,
-    }
-}
-
-pub const AIO_LISTIO_MAX: ::c_int = 16;
-pub const AIO_CANCELED: ::c_int = 1;
-pub const AIO_NOTCANCELED: ::c_int = 2;
-pub const AIO_ALLDONE: ::c_int = 3;
-pub const LIO_NOP: ::c_int = 0;
-pub const LIO_WRITE: ::c_int = 1;
-pub const LIO_READ: ::c_int = 2;
-pub const LIO_WAIT: ::c_int = 1;
-pub const LIO_NOWAIT: ::c_int = 0;
-
-pub const SIGEV_NONE: ::c_int = 0;
-pub const SIGEV_SIGNAL: ::c_int = 1;
-pub const SIGEV_THREAD: ::c_int = 2;
-pub const SIGEV_KEVENT: ::c_int = 3;
-
-pub const CODESET: ::nl_item = 0;
-pub const D_T_FMT: ::nl_item = 1;
-pub const D_FMT: ::nl_item = 2;
-pub const T_FMT: ::nl_item = 3;
-pub const T_FMT_AMPM: ::nl_item = 4;
-pub const AM_STR: ::nl_item = 5;
-pub const PM_STR: ::nl_item = 6;
-
-pub const DAY_1: ::nl_item = 7;
-pub const DAY_2: ::nl_item = 8;
-pub const DAY_3: ::nl_item = 9;
-pub const DAY_4: ::nl_item = 10;
-pub const DAY_5: ::nl_item = 11;
-pub const DAY_6: ::nl_item = 12;
-pub const DAY_7: ::nl_item = 13;
-
-pub const ABDAY_1: ::nl_item = 14;
-pub const ABDAY_2: ::nl_item = 15;
-pub const ABDAY_3: ::nl_item = 16;
-pub const ABDAY_4: ::nl_item = 17;
-pub const ABDAY_5: ::nl_item = 18;
-pub const ABDAY_6: ::nl_item = 19;
-pub const ABDAY_7: ::nl_item = 20;
-
-pub const MON_1: ::nl_item = 21;
-pub const MON_2: ::nl_item = 22;
-pub const MON_3: ::nl_item = 23;
-pub const MON_4: ::nl_item = 24;
-pub const MON_5: ::nl_item = 25;
-pub const MON_6: ::nl_item = 26;
-pub const MON_7: ::nl_item = 27;
-pub const MON_8: ::nl_item = 28;
-pub const MON_9: ::nl_item = 29;
-pub const MON_10: ::nl_item = 30;
-pub const MON_11: ::nl_item = 31;
-pub const MON_12: ::nl_item = 32;
-
-pub const ABMON_1: ::nl_item = 33;
-pub const ABMON_2: ::nl_item = 34;
-pub const ABMON_3: ::nl_item = 35;
-pub const ABMON_4: ::nl_item = 36;
-pub const ABMON_5: ::nl_item = 37;
-pub const ABMON_6: ::nl_item = 38;
-pub const ABMON_7: ::nl_item = 39;
-pub const ABMON_8: ::nl_item = 40;
-pub const ABMON_9: ::nl_item = 41;
-pub const ABMON_10: ::nl_item = 42;
-pub const ABMON_11: ::nl_item = 43;
-pub const ABMON_12: ::nl_item = 44;
-
-pub const ERA: ::nl_item = 45;
-pub const ERA_D_FMT: ::nl_item = 46;
-pub const ERA_D_T_FMT: ::nl_item = 47;
-pub const ERA_T_FMT: ::nl_item = 48;
-pub const ALT_DIGITS: ::nl_item = 49;
-
-pub const RADIXCHAR: ::nl_item = 50;
-pub const THOUSEP: ::nl_item = 51;
-
-pub const YESEXPR: ::nl_item = 52;
-pub const NOEXPR: ::nl_item = 53;
-
-pub const YESSTR: ::nl_item = 54;
-pub const NOSTR: ::nl_item = 55;
-
-pub const CRNCYSTR: ::nl_item = 56;
-
-pub const D_MD_ORDER: ::nl_item = 57;
-
-pub const ALTMON_1: ::nl_item = 58;
-pub const ALTMON_2: ::nl_item = 59;
-pub const ALTMON_3: ::nl_item = 60;
-pub const ALTMON_4: ::nl_item = 61;
-pub const ALTMON_5: ::nl_item = 62;
-pub const ALTMON_6: ::nl_item = 63;
-pub const ALTMON_7: ::nl_item = 64;
-pub const ALTMON_8: ::nl_item = 65;
-pub const ALTMON_9: ::nl_item = 66;
-pub const ALTMON_10: ::nl_item = 67;
-pub const ALTMON_11: ::nl_item = 68;
-pub const ALTMON_12: ::nl_item = 69;
-
-pub const EXIT_FAILURE: ::c_int = 1;
-pub const EXIT_SUCCESS: ::c_int = 0;
-pub const EOF: ::c_int = -1;
-pub const SEEK_SET: ::c_int = 0;
-pub const SEEK_CUR: ::c_int = 1;
-pub const SEEK_END: ::c_int = 2;
-pub const _IOFBF: ::c_int = 0;
-pub const _IONBF: ::c_int = 2;
-pub const _IOLBF: ::c_int = 1;
-pub const BUFSIZ: ::c_uint = 1024;
-pub const FOPEN_MAX: ::c_uint = 20;
-pub const FILENAME_MAX: ::c_uint = 1024;
-pub const L_tmpnam: ::c_uint = 1024;
-pub const TMP_MAX: ::c_uint = 308915776;
-
-pub const O_RDONLY: ::c_int = 0;
-pub const O_WRONLY: ::c_int = 1;
-pub const O_RDWR: ::c_int = 2;
-pub const O_ACCMODE: ::c_int = 3;
-pub const O_APPEND: ::c_int = 8;
-pub const O_CREAT: ::c_int = 512;
-pub const O_EXCL: ::c_int = 2048;
-pub const O_NOCTTY: ::c_int = 32768;
-pub const O_TRUNC: ::c_int = 1024;
-pub const S_IFIFO: mode_t = 4096;
-pub const S_IFCHR: mode_t = 8192;
-pub const S_IFBLK: mode_t = 24576;
-pub const S_IFDIR: mode_t = 16384;
-pub const S_IFREG: mode_t = 32768;
-pub const S_IFLNK: mode_t = 40960;
-pub const S_IFSOCK: mode_t = 49152;
-pub const S_IFMT: mode_t = 61440;
-pub const S_IEXEC: mode_t = 64;
-pub const S_IWRITE: mode_t = 128;
-pub const S_IREAD: mode_t = 256;
-pub const S_IRWXU: mode_t = 448;
-pub const S_IXUSR: mode_t = 64;
-pub const S_IWUSR: mode_t = 128;
-pub const S_IRUSR: mode_t = 256;
-pub const S_IRWXG: mode_t = 56;
-pub const S_IXGRP: mode_t = 8;
-pub const S_IWGRP: mode_t = 16;
-pub const S_IRGRP: mode_t = 32;
-pub const S_IRWXO: mode_t = 7;
-pub const S_IXOTH: mode_t = 1;
-pub const S_IWOTH: mode_t = 2;
-pub const S_IROTH: mode_t = 4;
-pub const F_OK: ::c_int = 0;
-pub const R_OK: ::c_int = 4;
-pub const W_OK: ::c_int = 2;
-pub const X_OK: ::c_int = 1;
-pub const STDIN_FILENO: ::c_int = 0;
-pub const STDOUT_FILENO: ::c_int = 1;
-pub const STDERR_FILENO: ::c_int = 2;
-pub const F_LOCK: ::c_int = 1;
-pub const F_TEST: ::c_int = 3;
-pub const F_TLOCK: ::c_int = 2;
-pub const F_ULOCK: ::c_int = 0;
-pub const F_DUPFD_CLOEXEC: ::c_int = 17;
-pub const SIGHUP: ::c_int = 1;
-pub const SIGINT: ::c_int = 2;
-pub const SIGQUIT: ::c_int = 3;
-pub const SIGILL: ::c_int = 4;
-pub const SIGABRT: ::c_int = 6;
-pub const SIGEMT: ::c_int = 7;
-pub const SIGFPE: ::c_int = 8;
-pub const SIGKILL: ::c_int = 9;
-pub const SIGSEGV: ::c_int = 11;
-pub const SIGPIPE: ::c_int = 13;
-pub const SIGALRM: ::c_int = 14;
-pub const SIGTERM: ::c_int = 15;
-
-pub const PROT_NONE: ::c_int = 0;
-pub const PROT_READ: ::c_int = 1;
-pub const PROT_WRITE: ::c_int = 2;
-pub const PROT_EXEC: ::c_int = 4;
-
-pub const MAP_FILE: ::c_int = 0x0000;
-pub const MAP_SHARED: ::c_int = 0x0001;
-pub const MAP_PRIVATE: ::c_int = 0x0002;
-pub const MAP_FIXED: ::c_int = 0x0010;
-pub const MAP_ANON: ::c_int = 0x1000;
-
-pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
-
-pub const MCL_CURRENT: ::c_int = 0x0001;
-pub const MCL_FUTURE: ::c_int = 0x0002;
-
-pub const MS_SYNC: ::c_int = 0x0000;
-pub const MS_ASYNC: ::c_int = 0x0001;
-pub const MS_INVALIDATE: ::c_int = 0x0002;
-
-pub const EPERM: ::c_int = 1;
-pub const ENOENT: ::c_int = 2;
-pub const ESRCH: ::c_int = 3;
-pub const EINTR: ::c_int = 4;
-pub const EIO: ::c_int = 5;
-pub const ENXIO: ::c_int = 6;
-pub const E2BIG: ::c_int = 7;
-pub const ENOEXEC: ::c_int = 8;
-pub const EBADF: ::c_int = 9;
-pub const ECHILD: ::c_int = 10;
-pub const EDEADLK: ::c_int = 11;
-pub const ENOMEM: ::c_int = 12;
-pub const EACCES: ::c_int = 13;
-pub const EFAULT: ::c_int = 14;
-pub const ENOTBLK: ::c_int = 15;
-pub const EBUSY: ::c_int = 16;
-pub const EEXIST: ::c_int = 17;
-pub const EXDEV: ::c_int = 18;
-pub const ENODEV: ::c_int = 19;
-pub const ENOTDIR: ::c_int = 20;
-pub const EISDIR: ::c_int = 21;
-pub const EINVAL: ::c_int = 22;
-pub const ENFILE: ::c_int = 23;
-pub const EMFILE: ::c_int = 24;
-pub const ENOTTY: ::c_int = 25;
-pub const ETXTBSY: ::c_int = 26;
-pub const EFBIG: ::c_int = 27;
-pub const ENOSPC: ::c_int = 28;
-pub const ESPIPE: ::c_int = 29;
-pub const EROFS: ::c_int = 30;
-pub const EMLINK: ::c_int = 31;
-pub const EPIPE: ::c_int = 32;
-pub const EDOM: ::c_int = 33;
-pub const ERANGE: ::c_int = 34;
-pub const EAGAIN: ::c_int = 35;
-pub const EWOULDBLOCK: ::c_int = 35;
-pub const EINPROGRESS: ::c_int = 36;
-pub const EALREADY: ::c_int = 37;
-pub const ENOTSOCK: ::c_int = 38;
-pub const EDESTADDRREQ: ::c_int = 39;
-pub const EMSGSIZE: ::c_int = 40;
-pub const EPROTOTYPE: ::c_int = 41;
-pub const ENOPROTOOPT: ::c_int = 42;
-pub const EPROTONOSUPPORT: ::c_int = 43;
-pub const ESOCKTNOSUPPORT: ::c_int = 44;
-pub const EOPNOTSUPP: ::c_int = 45;
-pub const ENOTSUP: ::c_int = EOPNOTSUPP;
-pub const EPFNOSUPPORT: ::c_int = 46;
-pub const EAFNOSUPPORT: ::c_int = 47;
-pub const EADDRINUSE: ::c_int = 48;
-pub const EADDRNOTAVAIL: ::c_int = 49;
-pub const ENETDOWN: ::c_int = 50;
-pub const ENETUNREACH: ::c_int = 51;
-pub const ENETRESET: ::c_int = 52;
-pub const ECONNABORTED: ::c_int = 53;
-pub const ECONNRESET: ::c_int = 54;
-pub const ENOBUFS: ::c_int = 55;
-pub const EISCONN: ::c_int = 56;
-pub const ENOTCONN: ::c_int = 57;
-pub const ESHUTDOWN: ::c_int = 58;
-pub const ETOOMANYREFS: ::c_int = 59;
-pub const ETIMEDOUT: ::c_int = 60;
-pub const ECONNREFUSED: ::c_int = 61;
-pub const ELOOP: ::c_int = 62;
-pub const ENAMETOOLONG: ::c_int = 63;
-pub const EHOSTDOWN: ::c_int = 64;
-pub const EHOSTUNREACH: ::c_int = 65;
-pub const ENOTEMPTY: ::c_int = 66;
-pub const EPROCLIM: ::c_int = 67;
-pub const EUSERS: ::c_int = 68;
-pub const EDQUOT: ::c_int = 69;
-pub const ESTALE: ::c_int = 70;
-pub const EREMOTE: ::c_int = 71;
-pub const EBADRPC: ::c_int = 72;
-pub const ERPCMISMATCH: ::c_int = 73;
-pub const EPROGUNAVAIL: ::c_int = 74;
-pub const EPROGMISMATCH: ::c_int = 75;
-pub const EPROCUNAVAIL: ::c_int = 76;
-pub const ENOLCK: ::c_int = 77;
-pub const ENOSYS: ::c_int = 78;
-pub const EFTYPE: ::c_int = 79;
-pub const EAUTH: ::c_int = 80;
-pub const ENEEDAUTH: ::c_int = 81;
-pub const EIDRM: ::c_int = 82;
-pub const ENOMSG: ::c_int = 83;
-pub const EOVERFLOW: ::c_int = 84;
-pub const ECANCELED: ::c_int = 85;
-pub const EILSEQ: ::c_int = 86;
-pub const ENOATTR: ::c_int = 87;
-pub const EDOOFUS: ::c_int = 88;
-pub const EBADMSG: ::c_int = 89;
-pub const EMULTIHOP: ::c_int = 90;
-pub const ENOLINK: ::c_int = 91;
-pub const EPROTO: ::c_int = 92;
-
-pub const EAI_SYSTEM: ::c_int = 11;
-
-pub const F_DUPFD: ::c_int = 0;
-pub const F_GETFD: ::c_int = 1;
-pub const F_SETFD: ::c_int = 2;
-pub const F_GETFL: ::c_int = 3;
-pub const F_SETFL: ::c_int = 4;
-
-pub const AT_EACCESS: ::c_int = 0x100;
-pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x200;
-pub const AT_SYMLINK_FOLLOW: ::c_int = 0x400;
-pub const AT_REMOVEDIR: ::c_int = 0x800;
-
-pub const SIGTRAP: ::c_int = 5;
-
-pub const GLOB_APPEND  : ::c_int = 0x0001;
-pub const GLOB_DOOFFS  : ::c_int = 0x0002;
-pub const GLOB_ERR     : ::c_int = 0x0004;
-pub const GLOB_MARK    : ::c_int = 0x0008;
-pub const GLOB_NOCHECK : ::c_int = 0x0010;
-pub const GLOB_NOSORT  : ::c_int = 0x0020;
-pub const GLOB_NOESCAPE: ::c_int = 0x2000;
-
-pub const GLOB_NOSPACE : ::c_int = -1;
-pub const GLOB_ABORTED : ::c_int = -2;
-pub const GLOB_NOMATCH : ::c_int = -3;
-
-pub const POSIX_MADV_NORMAL: ::c_int = 0;
-pub const POSIX_MADV_RANDOM: ::c_int = 1;
-pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2;
-pub const POSIX_MADV_WILLNEED: ::c_int = 3;
-pub const POSIX_MADV_DONTNEED: ::c_int = 4;
-
-pub const _SC_IOV_MAX: ::c_int = 56;
-pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 70;
-pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 71;
-pub const _SC_LOGIN_NAME_MAX: ::c_int = 73;
-pub const _SC_MQ_PRIO_MAX: ::c_int = 75;
-pub const _SC_NPROCESSORS_ONLN: ::c_int = 58;
-pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 82;
-pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 83;
-pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 85;
-pub const _SC_THREAD_KEYS_MAX: ::c_int = 86;
-pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 87;
-pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 88;
-pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 89;
-pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 90;
-pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 91;
-pub const _SC_THREAD_STACK_MIN: ::c_int = 93;
-pub const _SC_THREAD_THREADS_MAX: ::c_int = 94;
-pub const _SC_THREADS: ::c_int = 96;
-pub const _SC_TTY_NAME_MAX: ::c_int = 101;
-pub const _SC_ATEXIT_MAX: ::c_int = 107;
-pub const _SC_XOPEN_CRYPT: ::c_int = 108;
-pub const _SC_XOPEN_ENH_I18N: ::c_int = 109;
-pub const _SC_XOPEN_LEGACY: ::c_int = 110;
-pub const _SC_XOPEN_REALTIME: ::c_int = 111;
-pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 112;
-pub const _SC_XOPEN_SHM: ::c_int = 113;
-pub const _SC_XOPEN_UNIX: ::c_int = 115;
-pub const _SC_XOPEN_VERSION: ::c_int = 116;
-pub const _SC_XOPEN_XCU_VERSION: ::c_int = 117;
-
-pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0;
-pub const PTHREAD_CREATE_DETACHED: ::c_int = 1;
-
-pub const RLIMIT_CPU: ::c_int = 0;
-pub const RLIMIT_FSIZE: ::c_int = 1;
-pub const RLIMIT_DATA: ::c_int = 2;
-pub const RLIMIT_STACK: ::c_int = 3;
-pub const RLIMIT_CORE: ::c_int = 4;
-pub const RLIMIT_RSS: ::c_int = 5;
-pub const RLIMIT_MEMLOCK: ::c_int = 6;
-pub const RLIMIT_NPROC: ::c_int = 7;
-pub const RLIMIT_NOFILE: ::c_int = 8;
-pub const RLIMIT_SBSIZE: ::c_int = 9;
-pub const RLIMIT_VMEM: ::c_int = 10;
-pub const RLIMIT_AS: ::c_int = RLIMIT_VMEM;
-pub const RLIM_INFINITY: rlim_t = 0x7fff_ffff_ffff_ffff;
-
-pub const RUSAGE_SELF: ::c_int = 0;
-pub const RUSAGE_CHILDREN: ::c_int = -1;
-
-pub const MADV_NORMAL: ::c_int = 0;
-pub const MADV_RANDOM: ::c_int = 1;
-pub const MADV_SEQUENTIAL: ::c_int = 2;
-pub const MADV_WILLNEED: ::c_int = 3;
-pub const MADV_DONTNEED: ::c_int = 4;
-pub const MADV_FREE: ::c_int = 5;
-pub const MADV_NOSYNC: ::c_int = 6;
-pub const MADV_AUTOSYNC: ::c_int = 7;
-pub const MADV_NOCORE: ::c_int = 8;
-pub const MADV_CORE: ::c_int = 9;
-
-pub const MINCORE_INCORE: ::c_int =  0x1;
-pub const MINCORE_REFERENCED: ::c_int = 0x2;
-pub const MINCORE_MODIFIED: ::c_int = 0x4;
-pub const MINCORE_REFERENCED_OTHER: ::c_int = 0x8;
-pub const MINCORE_MODIFIED_OTHER: ::c_int = 0x10;
-pub const MINCORE_SUPER: ::c_int = 0x20;
-
-pub const AF_UNSPEC: ::c_int = 0;
-pub const AF_LOCAL: ::c_int = 1;
-pub const AF_UNIX: ::c_int = AF_LOCAL;
-pub const AF_INET: ::c_int = 2;
-pub const AF_IMPLINK: ::c_int = 3;
-pub const AF_PUP: ::c_int = 4;
-pub const AF_CHAOS: ::c_int = 5;
-pub const AF_NETBIOS: ::c_int = 6;
-pub const AF_ISO: ::c_int = 7;
-pub const AF_OSI: ::c_int = AF_ISO;
-pub const AF_ECMA: ::c_int = 8;
-pub const AF_DATAKIT: ::c_int = 9;
-pub const AF_CCITT: ::c_int = 10;
-pub const AF_SNA: ::c_int = 11;
-pub const AF_DECnet: ::c_int = 12;
-pub const AF_DLI: ::c_int = 13;
-pub const AF_LAT: ::c_int = 14;
-pub const AF_HYLINK: ::c_int = 15;
-pub const AF_APPLETALK: ::c_int = 16;
-pub const AF_ROUTE: ::c_int = 17;
-pub const AF_LINK: ::c_int = 18;
-pub const pseudo_AF_XTP: ::c_int = 19;
-pub const AF_COIP: ::c_int = 20;
-pub const AF_CNT: ::c_int = 21;
-pub const pseudo_AF_RTIP: ::c_int = 22;
-pub const AF_IPX: ::c_int = 23;
-pub const AF_SIP: ::c_int = 24;
-pub const pseudo_AF_PIP: ::c_int = 25;
-pub const AF_ISDN: ::c_int = 26;
-pub const AF_E164: ::c_int = AF_ISDN;
-pub const pseudo_AF_KEY: ::c_int = 27;
-pub const AF_INET6: ::c_int = 28;
-pub const AF_NATM: ::c_int = 29;
-pub const AF_ATM: ::c_int = 30;
-pub const pseudo_AF_HDRCMPLT: ::c_int = 31;
-pub const AF_NETGRAPH: ::c_int = 32;
-
-pub const PF_UNSPEC: ::c_int = AF_UNSPEC;
-pub const PF_LOCAL: ::c_int = AF_LOCAL;
-pub const PF_UNIX: ::c_int = PF_LOCAL;
-pub const PF_INET: ::c_int = AF_INET;
-pub const PF_IMPLINK: ::c_int = AF_IMPLINK;
-pub const PF_PUP: ::c_int = AF_PUP;
-pub const PF_CHAOS: ::c_int = AF_CHAOS;
-pub const PF_NETBIOS: ::c_int = AF_NETBIOS;
-pub const PF_ISO: ::c_int = AF_ISO;
-pub const PF_OSI: ::c_int = AF_ISO;
-pub const PF_ECMA: ::c_int = AF_ECMA;
-pub const PF_DATAKIT: ::c_int = AF_DATAKIT;
-pub const PF_CCITT: ::c_int = AF_CCITT;
-pub const PF_SNA: ::c_int = AF_SNA;
-pub const PF_DECnet: ::c_int = AF_DECnet;
-pub const PF_DLI: ::c_int = AF_DLI;
-pub const PF_LAT: ::c_int = AF_LAT;
-pub const PF_HYLINK: ::c_int = AF_HYLINK;
-pub const PF_APPLETALK: ::c_int = AF_APPLETALK;
-pub const PF_ROUTE: ::c_int = AF_ROUTE;
-pub const PF_LINK: ::c_int = AF_LINK;
-pub const PF_XTP: ::c_int = pseudo_AF_XTP;
-pub const PF_COIP: ::c_int = AF_COIP;
-pub const PF_CNT: ::c_int = AF_CNT;
-pub const PF_SIP: ::c_int = AF_SIP;
-pub const PF_IPX: ::c_int = AF_IPX;
-pub const PF_RTIP: ::c_int = pseudo_AF_RTIP;
-pub const PF_PIP: ::c_int = pseudo_AF_PIP;
-pub const PF_ISDN: ::c_int = AF_ISDN;
-pub const PF_KEY: ::c_int = pseudo_AF_KEY;
-pub const PF_INET6: ::c_int = AF_INET6;
-pub const PF_NATM: ::c_int = AF_NATM;
-pub const PF_ATM: ::c_int = AF_ATM;
-pub const PF_NETGRAPH: ::c_int = AF_NETGRAPH;
-
-pub const SOMAXCONN: ::c_int = 128;
-
-pub const MSG_OOB: ::c_int = 0x00000001;
-pub const MSG_PEEK: ::c_int = 0x00000002;
-pub const MSG_DONTROUTE: ::c_int = 0x00000004;
-pub const MSG_EOR: ::c_int =  0x00000008;
-pub const MSG_TRUNC: ::c_int = 0x00000010;
-pub const MSG_CTRUNC: ::c_int = 0x00000020;
-pub const MSG_WAITALL: ::c_int = 0x00000040;
-pub const MSG_DONTWAIT: ::c_int = 0x00000080;
-pub const MSG_EOF: ::c_int = 0x00000100;
-
-pub const SOCK_STREAM: ::c_int = 1;
-pub const SOCK_DGRAM: ::c_int = 2;
-pub const SOCK_RAW: ::c_int = 3;
-pub const SOCK_RDM: ::c_int = 4;
-pub const SOCK_SEQPACKET: ::c_int = 5;
-pub const SOCK_CLOEXEC: ::c_int = 0x10000000;
-pub const SOCK_NONBLOCK: ::c_int = 0x20000000;
-pub const SOCK_MAXADDRLEN: ::c_int = 255;
-pub const IPPROTO_ICMP: ::c_int = 1;
-pub const IPPROTO_ICMPV6: ::c_int = 58;
-pub const IPPROTO_TCP: ::c_int = 6;
-pub const IPPROTO_IP: ::c_int = 0;
-pub const IPPROTO_IPV6: ::c_int = 41;
-pub const IP_MULTICAST_TTL: ::c_int = 10;
-pub const IP_MULTICAST_LOOP: ::c_int = 11;
-pub const IP_TTL: ::c_int = 4;
-pub const IP_HDRINCL: ::c_int = 2;
-pub const IP_ADD_MEMBERSHIP: ::c_int = 12;
-pub const IP_DROP_MEMBERSHIP: ::c_int = 13;
-pub const IPV6_JOIN_GROUP: ::c_int = 12;
-pub const IPV6_LEAVE_GROUP: ::c_int = 13;
-
-pub const TCP_NODELAY: ::c_int = 1;
-pub const TCP_KEEPIDLE: ::c_int = 256;
-pub const SOL_SOCKET: ::c_int = 0xffff;
-pub const SO_DEBUG: ::c_int = 0x01;
-pub const SO_ACCEPTCONN: ::c_int = 0x0002;
-pub const SO_REUSEADDR: ::c_int = 0x0004;
-pub const SO_KEEPALIVE: ::c_int = 0x0008;
-pub const SO_DONTROUTE: ::c_int = 0x0010;
-pub const SO_BROADCAST: ::c_int = 0x0020;
-pub const SO_USELOOPBACK: ::c_int = 0x0040;
-pub const SO_LINGER: ::c_int = 0x0080;
-pub const SO_OOBINLINE: ::c_int = 0x0100;
-pub const SO_REUSEPORT: ::c_int = 0x0200;
-pub const SO_TIMESTAMP: ::c_int = 0x0400;
-pub const SO_NOSIGPIPE: ::c_int = 0x0800;
-pub const SO_ACCEPTFILTER: ::c_int = 0x1000;
-pub const SO_SNDBUF: ::c_int = 0x1001;
-pub const SO_RCVBUF: ::c_int = 0x1002;
-pub const SO_SNDLOWAT: ::c_int = 0x1003;
-pub const SO_RCVLOWAT: ::c_int = 0x1004;
-pub const SO_SNDTIMEO: ::c_int = 0x1005;
-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;
-
-pub const LOCK_SH: ::c_int = 1;
-pub const LOCK_EX: ::c_int = 2;
-pub const LOCK_NB: ::c_int = 4;
-pub const LOCK_UN: ::c_int = 8;
-
-pub const O_SYNC: ::c_int = 128;
-pub const O_NONBLOCK: ::c_int = 4;
-
-pub const MAP_COPY: ::c_int = 0x0002;
-pub const MAP_RENAME: ::c_int = 0x0020;
-pub const MAP_NORESERVE: ::c_int = 0x0040;
-pub const MAP_HASSEMAPHORE: ::c_int = 0x0200;
-pub const MAP_STACK: ::c_int = 0x0400;
-pub const MAP_NOSYNC: ::c_int = 0x0800;
-pub const MAP_NOCORE: ::c_int = 0x020000;
-
-pub const IPPROTO_RAW: ::c_int = 255;
-
-pub const _SC_ARG_MAX: ::c_int = 1;
-pub const _SC_CHILD_MAX: ::c_int = 2;
-pub const _SC_CLK_TCK: ::c_int = 3;
-pub const _SC_NGROUPS_MAX: ::c_int = 4;
-pub const _SC_OPEN_MAX: ::c_int = 5;
-pub const _SC_JOB_CONTROL: ::c_int = 6;
-pub const _SC_SAVED_IDS: ::c_int = 7;
-pub const _SC_VERSION: ::c_int = 8;
-pub const _SC_BC_BASE_MAX: ::c_int = 9;
-pub const _SC_BC_DIM_MAX: ::c_int = 10;
-pub const _SC_BC_SCALE_MAX: ::c_int = 11;
-pub const _SC_BC_STRING_MAX: ::c_int = 12;
-pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 13;
-pub const _SC_EXPR_NEST_MAX: ::c_int = 14;
-pub const _SC_LINE_MAX: ::c_int = 15;
-pub const _SC_RE_DUP_MAX: ::c_int = 16;
-pub const _SC_2_VERSION: ::c_int = 17;
-pub const _SC_2_C_BIND: ::c_int = 18;
-pub const _SC_2_C_DEV: ::c_int = 19;
-pub const _SC_2_CHAR_TERM: ::c_int = 20;
-pub const _SC_2_FORT_DEV: ::c_int = 21;
-pub const _SC_2_FORT_RUN: ::c_int = 22;
-pub const _SC_2_LOCALEDEF: ::c_int = 23;
-pub const _SC_2_SW_DEV: ::c_int = 24;
-pub const _SC_2_UPE: ::c_int = 25;
-pub const _SC_STREAM_MAX: ::c_int = 26;
-pub const _SC_TZNAME_MAX: ::c_int = 27;
-pub const _SC_ASYNCHRONOUS_IO: ::c_int = 28;
-pub const _SC_MAPPED_FILES: ::c_int = 29;
-pub const _SC_MEMLOCK: ::c_int = 30;
-pub const _SC_MEMLOCK_RANGE: ::c_int = 31;
-pub const _SC_MEMORY_PROTECTION: ::c_int = 32;
-pub const _SC_MESSAGE_PASSING: ::c_int = 33;
-pub const _SC_PRIORITIZED_IO: ::c_int = 34;
-pub const _SC_PRIORITY_SCHEDULING: ::c_int = 35;
-pub const _SC_REALTIME_SIGNALS: ::c_int = 36;
-pub const _SC_SEMAPHORES: ::c_int = 37;
-pub const _SC_FSYNC: ::c_int = 38;
-pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 39;
-pub const _SC_SYNCHRONIZED_IO: ::c_int = 40;
-pub const _SC_TIMERS: ::c_int = 41;
-pub const _SC_AIO_LISTIO_MAX: ::c_int = 42;
-pub const _SC_AIO_MAX: ::c_int = 43;
-pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 44;
-pub const _SC_DELAYTIMER_MAX: ::c_int = 45;
-pub const _SC_MQ_OPEN_MAX: ::c_int = 46;
-pub const _SC_PAGESIZE: ::c_int = 47;
-pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
-pub const _SC_RTSIG_MAX: ::c_int = 48;
-pub const _SC_SEM_NSEMS_MAX: ::c_int = 49;
-pub const _SC_SEM_VALUE_MAX: ::c_int = 50;
-pub const _SC_SIGQUEUE_MAX: ::c_int = 51;
-pub const _SC_TIMER_MAX: ::c_int = 52;
-pub const _SC_HOST_NAME_MAX: ::c_int = 72;
-
-pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = 0 as *mut _;
-pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0 as *mut _;
-pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = 0 as *mut _;
-pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 1;
-pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2;
-pub const PTHREAD_MUTEX_NORMAL: ::c_int = 3;
-pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_ERRORCHECK;
-
-pub const SCHED_FIFO: ::c_int = 1;
-pub const SCHED_OTHER: ::c_int = 2;
-pub const SCHED_RR: ::c_int = 3;
-
-pub const FD_SETSIZE: usize = 1024;
-
-pub const ST_NOSUID: ::c_ulong = 2;
-
-pub const NI_MAXHOST: ::size_t = 1025;
-
-pub const RTLD_LOCAL: ::c_int = 0;
-pub const RTLD_NODELETE: ::c_int = 0x1000;
-pub const RTLD_NOLOAD: ::c_int = 0x2000;
-pub const RTLD_GLOBAL: ::c_int = 0x100;
-
-pub const LOG_NTP: ::c_int = 12 << 3;
-pub const LOG_SECURITY: ::c_int = 13 << 3;
-pub const LOG_CONSOLE: ::c_int = 14 << 3;
-pub const LOG_NFACILITIES: ::c_int = 24;
-
-pub const TIOCEXCL: ::c_uint = 0x2000740d;
-pub const TIOCNXCL: ::c_uint = 0x2000740e;
-pub const TIOCFLUSH: ::c_ulong = 0x80047410;
-pub const TIOCGETA: ::c_uint = 0x402c7413;
-pub const TIOCSETA: ::c_ulong = 0x802c7414;
-pub const TIOCSETAW: ::c_ulong = 0x802c7415;
-pub const TIOCSETAF: ::c_ulong = 0x802c7416;
-pub const TIOCGETD: ::c_uint = 0x4004741a;
-pub const TIOCSETD: ::c_ulong = 0x8004741b;
-pub const TIOCGDRAINWAIT: ::c_uint = 0x40047456;
-pub const TIOCSDRAINWAIT: ::c_ulong = 0x80047457;
-pub const TIOCTIMESTAMP: ::c_uint = 0x40107459;
-pub const TIOCMGDTRWAIT: ::c_uint = 0x4004745a;
-pub const TIOCMSDTRWAIT: ::c_ulong = 0x8004745b;
-pub const TIOCDRAIN: ::c_uint = 0x2000745e;
-pub const TIOCEXT: ::c_ulong = 0x80047460;
-pub const TIOCSCTTY: ::c_uint = 0x20007461;
-pub const TIOCCONS: ::c_ulong = 0x80047462;
-pub const TIOCGSID: ::c_uint = 0x40047463;
-pub const TIOCSTAT: ::c_uint = 0x20007465;
-pub const TIOCUCNTL: ::c_ulong = 0x80047466;
-pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
-pub const TIOCGWINSZ: ::c_uint = 0x40087468;
-pub const TIOCMGET: ::c_uint = 0x4004746a;
-pub const TIOCM_LE: ::c_int = 0x1;
-pub const TIOCM_DTR: ::c_int = 0x2;
-pub const TIOCM_RTS: ::c_int = 0x4;
-pub const TIOCM_ST: ::c_int = 0x8;
-pub const TIOCM_SR: ::c_int = 0x10;
-pub const TIOCM_CTS: ::c_int = 0x20;
-pub const TIOCM_RI: ::c_int = 0x80;
-pub const TIOCM_DSR: ::c_int = 0x100;
-pub const TIOCM_CD: ::c_int = 0x40;
-pub const TIOCM_CAR: ::c_int = 0x40;
-pub const TIOCM_RNG: ::c_int = 0x80;
-pub const TIOCMBIC: ::c_ulong = 0x8004746b;
-pub const TIOCMBIS: ::c_ulong = 0x8004746c;
-pub const TIOCMSET: ::c_ulong = 0x8004746d;
-pub const TIOCSTART: ::c_uint = 0x2000746e;
-pub const TIOCSTOP: ::c_uint = 0x2000746f;
-pub const TIOCPKT: ::c_ulong = 0x80047470;
-pub const TIOCPKT_DATA: ::c_int = 0x0;
-pub const TIOCPKT_FLUSHREAD: ::c_int = 0x1;
-pub const TIOCPKT_FLUSHWRITE: ::c_int = 0x2;
-pub const TIOCPKT_STOP: ::c_int = 0x4;
-pub const TIOCPKT_START: ::c_int = 0x8;
-pub const TIOCPKT_NOSTOP: ::c_int = 0x10;
-pub const TIOCPKT_DOSTOP: ::c_int = 0x20;
-pub const TIOCPKT_IOCTL: ::c_int = 0x40;
-pub const TIOCNOTTY: ::c_uint = 0x20007471;
-pub const TIOCSTI: ::c_ulong = 0x80017472;
-pub const TIOCOUTQ: ::c_uint = 0x40047473;
-pub const TIOCSPGRP: ::c_ulong = 0x80047476;
-pub const TIOCGPGRP: ::c_uint = 0x40047477;
-pub const TIOCCDTR: ::c_uint = 0x20007478;
-pub const TIOCSDTR: ::c_uint = 0x20007479;
-pub const TIOCCBRK: ::c_uint = 0x2000747a;
-pub const TIOCSBRK: ::c_uint = 0x2000747b;
-pub const TTYDISC: ::c_int = 0x0;
-pub const SLIPDISC: ::c_int = 0x4;
-pub const PPPDISC: ::c_int = 0x5;
-pub const NETGRAPHDISC: ::c_int = 0x6;
-
-pub const B0: speed_t = 0;
-pub const B50: speed_t = 50;
-pub const B75: speed_t = 75;
-pub const B110: speed_t = 110;
-pub const B134: speed_t = 134;
-pub const B150: speed_t = 150;
-pub const B200: speed_t = 200;
-pub const B300: speed_t = 300;
-pub const B600: speed_t = 600;
-pub const B1200: speed_t = 1200;
-pub const B1800: speed_t = 1800;
-pub const B2400: speed_t = 2400;
-pub const B4800: speed_t = 4800;
-pub const B9600: speed_t = 9600;
-pub const B19200: speed_t = 19200;
-pub const B38400: speed_t = 38400;
-pub const B7200: speed_t = 7200;
-pub const B14400: speed_t = 14400;
-pub const B28800: speed_t = 28800;
-pub const B57600: speed_t = 57600;
-pub const B76800: speed_t = 76800;
-pub const B115200: speed_t = 115200;
-pub const B230400: speed_t = 230400;
-pub const EXTA: speed_t = 19200;
-pub const EXTB: speed_t = 38400;
-
-pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t;
-
-pub const CRTSCTS: ::tcflag_t = 0x00030000;
-
-pub const AT_FDCWD: ::c_int = -100;
-
-f! {
-    pub fn WIFCONTINUED(status: ::c_int) -> bool {
-        status == 0x13
-    }
-
-    pub fn WSTOPSIG(status: ::c_int) -> ::c_int {
-        status >> 8
-    }
-
-    pub fn WIFSIGNALED(status: ::c_int) -> bool {
-        (status & 0o177) != 0o177 && (status & 0o177) != 0
-    }
-
-    pub fn WIFSTOPPED(status: ::c_int) -> bool {
-        (status & 0o177) == 0o177
-    }
-}
-
-extern {
-    pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
-    pub fn endutxent();
-    pub fn getutxent() -> *mut utmpx;
-    pub fn getutxid(ut: *const utmpx) -> *mut utmpx;
-    pub fn getutxline(ut: *const utmpx) -> *mut utmpx;
-    pub fn pututxline(ut: *const utmpx) -> *mut utmpx;
-    pub fn setutxent();
-}
-
-#[link(name = "util")]
-extern {
-    pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int;
-    pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
-    pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
-    pub fn aio_error(aiocbp: *const aiocb) -> ::c_int;
-    pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t;
-    pub fn aio_suspend(aiocb_list: *const *const aiocb, nitems: ::c_int,
-                       timeout: *const ::timespec) -> ::c_int;
-    pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
-    pub fn lio_listio(mode: ::c_int, aiocb_list: *const *mut aiocb,
-                      nitems: ::c_int, sevp: *mut sigevent) -> ::c_int;
-    pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
-    pub fn getnameinfo(sa: *const ::sockaddr,
-                       salen: ::socklen_t,
-                       host: *mut ::c_char,
-                       hostlen: ::size_t,
-                       serv: *mut ::c_char,
-                       servlen: ::size_t,
-                       flags: ::c_int) -> ::c_int;
-    pub fn kevent(kq: ::c_int,
-                  changelist: *const ::kevent,
-                  nchanges: ::c_int,
-                  eventlist: *mut ::kevent,
-                  nevents: ::c_int,
-                  timeout: *const ::timespec) -> ::c_int;
-    pub fn mincore(addr: *const ::c_void, len: ::size_t,
-                   vec: *mut ::c_char) -> ::c_int;
-    pub fn sysctlnametomib(name: *const ::c_char,
-                           mibp: *mut ::c_int,
-                           sizep: *mut ::size_t)
-                           -> ::c_int;
-    pub fn shm_open(name: *const ::c_char, oflag: ::c_int, mode: ::mode_t)
-                    -> ::c_int;
-    pub fn sysctl(name: *const ::c_int,
-                  namelen: ::c_uint,
-                  oldp: *mut ::c_void,
-                  oldlenp: *mut ::size_t,
-                  newp: *const ::c_void,
-                  newlen: ::size_t)
-                  -> ::c_int;
-    pub fn sysctlbyname(name: *const ::c_char,
-                        oldp: *mut ::c_void,
-                        oldlenp: *mut ::size_t,
-                        newp: *const ::c_void,
-                        newlen: ::size_t)
-                        -> ::c_int;
-    pub fn sched_setscheduler(pid: ::pid_t,
-                              policy: ::c_int,
-                              param: *const sched_param) -> ::c_int;
-    pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int;
-    pub fn memrchr(cx: *const ::c_void,
-                   c: ::c_int,
-                   n: ::size_t) -> *mut ::c_void;
-    pub fn sendfile(fd: ::c_int,
-                    s: ::c_int,
-                    offset: ::off_t,
-                    nbytes: ::size_t,
-                    hdtr: *mut ::sf_hdtr,
-                    sbytes: *mut ::off_t,
-                    flags: ::c_int) -> ::c_int;
-    pub fn sigtimedwait(set: *const sigset_t,
-                        info: *mut siginfo_t,
-                        timeout: *const ::timespec) -> ::c_int;
-    pub fn sigwaitinfo(set: *const sigset_t,
-                       info: *mut siginfo_t) -> ::c_int;
-    pub fn openpty(amaster: *mut ::c_int,
-                   aslave: *mut ::c_int,
-                   name: *mut ::c_char,
-                   termp: *mut termios,
-                   winp: *mut ::winsize) -> ::c_int;
-    pub fn forkpty(amaster: *mut ::c_int,
-                   name: *mut ::c_char,
-                   termp: *mut termios,
-                   winp: *mut ::winsize) -> ::pid_t;
-    pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char;
-    pub fn duplocale(base: ::locale_t) -> ::locale_t;
-    pub fn newlocale(mask: ::c_int,
-                     locale: *const ::c_char,
-                     base: ::locale_t) -> ::locale_t;
-    pub fn uselocale(loc: ::locale_t) -> ::locale_t;
-    pub fn querylocale(mask: ::c_int, loc: ::locale_t) -> *const ::c_char;
-    pub fn accept4(s: ::c_int, addr: *mut ::sockaddr,
-                   addrlen: *mut ::socklen_t, flags: ::c_int) -> ::c_int;
-    pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char);
-    pub fn pthread_attr_get_np(tid: ::pthread_t,
-                               attr: *mut ::pthread_attr_t) -> ::c_int;
-    pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
-                                     guardsize: *mut ::size_t) -> ::c_int;
-    pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,
-                                 stackaddr: *mut *mut ::c_void,
-                                 stacksize: *mut ::size_t) -> ::c_int;
-    pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t,
-                                       pshared: ::c_int) -> ::c_int;
-    pub fn pthread_condattr_getpshared(attr: *const pthread_condattr_t,
-                                       pshared: *mut ::c_int) -> ::c_int;
-    pub fn pthread_mutexattr_setpshared(attr: *mut pthread_mutexattr_t,
-                                        pshared: ::c_int) -> ::c_int;
-    pub fn pthread_mutexattr_getpshared(attr: *const pthread_mutexattr_t,
-                                        pshared: *mut ::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 fdopendir(fd: ::c_int) -> *mut ::DIR;
-
-    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,
-                    mode: ::mode_t) -> ::c_int;
-    pub fn pthread_condattr_getclock(attr: *const pthread_condattr_t,
-                                     clock_id: *mut clockid_t) -> ::c_int;
-    pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
-                                     clock_id: clockid_t) -> ::c_int;
-    pub fn sethostname(name: *const ::c_char, len: ::c_int) -> ::c_int;
-    pub fn sem_timedwait(sem: *mut sem_t,
-                         abstime: *const ::timespec) -> ::c_int;
-    pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
-                                   abstime: *const ::timespec) -> ::c_int;
-    pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int;
-    pub fn ppoll(fds: *mut ::pollfd,
-                 nfds: ::nfds_t,
-                 timeout: *const ::timespec,
-                 sigmask: *const sigset_t) -> ::c_int;
-    pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int;
-}
-
-cfg_if! {
-    if #[cfg(target_os = "freebsd")] {
-        mod freebsd;
-        pub use self::freebsd::*;
-    } else if #[cfg(target_os = "dragonfly")] {
-        mod dragonfly;
-        pub use self::dragonfly::*;
-    } else {
-        // ...
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/bsd/mod.rs
+++ /dev/null
@@ -1,453 +0,0 @@
-use dox::{mem, Option};
-
-pub type c_char = i8;
-pub type wchar_t = i32;
-pub type off_t = i64;
-pub type useconds_t = u32;
-pub type blkcnt_t = i64;
-pub type socklen_t = u32;
-pub type sa_family_t = u8;
-pub type pthread_t = ::uintptr_t;
-pub type nfds_t = ::c_uint;
-
-s! {
-    pub struct sockaddr {
-        pub sa_len: u8,
-        pub sa_family: sa_family_t,
-        pub sa_data: [::c_char; 14],
-    }
-
-    pub struct sockaddr_in6 {
-        pub sin6_len: u8,
-        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_un {
-        pub sun_len: u8,
-        pub sun_family: sa_family_t,
-        pub sun_path: [c_char; 104]
-    }
-
-    pub struct passwd {
-        pub pw_name: *mut ::c_char,
-        pub pw_passwd: *mut ::c_char,
-        pub pw_uid: ::uid_t,
-        pub pw_gid: ::gid_t,
-        pub pw_change: ::time_t,
-        pub pw_class: *mut ::c_char,
-        pub pw_gecos: *mut ::c_char,
-        pub pw_dir: *mut ::c_char,
-        pub pw_shell: *mut ::c_char,
-        pub pw_expire: ::time_t,
-
-        #[cfg(not(any(target_os = "macos",
-                      target_os = "ios",
-                      target_os = "netbsd",
-                      target_os = "openbsd")))]
-        pub pw_fields: ::c_int,
-    }
-
-    pub struct ifaddrs {
-        pub ifa_next: *mut ifaddrs,
-        pub ifa_name: *mut ::c_char,
-        pub ifa_flags: ::c_uint,
-        pub ifa_addr: *mut ::sockaddr,
-        pub ifa_netmask: *mut ::sockaddr,
-        pub ifa_dstaddr: *mut ::sockaddr,
-        pub ifa_data: *mut ::c_void
-    }
-
-    pub struct fd_set {
-        #[cfg(all(target_pointer_width = "64",
-                  any(target_os = "freebsd", target_os = "dragonfly")))]
-        fds_bits: [i64; FD_SETSIZE / 64],
-        #[cfg(not(all(target_pointer_width = "64",
-                      any(target_os = "freebsd", target_os = "dragonfly"))))]
-        fds_bits: [i32; FD_SETSIZE / 32],
-    }
-
-    pub struct tm {
-        pub tm_sec: ::c_int,
-        pub tm_min: ::c_int,
-        pub tm_hour: ::c_int,
-        pub tm_mday: ::c_int,
-        pub tm_mon: ::c_int,
-        pub tm_year: ::c_int,
-        pub tm_wday: ::c_int,
-        pub tm_yday: ::c_int,
-        pub tm_isdst: ::c_int,
-        pub tm_gmtoff: ::c_long,
-        pub tm_zone: *mut ::c_char,
-    }
-
-    pub struct utsname {
-        #[cfg(not(target_os = "dragonfly"))]
-        pub sysname: [::c_char; 256],
-        #[cfg(target_os = "dragonfly")]
-        pub sysname: [::c_char; 32],
-        #[cfg(not(target_os = "dragonfly"))]
-        pub nodename: [::c_char; 256],
-        #[cfg(target_os = "dragonfly")]
-        pub nodename: [::c_char; 32],
-        #[cfg(not(target_os = "dragonfly"))]
-        pub release: [::c_char; 256],
-        #[cfg(target_os = "dragonfly")]
-        pub release: [::c_char; 32],
-        #[cfg(not(target_os = "dragonfly"))]
-        pub version: [::c_char; 256],
-        #[cfg(target_os = "dragonfly")]
-        pub version: [::c_char; 32],
-        #[cfg(not(target_os = "dragonfly"))]
-        pub machine: [::c_char; 256],
-        #[cfg(target_os = "dragonfly")]
-        pub machine: [::c_char; 32],
-    }
-
-    pub struct msghdr {
-        pub msg_name: *mut ::c_void,
-        pub msg_namelen: ::socklen_t,
-        pub msg_iov: *mut ::iovec,
-        pub msg_iovlen: ::c_int,
-        pub msg_control: *mut ::c_void,
-        pub msg_controllen: ::socklen_t,
-        pub msg_flags: ::c_int,
-    }
-
-    pub struct cmsghdr {
-        pub cmsg_len: ::socklen_t,
-        pub cmsg_level: ::c_int,
-        pub cmsg_type: ::c_int,
-    }
-
-    pub struct fsid_t {
-        __fsid_val: [::int32_t; 2],
-    }
-
-    pub struct if_nameindex {
-        pub if_index: ::c_uint,
-        pub if_name: *mut ::c_char,
-    }
-}
-
-pub const LC_ALL: ::c_int = 0;
-pub const LC_COLLATE: ::c_int = 1;
-pub const LC_CTYPE: ::c_int = 2;
-pub const LC_MONETARY: ::c_int = 3;
-pub const LC_NUMERIC: ::c_int = 4;
-pub const LC_TIME: ::c_int = 5;
-pub const LC_MESSAGES: ::c_int = 6;
-
-pub const FIOCLEX: ::c_ulong = 0x20006601;
-pub const FIONBIO: ::c_ulong = 0x8004667e;
-
-pub const PATH_MAX: ::c_int = 1024;
-
-pub const SA_ONSTACK: ::c_int = 0x0001;
-pub const SA_SIGINFO: ::c_int = 0x0040;
-pub const SA_RESTART: ::c_int = 0x0002;
-pub const SA_RESETHAND: ::c_int = 0x0004;
-pub const SA_NOCLDSTOP: ::c_int = 0x0008;
-pub const SA_NODEFER: ::c_int = 0x0010;
-pub const SA_NOCLDWAIT: ::c_int = 0x0020;
-
-pub const SS_ONSTACK: ::c_int = 1;
-pub const SS_DISABLE: ::c_int = 4;
-
-pub const SIGCHLD: ::c_int = 20;
-pub const SIGBUS: ::c_int = 10;
-pub const SIGUSR1: ::c_int = 30;
-pub const SIGUSR2: ::c_int = 31;
-pub const SIGCONT: ::c_int = 19;
-pub const SIGSTOP: ::c_int = 17;
-pub const SIGTSTP: ::c_int = 18;
-pub const SIGURG: ::c_int = 16;
-pub const SIGIO: ::c_int = 23;
-pub const SIGSYS: ::c_int = 12;
-pub const SIGTTIN: ::c_int = 21;
-pub const SIGTTOU: ::c_int = 22;
-pub const SIGXCPU: ::c_int = 24;
-pub const SIGXFSZ: ::c_int = 25;
-pub const SIGVTALRM: ::c_int = 26;
-pub const SIGPROF: ::c_int = 27;
-pub const SIGWINCH: ::c_int = 28;
-pub const SIGINFO: ::c_int = 29;
-
-pub const SIG_SETMASK: ::c_int = 3;
-pub const SIG_BLOCK: ::c_int = 0x1;
-pub const SIG_UNBLOCK: ::c_int = 0x2;
-
-pub const IPV6_MULTICAST_LOOP: ::c_int = 11;
-pub const IPV6_V6ONLY: ::c_int = 27;
-
-pub const ST_RDONLY: ::c_ulong = 1;
-
-pub const NCCS: usize = 20;
-
-pub const O_ASYNC: ::c_int = 0x40;
-pub const O_FSYNC: ::c_int = 0x80;
-pub const O_NDELAY: ::c_int = 0x4;
-pub const O_NOFOLLOW: ::c_int = 0x100;
-
-pub const F_GETOWN: ::c_int = 5;
-pub const F_SETOWN: ::c_int = 6;
-
-pub const MNT_FORCE: ::c_int = 0x80000;
-
-pub const Q_SYNC: ::c_int = 0x600;
-pub const Q_QUOTAON: ::c_int = 0x100;
-pub const Q_QUOTAOFF: ::c_int = 0x200;
-
-pub const TCIOFF: ::c_int = 3;
-pub const TCION: ::c_int = 4;
-pub const TCOOFF: ::c_int = 1;
-pub const TCOON: ::c_int = 2;
-pub const TCIFLUSH: ::c_int = 1;
-pub const TCOFLUSH: ::c_int = 2;
-pub const TCIOFLUSH: ::c_int = 3;
-pub const TCSANOW: ::c_int = 0;
-pub const TCSADRAIN: ::c_int = 1;
-pub const TCSAFLUSH: ::c_int = 2;
-pub const VEOF: usize = 0;
-pub const VEOL: usize = 1;
-pub const VEOL2: usize = 2;
-pub const VERASE: usize = 3;
-pub const VWERASE: usize = 4;
-pub const VKILL: usize = 5;
-pub const VREPRINT: usize = 6;
-pub const VINTR: usize = 8;
-pub const VQUIT: usize = 9;
-pub const VSUSP: usize = 10;
-pub const VSTART: usize = 12;
-pub const VSTOP: usize = 13;
-pub const VLNEXT: usize = 14;
-pub const VDISCARD: usize = 15;
-pub const VMIN: usize = 16;
-pub const VTIME: usize = 17;
-pub const IGNBRK: ::tcflag_t = 0x00000001;
-pub const BRKINT: ::tcflag_t = 0x00000002;
-pub const IGNPAR: ::tcflag_t = 0x00000004;
-pub const PARMRK: ::tcflag_t = 0x00000008;
-pub const INPCK: ::tcflag_t = 0x00000010;
-pub const ISTRIP: ::tcflag_t = 0x00000020;
-pub const INLCR: ::tcflag_t = 0x00000040;
-pub const IGNCR: ::tcflag_t = 0x00000080;
-pub const ICRNL: ::tcflag_t = 0x00000100;
-pub const IXON: ::tcflag_t = 0x00000200;
-pub const IXOFF: ::tcflag_t = 0x00000400;
-pub const IXANY: ::tcflag_t = 0x00000800;
-pub const IMAXBEL: ::tcflag_t = 0x00002000;
-pub const OPOST: ::tcflag_t = 0x1;
-pub const ONLCR: ::tcflag_t = 0x2;
-pub const OXTABS: ::tcflag_t = 0x4;
-pub const ONOEOT: ::tcflag_t = 0x8;
-pub const CSIZE: ::tcflag_t = 0x00000300;
-pub const CS5: ::tcflag_t = 0x00000000;
-pub const CS6: ::tcflag_t = 0x00000100;
-pub const CS7: ::tcflag_t = 0x00000200;
-pub const CS8: ::tcflag_t = 0x00000300;
-pub const CSTOPB: ::tcflag_t = 0x00000400;
-pub const CREAD: ::tcflag_t = 0x00000800;
-pub const PARENB: ::tcflag_t = 0x00001000;
-pub const PARODD: ::tcflag_t = 0x00002000;
-pub const HUPCL: ::tcflag_t = 0x00004000;
-pub const CLOCAL: ::tcflag_t = 0x00008000;
-pub const ECHOKE: ::tcflag_t = 0x00000001;
-pub const ECHOE: ::tcflag_t = 0x00000002;
-pub const ECHOK: ::tcflag_t = 0x00000004;
-pub const ECHO: ::tcflag_t = 0x00000008;
-pub const ECHONL: ::tcflag_t = 0x00000010;
-pub const ECHOPRT: ::tcflag_t = 0x00000020;
-pub const ECHOCTL: ::tcflag_t = 0x00000040;
-pub const ISIG: ::tcflag_t = 0x00000080;
-pub const ICANON: ::tcflag_t = 0x00000100;
-pub const IEXTEN: ::tcflag_t = 0x00000400;
-pub const EXTPROC: ::tcflag_t = 0x00000800;
-pub const TOSTOP: ::tcflag_t = 0x00400000;
-pub const FLUSHO: ::tcflag_t = 0x00800000;
-pub const PENDIN: ::tcflag_t = 0x20000000;
-pub const NOFLSH: ::tcflag_t = 0x80000000;
-
-pub const WNOHANG: ::c_int = 0x00000001;
-pub const WUNTRACED: ::c_int = 0x00000002;
-
-pub const RTLD_NOW: ::c_int = 0x2;
-pub const RTLD_NEXT: *mut ::c_void = -1isize as *mut ::c_void;
-pub const RTLD_DEFAULT: *mut ::c_void = -2isize as *mut ::c_void;
-pub const RTLD_SELF: *mut ::c_void = -3isize as *mut ::c_void;
-
-pub const LOG_CRON: ::c_int = 9 << 3;
-pub const LOG_AUTHPRIV: ::c_int = 10 << 3;
-pub const LOG_FTP: ::c_int = 11 << 3;
-pub const LOG_PERROR: ::c_int = 0x20;
-
-pub const PIPE_BUF: usize = 512;
-
-f! {
-    pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
-        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
-        let fd = fd as usize;
-        (*set).fds_bits[fd / bits] &= !(1 << (fd % bits));
-        return
-    }
-
-    pub fn FD_ISSET(fd: ::c_int, set: *mut fd_set) -> bool {
-        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
-        let fd = fd as usize;
-        return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0
-    }
-
-    pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () {
-        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
-        let fd = fd as usize;
-        (*set).fds_bits[fd / bits] |= 1 << (fd % bits);
-        return
-    }
-
-    pub fn FD_ZERO(set: *mut fd_set) -> () {
-        for slot in (*set).fds_bits.iter_mut() {
-            *slot = 0;
-        }
-    }
-
-    pub fn WTERMSIG(status: ::c_int) -> ::c_int {
-        status & 0o177
-    }
-
-    pub fn WIFEXITED(status: ::c_int) -> bool {
-        (status & 0o177) == 0
-    }
-
-    pub fn WEXITSTATUS(status: ::c_int) -> ::c_int {
-        status >> 8
-    }
-
-    pub fn WCOREDUMP(status: ::c_int) -> bool {
-        (status & 0o200) != 0
-    }
-}
-
-extern {
-    pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int;
-    pub fn freeifaddrs(ifa: *mut ::ifaddrs);
-    pub fn setgroups(ngroups: ::c_int,
-                     ptr: *const ::gid_t) -> ::c_int;
-    pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
-    pub fn kqueue() -> ::c_int;
-    pub fn unmount(target: *const ::c_char, arg: ::c_int) -> ::c_int;
-    pub fn syscall(num: ::c_int, ...) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__getpwnam_r50")]
-    pub fn getpwnam_r(name: *const ::c_char,
-                      pwd: *mut passwd,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut passwd) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid_r50")]
-    pub fn getpwuid_r(uid: ::uid_t,
-                      pwd: *mut passwd,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut passwd) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__getpwent50")]
-    pub fn getpwent() -> *mut passwd;
-    pub fn setpwent();
-    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;
-    pub fn if_nameindex() -> *mut if_nameindex;
-    pub fn if_freenameindex(ptr: *mut if_nameindex);
-
-    pub fn getpeereid(socket: ::c_int,
-                      euid: *mut ::uid_t,
-                      egid: *mut ::gid_t) -> ::c_int;
-
-    #[cfg_attr(target_os = "macos", link_name = "glob$INODE64")]
-    #[cfg_attr(target_os = "netbsd", link_name = "__glob30")]
-    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")]
-    pub fn globfree(pglob: *mut ::glob_t);
-
-    pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
-                         -> ::c_int;
-
-    pub fn shm_unlink(name: *const ::c_char) -> ::c_int;
-
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"),
-               link_name = "seekdir$INODE64")]
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "seekdir$INODE64$UNIX2003")]
-    pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long);
-
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"),
-               link_name = "telldir$INODE64")]
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "telldir$INODE64$UNIX2003")]
-    pub fn telldir(dirp: *mut ::DIR) -> ::c_long;
-    pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
-                  -> ::c_int;
-
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "msync$UNIX2003")]
-    #[cfg_attr(target_os = "netbsd", link_name = "__msync13")]
-    pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int;
-
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "recvfrom$UNIX2003")]
-    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;
-    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 nl_langinfo(item: ::nl_item) -> *mut ::c_char;
-
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "bind$UNIX2003")]
-    pub fn bind(socket: ::c_int, address: *const ::sockaddr,
-                address_len: ::socklen_t) -> ::c_int;
-
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "writev$UNIX2003")]
-    pub fn writev(fd: ::c_int,
-                  iov: *const ::iovec,
-                  iovcnt: ::c_int) -> ::ssize_t;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "readv$UNIX2003")]
-    pub fn readv(fd: ::c_int,
-                 iov: *const ::iovec,
-                 iovcnt: ::c_int) -> ::ssize_t;
-
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "sendmsg$UNIX2003")]
-    pub fn sendmsg(fd: ::c_int,
-                   msg: *const ::msghdr,
-                   flags: ::c_int) -> ::ssize_t;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "recvmsg$UNIX2003")]
-    pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
-                   -> ::ssize_t;
-
-    pub fn sync();
-}
-
-cfg_if! {
-    if #[cfg(any(target_os = "macos", target_os = "ios"))] {
-        mod apple;
-        pub use self::apple::*;
-    } else if #[cfg(any(target_os = "openbsd", target_os = "netbsd",
-                        target_os = "bitrig"))] {
-        mod netbsdlike;
-        pub use self::netbsdlike::*;
-    } else if #[cfg(any(target_os = "freebsd", target_os = "dragonfly"))] {
-        mod freebsdlike;
-        pub use self::freebsdlike::*;
-    } else {
-        // Unknown target_os
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/bsd/netbsdlike/mod.rs
+++ /dev/null
@@ -1,626 +0,0 @@
-pub type time_t = i64;
-pub type mode_t = u32;
-pub type nlink_t = ::uint32_t;
-pub type ino_t = ::uint64_t;
-pub type pthread_key_t = ::c_int;
-pub type rlim_t = u64;
-pub type speed_t = ::c_uint;
-pub type tcflag_t = ::c_uint;
-pub type nl_item = c_long;
-pub type clockid_t = ::c_int;
-pub type id_t = ::uint32_t;
-pub type sem_t = *mut sem;
-
-pub enum timezone {}
-pub enum sem {}
-
-s! {
-    pub struct sigaction {
-        pub sa_sigaction: ::sighandler_t,
-        pub sa_mask: ::sigset_t,
-        pub sa_flags: ::c_int,
-    }
-
-    pub struct stack_t {
-        pub ss_sp: *mut ::c_void,
-        pub ss_size: ::size_t,
-        pub ss_flags: ::c_int,
-    }
-
-    pub struct sockaddr_in {
-        pub sin_len: u8,
-        pub sin_family: ::sa_family_t,
-        pub sin_port: ::in_port_t,
-        pub sin_addr: ::in_addr,
-        pub sin_zero: [::int8_t; 8],
-    }
-
-    pub struct termios {
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_cc: [::cc_t; ::NCCS],
-        pub c_ispeed: ::c_int,
-        pub c_ospeed: ::c_int,
-    }
-
-    pub struct flock {
-        pub l_start: ::off_t,
-        pub l_len: ::off_t,
-        pub l_pid: ::pid_t,
-        pub l_type: ::c_short,
-        pub l_whence: ::c_short,
-    }
-}
-
-pub const D_T_FMT: ::nl_item = 0;
-pub const D_FMT: ::nl_item = 1;
-pub const T_FMT: ::nl_item = 2;
-pub const T_FMT_AMPM: ::nl_item = 3;
-pub const AM_STR: ::nl_item = 4;
-pub const PM_STR: ::nl_item = 5;
-
-pub const DAY_1: ::nl_item = 6;
-pub const DAY_2: ::nl_item = 7;
-pub const DAY_3: ::nl_item = 8;
-pub const DAY_4: ::nl_item = 9;
-pub const DAY_5: ::nl_item = 10;
-pub const DAY_6: ::nl_item = 11;
-pub const DAY_7: ::nl_item = 12;
-
-pub const ABDAY_1: ::nl_item = 13;
-pub const ABDAY_2: ::nl_item = 14;
-pub const ABDAY_3: ::nl_item = 15;
-pub const ABDAY_4: ::nl_item = 16;
-pub const ABDAY_5: ::nl_item = 17;
-pub const ABDAY_6: ::nl_item = 18;
-pub const ABDAY_7: ::nl_item = 19;
-
-pub const MON_1: ::nl_item = 20;
-pub const MON_2: ::nl_item = 21;
-pub const MON_3: ::nl_item = 22;
-pub const MON_4: ::nl_item = 23;
-pub const MON_5: ::nl_item = 24;
-pub const MON_6: ::nl_item = 25;
-pub const MON_7: ::nl_item = 26;
-pub const MON_8: ::nl_item = 27;
-pub const MON_9: ::nl_item = 28;
-pub const MON_10: ::nl_item = 29;
-pub const MON_11: ::nl_item = 30;
-pub const MON_12: ::nl_item = 31;
-
-pub const ABMON_1: ::nl_item = 32;
-pub const ABMON_2: ::nl_item = 33;
-pub const ABMON_3: ::nl_item = 34;
-pub const ABMON_4: ::nl_item = 35;
-pub const ABMON_5: ::nl_item = 36;
-pub const ABMON_6: ::nl_item = 37;
-pub const ABMON_7: ::nl_item = 38;
-pub const ABMON_8: ::nl_item = 39;
-pub const ABMON_9: ::nl_item = 40;
-pub const ABMON_10: ::nl_item = 41;
-pub const ABMON_11: ::nl_item = 42;
-pub const ABMON_12: ::nl_item = 43;
-
-pub const RADIXCHAR: ::nl_item = 44;
-pub const THOUSEP: ::nl_item = 45;
-pub const YESSTR: ::nl_item = 46;
-pub const YESEXPR: ::nl_item = 47;
-pub const NOSTR: ::nl_item = 48;
-pub const NOEXPR: ::nl_item = 49;
-pub const CRNCYSTR: ::nl_item = 50;
-
-pub const CODESET: ::nl_item = 51;
-
-pub const EXIT_FAILURE : ::c_int = 1;
-pub const EXIT_SUCCESS : ::c_int = 0;
-pub const RAND_MAX : ::c_int = 2147483647;
-pub const EOF : ::c_int = -1;
-pub const SEEK_SET : ::c_int = 0;
-pub const SEEK_CUR : ::c_int = 1;
-pub const SEEK_END : ::c_int = 2;
-pub const _IOFBF : ::c_int = 0;
-pub const _IONBF : ::c_int = 2;
-pub const _IOLBF : ::c_int = 1;
-pub const BUFSIZ : ::c_uint = 1024;
-pub const FOPEN_MAX : ::c_uint = 20;
-pub const FILENAME_MAX : ::c_uint = 1024;
-pub const L_tmpnam : ::c_uint = 1024;
-pub const O_RDONLY : ::c_int = 0;
-pub const O_WRONLY : ::c_int = 1;
-pub const O_RDWR : ::c_int = 2;
-pub const O_ACCMODE : ::c_int = 3;
-pub const O_APPEND : ::c_int = 8;
-pub const O_CREAT : ::c_int = 512;
-pub const O_EXCL : ::c_int = 2048;
-pub const O_NOCTTY : ::c_int = 32768;
-pub const O_TRUNC : ::c_int = 1024;
-pub const O_SYNC : ::c_int = 128;
-pub const S_IFIFO : mode_t = 4096;
-pub const S_IFCHR : mode_t = 8192;
-pub const S_IFBLK : mode_t = 24576;
-pub const S_IFDIR : mode_t = 16384;
-pub const S_IFREG : mode_t = 32768;
-pub const S_IFLNK : mode_t = 40960;
-pub const S_IFSOCK : mode_t = 49152;
-pub const S_IFMT : mode_t = 61440;
-pub const S_IEXEC : mode_t = 64;
-pub const S_IWRITE : mode_t = 128;
-pub const S_IREAD : mode_t = 256;
-pub const S_IRWXU : mode_t = 448;
-pub const S_IXUSR : mode_t = 64;
-pub const S_IWUSR : mode_t = 128;
-pub const S_IRUSR : mode_t = 256;
-pub const S_IRWXG : mode_t = 56;
-pub const S_IXGRP : mode_t = 8;
-pub const S_IWGRP : mode_t = 16;
-pub const S_IRGRP : mode_t = 32;
-pub const S_IRWXO : mode_t = 7;
-pub const S_IXOTH : mode_t = 1;
-pub const S_IWOTH : mode_t = 2;
-pub const S_IROTH : mode_t = 4;
-pub const F_OK : ::c_int = 0;
-pub const R_OK : ::c_int = 4;
-pub const W_OK : ::c_int = 2;
-pub const X_OK : ::c_int = 1;
-pub const STDIN_FILENO : ::c_int = 0;
-pub const STDOUT_FILENO : ::c_int = 1;
-pub const STDERR_FILENO : ::c_int = 2;
-pub const F_LOCK : ::c_int = 1;
-pub const F_TEST : ::c_int = 3;
-pub const F_TLOCK : ::c_int = 2;
-pub const F_ULOCK : ::c_int = 0;
-pub const F_GETLK: ::c_int = 7;
-pub const F_SETLK: ::c_int = 8;
-pub const F_SETLKW: ::c_int = 9;
-pub const SIGHUP : ::c_int = 1;
-pub const SIGINT : ::c_int = 2;
-pub const SIGQUIT : ::c_int = 3;
-pub const SIGILL : ::c_int = 4;
-pub const SIGABRT : ::c_int = 6;
-pub const SIGEMT: ::c_int = 7;
-pub const SIGFPE : ::c_int = 8;
-pub const SIGKILL : ::c_int = 9;
-pub const SIGSEGV : ::c_int = 11;
-pub const SIGPIPE : ::c_int = 13;
-pub const SIGALRM : ::c_int = 14;
-pub const SIGTERM : ::c_int = 15;
-pub const SIGSTKSZ : ::size_t = 40960;
-
-pub const PROT_NONE : ::c_int = 0;
-pub const PROT_READ : ::c_int = 1;
-pub const PROT_WRITE : ::c_int = 2;
-pub const PROT_EXEC : ::c_int = 4;
-
-pub const MAP_FILE : ::c_int = 0x0000;
-pub const MAP_SHARED : ::c_int = 0x0001;
-pub const MAP_PRIVATE : ::c_int = 0x0002;
-pub const MAP_FIXED : ::c_int = 0x0010;
-pub const MAP_ANON : ::c_int = 0x1000;
-
-pub const MAP_FAILED : *mut ::c_void = !0 as *mut ::c_void;
-
-pub const MCL_CURRENT : ::c_int = 0x0001;
-pub const MCL_FUTURE : ::c_int = 0x0002;
-
-pub const MS_ASYNC : ::c_int = 0x0001;
-
-pub const EPERM : ::c_int = 1;
-pub const ENOENT : ::c_int = 2;
-pub const ESRCH : ::c_int = 3;
-pub const EINTR : ::c_int = 4;
-pub const EIO : ::c_int = 5;
-pub const ENXIO : ::c_int = 6;
-pub const E2BIG : ::c_int = 7;
-pub const ENOEXEC : ::c_int = 8;
-pub const EBADF : ::c_int = 9;
-pub const ECHILD : ::c_int = 10;
-pub const EDEADLK : ::c_int = 11;
-pub const ENOMEM : ::c_int = 12;
-pub const EACCES : ::c_int = 13;
-pub const EFAULT : ::c_int = 14;
-pub const ENOTBLK : ::c_int = 15;
-pub const EBUSY : ::c_int = 16;
-pub const EEXIST : ::c_int = 17;
-pub const EXDEV : ::c_int = 18;
-pub const ENODEV : ::c_int = 19;
-pub const ENOTDIR : ::c_int = 20;
-pub const EISDIR : ::c_int = 21;
-pub const EINVAL : ::c_int = 22;
-pub const ENFILE : ::c_int = 23;
-pub const EMFILE : ::c_int = 24;
-pub const ENOTTY : ::c_int = 25;
-pub const ETXTBSY : ::c_int = 26;
-pub const EFBIG : ::c_int = 27;
-pub const ENOSPC : ::c_int = 28;
-pub const ESPIPE : ::c_int = 29;
-pub const EROFS : ::c_int = 30;
-pub const EMLINK : ::c_int = 31;
-pub const EPIPE : ::c_int = 32;
-pub const EDOM : ::c_int = 33;
-pub const ERANGE : ::c_int = 34;
-pub const EAGAIN : ::c_int = 35;
-pub const EWOULDBLOCK : ::c_int = 35;
-pub const EINPROGRESS : ::c_int = 36;
-pub const EALREADY : ::c_int = 37;
-pub const ENOTSOCK : ::c_int = 38;
-pub const EDESTADDRREQ : ::c_int = 39;
-pub const EMSGSIZE : ::c_int = 40;
-pub const EPROTOTYPE : ::c_int = 41;
-pub const ENOPROTOOPT : ::c_int = 42;
-pub const EPROTONOSUPPORT : ::c_int = 43;
-pub const ESOCKTNOSUPPORT : ::c_int = 44;
-pub const EOPNOTSUPP : ::c_int = 45;
-pub const EPFNOSUPPORT : ::c_int = 46;
-pub const EAFNOSUPPORT : ::c_int = 47;
-pub const EADDRINUSE : ::c_int = 48;
-pub const EADDRNOTAVAIL : ::c_int = 49;
-pub const ENETDOWN : ::c_int = 50;
-pub const ENETUNREACH : ::c_int = 51;
-pub const ENETRESET : ::c_int = 52;
-pub const ECONNABORTED : ::c_int = 53;
-pub const ECONNRESET : ::c_int = 54;
-pub const ENOBUFS : ::c_int = 55;
-pub const EISCONN : ::c_int = 56;
-pub const ENOTCONN : ::c_int = 57;
-pub const ESHUTDOWN : ::c_int = 58;
-pub const ETOOMANYREFS : ::c_int = 59;
-pub const ETIMEDOUT : ::c_int = 60;
-pub const ECONNREFUSED : ::c_int = 61;
-pub const ELOOP : ::c_int = 62;
-pub const ENAMETOOLONG : ::c_int = 63;
-pub const EHOSTDOWN : ::c_int = 64;
-pub const EHOSTUNREACH : ::c_int = 65;
-pub const ENOTEMPTY : ::c_int = 66;
-pub const EPROCLIM : ::c_int = 67;
-pub const EUSERS : ::c_int = 68;
-pub const EDQUOT : ::c_int = 69;
-pub const ESTALE : ::c_int = 70;
-pub const EREMOTE : ::c_int = 71;
-pub const EBADRPC : ::c_int = 72;
-pub const ERPCMISMATCH : ::c_int = 73;
-pub const EPROGUNAVAIL : ::c_int = 74;
-pub const EPROGMISMATCH : ::c_int = 75;
-pub const EPROCUNAVAIL : ::c_int = 76;
-pub const ENOLCK : ::c_int = 77;
-pub const ENOSYS : ::c_int = 78;
-pub const EFTYPE : ::c_int = 79;
-pub const EAUTH : ::c_int = 80;
-pub const ENEEDAUTH : ::c_int = 81;
-
-pub const F_DUPFD : ::c_int = 0;
-pub const F_GETFD : ::c_int = 1;
-pub const F_SETFD : ::c_int = 2;
-pub const F_GETFL : ::c_int = 3;
-pub const F_SETFL : ::c_int = 4;
-
-pub const SIGTRAP : ::c_int = 5;
-
-pub const GLOB_APPEND   : ::c_int = 0x0001;
-pub const GLOB_DOOFFS   : ::c_int = 0x0002;
-pub const GLOB_ERR      : ::c_int = 0x0004;
-pub const GLOB_MARK     : ::c_int = 0x0008;
-pub const GLOB_NOCHECK  : ::c_int = 0x0010;
-pub const GLOB_NOSORT   : ::c_int = 0x0020;
-pub const GLOB_NOESCAPE : ::c_int = 0x1000;
-
-pub const GLOB_NOSPACE  : ::c_int = -1;
-pub const GLOB_ABORTED  : ::c_int = -2;
-pub const GLOB_NOMATCH  : ::c_int = -3;
-pub const GLOB_NOSYS : ::c_int = -4;
-
-pub const POSIX_MADV_NORMAL : ::c_int = 0;
-pub const POSIX_MADV_RANDOM : ::c_int = 1;
-pub const POSIX_MADV_SEQUENTIAL : ::c_int = 2;
-pub const POSIX_MADV_WILLNEED : ::c_int = 3;
-pub const POSIX_MADV_DONTNEED : ::c_int = 4;
-
-pub const _SC_XOPEN_SHM : ::c_int = 30;
-
-pub const PTHREAD_CREATE_JOINABLE : ::c_int = 0;
-pub const PTHREAD_CREATE_DETACHED : ::c_int = 1;
-
-// http://man.openbsd.org/OpenBSD-current/man2/clock_getres.2
-// The man page says clock_gettime(3) can accept various values as clockid_t but
-// http://fxr.watson.org/fxr/source/kern/kern_time.c?v=OPENBSD;im=excerpts#L161
-// the implementation rejects anything other than the below two
-//
-// http://netbsd.gw.com/cgi-bin/man-cgi?clock_gettime
-// https://github.com/jsonn/src/blob/HEAD/sys/kern/subr_time.c#L222
-// Basically the same goes for NetBSD
-pub const CLOCK_REALTIME: clockid_t = 0;
-pub const CLOCK_MONOTONIC: clockid_t = 3;
-
-pub const RLIMIT_CPU: ::c_int = 0;
-pub const RLIMIT_FSIZE: ::c_int = 1;
-pub const RLIMIT_DATA: ::c_int = 2;
-pub const RLIMIT_STACK: ::c_int = 3;
-pub const RLIMIT_CORE: ::c_int = 4;
-pub const RLIMIT_RSS: ::c_int = 5;
-pub const RLIMIT_MEMLOCK: ::c_int = 6;
-pub const RLIMIT_NPROC: ::c_int = 7;
-pub const RLIMIT_NOFILE: ::c_int = 8;
-
-pub const RLIM_INFINITY: rlim_t = 0x7fff_ffff_ffff_ffff;
-pub const RLIM_SAVED_MAX: rlim_t = RLIM_INFINITY;
-pub const RLIM_SAVED_CUR: rlim_t = RLIM_INFINITY;
-
-pub const RUSAGE_SELF: ::c_int = 0;
-pub const RUSAGE_CHILDREN: ::c_int = -1;
-
-pub const MADV_NORMAL : ::c_int = 0;
-pub const MADV_RANDOM : ::c_int = 1;
-pub const MADV_SEQUENTIAL : ::c_int = 2;
-pub const MADV_WILLNEED : ::c_int = 3;
-pub const MADV_DONTNEED : ::c_int = 4;
-pub const MADV_FREE : ::c_int = 6;
-
-pub const AF_UNSPEC: ::c_int = 0;
-pub const AF_LOCAL: ::c_int = 1;
-pub const AF_UNIX: ::c_int = AF_LOCAL;
-pub const AF_INET: ::c_int = 2;
-pub const AF_IMPLINK: ::c_int = 3;
-pub const AF_PUP: ::c_int = 4;
-pub const AF_CHAOS: ::c_int = 5;
-pub const AF_NS: ::c_int = 6;
-pub const AF_ISO: ::c_int = 7;
-pub const AF_OSI: ::c_int = AF_ISO;
-pub const AF_DATAKIT: ::c_int = 9;
-pub const AF_CCITT: ::c_int = 10;
-pub const AF_SNA: ::c_int = 11;
-pub const AF_DECnet: ::c_int = 12;
-pub const AF_DLI: ::c_int = 13;
-pub const AF_LAT: ::c_int = 14;
-pub const AF_HYLINK: ::c_int = 15;
-pub const AF_APPLETALK: ::c_int = 16;
-pub const AF_LINK: ::c_int = 18;
-pub const pseudo_AF_XTP: ::c_int = 19;
-pub const AF_COIP: ::c_int = 20;
-pub const AF_CNT: ::c_int = 21;
-pub const pseudo_AF_RTIP: ::c_int = 22;
-pub const AF_IPX: ::c_int = 23;
-pub const AF_INET6: ::c_int = 24;
-pub const pseudo_AF_PIP: ::c_int = 25;
-pub const AF_ISDN: ::c_int = 26;
-pub const AF_E164: ::c_int = AF_ISDN;
-pub const AF_NATM: ::c_int = 27;
-
-pub const PF_UNSPEC: ::c_int = AF_UNSPEC;
-pub const PF_LOCAL: ::c_int = AF_LOCAL;
-pub const PF_UNIX: ::c_int = PF_LOCAL;
-pub const PF_INET: ::c_int = AF_INET;
-pub const PF_IMPLINK: ::c_int = AF_IMPLINK;
-pub const PF_PUP: ::c_int = AF_PUP;
-pub const PF_CHAOS: ::c_int = AF_CHAOS;
-pub const PF_NS: ::c_int = AF_NS;
-pub const PF_ISO: ::c_int = AF_ISO;
-pub const PF_OSI: ::c_int = AF_ISO;
-pub const PF_DATAKIT: ::c_int = AF_DATAKIT;
-pub const PF_CCITT: ::c_int = AF_CCITT;
-pub const PF_SNA: ::c_int = AF_SNA;
-pub const PF_DECnet: ::c_int = AF_DECnet;
-pub const PF_DLI: ::c_int = AF_DLI;
-pub const PF_LAT: ::c_int = AF_LAT;
-pub const PF_HYLINK: ::c_int = AF_HYLINK;
-pub const PF_APPLETALK: ::c_int = AF_APPLETALK;
-pub const PF_LINK: ::c_int = AF_LINK;
-pub const PF_XTP: ::c_int = pseudo_AF_XTP;
-pub const PF_COIP: ::c_int = AF_COIP;
-pub const PF_CNT: ::c_int = AF_CNT;
-pub const PF_IPX: ::c_int = AF_IPX;
-pub const PF_INET6: ::c_int = AF_INET6;
-pub const PF_RTIP: ::c_int = pseudo_AF_RTIP;
-pub const PF_PIP: ::c_int = pseudo_AF_PIP;
-pub const PF_ISDN: ::c_int = AF_ISDN;
-pub const PF_NATM: ::c_int = AF_NATM;
-
-pub const SOCK_STREAM: ::c_int = 1;
-pub const SOCK_DGRAM: ::c_int = 2;
-pub const SOCK_RAW: ::c_int = 3;
-pub const SOCK_SEQPACKET: ::c_int = 5;
-pub const IPPROTO_ICMP: ::c_int = 1;
-pub const IPPROTO_ICMPV6: ::c_int = 58;
-pub const IPPROTO_TCP: ::c_int = 6;
-pub const IPPROTO_IP: ::c_int = 0;
-pub const IPPROTO_IPV6: ::c_int = 41;
-pub const IP_MULTICAST_TTL: ::c_int = 10;
-pub const IP_MULTICAST_LOOP: ::c_int = 11;
-pub const IP_TTL: ::c_int = 4;
-pub const IP_HDRINCL: ::c_int = 2;
-pub const IP_ADD_MEMBERSHIP: ::c_int = 12;
-pub const IP_DROP_MEMBERSHIP: ::c_int = 13;
-
-pub const TCP_NODELAY: ::c_int = 0x01;
-pub const SOL_SOCKET: ::c_int = 0xffff;
-pub const SO_DEBUG: ::c_int = 0x01;
-pub const SO_ACCEPTCONN: ::c_int = 0x0002;
-pub const SO_REUSEADDR: ::c_int = 0x0004;
-pub const SO_KEEPALIVE: ::c_int = 0x0008;
-pub const SO_DONTROUTE: ::c_int = 0x0010;
-pub const SO_BROADCAST: ::c_int = 0x0020;
-pub const SO_USELOOPBACK: ::c_int = 0x0040;
-pub const SO_LINGER: ::c_int = 0x0080;
-pub const SO_OOBINLINE: ::c_int = 0x0100;
-pub const SO_REUSEPORT: ::c_int = 0x0200;
-pub const SO_SNDBUF: ::c_int = 0x1001;
-pub const SO_RCVBUF: ::c_int = 0x1002;
-pub const SO_SNDLOWAT: ::c_int = 0x1003;
-pub const SO_RCVLOWAT: ::c_int = 0x1004;
-pub const SO_ERROR: ::c_int = 0x1007;
-pub const SO_TYPE: ::c_int = 0x1008;
-
-pub const SOMAXCONN: ::c_int = 128;
-
-pub const MSG_OOB: ::c_int = 0x1;
-pub const MSG_PEEK: ::c_int = 0x2;
-pub const MSG_DONTROUTE: ::c_int = 0x4;
-pub const MSG_EOR: ::c_int = 0x8;
-pub const MSG_TRUNC: ::c_int = 0x10;
-pub const MSG_CTRUNC: ::c_int = 0x20;
-pub const MSG_WAITALL: ::c_int = 0x40;
-pub const MSG_DONTWAIT: ::c_int = 0x80;
-pub const MSG_BCAST: ::c_int = 0x100;
-pub const MSG_MCAST: ::c_int = 0x200;
-pub const MSG_NOSIGNAL: ::c_int = 0x400;
-pub const MSG_CMSG_CLOEXEC: ::c_int = 0x800;
-
-pub const SCM_RIGHTS: ::c_int = 0x01;
-
-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;
-
-pub const LOCK_SH: ::c_int = 1;
-pub const LOCK_EX: ::c_int = 2;
-pub const LOCK_NB: ::c_int = 4;
-pub const LOCK_UN: ::c_int = 8;
-
-pub const O_NONBLOCK : ::c_int = 4;
-
-pub const IPPROTO_RAW : ::c_int = 255;
-
-pub const _SC_ARG_MAX : ::c_int = 1;
-pub const _SC_CHILD_MAX : ::c_int = 2;
-pub const _SC_NGROUPS_MAX : ::c_int = 4;
-pub const _SC_OPEN_MAX : ::c_int = 5;
-pub const _SC_JOB_CONTROL : ::c_int = 6;
-pub const _SC_SAVED_IDS : ::c_int = 7;
-pub const _SC_VERSION : ::c_int = 8;
-pub const _SC_BC_BASE_MAX : ::c_int = 9;
-pub const _SC_BC_DIM_MAX : ::c_int = 10;
-pub const _SC_BC_SCALE_MAX : ::c_int = 11;
-pub const _SC_BC_STRING_MAX : ::c_int = 12;
-pub const _SC_COLL_WEIGHTS_MAX : ::c_int = 13;
-pub const _SC_EXPR_NEST_MAX : ::c_int = 14;
-pub const _SC_LINE_MAX : ::c_int = 15;
-pub const _SC_RE_DUP_MAX : ::c_int = 16;
-pub const _SC_2_VERSION : ::c_int = 17;
-pub const _SC_2_C_BIND : ::c_int = 18;
-pub const _SC_2_C_DEV : ::c_int = 19;
-pub const _SC_2_CHAR_TERM : ::c_int = 20;
-pub const _SC_2_FORT_DEV : ::c_int = 21;
-pub const _SC_2_FORT_RUN : ::c_int = 22;
-pub const _SC_2_LOCALEDEF : ::c_int = 23;
-pub const _SC_2_SW_DEV : ::c_int = 24;
-pub const _SC_2_UPE : ::c_int = 25;
-pub const _SC_STREAM_MAX : ::c_int = 26;
-pub const _SC_TZNAME_MAX : ::c_int = 27;
-pub const _SC_PAGESIZE : ::c_int = 28;
-pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
-pub const _SC_FSYNC : ::c_int = 29;
-
-pub const Q_GETQUOTA: ::c_int = 0x300;
-pub const Q_SETQUOTA: ::c_int = 0x400;
-
-pub const RTLD_GLOBAL: ::c_int = 0x100;
-
-pub const LOG_NFACILITIES: ::c_int = 24;
-
-pub const HW_NCPU: ::c_int = 3;
-
-pub const B0: speed_t = 0;
-pub const B50: speed_t = 50;
-pub const B75: speed_t = 75;
-pub const B110: speed_t = 110;
-pub const B134: speed_t = 134;
-pub const B150: speed_t = 150;
-pub const B200: speed_t = 200;
-pub const B300: speed_t = 300;
-pub const B600: speed_t = 600;
-pub const B1200: speed_t = 1200;
-pub const B1800: speed_t = 1800;
-pub const B2400: speed_t = 2400;
-pub const B4800: speed_t = 4800;
-pub const B9600: speed_t = 9600;
-pub const B19200: speed_t = 19200;
-pub const B38400: speed_t = 38400;
-pub const B7200: speed_t = 7200;
-pub const B14400: speed_t = 14400;
-pub const B28800: speed_t = 28800;
-pub const B57600: speed_t = 57600;
-pub const B76800: speed_t = 76800;
-pub const B115200: speed_t = 115200;
-pub const B230400: speed_t = 230400;
-pub const EXTA: speed_t = 19200;
-pub const EXTB: speed_t = 38400;
-
-pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t;
-
-f! {
-    pub fn WSTOPSIG(status: ::c_int) -> ::c_int {
-        status >> 8
-    }
-
-    pub fn WIFSIGNALED(status: ::c_int) -> bool {
-        (status & 0o177) != 0o177 && (status & 0o177) != 0
-    }
-
-    pub fn WIFSTOPPED(status: ::c_int) -> bool {
-        (status & 0o177) == 0o177
-    }
-}
-
-#[link(name = "util")]
-extern {
-    pub fn mincore(addr: *mut ::c_void, len: ::size_t,
-                   vec: *mut ::c_char) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__clock_getres50")]
-    pub fn clock_getres(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__clock_gettime50")]
-    pub fn clock_gettime(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__clock_settime50")]
-    pub fn clock_settime(clk_id: clockid_t, tp: *const ::timespec) -> ::c_int;
-    pub fn __errno() -> *mut ::c_int;
-    pub fn shm_open(name: *const ::c_char, oflag: ::c_int, mode: ::mode_t)
-                    -> ::c_int;
-    pub fn memrchr(cx: *const ::c_void,
-                   c: ::c_int,
-                   n: ::size_t) -> *mut ::c_void;
-    pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int;
-    pub fn mkostemps(template: *mut ::c_char,
-                     suffixlen: ::c_int,
-                     flags: ::c_int) -> ::c_int;
-    pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int;
-    pub fn fdatasync(fd: ::c_int) -> ::c_int;
-    pub fn openpty(amaster: *mut ::c_int,
-                   aslave: *mut ::c_int,
-                   name: *mut ::c_char,
-                   termp: *mut termios,
-                   winp: *mut ::winsize) -> ::c_int;
-    pub fn forkpty(amaster: *mut ::c_int,
-                   name: *mut ::c_char,
-                   termp: *mut termios,
-                   winp: *mut ::winsize) -> ::pid_t;
-    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 fdopendir(fd: ::c_int) -> *mut ::DIR;
-
-    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,
-                    mode: ::mode_t) -> ::c_int;
-    pub fn sem_timedwait(sem: *mut sem_t,
-                         abstime: *const ::timespec) -> ::c_int;
-    pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
-                                     clock_id: clockid_t) -> ::c_int;
-    pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
-    pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
-                                   abstime: *const ::timespec) -> ::c_int;
-    pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int;
-}
-
-cfg_if! {
-    if #[cfg(target_os = "netbsd")] {
-        mod netbsd;
-        pub use self::netbsd::*;
-    } else if #[cfg(any(target_os = "openbsd", target_os = "bitrig"))] {
-        mod openbsdlike;
-        pub use self::openbsdlike::*;
-    } else {
-        // Unknown target_os
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/bsd/netbsdlike/netbsd/mod.rs
+++ /dev/null
@@ -1,736 +0,0 @@
-pub type clock_t = ::c_uint;
-pub type suseconds_t = ::c_int;
-pub type dev_t = u64;
-pub type blksize_t = ::int32_t;
-pub type fsblkcnt_t = ::uint64_t;
-pub type fsfilcnt_t = ::uint64_t;
-pub type idtype_t = ::c_int;
-
-s! {
-    pub struct aiocb {
-        pub aio_offset: ::off_t,
-        pub aio_buf: *mut ::c_void,
-        pub aio_nbytes: ::size_t,
-        pub aio_fildes: ::c_int,
-        pub aio_lio_opcode: ::c_int,
-        pub aio_reqprio: ::c_int,
-        pub aio_sigevent: ::sigevent,
-        _state: ::c_int,
-        _errno: ::c_int,
-        _retval: ::ssize_t
-    }
-
-    pub struct dirent {
-        pub d_fileno: ::ino_t,
-        pub d_reclen: u16,
-        pub d_namlen: u16,
-        pub d_type: u8,
-        pub d_name: [::c_char; 512],
-    }
-
-    pub struct glob_t {
-        pub gl_pathc:   ::size_t,
-        pub gl_matchc:  ::size_t,
-        pub gl_offs:    ::size_t,
-        pub gl_flags:   ::c_int,
-        pub gl_pathv:   *mut *mut ::c_char,
-
-        __unused3: *mut ::c_void,
-
-        __unused4: *mut ::c_void,
-        __unused5: *mut ::c_void,
-        __unused6: *mut ::c_void,
-        __unused7: *mut ::c_void,
-        __unused8: *mut ::c_void,
-    }
-
-    pub struct sigevent {
-        pub sigev_notify: ::c_int,
-        pub sigev_signo: ::c_int,
-        pub sigev_value: ::sigval,
-        __unused1: *mut ::c_void,       //actually a function pointer
-        pub sigev_notify_attributes: *mut ::c_void
-    }
-
-    pub struct sigset_t {
-        __bits: [u32; 4],
-    }
-
-    pub struct stat {
-        pub st_dev: ::dev_t,
-        pub st_mode: ::mode_t,
-        pub st_ino: ::ino_t,
-        pub st_nlink: ::nlink_t,
-        pub st_uid: ::uid_t,
-        pub st_gid: ::gid_t,
-        pub st_rdev: ::dev_t,
-        pub st_atime: ::time_t,
-        pub st_atimensec: ::c_long,
-        pub st_mtime: ::time_t,
-        pub st_mtimensec: ::c_long,
-        pub st_ctime: ::time_t,
-        pub st_ctimensec: ::c_long,
-        pub st_birthtime: ::time_t,
-        pub st_birthtimensec: ::c_long,
-        pub st_size: ::off_t,
-        pub st_blocks: ::blkcnt_t,
-        pub st_blksize: ::blksize_t,
-        pub st_flags: ::uint32_t,
-        pub st_gen: ::uint32_t,
-        pub st_spare: [::uint32_t; 2],
-    }
-
-    pub struct statvfs {
-        pub f_flag: ::c_ulong,
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_iosize: ::c_ulong,
-
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_bresvd: ::fsblkcnt_t,
-
-        pub f_files: ::fsfilcnt_t,
-        pub f_ffree: ::fsfilcnt_t,
-        pub f_favail: ::fsfilcnt_t,
-        pub f_fresvd: ::fsfilcnt_t,
-
-        pub f_syncreads: ::uint64_t,
-        pub f_syncwrites: ::uint64_t,
-
-        pub f_asyncreads: ::uint64_t,
-        pub f_asyncwrites: ::uint64_t,
-
-        pub f_fsidx: ::fsid_t,
-        pub f_fsid: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-        pub f_owner: ::uid_t,
-
-        pub f_spare: [::uint32_t; 4],
-
-        pub f_fstypename: [::c_char; 32],
-        pub f_mntonname: [::c_char; 1024],
-        pub f_mntfromname: [::c_char; 1024],
-    }
-
-    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_canonname: *mut ::c_char,
-        pub ai_addr: *mut ::sockaddr,
-        pub ai_next: *mut ::addrinfo,
-    }
-
-    pub struct sockaddr_storage {
-        pub ss_len: u8,
-        pub ss_family: ::sa_family_t,
-        __ss_pad1: [u8; 6],
-        __ss_pad2: i64,
-        __ss_pad3: [u8; 112],
-    }
-
-    pub struct siginfo_t {
-        pub si_signo: ::c_int,
-        pub si_code: ::c_int,
-        pub si_errno: ::c_int,
-        __pad1: ::c_int,
-        pub si_addr: *mut ::c_void,
-        __pad2: [u64; 13],
-    }
-
-    pub struct pthread_attr_t {
-        pta_magic: ::c_uint,
-        pta_flags: ::c_int,
-        pta_private: *mut ::c_void,
-    }
-
-    pub struct pthread_mutex_t {
-        ptm_magic: ::c_uint,
-        ptm_errorcheck: ::c_uchar,
-        ptm_pad1: [u8; 3],
-        ptm_interlock: ::c_uchar,
-        ptm_pad2: [u8; 3],
-        ptm_owner: ::pthread_t,
-        ptm_waiters: *mut u8,
-        ptm_recursed: ::c_uint,
-        ptm_spare2: *mut ::c_void,
-    }
-
-    pub struct pthread_mutexattr_t {
-        ptma_magic: ::c_uint,
-        ptma_private: *mut ::c_void,
-    }
-
-    pub struct pthread_cond_t {
-        ptc_magic: ::c_uint,
-        ptc_lock: ::c_uchar,
-        ptc_waiters_first: *mut u8,
-        ptc_waiters_last: *mut u8,
-        ptc_mutex: *mut ::pthread_mutex_t,
-        ptc_private: *mut ::c_void,
-    }
-
-    pub struct pthread_condattr_t {
-        ptca_magic: ::c_uint,
-        ptca_private: *mut ::c_void,
-    }
-
-    pub struct pthread_rwlock_t {
-        ptr_magic: ::c_uint,
-        ptr_interlock: ::c_uchar,
-        ptr_rblocked_first: *mut u8,
-        ptr_rblocked_last: *mut u8,
-        ptr_wblocked_first: *mut u8,
-        ptr_wblocked_last: *mut u8,
-        ptr_nreaders: ::c_uint,
-        ptr_owner: ::pthread_t,
-        ptr_private: *mut ::c_void,
-    }
-
-    pub struct kevent {
-        pub ident: ::uintptr_t,
-        pub filter: ::uint32_t,
-        pub flags: ::uint32_t,
-        pub fflags: ::uint32_t,
-        pub data: ::int64_t,
-        pub udata: ::intptr_t,
-    }
-
-    pub struct dqblk {
-        pub dqb_bhardlimit: ::uint32_t,
-        pub dqb_bsoftlimit: ::uint32_t,
-        pub dqb_curblocks: ::uint32_t,
-        pub dqb_ihardlimit: ::uint32_t,
-        pub dqb_isoftlimit: ::uint32_t,
-        pub dqb_curinodes: ::uint32_t,
-        pub dqb_btime: ::int32_t,
-        pub dqb_itime: ::int32_t,
-    }
-
-    pub struct Dl_info {
-        pub dli_fname: *const ::c_char,
-        pub dli_fbase: *mut ::c_void,
-        pub dli_sname: *const ::c_char,
-        pub dli_saddr: *const ::c_void,
-    }
-
-    pub struct lconv {
-        pub decimal_point: *mut ::c_char,
-        pub thousands_sep: *mut ::c_char,
-        pub grouping: *mut ::c_char,
-        pub int_curr_symbol: *mut ::c_char,
-        pub currency_symbol: *mut ::c_char,
-        pub mon_decimal_point: *mut ::c_char,
-        pub mon_thousands_sep: *mut ::c_char,
-        pub mon_grouping: *mut ::c_char,
-        pub positive_sign: *mut ::c_char,
-        pub negative_sign: *mut ::c_char,
-        pub int_frac_digits: ::c_char,
-        pub frac_digits: ::c_char,
-        pub p_cs_precedes: ::c_char,
-        pub p_sep_by_space: ::c_char,
-        pub n_cs_precedes: ::c_char,
-        pub n_sep_by_space: ::c_char,
-        pub p_sign_posn: ::c_char,
-        pub n_sign_posn: ::c_char,
-        pub int_p_cs_precedes: ::c_char,
-        pub int_n_cs_precedes: ::c_char,
-        pub int_p_sep_by_space: ::c_char,
-        pub int_n_sep_by_space: ::c_char,
-        pub int_p_sign_posn: ::c_char,
-        pub int_n_sign_posn: ::c_char,
-    }
-}
-
-pub const AT_FDCWD: ::c_int = -100;
-pub const AT_EACCESS: ::c_int = 0x100;
-pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x200;
-pub const AT_SYMLINK_FOLLOW: ::c_int = 0x400;
-pub const AT_REMOVEDIR: ::c_int = 0x800;
-
-pub const LC_COLLATE_MASK: ::c_int = (1 << ::LC_COLLATE);
-pub const LC_CTYPE_MASK: ::c_int = (1 << ::LC_CTYPE);
-pub const LC_MONETARY_MASK: ::c_int = (1 << ::LC_MONETARY);
-pub const LC_NUMERIC_MASK: ::c_int = (1 << ::LC_NUMERIC);
-pub const LC_TIME_MASK: ::c_int = (1 << ::LC_TIME);
-pub const LC_MESSAGES_MASK: ::c_int = (1 << ::LC_MESSAGES);
-pub const LC_ALL_MASK: ::c_int = !0;
-
-pub const ERA: ::nl_item = 52;
-pub const ERA_D_FMT: ::nl_item = 53;
-pub const ERA_D_T_FMT: ::nl_item = 54;
-pub const ERA_T_FMT: ::nl_item = 55;
-pub const ALT_DIGITS: ::nl_item = 56;
-
-pub const O_CLOEXEC: ::c_int = 0x400000;
-pub const O_ALT_IO: ::c_int = 0x40000;
-pub const O_NOSIGPIPE: ::c_int = 0x1000000;
-pub const O_SEARCH: ::c_int = 0x800000;
-pub const O_EXLOCK: ::c_int = 0x20;
-pub const O_SHLOCK: ::c_int = 0x10;
-pub const O_DIRECTORY: ::c_int = 0x200000;
-
-pub const MS_SYNC : ::c_int = 0x4;
-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 F_DUPFD_CLOEXEC : ::c_int = 12;
-pub const F_CLOSEM: ::c_int = 10;
-pub const F_GETNOSIGPIPE: ::c_int = 13;
-pub const F_SETNOSIGPIPE: ::c_int = 14;
-pub const F_MAXFD: ::c_int = 11;
-
-pub const IPV6_JOIN_GROUP: ::c_int = 12;
-pub const IPV6_LEAVE_GROUP: ::c_int = 13;
-
-pub const SOCK_CONN_DGRAM: ::c_int = 6;
-pub const SOCK_DCCP: ::c_int = SOCK_CONN_DGRAM;
-pub const SOCK_NOSIGPIPE: ::c_int = 0x40000000;
-pub const SOCK_FLAGS_MASK: ::c_int = 0xf0000000;
-
-pub const SO_SNDTIMEO: ::c_int = 0x100b;
-pub const SO_RCVTIMEO: ::c_int = 0x100c;
-pub const SO_ACCEPTFILTER: ::c_int = 0x1000;
-pub const SO_TIMESTAMP: ::c_int = 0x2000;
-pub const SO_OVERFLOWED: ::c_int = 0x1009;
-pub const SO_NOHEADER: ::c_int = 0x100a;
-
-pub const AF_OROUTE: ::c_int = 17;
-pub const AF_ARP: ::c_int = 28;
-pub const pseudo_AF_KEY: ::c_int = 29;
-pub const pseudo_AF_HDRCMPLT: ::c_int = 30;
-pub const AF_BLUETOOTH: ::c_int = 31;
-pub const AF_IEEE80211: ::c_int = 32;
-pub const AF_MPLS: ::c_int = 33;
-pub const AF_ROUTE: ::c_int = 34;
-pub const AF_MAX: ::c_int = 35;
-
-pub const NET_MAXID: ::c_int = AF_MAX;
-pub const NET_RT_DUMP: ::c_int = 1;
-pub const NET_RT_FLAGS: ::c_int = 2;
-pub const NET_RT_OOIFLIST: ::c_int = 3;
-pub const NET_RT_OIFLIST: ::c_int = 4;
-pub const NET_RT_IFLIST: ::c_int = 5;
-pub const NET_RT_MAXID: ::c_int = 6;
-
-pub const PF_OROUTE: ::c_int = AF_OROUTE;
-pub const PF_ARP: ::c_int = AF_ARP;
-pub const PF_KEY: ::c_int = pseudo_AF_KEY;
-pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
-pub const PF_MPLS: ::c_int = AF_MPLS;
-pub const PF_ROUTE: ::c_int = AF_ROUTE;
-pub const PF_MAX: ::c_int = AF_MAX;
-
-pub const MSG_NBIO: ::c_int = 0x1000;
-pub const MSG_WAITFORONE: ::c_int = 0x2000;
-pub const MSG_NOTIFICATION: ::c_int = 0x4000;
-
-pub const SCM_TIMESTAMP: ::c_int = 0x08;
-pub const SCM_CREDS: ::c_int = 0x10;
-
-pub const O_DSYNC : ::c_int = 0x10000;
-
-pub const MAP_RENAME : ::c_int = 0x20;
-pub const MAP_NORESERVE : ::c_int = 0x40;
-pub const MAP_HASSEMAPHORE : ::c_int = 0x200;
-pub const MAP_WIRED: ::c_int = 0x800;
-
-pub const _SC_IOV_MAX : ::c_int = 32;
-pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 47;
-pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 48;
-pub const _SC_LOGIN_NAME_MAX : ::c_int = 37;
-pub const _SC_MQ_PRIO_MAX : ::c_int = 55;
-pub const _SC_NPROCESSORS_ONLN : ::c_int = 1002;
-pub const _SC_THREADS : ::c_int = 41;
-pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 61;
-pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 62;
-pub const _SC_THREAD_DESTRUCTOR_ITERATIONS : ::c_int = 57;
-pub const _SC_THREAD_KEYS_MAX : ::c_int = 58;
-pub const _SC_THREAD_PRIO_INHERIT : ::c_int = 64;
-pub const _SC_THREAD_PRIO_PROTECT : ::c_int = 65;
-pub const _SC_THREAD_PRIORITY_SCHEDULING : ::c_int = 63;
-pub const _SC_THREAD_PROCESS_SHARED : ::c_int = 66;
-pub const _SC_THREAD_SAFE_FUNCTIONS : ::c_int = 67;
-pub const _SC_THREAD_STACK_MIN : ::c_int = 59;
-pub const _SC_THREAD_THREADS_MAX : ::c_int = 60;
-pub const _SC_TTY_NAME_MAX : ::c_int = 68;
-pub const _SC_ATEXIT_MAX : ::c_int = 40;
-pub const _SC_CLK_TCK : ::c_int = 39;
-pub const _SC_AIO_LISTIO_MAX : ::c_int = 51;
-pub const _SC_AIO_MAX : ::c_int = 52;
-pub const _SC_ASYNCHRONOUS_IO : ::c_int = 50;
-pub const _SC_MAPPED_FILES : ::c_int = 33;
-pub const _SC_MEMLOCK : ::c_int = 34;
-pub const _SC_MEMLOCK_RANGE : ::c_int = 35;
-pub const _SC_MEMORY_PROTECTION : ::c_int = 36;
-pub const _SC_MESSAGE_PASSING : ::c_int = 53;
-pub const _SC_MQ_OPEN_MAX : ::c_int = 54;
-pub const _SC_PRIORITY_SCHEDULING : ::c_int = 56;
-pub const _SC_SEMAPHORES : ::c_int = 42;
-pub const _SC_SHARED_MEMORY_OBJECTS : ::c_int = 87;
-pub const _SC_SYNCHRONIZED_IO : ::c_int = 31;
-pub const _SC_TIMERS : ::c_int = 44;
-pub const _SC_HOST_NAME_MAX : ::c_int = 69;
-
-pub const FD_SETSIZE: usize = 0x100;
-
-pub const ST_NOSUID: ::c_ulong = 8;
-
-pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
-    ptm_magic: 0x33330003,
-    ptm_errorcheck: 0,
-    ptm_interlock: 0,
-    ptm_waiters: 0 as *mut _,
-    ptm_owner: 0,
-    ptm_pad1: [0; 3],
-    ptm_pad2: [0; 3],
-    ptm_recursed: 0,
-    ptm_spare2: 0 as *mut _,
-};
-pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
-    ptc_magic: 0x55550005,
-    ptc_lock: 0,
-    ptc_waiters_first: 0 as *mut _,
-    ptc_waiters_last: 0 as *mut _,
-    ptc_mutex: 0 as *mut _,
-    ptc_private: 0 as *mut _,
-};
-pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
-    ptr_magic: 0x99990009,
-    ptr_interlock: 0,
-    ptr_rblocked_first: 0 as *mut _,
-    ptr_rblocked_last: 0 as *mut _,
-    ptr_wblocked_first: 0 as *mut _,
-    ptr_wblocked_last: 0 as *mut _,
-    ptr_nreaders: 0,
-    ptr_owner: 0,
-    ptr_private: 0 as *mut _,
-};
-pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
-pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 1;
-pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2;
-pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
-
-pub const EVFILT_AIO: ::int32_t = 2;
-pub const EVFILT_PROC: ::int32_t = 4;
-pub const EVFILT_READ: ::int32_t = 0;
-pub const EVFILT_SIGNAL: ::int32_t = 5;
-pub const EVFILT_TIMER: ::int32_t = 6;
-pub const EVFILT_VNODE: ::int32_t = 3;
-pub const EVFILT_WRITE: ::int32_t = 1;
-
-pub const EV_ADD: ::uint32_t = 0x1;
-pub const EV_DELETE: ::uint32_t = 0x2;
-pub const EV_ENABLE: ::uint32_t = 0x4;
-pub const EV_DISABLE: ::uint32_t = 0x8;
-pub const EV_ONESHOT: ::uint32_t = 0x10;
-pub const EV_CLEAR: ::uint32_t = 0x20;
-pub const EV_RECEIPT: ::uint32_t = 0x40;
-pub const EV_DISPATCH: ::uint32_t = 0x80;
-pub const EV_FLAG1: ::uint32_t = 0x2000;
-pub const EV_ERROR: ::uint32_t = 0x4000;
-pub const EV_EOF: ::uint32_t = 0x8000;
-pub const EV_SYSFLAGS: ::uint32_t = 0xf000;
-
-pub const NOTE_LOWAT: ::uint32_t = 0x00000001;
-pub const NOTE_DELETE: ::uint32_t = 0x00000001;
-pub const NOTE_WRITE: ::uint32_t = 0x00000002;
-pub const NOTE_EXTEND: ::uint32_t = 0x00000004;
-pub const NOTE_ATTRIB: ::uint32_t = 0x00000008;
-pub const NOTE_LINK: ::uint32_t = 0x00000010;
-pub const NOTE_RENAME: ::uint32_t = 0x00000020;
-pub const NOTE_REVOKE: ::uint32_t = 0x00000040;
-pub const NOTE_EXIT: ::uint32_t = 0x80000000;
-pub const NOTE_FORK: ::uint32_t = 0x40000000;
-pub const NOTE_EXEC: ::uint32_t = 0x20000000;
-pub const NOTE_PDATAMASK: ::uint32_t = 0x000fffff;
-pub const NOTE_PCTRLMASK: ::uint32_t = 0xf0000000;
-pub const NOTE_TRACK: ::uint32_t = 0x00000001;
-pub const NOTE_TRACKERR: ::uint32_t = 0x00000002;
-pub const NOTE_CHILD: ::uint32_t = 0x00000004;
-
-pub const CRTSCTS: ::tcflag_t = 0x00010000;
-
-pub const TMP_MAX : ::c_uint = 308915776;
-
-pub const NI_MAXHOST: ::socklen_t = 1025;
-
-pub const RTLD_NOLOAD: ::c_int = 0x2000;
-pub const RTLD_LOCAL: ::c_int = 0x200;
-
-pub const CTL_MAXNAME: ::c_int = 12;
-pub const SYSCTL_NAMELEN: ::c_int = 32;
-pub const SYSCTL_DEFSIZE: ::c_int = 8;
-pub const CTLTYPE_NODE: ::c_int = 1;
-pub const CTLTYPE_INT: ::c_int = 2;
-pub const CTLTYPE_STRING: ::c_int = 3;
-pub const CTLTYPE_QUAD: ::c_int = 4;
-pub const CTLTYPE_STRUCT: ::c_int = 5;
-pub const CTLTYPE_BOOL: ::c_int = 6;
-pub const CTLFLAG_READONLY: ::c_int = 0x00000000;
-pub const CTLFLAG_READWRITE: ::c_int = 0x00000070;
-pub const CTLFLAG_ANYWRITE: ::c_int = 0x00000080;
-pub const CTLFLAG_PRIVATE: ::c_int = 0x00000100;
-pub const CTLFLAG_PERMANENT: ::c_int = 0x00000200;
-pub const CTLFLAG_OWNDATA: ::c_int = 0x00000400;
-pub const CTLFLAG_IMMEDIATE: ::c_int = 0x00000800;
-pub const CTLFLAG_HEX: ::c_int = 0x00001000;
-pub const CTLFLAG_ROOT: ::c_int = 0x00002000;
-pub const CTLFLAG_ANYNUMBER: ::c_int = 0x00004000;
-pub const CTLFLAG_HIDDEN: ::c_int = 0x00008000;
-pub const CTLFLAG_ALIAS: ::c_int = 0x00010000;
-pub const CTLFLAG_MMAP: ::c_int = 0x00020000;
-pub const CTLFLAG_OWNDESC: ::c_int = 0x00040000;
-pub const CTLFLAG_UNSIGNED: ::c_int = 0x00080000;
-pub const SYSCTL_VERS_MASK: ::c_int = 0xff000000;
-pub const SYSCTL_VERS_0: ::c_int = 0x00000000;
-pub const SYSCTL_VERS_1: ::c_int = 0x01000000;
-pub const SYSCTL_VERSION: ::c_int = SYSCTL_VERS_1;
-pub const CTL_EOL: ::c_int = -1;
-pub const CTL_QUERY: ::c_int = -2;
-pub const CTL_CREATE: ::c_int = -3;
-pub const CTL_CREATESYM: ::c_int = -4;
-pub const CTL_DESTROY: ::c_int = -5;
-pub const CTL_MMAP: ::c_int = -6;
-pub const CTL_DESCRIBE: ::c_int = -7;
-pub const CTL_UNSPEC: ::c_int = 0;
-pub const CTL_KERN: ::c_int = 1;
-pub const CTL_VM: ::c_int = 2;
-pub const CTL_VFS: ::c_int = 3;
-pub const CTL_NET: ::c_int = 4;
-pub const CTL_DEBUG: ::c_int = 5;
-pub const CTL_HW: ::c_int = 6;
-pub const CTL_MACHDEP: ::c_int = 7;
-pub const CTL_USER: ::c_int = 8;
-pub const CTL_DDB: ::c_int = 9;
-pub const CTL_PROC: ::c_int = 10;
-pub const CTL_VENDOR: ::c_int = 11;
-pub const CTL_EMUL: ::c_int = 12;
-pub const CTL_SECURITY: ::c_int = 13;
-pub const CTL_MAXID: ::c_int = 14;
-pub const KERN_OSTYPE: ::c_int = 1;
-pub const KERN_OSRELEASE: ::c_int = 2;
-pub const KERN_OSREV: ::c_int = 3;
-pub const KERN_VERSION: ::c_int = 4;
-pub const KERN_MAXVNODES: ::c_int = 5;
-pub const KERN_MAXPROC: ::c_int = 6;
-pub const KERN_MAXFILES: ::c_int = 7;
-pub const KERN_ARGMAX: ::c_int = 8;
-pub const KERN_SECURELVL: ::c_int = 9;
-pub const KERN_HOSTNAME: ::c_int = 10;
-pub const KERN_HOSTID: ::c_int = 11;
-pub const KERN_CLOCKRATE: ::c_int = 12;
-pub const KERN_VNODE: ::c_int = 13;
-pub const KERN_PROC: ::c_int = 14;
-pub const KERN_FILE: ::c_int = 15;
-pub const KERN_PROF: ::c_int = 16;
-pub const KERN_POSIX1: ::c_int = 17;
-pub const KERN_NGROUPS: ::c_int = 18;
-pub const KERN_JOB_CONTROL: ::c_int = 19;
-pub const KERN_SAVED_IDS: ::c_int = 20;
-pub const KERN_OBOOTTIME: ::c_int = 21;
-pub const KERN_DOMAINNAME: ::c_int = 22;
-pub const KERN_MAXPARTITIONS: ::c_int = 23;
-pub const KERN_RAWPARTITION: ::c_int = 24;
-pub const KERN_NTPTIME: ::c_int = 25;
-pub const KERN_TIMEX: ::c_int = 26;
-pub const KERN_AUTONICETIME: ::c_int = 27;
-pub const KERN_AUTONICEVAL: ::c_int = 28;
-pub const KERN_RTC_OFFSET: ::c_int = 29;
-pub const KERN_ROOT_DEVICE: ::c_int = 30;
-pub const KERN_MSGBUFSIZE: ::c_int = 31;
-pub const KERN_FSYNC: ::c_int = 32;
-pub const KERN_OLDSYSVMSG: ::c_int = 33;
-pub const KERN_OLDSYSVSEM: ::c_int = 34;
-pub const KERN_OLDSYSVSHM: ::c_int = 35;
-pub const KERN_OLDSHORTCORENAME: ::c_int = 36;
-pub const KERN_SYNCHRONIZED_IO: ::c_int = 37;
-pub const KERN_IOV_MAX: ::c_int = 38;
-pub const KERN_MBUF: ::c_int = 39;
-pub const KERN_MAPPED_FILES: ::c_int = 40;
-pub const KERN_MEMLOCK: ::c_int = 41;
-pub const KERN_MEMLOCK_RANGE: ::c_int = 42;
-pub const KERN_MEMORY_PROTECTION: ::c_int = 43;
-pub const KERN_LOGIN_NAME_MAX: ::c_int = 44;
-pub const KERN_DEFCORENAME: ::c_int = 45;
-pub const KERN_LOGSIGEXIT: ::c_int = 46;
-pub const KERN_PROC2: ::c_int = 47;
-pub const KERN_PROC_ARGS: ::c_int = 48;
-pub const KERN_FSCALE: ::c_int = 49;
-pub const KERN_CCPU: ::c_int = 50;
-pub const KERN_CP_TIME: ::c_int = 51;
-pub const KERN_OLDSYSVIPC_INFO: ::c_int = 52;
-pub const KERN_MSGBUF: ::c_int = 53;
-pub const KERN_CONSDEV: ::c_int = 54;
-pub const KERN_MAXPTYS: ::c_int = 55;
-pub const KERN_PIPE: ::c_int = 56;
-pub const KERN_MAXPHYS: ::c_int = 57;
-pub const KERN_SBMAX: ::c_int = 58;
-pub const KERN_TKSTAT: ::c_int = 59;
-pub const KERN_MONOTONIC_CLOCK: ::c_int = 60;
-pub const KERN_URND: ::c_int = 61;
-pub const KERN_LABELSECTOR: ::c_int = 62;
-pub const KERN_LABELOFFSET: ::c_int = 63;
-pub const KERN_LWP: ::c_int = 64;
-pub const KERN_FORKFSLEEP: ::c_int = 65;
-pub const KERN_POSIX_THREADS: ::c_int = 66;
-pub const KERN_POSIX_SEMAPHORES: ::c_int = 67;
-pub const KERN_POSIX_BARRIERS: ::c_int = 68;
-pub const KERN_POSIX_TIMERS: ::c_int = 69;
-pub const KERN_POSIX_SPIN_LOCKS: ::c_int = 70;
-pub const KERN_POSIX_READER_WRITER_LOCKS: ::c_int = 71;
-pub const KERN_DUMP_ON_PANIC: ::c_int = 72;
-pub const KERN_SOMAXKVA: ::c_int = 73;
-pub const KERN_ROOT_PARTITION: ::c_int = 74;
-pub const KERN_DRIVERS: ::c_int = 75;
-pub const KERN_BUF: ::c_int = 76;
-pub const KERN_FILE2: ::c_int = 77;
-pub const KERN_VERIEXEC: ::c_int = 78;
-pub const KERN_CP_ID: ::c_int = 79;
-pub const KERN_HARDCLOCK_TICKS: ::c_int = 80;
-pub const KERN_ARND: ::c_int = 81;
-pub const KERN_SYSVIPC: ::c_int = 82;
-pub const KERN_BOOTTIME: ::c_int = 83;
-pub const KERN_EVCNT: ::c_int = 84;
-pub const KERN_MAXID: ::c_int = 85;
-pub const KERN_PROC_ALL: ::c_int = 0;
-pub const KERN_PROC_PID: ::c_int = 1;
-pub const KERN_PROC_PGRP: ::c_int = 2;
-pub const KERN_PROC_SESSION: ::c_int = 3;
-pub const KERN_PROC_TTY: ::c_int = 4;
-pub const KERN_PROC_UID: ::c_int = 5;
-pub const KERN_PROC_RUID: ::c_int = 6;
-pub const KERN_PROC_GID: ::c_int = 7;
-pub const KERN_PROC_RGID: ::c_int = 8;
-
-pub const EAI_SYSTEM: ::c_int = 11;
-
-pub const AIO_CANCELED: ::c_int = 1;
-pub const AIO_NOTCANCELED: ::c_int = 2;
-pub const AIO_ALLDONE: ::c_int = 3;
-pub const LIO_NOP: ::c_int = 0;
-pub const LIO_WRITE: ::c_int = 1;
-pub const LIO_READ: ::c_int = 2;
-pub const LIO_WAIT: ::c_int = 1;
-pub const LIO_NOWAIT: ::c_int = 0;
-
-pub const SIGEV_NONE: ::c_int = 0;
-pub const SIGEV_SIGNAL: ::c_int = 1;
-pub const SIGEV_THREAD: ::c_int = 2;
-
-pub const WSTOPPED: ::c_int = 0x00000002; // same as WUNTRACED
-pub const WCONTINUED: ::c_int = 0x00000010;
-pub const WEXITED: ::c_int = 0x000000020;
-pub const WNOWAIT: ::c_int = 0x00010000;
-
-pub const P_ALL: idtype_t = 0;
-pub const P_PID: idtype_t = 1;
-pub const P_PGID: idtype_t = 4;
-
-pub const B460800: ::speed_t = 460800;
-pub const B921600: ::speed_t = 921600;
-
-// dirfd() is a macro on netbsd to access
-// the first field of the struct where dirp points to:
-// 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) }
-    }
-}
-
-extern {
-    pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int;
-    pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
-    pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
-    pub fn aio_error(aiocbp: *const aiocb) -> ::c_int;
-    pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t;
-    #[link_name = "__aio_suspend50"]
-    pub fn aio_suspend(aiocb_list: *const *const aiocb, nitems: ::c_int,
-                       timeout: *const ::timespec) -> ::c_int;
-    pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
-    pub fn lio_listio(mode: ::c_int, aiocb_list: *const *mut aiocb,
-                      nitems: ::c_int, sevp: *mut sigevent) -> ::c_int;
-
-    pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
-    pub fn getnameinfo(sa: *const ::sockaddr,
-                       salen: ::socklen_t,
-                       host: *mut ::c_char,
-                       hostlen: ::socklen_t,
-                       serv: *mut ::c_char,
-                       sevlen: ::socklen_t,
-                       flags: ::c_int) -> ::c_int;
-    pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
-                    -> ::c_int;
-    pub fn sysctl(name: *const ::c_int,
-                  namelen: ::c_uint,
-                  oldp: *mut ::c_void,
-                  oldlenp: *mut ::size_t,
-                  newp: *const ::c_void,
-                  newlen: ::size_t)
-                  -> ::c_int;
-    pub fn sysctlbyname(name: *const ::c_char,
-                        oldp: *mut ::c_void,
-                        oldlenp: *mut ::size_t,
-                        newp: *const ::c_void,
-                        newlen: ::size_t)
-                        -> ::c_int;
-    #[link_name = "__kevent50"]
-    pub fn kevent(kq: ::c_int,
-                  changelist: *const ::kevent,
-                  nchanges: ::size_t,
-                  eventlist: *mut ::kevent,
-                  nevents: ::size_t,
-                  timeout: *const ::timespec) -> ::c_int;
-    #[link_name = "__mount50"]
-    pub fn mount(src: *const ::c_char,
-                 target: *const ::c_char,
-                 flags: ::c_int,
-                 data: *mut ::c_void,
-                 size: ::size_t) -> ::c_int;
-    pub fn ptrace(requeset: ::c_int,
-                  pid: ::pid_t,
-                  addr: *mut ::c_void,
-                  data: ::c_int) -> ::c_int;
-    pub fn pthread_setname_np(t: ::pthread_t,
-                              name: *const ::c_char,
-                              arg: *mut ::c_void) -> ::c_int;
-    pub fn pthread_getattr_np(native: ::pthread_t,
-                              attr: *mut ::pthread_attr_t) -> ::c_int;
-    pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
-                                     guardsize: *mut ::size_t) -> ::c_int;
-    pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,
-                                 stackaddr: *mut *mut ::c_void,
-                                 stacksize: *mut ::size_t) -> ::c_int;
-    #[link_name = "__sigtimedwait50"]
-    pub fn sigtimedwait(set: *const sigset_t,
-                        info: *mut siginfo_t,
-                        timeout: *const ::timespec) -> ::c_int;
-    pub fn sigwaitinfo(set: *const sigset_t,
-                       info: *mut siginfo_t) -> ::c_int;
-    pub fn duplocale(base: ::locale_t) -> ::locale_t;
-    pub fn freelocale(loc: ::locale_t);
-    pub fn localeconv_l(loc: ::locale_t) -> *mut lconv;
-    pub fn newlocale(mask: ::c_int,
-                     locale: *const ::c_char,
-                     base: ::locale_t) -> ::locale_t;
-    #[link_name = "__settimeofday50"]
-    pub fn settimeofday(tv: *const ::timeval, tz: *const ::c_void) -> ::c_int;
-}
-
-mod other;
-pub use self::other::*;
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/bsd/netbsdlike/netbsd/other/b32/mod.rs
+++ /dev/null
@@ -1,2 +0,0 @@
-pub type c_long = i32;
-pub type c_ulong = u32;
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/bsd/netbsdlike/netbsd/other/b64/mod.rs
+++ /dev/null
@@ -1,2 +0,0 @@
-pub type c_long = i64;
-pub type c_ulong = u64;
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/bsd/netbsdlike/netbsd/other/mod.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-cfg_if! {
-    if #[cfg(any(target_arch = "sparc64",
-                 target_arch = "x86_64"))] {
-        mod b64;
-        pub use self::b64::*;
-    } else if #[cfg(any(target_arch = "arm",
-                        target_arch = "powerpc",
-                        target_arch = "x86"))] {
-        mod b32;
-        pub use self::b32::*;
-    } else {
-        // Unknown target_arch
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/bsd/netbsdlike/openbsdlike/bitrig.rs
+++ /dev/null
@@ -1,75 +0,0 @@
-s! {
-    pub struct lconv {
-        pub decimal_point: *mut ::c_char,
-        pub thousands_sep: *mut ::c_char,
-        pub grouping: *mut ::c_char,
-        pub int_curr_symbol: *mut ::c_char,
-        pub currency_symbol: *mut ::c_char,
-        pub mon_decimal_point: *mut ::c_char,
-        pub mon_thousands_sep: *mut ::c_char,
-        pub mon_grouping: *mut ::c_char,
-        pub positive_sign: *mut ::c_char,
-        pub negative_sign: *mut ::c_char,
-        pub int_frac_digits: ::c_char,
-        pub frac_digits: ::c_char,
-        pub p_cs_precedes: ::c_char,
-        pub p_sep_by_space: ::c_char,
-        pub n_cs_precedes: ::c_char,
-        pub n_sep_by_space: ::c_char,
-        pub p_sign_posn: ::c_char,
-        pub n_sign_posn: ::c_char,
-        pub int_p_cs_precedes: ::c_char,
-        pub int_n_cs_precedes: ::c_char,
-        pub int_p_sep_by_space: ::c_char,
-        pub int_n_sep_by_space: ::c_char,
-        pub int_p_sign_posn: ::c_char,
-        pub int_n_sign_posn: ::c_char,
-    }
-}
-
-pub const LC_COLLATE_MASK: ::c_int = (1 << 0);
-pub const LC_CTYPE_MASK: ::c_int = (1 << 1);
-pub const LC_MESSAGES_MASK: ::c_int = (1 << 2);
-pub const LC_MONETARY_MASK: ::c_int = (1 << 3);
-pub const LC_NUMERIC_MASK: ::c_int = (1 << 4);
-pub const LC_TIME_MASK: ::c_int = (1 << 5);
-pub const LC_ALL_MASK: ::c_int = LC_COLLATE_MASK
-                               | LC_CTYPE_MASK
-                               | LC_MESSAGES_MASK
-                               | LC_MONETARY_MASK
-                               | LC_NUMERIC_MASK
-                               | LC_TIME_MASK;
-
-pub const ERA: ::nl_item = 52;
-pub const ERA_D_FMT: ::nl_item = 53;
-pub const ERA_D_T_FMT: ::nl_item = 54;
-pub const ERA_T_FMT: ::nl_item = 55;
-pub const ALT_DIGITS: ::nl_item = 56;
-
-pub const D_MD_ORDER: ::nl_item = 57;
-
-pub const ALTMON_1: ::nl_item = 58;
-pub const ALTMON_2: ::nl_item = 59;
-pub const ALTMON_3: ::nl_item = 60;
-pub const ALTMON_4: ::nl_item = 61;
-pub const ALTMON_5: ::nl_item = 62;
-pub const ALTMON_6: ::nl_item = 63;
-pub const ALTMON_7: ::nl_item = 64;
-pub const ALTMON_8: ::nl_item = 65;
-pub const ALTMON_9: ::nl_item = 66;
-pub const ALTMON_10: ::nl_item = 67;
-pub const ALTMON_11: ::nl_item = 68;
-pub const ALTMON_12: ::nl_item = 69;
-
-pub const KERN_RND: ::c_int = 31;
-
-extern {
-    pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char;
-    pub fn duplocale(base: ::locale_t) -> ::locale_t;
-    pub fn freelocale(loc: ::locale_t) -> ::c_int;
-    pub fn newlocale(mask: ::c_int,
-                     locale: *const ::c_char,
-                     base: ::locale_t) -> ::locale_t;
-    pub fn uselocale(loc: ::locale_t) -> ::locale_t;
-    pub fn querylocale(mask: ::c_int, loc: ::locale_t) -> *const ::c_char;
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/bsd/netbsdlike/openbsdlike/mod.rs
+++ /dev/null
@@ -1,505 +0,0 @@
-pub type clock_t = i64;
-pub type suseconds_t = ::c_long;
-pub type dev_t = i32;
-pub type sigset_t = ::c_uint;
-pub type blksize_t = ::int32_t;
-pub type fsblkcnt_t = ::uint64_t;
-pub type fsfilcnt_t = ::uint64_t;
-pub type pthread_attr_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;
-pub type pthread_condattr_t = *mut ::c_void;
-pub type pthread_rwlock_t = *mut ::c_void;
-
-s! {
-    pub struct dirent {
-        pub d_fileno: ::ino_t,
-        pub d_off: ::off_t,
-        pub d_reclen: u16,
-        pub d_type: u8,
-        pub d_namlen: u8,
-        __d_padding: [u8; 4],
-        pub d_name: [::c_char; 256],
-    }
-
-    pub struct glob_t {
-        pub gl_pathc:   ::c_int,
-        pub gl_matchc:  ::c_int,
-        pub gl_offs:    ::c_int,
-        pub gl_flags:   ::c_int,
-        pub gl_pathv:   *mut *mut ::c_char,
-        __unused1: *mut ::c_void,
-        __unused2: *mut ::c_void,
-        __unused3: *mut ::c_void,
-        __unused4: *mut ::c_void,
-        __unused5: *mut ::c_void,
-        __unused6: *mut ::c_void,
-        __unused7: *mut ::c_void,
-    }
-
-    pub struct kevent {
-        pub ident: ::uintptr_t,
-        pub filter: ::c_short,
-        pub flags: ::c_ushort,
-        pub fflags: ::c_uint,
-        pub data: ::int64_t,
-        pub udata: *mut ::c_void,
-    }
-
-    pub struct stat {
-        pub st_mode: ::mode_t,
-        pub st_dev: ::dev_t,
-        pub st_ino: ::ino_t,
-        pub st_nlink: ::nlink_t,
-        pub st_uid: ::uid_t,
-        pub st_gid: ::gid_t,
-        pub st_rdev: ::dev_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,
-        pub st_size: ::off_t,
-        pub st_blocks: ::blkcnt_t,
-        pub st_blksize: ::blksize_t,
-        pub st_flags: ::uint32_t,
-        pub st_gen: ::uint32_t,
-        pub st_birthtime: ::time_t,
-        pub st_birthtime_nsec: ::c_long,
-    }
-
-    pub struct statvfs {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_files: ::fsfilcnt_t,
-        pub f_ffree: ::fsfilcnt_t,
-        pub f_favail: ::fsfilcnt_t,
-        pub f_fsid: ::c_ulong,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-    }
-
-    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 sockaddr_storage {
-        pub ss_len: u8,
-        pub ss_family: ::sa_family_t,
-        __ss_pad1: [u8; 6],
-        __ss_pad2: i64,
-        __ss_pad3: [u8; 240],
-    }
-
-    pub struct siginfo_t {
-        pub si_signo: ::c_int,
-        pub si_code: ::c_int,
-        pub si_errno: ::c_int,
-        pub si_addr: *mut ::c_char,
-        #[cfg(target_pointer_width = "32")]
-        __pad: [u8; 112],
-        #[cfg(target_pointer_width = "64")]
-        __pad: [u8; 108],
-    }
-
-    pub struct Dl_info {
-        pub dli_fname: *const ::c_char,
-        pub dli_fbase: *mut ::c_void,
-        pub dli_sname: *const ::c_char,
-        pub dli_saddr: *mut ::c_void,
-    }
-
-    pub struct lastlog {
-        ll_time: ::time_t,
-        ll_line: [::c_char; UT_LINESIZE],
-        ll_host: [::c_char; UT_HOSTSIZE],
-    }
-
-    pub struct utmp {
-        pub ut_line: [::c_char; UT_LINESIZE],
-        pub ut_name: [::c_char; UT_NAMESIZE],
-        pub ut_host: [::c_char; UT_HOSTSIZE],
-        pub ut_time: ::time_t,
-    }
-}
-
-pub const UT_NAMESIZE: usize = 32;
-pub const UT_LINESIZE: usize = 8;
-pub const UT_HOSTSIZE: usize = 256;
-
-pub const O_CLOEXEC: ::c_int = 0x10000;
-
-pub const MS_SYNC : ::c_int = 0x0002;
-pub const MS_INVALIDATE : ::c_int = 0x0004;
-
-pub const PTHREAD_STACK_MIN : ::size_t = 2048;
-
-pub const ENOATTR : ::c_int = 83;
-pub const EILSEQ : ::c_int = 84;
-pub const EOVERFLOW : ::c_int = 87;
-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 F_DUPFD_CLOEXEC : ::c_int = 10;
-
-pub const AT_FDCWD: ::c_int = -100;
-pub const AT_EACCESS: ::c_int = 0x01;
-pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x02;
-pub const AT_SYMLINK_FOLLOW: ::c_int = 0x04;
-pub const AT_REMOVEDIR: ::c_int = 0x08;
-
-pub const RLIM_NLIMITS: ::c_int = 9;
-
-pub const SO_SNDTIMEO: ::c_int = 0x1005;
-pub const SO_RCVTIMEO: ::c_int = 0x1006;
-pub const SO_BINDANY: ::c_int = 0x1000;
-pub const SO_NETPROC: ::c_int = 0x1020;
-pub const SO_RTABLE: ::c_int = 0x1021;
-pub const SO_PEERCRED: ::c_int = 0x1022;
-pub const SO_SPLICE: ::c_int = 0x1023;
-
-pub const AF_ECMA: ::c_int = 8;
-pub const AF_ROUTE: ::c_int = 17;
-pub const AF_ENCAP: ::c_int = 28;
-pub const AF_SIP: ::c_int = 29;
-pub const AF_KEY: ::c_int = 30;
-pub const pseudo_AF_HDRCMPLT: ::c_int = 31;
-pub const AF_BLUETOOTH: ::c_int = 32;
-pub const AF_MPLS: ::c_int = 33;
-pub const pseudo_AF_PFLOW: ::c_int = 34;
-pub const pseudo_AF_PIPEX: ::c_int = 35;
-#[doc(hidden)]
-pub const AF_MAX: ::c_int = 36;
-
-#[doc(hidden)]
-pub const NET_MAXID: ::c_int = AF_MAX;
-pub const NET_RT_DUMP: ::c_int = 1;
-pub const NET_RT_FLAGS: ::c_int = 2;
-pub const NET_RT_IFLIST: ::c_int = 3;
-pub const NET_RT_STATS: ::c_int = 4;
-pub const NET_RT_TABLE: ::c_int = 5;
-pub const NET_RT_IFNAMES: ::c_int = 6;
-#[doc(hidden)]
-pub const NET_RT_MAXID: ::c_int = 7;
-
-pub const IPV6_JOIN_GROUP: ::c_int = 12;
-pub const IPV6_LEAVE_GROUP: ::c_int = 13;
-
-pub const PF_ROUTE: ::c_int = AF_ROUTE;
-pub const PF_ECMA: ::c_int = AF_ECMA;
-pub const PF_ENCAP: ::c_int = AF_ENCAP;
-pub const PF_SIP: ::c_int = AF_SIP;
-pub const PF_KEY: ::c_int = AF_KEY;
-pub const PF_BPF: ::c_int = pseudo_AF_HDRCMPLT;
-pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
-pub const PF_MPLS: ::c_int = AF_MPLS;
-pub const PF_PFLOW: ::c_int = pseudo_AF_PFLOW;
-pub const PF_PIPEX: ::c_int = pseudo_AF_PIPEX;
-#[doc(hidden)]
-pub const PF_MAX: ::c_int = AF_MAX;
-
-pub const SCM_TIMESTAMP: ::c_int = 0x04;
-
-pub const O_DSYNC : ::c_int = 128;
-
-pub const MAP_RENAME : ::c_int = 0x0000;
-pub const MAP_NORESERVE : ::c_int = 0x0000;
-pub const MAP_HASSEMAPHORE : ::c_int = 0x0000;
-
-pub const EIPSEC : ::c_int = 82;
-pub const ENOMEDIUM : ::c_int = 85;
-pub const EMEDIUMTYPE : ::c_int = 86;
-
-pub const EAI_SYSTEM: ::c_int = -11;
-
-pub const RUSAGE_THREAD: ::c_int = 1;
-
-pub const MAP_COPY : ::c_int = 0x0002;
-pub const MAP_NOEXTEND : ::c_int = 0x0000;
-
-pub const _SC_CLK_TCK : ::c_int = 3;
-pub const _SC_IOV_MAX : ::c_int = 51;
-pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 100;
-pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 101;
-pub const _SC_LOGIN_NAME_MAX : ::c_int = 102;
-pub const _SC_MQ_PRIO_MAX : ::c_int = 59;
-pub const _SC_NPROCESSORS_ONLN : ::c_int = 503;
-pub const _SC_THREADS : ::c_int = 91;
-pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 77;
-pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 78;
-pub const _SC_THREAD_DESTRUCTOR_ITERATIONS : ::c_int = 80;
-pub const _SC_THREAD_KEYS_MAX : ::c_int = 81;
-pub const _SC_THREAD_PRIO_INHERIT : ::c_int = 82;
-pub const _SC_THREAD_PRIO_PROTECT : ::c_int = 83;
-pub const _SC_THREAD_PRIORITY_SCHEDULING : ::c_int = 84;
-pub const _SC_THREAD_PROCESS_SHARED : ::c_int = 85;
-pub const _SC_THREAD_SAFE_FUNCTIONS : ::c_int = 103;
-pub const _SC_THREAD_STACK_MIN : ::c_int = 89;
-pub const _SC_THREAD_THREADS_MAX : ::c_int = 90;
-pub const _SC_TTY_NAME_MAX : ::c_int = 107;
-pub const _SC_ATEXIT_MAX : ::c_int = 46;
-pub const _SC_AIO_LISTIO_MAX : ::c_int = 42;
-pub const _SC_AIO_MAX : ::c_int = 43;
-pub const _SC_ASYNCHRONOUS_IO : ::c_int = 45;
-pub const _SC_MAPPED_FILES : ::c_int = 53;
-pub const _SC_MEMLOCK : ::c_int = 54;
-pub const _SC_MEMLOCK_RANGE : ::c_int = 55;
-pub const _SC_MEMORY_PROTECTION : ::c_int = 56;
-pub const _SC_MESSAGE_PASSING : ::c_int = 57;
-pub const _SC_MQ_OPEN_MAX : ::c_int = 58;
-pub const _SC_PRIORITY_SCHEDULING : ::c_int = 61;
-pub const _SC_SEMAPHORES : ::c_int = 67;
-pub const _SC_SHARED_MEMORY_OBJECTS : ::c_int = 68;
-pub const _SC_SYNCHRONIZED_IO : ::c_int = 75;
-pub const _SC_TIMERS : ::c_int = 94;
-pub const _SC_XOPEN_CRYPT : ::c_int = 117;
-pub const _SC_XOPEN_ENH_I18N : ::c_int = 118;
-pub const _SC_XOPEN_LEGACY : ::c_int = 119;
-pub const _SC_XOPEN_REALTIME : ::c_int = 120;
-pub const _SC_XOPEN_REALTIME_THREADS : ::c_int = 121;
-pub const _SC_XOPEN_UNIX : ::c_int = 123;
-pub const _SC_XOPEN_VERSION : ::c_int = 125;
-pub const _SC_SEM_NSEMS_MAX : ::c_int = 31;
-pub const _SC_SEM_VALUE_MAX : ::c_int = 32;
-pub const _SC_AIO_PRIO_DELTA_MAX : ::c_int = 44;
-pub const _SC_DELAYTIMER_MAX : ::c_int = 50;
-pub const _SC_PRIORITIZED_IO : ::c_int = 60;
-pub const _SC_REALTIME_SIGNALS : ::c_int = 64;
-pub const _SC_RTSIG_MAX : ::c_int = 66;
-pub const _SC_SIGQUEUE_MAX : ::c_int = 70;
-pub const _SC_TIMER_MAX : ::c_int = 93;
-pub const _SC_HOST_NAME_MAX : ::c_int = 33;
-
-pub const FD_SETSIZE: usize = 1024;
-
-pub const ST_NOSUID: ::c_ulong = 2;
-
-pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = 0 as *mut _;
-pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0 as *mut _;
-pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = 0 as *mut _;
-
-pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 1;
-pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2;
-pub const PTHREAD_MUTEX_NORMAL: ::c_int = 3;
-pub const PTHREAD_MUTEX_STRICT_NP: ::c_int = 4;
-pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_STRICT_NP;
-
-pub const EVFILT_AIO: ::int16_t = -3;
-pub const EVFILT_PROC: ::int16_t = -5;
-pub const EVFILT_READ: ::int16_t = -1;
-pub const EVFILT_SIGNAL: ::int16_t = -6;
-pub const EVFILT_TIMER: ::int16_t = -7;
-pub const EVFILT_VNODE: ::int16_t = -4;
-pub const EVFILT_WRITE: ::int16_t = -2;
-
-pub const EV_ADD: ::uint16_t = 0x1;
-pub const EV_DELETE: ::uint16_t = 0x2;
-pub const EV_ENABLE: ::uint16_t = 0x4;
-pub const EV_DISABLE: ::uint16_t = 0x8;
-pub const EV_ONESHOT: ::uint16_t = 0x10;
-pub const EV_CLEAR: ::uint16_t = 0x20;
-pub const EV_FLAG1: ::uint16_t = 0x2000;
-pub const EV_ERROR: ::uint16_t = 0x4000;
-pub const EV_EOF: ::uint16_t = 0x8000;
-pub const EV_SYSFLAGS: ::uint16_t = 0xf000;
-
-pub const NOTE_LOWAT: ::uint32_t = 0x00000001;
-pub const NOTE_EOF: ::uint32_t = 0x00000002;
-pub const NOTE_DELETE: ::uint32_t = 0x00000001;
-pub const NOTE_WRITE: ::uint32_t = 0x00000002;
-pub const NOTE_EXTEND: ::uint32_t = 0x00000004;
-pub const NOTE_ATTRIB: ::uint32_t = 0x00000008;
-pub const NOTE_LINK: ::uint32_t = 0x00000010;
-pub const NOTE_RENAME: ::uint32_t = 0x00000020;
-pub const NOTE_REVOKE: ::uint32_t = 0x00000040;
-pub const NOTE_TRUNCATE: ::uint32_t = 0x00000080;
-pub const NOTE_EXIT: ::uint32_t = 0x80000000;
-pub const NOTE_FORK: ::uint32_t = 0x40000000;
-pub const NOTE_EXEC: ::uint32_t = 0x20000000;
-pub const NOTE_PDATAMASK: ::uint32_t = 0x000fffff;
-pub const NOTE_PCTRLMASK: ::uint32_t = 0xf0000000;
-pub const NOTE_TRACK: ::uint32_t = 0x00000001;
-pub const NOTE_TRACKERR: ::uint32_t = 0x00000002;
-pub const NOTE_CHILD: ::uint32_t = 0x00000004;
-
-pub const TMP_MAX : ::c_uint = 0x7fffffff;
-
-pub const NI_MAXHOST: ::size_t = 256;
-
-pub const RTLD_LOCAL: ::c_int = 0;
-pub const CTL_MAXNAME: ::c_int = 12;
-pub const CTLTYPE_NODE: ::c_int = 1;
-pub const CTLTYPE_INT: ::c_int = 2;
-pub const CTLTYPE_STRING: ::c_int = 3;
-pub const CTLTYPE_QUAD: ::c_int = 4;
-pub const CTLTYPE_STRUCT: ::c_int = 5;
-pub const CTL_UNSPEC: ::c_int = 0;
-pub const CTL_KERN: ::c_int = 1;
-pub const CTL_VM: ::c_int = 2;
-pub const CTL_FS: ::c_int = 3;
-pub const CTL_NET: ::c_int = 4;
-pub const CTL_DEBUG: ::c_int = 5;
-pub const CTL_HW: ::c_int = 6;
-pub const CTL_MACHDEP: ::c_int = 7;
-pub const CTL_DDB: ::c_int = 9;
-pub const CTL_VFS: ::c_int = 10;
-pub const CTL_MAXID: ::c_int = 11;
-pub const KERN_OSTYPE: ::c_int = 1;
-pub const KERN_OSRELEASE: ::c_int = 2;
-pub const KERN_OSREV: ::c_int = 3;
-pub const KERN_VERSION: ::c_int = 4;
-pub const KERN_MAXVNODES: ::c_int = 5;
-pub const KERN_MAXPROC: ::c_int = 6;
-pub const KERN_MAXFILES: ::c_int = 7;
-pub const KERN_ARGMAX: ::c_int = 8;
-pub const KERN_SECURELVL: ::c_int = 9;
-pub const KERN_HOSTNAME: ::c_int = 10;
-pub const KERN_HOSTID: ::c_int = 11;
-pub const KERN_CLOCKRATE: ::c_int = 12;
-pub const KERN_PROF: ::c_int = 16;
-pub const KERN_POSIX1: ::c_int = 17;
-pub const KERN_NGROUPS: ::c_int = 18;
-pub const KERN_JOB_CONTROL: ::c_int = 19;
-pub const KERN_SAVED_IDS: ::c_int = 20;
-pub const KERN_BOOTTIME: ::c_int = 21;
-pub const KERN_DOMAINNAME: ::c_int = 22;
-pub const KERN_MAXPARTITIONS: ::c_int = 23;
-pub const KERN_RAWPARTITION: ::c_int = 24;
-pub const KERN_MAXTHREAD: ::c_int = 25;
-pub const KERN_NTHREADS: ::c_int = 26;
-pub const KERN_OSVERSION: ::c_int = 27;
-pub const KERN_SOMAXCONN: ::c_int = 28;
-pub const KERN_SOMINCONN: ::c_int = 29;
-pub const KERN_USERMOUNT: ::c_int = 30;
-pub const KERN_NOSUIDCOREDUMP: ::c_int = 32;
-pub const KERN_FSYNC: ::c_int = 33;
-pub const KERN_SYSVMSG: ::c_int = 34;
-pub const KERN_SYSVSEM: ::c_int = 35;
-pub const KERN_SYSVSHM: ::c_int = 36;
-pub const KERN_ARND: ::c_int = 37;
-pub const KERN_MSGBUFSIZE: ::c_int = 38;
-pub const KERN_MALLOCSTATS: ::c_int = 39;
-pub const KERN_CPTIME: ::c_int = 40;
-pub const KERN_NCHSTATS: ::c_int = 41;
-pub const KERN_FORKSTAT: ::c_int = 42;
-pub const KERN_NSELCOLL: ::c_int = 43;
-pub const KERN_TTY: ::c_int = 44;
-pub const KERN_CCPU: ::c_int = 45;
-pub const KERN_FSCALE: ::c_int = 46;
-pub const KERN_NPROCS: ::c_int = 47;
-pub const KERN_MSGBUF: ::c_int = 48;
-pub const KERN_POOL: ::c_int = 49;
-pub const KERN_STACKGAPRANDOM: ::c_int = 50;
-pub const KERN_SYSVIPC_INFO: ::c_int = 51;
-pub const KERN_SPLASSERT: ::c_int = 54;
-pub const KERN_PROC_ARGS: ::c_int = 55;
-pub const KERN_NFILES: ::c_int = 56;
-pub const KERN_TTYCOUNT: ::c_int = 57;
-pub const KERN_NUMVNODES: ::c_int = 58;
-pub const KERN_MBSTAT: ::c_int = 59;
-pub const KERN_SEMINFO: ::c_int = 61;
-pub const KERN_SHMINFO: ::c_int = 62;
-pub const KERN_INTRCNT: ::c_int = 63;
-pub const KERN_WATCHDOG: ::c_int = 64;
-pub const KERN_PROC: ::c_int = 66;
-pub const KERN_MAXCLUSTERS: ::c_int = 67;
-pub const KERN_EVCOUNT: ::c_int = 68;
-pub const KERN_TIMECOUNTER: ::c_int = 69;
-pub const KERN_MAXLOCKSPERUID: ::c_int = 70;
-pub const KERN_CPTIME2: ::c_int = 71;
-pub const KERN_CACHEPCT: ::c_int = 72;
-pub const KERN_FILE: ::c_int = 73;
-pub const KERN_CONSDEV: ::c_int = 75;
-pub const KERN_NETLIVELOCKS: ::c_int = 76;
-pub const KERN_POOL_DEBUG: ::c_int = 77;
-pub const KERN_PROC_CWD: ::c_int = 78;
-pub const KERN_PROC_NOBROADCASTKILL: ::c_int = 79;
-pub const KERN_PROC_VMMAP: ::c_int = 80;
-pub const KERN_GLOBAL_PTRACE: ::c_int = 81;
-pub const KERN_CONSBUFSIZE: ::c_int = 82;
-pub const KERN_CONSBUF: ::c_int = 83;
-pub const KERN_MAXID: ::c_int = 84;
-pub const KERN_PROC_ALL: ::c_int = 0;
-pub const KERN_PROC_PID: ::c_int = 1;
-pub const KERN_PROC_PGRP: ::c_int = 2;
-pub const KERN_PROC_SESSION: ::c_int = 3;
-pub const KERN_PROC_TTY: ::c_int = 4;
-pub const KERN_PROC_UID: ::c_int = 5;
-pub const KERN_PROC_RUID: ::c_int = 6;
-pub const KERN_PROC_KTHREAD: ::c_int = 7;
-pub const KERN_PROC_SHOW_THREADS: ::c_int = 0x40000000;
-pub const KERN_SYSVIPC_MSG_INFO: ::c_int = 1;
-pub const KERN_SYSVIPC_SEM_INFO: ::c_int = 2;
-pub const KERN_SYSVIPC_SHM_INFO: ::c_int = 3;
-pub const KERN_PROC_ARGV: ::c_int = 1;
-pub const KERN_PROC_NARGV: ::c_int = 2;
-pub const KERN_PROC_ENV: ::c_int = 3;
-pub const KERN_PROC_NENV: ::c_int = 4;
-pub const KI_NGROUPS: ::c_int = 16;
-pub const KI_MAXCOMLEN: ::c_int = 24;
-pub const KI_WMESGLEN: ::c_int = 8;
-pub const KI_MAXLOGNAME: ::c_int = 32;
-pub const KI_EMULNAMELEN: ::c_int = 8;
-
-extern {
-    pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
-    pub fn getnameinfo(sa: *const ::sockaddr,
-                       salen: ::socklen_t,
-                       host: *mut ::c_char,
-                       hostlen: ::size_t,
-                       serv: *mut ::c_char,
-                       servlen: ::size_t,
-                       flags: ::c_int) -> ::c_int;
-    pub fn kevent(kq: ::c_int,
-                  changelist: *const ::kevent,
-                  nchanges: ::c_int,
-                  eventlist: *mut ::kevent,
-                  nevents: ::c_int,
-                  timeout: *const ::timespec) -> ::c_int;
-    pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
-                    -> ::c_int;
-    pub fn pthread_main_np() -> ::c_int;
-    pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char);
-    pub fn pthread_stackseg_np(thread: ::pthread_t,
-                               sinfo: *mut ::stack_t) -> ::c_int;
-    pub fn sysctl(name: *const ::c_int,
-                  namelen: ::c_uint,
-                  oldp: *mut ::c_void,
-                  oldlenp: *mut ::size_t,
-                  newp: *mut ::c_void,
-                  newlen: ::size_t)
-                  -> ::c_int;
-    pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int;
-    pub fn pledge(promises: *const ::c_char,
-                  paths: *mut *const ::c_char) -> ::c_int;
-}
-
-cfg_if! {
-    if #[cfg(target_os = "openbsd")] {
-        mod openbsd;
-        pub use self::openbsd::*;
-    } else if #[cfg(target_os = "bitrig")] {
-        mod bitrig;
-        pub use self::bitrig::*;
-    } else {
-        // Unknown target_os
-    }
-}
-
-mod other;
-pub use self::other::*;
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/bsd/netbsdlike/openbsdlike/openbsd.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-s! {
-    pub struct lconv {
-        pub decimal_point: *mut ::c_char,
-        pub thousands_sep: *mut ::c_char,
-        pub grouping: *mut ::c_char,
-        pub int_curr_symbol: *mut ::c_char,
-        pub currency_symbol: *mut ::c_char,
-        pub mon_decimal_point: *mut ::c_char,
-        pub mon_thousands_sep: *mut ::c_char,
-        pub mon_grouping: *mut ::c_char,
-        pub positive_sign: *mut ::c_char,
-        pub negative_sign: *mut ::c_char,
-        pub int_frac_digits: ::c_char,
-        pub frac_digits: ::c_char,
-        pub p_cs_precedes: ::c_char,
-        pub p_sep_by_space: ::c_char,
-        pub n_cs_precedes: ::c_char,
-        pub n_sep_by_space: ::c_char,
-        pub p_sign_posn: ::c_char,
-        pub n_sign_posn: ::c_char,
-        pub int_p_cs_precedes: ::c_char,
-        pub int_p_sep_by_space: ::c_char,
-        pub int_n_cs_precedes: ::c_char,
-        pub int_n_sep_by_space: ::c_char,
-        pub int_p_sign_posn: ::c_char,
-        pub int_n_sign_posn: ::c_char,
-    }
-}
-
-extern {
-    pub fn accept4(s: ::c_int, addr: *mut ::sockaddr,
-                   addrlen: *mut ::socklen_t, flags: ::c_int) -> ::c_int;
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/bsd/netbsdlike/openbsdlike/other/b32/mod.rs
+++ /dev/null
@@ -1,2 +0,0 @@
-pub type c_long = i32;
-pub type c_ulong = u32;
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/bsd/netbsdlike/openbsdlike/other/b64/mod.rs
+++ /dev/null
@@ -1,2 +0,0 @@
-pub type c_long = i64;
-pub type c_ulong = u64;
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/bsd/netbsdlike/openbsdlike/other/mod.rs
+++ /dev/null
@@ -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
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/haiku/b32.rs
+++ /dev/null
@@ -1,2 +0,0 @@
-pub type c_long = i32;
-pub type c_ulong = u32;
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/haiku/b64.rs
+++ /dev/null
@@ -1,2 +0,0 @@
-pub type c_ulong = u64;
-pub type c_long = i64;
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/haiku/mod.rs
+++ /dev/null
@@ -1,818 +0,0 @@
-use dox::{mem, Option};
-
-pub type rlim_t = ::uintptr_t;
-pub type sa_family_t = u8;
-pub type pthread_key_t = ::c_int;
-pub type nfds_t = ::c_long;
-pub type tcflag_t = ::c_uint;
-pub type speed_t = ::c_uint;
-pub type c_char = i8;
-pub type clock_t = i32;
-pub type clockid_t = i32;
-pub type time_t = i32;
-pub type suseconds_t = i32;
-pub type wchar_t = i32;
-pub type off_t = i64;
-pub type ino_t = i64;
-pub type blkcnt_t = i64;
-pub type blksize_t = i32;
-pub type dev_t = i32;
-pub type mode_t = u32;
-pub type nlink_t = i32;
-pub type useconds_t = u32;
-pub type socklen_t = u32;
-pub type pthread_t = ::uintptr_t;
-pub type pthread_mutexattr_t = ::uintptr_t;
-pub type sigset_t = u64;
-pub type fsblkcnt_t = i64;
-pub type fsfilcnt_t = i64;
-pub type pthread_attr_t = *mut ::c_void;
-pub type nl_item = ::c_int;
-pub type id_t = i32;
-pub type idtype_t = ::c_uint;
-
-pub enum timezone {}
-
-s! {
-    pub struct sockaddr {
-        pub sa_len: u8,
-        pub sa_family: sa_family_t,
-        pub sa_data: [::c_char; 30],
-    }
-
-    pub struct sockaddr_in {
-        pub sin_len: u8,
-        pub sin_family: sa_family_t,
-        pub sin_port: ::in_port_t,
-        pub sin_addr: ::in_addr,
-        pub sin_zero: [u8; 24],
-    }
-
-    pub struct sockaddr_in6 {
-        pub sin6_len: u8,
-        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_un {
-        pub sun_len: u8,
-        pub sun_family: sa_family_t,
-        pub sun_path: [::c_char; 126]
-    }
-
-    pub struct sockaddr_storage {
-        pub ss_len: u8,
-        pub ss_family: sa_family_t,
-        __ss_pad1: [u8; 6],
-        __ss_pad2: u64,
-        __ss_pad3: [u8; 112],
-    }
-
-    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_canonname: *mut c_char,
-        pub ai_addr: *mut ::sockaddr,
-        pub ai_next: *mut addrinfo,
-    }
-
-    pub struct fd_set {
-        fds_bits: [c_ulong; FD_SETSIZE / ULONG_SIZE],
-    }
-
-    pub struct tm {
-        pub tm_sec: ::c_int,
-        pub tm_min: ::c_int,
-        pub tm_hour: ::c_int,
-        pub tm_mday: ::c_int,
-        pub tm_mon: ::c_int,
-        pub tm_year: ::c_int,
-        pub tm_wday: ::c_int,
-        pub tm_yday: ::c_int,
-        pub tm_isdst: ::c_int,
-        pub tm_gmtoff: ::c_long,
-        pub tm_zone: *const ::c_char,
-    }
-
-    pub struct utsname {
-        pub sysname: [::c_char; 32],
-        pub nodename: [::c_char; 32],
-        pub release: [::c_char; 32],
-        pub version: [::c_char; 32],
-        pub machine: [::c_char; 32],
-    }
-
-    pub struct lconv {
-        pub decimal_point: *mut ::c_char,
-        pub thousands_sep: *mut ::c_char,
-        pub grouping: *mut ::c_char,
-        pub int_curr_symbol: *mut ::c_char,
-        pub currency_symbol: *mut ::c_char,
-        pub mon_decimal_point: *mut ::c_char,
-        pub mon_thousands_sep: *mut ::c_char,
-        pub mon_grouping: *mut ::c_char,
-        pub positive_sign: *mut ::c_char,
-        pub negative_sign: *mut ::c_char,
-        pub int_frac_digits: ::c_char,
-        pub frac_digits: ::c_char,
-        pub p_cs_precedes: ::c_char,
-        pub p_sep_by_space: ::c_char,
-        pub n_cs_precedes: ::c_char,
-        pub n_sep_by_space: ::c_char,
-        pub p_sign_posn: ::c_char,
-        pub n_sign_posn: ::c_char,
-        pub int_p_cs_precedes: ::c_char,
-        pub int_p_sep_by_space: ::c_char,
-        pub int_n_cs_precedes: ::c_char,
-        pub int_n_sep_by_space: ::c_char,
-        pub int_p_sign_posn: ::c_char,
-        pub int_n_sign_posn: ::c_char,
-    }
-
-    pub struct msghdr {
-        pub msg_name: *mut ::c_void,
-        pub msg_namelen: ::socklen_t,
-        pub msg_iov: *mut ::iovec,
-        pub msg_iovlen: ::c_int,
-        pub msg_control: *mut ::c_void,
-        pub msg_controllen: ::socklen_t,
-        pub msg_flags: ::c_int,
-    }
-
-    pub struct cmsghdr {
-        pub cmsg_len: ::size_t,
-        pub cmsg_level: ::c_int,
-        pub cmsg_type: ::c_int,
-    }
-
-    pub struct Dl_info {
-        pub dli_fname: *const ::c_char,
-        pub dli_fbase: *mut ::c_void,
-        pub dli_sname: *const ::c_char,
-        pub dli_saddr: *mut ::c_void,
-    }
-
-    pub struct termios {
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_line:  ::c_char,
-        pub c_ispeed: ::speed_t,
-        pub c_ospeed: ::speed_t,
-        pub c_cc: [::cc_t; ::NCCS],
-    }
-
-    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_size: off_t,
-        pub st_rdev: dev_t,
-        pub st_blksize: blksize_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,
-        pub st_crtime: time_t,
-        pub st_crtime_nsec: c_long,
-        pub st_type: u32,
-        pub st_blocks: blkcnt_t,
-    }
-
-    pub struct dirent {
-        pub d_dev: dev_t,
-        pub d_pdev: dev_t,
-        pub d_ino: ino_t,
-        pub d_pino: i64,
-        pub d_reclen: ::c_ushort,
-        pub d_name: [::c_char; 1024], // Max length is _POSIX_PATH_MAX
-    }
-
-    pub struct glob_t {
-        pub gl_pathc: ::size_t,
-        __unused1: ::size_t,
-        pub gl_offs: ::size_t,
-        __unused2: ::size_t,
-        pub gl_pathv: *mut *mut c_char,
-
-        __unused3: *mut ::c_void,
-        __unused4: *mut ::c_void,
-        __unused5: *mut ::c_void,
-        __unused6: *mut ::c_void,
-        __unused7: *mut ::c_void,
-        __unused8: *mut ::c_void,
-    }
-
-    pub struct pthread_mutex_t {
-        flags: u32,
-        lock: i32,
-        unused: i32,
-        owner: i32,
-        owner_count: i32,
-    }
-
-    pub struct pthread_cond_t {
-        flags: u32,
-        unused: i32,
-        mutex: *mut ::c_void,
-        waiter_count: i32,
-        lock: i32,
-    }
-
-    pub struct pthread_rwlock_t {
-        flags: u32,
-        owner: i32,
-        lock_sem: i32,      // this is actually a union
-        lock_count: i32,
-        reader_count: i32,
-        writer_count: i32,
-        waiters: [*mut ::c_void; 2],
-    }
-
-    pub struct passwd {
-        pub pw_name: *mut ::c_char,
-        pub pw_passwd: *mut ::c_char,
-        pub pw_uid: ::uid_t,
-        pub pw_gid: ::gid_t,
-        pub pw_dir: *mut ::c_char,
-        pub pw_shell: *mut ::c_char,
-        pub pw_gecos: *mut ::c_char,
-    }
-
-    pub struct statvfs {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_files: ::fsfilcnt_t,
-        pub f_ffree: ::fsfilcnt_t,
-        pub f_favail: ::fsfilcnt_t,
-        pub f_fsid: ::c_ulong,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-    }
-
-    pub struct stack_t {
-        pub ss_sp: *mut ::c_void,
-        pub ss_size: ::size_t,
-        pub ss_flags: ::c_int,
-    }
-
-    pub struct siginfo_t {
-        pub si_signo: ::c_int,
-        pub si_code: ::c_int,
-        pub si_errno: ::c_int,
-        pub si_pid: ::pid_t,
-        pub si_uid: ::uid_t,
-        pub si_addr: *mut ::c_void,
-        pub si_status: ::c_int,
-        pub si_band: c_long,
-        pub sigval: *mut ::c_void,
-    }
-
-    pub struct sigaction {
-        pub sa_sigaction: ::sighandler_t,
-        pub sa_mask: ::sigset_t,
-        pub sa_flags: ::c_int,
-        sa_userdata: *mut ::c_void,
-    }
-
-    pub struct sem_t {
-        pub se_type: i32,
-        pub se_named_id: i32, // this is actually a union
-        pub se_unnamed: i32,
-        pub se_padding: [i32; 4],
-    }
-
-    pub struct pthread_condattr_t {
-        pub process_shared: bool,
-        pub clock_id: i32,
-    }
-}
-
-// intentionally not public, only used for fd_set
-cfg_if! {
-    if #[cfg(target_pointer_width = "32")] {
-        const ULONG_SIZE: usize = 32;
-    } else if #[cfg(target_pointer_width = "64")] {
-        const ULONG_SIZE: usize = 64;
-    } else {
-        // Unknown target_pointer_width
-    }
-}
-
-pub const EXIT_FAILURE: ::c_int = 1;
-pub const EXIT_SUCCESS: ::c_int = 0;
-pub const RAND_MAX: ::c_int = 2147483647;
-pub const EOF: ::c_int = -1;
-pub const SEEK_SET: ::c_int = 0;
-pub const SEEK_CUR: ::c_int = 1;
-pub const SEEK_END: ::c_int = 2;
-pub const _IOFBF: ::c_int = 0;
-pub const _IONBF: ::c_int = 2;
-pub const _IOLBF: ::c_int = 1;
-
-pub const F_DUPFD: ::c_int = 0x0001;
-pub const F_GETFD: ::c_int = 0x0002;
-pub const F_SETFD: ::c_int = 0x0004;
-pub const F_GETFL: ::c_int = 0x0008;
-pub const F_SETFL: ::c_int = 0x0010;
-
-pub const SIGTRAP: ::c_int = 22;
-
-pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0;
-pub const PTHREAD_CREATE_DETACHED: ::c_int = 1;
-
-pub const CLOCK_REALTIME: ::c_int = -1;
-pub const CLOCK_MONOTONIC: ::c_int = 0;
-
-pub const RLIMIT_CORE: ::c_int = 0;
-pub const RLIMIT_CPU: ::c_int = 1;
-pub const RLIMIT_DATA: ::c_int = 2;
-pub const RLIMIT_FSIZE: ::c_int = 3;
-pub const RLIMIT_NOFILE: ::c_int = 4;
-pub const RLIMIT_AS: ::c_int = 6;
-// Haiku specific
-pub const RLIMIT_NOVMON: ::c_int = 7;
-pub const RLIMIT_NLIMITS: ::c_int = 8;
-
-pub const RUSAGE_SELF: ::c_int = 0;
-
-pub const NCCS: usize = 11;
-
-pub const O_RDONLY: ::c_int = 0x0000;
-pub const O_WRONLY: ::c_int = 0x0001;
-pub const O_RDWR: ::c_int = 0x0002;
-pub const O_ACCMODE: ::c_int = 0x0003;
-
-pub const O_EXCL: ::c_int = 0x0100;
-pub const O_CREAT: ::c_int = 0x0200;
-pub const O_TRUNC: ::c_int = 0x0400;
-pub const O_NOCTTY: ::c_int = 0x1000;
-pub const O_NOTRAVERSE: ::c_int = 0x2000;
-
-pub const O_CLOEXEC: ::c_int = 0x00000040;
-pub const O_NONBLOCK: ::c_int = 0x00000080;
-pub const O_APPEND: ::c_int = 0x00000800;
-pub const O_SYNC: ::c_int = 0x00010000;
-pub const O_RSYNC: ::c_int = 0x00020000;
-pub const O_DSYNC: ::c_int = 0x00040000;
-pub const O_NOFOLLOW: ::c_int = 0x00080000;
-pub const O_NOCACHE: ::c_int = 0x00100000;
-pub const O_DIRECTORY: ::c_int = 0x00200000;
-
-pub const S_IFIFO: ::mode_t = 61440;
-pub const S_IFCHR: ::mode_t = 49152;
-pub const S_IFBLK: ::mode_t = 24576;
-pub const S_IFDIR: ::mode_t = 16384;
-pub const S_IFREG: ::mode_t = 32768;
-pub const S_IFLNK: ::mode_t = 40960;
-pub const S_IFSOCK: ::mode_t = 49152;
-pub const S_IFMT: ::mode_t = 61440;
-pub const S_IRWXU: ::mode_t = 448;
-pub const S_IXUSR: ::mode_t = 64;
-pub const S_IWUSR: ::mode_t = 128;
-pub const S_IRUSR: ::mode_t = 256;
-pub const S_IRWXG: ::mode_t = 70;
-pub const S_IXGRP: ::mode_t = 10;
-pub const S_IWGRP: ::mode_t = 20;
-pub const S_IRGRP: ::mode_t = 40;
-pub const S_IRWXO: ::mode_t = 7;
-pub const S_IXOTH: ::mode_t = 1;
-pub const S_IWOTH: ::mode_t = 2;
-pub const S_IROTH: ::mode_t = 4;
-pub const F_OK: ::c_int = 0;
-pub const R_OK: ::c_int = 4;
-pub const W_OK: ::c_int = 2;
-pub const X_OK: ::c_int = 1;
-pub const STDIN_FILENO: ::c_int = 0;
-pub const STDOUT_FILENO: ::c_int = 1;
-pub const STDERR_FILENO: ::c_int = 2;
-pub const SIGHUP: ::c_int = 1;
-pub const SIGINT: ::c_int = 2;
-pub const SIGQUIT: ::c_int = 3;
-pub const SIGILL: ::c_int = 4;
-pub const SIGABRT: ::c_int = 6;
-pub const SIGFPE: ::c_int = 8;
-pub const SIGKILL: ::c_int = 9;
-pub const SIGSEGV: ::c_int = 11;
-pub const SIGPIPE: ::c_int = 7;
-pub const SIGALRM: ::c_int = 14;
-pub const SIGTERM: ::c_int = 15;
-
-pub const EAI_SYSTEM: ::c_int = 11;
-
-pub const PROT_NONE: ::c_int = 0;
-pub const PROT_READ: ::c_int = 1;
-pub const PROT_WRITE: ::c_int = 2;
-pub const PROT_EXEC: ::c_int = 4;
-
-pub const LC_ALL: ::c_int = 0;
-pub const LC_COLLATE: ::c_int = 1;
-pub const LC_CTYPE: ::c_int = 2;
-pub const LC_MONETARY: ::c_int = 3;
-pub const LC_NUMERIC: ::c_int = 4;
-pub const LC_TIME: ::c_int = 5;
-pub const LC_MESSAGES: ::c_int = 6;
-
-// TODO: Haiku does not have MAP_FILE, but libstd/os.rs requires it
-pub const MAP_FILE: ::c_int = 0x00;
-pub const MAP_SHARED: ::c_int = 0x01;
-pub const MAP_PRIVATE: ::c_int = 0x02;
-pub const MAP_FIXED: ::c_int = 0x004;
-
-pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
-
-pub const MS_ASYNC: ::c_int = 0x01;
-pub const MS_INVALIDATE: ::c_int = 0x04;
-pub const MS_SYNC: ::c_int = 0x02;
-
-pub const EPERM : ::c_int = -2147483633;
-pub const ENOENT : ::c_int = -2147459069;
-pub const ESRCH : ::c_int = -2147454963;
-pub const EINTR : ::c_int = -2147483638;
-pub const EIO : ::c_int = -2147483647;
-pub const ENXIO : ::c_int = -2147454965;
-pub const E2BIG : ::c_int = -2147454975;
-pub const ENOEXEC : ::c_int = -2147478782;
-pub const EBADF : ::c_int = -2147459072;
-pub const ECHILD : ::c_int = -2147454974;
-pub const EDEADLK : ::c_int = -2147454973;
-pub const ENOMEM : ::c_int = -2147454976;
-pub const EACCES : ::c_int = -2147483646;
-pub const EFAULT : ::c_int = -2147478783;
-// pub const ENOTBLK : ::c_int = 15;
-pub const EBUSY : ::c_int = -2147483634;
-pub const EEXIST : ::c_int = -2147459070;
-pub const EXDEV : ::c_int = -2147459061;
-pub const ENODEV : ::c_int = -2147454969;
-pub const ENOTDIR : ::c_int = -2147459067;
-pub const EISDIR : ::c_int = -2147459063;
-pub const EINVAL : ::c_int = -2147483643;
-pub const ENFILE : ::c_int = -2147454970;
-pub const EMFILE : ::c_int = -2147459062;
-pub const ENOTTY : ::c_int = -2147454966;
-pub const ETXTBSY : ::c_int = -2147454917;
-pub const EFBIG : ::c_int = -2147454972;
-pub const ENOSPC : ::c_int = -2147459065;
-pub const ESPIPE : ::c_int = -2147454964;
-pub const EROFS : ::c_int = -2147459064;
-pub const EMLINK : ::c_int = -2147454971;
-pub const EPIPE : ::c_int = -2147459059;
-pub const EDOM : ::c_int = -2147454960;
-pub const ERANGE : ::c_int = -2147454959;
-pub const EAGAIN : ::c_int = -2147483637;
-pub const EWOULDBLOCK : ::c_int = -2147483637;
-
-pub const EINPROGRESS : ::c_int = -2147454940;
-pub const EALREADY : ::c_int = -2147454939;
-pub const ENOTSOCK : ::c_int = -2147454932;
-pub const EDESTADDRREQ : ::c_int = -2147454928;
-pub const EMSGSIZE : ::c_int = -2147454934;
-pub const EPROTOTYPE : ::c_int = -2147454958;
-pub const ENOPROTOOPT : ::c_int = -2147454942;
-pub const EPROTONOSUPPORT : ::c_int = -2147454957;
-pub const EOPNOTSUPP : ::c_int = -2147454933;
-pub const EPFNOSUPPORT : ::c_int = -2147454956;
-pub const EAFNOSUPPORT : ::c_int = -2147454955;
-pub const EADDRINUSE : ::c_int = -2147454954;
-pub const EADDRNOTAVAIL : ::c_int = -2147454953;
-pub const ENETDOWN : ::c_int = -2147454953;
-pub const ENETUNREACH : ::c_int = -2147454951;
-pub const ENETRESET : ::c_int = -2147454950;
-pub const ECONNABORTED : ::c_int = -2147454949;
-pub const ECONNRESET : ::c_int = -2147454948;
-pub const ENOBUFS : ::c_int = -2147454941;
-pub const EISCONN : ::c_int = -2147454947;
-pub const ENOTCONN : ::c_int = -2147454946;
-pub const ESHUTDOWN : ::c_int = -2147454945;
-pub const ETIMEDOUT : ::c_int = -2147483639;
-pub const ECONNREFUSED : ::c_int = -2147454944;
-pub const ELOOP : ::c_int = -2147459060;
-pub const ENAMETOOLONG : ::c_int = -2147459068;
-pub const EHOSTDOWN : ::c_int = -2147454931;
-pub const EHOSTUNREACH : ::c_int = -2147454943;
-pub const ENOTEMPTY : ::c_int = -2147459066;
-pub const EDQUOT : ::c_int = -2147454927;
-pub const ESTALE : ::c_int = -2147454936;
-pub const ENOLCK : ::c_int = -2147454968;
-pub const ENOSYS : ::c_int = -2147454967;
-pub const EIDRM : ::c_int = -2147454926;
-pub const ENOMSG : ::c_int = -2147454937;
-pub const EOVERFLOW : ::c_int = -2147454935;
-pub const ECANCELED : ::c_int = -2147454929;
-pub const EILSEQ : ::c_int = -2147454938;
-pub const ENOATTR : ::c_int = -2147454916;
-pub const EBADMSG : ::c_int = -2147454930;
-pub const EMULTIHOP : ::c_int = -2147454925;
-pub const ENOLINK : ::c_int = -2147454923;
-pub const EPROTO : ::c_int = -2147454919;
-
-pub const IPPROTO_RAW: ::c_int = 255;
-
-// These are prefixed with POSIX_ on Haiku
-pub const MADV_NORMAL: ::c_int = 1;
-pub const MADV_SEQUENTIAL: ::c_int = 2;
-pub const MADV_RANDOM: ::c_int = 3;
-pub const MADV_WILLNEED: ::c_int = 4;
-pub const MADV_DONTNEED: ::c_int = 5;
-
-pub const IFF_LOOPBACK: ::c_int = 0x0008;
-
-pub const AF_UNIX: ::c_int = 9;
-pub const AF_INET: ::c_int = 1;
-pub const AF_INET6: ::c_int = 6;
-pub const SOCK_RAW: ::c_int = 3;
-pub const IPPROTO_ICMP: ::c_int = 1;
-pub const IPPROTO_ICMPV6: ::c_int = 58;
-pub const IPPROTO_TCP: ::c_int = 6;
-pub const IPPROTO_IP: ::c_int = 0;
-pub const IPPROTO_IPV6: ::c_int = 41;
-pub const IP_MULTICAST_TTL: ::c_int = 10;
-pub const IP_MULTICAST_LOOP: ::c_int = 11;
-pub const IP_TTL: ::c_int = 4;
-pub const IP_HDRINCL: ::c_int = 2;
-pub const IP_ADD_MEMBERSHIP: ::c_int = 12;
-pub const IP_DROP_MEMBERSHIP: ::c_int = 13;
-
-pub const TCP_NODELAY: ::c_int = 0x01;
-pub const TCP_MAXSEG: ::c_int = 0x02;
-pub const TCP_NOPUSH: ::c_int = 0x04;
-pub const TCP_NOOPT: ::c_int = 0x08;
-
-pub const IPV6_MULTICAST_LOOP: ::c_int = 26;
-pub const IPV6_JOIN_GROUP: ::c_int = 28;
-pub const IPV6_LEAVE_GROUP: ::c_int = 29;
-pub const IPV6_V6ONLY: ::c_int = 30;
-
-pub const SO_DEBUG: ::c_int = 0x00000004;
-
-pub const MSG_PEEK: ::c_int = 0x2;
-pub const MSG_NOSIGNAL: ::c_int = 0x0800;
-
-pub const SHUT_RD: ::c_int = 0;
-pub const SHUT_WR: ::c_int = 1;
-pub const SHUT_RDWR: ::c_int = 2;
-
-pub const LOCK_SH: ::c_int = 0x01;
-pub const LOCK_EX: ::c_int = 0x02;
-pub const LOCK_NB: ::c_int = 0x04;
-pub const LOCK_UN: ::c_int = 0x08;
-
-pub const SIGSTKSZ: ::size_t = 16384;
-
-pub const SA_NODEFER: ::c_int = 0x08;
-pub const SA_RESETHAND: ::c_int = 0x04;
-pub const SA_RESTART: ::c_int = 0x10;
-pub const SA_NOCLDSTOP: ::c_int = 0x01;
-
-pub const FD_SETSIZE: usize = 1024;
-
-pub const RTLD_NOW: ::c_int = 0x1;
-pub const RTLD_DEFAULT: *mut ::c_void = 0isize as *mut ::c_void;
-
-pub const BUFSIZ: ::c_uint = 8192;
-pub const FILENAME_MAX: ::c_uint = 256;
-pub const FOPEN_MAX: ::c_uint = 128;
-pub const L_tmpnam: ::c_uint = 512;
-pub const TMP_MAX: ::c_uint = 32768;
-pub const _PC_NAME_MAX: ::c_int = 4;
-
-pub const FIONBIO: ::c_int = 0xbe000000;
-
-pub const _SC_IOV_MAX : ::c_int = 32;
-pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 25;
-pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 26;
-pub const _SC_PAGESIZE : ::c_int = 27;
-pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 48;
-pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 49;
-pub const _SC_THREAD_PRIORITY_SCHEDULING : ::c_int = 50;
-pub const _SC_THREAD_PROCESS_SHARED : ::c_int = 46;
-pub const _SC_THREAD_STACK_MIN : ::c_int = 47;
-pub const _SC_THREADS : ::c_int = 31;
-pub const _SC_ATEXIT_MAX : ::c_int = 37;
-
-pub const PTHREAD_STACK_MIN: ::size_t = 8192;
-
-pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
-    flags: 0,
-    lock: 0,
-    unused: -42,
-    owner: -1,
-    owner_count: 0,
-};
-pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
-    flags: 0,
-    unused: -42,
-    mutex: 0 as *mut _,
-    waiter_count: 0,
-    lock: 0,
-};
-pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
-    flags: 0,
-    owner: 0,
-    lock_sem: 0,
-    lock_count: 0,
-    reader_count: 0,
-    writer_count: 0,
-    waiters: [0 as *mut _; 2],
-};
-
-pub const PTHREAD_MUTEX_DEFAULT: ::c_int = 0;
-pub const PTHREAD_MUTEX_NORMAL: ::c_int = 1;
-pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
-pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 3;
-
-pub const FIOCLEX: c_ulong = 0; // TODO: does not exist on Haiku!
-
-pub const SA_ONSTACK: c_ulong = 0x20;
-pub const SA_SIGINFO: c_ulong = 0x40;
-pub const SA_NOCLDWAIT: c_ulong = 0x02;
-
-pub const SIGCHLD: ::c_int = 5;
-pub const SIGBUS: ::c_int = 30;
-pub const SIG_SETMASK: ::c_int = 3;
-
-pub const RUSAGE_CHILDREN: ::c_int = -1;
-
-pub const SOCK_STREAM: ::c_int = 1;
-pub const SOCK_DGRAM: ::c_int = 2;
-
-pub const SOL_SOCKET: ::c_int = -1;
-pub const SO_ACCEPTCONN: ::c_int = 0x00000001;
-pub const SO_BROADCAST: ::c_int = 0x00000002;
-pub const SO_DONTROUTE: ::c_int = 0x00000008;
-pub const SO_KEEPALIVE: ::c_int = 0x00000010;
-pub const SO_OOBINLINE: ::c_int = 0x00000020;
-pub const SO_REUSEADDR: ::c_int = 0x00000040;
-pub const SO_REUSEPORT: ::c_int = 0x00000080;
-pub const SO_USELOOPBACK: ::c_int = 0x00000100;
-pub const SO_LINGER: ::c_int = 0x00000200;
-pub const SO_SNDBUF: ::c_int = 0x40000001;
-pub const SO_SNDLOWAT: ::c_int = 0x40000002;
-pub const SO_SNDTIMEO: ::c_int = 0x40000003;
-pub const SO_RCVBUF: ::c_int = 0x40000004;
-pub const SO_RCVLOWAT: ::c_int = 0x40000005;
-pub const SO_RCVTIMEO: ::c_int = 0x40000006;
-pub const SO_ERROR: ::c_int = 0x40000007;
-pub const SO_TYPE: ::c_int = 0x40000008;
-pub const SO_NONBLOCK: ::c_int = 0x40000009;
-pub const SO_BINDTODEVICE: ::c_int = 0x4000000a;
-pub const SO_PEERCRED: ::c_int = 0x4000000b;
-
-pub const NI_MAXHOST: ::size_t = 1025;
-
-pub const WNOHANG: ::c_int = 0x01;
-pub const WUNTRACED: ::c_int = 0x02;
-pub const WCONTINUED: ::c_int = 0x04;
-pub const WEXITED: ::c_int = 0x08;
-pub const WSTOPPED: ::c_int = 0x10;
-pub const WNOWAIT: ::c_int = 0x20;
-
-pub const P_ALL: idtype_t = 0;
-pub const P_PID: idtype_t = 1;
-pub const P_PGID: idtype_t = 2;
-
-f! {
-    pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
-        let fd = fd as usize;
-        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
-        (*set).fds_bits[fd / size] &= !(1 << (fd % size));
-        return
-    }
-
-    pub fn FD_ISSET(fd: ::c_int, set: *mut fd_set) -> bool {
-        let fd = fd as usize;
-        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
-        return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0
-    }
-
-    pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () {
-        let fd = fd as usize;
-        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
-        (*set).fds_bits[fd / size] |= 1 << (fd % size);
-        return
-    }
-
-    pub fn FD_ZERO(set: *mut fd_set) -> () {
-        for slot in (*set).fds_bits.iter_mut() {
-            *slot = 0;
-        }
-    }
-
-    pub fn WIFEXITED(status: ::c_int) -> bool {
-        (status >> 8) == 0
-    }
-
-    pub fn WEXITSTATUS(status: ::c_int) -> ::c_int {
-        (status & 0xff)
-    }
-
-    pub fn WTERMSIG(status: ::c_int) -> ::c_int {
-        (status >> 8) & 0xff
-    }
-}
-
-extern {
-    pub fn clock_gettime(clk_id: ::c_int, tp: *mut ::timespec) -> ::c_int;
-    pub fn clock_settime(clk_id: ::c_int, tp: *const ::timespec) -> ::c_int;
-    pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
-                                     guardsize: *mut ::size_t) -> ::c_int;
-    pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,
-                                 stackaddr: *mut *mut ::c_void,
-                                 stacksize: *mut ::size_t) -> ::c_int;
-    pub fn pthread_condattr_getclock(attr: *const pthread_condattr_t,
-                                     clock_id: *mut clockid_t) -> ::c_int;
-    pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
-                                     clock_id: clockid_t) -> ::c_int;
-    pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
-    pub fn setgroups(ngroups: ::size_t,
-                     ptr: *const ::gid_t) -> ::c_int;
-    pub fn getpwuid_r(uid: ::uid_t,
-                      pwd: *mut passwd,
-                      buffer: *mut ::c_char,
-                      bufferSize: ::size_t,
-                      result: *mut *mut passwd) -> ::c_int;
-    pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
-    pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int)
-                    -> ::c_int;
-    pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
-    pub fn getnameinfo(sa: *const ::sockaddr,
-                       salen: ::socklen_t,
-                       host: *mut ::c_char,
-                       hostlen: ::size_t,
-                       serv: *mut ::c_char,
-                       sevlen: ::size_t,
-                       flags: ::c_int) -> ::c_int;
-    pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
-                                   abstime: *const ::timespec) -> ::c_int;
-    pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t,
-                  options: ::c_int) -> ::c_int;
-
-    pub fn fdopendir(fd: ::c_int) -> *mut ::DIR;
-    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;
-    pub fn globfree(pglob: *mut ::glob_t);
-
-    pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
-                         -> ::c_int;
-
-    pub fn shm_unlink(name: *const ::c_char) -> ::c_int;
-
-    pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long);
-
-    pub fn telldir(dirp: *mut ::DIR) -> ::c_long;
-    pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
-                  -> ::c_int;
-
-    pub fn msync(addr: *mut ::c_void, len: ::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;
-    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 nl_langinfo(item: ::nl_item) -> *mut ::c_char;
-
-    pub fn bind(socket: ::c_int, address: *const ::sockaddr,
-                address_len: ::socklen_t) -> ::c_int;
-
-    pub fn writev(fd: ::c_int,
-                  iov: *const ::iovec,
-                  iovcnt: ::c_int) -> ::ssize_t;
-    pub fn readv(fd: ::c_int,
-                 iov: *const ::iovec,
-                 iovcnt: ::c_int) -> ::ssize_t;
-
-    pub fn sendmsg(fd: ::c_int,
-                   msg: *const ::msghdr,
-                   flags: ::c_int) -> ::ssize_t;
-    pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
-                   -> ::ssize_t;
-}
-
-cfg_if! {
-    if #[cfg(target_pointer_width = "64")] {
-        mod b64;
-        pub use self::b64::*;
-    } else {
-        mod b32;
-        pub use self::b32::*;
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/mod.rs
+++ /dev/null
@@ -1,907 +0,0 @@
-//! Definitions found commonly among almost all Unix derivatives
-//!
-//! More functions and definitions can be found in the more specific modules
-//! according to the platform in question.
-
-use dox::Option;
-
-pub type pid_t = i32;
-pub type uid_t = u32;
-pub type gid_t = u32;
-pub type in_addr_t = u32;
-pub type in_port_t = u16;
-pub type sighandler_t = ::size_t;
-pub type cc_t = ::c_uchar;
-
-pub enum DIR {}
-pub enum locale_t {}
-
-s! {
-    pub struct group {
-        pub gr_name: *mut ::c_char,
-        pub gr_passwd: *mut ::c_char,
-        pub gr_gid: ::gid_t,
-        pub gr_mem: *mut *mut ::c_char,
-    }
-
-    pub struct utimbuf {
-        pub actime: time_t,
-        pub modtime: time_t,
-    }
-
-    pub struct timeval {
-        pub tv_sec: time_t,
-        pub tv_usec: suseconds_t,
-    }
-
-    pub struct timespec {
-        pub tv_sec: time_t,
-        pub tv_nsec: c_long,
-    }
-
-    pub struct rlimit {
-        pub rlim_cur: rlim_t,
-        pub rlim_max: rlim_t,
-    }
-
-    pub struct rusage {
-        pub ru_utime: timeval,
-        pub ru_stime: timeval,
-        pub ru_maxrss: c_long,
-        pub ru_ixrss: c_long,
-        pub ru_idrss: c_long,
-        pub ru_isrss: c_long,
-        pub ru_minflt: c_long,
-        pub ru_majflt: c_long,
-        pub ru_nswap: c_long,
-        pub ru_inblock: c_long,
-        pub ru_oublock: c_long,
-        pub ru_msgsnd: c_long,
-        pub ru_msgrcv: c_long,
-        pub ru_nsignals: c_long,
-        pub ru_nvcsw: c_long,
-        pub ru_nivcsw: c_long,
-
-        #[cfg(any(target_env = "musl"))]
-        __reserved: [c_long; 16],
-    }
-
-    #[cfg_attr(target_os = "netbsd", repr(packed))]
-    pub struct in_addr {
-        pub s_addr: in_addr_t,
-    }
-
-    pub struct in6_addr {
-        pub s6_addr: [u8; 16],
-        __align: [u32; 0],
-    }
-
-    pub struct ip_mreq {
-        pub imr_multiaddr: in_addr,
-        pub imr_interface: in_addr,
-    }
-
-    pub struct ipv6_mreq {
-        pub ipv6mr_multiaddr: in6_addr,
-        #[cfg(target_os = "android")]
-        pub ipv6mr_interface: ::c_int,
-        #[cfg(not(target_os = "android"))]
-        pub ipv6mr_interface: ::c_uint,
-    }
-
-    pub struct hostent {
-        pub h_name: *mut ::c_char,
-        pub h_aliases: *mut *mut ::c_char,
-        pub h_addrtype: ::c_int,
-        pub h_length: ::c_int,
-        pub h_addr_list: *mut *mut ::c_char,
-    }
-
-    pub struct iovec {
-        pub iov_base: *mut ::c_void,
-        pub iov_len: ::size_t,
-    }
-
-    pub struct pollfd {
-        pub fd: ::c_int,
-        pub events: ::c_short,
-        pub revents: ::c_short,
-    }
-
-    pub struct winsize {
-        pub ws_row: ::c_ushort,
-        pub ws_col: ::c_ushort,
-        pub ws_xpixel: ::c_ushort,
-        pub ws_ypixel: ::c_ushort,
-    }
-
-    pub struct linger {
-        pub l_onoff: ::c_int,
-        pub l_linger: ::c_int,
-    }
-
-    pub struct sigval {
-        // Actually a union of an int and a void*
-        pub sival_ptr: *mut ::c_void
-    }
-
-    // <sys/time.h>
-    pub struct itimerval {
-        pub it_interval: ::timeval,
-        pub it_value: ::timeval,
-    }
-
-    // <sys/times.h>
-    pub struct tms {
-        pub tms_utime: ::clock_t,
-        pub tms_stime: ::clock_t,
-        pub tms_cutime: ::clock_t,
-        pub tms_cstime: ::clock_t,
-    }
-}
-
-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_FIFO: u8 = 1;
-pub const DT_CHR: u8 = 2;
-pub const DT_DIR: u8 = 4;
-pub const DT_BLK: u8 = 6;
-pub const DT_REG: u8 = 8;
-pub const DT_LNK: u8 = 10;
-pub const DT_SOCK: u8 = 12;
-
-pub const FD_CLOEXEC: ::c_int = 0x1;
-
-pub const USRQUOTA: ::c_int = 0;
-pub const GRPQUOTA: ::c_int = 1;
-
-pub const SIGIOT: ::c_int = 6;
-
-pub const S_ISUID: ::c_int = 0x800;
-pub const S_ISGID: ::c_int = 0x400;
-pub const S_ISVTX: ::c_int = 0x200;
-
-pub const POLLIN: ::c_short = 0x1;
-pub const POLLPRI: ::c_short = 0x2;
-pub const POLLOUT: ::c_short = 0x4;
-pub const POLLERR: ::c_short = 0x8;
-pub const POLLHUP: ::c_short = 0x10;
-pub const POLLNVAL: ::c_short = 0x20;
-
-pub const IF_NAMESIZE: ::size_t = 16;
-
-pub const RTLD_LAZY: ::c_int = 0x1;
-
-pub const LOG_EMERG: ::c_int = 0;
-pub const LOG_ALERT: ::c_int = 1;
-pub const LOG_CRIT: ::c_int = 2;
-pub const LOG_ERR: ::c_int = 3;
-pub const LOG_WARNING: ::c_int = 4;
-pub const LOG_NOTICE: ::c_int = 5;
-pub const LOG_INFO: ::c_int = 6;
-pub const LOG_DEBUG: ::c_int = 7;
-
-pub const LOG_KERN: ::c_int = 0;
-pub const LOG_USER: ::c_int = 1 << 3;
-pub const LOG_MAIL: ::c_int = 2 << 3;
-pub const LOG_DAEMON: ::c_int = 3 << 3;
-pub const LOG_AUTH: ::c_int = 4 << 3;
-pub const LOG_SYSLOG: ::c_int = 5 << 3;
-pub const LOG_LPR: ::c_int = 6 << 3;
-pub const LOG_NEWS: ::c_int = 7 << 3;
-pub const LOG_UUCP: ::c_int = 8 << 3;
-pub const LOG_LOCAL0: ::c_int = 16 << 3;
-pub const LOG_LOCAL1: ::c_int = 17 << 3;
-pub const LOG_LOCAL2: ::c_int = 18 << 3;
-pub const LOG_LOCAL3: ::c_int = 19 << 3;
-pub const LOG_LOCAL4: ::c_int = 20 << 3;
-pub const LOG_LOCAL5: ::c_int = 21 << 3;
-pub const LOG_LOCAL6: ::c_int = 22 << 3;
-pub const LOG_LOCAL7: ::c_int = 23 << 3;
-
-pub const LOG_PID: ::c_int = 0x01;
-pub const LOG_CONS: ::c_int = 0x02;
-pub const LOG_ODELAY: ::c_int = 0x04;
-pub const LOG_NDELAY: ::c_int = 0x08;
-pub const LOG_NOWAIT: ::c_int = 0x10;
-
-pub const LOG_PRIMASK: ::c_int = 7;
-pub const LOG_FACMASK: ::c_int = 0x3f8;
-
-pub const PRIO_PROCESS: ::c_int = 0;
-pub const PRIO_PGRP: ::c_int = 1;
-pub const PRIO_USER: ::c_int = 2;
-
-pub const PRIO_MIN: ::c_int = -20;
-pub const PRIO_MAX: ::c_int = 20;
-
-cfg_if! {
-    if #[cfg(dox)] {
-        // on dox builds don't pull in anything
-    } else if #[cfg(all(not(stdbuild), 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")))]
-        extern {}
-    } else if #[cfg(target_os = "emscripten")] {
-        #[link(name = "c")]
-        extern {}
-    } else if #[cfg(all(target_os = "netbsd", target_vendor = "rumprun"))] {
-        // 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.
-        #[link(name = "m")]
-        extern {}
-    } else if #[cfg(any(target_os = "macos",
-                        target_os = "ios",
-                        target_os = "android",
-                        target_os = "openbsd",
-                        target_os = "bitrig"))] {
-        #[link(name = "c")]
-        #[link(name = "m")]
-        extern {}
-    } else if #[cfg(target_os = "haiku")] {
-        #[link(name = "root")]
-        #[link(name = "network")]
-        extern {}
-    } else if #[cfg(target_os = "fuchsia")] {
-        #[link(name = "c")]
-        #[link(name = "mxio")]
-        extern {}
-    } else {
-        #[link(name = "c")]
-        #[link(name = "m")]
-        #[link(name = "rt")]
-        #[link(name = "pthread")]
-        extern {}
-    }
-}
-
-extern {
-    pub fn getgrnam(name: *const ::c_char) -> *mut group;
-    pub fn getgrgid(gid: ::gid_t) -> *mut group;
-
-    pub fn endpwent();
-    #[cfg_attr(target_os = "netbsd", link_name = "__getpwnam50")]
-    pub fn getpwnam(name: *const ::c_char) -> *mut passwd;
-    #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid50")]
-    pub fn getpwuid(uid: ::uid_t) -> *mut passwd;
-
-    pub fn fprintf(stream: *mut ::FILE,
-                   format: *const ::c_char, ...) -> ::c_int;
-    pub fn printf(format: *const ::c_char, ...) -> ::c_int;
-    pub fn snprintf(s: *mut ::c_char, n: ::size_t,
-                    format: *const ::c_char, ...) -> ::c_int;
-    pub fn sprintf(s: *mut ::c_char, format: *const ::c_char, ...) -> ::c_int;
-    pub fn fscanf(stream: *mut ::FILE, format: *const ::c_char, ...) -> ::c_int;
-    pub fn scanf(format: *const ::c_char, ...) -> ::c_int;
-    pub fn sscanf(s: *const ::c_char, format: *const ::c_char, ...) -> ::c_int;
-    pub fn getchar_unlocked() -> ::c_int;
-    pub fn putchar_unlocked(c: ::c_int) -> ::c_int;
-
-    #[cfg_attr(target_os = "netbsd", link_name = "__socket30")]
-    pub fn socket(domain: ::c_int, ty: ::c_int, protocol: ::c_int) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "connect$UNIX2003")]
-    pub fn connect(socket: ::c_int, address: *const sockaddr,
-                   len: socklen_t) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "listen$UNIX2003")]
-    pub fn listen(socket: ::c_int, backlog: ::c_int) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "accept$UNIX2003")]
-    pub fn accept(socket: ::c_int, address: *mut sockaddr,
-                  address_len: *mut socklen_t) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "getpeername$UNIX2003")]
-    pub fn getpeername(socket: ::c_int, address: *mut sockaddr,
-                       address_len: *mut socklen_t) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "getsockname$UNIX2003")]
-    pub fn getsockname(socket: ::c_int, address: *mut sockaddr,
-                       address_len: *mut socklen_t) -> ::c_int;
-    pub fn setsockopt(socket: ::c_int, level: ::c_int, name: ::c_int,
-                      value: *const ::c_void,
-                      option_len: socklen_t) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "socketpair$UNIX2003")]
-    pub fn socketpair(domain: ::c_int, type_: ::c_int, protocol: ::c_int,
-                      socket_vector: *mut ::c_int) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "sendto$UNIX2003")]
-    pub fn sendto(socket: ::c_int, buf: *const ::c_void, len: ::size_t,
-                  flags: ::c_int, addr: *const sockaddr,
-                  addrlen: socklen_t) -> ::ssize_t;
-    pub fn shutdown(socket: ::c_int, how: ::c_int) -> ::c_int;
-
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "chmod$UNIX2003")]
-    pub fn chmod(path: *const c_char, mode: mode_t) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "fchmod$UNIX2003")]
-    pub fn fchmod(fd: ::c_int, mode: mode_t) -> ::c_int;
-
-    #[cfg_attr(target_os = "macos", link_name = "fstat$INODE64")]
-    #[cfg_attr(target_os = "netbsd", link_name = "__fstat50")]
-    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")]
-    pub fn stat(path: *const c_char, buf: *mut stat) -> ::c_int;
-
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "popen$UNIX2003")]
-    pub fn popen(command: *const c_char,
-                 mode: *const c_char) -> *mut ::FILE;
-    pub fn pclose(stream: *mut ::FILE) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "fdopen$UNIX2003")]
-    pub fn fdopen(fd: ::c_int, mode: *const c_char) -> *mut ::FILE;
-    pub fn fileno(stream: *mut ::FILE) -> ::c_int;
-
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "open$UNIX2003")]
-    pub fn open(path: *const c_char, oflag: ::c_int, ...) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "creat$UNIX2003")]
-    pub fn creat(path: *const c_char, mode: mode_t) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "fcntl$UNIX2003")]
-    pub fn fcntl(fd: ::c_int, cmd: ::c_int, ...) -> ::c_int;
-
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"),
-               link_name = "opendir$INODE64")]
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "opendir$INODE64$UNIX2003")]
-    #[cfg_attr(target_os = "netbsd", link_name = "__opendir30")]
-    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")]
-    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")]
-    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"),
-               link_name = "closedir$UNIX2003")]
-    pub fn closedir(dirp: *mut ::DIR) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"),
-               link_name = "rewinddir$INODE64")]
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "rewinddir$INODE64$UNIX2003")]
-    pub fn rewinddir(dirp: *mut ::DIR);
-
-    pub fn openat(dirfd: ::c_int, pathname: *const ::c_char,
-                  flags: ::c_int, ...) -> ::c_int;
-    pub fn faccessat(dirfd: ::c_int, pathname: *const ::c_char,
-                     mode: ::c_int, flags: ::c_int) -> ::c_int;
-    pub fn fchmodat(dirfd: ::c_int, pathname: *const ::c_char,
-                    mode: ::mode_t, flags: ::c_int) -> ::c_int;
-    pub fn fchown(fd: ::c_int,
-                  owner: ::uid_t,
-                  group: ::gid_t) -> ::c_int;
-    pub fn fchownat(dirfd: ::c_int, pathname: *const ::c_char,
-                    owner: ::uid_t, group: ::gid_t,
-                    flags: ::c_int) -> ::c_int;
-    #[cfg_attr(target_os = "macos", link_name = "fstatat$INODE64")]
-    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,
-                  newdirfd: ::c_int, newpath: *const ::c_char,
-                  flags: ::c_int) -> ::c_int;
-    pub fn mkdirat(dirfd: ::c_int, pathname: *const ::c_char,
-                   mode: ::mode_t) -> ::c_int;
-    pub fn readlinkat(dirfd: ::c_int, pathname: *const ::c_char,
-                      buf: *mut ::c_char, bufsiz: ::size_t) -> ::ssize_t;
-    pub fn renameat(olddirfd: ::c_int, oldpath: *const ::c_char,
-                    newdirfd: ::c_int, newpath: *const ::c_char)
-                    -> ::c_int;
-    pub fn symlinkat(target: *const ::c_char, newdirfd: ::c_int,
-                     linkpath: *const ::c_char) -> ::c_int;
-    pub fn unlinkat(dirfd: ::c_int, pathname: *const ::c_char,
-                    flags: ::c_int) -> ::c_int;
-
-    pub fn access(path: *const c_char, amode: ::c_int) -> ::c_int;
-    pub fn alarm(seconds: ::c_uint) -> ::c_uint;
-    pub fn chdir(dir: *const c_char) -> ::c_int;
-    pub fn fchdir(dirfd: ::c_int) -> ::c_int;
-    pub fn chown(path: *const c_char, uid: uid_t,
-                 gid: gid_t) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "lchown$UNIX2003")]
-    pub fn lchown(path: *const c_char, uid: uid_t,
-                  gid: gid_t) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "close$NOCANCEL$UNIX2003")]
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"),
-               link_name = "close$NOCANCEL")]
-    pub fn close(fd: ::c_int) -> ::c_int;
-    pub fn dup(fd: ::c_int) -> ::c_int;
-    pub fn dup2(src: ::c_int, dst: ::c_int) -> ::c_int;
-    pub fn execl(path: *const c_char,
-                 arg0: *const c_char, ...) -> ::c_int;
-    pub fn execle(path: *const ::c_char,
-                  arg0: *const ::c_char, ...) -> ::c_int;
-    pub fn execlp(file: *const ::c_char,
-                  arg0: *const ::c_char, ...) -> ::c_int;
-    pub fn execv(prog: *const c_char,
-                 argv: *const *const c_char) -> ::c_int;
-    pub fn execve(prog: *const c_char, argv: *const *const c_char,
-                  envp: *const *const c_char)
-                  -> ::c_int;
-    pub fn execvp(c: *const c_char,
-                  argv: *const *const c_char) -> ::c_int;
-    pub fn fork() -> pid_t;
-    pub fn fpathconf(filedes: ::c_int, name: ::c_int) -> c_long;
-    pub fn getcwd(buf: *mut c_char, size: ::size_t) -> *mut c_char;
-    pub fn getegid() -> gid_t;
-    pub fn geteuid() -> uid_t;
-    pub fn getgid() -> gid_t;
-    pub fn getgroups(ngroups_max: ::c_int, groups: *mut gid_t)
-                     -> ::c_int;
-    pub fn getlogin() -> *mut c_char;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "getopt$UNIX2003")]
-    pub fn getopt(argc: ::c_int, argv: *const *mut c_char,
-                  optstr: *const c_char) -> ::c_int;
-    pub fn getpgid(pid: pid_t) -> pid_t;
-    pub fn getpgrp() -> pid_t;
-    pub fn getpid() -> pid_t;
-    pub fn getppid() -> pid_t;
-    pub fn getuid() -> uid_t;
-    pub fn isatty(fd: ::c_int) -> ::c_int;
-    pub fn link(src: *const c_char, dst: *const c_char) -> ::c_int;
-    pub fn lseek(fd: ::c_int, offset: off_t, whence: ::c_int) -> off_t;
-    pub fn pathconf(path: *const c_char, name: ::c_int) -> c_long;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "pause$UNIX2003")]
-    pub fn pause() -> ::c_int;
-    pub fn pipe(fds: *mut ::c_int) -> ::c_int;
-    pub fn posix_memalign(memptr: *mut *mut ::c_void,
-                      align: ::size_t,
-                      size: ::size_t) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "read$UNIX2003")]
-    pub fn read(fd: ::c_int, buf: *mut ::c_void, count: ::size_t)
-                -> ::ssize_t;
-    pub fn rmdir(path: *const c_char) -> ::c_int;
-    pub fn seteuid(uid: uid_t) -> ::c_int;
-    pub fn setgid(gid: gid_t) -> ::c_int;
-    pub fn setpgid(pid: pid_t, pgid: pid_t) -> ::c_int;
-    pub fn setsid() -> pid_t;
-    pub fn setuid(uid: uid_t) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "sleep$UNIX2003")]
-    pub fn sleep(secs: ::c_uint) -> ::c_uint;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "nanosleep$UNIX2003")]
-    #[cfg_attr(target_os = "netbsd", link_name = "__nanosleep50")]
-    pub fn nanosleep(rqtp: *const timespec,
-                     rmtp: *mut timespec) -> ::c_int;
-    pub fn tcgetpgrp(fd: ::c_int) -> pid_t;
-    pub fn tcsetpgrp(fd: ::c_int, pgrp: ::pid_t) -> ::c_int;
-    pub fn ttyname(fd: ::c_int) -> *mut c_char;
-    pub fn unlink(c: *const c_char) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "wait$UNIX2003")]
-    pub fn wait(status: *mut ::c_int) -> pid_t;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "waitpid$UNIX2003")]
-    pub fn waitpid(pid: pid_t, status: *mut ::c_int, options: ::c_int)
-                   -> pid_t;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "write$UNIX2003")]
-    pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::size_t)
-                 -> ::ssize_t;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "pread$UNIX2003")]
-    pub fn pread(fd: ::c_int, buf: *mut ::c_void, count: ::size_t,
-                 offset: off_t) -> ::ssize_t;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "pwrite$UNIX2003")]
-    pub fn pwrite(fd: ::c_int, buf: *const ::c_void, count: ::size_t,
-                  offset: off_t) -> ::ssize_t;
-    pub fn umask(mask: mode_t) -> mode_t;
-
-    #[cfg_attr(target_os = "netbsd", link_name = "__utime50")]
-    pub fn utime(file: *const c_char, buf: *const utimbuf) -> ::c_int;
-
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-                   link_name = "kill$UNIX2003")]
-    pub fn kill(pid: 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;
-    pub fn mlockall(flags: ::c_int) -> ::c_int;
-    pub fn munlockall() -> ::c_int;
-
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "mmap$UNIX2003")]
-    pub fn mmap(addr: *mut ::c_void,
-                len: ::size_t,
-                prot: ::c_int,
-                flags: ::c_int,
-                fd: ::c_int,
-                offset: off_t)
-                -> *mut ::c_void;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "munmap$UNIX2003")]
-    pub fn munmap(addr: *mut ::c_void, len: ::size_t) -> ::c_int;
-
-    pub fn if_nametoindex(ifname: *const c_char) -> ::c_uint;
-    pub fn if_indextoname(ifindex: ::c_uint,
-                          ifname: *mut ::c_char) -> *mut ::c_char;
-
-    #[cfg_attr(target_os = "macos", link_name = "lstat$INODE64")]
-    #[cfg_attr(target_os = "netbsd", link_name = "__lstat50")]
-    pub fn lstat(path: *const c_char, buf: *mut stat) -> ::c_int;
-
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "fsync$UNIX2003")]
-    pub fn fsync(fd: ::c_int) -> ::c_int;
-
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "setenv$UNIX2003")]
-    pub fn setenv(name: *const c_char, val: *const c_char,
-                  overwrite: ::c_int) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "unsetenv$UNIX2003")]
-    #[cfg_attr(target_os = "netbsd", link_name = "__unsetenv13")]
-    pub fn unsetenv(name: *const c_char) -> ::c_int;
-
-    pub fn symlink(path1: *const c_char,
-                   path2: *const c_char) -> ::c_int;
-
-    pub fn ftruncate(fd: ::c_int, length: off_t) -> ::c_int;
-
-    pub fn signal(signum: ::c_int, handler: sighandler_t) -> sighandler_t;
-
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "getrlimit$UNIX2003")]
-    pub fn getrlimit(resource: ::c_int, rlim: *mut rlimit) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "setrlimit$UNIX2003")]
-    pub fn setrlimit(resource: ::c_int, rlim: *const rlimit) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__getrusage50")]
-    pub fn getrusage(resource: ::c_int, usage: *mut rusage) -> ::c_int;
-
-    pub fn getdtablesize() -> ::c_int;
-    #[cfg_attr(any(target_os = "macos", target_os = "ios"),
-               link_name = "realpath$DARWIN_EXTSN")]
-    pub fn realpath(pathname: *const ::c_char, resolved: *mut ::c_char)
-                    -> *mut ::c_char;
-
-    pub fn flock(fd: ::c_int, operation: ::c_int) -> ::c_int;
-
-    #[cfg_attr(target_os = "netbsd", link_name = "__gettimeofday50")]
-    pub fn gettimeofday(tp: *mut ::timeval,
-                        tz: *mut ::c_void) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__times13")]
-    pub fn times(buf: *mut ::tms) -> ::clock_t;
-
-    pub fn pthread_self() -> ::pthread_t;
-    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;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "pthread_join$UNIX2003")]
-    pub fn pthread_join(native: ::pthread_t,
-                        value: *mut *mut ::c_void) -> ::c_int;
-    pub fn pthread_atfork(prepare: Option<unsafe extern fn()>,
-                          parent: Option<unsafe extern fn()>,
-                          child: Option<unsafe extern fn()>) -> ::c_int;
-    pub fn pthread_exit(value: *mut ::c_void);
-    pub fn pthread_attr_init(attr: *mut ::pthread_attr_t) -> ::c_int;
-    pub fn pthread_attr_destroy(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_attr_setdetachstate(attr: *mut ::pthread_attr_t,
-                                       state: ::c_int) -> ::c_int;
-    pub fn pthread_detach(thread: ::pthread_t) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__libc_thr_yield")]
-    pub fn sched_yield() -> ::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_getspecific(key: pthread_key_t) -> *mut ::c_void;
-    pub fn pthread_setspecific(key: pthread_key_t, value: *const ::c_void)
-                               -> ::c_int;
-    pub fn pthread_mutex_init(lock: *mut pthread_mutex_t,
-                              attr: *const pthread_mutexattr_t) -> ::c_int;
-    pub fn pthread_mutex_destroy(lock: *mut pthread_mutex_t) -> ::c_int;
-    pub fn pthread_mutex_lock(lock: *mut pthread_mutex_t) -> ::c_int;
-    pub fn pthread_mutex_trylock(lock: *mut pthread_mutex_t) -> ::c_int;
-    pub fn pthread_mutex_unlock(lock: *mut pthread_mutex_t) -> ::c_int;
-
-    pub fn pthread_mutexattr_init(attr: *mut pthread_mutexattr_t) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "pthread_mutexattr_destroy$UNIX2003")]
-    pub fn pthread_mutexattr_destroy(attr: *mut pthread_mutexattr_t) -> ::c_int;
-    pub fn pthread_mutexattr_settype(attr: *mut pthread_mutexattr_t,
-                                     _type: ::c_int) -> ::c_int;
-
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "pthread_cond_init$UNIX2003")]
-    pub fn pthread_cond_init(cond: *mut pthread_cond_t,
-                             attr: *const pthread_condattr_t) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "pthread_cond_wait$UNIX2003")]
-    pub fn pthread_cond_wait(cond: *mut pthread_cond_t,
-                             lock: *mut pthread_mutex_t) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "pthread_cond_timedwait$UNIX2003")]
-    pub fn pthread_cond_timedwait(cond: *mut pthread_cond_t,
-                              lock: *mut pthread_mutex_t,
-                              abstime: *const ::timespec) -> ::c_int;
-    pub fn pthread_cond_signal(cond: *mut pthread_cond_t) -> ::c_int;
-    pub fn pthread_cond_broadcast(cond: *mut pthread_cond_t) -> ::c_int;
-    pub fn pthread_cond_destroy(cond: *mut pthread_cond_t) -> ::c_int;
-    pub fn pthread_condattr_init(attr: *mut pthread_condattr_t) -> ::c_int;
-    pub fn pthread_condattr_destroy(attr: *mut pthread_condattr_t) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "pthread_rwlock_destroy$UNIX2003")]
-    pub fn pthread_rwlock_destroy(lock: *mut pthread_rwlock_t) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "pthread_rwlock_rdlock$UNIX2003")]
-    pub fn pthread_rwlock_rdlock(lock: *mut pthread_rwlock_t) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "pthread_rwlock_tryrdlock$UNIX2003")]
-    pub fn pthread_rwlock_tryrdlock(lock: *mut pthread_rwlock_t) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "pthread_rwlock_wrlock$UNIX2003")]
-    pub fn pthread_rwlock_wrlock(lock: *mut pthread_rwlock_t) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "pthread_rwlock_trywrlock$UNIX2003")]
-    pub fn pthread_rwlock_trywrlock(lock: *mut pthread_rwlock_t) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "pthread_rwlock_unlock$UNIX2003")]
-    pub fn pthread_rwlock_unlock(lock: *mut pthread_rwlock_t) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "pthread_sigmask$UNIX2003")]
-    pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t,
-                           oldset: *mut sigset_t) -> ::c_int;
-    pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
-    #[cfg_attr(all(target_os = "linux", not(target_env = "musl")),
-               link_name = "__xpg_strerror_r")]
-    pub fn strerror_r(errnum: ::c_int, buf: *mut c_char,
-                      buflen: ::size_t) -> ::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 raise(signum: ::c_int) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__sigaction14")]
-    pub fn sigaction(signum: ::c_int,
-                     act: *const sigaction,
-                     oldact: *mut sigaction) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "sigaltstack$UNIX2003")]
-    #[cfg_attr(target_os = "netbsd", link_name = "__sigaltstack14")]
-    pub fn sigaltstack(ss: *const stack_t,
-                       oss: *mut stack_t) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch ="x86"),
-               link_name = "sigwait$UNIX2003")]
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_sigwait")]
-    pub fn sigwait(set: *const sigset_t,
-                   sig: *mut ::c_int) -> ::c_int;
-
-    #[cfg_attr(target_os = "netbsd", link_name = "__utimes50")]
-    pub fn utimes(filename: *const ::c_char,
-                  times: *const ::timeval) -> ::c_int;
-    pub fn dlopen(filename: *const ::c_char,
-                  flag: ::c_int) -> *mut ::c_void;
-    pub fn dlerror() -> *mut ::c_char;
-    pub fn dlsym(handle: *mut ::c_void,
-                 symbol: *const ::c_char) -> *mut ::c_void;
-    pub fn dlclose(handle: *mut ::c_void) -> ::c_int;
-    pub fn dladdr(addr: *const ::c_void, info: *mut Dl_info) -> ::c_int;
-
-    pub fn getaddrinfo(node: *const c_char,
-                       service: *const c_char,
-                       hints: *const addrinfo,
-                       res: *mut *mut addrinfo) -> ::c_int;
-    pub fn freeaddrinfo(res: *mut addrinfo);
-    pub fn gai_strerror(errcode: ::c_int) -> *const ::c_char;
-    #[cfg_attr(any(
-                   all(target_os = "linux", not(target_env = "musl")),
-                   target_os = "freebsd",
-                   target_os = "dragonfly"),
-               link_name = "__res_init")]
-    #[cfg_attr(any(target_os = "macos", target_os = "ios"),
-               link_name = "res_9_init")]
-    pub fn res_init() -> ::c_int;
-
-    #[cfg_attr(target_os = "netbsd", link_name = "__gmtime_r50")]
-    pub fn gmtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm;
-    #[cfg_attr(target_os = "netbsd", link_name = "__localtime_r50")]
-    pub fn localtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "mktime$UNIX2003")]
-    #[cfg_attr(target_os = "netbsd", link_name = "__mktime50")]
-    pub fn mktime(tm: *mut tm) -> time_t;
-    #[cfg_attr(target_os = "netbsd", link_name = "__time50")]
-    pub fn time(time: *mut time_t) -> time_t;
-    #[cfg_attr(target_os = "netbsd", link_name = "__gmtime50")]
-    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 = "__mknod50")]
-    pub fn mknod(pathname: *const ::c_char, mode: ::mode_t,
-                 dev: ::dev_t) -> ::c_int;
-    pub fn uname(buf: *mut ::utsname) -> ::c_int;
-    pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
-    pub fn gethostname(name: *mut ::c_char, len: ::size_t) -> ::c_int;
-    pub fn chroot(name: *const ::c_char) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "usleep$UNIX2003")]
-    pub fn usleep(secs: ::c_uint) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "send$UNIX2003")]
-    pub fn send(socket: ::c_int, buf: *const ::c_void, len: ::size_t,
-                flags: ::c_int) -> ::ssize_t;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "recv$UNIX2003")]
-    pub fn recv(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
-                flags: ::c_int) -> ::ssize_t;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "putenv$UNIX2003")]
-    #[cfg_attr(target_os = "netbsd", link_name = "__putenv50")]
-    pub fn putenv(string: *mut c_char) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "poll$UNIX2003")]
-    pub fn poll(fds: *mut pollfd, nfds: nfds_t, timeout: ::c_int) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"),
-               link_name = "select$1050")]
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "select$UNIX2003")]
-    #[cfg_attr(target_os = "netbsd", link_name = "__select50")]
-    pub fn select(nfds: ::c_int,
-                  readfs: *mut fd_set,
-                  writefds: *mut fd_set,
-                  errorfds: *mut fd_set,
-                  timeout: *mut timeval) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__setlocale50")]
-    pub fn setlocale(category: ::c_int,
-                     locale: *const ::c_char) -> *mut ::c_char;
-    pub fn localeconv() -> *mut lconv;
-
-    pub fn sem_destroy(sem: *mut sem_t) -> ::c_int;
-    pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t;
-    pub fn sem_close(sem: *mut sem_t) -> ::c_int;
-    pub fn sem_unlink(name: *const ::c_char) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "sem_wait$UNIX2003")]
-    pub fn sem_wait(sem: *mut sem_t) -> ::c_int;
-    pub fn sem_trywait(sem: *mut sem_t) -> ::c_int;
-    pub fn sem_post(sem: *mut sem_t) -> ::c_int;
-    pub fn sem_init(sem: *mut sem_t,
-                    pshared: ::c_int,
-                    value: ::c_uint)
-                    -> ::c_int;
-    pub fn statvfs(path: *const c_char, buf: *mut statvfs) -> ::c_int;
-    pub fn fstatvfs(fd: ::c_int, buf: *mut statvfs) -> ::c_int;
-
-    pub fn readlink(path: *const c_char,
-                    buf: *mut c_char,
-                    bufsz: ::size_t)
-                    -> ::ssize_t;
-
-    #[cfg_attr(target_os = "netbsd", link_name = "__sigemptyset14")]
-    pub fn sigemptyset(set: *mut sigset_t) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__sigaddset14")]
-    pub fn sigaddset(set: *mut sigset_t, signum: ::c_int) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__sigfillset14")]
-    pub fn sigfillset(set: *mut sigset_t) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__sigdelset14")]
-    pub fn sigdelset(set: *mut sigset_t, signum: ::c_int) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__sigismember14")]
-    pub fn sigismember(set: *const sigset_t, signum: ::c_int) -> ::c_int;
-
-    #[cfg_attr(target_os = "netbsd", link_name = "__sigprocmask14")]
-    pub fn sigprocmask(how: ::c_int,
-                       set: *const sigset_t,
-                       oldset: *mut sigset_t)
-                       -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__sigpending14")]
-    pub fn sigpending(set: *mut sigset_t) -> ::c_int;
-
-    #[cfg_attr(target_os = "netbsd", link_name = "__timegm50")]
-    pub fn timegm(tm: *mut ::tm) -> time_t;
-
-    pub fn getsid(pid: pid_t) -> pid_t;
-
-    pub fn sysconf(name: ::c_int) -> ::c_long;
-
-    pub fn mkfifo(path: *const c_char, mode: mode_t) -> ::c_int;
-
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"),
-               link_name = "pselect$1050")]
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "pselect$UNIX2003")]
-    #[cfg_attr(target_os = "netbsd", link_name = "__pselect50")]
-    pub fn pselect(nfds: ::c_int,
-                   readfs: *mut fd_set,
-                   writefds: *mut fd_set,
-                   errorfds: *mut fd_set,
-                   timeout: *const timespec,
-                   sigmask: *const sigset_t) -> ::c_int;
-    pub fn fseeko(stream: *mut ::FILE,
-                  offset: ::off_t,
-                  whence: ::c_int) -> ::c_int;
-    pub fn ftello(stream: *mut ::FILE) -> ::off_t;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "tcdrain$UNIX2003")]
-    pub fn tcdrain(fd: ::c_int) -> ::c_int;
-    pub fn cfgetispeed(termios: *const ::termios) -> ::speed_t;
-    pub fn cfgetospeed(termios: *const ::termios) -> ::speed_t;
-    pub fn cfmakeraw(termios: *mut ::termios);
-    pub fn cfsetispeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int;
-    pub fn cfsetospeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int;
-    pub fn cfsetspeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int;
-    pub fn tcgetattr(fd: ::c_int, termios: *mut ::termios) -> ::c_int;
-    pub fn tcsetattr(fd: ::c_int,
-                     optional_actions: ::c_int,
-                     termios: *const ::termios) -> ::c_int;
-    pub fn tcflow(fd: ::c_int, action: ::c_int) -> ::c_int;
-    pub fn tcflush(fd: ::c_int, action: ::c_int) -> ::c_int;
-    pub fn tcsendbreak(fd: ::c_int, duration: ::c_int) -> ::c_int;
-    pub fn mkstemp(template: *mut ::c_char) -> ::c_int;
-    pub fn mkdtemp(template: *mut ::c_char) -> *mut ::c_char;
-
-    pub fn tmpnam(ptr: *mut ::c_char) -> *mut ::c_char;
-
-    pub fn openlog(ident: *const ::c_char, logopt: ::c_int, facility: ::c_int);
-    pub fn closelog();
-    pub fn setlogmask(maskpri: ::c_int) -> ::c_int;
-    pub fn syslog(priority: ::c_int, message: *const ::c_char, ...);
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "nice$UNIX2003")]
-    pub fn nice(incr: ::c_int) -> ::c_int;
-
-    pub fn grantpt(fd: ::c_int) -> ::c_int;
-    pub fn posix_openpt(flags: ::c_int) -> ::c_int;
-    pub fn ptsname(fd: ::c_int) -> *mut ::c_char;
-    pub fn unlockpt(fd: ::c_int) -> ::c_int;
-}
-
-cfg_if! {
-    if #[cfg(target_env = "uclibc")] {
-        mod uclibc;
-        pub use self::uclibc::*;
-    } else if #[cfg(any(target_os = "linux",
-                        target_os = "android",
-                        target_os = "emscripten",
-                        target_os = "fuchsia"))] {
-        mod notbsd;
-        pub use self::notbsd::*;
-    } else if #[cfg(any(target_os = "macos",
-                        target_os = "ios",
-                        target_os = "freebsd",
-                        target_os = "dragonfly",
-                        target_os = "openbsd",
-                        target_os = "netbsd",
-                        target_os = "bitrig"))] {
-        mod bsd;
-        pub use self::bsd::*;
-    } else if #[cfg(target_os = "solaris")] {
-        mod solaris;
-        pub use self::solaris::*;
-    } else if #[cfg(target_os = "haiku")] {
-        mod haiku;
-        pub use self::haiku::*;
-    } else {
-        // Unknown target_os
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/android/b32/arm.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-pub type c_char = u8;
-pub type wchar_t = u32;
-
-pub const O_DIRECT: ::c_int = 0x10000;
-pub const O_DIRECTORY: ::c_int = 0x4000;
-pub const O_NOFOLLOW: ::c_int = 0x8000;
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/android/b32/mod.rs
+++ /dev/null
@@ -1,199 +0,0 @@
-// The following definitions are correct for arm and i686,
-// but may be wrong for mips
-
-pub type c_long = i32;
-pub type c_ulong = u32;
-pub type mode_t = u16;
-pub type off64_t = ::c_longlong;
-pub type sigset_t = ::c_ulong;
-pub type socklen_t = i32;
-pub type time64_t = i64;
-
-s! {
-    pub struct sigaction {
-        pub sa_sigaction: ::sighandler_t,
-        pub sa_mask: ::sigset_t,
-        pub sa_flags: ::c_ulong,
-        pub sa_restorer: ::dox::Option<extern fn()>,
-    }
-
-    pub struct rlimit64 {
-        pub rlim_cur: u64,
-        pub rlim_max: u64,
-    }
-
-    pub struct stat {
-        pub st_dev: ::c_ulonglong,
-        __pad0: [::c_uchar; 4],
-        __st_ino: ::ino_t,
-        pub st_mode: ::c_uint,
-        pub st_nlink: ::c_uint,
-        pub st_uid: ::uid_t,
-        pub st_gid: ::gid_t,
-        pub st_rdev: ::c_ulonglong,
-        __pad3: [::c_uchar; 4],
-        pub st_size: ::c_longlong,
-        pub st_blksize: ::blksize_t,
-        pub st_blocks: ::c_ulonglong,
-        pub st_atime: ::c_ulong,
-        pub st_atime_nsec: ::c_ulong,
-        pub st_mtime: ::c_ulong,
-        pub st_mtime_nsec: ::c_ulong,
-        pub st_ctime: ::c_ulong,
-        pub st_ctime_nsec: ::c_ulong,
-        pub st_ino: ::c_ulonglong,
-    }
-
-    pub struct stat64 {
-        pub st_dev: ::c_ulonglong,
-        __pad0: [::c_uchar; 4],
-        __st_ino: ::ino_t,
-        pub st_mode: ::c_uint,
-        pub st_nlink: ::c_uint,
-        pub st_uid: ::uid_t,
-        pub st_gid: ::gid_t,
-        pub st_rdev: ::c_ulonglong,
-        __pad3: [::c_uchar; 4],
-        pub st_size: ::c_longlong,
-        pub st_blksize: ::blksize_t,
-        pub st_blocks: ::c_ulonglong,
-        pub st_atime: ::c_ulong,
-        pub st_atime_nsec: ::c_ulong,
-        pub st_mtime: ::c_ulong,
-        pub st_mtime_nsec: ::c_ulong,
-        pub st_ctime: ::c_ulong,
-        pub st_ctime_nsec: ::c_ulong,
-        pub st_ino: ::c_ulonglong,
-    }
-
-    pub struct pthread_attr_t {
-        pub flags: ::uint32_t,
-        pub stack_base: *mut ::c_void,
-        pub stack_size: ::size_t,
-        pub guard_size: ::size_t,
-        pub sched_policy: ::int32_t,
-        pub sched_priority: ::int32_t,
-    }
-
-    pub struct pthread_mutex_t { value: ::c_int }
-
-    pub struct pthread_cond_t { value: ::c_int }
-
-    pub struct pthread_rwlock_t {
-        lock: pthread_mutex_t,
-        cond: pthread_cond_t,
-        numLocks: ::c_int,
-        writerThreadId: ::c_int,
-        pendingReaders: ::c_int,
-        pendingWriters: ::c_int,
-        attr: i32,
-        __reserved: [::c_char; 12],
-    }
-
-    pub struct passwd {
-        pub pw_name: *mut ::c_char,
-        pub pw_passwd: *mut ::c_char,
-        pub pw_uid: ::uid_t,
-        pub pw_gid: ::gid_t,
-        pub pw_dir: *mut ::c_char,
-        pub pw_shell: *mut ::c_char,
-    }
-
-    pub struct statfs {
-        pub f_type: ::uint32_t,
-        pub f_bsize: ::uint32_t,
-        pub f_blocks: ::uint64_t,
-        pub f_bfree: ::uint64_t,
-        pub f_bavail: ::uint64_t,
-        pub f_files: ::uint64_t,
-        pub f_ffree: ::uint64_t,
-        pub f_fsid: ::__fsid_t,
-        pub f_namelen: ::uint32_t,
-        pub f_frsize: ::uint32_t,
-        pub f_flags: ::uint32_t,
-        pub f_spare: [::uint32_t; 4],
-    }
-
-    pub struct sysinfo {
-        pub uptime: ::c_long,
-        pub loads: [::c_ulong; 3],
-        pub totalram: ::c_ulong,
-        pub freeram: ::c_ulong,
-        pub sharedram: ::c_ulong,
-        pub bufferram: ::c_ulong,
-        pub totalswap: ::c_ulong,
-        pub freeswap: ::c_ulong,
-        pub procs: ::c_ushort,
-        pub pad: ::c_ushort,
-        pub totalhigh: ::c_ulong,
-        pub freehigh: ::c_ulong,
-        pub mem_unit: ::c_uint,
-        pub _f: [::c_char; 8],
-    }
-}
-
-pub const RTLD_GLOBAL: ::c_int = 2;
-pub const RTLD_NOW: ::c_int = 0;
-pub const RTLD_DEFAULT: *mut ::c_void = -1isize as *mut ::c_void;
-
-pub const PTRACE_GETFPREGS: ::c_int = 14;
-pub const PTRACE_SETFPREGS: ::c_int = 15;
-pub const PTRACE_GETREGS: ::c_int = 12;
-pub const PTRACE_SETREGS: ::c_int = 13;
-
-pub const SYS_gettid: ::c_long = 224;
-pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
-    value: 0,
-};
-pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
-    value: 0,
-};
-pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
-    lock: PTHREAD_MUTEX_INITIALIZER,
-    cond: PTHREAD_COND_INITIALIZER,
-    numLocks: 0,
-    writerThreadId: 0,
-    pendingReaders: 0,
-    pendingWriters: 0,
-    attr: 0,
-    __reserved: [0; 12],
-};
-pub const PTHREAD_STACK_MIN: ::size_t = 4096 * 2;
-pub const CPU_SETSIZE: ::size_t = 32;
-pub const __CPU_BITS: ::size_t = 32;
-
-pub const UT_LINESIZE: usize = 8;
-pub const UT_NAMESIZE: usize = 8;
-pub const UT_HOSTSIZE: usize = 16;
-
-extern {
-    pub fn bind(socket: ::c_int, address: *const ::sockaddr,
-                address_len: socklen_t) -> ::c_int;
-
-    pub fn writev(fd: ::c_int,
-                  iov: *const ::iovec,
-                  iovcnt: ::c_int) -> ::ssize_t;
-    pub fn readv(fd: ::c_int,
-                 iov: *const ::iovec,
-                 iovcnt: ::c_int) -> ::ssize_t;
-
-    pub fn sendmsg(fd: ::c_int,
-                   msg: *const ::msghdr,
-                   flags: ::c_int) -> ::ssize_t;
-    pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
-                   -> ::ssize_t;
-
-    pub fn timegm64(tm: *const ::tm) -> ::time64_t;
-}
-
-cfg_if! {
-    if #[cfg(target_arch = "x86")] {
-        mod x86;
-        pub use self::x86::*;
-    } else if #[cfg(target_arch = "arm")] {
-        mod arm;
-        pub use self::arm::*;
-    } else {
-        // Unknown target_arch
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/android/b32/x86.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-pub type c_char = i8;
-pub type wchar_t = i32;
-
-pub const O_DIRECT: ::c_int = 0x4000;
-pub const O_DIRECTORY: ::c_int = 0x10000;
-pub const O_NOFOLLOW: ::c_int = 0x20000;
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/android/b64/aarch64.rs
+++ /dev/null
@@ -1,56 +0,0 @@
-pub type c_char = u8;
-pub type wchar_t = u32;
-
-s! {
-    pub struct stat {
-        pub st_dev: ::dev_t,
-        pub st_ino: ::ino_t,
-        pub st_mode: ::c_uint,
-        pub st_nlink: ::c_uint,
-        pub st_uid: ::uid_t,
-        pub st_gid: ::gid_t,
-        pub st_rdev: ::dev_t,
-        __pad1: ::c_ulong,
-        pub st_size: ::off64_t,
-        pub st_blksize: ::c_int,
-        __pad2: ::c_int,
-        pub st_blocks: ::c_long,
-        pub st_atime: ::time_t,
-        pub st_atime_nsec: ::c_ulong,
-        pub st_mtime: ::time_t,
-        pub st_mtime_nsec: ::c_ulong,
-        pub st_ctime: ::time_t,
-        pub st_ctime_nsec: ::c_ulong,
-        __unused4: ::c_uint,
-        __unused5: ::c_uint,
-    }
-
-    pub struct stat64 {
-        pub st_dev: ::dev_t,
-        pub st_ino: ::ino_t,
-        pub st_mode: ::c_uint,
-        pub st_nlink: ::c_uint,
-        pub st_uid: ::uid_t,
-        pub st_gid: ::gid_t,
-        pub st_rdev: ::dev_t,
-        __pad1: ::c_ulong,
-        pub st_size: ::off64_t,
-        pub st_blksize: ::c_int,
-        __pad2: ::c_int,
-        pub st_blocks: ::c_long,
-        pub st_atime: ::time_t,
-        pub st_atime_nsec: ::c_ulong,
-        pub st_mtime: ::time_t,
-        pub st_mtime_nsec: ::c_ulong,
-        pub st_ctime: ::time_t,
-        pub st_ctime_nsec: ::c_ulong,
-        __unused4: ::c_uint,
-        __unused5: ::c_uint,
-    }
-}
-
-pub const O_DIRECT: ::c_int = 0x10000;
-pub const O_DIRECTORY: ::c_int = 0x4000;
-pub const O_NOFOLLOW: ::c_int = 0x8000;
-
-pub const SYS_gettid: ::c_long = 178;
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/android/b64/mod.rs
+++ /dev/null
@@ -1,162 +0,0 @@
-// The following definitions are correct for aarch64 and x86_64,
-// but may be wrong for mips64
-
-pub type c_long = i64;
-pub type c_ulong = u64;
-pub type mode_t = u32;
-pub type off64_t = i64;
-pub type socklen_t = u32;
-
-s! {
-    pub struct sigset_t {
-        __val: [::c_ulong; 1],
-    }
-
-    pub struct sigaction {
-        pub sa_flags: ::c_uint,
-        pub sa_sigaction: ::sighandler_t,
-        pub sa_mask: ::sigset_t,
-        pub sa_restorer: ::dox::Option<extern fn()>,
-    }
-
-    pub struct rlimit64 {
-        pub rlim_cur: ::c_ulonglong,
-        pub rlim_max: ::c_ulonglong,
-    }
-
-    pub struct pthread_attr_t {
-        pub flags: ::uint32_t,
-        pub stack_base: *mut ::c_void,
-        pub stack_size: ::size_t,
-        pub guard_size: ::size_t,
-        pub sched_policy: ::int32_t,
-        pub sched_priority: ::int32_t,
-        __reserved: [::c_char; 16],
-    }
-
-    pub struct pthread_mutex_t {
-        value: ::c_int,
-        __reserved: [::c_char; 36],
-    }
-
-    pub struct pthread_cond_t {
-        value: ::c_int,
-        __reserved: [::c_char; 44],
-    }
-
-    pub struct pthread_rwlock_t {
-        numLocks: ::c_int,
-        writerThreadId: ::c_int,
-        pendingReaders: ::c_int,
-        pendingWriters: ::c_int,
-        attr: i32,
-        __reserved: [::c_char; 36],
-    }
-
-    pub struct passwd {
-        pub pw_name: *mut ::c_char,
-        pub pw_passwd: *mut ::c_char,
-        pub pw_uid: ::uid_t,
-        pub pw_gid: ::gid_t,
-        pub pw_gecos: *mut ::c_char,
-        pub pw_dir: *mut ::c_char,
-        pub pw_shell: *mut ::c_char,
-    }
-
-    pub struct statfs {
-        pub f_type: ::uint64_t,
-        pub f_bsize: ::uint64_t,
-        pub f_blocks: ::uint64_t,
-        pub f_bfree: ::uint64_t,
-        pub f_bavail: ::uint64_t,
-        pub f_files: ::uint64_t,
-        pub f_ffree: ::uint64_t,
-        pub f_fsid: ::__fsid_t,
-        pub f_namelen: ::uint64_t,
-        pub f_frsize: ::uint64_t,
-        pub f_flags: ::uint64_t,
-        pub f_spare: [::uint64_t; 4],
-    }
-
-    pub struct sysinfo {
-        pub uptime: ::c_long,
-        pub loads: [::c_ulong; 3],
-        pub totalram: ::c_ulong,
-        pub freeram: ::c_ulong,
-        pub sharedram: ::c_ulong,
-        pub bufferram: ::c_ulong,
-        pub totalswap: ::c_ulong,
-        pub freeswap: ::c_ulong,
-        pub procs: ::c_ushort,
-        pub pad: ::c_ushort,
-        pub totalhigh: ::c_ulong,
-        pub freehigh: ::c_ulong,
-        pub mem_unit: ::c_uint,
-        pub _f: [::c_char; 0],
-    }
-}
-
-pub const RTLD_GLOBAL: ::c_int = 0x00100;
-pub const RTLD_NOW: ::c_int = 2;
-pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void;
-
-pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
-    value: 0,
-    __reserved: [0; 36],
-};
-pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
-    value: 0,
-    __reserved: [0; 44],
-};
-pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
-    numLocks: 0,
-    writerThreadId: 0,
-    pendingReaders: 0,
-    pendingWriters: 0,
-    attr: 0,
-    __reserved: [0; 36],
-};
-pub const PTHREAD_STACK_MIN: ::size_t = 4096 * 4;
-pub const CPU_SETSIZE: ::size_t = 1024;
-pub const __CPU_BITS: ::size_t = 64;
-
-pub const UT_LINESIZE: usize = 32;
-pub const UT_NAMESIZE: usize = 32;
-pub const UT_HOSTSIZE: usize = 256;
-
-// Some weirdness in Android
-extern {
-    // address_len should be socklen_t, but it is c_int!
-    pub fn bind(socket: ::c_int, address: *const ::sockaddr,
-                address_len: ::c_int) -> ::c_int;
-
-    // the return type should be ::ssize_t, but it is c_int!
-    pub fn writev(fd: ::c_int,
-                  iov: *const ::iovec,
-                  iovcnt: ::c_int) -> ::c_int;
-
-    // the return type should be ::ssize_t, but it is c_int!
-    pub fn readv(fd: ::c_int,
-                 iov: *const ::iovec,
-                 iovcnt: ::c_int) -> ::c_int;
-
-    // the return type should be ::ssize_t, but it is c_int!
-    pub fn sendmsg(fd: ::c_int,
-                   msg: *const ::msghdr,
-                   flags: ::c_int) -> ::c_int;
-
-    // the return type should be ::ssize_t, but it is c_int!
-    pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int) -> ::c_int;
-}
-
-cfg_if! {
-    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
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/android/b64/x86_64.rs
+++ /dev/null
@@ -1,50 +0,0 @@
-pub type c_char = i8;
-pub type wchar_t = i32;
-
-s! {
-    pub struct stat {
-        pub st_dev: ::dev_t,
-        pub st_ino: ::ino_t,
-        pub st_nlink: ::c_ulong,
-        pub st_mode: ::c_uint,
-        pub st_uid: ::uid_t,
-        pub st_gid: ::gid_t,
-        pub st_rdev: ::dev_t,
-        pub st_size: ::off64_t,
-        pub st_blksize: ::c_long,
-        pub st_blocks: ::c_long,
-        pub st_atime: ::c_ulong,
-        pub st_atime_nsec: ::c_ulong,
-        pub st_mtime: ::c_ulong,
-        pub st_mtime_nsec: ::c_ulong,
-        pub st_ctime: ::c_ulong,
-        pub st_ctime_nsec: ::c_ulong,
-        __unused: [::c_long; 3],
-    }
-
-    pub struct stat64 {
-        pub st_dev: ::dev_t,
-        pub st_ino: ::ino_t,
-        pub st_nlink: ::c_ulong,
-        pub st_mode: ::c_uint,
-        pub st_uid: ::uid_t,
-        pub st_gid: ::gid_t,
-        pub st_rdev: ::dev_t,
-        pub st_size: ::off64_t,
-        pub st_blksize: ::c_long,
-        pub st_blocks: ::c_long,
-        pub st_atime: ::c_ulong,
-        pub st_atime_nsec: ::c_ulong,
-        pub st_mtime: ::c_ulong,
-        pub st_mtime_nsec: ::c_ulong,
-        pub st_ctime: ::c_ulong,
-        pub st_ctime_nsec: ::c_ulong,
-        __unused: [::c_long; 3],
-    }
-}
-
-pub const O_DIRECT: ::c_int = 0x4000;
-pub const O_DIRECTORY: ::c_int = 0x10000;
-pub const O_NOFOLLOW: ::c_int = 0x20000;
-
-pub const SYS_gettid: ::c_long = 186;
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/android/mod.rs
+++ /dev/null
@@ -1,818 +0,0 @@
-//! Android-specific definitions for linux-like values
-
-use dox::mem;
-
-pub type clock_t = ::c_long;
-pub type time_t = ::c_long;
-pub type suseconds_t = ::c_long;
-pub type off_t = ::c_long;
-pub type blkcnt_t = ::c_ulong;
-pub type blksize_t = ::c_ulong;
-pub type nlink_t = u32;
-pub type useconds_t = u32;
-pub type pthread_t = ::c_long;
-pub type pthread_mutexattr_t = ::c_long;
-pub type pthread_condattr_t = ::c_long;
-pub type fsfilcnt_t = ::c_ulong;
-pub type fsblkcnt_t = ::c_ulong;
-pub type nfds_t = ::c_uint;
-pub type rlim_t = ::c_ulong;
-pub type dev_t = ::c_ulong;
-pub type ino_t = ::c_ulong;
-pub type __CPU_BITTYPE = ::c_ulong;
-pub type idtype_t = ::c_int;
-
-s! {
-    pub struct dirent {
-        pub d_ino: u64,
-        pub d_off: i64,
-        pub d_reclen: ::c_ushort,
-        pub d_type: ::c_uchar,
-        pub d_name: [::c_char; 256],
-    }
-
-    pub struct dirent64 {
-        pub d_ino: u64,
-        pub d_off: i64,
-        pub d_reclen: ::c_ushort,
-        pub d_type: ::c_uchar,
-        pub d_name: [::c_char; 256],
-    }
-
-    pub struct stack_t {
-        pub ss_sp: *mut ::c_void,
-        pub ss_flags: ::c_int,
-        pub ss_size: ::size_t
-    }
-
-    pub struct siginfo_t {
-        pub si_signo: ::c_int,
-        pub si_errno: ::c_int,
-        pub si_code: ::c_int,
-        pub _pad: [::c_int; 29],
-        _align: [usize; 0],
-    }
-
-    pub struct __fsid_t {
-        __val: [::c_int; 2],
-    }
-
-    pub struct msghdr {
-        pub msg_name: *mut ::c_void,
-        pub msg_namelen: ::socklen_t,
-        pub msg_iov: *mut ::iovec,
-        pub msg_iovlen: ::size_t,
-        pub msg_control: *mut ::c_void,
-        pub msg_controllen: ::size_t,
-        pub msg_flags: ::c_int,
-    }
-
-    pub struct cmsghdr {
-        pub cmsg_len: ::size_t,
-        pub cmsg_level: ::c_int,
-        pub cmsg_type: ::c_int,
-    }
-
-    pub struct termios {
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_line: ::cc_t,
-        pub c_cc: [::cc_t; ::NCCS],
-    }
-
-    pub struct flock {
-        pub l_type: ::c_short,
-        pub l_whence: ::c_short,
-        pub l_start: ::off_t,
-        pub l_len: ::off_t,
-        pub l_pid: ::pid_t,
-    }
-
-    pub struct cpu_set_t {
-        #[cfg(target_pointer_width = "64")]
-        __bits: [__CPU_BITTYPE; 16],
-        #[cfg(target_pointer_width = "32")]
-        __bits: [__CPU_BITTYPE; 1],
-    }
-
-    pub struct sem_t {
-        count: ::c_uint,
-        #[cfg(target_pointer_width = "64")]
-        __reserved: [::c_int; 3],
-    }
-
-    pub struct lastlog {
-        ll_time: ::time_t,
-        ll_line: [::c_char; UT_LINESIZE],
-        ll_host: [::c_char; UT_HOSTSIZE],
-    }
-
-    pub struct exit_status {
-        pub e_termination: ::c_short,
-        pub e_exit: ::c_short,
-    }
-
-    pub struct utmp {
-        pub ut_type: ::c_short,
-        pub ut_pid: ::pid_t,
-        pub ut_line: [::c_char; UT_LINESIZE],
-        pub ut_id: [::c_char; 4],
-
-        pub ut_user: [::c_char; UT_NAMESIZE],
-        pub ut_host: [::c_char; UT_HOSTSIZE],
-        pub ut_exit: exit_status,
-        pub ut_session: ::c_long,
-        pub ut_tv: ::timeval,
-
-        pub ut_addr_v6: [::int32_t; 4],
-        unused: [::c_char; 20],
-    }
-
-    pub struct statvfs {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_files: ::fsfilcnt_t,
-        pub f_ffree: ::fsfilcnt_t,
-        pub f_favail: ::fsfilcnt_t,
-        pub f_fsid: ::c_ulong,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-        #[cfg(target_pointer_width = "64")]
-        __f_reserved: [u32; 6],
-    }
-}
-
-pub const O_TRUNC: ::c_int = 512;
-
-pub const O_CLOEXEC: ::c_int = 0x80000;
-
-pub const EBFONT: ::c_int = 59;
-pub const ENOSTR: ::c_int = 60;
-pub const ENODATA: ::c_int = 61;
-pub const ETIME: ::c_int = 62;
-pub const ENOSR: ::c_int = 63;
-pub const ENONET: ::c_int = 64;
-pub const ENOPKG: ::c_int = 65;
-pub const EREMOTE: ::c_int = 66;
-pub const ENOLINK: ::c_int = 67;
-pub const EADV: ::c_int = 68;
-pub const ESRMNT: ::c_int = 69;
-pub const ECOMM: ::c_int = 70;
-pub const EPROTO: ::c_int = 71;
-pub const EDOTDOT: ::c_int = 73;
-
-pub const SA_NODEFER: ::c_int = 0x40000000;
-pub const SA_RESETHAND: ::c_int = 0x80000000;
-pub const SA_RESTART: ::c_int = 0x10000000;
-pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
-
-pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
-pub const EPOLLONESHOT: ::c_int = 0x40000000;
-
-pub const EFD_CLOEXEC: ::c_int = 0x80000;
-
-pub const USER_PROCESS: ::c_short = 7;
-
-pub const BUFSIZ: ::c_uint = 1024;
-pub const FILENAME_MAX: ::c_uint = 1024;
-pub const FOPEN_MAX: ::c_uint = 20;
-pub const POSIX_FADV_DONTNEED: ::c_int = 4;
-pub const POSIX_FADV_NOREUSE: ::c_int = 5;
-pub const L_tmpnam: ::c_uint = 1024;
-pub const TMP_MAX: ::c_uint = 308915776;
-pub const _PC_LINK_MAX: ::c_int = 1;
-pub const _PC_MAX_CANON: ::c_int = 2;
-pub const _PC_MAX_INPUT: ::c_int = 3;
-pub const _PC_NAME_MAX: ::c_int = 4;
-pub const _PC_PATH_MAX: ::c_int = 5;
-pub const _PC_PIPE_BUF: ::c_int = 6;
-pub const _PC_CHOWN_RESTRICTED: ::c_int = 14;
-pub const _PC_NO_TRUNC: ::c_int = 15;
-pub const _PC_VDISABLE: ::c_int = 16;
-
-pub const FIONBIO: ::c_int = 0x5421;
-
-pub const _SC_ARG_MAX: ::c_int = 0;
-pub const _SC_BC_BASE_MAX: ::c_int = 1;
-pub const _SC_BC_DIM_MAX: ::c_int = 2;
-pub const _SC_BC_SCALE_MAX: ::c_int = 3;
-pub const _SC_BC_STRING_MAX: ::c_int = 4;
-pub const _SC_CHILD_MAX: ::c_int = 5;
-pub const _SC_CLK_TCK: ::c_int = 6;
-pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 7;
-pub const _SC_EXPR_NEST_MAX: ::c_int = 8;
-pub const _SC_LINE_MAX: ::c_int = 9;
-pub const _SC_NGROUPS_MAX: ::c_int = 10;
-pub const _SC_OPEN_MAX: ::c_int = 11;
-pub const _SC_2_C_BIND: ::c_int = 13;
-pub const _SC_2_C_DEV: ::c_int = 14;
-pub const _SC_2_C_VERSION: ::c_int = 15;
-pub const _SC_2_CHAR_TERM: ::c_int = 16;
-pub const _SC_2_FORT_DEV: ::c_int = 17;
-pub const _SC_2_FORT_RUN: ::c_int = 18;
-pub const _SC_2_LOCALEDEF: ::c_int = 19;
-pub const _SC_2_SW_DEV: ::c_int = 20;
-pub const _SC_2_UPE: ::c_int = 21;
-pub const _SC_2_VERSION: ::c_int = 22;
-pub const _SC_JOB_CONTROL: ::c_int = 23;
-pub const _SC_SAVED_IDS: ::c_int = 24;
-pub const _SC_VERSION: ::c_int = 25;
-pub const _SC_RE_DUP_MAX: ::c_int = 26;
-pub const _SC_STREAM_MAX: ::c_int = 27;
-pub const _SC_TZNAME_MAX: ::c_int = 28;
-pub const _SC_XOPEN_CRYPT: ::c_int = 29;
-pub const _SC_XOPEN_ENH_I18N: ::c_int = 30;
-pub const _SC_XOPEN_SHM: ::c_int = 31;
-pub const _SC_XOPEN_VERSION: ::c_int = 32;
-pub const _SC_XOPEN_XCU_VERSION: ::c_int = 33;
-pub const _SC_XOPEN_REALTIME: ::c_int = 34;
-pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 35;
-pub const _SC_XOPEN_LEGACY: ::c_int = 36;
-pub const _SC_ATEXIT_MAX: ::c_int = 37;
-pub const _SC_IOV_MAX: ::c_int = 38;
-pub const _SC_PAGESIZE: ::c_int = 39;
-pub const _SC_PAGE_SIZE: ::c_int = 40;
-pub const _SC_XOPEN_UNIX: ::c_int = 41;
-pub const _SC_MQ_PRIO_MAX: ::c_int = 51;
-pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 71;
-pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 72;
-pub const _SC_LOGIN_NAME_MAX: ::c_int = 73;
-pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 74;
-pub const _SC_THREAD_KEYS_MAX: ::c_int = 75;
-pub const _SC_THREAD_STACK_MIN: ::c_int = 76;
-pub const _SC_THREAD_THREADS_MAX: ::c_int = 77;
-pub const _SC_TTY_NAME_MAX: ::c_int = 78;
-pub const _SC_THREADS: ::c_int = 79;
-pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 80;
-pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 81;
-pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 82;
-pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 83;
-pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 84;
-pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 85;
-pub const _SC_NPROCESSORS_ONLN: ::c_int = 97;
-
-pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
-pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
-pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
-pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
-
-pub const FIOCLEX: ::c_int = 0x5451;
-
-pub const SA_ONSTACK: ::c_ulong = 0x08000000;
-pub const SA_SIGINFO: ::c_ulong = 0x00000004;
-pub const SA_NOCLDWAIT: ::c_ulong = 0x00000002;
-pub const SIGCHLD: ::c_int = 17;
-pub const SIGBUS: ::c_int = 7;
-pub const SIGUSR1: ::c_int = 10;
-pub const SIGUSR2: ::c_int = 12;
-pub const SIGCONT: ::c_int = 18;
-pub const SIGSTOP: ::c_int = 19;
-pub const SIGTSTP: ::c_int = 20;
-pub const SIGURG: ::c_int = 23;
-pub const SIGIO: ::c_int = 29;
-pub const SIGSYS: ::c_int = 31;
-pub const SIGSTKFLT: ::c_int = 16;
-pub const SIGUNUSED: ::c_int = 31;
-pub const SIGTTIN: ::c_int = 21;
-pub const SIGTTOU: ::c_int = 22;
-pub const SIGXCPU: ::c_int = 24;
-pub const SIGXFSZ: ::c_int = 25;
-pub const SIGVTALRM: ::c_int = 26;
-pub const SIGPROF: ::c_int = 27;
-pub const SIGWINCH: ::c_int = 28;
-pub const SIGPOLL: ::c_int = 29;
-pub const SIGPWR: ::c_int = 30;
-pub const SIG_SETMASK: ::c_int = 2;
-pub const SIG_BLOCK: ::c_int = 0x000000;
-pub const SIG_UNBLOCK: ::c_int = 0x01;
-
-pub const RUSAGE_CHILDREN: ::c_int = -1;
-
-pub const LC_PAPER: ::c_int = 7;
-pub const LC_NAME: ::c_int = 8;
-pub const LC_ADDRESS: ::c_int = 9;
-pub const LC_TELEPHONE: ::c_int = 10;
-pub const LC_MEASUREMENT: ::c_int = 11;
-pub const LC_IDENTIFICATION: ::c_int = 12;
-pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
-pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
-pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
-pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
-pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
-pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
-pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
-                               | ::LC_NUMERIC_MASK
-                               | ::LC_TIME_MASK
-                               | ::LC_COLLATE_MASK
-                               | ::LC_MONETARY_MASK
-                               | ::LC_MESSAGES_MASK
-                               | LC_PAPER_MASK
-                               | LC_NAME_MASK
-                               | LC_ADDRESS_MASK
-                               | LC_TELEPHONE_MASK
-                               | LC_MEASUREMENT_MASK
-                               | LC_IDENTIFICATION_MASK;
-
-pub const MAP_ANON: ::c_int = 0x0020;
-pub const MAP_ANONYMOUS: ::c_int = 0x0020;
-pub const MAP_GROWSDOWN: ::c_int = 0x0100;
-pub const MAP_DENYWRITE: ::c_int = 0x0800;
-pub const MAP_EXECUTABLE: ::c_int = 0x01000;
-pub const MAP_LOCKED: ::c_int = 0x02000;
-pub const MAP_NORESERVE: ::c_int = 0x04000;
-pub const MAP_POPULATE: ::c_int = 0x08000;
-pub const MAP_NONBLOCK: ::c_int = 0x010000;
-pub const MAP_STACK: ::c_int = 0x020000;
-
-pub const EDEADLK: ::c_int = 35;
-pub const ENAMETOOLONG: ::c_int = 36;
-pub const ENOLCK: ::c_int = 37;
-pub const ENOSYS: ::c_int = 38;
-pub const ENOTEMPTY: ::c_int = 39;
-pub const ELOOP: ::c_int = 40;
-pub const ENOMSG: ::c_int = 42;
-pub const EIDRM: ::c_int = 43;
-pub const ECHRNG: ::c_int = 44;
-pub const EL2NSYNC: ::c_int = 45;
-pub const EL3HLT: ::c_int = 46;
-pub const EL3RST: ::c_int = 47;
-pub const ELNRNG: ::c_int = 48;
-pub const EUNATCH: ::c_int = 49;
-pub const ENOCSI: ::c_int = 50;
-pub const EL2HLT: ::c_int = 51;
-pub const EBADE: ::c_int = 52;
-pub const EBADR: ::c_int = 53;
-pub const EXFULL: ::c_int = 54;
-pub const ENOANO: ::c_int = 55;
-pub const EBADRQC: ::c_int = 56;
-pub const EBADSLT: ::c_int = 57;
-
-pub const EMULTIHOP: ::c_int = 72;
-pub const EBADMSG: ::c_int = 74;
-pub const EOVERFLOW: ::c_int = 75;
-pub const ENOTUNIQ: ::c_int = 76;
-pub const EBADFD: ::c_int = 77;
-pub const EREMCHG: ::c_int = 78;
-pub const ELIBACC: ::c_int = 79;
-pub const ELIBBAD: ::c_int = 80;
-pub const ELIBSCN: ::c_int = 81;
-pub const ELIBMAX: ::c_int = 82;
-pub const ELIBEXEC: ::c_int = 83;
-pub const EILSEQ: ::c_int = 84;
-pub const ERESTART: ::c_int = 85;
-pub const ESTRPIPE: ::c_int = 86;
-pub const EUSERS: ::c_int = 87;
-pub const ENOTSOCK: ::c_int = 88;
-pub const EDESTADDRREQ: ::c_int = 89;
-pub const EMSGSIZE: ::c_int = 90;
-pub const EPROTOTYPE: ::c_int = 91;
-pub const ENOPROTOOPT: ::c_int = 92;
-pub const EPROTONOSUPPORT: ::c_int = 93;
-pub const ESOCKTNOSUPPORT: ::c_int = 94;
-pub const EOPNOTSUPP: ::c_int = 95;
-pub const ENOTSUP: ::c_int = EOPNOTSUPP;
-pub const EPFNOSUPPORT: ::c_int = 96;
-pub const EAFNOSUPPORT: ::c_int = 97;
-pub const EADDRINUSE: ::c_int = 98;
-pub const EADDRNOTAVAIL: ::c_int = 99;
-pub const ENETDOWN: ::c_int = 100;
-pub const ENETUNREACH: ::c_int = 101;
-pub const ENETRESET: ::c_int = 102;
-pub const ECONNABORTED: ::c_int = 103;
-pub const ECONNRESET: ::c_int = 104;
-pub const ENOBUFS: ::c_int = 105;
-pub const EISCONN: ::c_int = 106;
-pub const ENOTCONN: ::c_int = 107;
-pub const ESHUTDOWN: ::c_int = 108;
-pub const ETOOMANYREFS: ::c_int = 109;
-pub const ETIMEDOUT: ::c_int = 110;
-pub const ECONNREFUSED: ::c_int = 111;
-pub const EHOSTDOWN: ::c_int = 112;
-pub const EHOSTUNREACH: ::c_int = 113;
-pub const EALREADY: ::c_int = 114;
-pub const EINPROGRESS: ::c_int = 115;
-pub const ESTALE: ::c_int = 116;
-pub const EUCLEAN: ::c_int = 117;
-pub const ENOTNAM: ::c_int = 118;
-pub const ENAVAIL: ::c_int = 119;
-pub const EISNAM: ::c_int = 120;
-pub const EREMOTEIO: ::c_int = 121;
-pub const EDQUOT: ::c_int = 122;
-pub const ENOMEDIUM: ::c_int = 123;
-pub const EMEDIUMTYPE: ::c_int = 124;
-pub const ECANCELED: ::c_int = 125;
-pub const ENOKEY: ::c_int = 126;
-pub const EKEYEXPIRED: ::c_int = 127;
-pub const EKEYREVOKED: ::c_int = 128;
-pub const EKEYREJECTED: ::c_int = 129;
-pub const EOWNERDEAD: ::c_int = 130;
-pub const ENOTRECOVERABLE: ::c_int = 131;
-
-pub const SOCK_STREAM: ::c_int = 1;
-pub const SOCK_DGRAM: ::c_int = 2;
-pub const SOCK_SEQPACKET: ::c_int = 5;
-
-pub const SOL_SOCKET: ::c_int = 1;
-pub const SOL_UDP: ::c_int = 17;
-pub const SOL_SCTP: ::c_int = 132;
-pub const SOL_IPX: ::c_int = 256;
-pub const SOL_AX25: ::c_int = 257;
-pub const SOL_ATALK: ::c_int = 258;
-pub const SOL_NETROM: ::c_int = 259;
-pub const SOL_ROSE: ::c_int = 260;
-
-#[doc(hidden)]
-pub const AF_MAX: ::c_int = 39;
-#[doc(hidden)]
-pub const PF_MAX: ::c_int = AF_MAX;
-
-pub const SO_REUSEADDR: ::c_int = 2;
-pub const SO_TYPE: ::c_int = 3;
-pub const SO_ERROR: ::c_int = 4;
-pub const SO_DONTROUTE: ::c_int = 5;
-pub const SO_BROADCAST: ::c_int = 6;
-pub const SO_SNDBUF: ::c_int = 7;
-pub const SO_RCVBUF: ::c_int = 8;
-pub const SO_KEEPALIVE: ::c_int = 9;
-pub const SO_OOBINLINE: ::c_int = 10;
-pub const SO_LINGER: ::c_int = 13;
-pub const SO_REUSEPORT: ::c_int = 15;
-pub const SO_RCVLOWAT: ::c_int = 18;
-pub const SO_SNDLOWAT: ::c_int = 19;
-pub const SO_RCVTIMEO: ::c_int = 20;
-pub const SO_SNDTIMEO: ::c_int = 21;
-pub const SO_ACCEPTCONN: ::c_int = 30;
-
-pub const O_ACCMODE: ::c_int = 3;
-pub const O_APPEND: ::c_int = 1024;
-pub const O_CREAT: ::c_int = 64;
-pub const O_EXCL: ::c_int = 128;
-pub const O_NOCTTY: ::c_int = 256;
-pub const O_NONBLOCK: ::c_int = 2048;
-pub const O_SYNC: ::c_int = 0x101000;
-pub const O_ASYNC: ::c_int = 0x2000;
-pub const O_NDELAY: ::c_int = 0x800;
-
-pub const NI_MAXHOST: ::size_t = 1025;
-
-pub const NCCS: usize = 19;
-pub const TCSBRKP: ::c_int = 0x5425;
-pub const TCSANOW: ::c_int = 0;
-pub const TCSADRAIN: ::c_int = 0x1;
-pub const TCSAFLUSH: ::c_int = 0x2;
-pub const VEOF: usize = 4;
-pub const VEOL: usize = 11;
-pub const VEOL2: usize = 16;
-pub const VMIN: usize = 6;
-pub const IEXTEN: ::tcflag_t = 0x00008000;
-pub const TOSTOP: ::tcflag_t = 0x00000100;
-pub const FLUSHO: ::tcflag_t = 0x00001000;
-
-pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;
-pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff;
-pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245;
-pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45;
-pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53;
-pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53;
-pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53;
-pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53;
-pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849;
-pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6;
-pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660;
-pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6;
-pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f;
-pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f;
-pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468;
-pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478;
-pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44;
-pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c;
-pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969;
-pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1;
-pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0;
-pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f;
-pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973;
-pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b;
-pub const TMPFS_MAGIC: ::c_long = 0x01021994;
-pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2;
-
-pub const MADV_HUGEPAGE: ::c_int = 14;
-pub const MADV_NOHUGEPAGE: ::c_int = 15;
-pub const MAP_HUGETLB: ::c_int = 0x040000;
-
-pub const PTRACE_TRACEME: ::c_int = 0;
-pub const PTRACE_PEEKTEXT: ::c_int = 1;
-pub const PTRACE_PEEKDATA: ::c_int = 2;
-pub const PTRACE_PEEKUSER: ::c_int = 3;
-pub const PTRACE_POKETEXT: ::c_int = 4;
-pub const PTRACE_POKEDATA: ::c_int = 5;
-pub const PTRACE_POKEUSER: ::c_int = 6;
-pub const PTRACE_CONT: ::c_int = 7;
-pub const PTRACE_KILL: ::c_int = 8;
-pub const PTRACE_SINGLESTEP: ::c_int = 9;
-pub const PTRACE_ATTACH: ::c_int = 16;
-pub const PTRACE_DETACH: ::c_int = 17;
-pub const PTRACE_SYSCALL: ::c_int = 24;
-pub const PTRACE_SETOPTIONS: ::c_int = 0x4200;
-pub const PTRACE_GETEVENTMSG: ::c_int = 0x4201;
-pub const PTRACE_GETSIGINFO: ::c_int = 0x4202;
-pub const PTRACE_SETSIGINFO: ::c_int = 0x4203;
-
-pub const EFD_NONBLOCK: ::c_int = 0x800;
-
-pub const F_GETLK: ::c_int = 5;
-pub const F_GETOWN: ::c_int = 9;
-pub const F_SETOWN: ::c_int = 8;
-pub const F_SETLK: ::c_int = 6;
-pub const F_SETLKW: ::c_int = 7;
-
-pub const TCGETS: ::c_int = 0x5401;
-pub const TCSETS: ::c_int = 0x5402;
-pub const TCSETSW: ::c_int = 0x5403;
-pub const TCSETSF: ::c_int = 0x5404;
-pub const TCGETA: ::c_int = 0x5405;
-pub const TCSETA: ::c_int = 0x5406;
-pub const TCSETAW: ::c_int = 0x5407;
-pub const TCSETAF: ::c_int = 0x5408;
-pub const TCSBRK: ::c_int = 0x5409;
-pub const TCXONC: ::c_int = 0x540A;
-pub const TCFLSH: ::c_int = 0x540B;
-pub const TIOCGSOFTCAR: ::c_int = 0x5419;
-pub const TIOCSSOFTCAR: ::c_int = 0x541A;
-pub const TIOCINQ: ::c_int = 0x541B;
-pub const TIOCLINUX: ::c_int = 0x541C;
-pub const TIOCGSERIAL: ::c_int = 0x541E;
-pub const TIOCEXCL: ::c_int = 0x540C;
-pub const TIOCNXCL: ::c_int = 0x540D;
-pub const TIOCSCTTY: ::c_int = 0x540E;
-pub const TIOCGPGRP: ::c_int = 0x540F;
-pub const TIOCSPGRP: ::c_int = 0x5410;
-pub const TIOCOUTQ: ::c_int = 0x5411;
-pub const TIOCSTI: ::c_int = 0x5412;
-pub const TIOCGWINSZ: ::c_int = 0x5413;
-pub const TIOCSWINSZ: ::c_int = 0x5414;
-pub const TIOCMGET: ::c_int = 0x5415;
-pub const TIOCMBIS: ::c_int = 0x5416;
-pub const TIOCMBIC: ::c_int = 0x5417;
-pub const TIOCMSET: ::c_int = 0x5418;
-pub const FIONREAD: ::c_int = 0x541B;
-pub const TIOCCONS: ::c_int = 0x541D;
-
-pub const RTLD_NOLOAD: ::c_int = 0x4;
-
-pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t;
-
-pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
-pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
-pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
-pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
-pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
-
-pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
-pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
-pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
-pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
-pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
-pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
-pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
-pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
-
-pub const MCL_CURRENT: ::c_int = 0x0001;
-pub const MCL_FUTURE: ::c_int = 0x0002;
-
-pub const SIGSTKSZ: ::size_t = 8192;
-pub const MINSIGSTKSZ: ::size_t = 2048;
-pub const CBAUD: ::tcflag_t = 0o0010017;
-pub const TAB1: ::c_int = 0x00000800;
-pub const TAB2: ::c_int = 0x00001000;
-pub const TAB3: ::c_int = 0x00001800;
-pub const CR1: ::c_int  = 0x00000200;
-pub const CR2: ::c_int  = 0x00000400;
-pub const CR3: ::c_int  = 0x00000600;
-pub const FF1: ::c_int  = 0x00008000;
-pub const BS1: ::c_int  = 0x00002000;
-pub const VT1: ::c_int  = 0x00004000;
-pub const VWERASE: usize = 14;
-pub const VREPRINT: usize = 12;
-pub const VSUSP: usize = 10;
-pub const VSTART: usize = 8;
-pub const VSTOP: usize = 9;
-pub const VDISCARD: usize = 13;
-pub const VTIME: usize = 5;
-pub const IXON: ::tcflag_t = 0x00000400;
-pub const IXOFF: ::tcflag_t = 0x00001000;
-pub const ONLCR: ::tcflag_t = 0x4;
-pub const CSIZE: ::tcflag_t = 0x00000030;
-pub const CS6: ::tcflag_t = 0x00000010;
-pub const CS7: ::tcflag_t = 0x00000020;
-pub const CS8: ::tcflag_t = 0x00000030;
-pub const CSTOPB: ::tcflag_t = 0x00000040;
-pub const CREAD: ::tcflag_t = 0x00000080;
-pub const PARENB: ::tcflag_t = 0x00000100;
-pub const PARODD: ::tcflag_t = 0x00000200;
-pub const HUPCL: ::tcflag_t = 0x00000400;
-pub const CLOCAL: ::tcflag_t = 0x00000800;
-pub const ECHOKE: ::tcflag_t = 0x00000800;
-pub const ECHOE: ::tcflag_t = 0x00000010;
-pub const ECHOK: ::tcflag_t = 0x00000020;
-pub const ECHONL: ::tcflag_t = 0x00000040;
-pub const ECHOPRT: ::tcflag_t = 0x00000400;
-pub const ECHOCTL: ::tcflag_t = 0x00000200;
-pub const ISIG: ::tcflag_t = 0x00000001;
-pub const ICANON: ::tcflag_t = 0x00000002;
-pub const PENDIN: ::tcflag_t = 0x00004000;
-pub const NOFLSH: ::tcflag_t = 0x00000080;
-
-pub const B0: ::speed_t = 0o000000;
-pub const B50: ::speed_t = 0o000001;
-pub const B75: ::speed_t = 0o000002;
-pub const B110: ::speed_t = 0o000003;
-pub const B134: ::speed_t = 0o000004;
-pub const B150: ::speed_t = 0o000005;
-pub const B200: ::speed_t = 0o000006;
-pub const B300: ::speed_t = 0o000007;
-pub const B600: ::speed_t = 0o000010;
-pub const B1200: ::speed_t = 0o000011;
-pub const B1800: ::speed_t = 0o000012;
-pub const B2400: ::speed_t = 0o000013;
-pub const B4800: ::speed_t = 0o000014;
-pub const B9600: ::speed_t = 0o000015;
-pub const B19200: ::speed_t = 0o000016;
-pub const B38400: ::speed_t = 0o000017;
-pub const EXTA: ::speed_t = B19200;
-pub const EXTB: ::speed_t = B38400;
-pub const B57600: ::speed_t = 0o010001;
-pub const B115200: ::speed_t = 0o010002;
-pub const B230400: ::speed_t = 0o010003;
-pub const B460800: ::speed_t = 0o010004;
-pub const B500000: ::speed_t = 0o010005;
-pub const B576000: ::speed_t = 0o010006;
-pub const B921600: ::speed_t = 0o010007;
-pub const B1000000: ::speed_t = 0o010010;
-pub const B1152000: ::speed_t = 0o010011;
-pub const B1500000: ::speed_t = 0o010012;
-pub const B2000000: ::speed_t = 0o010013;
-pub const B2500000: ::speed_t = 0o010014;
-pub const B3000000: ::speed_t = 0o010015;
-pub const B3500000: ::speed_t = 0o010016;
-pub const B4000000: ::speed_t = 0o010017;
-
-pub const EAI_SYSTEM: ::c_int = 11;
-
-pub const NETLINK_ROUTE: ::c_int = 0;
-pub const NETLINK_UNUSED: ::c_int = 1;
-pub const NETLINK_USERSOCK: ::c_int = 2;
-pub const NETLINK_FIREWALL: ::c_int = 3;
-pub const NETLINK_SOCK_DIAG: ::c_int = 4;
-pub const NETLINK_NFLOG: ::c_int = 5;
-pub const NETLINK_XFRM: ::c_int = 6;
-pub const NETLINK_SELINUX: ::c_int = 7;
-pub const NETLINK_ISCSI: ::c_int = 8;
-pub const NETLINK_AUDIT: ::c_int = 9;
-pub const NETLINK_FIB_LOOKUP: ::c_int = 10;
-pub const NETLINK_CONNECTOR: ::c_int = 11;
-pub const NETLINK_NETFILTER: ::c_int = 12;
-pub const NETLINK_IP6_FW: ::c_int = 13;
-pub const NETLINK_DNRTMSG: ::c_int = 14;
-pub const NETLINK_KOBJECT_UEVENT: ::c_int = 15;
-pub const NETLINK_GENERIC: ::c_int = 16;
-pub const NETLINK_SCSITRANSPORT: ::c_int = 18;
-pub const NETLINK_ECRYPTFS: ::c_int = 19;
-pub const NETLINK_RDMA: ::c_int = 20;
-pub const NETLINK_CRYPTO: ::c_int = 21;
-pub const NETLINK_INET_DIAG: ::c_int = NETLINK_SOCK_DIAG;
-
-pub const MAX_LINKS: ::c_int = 32;
-
-pub const NLM_F_REQUEST: ::c_int = 1;
-pub const NLM_F_MULTI: ::c_int = 2;
-pub const NLM_F_ACK: ::c_int = 4;
-pub const NLM_F_ECHO: ::c_int = 8;
-pub const NLM_F_DUMP_INTR: ::c_int = 16;
-
-pub const NLM_F_ROOT: ::c_int = 0x100;
-pub const NLM_F_MATCH: ::c_int = 0x200;
-pub const NLM_F_ATOMIC: ::c_int = 0x400;
-pub const NLM_F_DUMP: ::c_int = NLM_F_ROOT | NLM_F_MATCH;
-
-pub const NLM_F_REPLACE: ::c_int = 0x100;
-pub const NLM_F_EXCL: ::c_int = 0x200;
-pub const NLM_F_CREATE: ::c_int = 0x400;
-pub const NLM_F_APPEND: ::c_int = 0x800;
-
-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 NETLINK_ADD_MEMBERSHIP: ::c_int = 1;
-pub const NETLINK_DROP_MEMBERSHIP: ::c_int = 2;
-pub const NETLINK_PKTINFO: ::c_int = 3;
-pub const NETLINK_BROADCAST_ERROR: ::c_int = 4;
-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 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 SIGEV_THREAD_ID: ::c_int = 4;
-
-f! {
-    pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
-        for slot in cpuset.__bits.iter_mut() {
-            *slot = 0;
-        }
-    }
-
-    pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () {
-        let size_in___bits = 8 * mem::size_of_val(&cpuset.__bits[0]);
-        let (idx, offset) = (cpu / size_in___bits, cpu % size_in___bits);
-        cpuset.__bits[idx] |= 1 << offset;
-        ()
-    }
-
-    pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () {
-        let size_in___bits = 8 * mem::size_of_val(&cpuset.__bits[0]);
-        let (idx, offset) = (cpu / size_in___bits, cpu % size_in___bits);
-        cpuset.__bits[idx] &= !(1 << offset);
-        ()
-    }
-
-    pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool {
-        let size_in___bits = 8 * mem::size_of_val(&cpuset.__bits[0]);
-        let (idx, offset) = (cpu / size_in___bits, cpu % size_in___bits);
-        0 != (cpuset.__bits[idx] & (1 << offset))
-    }
-
-    pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool {
-        set1.__bits == set2.__bits
-    }
-    pub fn major(dev: ::dev_t) -> ::c_int {
-        ((dev >> 8) & 0xfff) as ::c_int
-    }
-    pub fn minor(dev: ::dev_t) -> ::c_int {
-        ((dev & 0xff) | ((dev >> 12) & 0xfff00)) as ::c_int
-    }
-    pub fn makedev(ma: ::c_int, mi: ::c_int) -> ::dev_t {
-        let ma = ma as ::dev_t;
-        let mi = mi as ::dev_t;
-        ((ma & 0xfff) << 8) | (mi & 0xff) | ((mi & 0xfff00) << 12)
-    }
-}
-
-extern {
-    static mut __progname: *mut ::c_char;
-}
-
-extern {
-    pub fn madvise(addr: *const ::c_void, len: ::size_t, advice: ::c_int)
-                   -> ::c_int;
-    pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
-    pub fn msync(addr: *const ::c_void, len: ::size_t,
-                 flags: ::c_int) -> ::c_int;
-    pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int)
-                    -> ::c_int;
-    pub fn recvfrom(socket: ::c_int, buf: *mut ::c_void, len: ::size_t,
-                    flags: ::c_int, addr: *const ::sockaddr,
-                    addrlen: *mut ::socklen_t) -> ::ssize_t;
-    pub fn getnameinfo(sa: *const ::sockaddr,
-                       salen: ::socklen_t,
-                       host: *mut ::c_char,
-                       hostlen: ::size_t,
-                       serv: *mut ::c_char,
-                       sevlen: ::size_t,
-                       flags: ::c_int) -> ::c_int;
-    pub fn ptrace(request: ::c_int, ...) -> ::c_long;
-    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 __sched_cpualloc(count: ::size_t) -> *mut ::cpu_set_t;
-    pub fn __sched_cpufree(set: *mut ::cpu_set_t);
-    pub fn __sched_cpucount(setsize: ::size_t, set: *mut cpu_set_t) -> ::c_int;
-    pub fn sched_getcpu() -> ::c_int;
-
-    pub fn utmpname(name: *const ::c_char) -> ::c_int;
-    pub fn setutent();
-    pub fn getutent() -> *mut utmp;
-
-    pub fn posix_fallocate(fd: ::c_int, offset: ::off_t,
-                           len: ::off_t) -> ::c_int;
-}
-
-cfg_if! {
-    if #[cfg(target_pointer_width = "32")] {
-        mod b32;
-        pub use self::b32::*;
-    } else if #[cfg(target_pointer_width = "64")] {
-        mod b64;
-        pub use self::b64::*;
-    } else {
-        // Unknown target_pointer_width
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/linux/mips/mips32.rs
+++ /dev/null
@@ -1,234 +0,0 @@
-pub type c_char = i8;
-pub type c_long = i32;
-pub type c_ulong = u32;
-pub type clock_t = i32;
-pub type time_t = i32;
-pub type suseconds_t = i32;
-pub type wchar_t = i32;
-pub type off_t = i32;
-pub type ino_t = u32;
-pub type blkcnt_t = i32;
-pub type blksize_t = i32;
-pub type nlink_t = u32;
-
-s! {
-    pub struct aiocb {
-        pub aio_fildes: ::c_int,
-        pub aio_lio_opcode: ::c_int,
-        pub aio_reqprio: ::c_int,
-        pub aio_buf: *mut ::c_void,
-        pub aio_nbytes: ::size_t,
-        pub aio_sigevent: ::sigevent,
-        __next_prio: *mut aiocb,
-        __abs_prio: ::c_int,
-        __policy: ::c_int,
-        __error_code: ::c_int,
-        __return_value: ::ssize_t,
-        pub aio_offset: off_t,
-        __unused1: [::c_char; 4],
-        __glibc_reserved: [::c_char; 32]
-    }
-
-    pub struct stat {
-        pub st_dev: ::c_ulong,
-        st_pad1: [::c_long; 3],
-        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: ::c_ulong,
-        pub st_pad2: [::c_long; 2],
-        pub st_size: ::off_t,
-        st_pad3: ::c_long,
-        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,
-        pub st_blksize: ::blksize_t,
-        pub st_blocks: ::blkcnt_t,
-        st_pad5: [::c_long; 14],
-    }
-
-    pub struct stat64 {
-        pub st_dev: ::c_ulong,
-        st_pad1: [::c_long; 3],
-        pub st_ino: ::ino64_t,
-        pub st_mode: ::mode_t,
-        pub st_nlink: ::nlink_t,
-        pub st_uid: ::uid_t,
-        pub st_gid: ::gid_t,
-        pub st_rdev: ::c_ulong,
-        st_pad2: [::c_long; 2],
-        pub st_size: ::off64_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,
-        pub st_blksize: ::blksize_t,
-        st_pad3: ::c_long,
-        pub st_blocks: ::blkcnt64_t,
-        st_pad5: [::c_long; 14],
-    }
-
-    pub struct pthread_attr_t {
-        __size: [u32; 9]
-    }
-
-    pub struct sigaction {
-        pub sa_flags: ::c_int,
-        pub sa_sigaction: ::sighandler_t,
-        pub sa_mask: sigset_t,
-        pub sa_restorer: ::dox::Option<extern fn()>,
-        _resv: [::c_int; 1],
-    }
-
-    pub struct stack_t {
-        pub ss_sp: *mut ::c_void,
-        pub ss_size: ::size_t,
-        pub ss_flags: ::c_int,
-    }
-
-    pub struct sigset_t {
-        __val: [::c_ulong; 32],
-    }
-
-    pub struct siginfo_t {
-        pub si_signo: ::c_int,
-        pub si_code: ::c_int,
-        pub si_errno: ::c_int,
-        pub _pad: [::c_int; 29],
-    }
-
-    pub struct ipc_perm {
-        pub __key: ::key_t,
-        pub uid: ::uid_t,
-        pub gid: ::gid_t,
-        pub cuid: ::uid_t,
-        pub cgid: ::gid_t,
-        pub mode: ::c_uint,
-        pub __seq: ::c_ushort,
-        __pad1: ::c_ushort,
-        __unused1: ::c_ulong,
-        __unused2: ::c_ulong
-    }
-
-    pub struct shmid_ds {
-        pub shm_perm: ::ipc_perm,
-        pub shm_segsz: ::size_t,
-        pub shm_atime: ::time_t,
-        pub shm_dtime: ::time_t,
-        pub shm_ctime: ::time_t,
-        pub shm_cpid: ::pid_t,
-        pub shm_lpid: ::pid_t,
-        pub shm_nattch: ::shmatt_t,
-        __unused4: ::c_ulong,
-        __unused5: ::c_ulong
-    }
-
-    pub struct msqid_ds {
-        pub msg_perm: ::ipc_perm,
-        #[cfg(target_endian = "big")]
-        __glibc_reserved1: ::c_ulong,
-        pub msg_stime: ::time_t,
-        #[cfg(target_endian = "little")]
-        __glibc_reserved1: ::c_ulong,
-        #[cfg(target_endian = "big")]
-        __glibc_reserved2: ::c_ulong,
-        pub msg_rtime: ::time_t,
-        #[cfg(target_endian = "little")]
-        __glibc_reserved2: ::c_ulong,
-        #[cfg(target_endian = "big")]
-        __glibc_reserved3: ::c_ulong,
-        pub msg_ctime: ::time_t,
-        #[cfg(target_endian = "little")]
-        __glibc_reserved3: ::c_ulong,
-        __msg_cbytes: ::c_ulong,
-        pub msg_qnum: ::msgqnum_t,
-        pub msg_qbytes: ::msglen_t,
-        pub msg_lspid: ::pid_t,
-        pub msg_lrpid: ::pid_t,
-        __glibc_reserved4: ::c_ulong,
-        __glibc_reserved5: ::c_ulong,
-    }
-
-    pub struct statfs {
-        pub f_type: ::c_long,
-        pub f_bsize: ::c_long,
-        pub f_frsize: ::c_long,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_files: ::fsblkcnt_t,
-        pub f_ffree: ::fsblkcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_fsid: ::fsid_t,
-
-        pub f_namelen: ::c_long,
-        f_spare: [::c_long; 6],
-    }
-
-    pub struct msghdr {
-        pub msg_name: *mut ::c_void,
-        pub msg_namelen: ::socklen_t,
-        pub msg_iov: *mut ::iovec,
-        pub msg_iovlen: ::size_t,
-        pub msg_control: *mut ::c_void,
-        pub msg_controllen: ::size_t,
-        pub msg_flags: ::c_int,
-    }
-
-    pub struct cmsghdr {
-        pub cmsg_len: ::size_t,
-        pub cmsg_level: ::c_int,
-        pub cmsg_type: ::c_int,
-    }
-
-    pub struct termios {
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_line: ::cc_t,
-        pub c_cc: [::cc_t; ::NCCS],
-    }
-
-    pub struct flock {
-        pub l_type: ::c_short,
-        pub l_whence: ::c_short,
-        pub l_start: ::off_t,
-        pub l_len: ::off_t,
-        pub l_sysid: ::c_long,
-        pub l_pid: ::pid_t,
-        pad: [::c_long; 4],
-    }
-
-    pub struct sysinfo {
-        pub uptime: ::c_long,
-        pub loads: [::c_ulong; 3],
-        pub totalram: ::c_ulong,
-        pub freeram: ::c_ulong,
-        pub sharedram: ::c_ulong,
-        pub bufferram: ::c_ulong,
-        pub totalswap: ::c_ulong,
-        pub freeswap: ::c_ulong,
-        pub procs: ::c_ushort,
-        pub pad: ::c_ushort,
-        pub totalhigh: ::c_ulong,
-        pub freehigh: ::c_ulong,
-        pub mem_unit: ::c_uint,
-        pub _f: [::c_char; 8],
-    }
-}
-
-pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
-pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24;
-pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
-pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
-
-pub const RLIM_INFINITY: ::rlim_t = 0x7fffffff;
-
-pub const SYS_gettid: ::c_long = 4222;   // Valid for O32
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/linux/mips/mips64.rs
+++ /dev/null
@@ -1,220 +0,0 @@
-pub type blkcnt_t = i64;
-pub type blksize_t = i64;
-pub type c_char = i8;
-pub type c_long = i64;
-pub type c_ulong = u64;
-pub type ino_t = u64;
-pub type nlink_t = u64;
-pub type off_t = i64;
-pub type suseconds_t = i64;
-pub type time_t = i64;
-pub type wchar_t = i32;
-pub type clock_t = i64;
-
-s! {
-    pub struct aiocb {
-        pub aio_fildes: ::c_int,
-        pub aio_lio_opcode: ::c_int,
-        pub aio_reqprio: ::c_int,
-        pub aio_buf: *mut ::c_void,
-        pub aio_nbytes: ::size_t,
-        pub aio_sigevent: ::sigevent,
-        __next_prio: *mut aiocb,
-        __abs_prio: ::c_int,
-        __policy: ::c_int,
-        __error_code: ::c_int,
-        __return_value: ::ssize_t,
-        pub aio_offset: off_t,
-        __glibc_reserved: [::c_char; 32]
-    }
-
-    pub struct stat {
-        pub st_dev: ::c_ulong,
-        st_pad1: [::c_long; 2],
-        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: ::c_ulong,
-        st_pad2: [::c_ulong; 1],
-        pub st_size: ::off_t,
-        st_pad3: ::c_long,
-        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,
-        pub st_blksize: ::blksize_t,
-        st_pad4: ::c_long,
-        pub st_blocks: ::blkcnt_t,
-        st_pad5: [::c_long; 7],
-    }
-
-    pub struct stat64 {
-        pub st_dev: ::c_ulong,
-        st_pad1: [::c_long; 2],
-        pub st_ino: ::ino64_t,
-        pub st_mode: ::mode_t,
-        pub st_nlink: ::nlink_t,
-        pub st_uid: ::uid_t,
-        pub st_gid: ::gid_t,
-        pub st_rdev: ::c_ulong,
-        st_pad2: [::c_long; 2],
-        pub st_size: ::off64_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,
-        pub st_blksize: ::blksize_t,
-        st_pad3: ::c_long,
-        pub st_blocks: ::blkcnt64_t,
-        st_pad5: [::c_long; 7],
-    }
-
-    pub struct pthread_attr_t {
-        __size: [::c_ulong; 7]
-    }
-
-    pub struct sigaction {
-        pub sa_flags: ::c_int,
-        pub sa_sigaction: ::sighandler_t,
-        pub sa_mask: sigset_t,
-        pub sa_restorer: ::dox::Option<extern fn()>,
-    }
-
-    pub struct stack_t {
-        pub ss_sp: *mut ::c_void,
-        pub ss_size: ::size_t,
-        pub ss_flags: ::c_int,
-    }
-
-    pub struct sigset_t {
-        __size: [::c_ulong; 16],
-    }
-
-    pub struct siginfo_t {
-        pub si_signo: ::c_int,
-        pub si_code: ::c_int,
-        pub si_errno: ::c_int,
-        _pad: ::c_int,
-        _pad2: [::c_long; 14],
-    }
-
-    pub struct ipc_perm {
-        pub __key: ::key_t,
-        pub uid: ::uid_t,
-        pub gid: ::gid_t,
-        pub cuid: ::uid_t,
-        pub cgid: ::gid_t,
-        pub mode: ::c_uint,
-        pub __seq: ::c_ushort,
-        __pad1: ::c_ushort,
-        __unused1: ::c_ulong,
-        __unused2: ::c_ulong
-    }
-
-    pub struct shmid_ds {
-        pub shm_perm: ::ipc_perm,
-        pub shm_segsz: ::size_t,
-        pub shm_atime: ::time_t,
-        pub shm_dtime: ::time_t,
-        pub shm_ctime: ::time_t,
-        pub shm_cpid: ::pid_t,
-        pub shm_lpid: ::pid_t,
-        pub shm_nattch: ::shmatt_t,
-        __unused4: ::c_ulong,
-        __unused5: ::c_ulong
-    }
-
-    pub struct msqid_ds {
-        pub msg_perm: ::ipc_perm,
-        pub msg_stime: ::time_t,
-        pub msg_rtime: ::time_t,
-        pub msg_ctime: ::time_t,
-        __msg_cbytes: ::c_ulong,
-        pub msg_qnum: ::msgqnum_t,
-        pub msg_qbytes: ::msglen_t,
-        pub msg_lspid: ::pid_t,
-        pub msg_lrpid: ::pid_t,
-        __glibc_reserved4: ::c_ulong,
-        __glibc_reserved5: ::c_ulong,
-    }
-
-    pub struct statfs {
-        pub f_type: ::c_long,
-        pub f_bsize: ::c_long,
-        pub f_frsize: ::c_long,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_files: ::fsblkcnt_t,
-        pub f_ffree: ::fsblkcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_fsid: ::fsid_t,
-
-        pub f_namelen: ::c_long,
-        f_spare: [::c_long; 6],
-    }
-
-    pub struct msghdr {
-        pub msg_name: *mut ::c_void,
-        pub msg_namelen: ::socklen_t,
-        pub msg_iov: *mut ::iovec,
-        pub msg_iovlen: ::size_t,
-        pub msg_control: *mut ::c_void,
-        pub msg_controllen: ::size_t,
-        pub msg_flags: ::c_int,
-    }
-
-    pub struct cmsghdr {
-        pub cmsg_len: ::size_t,
-        pub cmsg_level: ::c_int,
-        pub cmsg_type: ::c_int,
-    }
-
-    pub struct termios {
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_line: ::cc_t,
-        pub c_cc: [::cc_t; ::NCCS],
-    }
-
-    pub struct flock {
-        pub l_type: ::c_short,
-        pub l_whence: ::c_short,
-        pub l_start: ::off_t,
-        pub l_len: ::off_t,
-        pub l_pid: ::pid_t,
-    }
-
-    pub struct sysinfo {
-        pub uptime: ::c_long,
-        pub loads: [::c_ulong; 3],
-        pub totalram: ::c_ulong,
-        pub freeram: ::c_ulong,
-        pub sharedram: ::c_ulong,
-        pub bufferram: ::c_ulong,
-        pub totalswap: ::c_ulong,
-        pub freeswap: ::c_ulong,
-        pub procs: ::c_ushort,
-        pub pad: ::c_ushort,
-        pub totalhigh: ::c_ulong,
-        pub freehigh: ::c_ulong,
-        pub mem_unit: ::c_uint,
-        pub _f: [::c_char; 0],
-    }
-}
-
-pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
-pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
-pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
-pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
-
-pub const RLIM_INFINITY: ::rlim_t = 0xffff_ffff_ffff_ffff;
-
-pub const SYS_gettid: ::c_long = 5178;   // Valid for n64
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/linux/mips/mod.rs
+++ /dev/null
@@ -1,576 +0,0 @@
-pub type fsblkcnt_t = ::c_ulong;
-pub type fsfilcnt_t = ::c_ulong;
-pub type rlim_t = c_ulong;
-pub type __priority_which_t = ::c_uint;
-
-s! {
-    pub struct glob64_t {
-        pub gl_pathc: ::size_t,
-        pub gl_pathv: *mut *mut ::c_char,
-        pub gl_offs: ::size_t,
-        pub gl_flags: ::c_int,
-
-        __unused1: *mut ::c_void,
-        __unused2: *mut ::c_void,
-        __unused3: *mut ::c_void,
-        __unused4: *mut ::c_void,
-        __unused5: *mut ::c_void,
-    }
-
-    // FIXME this is actually a union
-    pub struct sem_t {
-        #[cfg(target_pointer_width = "32")]
-        __size: [::c_char; 16],
-        #[cfg(target_pointer_width = "64")]
-        __size: [::c_char; 32],
-        __align: [::c_long; 0],
-    }
-}
-
-pub const CLONE_NEWCGROUP: ::c_int = 0x02000000;
-
-pub const SFD_CLOEXEC: ::c_int = 0x080000;
-
-pub const NCCS: usize = 32;
-
-pub const O_TRUNC: ::c_int = 512;
-
-pub const O_CLOEXEC: ::c_int = 0x80000;
-
-pub const EBFONT: ::c_int = 59;
-pub const ENOSTR: ::c_int = 60;
-pub const ENODATA: ::c_int = 61;
-pub const ETIME: ::c_int = 62;
-pub const ENOSR: ::c_int = 63;
-pub const ENONET: ::c_int = 64;
-pub const ENOPKG: ::c_int = 65;
-pub const EREMOTE: ::c_int = 66;
-pub const ENOLINK: ::c_int = 67;
-pub const EADV: ::c_int = 68;
-pub const ESRMNT: ::c_int = 69;
-pub const ECOMM: ::c_int = 70;
-pub const EPROTO: ::c_int = 71;
-pub const EDOTDOT: ::c_int = 73;
-
-pub const SA_NODEFER: ::c_int = 0x40000000;
-pub const SA_RESETHAND: ::c_int = 0x80000000;
-pub const SA_RESTART: ::c_int = 0x10000000;
-pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
-
-pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
-
-pub const EFD_CLOEXEC: ::c_int = 0x80000;
-
-pub const BUFSIZ: ::c_uint = 8192;
-pub const TMP_MAX: ::c_uint = 238328;
-pub const FOPEN_MAX: ::c_uint = 16;
-pub const POSIX_FADV_DONTNEED: ::c_int = 4;
-pub const POSIX_FADV_NOREUSE: ::c_int = 5;
-pub const POSIX_MADV_DONTNEED: ::c_int = 4;
-pub const _SC_2_C_VERSION: ::c_int = 96;
-pub const O_ACCMODE: ::c_int = 3;
-pub const O_DIRECT: ::c_int = 0x8000;
-pub const O_DIRECTORY: ::c_int = 0x10000;
-pub const O_NOFOLLOW: ::c_int = 0x20000;
-pub const ST_RELATIME: ::c_ulong = 4096;
-pub const NI_MAXHOST: ::socklen_t = 1025;
-
-pub const RLIMIT_NOFILE: ::c_int = 5;
-pub const RLIMIT_AS: ::c_int = 6;
-pub const RLIMIT_RSS: ::c_int = 7;
-pub const RLIMIT_NPROC: ::c_int = 8;
-pub const RLIMIT_MEMLOCK: ::c_int = 9;
-pub const RLIMIT_NLIMITS: ::c_int = 16;
-
-pub const O_APPEND: ::c_int = 8;
-pub const O_CREAT: ::c_int = 256;
-pub const O_EXCL: ::c_int = 1024;
-pub const O_NOCTTY: ::c_int = 2048;
-pub const O_NONBLOCK: ::c_int = 128;
-pub const O_SYNC: ::c_int = 0x4010;
-pub const O_RSYNC: ::c_int = 0x4010;
-pub const O_DSYNC: ::c_int = 0x10;
-pub const O_FSYNC: ::c_int = 0x4010;
-pub const O_ASYNC: ::c_int = 0x1000;
-pub const O_NDELAY: ::c_int = 0x80;
-
-pub const SOCK_NONBLOCK: ::c_int = 128;
-
-pub const EDEADLK: ::c_int = 45;
-pub const ENAMETOOLONG: ::c_int = 78;
-pub const ENOLCK: ::c_int = 46;
-pub const ENOSYS: ::c_int = 89;
-pub const ENOTEMPTY: ::c_int = 93;
-pub const ELOOP: ::c_int = 90;
-pub const ENOMSG: ::c_int = 35;
-pub const EIDRM: ::c_int = 36;
-pub const ECHRNG: ::c_int = 37;
-pub const EL2NSYNC: ::c_int = 38;
-pub const EL3HLT: ::c_int = 39;
-pub const EL3RST: ::c_int = 40;
-pub const ELNRNG: ::c_int = 41;
-pub const EUNATCH: ::c_int = 42;
-pub const ENOCSI: ::c_int = 43;
-pub const EL2HLT: ::c_int = 44;
-pub const EBADE: ::c_int = 50;
-pub const EBADR: ::c_int = 51;
-pub const EXFULL: ::c_int = 52;
-pub const ENOANO: ::c_int = 53;
-pub const EBADRQC: ::c_int = 54;
-pub const EBADSLT: ::c_int = 55;
-pub const EDEADLOCK: ::c_int = 56;
-pub const EMULTIHOP: ::c_int = 74;
-pub const EOVERFLOW: ::c_int = 79;
-pub const ENOTUNIQ: ::c_int = 80;
-pub const EBADFD: ::c_int = 81;
-pub const EBADMSG: ::c_int = 77;
-pub const EREMCHG: ::c_int = 82;
-pub const ELIBACC: ::c_int = 83;
-pub const ELIBBAD: ::c_int = 84;
-pub const ELIBSCN: ::c_int = 85;
-pub const ELIBMAX: ::c_int = 86;
-pub const ELIBEXEC: ::c_int = 87;
-pub const EILSEQ: ::c_int = 88;
-pub const ERESTART: ::c_int = 91;
-pub const ESTRPIPE: ::c_int = 92;
-pub const EUSERS: ::c_int = 94;
-pub const ENOTSOCK: ::c_int = 95;
-pub const EDESTADDRREQ: ::c_int = 96;
-pub const EMSGSIZE: ::c_int = 97;
-pub const EPROTOTYPE: ::c_int = 98;
-pub const ENOPROTOOPT: ::c_int = 99;
-pub const EPROTONOSUPPORT: ::c_int = 120;
-pub const ESOCKTNOSUPPORT: ::c_int = 121;
-pub const EOPNOTSUPP: ::c_int = 122;
-pub const ENOTSUP: ::c_int = EOPNOTSUPP;
-pub const EPFNOSUPPORT: ::c_int = 123;
-pub const EAFNOSUPPORT: ::c_int = 124;
-pub const EADDRINUSE: ::c_int = 125;
-pub const EADDRNOTAVAIL: ::c_int = 126;
-pub const ENETDOWN: ::c_int = 127;
-pub const ENETUNREACH: ::c_int = 128;
-pub const ENETRESET: ::c_int = 129;
-pub const ECONNABORTED: ::c_int = 130;
-pub const ECONNRESET: ::c_int = 131;
-pub const ENOBUFS: ::c_int = 132;
-pub const EISCONN: ::c_int = 133;
-pub const ENOTCONN: ::c_int = 134;
-pub const ESHUTDOWN: ::c_int = 143;
-pub const ETOOMANYREFS: ::c_int = 144;
-pub const ETIMEDOUT: ::c_int = 145;
-pub const ECONNREFUSED: ::c_int = 146;
-pub const EHOSTDOWN: ::c_int = 147;
-pub const EHOSTUNREACH: ::c_int = 148;
-pub const EALREADY: ::c_int = 149;
-pub const EINPROGRESS: ::c_int = 150;
-pub const ESTALE: ::c_int = 151;
-pub const EUCLEAN: ::c_int = 135;
-pub const ENOTNAM: ::c_int = 137;
-pub const ENAVAIL: ::c_int = 138;
-pub const EISNAM: ::c_int = 139;
-pub const EREMOTEIO: ::c_int = 140;
-pub const EDQUOT: ::c_int = 1133;
-pub const ENOMEDIUM: ::c_int = 159;
-pub const EMEDIUMTYPE: ::c_int = 160;
-pub const ECANCELED: ::c_int = 158;
-pub const ENOKEY: ::c_int = 161;
-pub const EKEYEXPIRED: ::c_int = 162;
-pub const EKEYREVOKED: ::c_int = 163;
-pub const EKEYREJECTED: ::c_int = 164;
-pub const EOWNERDEAD: ::c_int = 165;
-pub const ENOTRECOVERABLE: ::c_int = 166;
-pub const ERFKILL: ::c_int = 167;
-
-pub const LC_PAPER: ::c_int = 7;
-pub const LC_NAME: ::c_int = 8;
-pub const LC_ADDRESS: ::c_int = 9;
-pub const LC_TELEPHONE: ::c_int = 10;
-pub const LC_MEASUREMENT: ::c_int = 11;
-pub const LC_IDENTIFICATION: ::c_int = 12;
-pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
-pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
-pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
-pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
-pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
-pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
-pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
-                               | ::LC_NUMERIC_MASK
-                               | ::LC_TIME_MASK
-                               | ::LC_COLLATE_MASK
-                               | ::LC_MONETARY_MASK
-                               | ::LC_MESSAGES_MASK
-                               | LC_PAPER_MASK
-                               | LC_NAME_MASK
-                               | LC_ADDRESS_MASK
-                               | LC_TELEPHONE_MASK
-                               | LC_MEASUREMENT_MASK
-                               | LC_IDENTIFICATION_MASK;
-
-pub const MAP_NORESERVE: ::c_int = 0x400;
-pub const MAP_ANON: ::c_int = 0x800;
-pub const MAP_ANONYMOUS: ::c_int = 0x800;
-pub const MAP_GROWSDOWN: ::c_int = 0x1000;
-pub const MAP_DENYWRITE: ::c_int = 0x2000;
-pub const MAP_EXECUTABLE: ::c_int = 0x4000;
-pub const MAP_LOCKED: ::c_int = 0x8000;
-pub const MAP_POPULATE: ::c_int = 0x10000;
-pub const MAP_NONBLOCK: ::c_int = 0x20000;
-pub const MAP_STACK: ::c_int = 0x40000;
-
-pub const SOCK_STREAM: ::c_int = 2;
-pub const SOCK_DGRAM: ::c_int = 1;
-pub const SOCK_SEQPACKET: ::c_int = 5;
-
-pub const SOL_SOCKET: ::c_int = 0xffff;
-
-pub const SO_REUSEADDR: ::c_int = 0x0004;
-pub const SO_KEEPALIVE: ::c_int = 0x0008;
-pub const SO_DONTROUTE: ::c_int = 0x0010;
-pub const SO_BROADCAST: ::c_int = 0x0020;
-pub const SO_LINGER: ::c_int = 0x0080;
-pub const SO_OOBINLINE: ::c_int = 0x0100;
-pub const SO_REUSEPORT: ::c_int = 0x0200;
-pub const SO_TYPE: ::c_int = 0x1008;
-pub const SO_STYLE: ::c_int = SO_TYPE;
-pub const SO_ERROR: ::c_int = 0x1007;
-pub const SO_SNDBUF: ::c_int = 0x1001;
-pub const SO_RCVBUF: ::c_int = 0x1002;
-pub const SO_SNDLOWAT: ::c_int = 0x1003;
-pub const SO_RCVLOWAT: ::c_int = 0x1004;
-pub const SO_SNDTIMEO: ::c_int = 0x1005;
-pub const SO_RCVTIMEO: ::c_int = 0x1006;
-pub const SO_ACCEPTCONN: ::c_int = 0x1009;
-pub const SO_PROTOCOL: ::c_int = 0x1028;
-pub const SO_DOMAIN: ::c_int = 0x1029;
-pub const SO_NO_CHECK: ::c_int = 11;
-pub const SO_PRIORITY: ::c_int = 12;
-pub const SO_BSDCOMPAT: ::c_int = 14;
-pub const SO_PASSCRED: ::c_int = 17;
-pub const SO_PEERCRED: ::c_int = 18;
-pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22;
-pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23;
-pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24;
-pub const SO_BINDTODEVICE: ::c_int = 25;
-pub const SO_ATTACH_FILTER: ::c_int = 26;
-pub const SO_DETACH_FILTER: ::c_int = 27;
-pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
-pub const SO_PEERNAME: ::c_int = 28;
-pub const SO_TIMESTAMP: ::c_int = 29;
-pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP;
-pub const SO_PEERSEC: ::c_int = 30;
-pub const SO_SNDBUFFORCE: ::c_int = 31;
-pub const SO_RCVBUFFORCE: ::c_int = 33;
-pub const SO_PASSSEC: ::c_int = 34;
-pub const SO_TIMESTAMPNS: ::c_int = 35;
-pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
-pub const SO_MARK: ::c_int = 36;
-pub const SO_TIMESTAMPING: ::c_int = 37;
-pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING;
-pub const SO_RXQ_OVFL: ::c_int = 40;
-pub const SO_WIFI_STATUS: ::c_int = 41;
-pub const SCM_WIFI_STATUS: ::c_int = SO_WIFI_STATUS;
-pub const SO_PEEK_OFF: ::c_int = 42;
-pub const SO_NOFCS: ::c_int = 43;
-pub const SO_LOCK_FILTER: ::c_int = 44;
-pub const SO_SELECT_ERR_QUEUE: ::c_int = 45;
-pub const SO_BUSY_POLL: ::c_int = 46;
-pub const SO_MAX_PACING_RATE: ::c_int = 47;
-pub const SO_BPF_EXTENSIONS: ::c_int = 48;
-pub const SO_INCOMING_CPU: ::c_int = 49;
-pub const SO_ATTACH_BPF: ::c_int = 50;
-pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER;
-
-pub const FIOCLEX: ::c_ulong = 0x6601;
-pub const FIONBIO: ::c_ulong = 0x667e;
-
-pub const SA_ONSTACK: ::c_int = 0x08000000;
-pub const SA_SIGINFO: ::c_int = 0x00000008;
-pub const SA_NOCLDWAIT: ::c_int = 0x00010000;
-
-pub const SIGCHLD: ::c_int = 18;
-pub const SIGBUS: ::c_int = 10;
-pub const SIGTTIN: ::c_int = 26;
-pub const SIGTTOU: ::c_int = 27;
-pub const SIGXCPU: ::c_int = 30;
-pub const SIGXFSZ: ::c_int = 31;
-pub const SIGVTALRM: ::c_int = 28;
-pub const SIGPROF: ::c_int = 29;
-pub const SIGWINCH: ::c_int = 20;
-pub const SIGUSR1: ::c_int = 16;
-pub const SIGUSR2: ::c_int = 17;
-pub const SIGCONT: ::c_int = 25;
-pub const SIGSTOP: ::c_int = 23;
-pub const SIGTSTP: ::c_int = 24;
-pub const SIGURG: ::c_int = 21;
-pub const SIGIO: ::c_int = 22;
-pub const SIGSYS: ::c_int = 12;
-pub const SIGPOLL: ::c_int = 22;
-pub const SIGPWR: ::c_int = 19;
-pub const SIG_SETMASK: ::c_int = 3;
-pub const SIG_BLOCK: ::c_int = 0x1;
-pub const SIG_UNBLOCK: ::c_int = 0x2;
-
-pub const POLLRDNORM: ::c_short = 0x040;
-pub const POLLWRNORM: ::c_short = 0x004;
-pub const POLLRDBAND: ::c_short = 0x080;
-pub const POLLWRBAND: ::c_short = 0x100;
-
-pub const PTHREAD_STACK_MIN: ::size_t = 131072;
-
-pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;
-pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff;
-pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245;
-pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45;
-pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53;
-pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53;
-pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53;
-pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53;
-pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849;
-pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6;
-pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660;
-pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6;
-pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f;
-pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f;
-pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468;
-pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478;
-pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44;
-pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c;
-pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969;
-pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1;
-pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0;
-pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f;
-pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973;
-pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b;
-pub const TMPFS_MAGIC: ::c_long = 0x01021994;
-pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2;
-
-pub const VEOF: usize = 16;
-pub const VEOL: usize = 17;
-pub const VEOL2: usize = 6;
-pub const VMIN: usize = 4;
-pub const IEXTEN: ::tcflag_t = 0x00000100;
-pub const TOSTOP: ::tcflag_t = 0x00008000;
-pub const FLUSHO: ::tcflag_t = 0x00002000;
-pub const EXTPROC: ::tcflag_t = 0o200000;
-pub const TCSANOW: ::c_int = 0x540e;
-pub const TCSADRAIN: ::c_int = 0x540f;
-pub const TCSAFLUSH: ::c_int = 0x5410;
-
-pub const CPU_SETSIZE: ::c_int = 0x400;
-
-pub const PTRACE_TRACEME: ::c_uint = 0;
-pub const PTRACE_PEEKTEXT: ::c_uint = 1;
-pub const PTRACE_PEEKDATA: ::c_uint = 2;
-pub const PTRACE_PEEKUSER: ::c_uint = 3;
-pub const PTRACE_POKETEXT: ::c_uint = 4;
-pub const PTRACE_POKEDATA: ::c_uint = 5;
-pub const PTRACE_POKEUSER: ::c_uint = 6;
-pub const PTRACE_CONT: ::c_uint = 7;
-pub const PTRACE_KILL: ::c_uint = 8;
-pub const PTRACE_SINGLESTEP: ::c_uint = 9;
-pub const PTRACE_ATTACH: ::c_uint = 16;
-pub const PTRACE_DETACH: ::c_uint = 17;
-pub const PTRACE_SYSCALL: ::c_uint = 24;
-pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200;
-pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201;
-pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202;
-pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203;
-pub const PTRACE_GETFPREGS: ::c_uint = 14;
-pub const PTRACE_SETFPREGS: ::c_uint = 15;
-pub const PTRACE_GETFPXREGS: ::c_uint = 18;
-pub const PTRACE_SETFPXREGS: ::c_uint = 19;
-pub const PTRACE_GETREGS: ::c_uint = 12;
-pub const PTRACE_SETREGS: ::c_uint = 13;
-
-pub const MAP_HUGETLB: ::c_int = 0x080000;
-
-pub const EFD_NONBLOCK: ::c_int = 0x80;
-
-pub const F_GETLK: ::c_int = 14;
-pub const F_GETOWN: ::c_int = 23;
-pub const F_SETOWN: ::c_int = 24;
-pub const F_SETLK: ::c_int = 6;
-pub const F_SETLKW: ::c_int = 7;
-
-pub const SFD_NONBLOCK: ::c_int = 0x80;
-
-pub const TCGETS: ::c_ulong = 0x540d;
-pub const TCSETS: ::c_ulong = 0x540e;
-pub const TCSETSW: ::c_ulong = 0x540f;
-pub const TCSETSF: ::c_ulong = 0x5410;
-pub const TCGETA: ::c_ulong = 0x5401;
-pub const TCSETA: ::c_ulong = 0x5402;
-pub const TCSETAW: ::c_ulong = 0x5403;
-pub const TCSETAF: ::c_ulong = 0x5404;
-pub const TCSBRK: ::c_ulong = 0x5405;
-pub const TCXONC: ::c_ulong = 0x5406;
-pub const TCFLSH: ::c_ulong = 0x5407;
-pub const TIOCGSOFTCAR: ::c_ulong = 0x5481;
-pub const TIOCSSOFTCAR: ::c_ulong = 0x5482;
-pub const TIOCINQ: ::c_ulong = 0x467f;
-pub const TIOCLINUX: ::c_ulong = 0x5483;
-pub const TIOCGSERIAL: ::c_ulong = 0x5484;
-pub const TIOCEXCL: ::c_ulong = 0x740d;
-pub const TIOCNXCL: ::c_ulong = 0x740e;
-pub const TIOCSCTTY: ::c_ulong = 0x5480;
-pub const TIOCGPGRP: ::c_ulong = 0x40047477;
-pub const TIOCSPGRP: ::c_ulong = 0x80047476;
-pub const TIOCOUTQ: ::c_ulong = 0x7472;
-pub const TIOCSTI: ::c_ulong = 0x5472;
-pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
-pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
-pub const TIOCMGET: ::c_ulong = 0x741d;
-pub const TIOCMBIS: ::c_ulong = 0x741b;
-pub const TIOCMBIC: ::c_ulong = 0x741c;
-pub const TIOCMSET: ::c_ulong = 0x741a;
-pub const FIONREAD: ::c_ulong = 0x467f;
-pub const TIOCCONS: ::c_ulong = 0x80047478;
-
-pub const RTLD_DEEPBIND: ::c_int = 0x10;
-pub const RTLD_GLOBAL: ::c_int = 0x4;
-pub const RTLD_NOLOAD: ::c_int = 0x8;
-
-pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
-pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
-pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
-pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
-pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
-
-pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
-pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
-pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
-pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
-pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
-pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
-pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
-pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
-
-pub const MCL_CURRENT: ::c_int = 0x0001;
-pub const MCL_FUTURE: ::c_int = 0x0002;
-
-pub const SIGSTKSZ: ::size_t = 8192;
-pub const MINSIGSTKSZ: ::size_t = 2048;
-pub const CBAUD: ::tcflag_t = 0o0010017;
-pub const TAB1: ::c_int = 0x00000800;
-pub const TAB2: ::c_int = 0x00001000;
-pub const TAB3: ::c_int = 0x00001800;
-pub const CR1: ::c_int  = 0x00000200;
-pub const CR2: ::c_int  = 0x00000400;
-pub const CR3: ::c_int  = 0x00000600;
-pub const FF1: ::c_int  = 0x00008000;
-pub const BS1: ::c_int  = 0x00002000;
-pub const VT1: ::c_int  = 0x00004000;
-pub const VWERASE: usize = 14;
-pub const VREPRINT: usize = 12;
-pub const VSUSP: usize = 10;
-pub const VSTART: usize = 8;
-pub const VSTOP: usize = 9;
-pub const VDISCARD: usize = 13;
-pub const VTIME: usize = 5;
-pub const IXON: ::tcflag_t = 0x00000400;
-pub const IXOFF: ::tcflag_t = 0x00001000;
-pub const ONLCR: ::tcflag_t = 0x4;
-pub const CSIZE: ::tcflag_t = 0x00000030;
-pub const CS6: ::tcflag_t = 0x00000010;
-pub const CS7: ::tcflag_t = 0x00000020;
-pub const CS8: ::tcflag_t = 0x00000030;
-pub const CSTOPB: ::tcflag_t = 0x00000040;
-pub const CREAD: ::tcflag_t = 0x00000080;
-pub const PARENB: ::tcflag_t = 0x00000100;
-pub const PARODD: ::tcflag_t = 0x00000200;
-pub const HUPCL: ::tcflag_t = 0x00000400;
-pub const CLOCAL: ::tcflag_t = 0x00000800;
-pub const ECHOKE: ::tcflag_t = 0x00000800;
-pub const ECHOE: ::tcflag_t = 0x00000010;
-pub const ECHOK: ::tcflag_t = 0x00000020;
-pub const ECHONL: ::tcflag_t = 0x00000040;
-pub const ECHOPRT: ::tcflag_t = 0x00000400;
-pub const ECHOCTL: ::tcflag_t = 0x00000200;
-pub const ISIG: ::tcflag_t = 0x00000001;
-pub const ICANON: ::tcflag_t = 0x00000002;
-pub const PENDIN: ::tcflag_t = 0x00004000;
-pub const NOFLSH: ::tcflag_t = 0x00000080;
-
-pub const B0: ::speed_t = 0o000000;
-pub const B50: ::speed_t = 0o000001;
-pub const B75: ::speed_t = 0o000002;
-pub const B110: ::speed_t = 0o000003;
-pub const B134: ::speed_t = 0o000004;
-pub const B150: ::speed_t = 0o000005;
-pub const B200: ::speed_t = 0o000006;
-pub const B300: ::speed_t = 0o000007;
-pub const B600: ::speed_t = 0o000010;
-pub const B1200: ::speed_t = 0o000011;
-pub const B1800: ::speed_t = 0o000012;
-pub const B2400: ::speed_t = 0o000013;
-pub const B4800: ::speed_t = 0o000014;
-pub const B9600: ::speed_t = 0o000015;
-pub const B19200: ::speed_t = 0o000016;
-pub const B38400: ::speed_t = 0o000017;
-pub const EXTA: ::speed_t = B19200;
-pub const EXTB: ::speed_t = B38400;
-pub const B57600: ::speed_t = 0o010001;
-pub const B115200: ::speed_t = 0o010002;
-pub const B230400: ::speed_t = 0o010003;
-pub const B460800: ::speed_t = 0o010004;
-pub const B500000: ::speed_t = 0o010005;
-pub const B576000: ::speed_t = 0o010006;
-pub const B921600: ::speed_t = 0o010007;
-pub const B1000000: ::speed_t = 0o010010;
-pub const B1152000: ::speed_t = 0o010011;
-pub const B1500000: ::speed_t = 0o010012;
-pub const B2000000: ::speed_t = 0o010013;
-pub const B2500000: ::speed_t = 0o010014;
-pub const B3000000: ::speed_t = 0o010015;
-pub const B3500000: ::speed_t = 0o010016;
-pub const B4000000: ::speed_t = 0o010017;
-
-#[link(name = "util")]
-extern {
-    pub fn sysctl(name: *mut ::c_int,
-                  namelen: ::c_int,
-                  oldp: *mut ::c_void,
-                  oldlenp: *mut ::size_t,
-                  newp: *mut ::c_void,
-                  newlen: ::size_t)
-                  -> ::c_int;
-    pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
-    pub fn backtrace(buf: *mut *mut ::c_void,
-                     sz: ::c_int) -> ::c_int;
-    pub fn glob64(pattern: *const ::c_char,
-                  flags: ::c_int,
-                  errfunc: ::dox::Option<extern fn(epath: *const ::c_char,
-                                                   errno: ::c_int)
-                                                   -> ::c_int>,
-                  pglob: *mut glob64_t) -> ::c_int;
-    pub fn globfree64(pglob: *mut glob64_t);
-    pub fn ptrace(request: ::c_uint, ...) -> ::c_long;
-    pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t,
-                                       cpusetsize: ::size_t,
-                                       cpuset: *mut ::cpu_set_t) -> ::c_int;
-    pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t,
-                                       cpusetsize: ::size_t,
-                                       cpuset: *const ::cpu_set_t) -> ::c_int;
-    pub fn getpriority(which: ::__priority_which_t, who: ::id_t) -> ::c_int;
-    pub fn setpriority(which: ::__priority_which_t, who: ::id_t,
-                                       prio: ::c_int) -> ::c_int;
-    pub fn pthread_getaffinity_np(thread: ::pthread_t,
-                                  cpusetsize: ::size_t,
-                                  cpuset: *mut ::cpu_set_t) -> ::c_int;
-    pub fn pthread_setaffinity_np(thread: ::pthread_t,
-                                  cpusetsize: ::size_t,
-                                  cpuset: *const ::cpu_set_t) -> ::c_int;
-    pub fn sched_getcpu() -> ::c_int;
-}
-
-cfg_if! {
-    if #[cfg(target_arch = "mips")] {
-        mod mips32;
-        pub use self::mips32::*;
-    } else if #[cfg(target_arch = "mips64")] {
-        mod mips64;
-        pub use self::mips64::*;
-    } else {
-        // Unknown target_arch
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/linux/mod.rs
+++ /dev/null
@@ -1,1045 +0,0 @@
-//! Linux-specific definitions for linux-like values
-
-use dox::{mem, Option};
-
-pub type useconds_t = u32;
-pub type dev_t = u64;
-pub type socklen_t = u32;
-pub type pthread_t = c_ulong;
-pub type mode_t = u32;
-pub type ino64_t = u64;
-pub type off64_t = i64;
-pub type blkcnt64_t = i64;
-pub type rlim64_t = u64;
-pub type shmatt_t = ::c_ulong;
-pub type mqd_t = ::c_int;
-pub type msgqnum_t = ::c_ulong;
-pub type msglen_t = ::c_ulong;
-pub type nfds_t = ::c_ulong;
-pub type nl_item = ::c_int;
-pub type idtype_t = ::c_uint;
-
-pub enum fpos64_t {} // TODO: fill this out with a struct
-
-s! {
-    pub struct dirent {
-        pub d_ino: ::ino_t,
-        pub d_off: ::off_t,
-        pub d_reclen: ::c_ushort,
-        pub d_type: ::c_uchar,
-        pub d_name: [::c_char; 256],
-    }
-
-    pub struct dirent64 {
-        pub d_ino: ::ino64_t,
-        pub d_off: ::off64_t,
-        pub d_reclen: ::c_ushort,
-        pub d_type: ::c_uchar,
-        pub d_name: [::c_char; 256],
-    }
-
-    pub struct rlimit64 {
-        pub rlim_cur: rlim64_t,
-        pub rlim_max: rlim64_t,
-    }
-
-    pub struct glob_t {
-        pub gl_pathc: ::size_t,
-        pub gl_pathv: *mut *mut c_char,
-        pub gl_offs: ::size_t,
-        pub gl_flags: ::c_int,
-
-        __unused1: *mut ::c_void,
-        __unused2: *mut ::c_void,
-        __unused3: *mut ::c_void,
-        __unused4: *mut ::c_void,
-        __unused5: *mut ::c_void,
-    }
-
-    pub struct ifaddrs {
-        pub ifa_next: *mut ifaddrs,
-        pub ifa_name: *mut c_char,
-        pub ifa_flags: ::c_uint,
-        pub ifa_addr: *mut ::sockaddr,
-        pub ifa_netmask: *mut ::sockaddr,
-        pub ifa_ifu: *mut ::sockaddr, // FIXME This should be a union
-        pub ifa_data: *mut ::c_void
-    }
-
-    pub struct pthread_mutex_t {
-        #[cfg(any(target_arch = "mips", target_arch = "arm",
-                  target_arch = "powerpc"))]
-        __align: [::c_long; 0],
-        #[cfg(not(any(target_arch = "mips", target_arch = "arm",
-                      target_arch = "powerpc")))]
-        __align: [::c_longlong; 0],
-        size: [u8; __SIZEOF_PTHREAD_MUTEX_T],
-    }
-
-    pub struct pthread_rwlock_t {
-        #[cfg(any(target_arch = "mips", target_arch = "arm",
-                  target_arch = "powerpc"))]
-        __align: [::c_long; 0],
-        #[cfg(not(any(target_arch = "mips", target_arch = "arm",
-                      target_arch = "powerpc")))]
-        __align: [::c_longlong; 0],
-        size: [u8; __SIZEOF_PTHREAD_RWLOCK_T],
-    }
-
-    pub struct pthread_mutexattr_t {
-        #[cfg(any(target_arch = "x86_64", target_arch = "powerpc64",
-                  target_arch = "mips64", target_arch = "s390x",
-                  target_arch = "sparc64"))]
-        __align: [::c_int; 0],
-        #[cfg(not(any(target_arch = "x86_64", target_arch = "powerpc64",
-                      target_arch = "mips64", target_arch = "s390x",
-                      target_arch = "sparc64")))]
-        __align: [::c_long; 0],
-        size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T],
-    }
-
-    pub struct pthread_cond_t {
-        #[cfg(any(target_env = "musl"))]
-        __align: [*const ::c_void; 0],
-        #[cfg(not(any(target_env = "musl")))]
-        __align: [::c_longlong; 0],
-        size: [u8; __SIZEOF_PTHREAD_COND_T],
-    }
-
-    pub struct pthread_condattr_t {
-        __align: [::c_int; 0],
-        size: [u8; __SIZEOF_PTHREAD_CONDATTR_T],
-    }
-
-    pub struct passwd {
-        pub pw_name: *mut ::c_char,
-        pub pw_passwd: *mut ::c_char,
-        pub pw_uid: ::uid_t,
-        pub pw_gid: ::gid_t,
-        pub pw_gecos: *mut ::c_char,
-        pub pw_dir: *mut ::c_char,
-        pub pw_shell: *mut ::c_char,
-    }
-
-    pub struct spwd {
-        pub sp_namp: *mut ::c_char,
-        pub sp_pwdp: *mut ::c_char,
-        pub sp_lstchg: ::c_long,
-        pub sp_min: ::c_long,
-        pub sp_max: ::c_long,
-        pub sp_warn: ::c_long,
-        pub sp_inact: ::c_long,
-        pub sp_expire: ::c_long,
-        pub sp_flag: ::c_ulong,
-    }
-
-    pub struct statvfs {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_files: ::fsfilcnt_t,
-        pub f_ffree: ::fsfilcnt_t,
-        pub f_favail: ::fsfilcnt_t,
-        #[cfg(target_endian = "little")]
-        pub f_fsid: ::c_ulong,
-        #[cfg(target_pointer_width = "32")]
-        __f_unused: ::c_int,
-        #[cfg(target_endian = "big")]
-        pub f_fsid: ::c_ulong,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-        __f_spare: [::c_int; 6],
-    }
-
-    pub struct dqblk {
-        pub dqb_bhardlimit: ::uint64_t,
-        pub dqb_bsoftlimit: ::uint64_t,
-        pub dqb_curspace: ::uint64_t,
-        pub dqb_ihardlimit: ::uint64_t,
-        pub dqb_isoftlimit: ::uint64_t,
-        pub dqb_curinodes: ::uint64_t,
-        pub dqb_btime: ::uint64_t,
-        pub dqb_itime: ::uint64_t,
-        pub dqb_valid: ::uint32_t,
-    }
-
-    pub struct signalfd_siginfo {
-        pub ssi_signo: ::uint32_t,
-        pub ssi_errno: ::int32_t,
-        pub ssi_code: ::int32_t,
-        pub ssi_pid: ::uint32_t,
-        pub ssi_uid: ::uint32_t,
-        pub ssi_fd: ::int32_t,
-        pub ssi_tid: ::uint32_t,
-        pub ssi_band: ::uint32_t,
-        pub ssi_overrun: ::uint32_t,
-        pub ssi_trapno: ::uint32_t,
-        pub ssi_status: ::int32_t,
-        pub ssi_int: ::int32_t,
-        pub ssi_ptr: ::uint64_t,
-        pub ssi_utime: ::uint64_t,
-        pub ssi_stime: ::uint64_t,
-        pub ssi_addr: ::uint64_t,
-        _pad: [::uint8_t; 48],
-    }
-
-    pub struct fsid_t {
-        __val: [::c_int; 2],
-    }
-
-    pub struct mq_attr {
-        pub mq_flags: ::c_long,
-        pub mq_maxmsg: ::c_long,
-        pub mq_msgsize: ::c_long,
-        pub mq_curmsgs: ::c_long,
-        pad: [::c_long; 4]
-    }
-
-    pub struct cpu_set_t {
-        #[cfg(target_pointer_width = "32")]
-        bits: [u32; 32],
-        #[cfg(target_pointer_width = "64")]
-        bits: [u64; 16],
-    }
-
-    pub struct if_nameindex {
-        pub if_index: ::c_uint,
-        pub if_name: *mut ::c_char,
-    }
-
-    // System V IPC
-    pub struct msginfo {
-        pub msgpool: ::c_int,
-        pub msgmap: ::c_int,
-        pub msgmax: ::c_int,
-        pub msgmnb: ::c_int,
-        pub msgmni: ::c_int,
-        pub msgssz: ::c_int,
-        pub msgtql: ::c_int,
-        pub msgseg: ::c_ushort,
-    }
-
-    pub struct mmsghdr {
-        pub msg_hdr: ::msghdr,
-        pub msg_len: ::c_uint,
-    }
-
-    pub struct sembuf {
-        pub sem_num: ::c_ushort,
-        pub sem_op: ::c_short,
-        pub sem_flg: ::c_short,
-    }
-}
-
-pub const ABDAY_1: ::nl_item = 0x20000;
-pub const ABDAY_2: ::nl_item = 0x20001;
-pub const ABDAY_3: ::nl_item = 0x20002;
-pub const ABDAY_4: ::nl_item = 0x20003;
-pub const ABDAY_5: ::nl_item = 0x20004;
-pub const ABDAY_6: ::nl_item = 0x20005;
-pub const ABDAY_7: ::nl_item = 0x20006;
-
-pub const DAY_1: ::nl_item = 0x20007;
-pub const DAY_2: ::nl_item = 0x20008;
-pub const DAY_3: ::nl_item = 0x20009;
-pub const DAY_4: ::nl_item = 0x2000A;
-pub const DAY_5: ::nl_item = 0x2000B;
-pub const DAY_6: ::nl_item = 0x2000C;
-pub const DAY_7: ::nl_item = 0x2000D;
-
-pub const ABMON_1: ::nl_item = 0x2000E;
-pub const ABMON_2: ::nl_item = 0x2000F;
-pub const ABMON_3: ::nl_item = 0x20010;
-pub const ABMON_4: ::nl_item = 0x20011;
-pub const ABMON_5: ::nl_item = 0x20012;
-pub const ABMON_6: ::nl_item = 0x20013;
-pub const ABMON_7: ::nl_item = 0x20014;
-pub const ABMON_8: ::nl_item = 0x20015;
-pub const ABMON_9: ::nl_item = 0x20016;
-pub const ABMON_10: ::nl_item = 0x20017;
-pub const ABMON_11: ::nl_item = 0x20018;
-pub const ABMON_12: ::nl_item = 0x20019;
-
-pub const MON_1: ::nl_item = 0x2001A;
-pub const MON_2: ::nl_item = 0x2001B;
-pub const MON_3: ::nl_item = 0x2001C;
-pub const MON_4: ::nl_item = 0x2001D;
-pub const MON_5: ::nl_item = 0x2001E;
-pub const MON_6: ::nl_item = 0x2001F;
-pub const MON_7: ::nl_item = 0x20020;
-pub const MON_8: ::nl_item = 0x20021;
-pub const MON_9: ::nl_item = 0x20022;
-pub const MON_10: ::nl_item = 0x20023;
-pub const MON_11: ::nl_item = 0x20024;
-pub const MON_12: ::nl_item = 0x20025;
-
-pub const AM_STR: ::nl_item = 0x20026;
-pub const PM_STR: ::nl_item = 0x20027;
-
-pub const D_T_FMT: ::nl_item = 0x20028;
-pub const D_FMT: ::nl_item = 0x20029;
-pub const T_FMT: ::nl_item = 0x2002A;
-pub const T_FMT_AMPM: ::nl_item = 0x2002B;
-
-pub const ERA: ::nl_item = 0x2002C;
-pub const ERA_D_FMT: ::nl_item = 0x2002E;
-pub const ALT_DIGITS: ::nl_item = 0x2002F;
-pub const ERA_D_T_FMT: ::nl_item = 0x20030;
-pub const ERA_T_FMT: ::nl_item = 0x20031;
-
-pub const CODESET: ::nl_item = 14;
-
-pub const CRNCYSTR: ::nl_item = 0x4000F;
-
-pub const RUSAGE_THREAD: ::c_int = 1;
-pub const RUSAGE_CHILDREN: ::c_int = -1;
-
-pub const RADIXCHAR: ::nl_item = 0x10000;
-pub const THOUSEP: ::nl_item = 0x10001;
-
-pub const YESEXPR: ::nl_item = 0x50000;
-pub const NOEXPR: ::nl_item = 0x50001;
-pub const YESSTR: ::nl_item = 0x50002;
-pub const NOSTR: ::nl_item = 0x50003;
-
-pub const FILENAME_MAX: ::c_uint = 4096;
-pub const L_tmpnam: ::c_uint = 20;
-pub const _PC_LINK_MAX: ::c_int = 0;
-pub const _PC_MAX_CANON: ::c_int = 1;
-pub const _PC_MAX_INPUT: ::c_int = 2;
-pub const _PC_NAME_MAX: ::c_int = 3;
-pub const _PC_PATH_MAX: ::c_int = 4;
-pub const _PC_PIPE_BUF: ::c_int = 5;
-pub const _PC_CHOWN_RESTRICTED: ::c_int = 6;
-pub const _PC_NO_TRUNC: ::c_int = 7;
-pub const _PC_VDISABLE: ::c_int = 8;
-
-pub const _SC_ARG_MAX: ::c_int = 0;
-pub const _SC_CHILD_MAX: ::c_int = 1;
-pub const _SC_CLK_TCK: ::c_int = 2;
-pub const _SC_NGROUPS_MAX: ::c_int = 3;
-pub const _SC_OPEN_MAX: ::c_int = 4;
-pub const _SC_STREAM_MAX: ::c_int = 5;
-pub const _SC_TZNAME_MAX: ::c_int = 6;
-pub const _SC_JOB_CONTROL: ::c_int = 7;
-pub const _SC_SAVED_IDS: ::c_int = 8;
-pub const _SC_REALTIME_SIGNALS: ::c_int = 9;
-pub const _SC_PRIORITY_SCHEDULING: ::c_int = 10;
-pub const _SC_TIMERS: ::c_int = 11;
-pub const _SC_ASYNCHRONOUS_IO: ::c_int = 12;
-pub const _SC_PRIORITIZED_IO: ::c_int = 13;
-pub const _SC_SYNCHRONIZED_IO: ::c_int = 14;
-pub const _SC_FSYNC: ::c_int = 15;
-pub const _SC_MAPPED_FILES: ::c_int = 16;
-pub const _SC_MEMLOCK: ::c_int = 17;
-pub const _SC_MEMLOCK_RANGE: ::c_int = 18;
-pub const _SC_MEMORY_PROTECTION: ::c_int = 19;
-pub const _SC_MESSAGE_PASSING: ::c_int = 20;
-pub const _SC_SEMAPHORES: ::c_int = 21;
-pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 22;
-pub const _SC_AIO_LISTIO_MAX: ::c_int = 23;
-pub const _SC_AIO_MAX: ::c_int = 24;
-pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 25;
-pub const _SC_DELAYTIMER_MAX: ::c_int = 26;
-pub const _SC_MQ_OPEN_MAX: ::c_int = 27;
-pub const _SC_MQ_PRIO_MAX: ::c_int = 28;
-pub const _SC_VERSION: ::c_int = 29;
-pub const _SC_PAGESIZE: ::c_int = 30;
-pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
-pub const _SC_RTSIG_MAX: ::c_int = 31;
-pub const _SC_SEM_NSEMS_MAX: ::c_int = 32;
-pub const _SC_SEM_VALUE_MAX: ::c_int = 33;
-pub const _SC_SIGQUEUE_MAX: ::c_int = 34;
-pub const _SC_TIMER_MAX: ::c_int = 35;
-pub const _SC_BC_BASE_MAX: ::c_int = 36;
-pub const _SC_BC_DIM_MAX: ::c_int = 37;
-pub const _SC_BC_SCALE_MAX: ::c_int = 38;
-pub const _SC_BC_STRING_MAX: ::c_int = 39;
-pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 40;
-pub const _SC_EXPR_NEST_MAX: ::c_int = 42;
-pub const _SC_LINE_MAX: ::c_int = 43;
-pub const _SC_RE_DUP_MAX: ::c_int = 44;
-pub const _SC_2_VERSION: ::c_int = 46;
-pub const _SC_2_C_BIND: ::c_int = 47;
-pub const _SC_2_C_DEV: ::c_int = 48;
-pub const _SC_2_FORT_DEV: ::c_int = 49;
-pub const _SC_2_FORT_RUN: ::c_int = 50;
-pub const _SC_2_SW_DEV: ::c_int = 51;
-pub const _SC_2_LOCALEDEF: ::c_int = 52;
-pub const _SC_IOV_MAX: ::c_int = 60;
-pub const _SC_THREADS: ::c_int = 67;
-pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 68;
-pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 69;
-pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 70;
-pub const _SC_LOGIN_NAME_MAX: ::c_int = 71;
-pub const _SC_TTY_NAME_MAX: ::c_int = 72;
-pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 73;
-pub const _SC_THREAD_KEYS_MAX: ::c_int = 74;
-pub const _SC_THREAD_STACK_MIN: ::c_int = 75;
-pub const _SC_THREAD_THREADS_MAX: ::c_int = 76;
-pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 77;
-pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 78;
-pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 79;
-pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 80;
-pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 81;
-pub const _SC_NPROCESSORS_CONF: ::c_int = 83;
-pub const _SC_NPROCESSORS_ONLN: ::c_int = 84;
-pub const _SC_ATEXIT_MAX: ::c_int = 87;
-pub const _SC_XOPEN_VERSION: ::c_int = 89;
-pub const _SC_XOPEN_XCU_VERSION: ::c_int = 90;
-pub const _SC_XOPEN_UNIX: ::c_int = 91;
-pub const _SC_XOPEN_CRYPT: ::c_int = 92;
-pub const _SC_XOPEN_ENH_I18N: ::c_int = 93;
-pub const _SC_XOPEN_SHM: ::c_int = 94;
-pub const _SC_2_CHAR_TERM: ::c_int = 95;
-pub const _SC_2_UPE: ::c_int = 97;
-pub const _SC_XBS5_ILP32_OFF32: ::c_int = 125;
-pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 126;
-pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 128;
-pub const _SC_XOPEN_LEGACY: ::c_int = 129;
-pub const _SC_XOPEN_REALTIME: ::c_int = 130;
-pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 131;
-pub const _SC_HOST_NAME_MAX: ::c_int = 180;
-
-pub const RLIM_SAVED_MAX: ::rlim_t = RLIM_INFINITY;
-pub const RLIM_SAVED_CUR: ::rlim_t = RLIM_INFINITY;
-
-pub const GLOB_ERR: ::c_int = 1 << 0;
-pub const GLOB_MARK: ::c_int = 1 << 1;
-pub const GLOB_NOSORT: ::c_int = 1 << 2;
-pub const GLOB_DOOFFS: ::c_int = 1 << 3;
-pub const GLOB_NOCHECK: ::c_int = 1 << 4;
-pub const GLOB_APPEND: ::c_int = 1 << 5;
-pub const GLOB_NOESCAPE: ::c_int = 1 << 6;
-
-pub const GLOB_NOSPACE: ::c_int = 1;
-pub const GLOB_ABORTED: ::c_int = 2;
-pub const GLOB_NOMATCH: ::c_int = 3;
-
-pub const POSIX_MADV_NORMAL: ::c_int = 0;
-pub const POSIX_MADV_RANDOM: ::c_int = 1;
-pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2;
-pub const POSIX_MADV_WILLNEED: ::c_int = 3;
-
-pub const S_IEXEC: mode_t = 64;
-pub const S_IWRITE: mode_t = 128;
-pub const S_IREAD: mode_t = 256;
-
-pub const F_LOCK: ::c_int = 1;
-pub const F_TEST: ::c_int = 3;
-pub const F_TLOCK: ::c_int = 2;
-pub const F_ULOCK: ::c_int = 0;
-
-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_WRITE: ::c_ulong = 128;
-pub const ST_APPEND: ::c_ulong = 256;
-pub const ST_IMMUTABLE: ::c_ulong = 512;
-pub const ST_NOATIME: ::c_ulong = 1024;
-pub const ST_NODIRATIME: ::c_ulong = 2048;
-
-pub const RTLD_NEXT: *mut ::c_void = -1i64 as *mut ::c_void;
-pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void;
-pub const RTLD_NODELETE: ::c_int = 0x1000;
-pub const RTLD_NOW: ::c_int = 0x2;
-
-pub const TCP_MD5SIG: ::c_int = 14;
-
-pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
-    __align: [],
-    size: [0; __SIZEOF_PTHREAD_MUTEX_T],
-};
-pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
-    __align: [],
-    size: [0; __SIZEOF_PTHREAD_COND_T],
-};
-pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
-    __align: [],
-    size: [0; __SIZEOF_PTHREAD_RWLOCK_T],
-};
-pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
-pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
-pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
-pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
-pub const __SIZEOF_PTHREAD_COND_T: usize = 48;
-
-pub const SCHED_OTHER: ::c_int = 0;
-pub const SCHED_FIFO: ::c_int = 1;
-pub const SCHED_RR: ::c_int = 2;
-pub const SCHED_BATCH: ::c_int = 3;
-pub const SCHED_IDLE: ::c_int = 5;
-
-pub const AF_IB: ::c_int = 27;
-pub const AF_MPLS: ::c_int = 28;
-pub const AF_NFC: ::c_int = 39;
-pub const AF_VSOCK: ::c_int = 40;
-#[doc(hidden)]
-pub const AF_MAX: ::c_int = 42;
-pub const PF_IB: ::c_int = AF_IB;
-pub const PF_MPLS: ::c_int = AF_MPLS;
-pub const PF_NFC: ::c_int = AF_NFC;
-pub const PF_VSOCK: ::c_int = AF_VSOCK;
-#[doc(hidden)]
-pub const PF_MAX: ::c_int = AF_MAX;
-
-// System V IPC
-pub const IPC_PRIVATE: ::key_t = 0;
-
-pub const IPC_CREAT: ::c_int = 0o1000;
-pub const IPC_EXCL: ::c_int = 0o2000;
-pub const IPC_NOWAIT: ::c_int = 0o4000;
-
-pub const IPC_RMID: ::c_int = 0;
-pub const IPC_SET: ::c_int = 1;
-pub const IPC_STAT: ::c_int = 2;
-pub const IPC_INFO: ::c_int = 3;
-pub const MSG_STAT: ::c_int = 11;
-pub const MSG_INFO: ::c_int = 12;
-
-pub const MSG_NOERROR: ::c_int = 0o10000;
-pub const MSG_EXCEPT: ::c_int = 0o20000;
-pub const MSG_COPY: ::c_int = 0o40000;
-
-pub const SHM_R: ::c_int = 0o400;
-pub const SHM_W: ::c_int = 0o200;
-
-pub const SHM_RDONLY: ::c_int = 0o10000;
-pub const SHM_RND: ::c_int = 0o20000;
-pub const SHM_REMAP: ::c_int = 0o40000;
-pub const SHM_EXEC: ::c_int = 0o100000;
-
-pub const SHM_LOCK: ::c_int = 11;
-pub const SHM_UNLOCK: ::c_int = 12;
-
-pub const SHM_HUGETLB: ::c_int = 0o4000;
-pub const SHM_NORESERVE: ::c_int = 0o10000;
-
-pub const EPOLLRDHUP: ::c_int = 0x2000;
-pub const EPOLLEXCLUSIVE: ::c_int = 0x10000000;
-pub const EPOLLONESHOT: ::c_int = 0x40000000;
-
-pub const QFMT_VFS_OLD: ::c_int = 1;
-pub const QFMT_VFS_V0: ::c_int = 2;
-
-pub const EFD_SEMAPHORE: ::c_int = 0x1;
-
-pub const LOG_NFACILITIES: ::c_int = 24;
-
-pub const SEM_FAILED: *mut ::sem_t = 0 as *mut sem_t;
-
-pub const RB_AUTOBOOT: ::c_int = 0x01234567u32 as i32;
-pub const RB_HALT_SYSTEM: ::c_int = 0xcdef0123u32 as i32;
-pub const RB_ENABLE_CAD: ::c_int = 0x89abcdefu32 as i32;
-pub const RB_DISABLE_CAD: ::c_int = 0x00000000u32 as i32;
-pub const RB_POWER_OFF: ::c_int = 0x4321fedcu32 as i32;
-pub const RB_SW_SUSPEND: ::c_int = 0xd000fce2u32 as i32;
-pub const RB_KEXEC: ::c_int = 0x45584543u32 as i32;
-
-pub const AI_PASSIVE: ::c_int = 0x0001;
-pub const AI_CANONNAME: ::c_int = 0x0002;
-pub const AI_NUMERICHOST: ::c_int = 0x0004;
-pub const AI_V4MAPPED: ::c_int = 0x0008;
-pub const AI_ALL: ::c_int = 0x0010;
-pub const AI_ADDRCONFIG: ::c_int = 0x0020;
-
-pub const AI_NUMERICSERV: ::c_int = 0x0400;
-
-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_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_OVERFLOW: ::c_int = -12;
-
-pub const NI_NUMERICHOST: ::c_int = 1;
-pub const NI_NUMERICSERV: ::c_int = 2;
-pub const NI_NOFQDN: ::c_int = 4;
-pub const NI_NAMEREQD: ::c_int = 8;
-pub const NI_DGRAM: ::c_int = 16;
-
-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;
-pub const LIO_READ: ::c_int = 0;
-pub const LIO_WRITE: ::c_int = 1;
-pub const LIO_NOP: ::c_int = 2;
-pub const LIO_WAIT: ::c_int = 0;
-pub const LIO_NOWAIT: ::c_int = 1;
-
-pub const MREMAP_MAYMOVE: ::c_int = 1;
-pub const MREMAP_FIXED: ::c_int = 2;
-
-pub const PR_SET_PDEATHSIG: ::c_int = 1;
-pub const PR_GET_PDEATHSIG: ::c_int = 2;
-
-pub const PR_GET_DUMPABLE: ::c_int = 3;
-pub const PR_SET_DUMPABLE: ::c_int = 4;
-
-pub const PR_GET_UNALIGN: ::c_int = 5;
-pub const PR_SET_UNALIGN: ::c_int = 6;
-pub const PR_UNALIGN_NOPRINT: ::c_int = 1;
-pub const PR_UNALIGN_SIGBUS: ::c_int = 2;
-
-pub const PR_GET_KEEPCAPS: ::c_int = 7;
-pub const PR_SET_KEEPCAPS: ::c_int = 8;
-
-pub const PR_GET_FPEMU: ::c_int = 9;
-pub const PR_SET_FPEMU: ::c_int = 10;
-pub const PR_FPEMU_NOPRINT: ::c_int = 1;
-pub const PR_FPEMU_SIGFPE: ::c_int = 2;
-
-pub const PR_GET_FPEXC: ::c_int = 11;
-pub const PR_SET_FPEXC: ::c_int = 12;
-pub const PR_FP_EXC_SW_ENABLE: ::c_int = 0x80;
-pub const PR_FP_EXC_DIV: ::c_int = 0x010000;
-pub const PR_FP_EXC_OVF: ::c_int = 0x020000;
-pub const PR_FP_EXC_UND: ::c_int = 0x040000;
-pub const PR_FP_EXC_RES: ::c_int = 0x080000;
-pub const PR_FP_EXC_INV: ::c_int = 0x100000;
-pub const PR_FP_EXC_DISABLED: ::c_int = 0;
-pub const PR_FP_EXC_NONRECOV: ::c_int = 1;
-pub const PR_FP_EXC_ASYNC: ::c_int = 2;
-pub const PR_FP_EXC_PRECISE: ::c_int = 3;
-
-pub const PR_GET_TIMING: ::c_int = 13;
-pub const PR_SET_TIMING: ::c_int = 14;
-pub const PR_TIMING_STATISTICAL: ::c_int = 0;
-pub const PR_TIMING_TIMESTAMP: ::c_int = 1;
-
-pub const PR_SET_NAME: ::c_int = 15;
-pub const PR_GET_NAME: ::c_int = 16;
-
-pub const PR_GET_ENDIAN: ::c_int = 19;
-pub const PR_SET_ENDIAN: ::c_int = 20;
-pub const PR_ENDIAN_BIG: ::c_int = 0;
-pub const PR_ENDIAN_LITTLE: ::c_int = 1;
-pub const PR_ENDIAN_PPC_LITTLE: ::c_int = 2;
-
-pub const PR_GET_SECCOMP: ::c_int = 21;
-pub const PR_SET_SECCOMP: ::c_int = 22;
-
-pub const PR_CAPBSET_READ: ::c_int = 23;
-pub const PR_CAPBSET_DROP: ::c_int = 24;
-
-pub const PR_GET_TSC: ::c_int = 25;
-pub const PR_SET_TSC: ::c_int = 26;
-pub const PR_TSC_ENABLE: ::c_int = 1;
-pub const PR_TSC_SIGSEGV: ::c_int = 2;
-
-pub const PR_GET_SECUREBITS: ::c_int = 27;
-pub const PR_SET_SECUREBITS: ::c_int = 28;
-
-pub const PR_SET_TIMERSLACK: ::c_int = 29;
-pub const PR_GET_TIMERSLACK: ::c_int = 30;
-
-pub const PR_TASK_PERF_EVENTS_DISABLE: ::c_int = 31;
-pub const PR_TASK_PERF_EVENTS_ENABLE: ::c_int = 32;
-
-pub const PR_MCE_KILL: ::c_int = 33;
-pub const PR_MCE_KILL_CLEAR: ::c_int = 0;
-pub const PR_MCE_KILL_SET: ::c_int = 1;
-
-pub const PR_MCE_KILL_LATE: ::c_int = 0;
-pub const PR_MCE_KILL_EARLY: ::c_int = 1;
-pub const PR_MCE_KILL_DEFAULT: ::c_int = 2;
-
-pub const PR_MCE_KILL_GET: ::c_int = 34;
-
-pub const PR_SET_MM: ::c_int = 35;
-pub const PR_SET_MM_START_CODE: ::c_int = 1;
-pub const PR_SET_MM_END_CODE: ::c_int = 2;
-pub const PR_SET_MM_START_DATA: ::c_int = 3;
-pub const PR_SET_MM_END_DATA: ::c_int = 4;
-pub const PR_SET_MM_START_STACK: ::c_int = 5;
-pub const PR_SET_MM_START_BRK: ::c_int = 6;
-pub const PR_SET_MM_BRK: ::c_int = 7;
-pub const PR_SET_MM_ARG_START: ::c_int = 8;
-pub const PR_SET_MM_ARG_END: ::c_int = 9;
-pub const PR_SET_MM_ENV_START: ::c_int = 10;
-pub const PR_SET_MM_ENV_END: ::c_int = 11;
-pub const PR_SET_MM_AUXV: ::c_int = 12;
-pub const PR_SET_MM_EXE_FILE: ::c_int = 13;
-pub const PR_SET_MM_MAP: ::c_int = 14;
-pub const PR_SET_MM_MAP_SIZE: ::c_int = 15;
-
-pub const PR_SET_PTRACER: ::c_int = 0x59616d61;
-
-pub const PR_SET_CHILD_SUBREAPER: ::c_int = 36;
-pub const PR_GET_CHILD_SUBREAPER: ::c_int = 37;
-
-pub const PR_SET_NO_NEW_PRIVS: ::c_int = 38;
-pub const PR_GET_NO_NEW_PRIVS: ::c_int = 39;
-
-pub const PR_GET_TID_ADDRESS: ::c_int = 40;
-
-pub const PR_SET_THP_DISABLE: ::c_int = 41;
-pub const PR_GET_THP_DISABLE: ::c_int = 42;
-
-pub const PR_MPX_ENABLE_MANAGEMENT: ::c_int = 43;
-pub const PR_MPX_DISABLE_MANAGEMENT: ::c_int = 44;
-
-pub const PR_SET_FP_MODE: ::c_int = 45;
-pub const PR_GET_FP_MODE: ::c_int = 46;
-pub const PR_FP_MODE_FR: ::c_int = 1 << 0;
-pub const PR_FP_MODE_FRE: ::c_int = 1 << 1;
-
-pub const PR_CAP_AMBIENT: ::c_int = 47;
-pub const PR_CAP_AMBIENT_IS_SET: ::c_int = 1;
-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 ITIMER_REAL: ::c_int = 0;
-pub const ITIMER_VIRTUAL: ::c_int = 1;
-pub const ITIMER_PROF: ::c_int = 2;
-
-pub const XATTR_CREATE: ::c_int = 0x1;
-pub const XATTR_REPLACE: ::c_int = 0x2;
-
-// On Linux, libc doesn't define this constant, libattr does instead.
-// We still define it for Linux as it's defined by libc on other platforms,
-// and it's mentioned in the man pages for getxattr and setxattr.
-pub const ENOATTR: ::c_int = ::ENODATA;
-
-f! {
-    pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
-        for slot in cpuset.bits.iter_mut() {
-            *slot = 0;
-        }
-    }
-
-    pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () {
-        let size_in_bits = 8 * mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc
-        let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
-        cpuset.bits[idx] |= 1 << offset;
-        ()
-    }
-
-    pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () {
-        let size_in_bits = 8 * mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc
-        let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
-        cpuset.bits[idx] &= !(1 << offset);
-        ()
-    }
-
-    pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool {
-        let size_in_bits = 8 * mem::size_of_val(&cpuset.bits[0]);
-        let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
-        0 != (cpuset.bits[idx] & (1 << offset))
-    }
-
-    pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool {
-        set1.bits == set2.bits
-    }
-
-    pub fn major(dev: ::dev_t) -> ::c_uint {
-        let mut major = 0;
-        major |= (dev & 0x00000000000fff00) >> 8;
-        major |= (dev & 0xfffff00000000000) >> 32;
-        major as ::c_uint
-    }
-
-    pub fn minor(dev: ::dev_t) -> ::c_uint {
-        let mut minor = 0;
-        minor |= (dev & 0xfffff00000000000) >> 0;
-        minor |= (dev & 0x00000ffffff00000) >> 12;
-        minor as ::c_uint
-    }
-
-    pub fn makedev(major: ::c_uint, minor: ::c_uint) -> ::dev_t {
-        let major = major as ::dev_t;
-        let minor = minor as ::dev_t;
-        let mut dev = 0;
-        dev |= (major & 0x00000fff) << 8;
-        dev |= (major & 0xfffff000) << 32;
-        dev |= (minor & 0x000000ff) << 0;
-        dev |= (minor & 0xffffff00) << 12;
-        dev
-    }
-}
-
-extern {
-    pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int;
-    pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
-    pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
-    pub fn aio_error(aiocbp: *const aiocb) -> ::c_int;
-    pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t;
-    pub fn aio_suspend(aiocb_list: *const *const aiocb, nitems: ::c_int,
-                       timeout: *const ::timespec) -> ::c_int;
-    pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
-    pub fn lio_listio(mode: ::c_int, aiocb_list: *const *mut aiocb,
-                      nitems: ::c_int, sevp: *mut ::sigevent) -> ::c_int;
-
-    pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
-
-    pub fn setpwent();
-    pub fn getpwent() -> *mut passwd;
-    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,
-                    mode: mode_t) -> ::c_int;
-
-    // System V IPC
-    pub fn shmget(key: ::key_t, size: ::size_t, shmflg: ::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;
-    pub fn shmctl(shmid: ::c_int,
-                  cmd: ::c_int,
-                  buf: *mut ::shmid_ds) -> ::c_int;
-    pub fn ftok(pathname: *const ::c_char, proj_id: ::c_int) -> ::key_t;
-    pub fn semget(key: ::key_t, nsems: ::c_int, semflag: ::c_int) -> ::c_int;
-    pub fn semop(semid: ::c_int,
-                 sops: *mut ::sembuf, nsops: ::size_t) -> ::c_int;
-    pub fn semctl(semid: ::c_int,
-                  semnum: ::c_int, cmd: ::c_int, ...) -> ::c_int;
-    pub fn msgctl(msqid: ::c_int, cmd: ::c_int, buf: *mut msqid_ds) -> ::c_int;
-    pub fn msgget(key: ::key_t, msgflg: ::c_int) -> ::c_int;
-    pub fn msgrcv(msqid: ::c_int, msgp: *mut ::c_void, msgsz: ::size_t,
-                  msgtyp: ::c_long, msgflg: ::c_int) -> ::ssize_t;
-    pub fn msgsnd(msqid: ::c_int, msgp: *const ::c_void, msgsz: ::size_t,
-                  msgflg: ::c_int) -> ::c_int;
-
-    pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
-                    -> ::c_int;
-    pub fn __errno_location() -> *mut ::c_int;
-
-    pub fn fopen64(filename: *const c_char,
-                   mode: *const c_char) -> *mut ::FILE;
-    pub fn freopen64(filename: *const c_char, mode: *const c_char,
-                     file: *mut ::FILE) -> *mut ::FILE;
-    pub fn tmpfile64() -> *mut ::FILE;
-    pub fn fgetpos64(stream: *mut ::FILE, ptr: *mut fpos64_t) -> ::c_int;
-    pub fn fsetpos64(stream: *mut ::FILE, ptr: *const fpos64_t) -> ::c_int;
-    pub fn fseeko64(stream: *mut ::FILE,
-                    offset: ::off64_t,
-                    whence: ::c_int) -> ::c_int;
-    pub fn ftello64(stream: *mut ::FILE) -> ::off64_t;
-    pub fn fallocate(fd: ::c_int, mode: ::c_int,
-                     offset: ::off_t, len: ::off_t) -> ::c_int;
-    pub fn posix_fallocate(fd: ::c_int, offset: ::off_t,
-                           len: ::off_t) -> ::c_int;
-    pub fn readahead(fd: ::c_int, offset: ::off64_t,
-                     count: ::size_t) -> ::ssize_t;
-    pub fn getxattr(path: *const c_char, name: *const c_char,
-                    value: *mut ::c_void, size: ::size_t) -> ::ssize_t;
-    pub fn lgetxattr(path: *const c_char, name: *const c_char,
-                     value: *mut ::c_void, size: ::size_t) -> ::ssize_t;
-    pub fn fgetxattr(filedes: ::c_int, name: *const c_char,
-                     value: *mut ::c_void, size: ::size_t) -> ::ssize_t;
-    pub fn setxattr(path: *const c_char, name: *const c_char,
-                    value: *const ::c_void, size: ::size_t,
-                    flags: ::c_int) -> ::c_int;
-    pub fn lsetxattr(path: *const c_char, name: *const c_char,
-                     value: *const ::c_void, size: ::size_t,
-                     flags: ::c_int) -> ::c_int;
-    pub fn fsetxattr(filedes: ::c_int, name: *const c_char,
-                     value: *const ::c_void, size: ::size_t,
-                     flags: ::c_int) -> ::c_int;
-    pub fn listxattr(path: *const c_char, list: *mut c_char,
-                     size: ::size_t) -> ::ssize_t;
-    pub fn llistxattr(path: *const c_char, list: *mut c_char,
-                      size: ::size_t) -> ::ssize_t;
-    pub fn flistxattr(filedes: ::c_int, list: *mut c_char,
-                      size: ::size_t) -> ::ssize_t;
-    pub fn removexattr(path: *const c_char, name: *const c_char) -> ::c_int;
-    pub fn lremovexattr(path: *const c_char, name: *const c_char) -> ::c_int;
-    pub fn fremovexattr(filedes: ::c_int, name: *const c_char) -> ::c_int;
-    pub fn signalfd(fd: ::c_int,
-                    mask: *const ::sigset_t,
-                    flags: ::c_int) -> ::c_int;
-    pub fn pwritev(fd: ::c_int,
-                   iov: *const ::iovec,
-                   iovcnt: ::c_int,
-                   offset: ::off_t) -> ::ssize_t;
-    pub fn preadv(fd: ::c_int,
-                  iov: *const ::iovec,
-                  iovcnt: ::c_int,
-                  offset: ::off_t) -> ::ssize_t;
-    pub fn quotactl(cmd: ::c_int,
-                    special: *const ::c_char,
-                    id: ::c_int,
-                    data: *mut ::c_char) -> ::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_unlink(name: *const ::c_char) -> ::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_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int;
-    pub fn mq_setattr(mqd: ::mqd_t,
-                      newattr: *const ::mq_attr,
-                      oldattr: *mut ::mq_attr) -> ::c_int;
-    pub fn epoll_pwait(epfd: ::c_int,
-                       events: *mut ::epoll_event,
-                       maxevents: ::c_int,
-                       timeout: ::c_int,
-                       sigmask: *const ::sigset_t) -> ::c_int;
-    pub fn dup3(oldfd: ::c_int, newfd: ::c_int, flags: ::c_int) -> ::c_int;
-    pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
-    pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int;
-    pub fn mkostemps(template: *mut ::c_char,
-                     suffixlen: ::c_int,
-                     flags: ::c_int) -> ::c_int;
-    pub fn sigtimedwait(set: *const sigset_t,
-                        info: *mut siginfo_t,
-                        timeout: *const ::timespec) -> ::c_int;
-    pub fn sigwaitinfo(set: *const sigset_t,
-                       info: *mut siginfo_t) -> ::c_int;
-    pub fn openpty(amaster: *mut ::c_int,
-                   aslave: *mut ::c_int,
-                   name: *mut ::c_char,
-                   termp: *const termios,
-                   winp: *const ::winsize) -> ::c_int;
-    pub fn forkpty(amaster: *mut ::c_int,
-                   name: *mut ::c_char,
-                   termp: *const termios,
-                   winp: *const ::winsize) -> ::pid_t;
-    pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char;
-    pub fn getnameinfo(sa: *const ::sockaddr,
-                       salen: ::socklen_t,
-                       host: *mut ::c_char,
-                       hostlen: ::socklen_t,
-                       serv: *mut ::c_char,
-                       sevlen: ::socklen_t,
-                       flags: ::c_int) -> ::c_int;
-    pub fn pthread_setschedprio(native: ::pthread_t,
-                                priority: ::c_int) -> ::c_int;
-    pub fn prlimit(pid: ::pid_t, resource: ::c_int, new_limit: *const ::rlimit,
-                   old_limit: *mut ::rlimit) -> ::c_int;
-    pub fn prlimit64(pid: ::pid_t,
-                     resource: ::c_int,
-                     new_limit: *const ::rlimit64,
-                     old_limit: *mut ::rlimit64) -> ::c_int;
-    pub fn getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int;
-    pub fn process_vm_readv(pid: ::pid_t,
-                            local_iov: *const ::iovec,
-                            liovcnt: ::c_ulong,
-                            remote_iov: *const ::iovec,
-                            riovcnt: ::c_ulong,
-                            flags: ::c_ulong) -> isize;
-    pub fn process_vm_writev(pid: ::pid_t,
-                             local_iov: *const ::iovec,
-                             liovcnt: ::c_ulong,
-                             remote_iov: *const ::iovec,
-                             riovcnt: ::c_ulong,
-                             flags: ::c_ulong) -> isize;
-    pub fn reboot(how_to: ::c_int) -> ::c_int;
-    pub fn setfsgid(gid: ::gid_t) -> ::c_int;
-    pub fn setfsuid(uid: ::uid_t) -> ::c_int;
-    pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int;
-    pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int;
-
-    // Not available now on Android
-    pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,
-                    mode: ::mode_t) -> ::c_int;
-    pub fn if_nameindex() -> *mut if_nameindex;
-    pub fn if_freenameindex(ptr: *mut if_nameindex);
-    pub fn sync_file_range(fd: ::c_int, offset: ::off64_t,
-                           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,
-                  flags: ::c_int,
-                  ...) -> *mut ::c_void;
-
-    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;
-    pub fn globfree(pglob: *mut ::glob_t);
-
-    pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
-                         -> ::c_int;
-
-    pub fn shm_unlink(name: *const ::c_char) -> ::c_int;
-
-    pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long);
-
-    pub fn telldir(dirp: *mut ::DIR) -> ::c_long;
-    pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
-                  -> ::c_int;
-
-    pub fn msync(addr: *mut ::c_void, len: ::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;
-    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 nl_langinfo(item: ::nl_item) -> *mut ::c_char;
-
-    pub fn bind(socket: ::c_int, address: *const ::sockaddr,
-                address_len: ::socklen_t) -> ::c_int;
-
-    pub fn writev(fd: ::c_int,
-                  iov: *const ::iovec,
-                  iovcnt: ::c_int) -> ::ssize_t;
-    pub fn readv(fd: ::c_int,
-                 iov: *const ::iovec,
-                 iovcnt: ::c_int) -> ::ssize_t;
-
-    pub fn sendmsg(fd: ::c_int,
-                   msg: *const ::msghdr,
-                   flags: ::c_int) -> ::ssize_t;
-    pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
-                   -> ::ssize_t;
-    pub fn getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int;
-    pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int;
-    pub fn vhangup() -> ::c_int;
-}
-
-extern {
-    pub fn sendmmsg(sockfd: ::c_int, msgvec: *mut mmsghdr, vlen: ::c_uint,
-                    flags: ::c_int) -> ::c_int;
-    pub fn recvmmsg(sockfd: ::c_int, msgvec: *mut mmsghdr, vlen: ::c_uint,
-                    flags: ::c_int, timeout: *mut ::timespec) -> ::c_int;
-    pub fn sync();
-}
-
-cfg_if! {
-    if #[cfg(any(target_env = "musl",
-                 target_os = "fuchsia",
-                 target_os = "emscripten"))] {
-        mod musl;
-        pub use self::musl::*;
-    } else if #[cfg(any(target_arch = "mips",
-                        target_arch = "mips64"))] {
-        mod mips;
-        pub use self::mips::*;
-    } else if #[cfg(any(target_arch = "s390x"))] {
-        mod s390x;
-        pub use self::s390x::*;
-    } else {
-        mod other;
-        pub use self::other::*;
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/linux/musl/b32/arm.rs
+++ /dev/null
@@ -1,346 +0,0 @@
-pub type c_char = u8;
-pub type wchar_t = u32;
-
-s! {
-    pub struct stat {
-        pub st_dev: ::dev_t,
-        __st_dev_padding: ::c_int,
-        __st_ino_truncated: ::c_long,
-        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,
-        __st_rdev_padding: ::c_int,
-        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,
-        pub st_ino: ::ino_t,
-    }
-
-    pub struct stat64 {
-        pub st_dev: ::dev_t,
-        __st_dev_padding: ::c_int,
-        __st_ino_truncated: ::c_long,
-        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,
-        __st_rdev_padding: ::c_int,
-        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,
-        pub st_ino: ::ino_t,
-    }
-
-    pub struct stack_t {
-        pub ss_sp: *mut ::c_void,
-        pub ss_flags: ::c_int,
-        pub ss_size: ::size_t
-    }
-
-    pub struct shmid_ds {
-        pub shm_perm: ::ipc_perm,
-        pub shm_segsz: ::size_t,
-        pub shm_atime: ::time_t,
-        __unused1: ::c_int,
-        pub shm_dtime: ::time_t,
-        __unused2: ::c_int,
-        pub shm_ctime: ::time_t,
-        __unused3: ::c_int,
-        pub shm_cpid: ::pid_t,
-        pub shm_lpid: ::pid_t,
-        pub shm_nattch: ::c_ulong,
-        __pad1: ::c_ulong,
-        __pad2: ::c_ulong,
-    }
-
-    pub struct msqid_ds {
-        pub msg_perm: ::ipc_perm,
-        pub msg_stime: ::time_t,
-        __unused1: ::c_int,
-        pub msg_rtime: ::time_t,
-        __unused2: ::c_int,
-        pub msg_ctime: ::time_t,
-        __unused3: ::c_int,
-        __msg_cbytes: ::c_ulong,
-        pub msg_qnum: ::msgqnum_t,
-        pub msg_qbytes: ::msglen_t,
-        pub msg_lspid: ::pid_t,
-        pub msg_lrpid: ::pid_t,
-        __pad1: ::c_ulong,
-        __pad2: ::c_ulong,
-    }
-
-    pub struct statfs {
-        pub f_type: ::c_ulong,
-        pub f_bsize: ::c_ulong,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_files: ::fsfilcnt_t,
-        pub f_ffree: ::fsfilcnt_t,
-        pub f_fsid: ::fsid_t,
-        pub f_namelen: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_flags: ::c_ulong,
-        pub f_spare: [::c_ulong; 4],
-    }
-
-    pub struct siginfo_t {
-        pub si_signo: ::c_int,
-        pub si_errno: ::c_int,
-        pub si_code: ::c_int,
-        pub _pad: [::c_int; 29],
-        _align: [usize; 0],
-    }
-}
-
-pub const O_DIRECT: ::c_int = 0x4000;
-pub const O_DIRECTORY: ::c_int = 0x10000;
-pub const O_NOFOLLOW: ::c_int = 0x20000;
-pub const O_ASYNC: ::c_int = 0x2000;
-
-pub const FIOCLEX: ::c_int = 0x5451;
-pub const FIONBIO: ::c_int = 0x5421;
-
-pub const RLIMIT_RSS: ::c_int = 5;
-pub const RLIMIT_NOFILE: ::c_int = 7;
-pub const RLIMIT_AS: ::c_int = 9;
-pub const RLIMIT_NPROC: ::c_int = 6;
-pub const RLIMIT_MEMLOCK: ::c_int = 8;
-
-pub const O_APPEND: ::c_int = 1024;
-pub const O_CREAT: ::c_int = 64;
-pub const O_EXCL: ::c_int = 128;
-pub const O_NOCTTY: ::c_int = 256;
-pub const O_NONBLOCK: ::c_int = 2048;
-pub const O_SYNC: ::c_int = 1052672;
-pub const O_RSYNC: ::c_int = 1052672;
-pub const O_DSYNC: ::c_int = 4096;
-
-pub const SOCK_NONBLOCK: ::c_int = 2048;
-
-pub const MAP_ANON: ::c_int = 0x0020;
-pub const MAP_GROWSDOWN: ::c_int = 0x0100;
-pub const MAP_DENYWRITE: ::c_int = 0x0800;
-pub const MAP_EXECUTABLE: ::c_int = 0x01000;
-pub const MAP_LOCKED: ::c_int = 0x02000;
-pub const MAP_NORESERVE: ::c_int = 0x04000;
-pub const MAP_POPULATE: ::c_int = 0x08000;
-pub const MAP_NONBLOCK: ::c_int = 0x010000;
-pub const MAP_STACK: ::c_int = 0x020000;
-
-pub const SOCK_STREAM: ::c_int = 1;
-pub const SOCK_DGRAM: ::c_int = 2;
-pub const SOCK_SEQPACKET: ::c_int = 5;
-
-pub const SOL_SOCKET: ::c_int = 1;
-
-pub const EDEADLK: ::c_int = 35;
-pub const ENAMETOOLONG: ::c_int = 36;
-pub const ENOLCK: ::c_int = 37;
-pub const ENOSYS: ::c_int = 38;
-pub const ENOTEMPTY: ::c_int = 39;
-pub const ELOOP: ::c_int = 40;
-pub const ENOMSG: ::c_int = 42;
-pub const EIDRM: ::c_int = 43;
-pub const ECHRNG: ::c_int = 44;
-pub const EL2NSYNC: ::c_int = 45;
-pub const EL3HLT: ::c_int = 46;
-pub const EL3RST: ::c_int = 47;
-pub const ELNRNG: ::c_int = 48;
-pub const EUNATCH: ::c_int = 49;
-pub const ENOCSI: ::c_int = 50;
-pub const EL2HLT: ::c_int = 51;
-pub const EBADE: ::c_int = 52;
-pub const EBADR: ::c_int = 53;
-pub const EXFULL: ::c_int = 54;
-pub const ENOANO: ::c_int = 55;
-pub const EBADRQC: ::c_int = 56;
-pub const EBADSLT: ::c_int = 57;
-pub const EDEADLOCK: ::c_int = EDEADLK;
-pub const EMULTIHOP: ::c_int = 72;
-pub const EBADMSG: ::c_int = 74;
-pub const EOVERFLOW: ::c_int = 75;
-pub const ENOTUNIQ: ::c_int = 76;
-pub const EBADFD: ::c_int = 77;
-pub const EREMCHG: ::c_int = 78;
-pub const ELIBACC: ::c_int = 79;
-pub const ELIBBAD: ::c_int = 80;
-pub const ELIBSCN: ::c_int = 81;
-pub const ELIBMAX: ::c_int = 82;
-pub const ELIBEXEC: ::c_int = 83;
-pub const EILSEQ: ::c_int = 84;
-pub const ERESTART: ::c_int = 85;
-pub const ESTRPIPE: ::c_int = 86;
-pub const EUSERS: ::c_int = 87;
-pub const ENOTSOCK: ::c_int = 88;
-pub const EDESTADDRREQ: ::c_int = 89;
-pub const EMSGSIZE: ::c_int = 90;
-pub const EPROTOTYPE: ::c_int = 91;
-pub const ENOPROTOOPT: ::c_int = 92;
-pub const EPROTONOSUPPORT: ::c_int = 93;
-pub const ESOCKTNOSUPPORT: ::c_int = 94;
-pub const EOPNOTSUPP: ::c_int = 95;
-pub const ENOTSUP: ::c_int = EOPNOTSUPP;
-pub const EPFNOSUPPORT: ::c_int = 96;
-pub const EAFNOSUPPORT: ::c_int = 97;
-pub const EADDRINUSE: ::c_int = 98;
-pub const EADDRNOTAVAIL: ::c_int = 99;
-pub const ENETDOWN: ::c_int = 100;
-pub const ENETUNREACH: ::c_int = 101;
-pub const ENETRESET: ::c_int = 102;
-pub const ECONNABORTED: ::c_int = 103;
-pub const ECONNRESET: ::c_int = 104;
-pub const ENOBUFS: ::c_int = 105;
-pub const EISCONN: ::c_int = 106;
-pub const ENOTCONN: ::c_int = 107;
-pub const ESHUTDOWN: ::c_int = 108;
-pub const ETOOMANYREFS: ::c_int = 109;
-pub const ETIMEDOUT: ::c_int = 110;
-pub const ECONNREFUSED: ::c_int = 111;
-pub const EHOSTDOWN: ::c_int = 112;
-pub const EHOSTUNREACH: ::c_int = 113;
-pub const EALREADY: ::c_int = 114;
-pub const EINPROGRESS: ::c_int = 115;
-pub const ESTALE: ::c_int = 116;
-pub const EUCLEAN: ::c_int = 117;
-pub const ENOTNAM: ::c_int = 118;
-pub const ENAVAIL: ::c_int = 119;
-pub const EISNAM: ::c_int = 120;
-pub const EREMOTEIO: ::c_int = 121;
-pub const EDQUOT: ::c_int = 122;
-pub const ENOMEDIUM: ::c_int = 123;
-pub const EMEDIUMTYPE: ::c_int = 124;
-pub const ECANCELED: ::c_int = 125;
-pub const ENOKEY: ::c_int = 126;
-pub const EKEYEXPIRED: ::c_int = 127;
-pub const EKEYREVOKED: ::c_int = 128;
-pub const EKEYREJECTED: ::c_int = 129;
-pub const EOWNERDEAD: ::c_int = 130;
-pub const ENOTRECOVERABLE: ::c_int = 131;
-pub const ERFKILL: ::c_int = 132;
-pub const EHWPOISON: ::c_int = 133;
-
-pub const SO_REUSEADDR: ::c_int = 2;
-pub const SO_TYPE: ::c_int = 3;
-pub const SO_ERROR: ::c_int = 4;
-pub const SO_DONTROUTE: ::c_int = 5;
-pub const SO_BROADCAST: ::c_int = 6;
-pub const SO_SNDBUF: ::c_int = 7;
-pub const SO_RCVBUF: ::c_int = 8;
-pub const SO_KEEPALIVE: ::c_int = 9;
-pub const SO_OOBINLINE: ::c_int = 10;
-pub const SO_NO_CHECK: ::c_int = 11;
-pub const SO_PRIORITY: ::c_int = 12;
-pub const SO_LINGER: ::c_int = 13;
-pub const SO_BSDCOMPAT: ::c_int = 14;
-pub const SO_REUSEPORT: ::c_int = 15;
-pub const SO_PASSCRED: ::c_int = 16;
-pub const SO_PEERCRED: ::c_int = 17;
-pub const SO_RCVLOWAT: ::c_int = 18;
-pub const SO_SNDLOWAT: ::c_int = 19;
-pub const SO_RCVTIMEO: ::c_int = 20;
-pub const SO_SNDTIMEO: ::c_int = 21;
-pub const SO_ACCEPTCONN: ::c_int = 30;
-pub const SO_SNDBUFFORCE: ::c_int = 32;
-pub const SO_RCVBUFFORCE: ::c_int = 33;
-pub const SO_PROTOCOL: ::c_int = 38;
-pub const SO_DOMAIN: ::c_int = 39;
-
-pub const SA_ONSTACK: ::c_int = 0x08000000;
-pub const SA_SIGINFO: ::c_int = 0x00000004;
-pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
-
-pub const SIGCHLD: ::c_int = 17;
-pub const SIGBUS: ::c_int = 7;
-pub const SIGTTIN: ::c_int = 21;
-pub const SIGTTOU: ::c_int = 22;
-pub const SIGXCPU: ::c_int = 24;
-pub const SIGXFSZ: ::c_int = 25;
-pub const SIGVTALRM: ::c_int = 26;
-pub const SIGPROF: ::c_int = 27;
-pub const SIGWINCH: ::c_int = 28;
-pub const SIGUSR1: ::c_int = 10;
-pub const SIGUSR2: ::c_int = 12;
-pub const SIGCONT: ::c_int = 18;
-pub const SIGSTOP: ::c_int = 19;
-pub const SIGTSTP: ::c_int = 20;
-pub const SIGURG: ::c_int = 23;
-pub const SIGIO: ::c_int = 29;
-pub const SIGSYS: ::c_int = 31;
-pub const SIGSTKFLT: ::c_int = 16;
-pub const SIGPOLL: ::c_int = 29;
-pub const SIGPWR: ::c_int = 30;
-pub const SIG_SETMASK: ::c_int = 2;
-pub const SIG_BLOCK: ::c_int = 0x000000;
-pub const SIG_UNBLOCK: ::c_int = 0x01;
-
-pub const EXTPROC: ::tcflag_t = 0x00010000;
-
-pub const MAP_HUGETLB: ::c_int = 0x040000;
-
-pub const F_GETLK: ::c_int = 12;
-pub const F_GETOWN: ::c_int = 9;
-pub const F_SETLK: ::c_int = 13;
-pub const F_SETLKW: ::c_int = 14;
-pub const F_SETOWN: ::c_int = 8;
-
-pub const VEOF: usize = 4;
-pub const VEOL: usize = 11;
-pub const VEOL2: usize = 16;
-pub const VMIN: usize = 6;
-pub const IEXTEN: ::tcflag_t = 0x00008000;
-pub const TOSTOP: ::tcflag_t = 0x00000100;
-pub const FLUSHO: ::tcflag_t = 0x00001000;
-
-pub const TCGETS: ::c_int = 0x5401;
-pub const TCSETS: ::c_int = 0x5402;
-pub const TCSETSW: ::c_int = 0x5403;
-pub const TCSETSF: ::c_int = 0x5404;
-pub const TCGETA: ::c_int = 0x5405;
-pub const TCSETA: ::c_int = 0x5406;
-pub const TCSETAW: ::c_int = 0x5407;
-pub const TCSETAF: ::c_int = 0x5408;
-pub const TCSBRK: ::c_int = 0x5409;
-pub const TCXONC: ::c_int = 0x540A;
-pub const TCFLSH: ::c_int = 0x540B;
-pub const TIOCGSOFTCAR: ::c_int = 0x5419;
-pub const TIOCSSOFTCAR: ::c_int = 0x541A;
-pub const TIOCLINUX: ::c_int = 0x541C;
-pub const TIOCGSERIAL: ::c_int = 0x541E;
-pub const TIOCEXCL: ::c_int = 0x540C;
-pub const TIOCNXCL: ::c_int = 0x540D;
-pub const TIOCSCTTY: ::c_int = 0x540E;
-pub const TIOCGPGRP: ::c_int = 0x540F;
-pub const TIOCSPGRP: ::c_int = 0x5410;
-pub const TIOCOUTQ: ::c_int = 0x5411;
-pub const TIOCSTI: ::c_int = 0x5412;
-pub const TIOCGWINSZ: ::c_int = 0x5413;
-pub const TIOCSWINSZ: ::c_int = 0x5414;
-pub const TIOCMGET: ::c_int = 0x5415;
-pub const TIOCMBIS: ::c_int = 0x5416;
-pub const TIOCMBIC: ::c_int = 0x5417;
-pub const TIOCMSET: ::c_int = 0x5418;
-pub const FIONREAD: ::c_int = 0x541B;
-pub const TIOCCONS: ::c_int = 0x541D;
-
-pub const SYS_gettid: ::c_long = 224;
-pub const SYS_perf_event_open: ::c_long = 364;
-
-pub const POLLWRNORM: ::c_short = 0x100;
-pub const POLLWRBAND: ::c_short = 0x200;
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/linux/musl/b32/mips.rs
+++ /dev/null
@@ -1,354 +0,0 @@
-pub type c_char = i8;
-pub type wchar_t = ::c_int;
-
-s! {
-    pub struct stat {
-        pub st_dev: ::dev_t,
-        __st_padding1: [::c_long; 2],
-        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,
-        __st_padding2: [::c_long; 2],
-        pub st_size: ::off_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,
-        pub st_blksize: ::blksize_t,
-        __st_padding3: ::c_long,
-        pub st_blocks: ::blkcnt_t,
-        __st_padding4: [::c_long; 14],
-    }
-
-    pub struct stat64 {
-        pub st_dev: ::dev_t,
-        __st_padding1: [::c_long; 2],
-        pub st_ino: ::ino64_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,
-        __st_padding2: [::c_long; 2],
-        pub st_size: ::off_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,
-        pub st_blksize: ::blksize_t,
-        __st_padding3: ::c_long,
-        pub st_blocks: ::blkcnt64_t,
-        __st_padding4: [::c_long; 14],
-    }
-
-    pub struct stack_t {
-        pub ss_sp: *mut ::c_void,
-        pub ss_size: ::size_t,
-        pub ss_flags: ::c_int,
-    }
-
-    pub struct shmid_ds {
-        pub shm_perm: ::ipc_perm,
-        pub shm_segsz: ::size_t,
-        pub shm_atime: ::time_t,
-        pub shm_dtime: ::time_t,
-        pub shm_ctime: ::time_t,
-        pub shm_cpid: ::pid_t,
-        pub shm_lpid: ::pid_t,
-        pub shm_nattch: ::c_ulong,
-        __pad1: ::c_ulong,
-        __pad2: ::c_ulong,
-    }
-
-    pub struct msqid_ds {
-        pub msg_perm: ::ipc_perm,
-        #[cfg(target_endian = "big")]
-        __unused1: ::c_int,
-        pub msg_stime: ::time_t,
-        #[cfg(target_endian = "little")]
-        __unused1: ::c_int,
-        #[cfg(target_endian = "big")]
-        __unused2: ::c_int,
-        pub msg_rtime: ::time_t,
-        #[cfg(target_endian = "little")]
-        __unused2: ::c_int,
-        #[cfg(target_endian = "big")]
-        __unused3: ::c_int,
-        pub msg_ctime: ::time_t,
-        #[cfg(target_endian = "little")]
-        __unused3: ::c_int,
-        __msg_cbytes: ::c_ulong,
-        pub msg_qnum: ::msgqnum_t,
-        pub msg_qbytes: ::msglen_t,
-        pub msg_lspid: ::pid_t,
-        pub msg_lrpid: ::pid_t,
-        __pad1: ::c_ulong,
-        __pad2: ::c_ulong,
-    }
-
-    pub struct statfs {
-        pub f_type: ::c_ulong,
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_files: ::fsfilcnt_t,
-        pub f_ffree: ::fsfilcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_fsid: ::fsid_t,
-        pub f_namelen: ::c_ulong,
-        pub f_flags: ::c_ulong,
-        pub f_spare: [::c_ulong; 5],
-    }
-
-    pub struct siginfo_t {
-        pub si_signo: ::c_int,
-        pub si_code: ::c_int,
-        pub si_errno: ::c_int,
-        pub _pad: [::c_int; 29],
-        _align: [usize; 0],
-    }
-}
-
-pub const O_DIRECT: ::c_int = 0o100000;
-pub const O_DIRECTORY: ::c_int = 0o200000;
-pub const O_NOFOLLOW: ::c_int = 0o400000;
-pub const O_ASYNC: ::c_int = 0o10000;
-
-pub const FIOCLEX: ::c_int = 0x6601;
-pub const FIONBIO: ::c_int = 0x667E;
-
-pub const RLIMIT_RSS: ::c_int = 7;
-pub const RLIMIT_NOFILE: ::c_int = 5;
-pub const RLIMIT_AS: ::c_int = 6;
-pub const RLIMIT_NPROC: ::c_int = 8;
-pub const RLIMIT_MEMLOCK: ::c_int = 9;
-
-pub const O_APPEND: ::c_int = 0o010;
-pub const O_CREAT: ::c_int = 0o400;
-pub const O_EXCL: ::c_int = 0o2000;
-pub const O_NOCTTY: ::c_int = 0o4000;
-pub const O_NONBLOCK: ::c_int = 0o200;
-pub const O_SYNC: ::c_int = 0o40020;
-pub const O_RSYNC: ::c_int = 0o40020;
-pub const O_DSYNC: ::c_int = 0o020;
-
-pub const SOCK_NONBLOCK: ::c_int = 0o200;
-
-pub const MAP_ANON: ::c_int = 0x800;
-pub const MAP_GROWSDOWN: ::c_int = 0x1000;
-pub const MAP_DENYWRITE: ::c_int = 0x2000;
-pub const MAP_EXECUTABLE: ::c_int = 0x4000;
-pub const MAP_LOCKED: ::c_int = 0x8000;
-pub const MAP_NORESERVE: ::c_int = 0x0400;
-pub const MAP_POPULATE: ::c_int = 0x10000;
-pub const MAP_NONBLOCK: ::c_int = 0x20000;
-pub const MAP_STACK: ::c_int = 0x40000;
-
-pub const EDEADLK: ::c_int = 45;
-pub const ENAMETOOLONG: ::c_int = 78;
-pub const ENOLCK: ::c_int = 46;
-pub const ENOSYS: ::c_int = 89;
-pub const ENOTEMPTY: ::c_int = 93;
-pub const ELOOP: ::c_int = 90;
-pub const ENOMSG: ::c_int = 35;
-pub const EIDRM: ::c_int = 36;
-pub const ECHRNG: ::c_int = 37;
-pub const EL2NSYNC: ::c_int = 38;
-pub const EL3HLT: ::c_int = 39;
-pub const EL3RST: ::c_int = 40;
-pub const ELNRNG: ::c_int = 41;
-pub const EUNATCH: ::c_int = 42;
-pub const ENOCSI: ::c_int = 43;
-pub const EL2HLT: ::c_int = 44;
-pub const EBADE: ::c_int = 50;
-pub const EBADR: ::c_int = 51;
-pub const EXFULL: ::c_int = 52;
-pub const ENOANO: ::c_int = 53;
-pub const EBADRQC: ::c_int = 54;
-pub const EBADSLT: ::c_int = 55;
-pub const EDEADLOCK: ::c_int = 56;
-pub const EMULTIHOP: ::c_int = 74;
-pub const EOVERFLOW: ::c_int = 79;
-pub const ENOTUNIQ: ::c_int = 80;
-pub const EBADFD: ::c_int = 81;
-pub const EBADMSG: ::c_int = 77;
-pub const EREMCHG: ::c_int = 82;
-pub const ELIBACC: ::c_int = 83;
-pub const ELIBBAD: ::c_int = 84;
-pub const ELIBSCN: ::c_int = 85;
-pub const ELIBMAX: ::c_int = 86;
-pub const ELIBEXEC: ::c_int = 87;
-pub const EILSEQ: ::c_int = 88;
-pub const ERESTART: ::c_int = 91;
-pub const ESTRPIPE: ::c_int = 92;
-pub const EUSERS: ::c_int = 94;
-pub const ENOTSOCK: ::c_int = 95;
-pub const EDESTADDRREQ: ::c_int = 96;
-pub const EMSGSIZE: ::c_int = 97;
-pub const EPROTOTYPE: ::c_int = 98;
-pub const ENOPROTOOPT: ::c_int = 99;
-pub const EPROTONOSUPPORT: ::c_int = 120;
-pub const ESOCKTNOSUPPORT: ::c_int = 121;
-pub const EOPNOTSUPP: ::c_int = 122;
-pub const ENOTSUP: ::c_int = EOPNOTSUPP;
-pub const EPFNOSUPPORT: ::c_int = 123;
-pub const EAFNOSUPPORT: ::c_int = 124;
-pub const EADDRINUSE: ::c_int = 125;
-pub const EADDRNOTAVAIL: ::c_int = 126;
-pub const ENETDOWN: ::c_int = 127;
-pub const ENETUNREACH: ::c_int = 128;
-pub const ENETRESET: ::c_int = 129;
-pub const ECONNABORTED: ::c_int = 130;
-pub const ECONNRESET: ::c_int = 131;
-pub const ENOBUFS: ::c_int = 132;
-pub const EISCONN: ::c_int = 133;
-pub const ENOTCONN: ::c_int = 134;
-pub const ESHUTDOWN: ::c_int = 143;
-pub const ETOOMANYREFS: ::c_int = 144;
-pub const ETIMEDOUT: ::c_int = 145;
-pub const ECONNREFUSED: ::c_int = 146;
-pub const EHOSTDOWN: ::c_int = 147;
-pub const EHOSTUNREACH: ::c_int = 148;
-pub const EALREADY: ::c_int = 149;
-pub const EINPROGRESS: ::c_int = 150;
-pub const ESTALE: ::c_int = 151;
-pub const EUCLEAN: ::c_int = 135;
-pub const ENOTNAM: ::c_int = 137;
-pub const ENAVAIL: ::c_int = 138;
-pub const EISNAM: ::c_int = 139;
-pub const EREMOTEIO: ::c_int = 140;
-pub const EDQUOT: ::c_int = 1133;
-pub const ENOMEDIUM: ::c_int = 159;
-pub const EMEDIUMTYPE: ::c_int = 160;
-pub const ECANCELED: ::c_int = 158;
-pub const ENOKEY: ::c_int = 161;
-pub const EKEYEXPIRED: ::c_int = 162;
-pub const EKEYREVOKED: ::c_int = 163;
-pub const EKEYREJECTED: ::c_int = 164;
-pub const EOWNERDEAD: ::c_int = 165;
-pub const ENOTRECOVERABLE: ::c_int = 166;
-pub const EHWPOISON: ::c_int = 168;
-pub const ERFKILL: ::c_int = 167;
-
-pub const SOCK_STREAM: ::c_int = 2;
-pub const SOCK_DGRAM: ::c_int = 1;
-pub const SOCK_SEQPACKET: ::c_int = 5;
-
-pub const SOL_SOCKET: ::c_int = 65535;
-
-pub const SO_REUSEADDR: ::c_int = 0x0004;
-pub const SO_KEEPALIVE: ::c_int = 0x0008;
-pub const SO_DONTROUTE: ::c_int = 0x0010;
-pub const SO_BROADCAST: ::c_int = 0x0020;
-pub const SO_LINGER: ::c_int = 0x0080;
-pub const SO_OOBINLINE: ::c_int = 0x0100;
-pub const SO_REUSEPORT: ::c_int = 0x0200;
-pub const SO_SNDBUF: ::c_int = 0x1001;
-pub const SO_RCVBUF: ::c_int = 0x1002;
-pub const SO_SNDLOWAT: ::c_int = 0x1003;
-pub const SO_RCVLOWAT: ::c_int = 0x1004;
-pub const SO_RCVTIMEO: ::c_int = 0x1006;
-pub const SO_SNDTIMEO: ::c_int = 0x1005;
-pub const SO_ERROR: ::c_int = 0x1007;
-pub const SO_TYPE: ::c_int = 0x1008;
-pub const SO_ACCEPTCONN: ::c_int = 0x1009;
-pub const SO_PROTOCOL: ::c_int = 0x1028;
-pub const SO_DOMAIN: ::c_int = 0x1029;
-pub const SO_NO_CHECK: ::c_int = 11;
-pub const SO_PRIORITY: ::c_int = 12;
-pub const SO_BSDCOMPAT: ::c_int = 14;
-pub const SO_PASSCRED: ::c_int = 17;
-pub const SO_PEERCRED: ::c_int = 18;
-pub const SO_SNDBUFFORCE: ::c_int = 31;
-pub const SO_RCVBUFFORCE: ::c_int = 33;
-
-pub const SA_ONSTACK: ::c_int = 0x08000000;
-pub const SA_SIGINFO: ::c_int = 8;
-pub const SA_NOCLDWAIT: ::c_int = 0x10000;
-
-pub const SIGCHLD: ::c_int = 18;
-pub const SIGBUS: ::c_int = 10;
-pub const SIGTTIN: ::c_int = 26;
-pub const SIGTTOU: ::c_int = 27;
-pub const SIGXCPU: ::c_int = 30;
-pub const SIGXFSZ: ::c_int = 31;
-pub const SIGVTALRM: ::c_int = 28;
-pub const SIGPROF: ::c_int = 29;
-pub const SIGWINCH: ::c_int = 20;
-pub const SIGUSR1: ::c_int = 16;
-pub const SIGUSR2: ::c_int = 17;
-pub const SIGCONT: ::c_int = 25;
-pub const SIGSTOP: ::c_int = 23;
-pub const SIGTSTP: ::c_int = 24;
-pub const SIGURG: ::c_int = 21;
-pub const SIGIO: ::c_int = 22;
-pub const SIGSYS: ::c_int = 12;
-pub const SIGSTKFLT: ::c_int = 7;
-pub const SIGPOLL: ::c_int = ::SIGIO;
-pub const SIGPWR: ::c_int = 19;
-pub const SIG_SETMASK: ::c_int = 3;
-pub const SIG_BLOCK: ::c_int = 1;
-pub const SIG_UNBLOCK: ::c_int = 2;
-
-pub const EXTPROC: ::tcflag_t = 0o200000;
-
-pub const MAP_HUGETLB: ::c_int = 0x80000;
-
-pub const F_GETLK: ::c_int = 33;
-pub const F_GETOWN: ::c_int = 23;
-pub const F_SETLK: ::c_int = 34;
-pub const F_SETLKW: ::c_int = 35;
-pub const F_SETOWN: ::c_int = 24;
-
-pub const VEOF: usize = 16;
-pub const VEOL: usize = 17;
-pub const VEOL2: usize = 6;
-pub const VMIN: usize = 4;
-pub const IEXTEN: ::tcflag_t = 0o000400;
-pub const TOSTOP: ::tcflag_t = 0o100000;
-pub const FLUSHO: ::tcflag_t = 0o020000;
-
-pub const TCGETS: ::c_int = 0x540D;
-pub const TCSETS: ::c_int = 0x540E;
-pub const TCSETSW: ::c_int = 0x540F;
-pub const TCSETSF: ::c_int = 0x5410;
-pub const TCGETA: ::c_int = 0x5401;
-pub const TCSETA: ::c_int = 0x5402;
-pub const TCSETAW: ::c_int = 0x5403;
-pub const TCSETAF: ::c_int = 0x5404;
-pub const TCSBRK: ::c_int = 0x5405;
-pub const TCXONC: ::c_int = 0x5406;
-pub const TCFLSH: ::c_int = 0x5407;
-pub const TIOCGSOFTCAR: ::c_int = 0x5481;
-pub const TIOCSSOFTCAR: ::c_int = 0x5482;
-pub const TIOCLINUX: ::c_int = 0x5483;
-pub const TIOCGSERIAL: ::c_int = 0x5484;
-pub const TIOCEXCL: ::c_int = 0x740D;
-pub const TIOCNXCL: ::c_int = 0x740E;
-pub const TIOCSCTTY: ::c_int = 0x5480;
-pub const TIOCGPGRP: ::c_int = 0x40047477;
-pub const TIOCSPGRP: ::c_int = 0x80047476;
-pub const TIOCOUTQ: ::c_int = 0x7472;
-pub const TIOCSTI: ::c_int = 0x5472;
-pub const TIOCGWINSZ: ::c_int = 0x40087468;
-pub const TIOCSWINSZ: ::c_int = 0x80087467;
-pub const TIOCMGET: ::c_int = 0x741D;
-pub const TIOCMBIS: ::c_int = 0x741B;
-pub const TIOCMBIC: ::c_int = 0x741C;
-pub const TIOCMSET: ::c_int = 0x741A;
-pub const FIONREAD: ::c_int = 0x467F;
-pub const TIOCCONS: ::c_int = 0x80047478;
-
-pub const SYS_gettid: ::c_long = 4222;   // Valid for O32
-pub const SYS_perf_event_open: ::c_long = 4333;  // Valid for O32
-
-pub const POLLWRNORM: ::c_short = 0x4;
-pub const POLLWRBAND: ::c_short = 0x100;
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/linux/musl/b32/mod.rs
+++ /dev/null
@@ -1,56 +0,0 @@
-pub type c_long = i32;
-pub type c_ulong = u32;
-pub type nlink_t = u32;
-
-s! {
-    pub struct pthread_attr_t {
-        __size: [u32; 9]
-    }
-
-    pub struct sigset_t {
-        __val: [::c_ulong; 32],
-    }
-
-    pub struct msghdr {
-        pub msg_name: *mut ::c_void,
-        pub msg_namelen: ::socklen_t,
-        pub msg_iov: *mut ::iovec,
-        pub msg_iovlen: ::c_int,
-        pub msg_control: *mut ::c_void,
-        pub msg_controllen: ::socklen_t,
-        pub msg_flags: ::c_int,
-    }
-
-    pub struct cmsghdr {
-        pub cmsg_len: ::socklen_t,
-        pub cmsg_level: ::c_int,
-        pub cmsg_type: ::c_int,
-    }
-
-    pub struct sem_t {
-        __val: [::c_int; 4],
-    }
-}
-
-pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
-pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24;
-
-cfg_if! {
-    if #[cfg(any(target_arch = "x86"))] {
-        mod x86;
-        pub use self::x86::*;
-    } else if #[cfg(any(target_arch = "mips"))] {
-        mod mips;
-        pub use self::mips::*;
-    } else if #[cfg(any(target_arch = "arm"))] {
-        mod arm;
-        pub use self::arm::*;
-    } else if #[cfg(any(target_arch = "asmjs", target_arch = "wasm32"))] {
-        // For the time being asmjs and wasm32 are the same, and both
-        // backed by identical emscripten runtimes
-        mod asmjs;
-        pub use self::asmjs::*;
-    } else {
-        // Unknown target_arch
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/linux/musl/b32/x86.rs
+++ /dev/null
@@ -1,360 +0,0 @@
-pub type c_char = i8;
-pub type wchar_t = i32;
-
-s! {
-    pub struct stat {
-        pub st_dev: ::dev_t,
-        __st_dev_padding: ::c_int,
-        __st_ino_truncated: ::c_long,
-        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,
-        __st_rdev_padding: ::c_int,
-        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,
-        pub st_ino: ::ino_t,
-    }
-
-    pub struct stat64 {
-        pub st_dev: ::dev_t,
-        __st_dev_padding: ::c_int,
-        __st_ino_truncated: ::c_long,
-        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,
-        __st_rdev_padding: ::c_int,
-        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,
-        pub st_ino: ::ino_t,
-    }
-
-    pub struct stack_t {
-        pub ss_sp: *mut ::c_void,
-        pub ss_flags: ::c_int,
-        pub ss_size: ::size_t
-    }
-
-    pub struct shmid_ds {
-        pub shm_perm: ::ipc_perm,
-        pub shm_segsz: ::size_t,
-        pub shm_atime: ::time_t,
-        __unused1: ::c_int,
-        pub shm_dtime: ::time_t,
-        __unused2: ::c_int,
-        pub shm_ctime: ::time_t,
-        __unused3: ::c_int,
-        pub shm_cpid: ::pid_t,
-        pub shm_lpid: ::pid_t,
-        pub shm_nattch: ::c_ulong,
-        __pad1: ::c_ulong,
-        __pad2: ::c_ulong,
-    }
-
-    pub struct msqid_ds {
-        pub msg_perm: ::ipc_perm,
-        pub msg_stime: ::time_t,
-        __unused1: ::c_int,
-        pub msg_rtime: ::time_t,
-        __unused2: ::c_int,
-        pub msg_ctime: ::time_t,
-        __unused3: ::c_int,
-        __msg_cbytes: ::c_ulong,
-        pub msg_qnum: ::msgqnum_t,
-        pub msg_qbytes: ::msglen_t,
-        pub msg_lspid: ::pid_t,
-        pub msg_lrpid: ::pid_t,
-        __pad1: ::c_ulong,
-        __pad2: ::c_ulong,
-    }
-
-    pub struct statfs {
-        pub f_type: ::c_ulong,
-        pub f_bsize: ::c_ulong,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_files: ::fsfilcnt_t,
-        pub f_ffree: ::fsfilcnt_t,
-        pub f_fsid: ::fsid_t,
-        pub f_namelen: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_flags: ::c_ulong,
-        pub f_spare: [::c_ulong; 4],
-    }
-
-    pub struct mcontext_t {
-        __private: [u32; 22]
-    }
-
-    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; 112],
-    }
-
-    pub struct siginfo_t {
-        pub si_signo: ::c_int,
-        pub si_errno: ::c_int,
-        pub si_code: ::c_int,
-        pub _pad: [::c_int; 29],
-        _align: [usize; 0],
-    }
-}
-
-pub const O_DIRECT: ::c_int = 0x4000;
-pub const O_DIRECTORY: ::c_int = 0x10000;
-pub const O_NOFOLLOW: ::c_int = 0x20000;
-pub const O_ASYNC: ::c_int = 0x2000;
-
-pub const FIOCLEX: ::c_int = 0x5451;
-pub const FIONBIO: ::c_int = 0x5421;
-
-pub const RLIMIT_RSS: ::c_int = 5;
-pub const RLIMIT_NOFILE: ::c_int = 7;
-pub const RLIMIT_AS: ::c_int = 9;
-pub const RLIMIT_NPROC: ::c_int = 6;
-pub const RLIMIT_MEMLOCK: ::c_int = 8;
-
-pub const O_APPEND: ::c_int = 1024;
-pub const O_CREAT: ::c_int = 64;
-pub const O_EXCL: ::c_int = 128;
-pub const O_NOCTTY: ::c_int = 256;
-pub const O_NONBLOCK: ::c_int = 2048;
-pub const O_SYNC: ::c_int = 1052672;
-pub const O_RSYNC: ::c_int = 1052672;
-pub const O_DSYNC: ::c_int = 4096;
-
-pub const SOCK_NONBLOCK: ::c_int = 2048;
-
-pub const MAP_ANON: ::c_int = 0x0020;
-pub const MAP_GROWSDOWN: ::c_int = 0x0100;
-pub const MAP_DENYWRITE: ::c_int = 0x0800;
-pub const MAP_EXECUTABLE: ::c_int = 0x01000;
-pub const MAP_LOCKED: ::c_int = 0x02000;
-pub const MAP_NORESERVE: ::c_int = 0x04000;
-pub const MAP_POPULATE: ::c_int = 0x08000;
-pub const MAP_NONBLOCK: ::c_int = 0x010000;
-pub const MAP_STACK: ::c_int = 0x020000;
-
-pub const SOCK_STREAM: ::c_int = 1;
-pub const SOCK_DGRAM: ::c_int = 2;
-pub const SOCK_SEQPACKET: ::c_int = 5;
-
-pub const SOL_SOCKET: ::c_int = 1;
-
-pub const EDEADLK: ::c_int = 35;
-pub const ENAMETOOLONG: ::c_int = 36;
-pub const ENOLCK: ::c_int = 37;
-pub const ENOSYS: ::c_int = 38;
-pub const ENOTEMPTY: ::c_int = 39;
-pub const ELOOP: ::c_int = 40;
-pub const ENOMSG: ::c_int = 42;
-pub const EIDRM: ::c_int = 43;
-pub const ECHRNG: ::c_int = 44;
-pub const EL2NSYNC: ::c_int = 45;
-pub const EL3HLT: ::c_int = 46;
-pub const EL3RST: ::c_int = 47;
-pub const ELNRNG: ::c_int = 48;
-pub const EUNATCH: ::c_int = 49;
-pub const ENOCSI: ::c_int = 50;
-pub const EL2HLT: ::c_int = 51;
-pub const EBADE: ::c_int = 52;
-pub const EBADR: ::c_int = 53;
-pub const EXFULL: ::c_int = 54;
-pub const ENOANO: ::c_int = 55;
-pub const EBADRQC: ::c_int = 56;
-pub const EBADSLT: ::c_int = 57;
-pub const EDEADLOCK: ::c_int = EDEADLK;
-pub const EMULTIHOP: ::c_int = 72;
-pub const EBADMSG: ::c_int = 74;
-pub const EOVERFLOW: ::c_int = 75;
-pub const ENOTUNIQ: ::c_int = 76;
-pub const EBADFD: ::c_int = 77;
-pub const EREMCHG: ::c_int = 78;
-pub const ELIBACC: ::c_int = 79;
-pub const ELIBBAD: ::c_int = 80;
-pub const ELIBSCN: ::c_int = 81;
-pub const ELIBMAX: ::c_int = 82;
-pub const ELIBEXEC: ::c_int = 83;
-pub const EILSEQ: ::c_int = 84;
-pub const ERESTART: ::c_int = 85;
-pub const ESTRPIPE: ::c_int = 86;
-pub const EUSERS: ::c_int = 87;
-pub const ENOTSOCK: ::c_int = 88;
-pub const EDESTADDRREQ: ::c_int = 89;
-pub const EMSGSIZE: ::c_int = 90;
-pub const EPROTOTYPE: ::c_int = 91;
-pub const ENOPROTOOPT: ::c_int = 92;
-pub const EPROTONOSUPPORT: ::c_int = 93;
-pub const ESOCKTNOSUPPORT: ::c_int = 94;
-pub const EOPNOTSUPP: ::c_int = 95;
-pub const ENOTSUP: ::c_int = EOPNOTSUPP;
-pub const EPFNOSUPPORT: ::c_int = 96;
-pub const EAFNOSUPPORT: ::c_int = 97;
-pub const EADDRINUSE: ::c_int = 98;
-pub const EADDRNOTAVAIL: ::c_int = 99;
-pub const ENETDOWN: ::c_int = 100;
-pub const ENETUNREACH: ::c_int = 101;
-pub const ENETRESET: ::c_int = 102;
-pub const ECONNABORTED: ::c_int = 103;
-pub const ECONNRESET: ::c_int = 104;
-pub const ENOBUFS: ::c_int = 105;
-pub const EISCONN: ::c_int = 106;
-pub const ENOTCONN: ::c_int = 107;
-pub const ESHUTDOWN: ::c_int = 108;
-pub const ETOOMANYREFS: ::c_int = 109;
-pub const ETIMEDOUT: ::c_int = 110;
-pub const ECONNREFUSED: ::c_int = 111;
-pub const EHOSTDOWN: ::c_int = 112;
-pub const EHOSTUNREACH: ::c_int = 113;
-pub const EALREADY: ::c_int = 114;
-pub const EINPROGRESS: ::c_int = 115;
-pub const ESTALE: ::c_int = 116;
-pub const EUCLEAN: ::c_int = 117;
-pub const ENOTNAM: ::c_int = 118;
-pub const ENAVAIL: ::c_int = 119;
-pub const EISNAM: ::c_int = 120;
-pub const EREMOTEIO: ::c_int = 121;
-pub const EDQUOT: ::c_int = 122;
-pub const ENOMEDIUM: ::c_int = 123;
-pub const EMEDIUMTYPE: ::c_int = 124;
-pub const ECANCELED: ::c_int = 125;
-pub const ENOKEY: ::c_int = 126;
-pub const EKEYEXPIRED: ::c_int = 127;
-pub const EKEYREVOKED: ::c_int = 128;
-pub const EKEYREJECTED: ::c_int = 129;
-pub const EOWNERDEAD: ::c_int = 130;
-pub const ENOTRECOVERABLE: ::c_int = 131;
-pub const ERFKILL: ::c_int = 132;
-pub const EHWPOISON: ::c_int = 133;
-
-pub const SO_REUSEADDR: ::c_int = 2;
-pub const SO_TYPE: ::c_int = 3;
-pub const SO_ERROR: ::c_int = 4;
-pub const SO_DONTROUTE: ::c_int = 5;
-pub const SO_BROADCAST: ::c_int = 6;
-pub const SO_SNDBUF: ::c_int = 7;
-pub const SO_RCVBUF: ::c_int = 8;
-pub const SO_KEEPALIVE: ::c_int = 9;
-pub const SO_OOBINLINE: ::c_int = 10;
-pub const SO_NO_CHECK: ::c_int = 11;
-pub const SO_PRIORITY: ::c_int = 12;
-pub const SO_LINGER: ::c_int = 13;
-pub const SO_BSDCOMPAT: ::c_int = 14;
-pub const SO_REUSEPORT: ::c_int = 15;
-pub const SO_PASSCRED: ::c_int = 16;
-pub const SO_PEERCRED: ::c_int = 17;
-pub const SO_RCVLOWAT: ::c_int = 18;
-pub const SO_SNDLOWAT: ::c_int = 19;
-pub const SO_RCVTIMEO: ::c_int = 20;
-pub const SO_SNDTIMEO: ::c_int = 21;
-pub const SO_ACCEPTCONN: ::c_int = 30;
-pub const SO_SNDBUFFORCE: ::c_int = 32;
-pub const SO_RCVBUFFORCE: ::c_int = 33;
-pub const SO_PROTOCOL: ::c_int = 38;
-pub const SO_DOMAIN: ::c_int = 39;
-
-pub const SA_ONSTACK: ::c_int = 0x08000000;
-pub const SA_SIGINFO: ::c_int = 0x00000004;
-pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
-
-pub const SIGCHLD: ::c_int = 17;
-pub const SIGBUS: ::c_int = 7;
-pub const SIGTTIN: ::c_int = 21;
-pub const SIGTTOU: ::c_int = 22;
-pub const SIGXCPU: ::c_int = 24;
-pub const SIGXFSZ: ::c_int = 25;
-pub const SIGVTALRM: ::c_int = 26;
-pub const SIGPROF: ::c_int = 27;
-pub const SIGWINCH: ::c_int = 28;
-pub const SIGUSR1: ::c_int = 10;
-pub const SIGUSR2: ::c_int = 12;
-pub const SIGCONT: ::c_int = 18;
-pub const SIGSTOP: ::c_int = 19;
-pub const SIGTSTP: ::c_int = 20;
-pub const SIGURG: ::c_int = 23;
-pub const SIGIO: ::c_int = 29;
-pub const SIGSYS: ::c_int = 31;
-pub const SIGSTKFLT: ::c_int = 16;
-pub const SIGPOLL: ::c_int = 29;
-pub const SIGPWR: ::c_int = 30;
-pub const SIG_SETMASK: ::c_int = 2;
-pub const SIG_BLOCK: ::c_int = 0x000000;
-pub const SIG_UNBLOCK: ::c_int = 0x01;
-
-pub const EXTPROC: ::tcflag_t = 0x00010000;
-
-pub const MAP_HUGETLB: ::c_int = 0x040000;
-pub const MAP_32BIT: ::c_int = 0x0040;
-
-pub const F_GETLK: ::c_int = 12;
-pub const F_GETOWN: ::c_int = 9;
-pub const F_SETLK: ::c_int = 13;
-pub const F_SETLKW: ::c_int = 14;
-pub const F_SETOWN: ::c_int = 8;
-
-pub const VEOF: usize = 4;
-pub const VEOL: usize = 11;
-pub const VEOL2: usize = 16;
-pub const VMIN: usize = 6;
-pub const IEXTEN: ::tcflag_t = 0x00008000;
-pub const TOSTOP: ::tcflag_t = 0x00000100;
-pub const FLUSHO: ::tcflag_t = 0x00001000;
-
-pub const TCGETS: ::c_int = 0x5401;
-pub const TCSETS: ::c_int = 0x5402;
-pub const TCSETSW: ::c_int = 0x5403;
-pub const TCSETSF: ::c_int = 0x5404;
-pub const TCGETA: ::c_int = 0x5405;
-pub const TCSETA: ::c_int = 0x5406;
-pub const TCSETAW: ::c_int = 0x5407;
-pub const TCSETAF: ::c_int = 0x5408;
-pub const TCSBRK: ::c_int = 0x5409;
-pub const TCXONC: ::c_int = 0x540A;
-pub const TCFLSH: ::c_int = 0x540B;
-pub const TIOCGSOFTCAR: ::c_int = 0x5419;
-pub const TIOCSSOFTCAR: ::c_int = 0x541A;
-pub const TIOCLINUX: ::c_int = 0x541C;
-pub const TIOCGSERIAL: ::c_int = 0x541E;
-pub const TIOCEXCL: ::c_int = 0x540C;
-pub const TIOCNXCL: ::c_int = 0x540D;
-pub const TIOCSCTTY: ::c_int = 0x540E;
-pub const TIOCGPGRP: ::c_int = 0x540F;
-pub const TIOCSPGRP: ::c_int = 0x5410;
-pub const TIOCOUTQ: ::c_int = 0x5411;
-pub const TIOCSTI: ::c_int = 0x5412;
-pub const TIOCGWINSZ: ::c_int = 0x5413;
-pub const TIOCSWINSZ: ::c_int = 0x5414;
-pub const TIOCMGET: ::c_int = 0x5415;
-pub const TIOCMBIS: ::c_int = 0x5416;
-pub const TIOCMBIC: ::c_int = 0x5417;
-pub const TIOCMSET: ::c_int = 0x5418;
-pub const FIONREAD: ::c_int = 0x541B;
-pub const TIOCCONS: ::c_int = 0x541D;
-
-pub const SYS_gettid: ::c_long = 224;
-pub const SYS_perf_event_open: ::c_long = 336;
-
-pub const POLLWRNORM: ::c_short = 0x100;
-pub const POLLWRBAND: ::c_short = 0x200;
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/linux/musl/b64/aarch64.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-pub type c_char = u8;
-
-pub const SYS_perf_event_open: ::c_long = 241;
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/linux/musl/b64/mod.rs
+++ /dev/null
@@ -1,387 +0,0 @@
-pub type wchar_t = i32;
-pub type c_long = i64;
-pub type c_ulong = u64;
-pub type nlink_t = u64;
-
-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 stack_t {
-        pub ss_sp: *mut ::c_void,
-        pub ss_flags: ::c_int,
-        pub ss_size: ::size_t
-    }
-
-    pub struct pthread_attr_t {
-        __size: [u64; 7]
-    }
-
-    pub struct sigset_t {
-        __val: [::c_ulong; 16],
-    }
-
-    pub struct shmid_ds {
-        pub shm_perm: ::ipc_perm,
-        pub shm_segsz: ::size_t,
-        pub shm_atime: ::time_t,
-        pub shm_dtime: ::time_t,
-        pub shm_ctime: ::time_t,
-        pub shm_cpid: ::pid_t,
-        pub shm_lpid: ::pid_t,
-        pub shm_nattch: ::c_ulong,
-        __pad1: ::c_ulong,
-        __pad2: ::c_ulong,
-    }
-
-    pub struct msqid_ds {
-        pub msg_perm: ::ipc_perm,
-        pub msg_stime: ::time_t,
-        pub msg_rtime: ::time_t,
-        pub msg_ctime: ::time_t,
-        __msg_cbytes: ::c_ulong,
-        pub msg_qnum: ::msgqnum_t,
-        pub msg_qbytes: ::msglen_t,
-        pub msg_lspid: ::pid_t,
-        pub msg_lrpid: ::pid_t,
-        __pad1: ::c_ulong,
-        __pad2: ::c_ulong,
-    }
-
-    pub struct statfs {
-        pub f_type: ::c_ulong,
-        pub f_bsize: ::c_ulong,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_files: ::fsfilcnt_t,
-        pub f_ffree: ::fsfilcnt_t,
-        pub f_fsid: ::fsid_t,
-        pub f_namelen: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_flags: ::c_ulong,
-        pub f_spare: [::c_ulong; 4],
-    }
-
-    pub struct msghdr {
-        pub msg_name: *mut ::c_void,
-        pub msg_namelen: ::socklen_t,
-        pub msg_iov: *mut ::iovec,
-        pub msg_iovlen: ::c_int,
-        __pad1: ::c_int,
-        pub msg_control: *mut ::c_void,
-        pub msg_controllen: ::socklen_t,
-        __pad2: ::socklen_t,
-        pub msg_flags: ::c_int,
-    }
-
-    pub struct cmsghdr {
-        pub cmsg_len: ::socklen_t,
-        pub __pad1: ::c_int,
-        pub cmsg_level: ::c_int,
-        pub cmsg_type: ::c_int,
-    }
-
-    pub struct sem_t {
-        __val: [::c_int; 8],
-    }
-
-    pub struct siginfo_t {
-        pub si_signo: ::c_int,
-        pub si_errno: ::c_int,
-        pub si_code: ::c_int,
-        pub _pad: [::c_int; 29],
-        _align: [usize; 0],
-    }
-}
-
-pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
-pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
-
-pub const O_DIRECT: ::c_int = 0x4000;
-pub const O_DIRECTORY: ::c_int = 0x10000;
-pub const O_NOFOLLOW: ::c_int = 0x20000;
-pub const O_ASYNC: ::c_int = 0x2000;
-
-pub const FIOCLEX: ::c_int = 0x5451;
-pub const FIONBIO: ::c_int = 0x5421;
-
-pub const RLIMIT_RSS: ::c_int = 5;
-pub const RLIMIT_NOFILE: ::c_int = 7;
-pub const RLIMIT_AS: ::c_int = 9;
-pub const RLIMIT_NPROC: ::c_int = 6;
-pub const RLIMIT_MEMLOCK: ::c_int = 8;
-
-pub const O_APPEND: ::c_int = 1024;
-pub const O_CREAT: ::c_int = 64;
-pub const O_EXCL: ::c_int = 128;
-pub const O_NOCTTY: ::c_int = 256;
-pub const O_NONBLOCK: ::c_int = 2048;
-pub const O_SYNC: ::c_int = 1052672;
-pub const O_RSYNC: ::c_int = 1052672;
-pub const O_DSYNC: ::c_int = 4096;
-
-pub const SOCK_NONBLOCK: ::c_int = 2048;
-
-pub const MAP_ANON: ::c_int = 0x0020;
-pub const MAP_GROWSDOWN: ::c_int = 0x0100;
-pub const MAP_DENYWRITE: ::c_int = 0x0800;
-pub const MAP_EXECUTABLE: ::c_int = 0x01000;
-pub const MAP_LOCKED: ::c_int = 0x02000;
-pub const MAP_NORESERVE: ::c_int = 0x04000;
-pub const MAP_POPULATE: ::c_int = 0x08000;
-pub const MAP_NONBLOCK: ::c_int = 0x010000;
-pub const MAP_STACK: ::c_int = 0x020000;
-pub const MAP_32BIT: ::c_int = 0x0040;
-
-pub const SOCK_STREAM: ::c_int = 1;
-pub const SOCK_DGRAM: ::c_int = 2;
-pub const SOCK_SEQPACKET: ::c_int = 5;
-
-pub const SOL_SOCKET: ::c_int = 1;
-
-pub const EDEADLK: ::c_int = 35;
-pub const ENAMETOOLONG: ::c_int = 36;
-pub const ENOLCK: ::c_int = 37;
-pub const ENOSYS: ::c_int = 38;
-pub const ENOTEMPTY: ::c_int = 39;
-pub const ELOOP: ::c_int = 40;
-pub const ENOMSG: ::c_int = 42;
-pub const EIDRM: ::c_int = 43;
-pub const ECHRNG: ::c_int = 44;
-pub const EL2NSYNC: ::c_int = 45;
-pub const EL3HLT: ::c_int = 46;
-pub const EL3RST: ::c_int = 47;
-pub const ELNRNG: ::c_int = 48;
-pub const EUNATCH: ::c_int = 49;
-pub const ENOCSI: ::c_int = 50;
-pub const EL2HLT: ::c_int = 51;
-pub const EBADE: ::c_int = 52;
-pub const EBADR: ::c_int = 53;
-pub const EXFULL: ::c_int = 54;
-pub const ENOANO: ::c_int = 55;
-pub const EBADRQC: ::c_int = 56;
-pub const EBADSLT: ::c_int = 57;
-pub const EDEADLOCK: ::c_int = EDEADLK;
-pub const EMULTIHOP: ::c_int = 72;
-pub const EBADMSG: ::c_int = 74;
-pub const EOVERFLOW: ::c_int = 75;
-pub const ENOTUNIQ: ::c_int = 76;
-pub const EBADFD: ::c_int = 77;
-pub const EREMCHG: ::c_int = 78;
-pub const ELIBACC: ::c_int = 79;
-pub const ELIBBAD: ::c_int = 80;
-pub const ELIBSCN: ::c_int = 81;
-pub const ELIBMAX: ::c_int = 82;
-pub const ELIBEXEC: ::c_int = 83;
-pub const EILSEQ: ::c_int = 84;
-pub const ERESTART: ::c_int = 85;
-pub const ESTRPIPE: ::c_int = 86;
-pub const EUSERS: ::c_int = 87;
-pub const ENOTSOCK: ::c_int = 88;
-pub const EDESTADDRREQ: ::c_int = 89;
-pub const EMSGSIZE: ::c_int = 90;
-pub const EPROTOTYPE: ::c_int = 91;
-pub const ENOPROTOOPT: ::c_int = 92;
-pub const EPROTONOSUPPORT: ::c_int = 93;
-pub const ESOCKTNOSUPPORT: ::c_int = 94;
-pub const EOPNOTSUPP: ::c_int = 95;
-pub const ENOTSUP: ::c_int = EOPNOTSUPP;
-pub const EPFNOSUPPORT: ::c_int = 96;
-pub const EAFNOSUPPORT: ::c_int = 97;
-pub const EADDRINUSE: ::c_int = 98;
-pub const EADDRNOTAVAIL: ::c_int = 99;
-pub const ENETDOWN: ::c_int = 100;
-pub const ENETUNREACH: ::c_int = 101;
-pub const ENETRESET: ::c_int = 102;
-pub const ECONNABORTED: ::c_int = 103;
-pub const ECONNRESET: ::c_int = 104;
-pub const ENOBUFS: ::c_int = 105;
-pub const EISCONN: ::c_int = 106;
-pub const ENOTCONN: ::c_int = 107;
-pub const ESHUTDOWN: ::c_int = 108;
-pub const ETOOMANYREFS: ::c_int = 109;
-pub const ETIMEDOUT: ::c_int = 110;
-pub const ECONNREFUSED: ::c_int = 111;
-pub const EHOSTDOWN: ::c_int = 112;
-pub const EHOSTUNREACH: ::c_int = 113;
-pub const EALREADY: ::c_int = 114;
-pub const EINPROGRESS: ::c_int = 115;
-pub const ESTALE: ::c_int = 116;
-pub const EUCLEAN: ::c_int = 117;
-pub const ENOTNAM: ::c_int = 118;
-pub const ENAVAIL: ::c_int = 119;
-pub const EISNAM: ::c_int = 120;
-pub const EREMOTEIO: ::c_int = 121;
-pub const EDQUOT: ::c_int = 122;
-pub const ENOMEDIUM: ::c_int = 123;
-pub const EMEDIUMTYPE: ::c_int = 124;
-pub const ECANCELED: ::c_int = 125;
-pub const ENOKEY: ::c_int = 126;
-pub const EKEYEXPIRED: ::c_int = 127;
-pub const EKEYREVOKED: ::c_int = 128;
-pub const EKEYREJECTED: ::c_int = 129;
-pub const EOWNERDEAD: ::c_int = 130;
-pub const ENOTRECOVERABLE: ::c_int = 131;
-pub const ERFKILL: ::c_int = 132;
-pub const EHWPOISON: ::c_int = 133;
-
-pub const SO_REUSEADDR: ::c_int = 2;
-pub const SO_TYPE: ::c_int = 3;
-pub const SO_ERROR: ::c_int = 4;
-pub const SO_DONTROUTE: ::c_int = 5;
-pub const SO_BROADCAST: ::c_int = 6;
-pub const SO_SNDBUF: ::c_int = 7;
-pub const SO_RCVBUF: ::c_int = 8;
-pub const SO_KEEPALIVE: ::c_int = 9;
-pub const SO_OOBINLINE: ::c_int = 10;
-pub const SO_NO_CHECK: ::c_int = 11;
-pub const SO_PRIORITY: ::c_int = 12;
-pub const SO_LINGER: ::c_int = 13;
-pub const SO_BSDCOMPAT: ::c_int = 14;
-pub const SO_REUSEPORT: ::c_int = 15;
-pub const SO_PASSCRED: ::c_int = 16;
-pub const SO_PEERCRED: ::c_int = 17;
-pub const SO_RCVLOWAT: ::c_int = 18;
-pub const SO_SNDLOWAT: ::c_int = 19;
-pub const SO_RCVTIMEO: ::c_int = 20;
-pub const SO_SNDTIMEO: ::c_int = 21;
-pub const SO_ACCEPTCONN: ::c_int = 30;
-pub const SO_SNDBUFFORCE: ::c_int = 32;
-pub const SO_RCVBUFFORCE: ::c_int = 33;
-pub const SO_PROTOCOL: ::c_int = 38;
-pub const SO_DOMAIN: ::c_int = 39;
-
-pub const SA_ONSTACK: ::c_int = 0x08000000;
-pub const SA_SIGINFO: ::c_int = 0x00000004;
-pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
-
-pub const SIGCHLD: ::c_int = 17;
-pub const SIGBUS: ::c_int = 7;
-pub const SIGTTIN: ::c_int = 21;
-pub const SIGTTOU: ::c_int = 22;
-pub const SIGXCPU: ::c_int = 24;
-pub const SIGXFSZ: ::c_int = 25;
-pub const SIGVTALRM: ::c_int = 26;
-pub const SIGPROF: ::c_int = 27;
-pub const SIGWINCH: ::c_int = 28;
-pub const SIGUSR1: ::c_int = 10;
-pub const SIGUSR2: ::c_int = 12;
-pub const SIGCONT: ::c_int = 18;
-pub const SIGSTOP: ::c_int = 19;
-pub const SIGTSTP: ::c_int = 20;
-pub const SIGURG: ::c_int = 23;
-pub const SIGIO: ::c_int = 29;
-pub const SIGSYS: ::c_int = 31;
-pub const SIGSTKFLT: ::c_int = 16;
-pub const SIGPOLL: ::c_int = 29;
-pub const SIGPWR: ::c_int = 30;
-pub const SIG_SETMASK: ::c_int = 2;
-pub const SIG_BLOCK: ::c_int = 0x000000;
-pub const SIG_UNBLOCK: ::c_int = 0x01;
-
-pub const EXTPROC: ::tcflag_t = 0x00010000;
-
-pub const MAP_HUGETLB: ::c_int = 0x040000;
-
-pub const F_GETLK: ::c_int = 5;
-pub const F_GETOWN: ::c_int = 9;
-pub const F_SETLK: ::c_int = 6;
-pub const F_SETLKW: ::c_int = 7;
-pub const F_SETOWN: ::c_int = 8;
-
-pub const VEOF: usize = 4;
-pub const VEOL: usize = 11;
-pub const VEOL2: usize = 16;
-pub const VMIN: usize = 6;
-pub const IEXTEN: ::tcflag_t = 0x00008000;
-pub const TOSTOP: ::tcflag_t = 0x00000100;
-pub const FLUSHO: ::tcflag_t = 0x00001000;
-
-pub const TCGETS: ::c_int = 0x5401;
-pub const TCSETS: ::c_int = 0x5402;
-pub const TCSETSW: ::c_int = 0x5403;
-pub const TCSETSF: ::c_int = 0x5404;
-pub const TCGETA: ::c_int = 0x5405;
-pub const TCSETA: ::c_int = 0x5406;
-pub const TCSETAW: ::c_int = 0x5407;
-pub const TCSETAF: ::c_int = 0x5408;
-pub const TCSBRK: ::c_int = 0x5409;
-pub const TCXONC: ::c_int = 0x540A;
-pub const TCFLSH: ::c_int = 0x540B;
-pub const TIOCGSOFTCAR: ::c_int = 0x5419;
-pub const TIOCSSOFTCAR: ::c_int = 0x541A;
-pub const TIOCLINUX: ::c_int = 0x541C;
-pub const TIOCGSERIAL: ::c_int = 0x541E;
-pub const TIOCEXCL: ::c_int = 0x540C;
-pub const TIOCNXCL: ::c_int = 0x540D;
-pub const TIOCSCTTY: ::c_int = 0x540E;
-pub const TIOCGPGRP: ::c_int = 0x540F;
-pub const TIOCSPGRP: ::c_int = 0x5410;
-pub const TIOCOUTQ: ::c_int = 0x5411;
-pub const TIOCSTI: ::c_int = 0x5412;
-pub const TIOCGWINSZ: ::c_int = 0x5413;
-pub const TIOCSWINSZ: ::c_int = 0x5414;
-pub const TIOCMGET: ::c_int = 0x5415;
-pub const TIOCMBIS: ::c_int = 0x5416;
-pub const TIOCMBIC: ::c_int = 0x5417;
-pub const TIOCMSET: ::c_int = 0x5418;
-pub const FIONREAD: ::c_int = 0x541B;
-pub const TIOCCONS: ::c_int = 0x541D;
-
-pub const POLLWRNORM: ::c_short = 0x100;
-pub const POLLWRBAND: ::c_short = 0x200;
-
-cfg_if! {
-    if #[cfg(target_arch = "aarch64")] {
-        mod aarch64;
-        pub use self::aarch64::*;
-    } else if #[cfg(any(target_arch = "powerpc64"))] {
-        mod powerpc64;
-        pub use self::powerpc64::*;
-    } else if #[cfg(any(target_arch = "x86_64"))] {
-        mod x86_64;
-        pub use self::x86_64::*;
-    } else {
-        // Unknown target_arch
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/linux/musl/b64/powerpc64.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-pub type c_char = u8;
-
-pub const SYS_perf_event_open: ::c_long = 319;
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/linux/musl/b64/x86_64.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-pub type c_char = i8;
-
-s! {
-    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 const SYS_gettid: ::c_long = 186;
-
-pub const SYS_perf_event_open: ::c_long = 298;
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/linux/musl/mod.rs
+++ /dev/null
@@ -1,337 +0,0 @@
-pub type clock_t = c_long;
-pub type time_t = c_long;
-pub type suseconds_t = c_long;
-pub type ino_t = u64;
-pub type off_t = i64;
-pub type blkcnt_t = i64;
-
-pub type blksize_t = c_long;
-pub type fsblkcnt_t = ::c_ulonglong;
-pub type fsfilcnt_t = ::c_ulonglong;
-pub type rlim_t = ::c_ulonglong;
-
-s! {
-    pub struct aiocb {
-        pub aio_fildes: ::c_int,
-        pub aio_lio_opcode: ::c_int,
-        pub aio_reqprio: ::c_int,
-        pub aio_buf: *mut ::c_void,
-        pub aio_nbytes: ::size_t,
-        pub aio_sigevent: ::sigevent,
-        __td: *mut ::c_void,
-        __lock: [::c_int; 2],
-        __err: ::c_int,
-        __ret: ::ssize_t,
-        pub aio_offset: off_t,
-        __next: *mut ::c_void,
-        __prev: *mut ::c_void,
-        #[cfg(target_pointer_width = "32")]
-        __dummy4: [::c_char; 24],
-        #[cfg(target_pointer_width = "64")]
-        __dummy4: [::c_char; 16],
-    }
-
-    pub struct sigaction {
-        pub sa_sigaction: ::sighandler_t,
-        pub sa_mask: ::sigset_t,
-        pub sa_flags: ::c_int,
-        pub sa_restorer: ::dox::Option<extern fn()>,
-    }
-
-    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 struct termios {
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_line: ::cc_t,
-        pub c_cc: [::cc_t; ::NCCS],
-        pub __c_ispeed: ::speed_t,
-        pub __c_ospeed: ::speed_t,
-    }
-
-    pub struct flock {
-        pub l_type: ::c_short,
-        pub l_whence: ::c_short,
-        pub l_start: ::off_t,
-        pub l_len: ::off_t,
-        pub l_pid: ::pid_t,
-    }
-
-    pub struct sysinfo {
-        pub uptime: ::c_ulong,
-        pub loads: [::c_ulong; 3],
-        pub totalram: ::c_ulong,
-        pub freeram: ::c_ulong,
-        pub sharedram: ::c_ulong,
-        pub bufferram: ::c_ulong,
-        pub totalswap: ::c_ulong,
-        pub freeswap: ::c_ulong,
-        pub procs: ::c_ushort,
-        pub pad: ::c_ushort,
-        pub totalhigh: ::c_ulong,
-        pub freehigh: ::c_ulong,
-        pub mem_unit: ::c_uint,
-        pub __reserved: [::c_char; 256],
-    }
-}
-
-pub const CLONE_NEWCGROUP: ::c_int = 0x02000000;
-
-pub const SFD_CLOEXEC: ::c_int = 0x080000;
-
-pub const NCCS: usize = 32;
-
-pub const O_TRUNC: ::c_int = 512;
-
-pub const O_CLOEXEC: ::c_int = 0x80000;
-
-pub const EBFONT: ::c_int = 59;
-pub const ENOSTR: ::c_int = 60;
-pub const ENODATA: ::c_int = 61;
-pub const ETIME: ::c_int = 62;
-pub const ENOSR: ::c_int = 63;
-pub const ENONET: ::c_int = 64;
-pub const ENOPKG: ::c_int = 65;
-pub const EREMOTE: ::c_int = 66;
-pub const ENOLINK: ::c_int = 67;
-pub const EADV: ::c_int = 68;
-pub const ESRMNT: ::c_int = 69;
-pub const ECOMM: ::c_int = 70;
-pub const EPROTO: ::c_int = 71;
-pub const EDOTDOT: ::c_int = 73;
-
-pub const SA_NODEFER: ::c_int = 0x40000000;
-pub const SA_RESETHAND: ::c_int = 0x80000000;
-pub const SA_RESTART: ::c_int = 0x10000000;
-pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
-
-pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
-
-pub const EFD_CLOEXEC: ::c_int = 0x80000;
-
-pub const BUFSIZ: ::c_uint = 1024;
-pub const TMP_MAX: ::c_uint = 10000;
-pub const FOPEN_MAX: ::c_uint = 1000;
-pub const O_PATH: ::c_int = 0o10000000;
-pub const O_EXEC: ::c_int = 0o10000000;
-pub const O_SEARCH: ::c_int = 0o10000000;
-pub const O_ACCMODE: ::c_int = 0o10000003;
-pub const O_NDELAY: ::c_int = O_NONBLOCK;
-pub const NI_MAXHOST: ::socklen_t = 255;
-pub const PTHREAD_STACK_MIN: ::size_t = 2048;
-pub const POSIX_FADV_DONTNEED: ::c_int = 4;
-pub const POSIX_FADV_NOREUSE: ::c_int = 5;
-
-pub const POSIX_MADV_DONTNEED: ::c_int = 4;
-
-pub const RLIM_INFINITY: ::rlim_t = !0;
-pub const RLIMIT_RTTIME: ::c_int = 15;
-pub const RLIMIT_NLIMITS: ::c_int = 16;
-
-pub const MAP_ANONYMOUS: ::c_int = MAP_ANON;
-
-pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15;
-pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16;
-pub const TCP_THIN_DUPACK: ::c_int = 17;
-pub const TCP_USER_TIMEOUT: ::c_int = 18;
-pub const TCP_REPAIR: ::c_int = 19;
-pub const TCP_REPAIR_QUEUE: ::c_int = 20;
-pub const TCP_QUEUE_SEQ: ::c_int = 21;
-pub const TCP_REPAIR_OPTIONS: ::c_int = 22;
-pub const TCP_FASTOPEN: ::c_int = 23;
-pub const TCP_TIMESTAMP: ::c_int = 24;
-
-pub const SIGUNUSED: ::c_int = ::SIGSYS;
-
-pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01;
-pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02;
-
-pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
-pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
-
-pub const CPU_SETSIZE: ::c_int = 128;
-
-pub const QFMT_VFS_V1: ::c_int = 4;
-
-pub const PTRACE_TRACEME: ::c_int = 0;
-pub const PTRACE_PEEKTEXT: ::c_int = 1;
-pub const PTRACE_PEEKDATA: ::c_int = 2;
-pub const PTRACE_PEEKUSER: ::c_int = 3;
-pub const PTRACE_POKETEXT: ::c_int = 4;
-pub const PTRACE_POKEDATA: ::c_int = 5;
-pub const PTRACE_POKEUSER: ::c_int = 6;
-pub const PTRACE_CONT: ::c_int = 7;
-pub const PTRACE_KILL: ::c_int = 8;
-pub const PTRACE_SINGLESTEP: ::c_int = 9;
-pub const PTRACE_ATTACH: ::c_int = 16;
-pub const PTRACE_DETACH: ::c_int = 17;
-pub const PTRACE_SYSCALL: ::c_int = 24;
-pub const PTRACE_SETOPTIONS: ::c_int = 0x4200;
-pub const PTRACE_GETEVENTMSG: ::c_int = 0x4201;
-pub const PTRACE_GETSIGINFO: ::c_int = 0x4202;
-pub const PTRACE_SETSIGINFO: ::c_int = 0x4203;
-pub const PTRACE_GETREGSET: ::c_int = 0x4204;
-pub const PTRACE_SETREGSET: ::c_int = 0x4205;
-pub const PTRACE_SEIZE: ::c_int = 0x4206;
-pub const PTRACE_INTERRUPT: ::c_int = 0x4207;
-pub const PTRACE_LISTEN: ::c_int = 0x4208;
-pub const PTRACE_PEEKSIGINFO: ::c_int = 0x4209;
-
-pub const PTRACE_O_EXITKILL: ::c_int = 1048576;
-pub const PTRACE_O_TRACECLONE: ::c_int = 8;
-pub const PTRACE_O_TRACEEXEC: ::c_int = 16;
-pub const PTRACE_O_TRACEEXIT: ::c_int = 64;
-pub const PTRACE_O_TRACEFORK: ::c_int = 2;
-pub const PTRACE_O_TRACESYSGOOD: ::c_int = 1;
-pub const PTRACE_O_TRACEVFORK: ::c_int = 4;
-pub const PTRACE_O_TRACEVFORKDONE: ::c_int = 32;
-pub const PTRACE_O_SUSPEND_SECCOMP: ::c_int = 2097152;
-
-pub const MADV_DODUMP: ::c_int = 17;
-pub const MADV_DONTDUMP: ::c_int = 16;
-
-pub const EPOLLWAKEUP: ::c_int = 0x20000000;
-
-pub const POLLRDNORM: ::c_short = 0x040;
-pub const POLLRDBAND: ::c_short = 0x080;
-
-pub const MADV_HUGEPAGE: ::c_int = 14;
-pub const MADV_NOHUGEPAGE: ::c_int = 15;
-
-pub const PTRACE_GETFPREGS: ::c_uint = 14;
-pub const PTRACE_SETFPREGS: ::c_uint = 15;
-pub const PTRACE_GETFPXREGS: ::c_uint = 18;
-pub const PTRACE_SETFPXREGS: ::c_uint = 19;
-pub const PTRACE_GETREGS: ::c_uint = 12;
-pub const PTRACE_SETREGS: ::c_uint = 13;
-
-pub const EFD_NONBLOCK: ::c_int = ::O_NONBLOCK;
-
-pub const SFD_NONBLOCK: ::c_int = ::O_NONBLOCK;
-
-pub const TCSANOW: ::c_int = 0;
-pub const TCSADRAIN: ::c_int = 1;
-pub const TCSAFLUSH: ::c_int = 2;
-
-pub const TIOCINQ: ::c_int = ::FIONREAD;
-
-pub const RTLD_GLOBAL: ::c_int = 0x100;
-pub const RTLD_NOLOAD: ::c_int = 0x4;
-
-// TODO(#247) Temporarily musl-specific (available since musl 0.9.12 / Linux
-// kernel 3.10).  See also notbsd/mod.rs
-pub const CLOCK_SGI_CYCLE: ::clockid_t = 10;
-pub const CLOCK_TAI: ::clockid_t = 11;
-
-pub const MCL_CURRENT: ::c_int = 0x0001;
-pub const MCL_FUTURE: ::c_int = 0x0002;
-
-pub const SIGSTKSZ: ::size_t = 8192;
-pub const MINSIGSTKSZ: ::size_t = 2048;
-pub const CBAUD: ::tcflag_t = 0o0010017;
-pub const TAB1: ::c_int = 0x00000800;
-pub const TAB2: ::c_int = 0x00001000;
-pub const TAB3: ::c_int = 0x00001800;
-pub const CR1: ::c_int  = 0x00000200;
-pub const CR2: ::c_int  = 0x00000400;
-pub const CR3: ::c_int  = 0x00000600;
-pub const FF1: ::c_int  = 0x00008000;
-pub const BS1: ::c_int  = 0x00002000;
-pub const VT1: ::c_int  = 0x00004000;
-pub const VWERASE: usize = 14;
-pub const VREPRINT: usize = 12;
-pub const VSUSP: usize = 10;
-pub const VSTART: usize = 8;
-pub const VSTOP: usize = 9;
-pub const VDISCARD: usize = 13;
-pub const VTIME: usize = 5;
-pub const IXON: ::tcflag_t = 0x00000400;
-pub const IXOFF: ::tcflag_t = 0x00001000;
-pub const ONLCR: ::tcflag_t = 0x4;
-pub const CSIZE: ::tcflag_t = 0x00000030;
-pub const CS6: ::tcflag_t = 0x00000010;
-pub const CS7: ::tcflag_t = 0x00000020;
-pub const CS8: ::tcflag_t = 0x00000030;
-pub const CSTOPB: ::tcflag_t = 0x00000040;
-pub const CREAD: ::tcflag_t = 0x00000080;
-pub const PARENB: ::tcflag_t = 0x00000100;
-pub const PARODD: ::tcflag_t = 0x00000200;
-pub const HUPCL: ::tcflag_t = 0x00000400;
-pub const CLOCAL: ::tcflag_t = 0x00000800;
-pub const ECHOKE: ::tcflag_t = 0x00000800;
-pub const ECHOE: ::tcflag_t = 0x00000010;
-pub const ECHOK: ::tcflag_t = 0x00000020;
-pub const ECHONL: ::tcflag_t = 0x00000040;
-pub const ECHOPRT: ::tcflag_t = 0x00000400;
-pub const ECHOCTL: ::tcflag_t = 0x00000200;
-pub const ISIG: ::tcflag_t = 0x00000001;
-pub const ICANON: ::tcflag_t = 0x00000002;
-pub const PENDIN: ::tcflag_t = 0x00004000;
-pub const NOFLSH: ::tcflag_t = 0x00000080;
-
-pub const B0: ::speed_t = 0o000000;
-pub const B50: ::speed_t = 0o000001;
-pub const B75: ::speed_t = 0o000002;
-pub const B110: ::speed_t = 0o000003;
-pub const B134: ::speed_t = 0o000004;
-pub const B150: ::speed_t = 0o000005;
-pub const B200: ::speed_t = 0o000006;
-pub const B300: ::speed_t = 0o000007;
-pub const B600: ::speed_t = 0o000010;
-pub const B1200: ::speed_t = 0o000011;
-pub const B1800: ::speed_t = 0o000012;
-pub const B2400: ::speed_t = 0o000013;
-pub const B4800: ::speed_t = 0o000014;
-pub const B9600: ::speed_t = 0o000015;
-pub const B19200: ::speed_t = 0o000016;
-pub const B38400: ::speed_t = 0o000017;
-pub const EXTA: ::speed_t = B19200;
-pub const EXTB: ::speed_t = B38400;
-pub const B57600: ::speed_t = 0o010001;
-pub const B115200: ::speed_t = 0o010002;
-pub const B230400: ::speed_t = 0o010003;
-pub const B460800: ::speed_t = 0o010004;
-pub const B500000: ::speed_t = 0o010005;
-pub const B576000: ::speed_t = 0o010006;
-pub const B921600: ::speed_t = 0o010007;
-pub const B1000000: ::speed_t = 0o010010;
-pub const B1152000: ::speed_t = 0o010011;
-pub const B1500000: ::speed_t = 0o010012;
-pub const B2000000: ::speed_t = 0o010013;
-pub const B2500000: ::speed_t = 0o010014;
-pub const B3000000: ::speed_t = 0o010015;
-pub const B3500000: ::speed_t = 0o010016;
-pub const B4000000: ::speed_t = 0o010017;
-
-extern {
-    pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
-    pub fn ptrace(request: ::c_int, ...) -> ::c_long;
-    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;
-}
-
-cfg_if! {
-    if #[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))] {
-        mod b64;
-        pub use self::b64::*;
-    } else if #[cfg(any(target_arch = "x86",
-                        target_arch = "mips",
-                        target_arch = "arm",
-                        target_arch = "asmjs",
-                        target_arch = "wasm32"))] {
-        mod b32;
-        pub use self::b32::*;
-    } else { }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/linux/other/b32/arm.rs
+++ /dev/null
@@ -1,203 +0,0 @@
-pub type c_char = u8;
-pub type wchar_t = u32;
-
-s! {
-    pub struct ipc_perm {
-        pub __key: ::key_t,
-        pub uid: ::uid_t,
-        pub gid: ::gid_t,
-        pub cuid: ::uid_t,
-        pub cgid: ::gid_t,
-        pub mode: ::c_ushort,
-        __pad1: ::c_ushort,
-        pub __seq: ::c_ushort,
-        __pad2: ::c_ushort,
-        __unused1: ::c_ulong,
-        __unused2: ::c_ulong
-    }
-
-    pub struct stat64 {
-        pub st_dev: ::dev_t,
-        __pad1: ::c_uint,
-        __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,
-        __pad2: ::c_uint,
-        pub st_size: ::off64_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,
-        pub st_ino: ::ino64_t,
-    }
-
-    pub struct shmid_ds {
-        pub shm_perm: ::ipc_perm,
-        pub shm_segsz: ::size_t,
-        pub shm_atime: ::time_t,
-        __unused1: ::c_ulong,
-        pub shm_dtime: ::time_t,
-        __unused2: ::c_ulong,
-        pub shm_ctime: ::time_t,
-        __unused3: ::c_ulong,
-        pub shm_cpid: ::pid_t,
-        pub shm_lpid: ::pid_t,
-        pub shm_nattch: ::shmatt_t,
-        __unused4: ::c_ulong,
-        __unused5: ::c_ulong
-    }
-
-    pub struct msqid_ds {
-        pub msg_perm: ::ipc_perm,
-        pub msg_stime: ::time_t,
-        __glibc_reserved1: ::c_ulong,
-        pub msg_rtime: ::time_t,
-        __glibc_reserved2: ::c_ulong,
-        pub msg_ctime: ::time_t,
-        __glibc_reserved3: ::c_ulong,
-        __msg_cbytes: ::c_ulong,
-        pub msg_qnum: ::msgqnum_t,
-        pub msg_qbytes: ::msglen_t,
-        pub msg_lspid: ::pid_t,
-        pub msg_lrpid: ::pid_t,
-        __glibc_reserved4: ::c_ulong,
-        __glibc_reserved5: ::c_ulong,
-    }
-}
-
-pub const O_DIRECT: ::c_int = 0x10000;
-pub const O_DIRECTORY: ::c_int = 0x4000;
-pub const O_NOFOLLOW: ::c_int = 0x8000;
-
-pub const MAP_LOCKED: ::c_int = 0x02000;
-pub const MAP_NORESERVE: ::c_int = 0x04000;
-
-pub const EDEADLOCK: ::c_int = 35;
-
-pub const SO_PEERCRED: ::c_int = 17;
-pub const SO_RCVLOWAT: ::c_int = 18;
-pub const SO_SNDLOWAT: ::c_int = 19;
-pub const SO_RCVTIMEO: ::c_int = 20;
-pub const SO_SNDTIMEO: ::c_int = 21;
-
-pub const FIOCLEX: ::c_ulong = 0x5451;
-pub const FIONBIO: ::c_ulong = 0x5421;
-
-pub const SYS_gettid: ::c_long = 224;
-pub const SYS_perf_event_open: ::c_long = 364;
-
-pub const PTRACE_GETFPXREGS: ::c_uint = 18;
-pub const PTRACE_SETFPXREGS: ::c_uint = 19;
-
-pub const MCL_CURRENT: ::c_int = 0x0001;
-pub const MCL_FUTURE: ::c_int = 0x0002;
-
-pub const SIGSTKSZ: ::size_t = 8192;
-pub const MINSIGSTKSZ: ::size_t = 2048;
-pub const CBAUD: ::tcflag_t = 0o0010017;
-pub const TAB1: ::c_int = 0x00000800;
-pub const TAB2: ::c_int = 0x00001000;
-pub const TAB3: ::c_int = 0x00001800;
-pub const CR1: ::c_int  = 0x00000200;
-pub const CR2: ::c_int  = 0x00000400;
-pub const CR3: ::c_int  = 0x00000600;
-pub const FF1: ::c_int  = 0x00008000;
-pub const BS1: ::c_int  = 0x00002000;
-pub const VT1: ::c_int  = 0x00004000;
-pub const VWERASE: usize = 14;
-pub const VREPRINT: usize = 12;
-pub const VSUSP: usize = 10;
-pub const VSTART: usize = 8;
-pub const VSTOP: usize = 9;
-pub const VDISCARD: usize = 13;
-pub const VTIME: usize = 5;
-pub const IXON: ::tcflag_t = 0x00000400;
-pub const IXOFF: ::tcflag_t = 0x00001000;
-pub const ONLCR: ::tcflag_t = 0x4;
-pub const CSIZE: ::tcflag_t = 0x00000030;
-pub const CS6: ::tcflag_t = 0x00000010;
-pub const CS7: ::tcflag_t = 0x00000020;
-pub const CS8: ::tcflag_t = 0x00000030;
-pub const CSTOPB: ::tcflag_t = 0x00000040;
-pub const CREAD: ::tcflag_t = 0x00000080;
-pub const PARENB: ::tcflag_t = 0x00000100;
-pub const PARODD: ::tcflag_t = 0x00000200;
-pub const HUPCL: ::tcflag_t = 0x00000400;
-pub const CLOCAL: ::tcflag_t = 0x00000800;
-pub const ECHOKE: ::tcflag_t = 0x00000800;
-pub const ECHOE: ::tcflag_t = 0x00000010;
-pub const ECHOK: ::tcflag_t = 0x00000020;
-pub const ECHONL: ::tcflag_t = 0x00000040;
-pub const ECHOPRT: ::tcflag_t = 0x00000400;
-pub const ECHOCTL: ::tcflag_t = 0x00000200;
-pub const ISIG: ::tcflag_t = 0x00000001;
-pub const ICANON: ::tcflag_t = 0x00000002;
-pub const PENDIN: ::tcflag_t = 0x00004000;
-pub const NOFLSH: ::tcflag_t = 0x00000080;
-
-pub const B0: ::speed_t = 0o000000;
-pub const B50: ::speed_t = 0o000001;
-pub const B75: ::speed_t = 0o000002;
-pub const B110: ::speed_t = 0o000003;
-pub const B134: ::speed_t = 0o000004;
-pub const B150: ::speed_t = 0o000005;
-pub const B200: ::speed_t = 0o000006;
-pub const B300: ::speed_t = 0o000007;
-pub const B600: ::speed_t = 0o000010;
-pub const B1200: ::speed_t = 0o000011;
-pub const B1800: ::speed_t = 0o000012;
-pub const B2400: ::speed_t = 0o000013;
-pub const B4800: ::speed_t = 0o000014;
-pub const B9600: ::speed_t = 0o000015;
-pub const B19200: ::speed_t = 0o000016;
-pub const B38400: ::speed_t = 0o000017;
-pub const EXTA: ::speed_t = B19200;
-pub const EXTB: ::speed_t = B38400;
-pub const B57600: ::speed_t = 0o010001;
-pub const B115200: ::speed_t = 0o010002;
-pub const B230400: ::speed_t = 0o010003;
-pub const B460800: ::speed_t = 0o010004;
-pub const B500000: ::speed_t = 0o010005;
-pub const B576000: ::speed_t = 0o010006;
-pub const B921600: ::speed_t = 0o010007;
-pub const B1000000: ::speed_t = 0o010010;
-pub const B1152000: ::speed_t = 0o010011;
-pub const B1500000: ::speed_t = 0o010012;
-pub const B2000000: ::speed_t = 0o010013;
-pub const B2500000: ::speed_t = 0o010014;
-pub const B3000000: ::speed_t = 0o010015;
-pub const B3500000: ::speed_t = 0o010016;
-pub const B4000000: ::speed_t = 0o010017;
-
-pub const VEOL: usize = 11;
-pub const VEOL2: usize = 16;
-pub const VMIN: usize = 6;
-pub const IEXTEN: ::tcflag_t = 0x00008000;
-pub const TOSTOP: ::tcflag_t = 0x00000100;
-pub const FLUSHO: ::tcflag_t = 0x00001000;
-pub const EXTPROC: ::tcflag_t = 0x00010000;
-pub const TCGETS: ::c_ulong = 0x5401;
-pub const TCSETS: ::c_ulong = 0x5402;
-pub const TCSETSW: ::c_ulong = 0x5403;
-pub const TCSETSF: ::c_ulong = 0x5404;
-pub const TCGETA: ::c_ulong = 0x5405;
-pub const TCSETA: ::c_ulong = 0x5406;
-pub const TCSETAW: ::c_ulong = 0x5407;
-pub const TCSETAF: ::c_ulong = 0x5408;
-pub const TCSBRK: ::c_ulong = 0x5409;
-pub const TCXONC: ::c_ulong = 0x540A;
-pub const TCFLSH: ::c_ulong = 0x540B;
-pub const TIOCINQ: ::c_ulong = 0x541B;
-pub const TIOCGPGRP: ::c_ulong = 0x540F;
-pub const TIOCSPGRP: ::c_ulong = 0x5410;
-pub const TIOCOUTQ: ::c_ulong = 0x5411;
-pub const TIOCGWINSZ: ::c_ulong = 0x5413;
-pub const TIOCSWINSZ: ::c_ulong = 0x5414;
-pub const FIONREAD: ::c_ulong = 0x541B;
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/linux/other/b32/mod.rs
+++ /dev/null
@@ -1,284 +0,0 @@
-//! 32-bit specific definitions for linux-like values
-
-pub type c_long = i32;
-pub type c_ulong = u32;
-pub type clock_t = i32;
-pub type time_t = i32;
-pub type suseconds_t = i32;
-pub type ino_t = u32;
-pub type off_t = i32;
-pub type blkcnt_t = i32;
-pub type __fsword_t = i32;
-
-pub type blksize_t = i32;
-pub type nlink_t = u32;
-
-s! {
-    pub struct stat {
-        pub st_dev: ::dev_t,
-        __pad1: ::c_short,
-        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,
-        __pad2: ::c_short,
-        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,
-        __unused4: ::c_long,
-        __unused5: ::c_long,
-    }
-
-    pub struct pthread_attr_t {
-        __size: [u32; 9]
-    }
-
-    pub struct sigset_t {
-        __val: [::c_ulong; 32],
-    }
-
-    pub struct sysinfo {
-        pub uptime: ::c_long,
-        pub loads: [::c_ulong; 3],
-        pub totalram: ::c_ulong,
-        pub freeram: ::c_ulong,
-        pub sharedram: ::c_ulong,
-        pub bufferram: ::c_ulong,
-        pub totalswap: ::c_ulong,
-        pub freeswap: ::c_ulong,
-        pub procs: ::c_ushort,
-        pub pad: ::c_ushort,
-        pub totalhigh: ::c_ulong,
-        pub freehigh: ::c_ulong,
-        pub mem_unit: ::c_uint,
-        pub _f: [::c_char; 8],
-    }
-}
-
-pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
-pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
-
-pub const RLIMIT_NOFILE: ::c_int = 7;
-pub const RLIMIT_NPROC: ::c_int = 6;
-
-pub const O_APPEND: ::c_int = 1024;
-pub const O_CREAT: ::c_int = 64;
-pub const O_EXCL: ::c_int = 128;
-pub const O_NOCTTY: ::c_int = 256;
-pub const O_NONBLOCK: ::c_int = 2048;
-pub const O_SYNC: ::c_int = 1052672;
-pub const O_RSYNC: ::c_int = 1052672;
-pub const O_DSYNC: ::c_int = 4096;
-pub const O_FSYNC: ::c_int = 0x101000;
-
-pub const MAP_GROWSDOWN: ::c_int = 0x0100;
-
-pub const EDEADLK: ::c_int = 35;
-pub const ENAMETOOLONG: ::c_int = 36;
-pub const ENOLCK: ::c_int = 37;
-pub const ENOSYS: ::c_int = 38;
-pub const ENOTEMPTY: ::c_int = 39;
-pub const ELOOP: ::c_int = 40;
-pub const ENOMSG: ::c_int = 42;
-pub const EIDRM: ::c_int = 43;
-pub const ECHRNG: ::c_int = 44;
-pub const EL2NSYNC: ::c_int = 45;
-pub const EL3HLT: ::c_int = 46;
-pub const EL3RST: ::c_int = 47;
-pub const ELNRNG: ::c_int = 48;
-pub const EUNATCH: ::c_int = 49;
-pub const ENOCSI: ::c_int = 50;
-pub const EL2HLT: ::c_int = 51;
-pub const EBADE: ::c_int = 52;
-pub const EBADR: ::c_int = 53;
-pub const EXFULL: ::c_int = 54;
-pub const ENOANO: ::c_int = 55;
-pub const EBADRQC: ::c_int = 56;
-pub const EBADSLT: ::c_int = 57;
-pub const EMULTIHOP: ::c_int = 72;
-pub const EOVERFLOW: ::c_int = 75;
-pub const ENOTUNIQ: ::c_int = 76;
-pub const EBADFD: ::c_int = 77;
-pub const EBADMSG: ::c_int = 74;
-pub const EREMCHG: ::c_int = 78;
-pub const ELIBACC: ::c_int = 79;
-pub const ELIBBAD: ::c_int = 80;
-pub const ELIBSCN: ::c_int = 81;
-pub const ELIBMAX: ::c_int = 82;
-pub const ELIBEXEC: ::c_int = 83;
-pub const EILSEQ: ::c_int = 84;
-pub const ERESTART: ::c_int = 85;
-pub const ESTRPIPE: ::c_int = 86;
-pub const EUSERS: ::c_int = 87;
-pub const ENOTSOCK: ::c_int = 88;
-pub const EDESTADDRREQ: ::c_int = 89;
-pub const EMSGSIZE: ::c_int = 90;
-pub const EPROTOTYPE: ::c_int = 91;
-pub const ENOPROTOOPT: ::c_int = 92;
-pub const EPROTONOSUPPORT: ::c_int = 93;
-pub const ESOCKTNOSUPPORT: ::c_int = 94;
-pub const EOPNOTSUPP: ::c_int = 95;
-pub const EPFNOSUPPORT: ::c_int = 96;
-pub const EAFNOSUPPORT: ::c_int = 97;
-pub const EADDRINUSE: ::c_int = 98;
-pub const EADDRNOTAVAIL: ::c_int = 99;
-pub const ENETDOWN: ::c_int = 100;
-pub const ENETUNREACH: ::c_int = 101;
-pub const ENETRESET: ::c_int = 102;
-pub const ECONNABORTED: ::c_int = 103;
-pub const ECONNRESET: ::c_int = 104;
-pub const ENOBUFS: ::c_int = 105;
-pub const EISCONN: ::c_int = 106;
-pub const ENOTCONN: ::c_int = 107;
-pub const ESHUTDOWN: ::c_int = 108;
-pub const ETOOMANYREFS: ::c_int = 109;
-pub const ETIMEDOUT: ::c_int = 110;
-pub const ECONNREFUSED: ::c_int = 111;
-pub const EHOSTDOWN: ::c_int = 112;
-pub const EHOSTUNREACH: ::c_int = 113;
-pub const EALREADY: ::c_int = 114;
-pub const EINPROGRESS: ::c_int = 115;
-pub const ESTALE: ::c_int = 116;
-pub const EDQUOT: ::c_int = 122;
-pub const ENOMEDIUM: ::c_int = 123;
-pub const EMEDIUMTYPE: ::c_int = 124;
-pub const ECANCELED: ::c_int = 125;
-pub const ENOKEY: ::c_int = 126;
-pub const EKEYEXPIRED: ::c_int = 127;
-pub const EKEYREVOKED: ::c_int = 128;
-pub const EKEYREJECTED: ::c_int = 129;
-pub const EOWNERDEAD: ::c_int = 130;
-pub const ENOTRECOVERABLE: ::c_int = 131;
-pub const EHWPOISON: ::c_int = 133;
-pub const ERFKILL: ::c_int = 132;
-
-pub const SOL_SOCKET: ::c_int = 1;
-
-pub const SO_REUSEADDR: ::c_int = 2;
-pub const SO_TYPE: ::c_int = 3;
-pub const SO_ERROR: ::c_int = 4;
-pub const SO_DONTROUTE: ::c_int = 5;
-pub const SO_BROADCAST: ::c_int = 6;
-pub const SO_SNDBUF: ::c_int = 7;
-pub const SO_RCVBUF: ::c_int = 8;
-pub const SO_KEEPALIVE: ::c_int = 9;
-pub const SO_OOBINLINE: ::c_int = 10;
-pub const SO_LINGER: ::c_int = 13;
-pub const SO_REUSEPORT: ::c_int = 15;
-pub const SO_ACCEPTCONN: ::c_int = 30;
-
-pub const SA_ONSTACK: ::c_int = 0x08000000;
-pub const SA_SIGINFO: ::c_int = 0x00000004;
-pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
-
-pub const SIGCHLD: ::c_int = 17;
-pub const SIGBUS: ::c_int = 7;
-pub const SIGUSR1: ::c_int = 10;
-pub const SIGUSR2: ::c_int = 12;
-pub const SIGCONT: ::c_int = 18;
-pub const SIGSTOP: ::c_int = 19;
-pub const SIGTSTP: ::c_int = 20;
-pub const SIGURG: ::c_int = 23;
-pub const SIGIO: ::c_int = 29;
-pub const SIGSYS: ::c_int = 31;
-pub const SIGSTKFLT: ::c_int = 16;
-pub const SIGUNUSED: ::c_int = 31;
-pub const SIGPOLL: ::c_int = 29;
-pub const SIGPWR: ::c_int = 30;
-pub const SIG_SETMASK: ::c_int = 2;
-pub const SIG_BLOCK: ::c_int = 0x000000;
-pub const SIG_UNBLOCK: ::c_int = 0x01;
-
-pub const POLLWRNORM: ::c_short = 0x100;
-pub const POLLWRBAND: ::c_short = 0x200;
-
-pub const O_ASYNC: ::c_int = 0x2000;
-pub const O_NDELAY: ::c_int = 0x800;
-
-pub const PTRACE_DETACH: ::c_uint = 17;
-
-pub const EFD_NONBLOCK: ::c_int = 0x800;
-
-pub const F_GETLK: ::c_int = 5;
-pub const F_GETOWN: ::c_int = 9;
-pub const F_SETOWN: ::c_int = 8;
-pub const F_SETLK: ::c_int = 6;
-pub const F_SETLKW: ::c_int = 7;
-
-pub const SFD_NONBLOCK: ::c_int = 0x0800;
-
-pub const TIOCEXCL: ::c_ulong = 0x540C;
-pub const TIOCNXCL: ::c_ulong = 0x540D;
-pub const TIOCSCTTY: ::c_ulong = 0x540E;
-pub const TIOCSTI: ::c_ulong = 0x5412;
-pub const TIOCMGET: ::c_ulong = 0x5415;
-pub const TIOCMBIS: ::c_ulong = 0x5416;
-pub const TIOCMBIC: ::c_ulong = 0x5417;
-pub const TIOCMSET: ::c_ulong = 0x5418;
-pub const TIOCCONS: ::c_ulong = 0x541D;
-pub const CLONE_NEWCGROUP: ::c_int = 0x02000000;
-
-pub const SFD_CLOEXEC: ::c_int = 0x080000;
-
-pub const NCCS: usize = 32;
-
-pub const O_TRUNC: ::c_int = 512;
-
-pub const O_CLOEXEC: ::c_int = 0x80000;
-
-pub const EBFONT: ::c_int = 59;
-pub const ENOSTR: ::c_int = 60;
-pub const ENODATA: ::c_int = 61;
-pub const ETIME: ::c_int = 62;
-pub const ENOSR: ::c_int = 63;
-pub const ENONET: ::c_int = 64;
-pub const ENOPKG: ::c_int = 65;
-pub const EREMOTE: ::c_int = 66;
-pub const ENOLINK: ::c_int = 67;
-pub const EADV: ::c_int = 68;
-pub const ESRMNT: ::c_int = 69;
-pub const ECOMM: ::c_int = 70;
-pub const EPROTO: ::c_int = 71;
-pub const EDOTDOT: ::c_int = 73;
-
-pub const SA_NODEFER: ::c_int = 0x40000000;
-pub const SA_RESETHAND: ::c_int = 0x80000000;
-pub const SA_RESTART: ::c_int = 0x10000000;
-pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
-
-pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
-
-pub const EFD_CLOEXEC: ::c_int = 0x80000;
-
-pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
-pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24;
-pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
-pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
-
-pub const PTRACE_GETFPREGS: ::c_uint = 14;
-pub const PTRACE_SETFPREGS: ::c_uint = 15;
-pub const PTRACE_GETREGS: ::c_uint = 12;
-pub const PTRACE_SETREGS: ::c_uint = 13;
-
-cfg_if! {
-    if #[cfg(target_arch = "x86")] {
-        mod x86;
-        pub use self::x86::*;
-    } else if #[cfg(target_arch = "arm")] {
-        mod arm;
-        pub use self::arm::*;
-    } else if #[cfg(target_arch = "powerpc")] {
-        mod powerpc;
-        pub use self::powerpc::*;
-    } else {
-        // Unknown target_arch
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/linux/other/b32/powerpc.rs
+++ /dev/null
@@ -1,207 +0,0 @@
-pub type c_char = u8;
-pub type wchar_t = i32;
-
-s! {
-    pub struct 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,
-        __seq: ::uint32_t,
-        __pad1: ::uint32_t,
-        __glibc_reserved1: ::uint64_t,
-        __glibc_reserved2: ::uint64_t,
-    }
-
-    pub struct stat64 {
-        pub st_dev: ::dev_t,
-        pub st_ino: ::ino64_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,
-        __pad2: ::c_ushort,
-        pub st_size: ::off64_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,
-        __glibc_reserved4: ::c_ulong,
-        __glibc_reserved5: ::c_ulong,
-    }
-
-    pub struct shmid_ds {
-        pub shm_perm: ::ipc_perm,
-        __glibc_reserved1: ::c_uint,
-        pub shm_atime: ::time_t,
-        __glibc_reserved2: ::c_uint,
-        pub shm_dtime: ::time_t,
-        __glibc_reserved3: ::c_uint,
-        pub shm_ctime: ::time_t,
-        __glibc_reserved4: ::c_uint,
-        pub shm_segsz: ::size_t,
-        pub shm_cpid: ::pid_t,
-        pub shm_lpid: ::pid_t,
-        pub shm_nattch: ::shmatt_t,
-        __glibc_reserved5: ::c_ulong,
-        __glibc_reserved6: ::c_ulong,
-    }
-
-    pub struct msqid_ds {
-        pub msg_perm: ::ipc_perm,
-        __glibc_reserved1: ::c_uint,
-        pub msg_stime: ::time_t,
-        __glibc_reserved2: ::c_uint,
-        pub msg_rtime: ::time_t,
-        __glibc_reserved3: ::c_uint,
-        pub msg_ctime: ::time_t,
-        __msg_cbytes: ::c_ulong,
-        pub msg_qnum: ::msgqnum_t,
-        pub msg_qbytes: ::msglen_t,
-        pub msg_lspid: ::pid_t,
-        pub msg_lrpid: ::pid_t,
-        __glibc_reserved4: ::c_ulong,
-        __glibc_reserved5: ::c_ulong,
-    }
-}
-
-pub const O_DIRECT: ::c_int = 0x20000;
-pub const O_DIRECTORY: ::c_int = 0x4000;
-pub const O_NOFOLLOW: ::c_int = 0x8000;
-
-pub const MAP_LOCKED: ::c_int = 0x00080;
-pub const MAP_NORESERVE: ::c_int = 0x00040;
-
-pub const EDEADLOCK: ::c_int = 58;
-
-pub const SO_SNDBUFFORCE: ::c_int = 32;
-pub const SO_RCVBUFFORCE: ::c_int = 33;
-pub const SO_NO_CHECK: ::c_int = 11;
-pub const SO_PRIORITY: ::c_int = 12;
-pub const SO_BSDCOMPAT: ::c_int = 14;
-pub const SO_RCVLOWAT: ::c_int = 16;
-pub const SO_SNDLOWAT: ::c_int = 17;
-pub const SO_RCVTIMEO: ::c_int = 18;
-pub const SO_SNDTIMEO: ::c_int = 19;
-pub const SO_PASSCRED: ::c_int = 20;
-pub const SO_PEERCRED: ::c_int = 21;
-
-pub const FIOCLEX: ::c_ulong = 0x20006601;
-pub const FIONBIO: ::c_ulong = 0x8004667e;
-
-pub const SYS_gettid: ::c_long = 207;
-pub const SYS_perf_event_open: ::c_long = 319;
-
-pub const MCL_CURRENT: ::c_int = 0x2000;
-pub const MCL_FUTURE: ::c_int = 0x4000;
-
-pub const SIGSTKSZ: ::size_t = 0x4000;
-pub const MINSIGSTKSZ: ::size_t = 4096;
-pub const CBAUD: ::tcflag_t = 0xff;
-pub const TAB1: ::c_int = 0x400;
-pub const TAB2: ::c_int = 0x800;
-pub const TAB3: ::c_int = 0xc00;
-pub const CR1: ::c_int  = 0x1000;
-pub const CR2: ::c_int  = 0x2000;
-pub const CR3: ::c_int  = 0x3000;
-pub const FF1: ::c_int  = 0x4000;
-pub const BS1: ::c_int  = 0x8000;
-pub const VT1: ::c_int  = 0x10000;
-pub const VWERASE: usize = 0xa;
-pub const VREPRINT: usize = 0xb;
-pub const VSUSP: usize = 0xc;
-pub const VSTART: usize = 0xd;
-pub const VSTOP: usize = 0xe;
-pub const VDISCARD: usize = 0x10;
-pub const VTIME: usize = 0x7;
-pub const IXON: ::tcflag_t = 0x200;
-pub const IXOFF: ::tcflag_t = 0x400;
-pub const ONLCR: ::tcflag_t = 0x2;
-pub const CSIZE: ::tcflag_t = 0x300;
-pub const CS6: ::tcflag_t = 0x100;
-pub const CS7: ::tcflag_t = 0x200;
-pub const CS8: ::tcflag_t = 0x300;
-pub const CSTOPB: ::tcflag_t = 0x400;
-pub const CREAD: ::tcflag_t = 0x800;
-pub const PARENB: ::tcflag_t = 0x1000;
-pub const PARODD: ::tcflag_t = 0x2000;
-pub const HUPCL: ::tcflag_t = 0x4000;
-pub const CLOCAL: ::tcflag_t = 0x8000;
-pub const ECHOKE: ::tcflag_t = 0x1;
-pub const ECHOE: ::tcflag_t = 0x2;
-pub const ECHOK: ::tcflag_t = 0x4;
-pub const ECHONL: ::tcflag_t = 0x10;
-pub const ECHOPRT: ::tcflag_t = 0x20;
-pub const ECHOCTL: ::tcflag_t = 0x40;
-pub const ISIG: ::tcflag_t = 0x80;
-pub const ICANON: ::tcflag_t = 0x100;
-pub const PENDIN: ::tcflag_t = 0x20000000;
-pub const NOFLSH: ::tcflag_t = 0x80000000;
-
-pub const B0: ::speed_t = 0o000000;
-pub const B50: ::speed_t = 0o000001;
-pub const B75: ::speed_t = 0o000002;
-pub const B110: ::speed_t = 0o000003;
-pub const B134: ::speed_t = 0o000004;
-pub const B150: ::speed_t = 0o000005;
-pub const B200: ::speed_t = 0o000006;
-pub const B300: ::speed_t = 0o000007;
-pub const B600: ::speed_t = 0o000010;
-pub const B1200: ::speed_t = 0o000011;
-pub const B1800: ::speed_t = 0o000012;
-pub const B2400: ::speed_t = 0o000013;
-pub const B4800: ::speed_t = 0o000014;
-pub const B9600: ::speed_t = 0o000015;
-pub const B19200: ::speed_t = 0o000016;
-pub const B38400: ::speed_t = 0o000017;
-pub const EXTA: ::speed_t = B19200;
-pub const EXTB: ::speed_t = B38400;
-pub const CBAUDEX: ::speed_t = 0o000020;
-pub const B57600: ::speed_t = 0o0020;
-pub const B115200: ::speed_t = 0o0021;
-pub const B230400: ::speed_t = 0o0022;
-pub const B460800: ::speed_t = 0o0023;
-pub const B500000: ::speed_t = 0o0024;
-pub const B576000: ::speed_t = 0o0025;
-pub const B921600: ::speed_t = 0o0026;
-pub const B1000000: ::speed_t = 0o0027;
-pub const B1152000: ::speed_t = 0o0030;
-pub const B1500000: ::speed_t = 0o0031;
-pub const B2000000: ::speed_t = 0o0032;
-pub const B2500000: ::speed_t = 0o0033;
-pub const B3000000: ::speed_t = 0o0034;
-pub const B3500000: ::speed_t = 0o0035;
-pub const B4000000: ::speed_t = 0o0036;
-
-pub const VEOL: usize = 6;
-pub const VEOL2: usize = 8;
-pub const VMIN: usize = 5;
-pub const IEXTEN: ::tcflag_t = 0x400;
-pub const TOSTOP: ::tcflag_t = 0x400000;
-pub const FLUSHO: ::tcflag_t = 0x800000;
-pub const EXTPROC: ::tcflag_t = 0x10000000;
-pub const TCGETS: ::c_ulong = 0x403c7413;
-pub const TCSETS: ::c_ulong = 0x803c7414;
-pub const TCSETSW: ::c_ulong = 0x803c7415;
-pub const TCSETSF: ::c_ulong = 0x803c7416;
-pub const TCGETA: ::c_ulong = 0x40147417;
-pub const TCSETA: ::c_ulong = 0x80147418;
-pub const TCSETAW: ::c_ulong = 0x80147419;
-pub const TCSETAF: ::c_ulong = 0x8014741c;
-pub const TCSBRK: ::c_ulong = 0x2000741d;
-pub const TCXONC: ::c_ulong = 0x2000741e;
-pub const TCFLSH: ::c_ulong = 0x2000741f;
-pub const TIOCINQ: ::c_ulong = 0x4004667f;
-pub const TIOCGPGRP: ::c_ulong = 0x40047477;
-pub const TIOCSPGRP: ::c_ulong = 0x80047476;
-pub const TIOCOUTQ: ::c_ulong = 0x40047473;
-pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
-pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
-pub const FIONREAD: ::c_ulong = 0x4004667f;
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/linux/other/b32/x86.rs
+++ /dev/null
@@ -1,319 +0,0 @@
-pub type c_char = i8;
-pub type wchar_t = i32;
-pub type greg_t = i32;
-
-s! {
-    pub struct _libc_fpreg {
-        pub significand: [u16; 4],
-        pub exponent: u16,
-    }
-
-    pub struct _libc_fpstate {
-        pub cw: ::c_ulong,
-        pub sw: ::c_ulong,
-        pub tag: ::c_ulong,
-        pub ipoff: ::c_ulong,
-        pub cssel: ::c_ulong,
-        pub dataoff: ::c_ulong,
-        pub datasel: ::c_ulong,
-        pub _st: [_libc_fpreg; 8],
-        pub status: ::c_ulong,
-    }
-
-    pub struct user_fpregs_struct {
-        pub cwd: ::c_long,
-        pub swd: ::c_long,
-        pub twd: ::c_long,
-        pub fip: ::c_long,
-        pub fcs: ::c_long,
-        pub foo: ::c_long,
-        pub fos: ::c_long,
-        pub st_space: [::c_long; 20],
-    }
-
-    pub struct user_fpxregs_struct {
-        pub cwd: ::c_ushort,
-        pub swd: ::c_ushort,
-        pub twd: ::c_ushort,
-        pub fop: ::c_ushort,
-        pub fip: ::c_long,
-        pub fcs: ::c_long,
-        pub foo: ::c_long,
-        pub fos: ::c_long,
-        pub mxcsr: ::c_long,
-        __reserved: ::c_long,
-        pub st_space: [::c_long; 32],
-        pub xmm_space: [::c_long; 32],
-        padding: [::c_long; 56],
-    }
-
-    pub struct user_regs_struct {
-        pub ebx: ::c_long,
-        pub ecx: ::c_long,
-        pub edx: ::c_long,
-        pub esi: ::c_long,
-        pub edi: ::c_long,
-        pub ebp: ::c_long,
-        pub eax: ::c_long,
-        pub xds: ::c_long,
-        pub xes: ::c_long,
-        pub xfs: ::c_long,
-        pub xgs: ::c_long,
-        pub orig_eax: ::c_long,
-        pub eip: ::c_long,
-        pub xcs: ::c_long,
-        pub eflags: ::c_long,
-        pub esp: ::c_long,
-        pub xss: ::c_long,
-    }
-
-    pub struct user {
-        pub regs: user_regs_struct,
-        pub u_fpvalid: ::c_int,
-        pub i387: user_fpregs_struct,
-        pub u_tsize: ::c_ulong,
-        pub u_dsize: ::c_ulong,
-        pub u_ssize: ::c_ulong,
-        pub start_code: ::c_ulong,
-        pub start_stack: ::c_ulong,
-        pub signal: ::c_long,
-        __reserved: ::c_int,
-        pub u_ar0: *mut user_regs_struct,
-        pub u_fpstate: *mut user_fpregs_struct,
-        pub magic: ::c_ulong,
-        pub u_comm: [c_char; 32],
-        pub u_debugreg: [::c_int; 8],
-    }
-
-    pub struct mcontext_t {
-        pub gregs: [greg_t; 19],
-        pub fpregs: *mut _libc_fpstate,
-        pub oldmask: ::c_ulong,
-        pub cr2: ::c_ulong,
-    }
-
-    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; 112],
-    }
-
-    pub struct ipc_perm {
-        pub __key: ::key_t,
-        pub uid: ::uid_t,
-        pub gid: ::gid_t,
-        pub cuid: ::uid_t,
-        pub cgid: ::gid_t,
-        pub mode: ::c_ushort,
-        __pad1: ::c_ushort,
-        pub __seq: ::c_ushort,
-        __pad2: ::c_ushort,
-        __unused1: ::c_ulong,
-        __unused2: ::c_ulong
-    }
-
-    pub struct stat64 {
-        pub st_dev: ::dev_t,
-        __pad1: ::c_uint,
-        __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,
-        __pad2: ::c_uint,
-        pub st_size: ::off64_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,
-        pub st_ino: ::ino64_t,
-    }
-
-    pub struct shmid_ds {
-        pub shm_perm: ::ipc_perm,
-        pub shm_segsz: ::size_t,
-        pub shm_atime: ::time_t,
-        __unused1: ::c_ulong,
-        pub shm_dtime: ::time_t,
-        __unused2: ::c_ulong,
-        pub shm_ctime: ::time_t,
-        __unused3: ::c_ulong,
-        pub shm_cpid: ::pid_t,
-        pub shm_lpid: ::pid_t,
-        pub shm_nattch: ::shmatt_t,
-        __unused4: ::c_ulong,
-        __unused5: ::c_ulong
-    }
-
-    pub struct msqid_ds {
-        pub msg_perm: ::ipc_perm,
-        pub msg_stime: ::time_t,
-        __glibc_reserved1: ::c_ulong,
-        pub msg_rtime: ::time_t,
-        __glibc_reserved2: ::c_ulong,
-        pub msg_ctime: ::time_t,
-        __glibc_reserved3: ::c_ulong,
-        __msg_cbytes: ::c_ulong,
-        pub msg_qnum: ::msgqnum_t,
-        pub msg_qbytes: ::msglen_t,
-        pub msg_lspid: ::pid_t,
-        pub msg_lrpid: ::pid_t,
-        __glibc_reserved4: ::c_ulong,
-        __glibc_reserved5: ::c_ulong,
-    }
-}
-
-pub const O_DIRECT: ::c_int = 0x4000;
-pub const O_DIRECTORY: ::c_int = 0x10000;
-pub const O_NOFOLLOW: ::c_int = 0x20000;
-
-pub const MAP_LOCKED: ::c_int = 0x02000;
-pub const MAP_NORESERVE: ::c_int = 0x04000;
-pub const MAP_32BIT: ::c_int = 0x0040;
-
-pub const EDEADLOCK: ::c_int = 35;
-
-pub const SO_SNDBUFFORCE: ::c_int = 32;
-pub const SO_RCVBUFFORCE: ::c_int = 33;
-pub const SO_NO_CHECK: ::c_int = 11;
-pub const SO_PRIORITY: ::c_int = 12;
-pub const SO_BSDCOMPAT: ::c_int = 14;
-pub const SO_PASSCRED: ::c_int = 16;
-pub const SO_PEERCRED: ::c_int = 17;
-pub const SO_RCVLOWAT: ::c_int = 18;
-pub const SO_SNDLOWAT: ::c_int = 19;
-pub const SO_RCVTIMEO: ::c_int = 20;
-pub const SO_SNDTIMEO: ::c_int = 21;
-
-pub const FIOCLEX: ::c_ulong = 0x5451;
-pub const FIONBIO: ::c_ulong = 0x5421;
-
-pub const SYS_gettid: ::c_long = 224;
-pub const SYS_perf_event_open: ::c_long = 336;
-
-pub const PTRACE_GETFPXREGS: ::c_uint = 18;
-pub const PTRACE_SETFPXREGS: ::c_uint = 19;
-
-pub const MCL_CURRENT: ::c_int = 0x0001;
-pub const MCL_FUTURE: ::c_int = 0x0002;
-
-pub const SIGSTKSZ: ::size_t = 8192;
-pub const MINSIGSTKSZ: ::size_t = 2048;
-pub const CBAUD: ::tcflag_t = 0o0010017;
-pub const TAB1: ::c_int = 0x00000800;
-pub const TAB2: ::c_int = 0x00001000;
-pub const TAB3: ::c_int = 0x00001800;
-pub const CR1: ::c_int  = 0x00000200;
-pub const CR2: ::c_int  = 0x00000400;
-pub const CR3: ::c_int  = 0x00000600;
-pub const FF1: ::c_int  = 0x00008000;
-pub const BS1: ::c_int  = 0x00002000;
-pub const VT1: ::c_int  = 0x00004000;
-pub const VWERASE: usize = 14;
-pub const VREPRINT: usize = 12;
-pub const VSUSP: usize = 10;
-pub const VSTART: usize = 8;
-pub const VSTOP: usize = 9;
-pub const VDISCARD: usize = 13;
-pub const VTIME: usize = 5;
-pub const IXON: ::tcflag_t = 0x00000400;
-pub const IXOFF: ::tcflag_t = 0x00001000;
-pub const ONLCR: ::tcflag_t = 0x4;
-pub const CSIZE: ::tcflag_t = 0x00000030;
-pub const CS6: ::tcflag_t = 0x00000010;
-pub const CS7: ::tcflag_t = 0x00000020;
-pub const CS8: ::tcflag_t = 0x00000030;
-pub const CSTOPB: ::tcflag_t = 0x00000040;
-pub const CREAD: ::tcflag_t = 0x00000080;
-pub const PARENB: ::tcflag_t = 0x00000100;
-pub const PARODD: ::tcflag_t = 0x00000200;
-pub const HUPCL: ::tcflag_t = 0x00000400;
-pub const CLOCAL: ::tcflag_t = 0x00000800;
-pub const ECHOKE: ::tcflag_t = 0x00000800;
-pub const ECHOE: ::tcflag_t = 0x00000010;
-pub const ECHOK: ::tcflag_t = 0x00000020;
-pub const ECHONL: ::tcflag_t = 0x00000040;
-pub const ECHOPRT: ::tcflag_t = 0x00000400;
-pub const ECHOCTL: ::tcflag_t = 0x00000200;
-pub const ISIG: ::tcflag_t = 0x00000001;
-pub const ICANON: ::tcflag_t = 0x00000002;
-pub const PENDIN: ::tcflag_t = 0x00004000;
-pub const NOFLSH: ::tcflag_t = 0x00000080;
-
-pub const B0: ::speed_t = 0o000000;
-pub const B50: ::speed_t = 0o000001;
-pub const B75: ::speed_t = 0o000002;
-pub const B110: ::speed_t = 0o000003;
-pub const B134: ::speed_t = 0o000004;
-pub const B150: ::speed_t = 0o000005;
-pub const B200: ::speed_t = 0o000006;
-pub const B300: ::speed_t = 0o000007;
-pub const B600: ::speed_t = 0o000010;
-pub const B1200: ::speed_t = 0o000011;
-pub const B1800: ::speed_t = 0o000012;
-pub const B2400: ::speed_t = 0o000013;
-pub const B4800: ::speed_t = 0o000014;
-pub const B9600: ::speed_t = 0o000015;
-pub const B19200: ::speed_t = 0o000016;
-pub const B38400: ::speed_t = 0o000017;
-pub const EXTA: ::speed_t = B19200;
-pub const EXTB: ::speed_t = B38400;
-pub const B57600: ::speed_t = 0o010001;
-pub const B115200: ::speed_t = 0o010002;
-pub const B230400: ::speed_t = 0o010003;
-pub const B460800: ::speed_t = 0o010004;
-pub const B500000: ::speed_t = 0o010005;
-pub const B576000: ::speed_t = 0o010006;
-pub const B921600: ::speed_t = 0o010007;
-pub const B1000000: ::speed_t = 0o010010;
-pub const B1152000: ::speed_t = 0o010011;
-pub const B1500000: ::speed_t = 0o010012;
-pub const B2000000: ::speed_t = 0o010013;
-pub const B2500000: ::speed_t = 0o010014;
-pub const B3000000: ::speed_t = 0o010015;
-pub const B3500000: ::speed_t = 0o010016;
-pub const B4000000: ::speed_t = 0o010017;
-
-pub const VEOL: usize = 11;
-pub const VEOL2: usize = 16;
-pub const VMIN: usize = 6;
-pub const IEXTEN: ::tcflag_t = 0x00008000;
-pub const TOSTOP: ::tcflag_t = 0x00000100;
-pub const FLUSHO: ::tcflag_t = 0x00001000;
-pub const EXTPROC: ::tcflag_t = 0x00010000;
-pub const TCGETS: ::c_ulong = 0x5401;
-pub const TCSETS: ::c_ulong = 0x5402;
-pub const TCSETSW: ::c_ulong = 0x5403;
-pub const TCSETSF: ::c_ulong = 0x5404;
-pub const TCGETA: ::c_ulong = 0x5405;
-pub const TCSETA: ::c_ulong = 0x5406;
-pub const TCSETAW: ::c_ulong = 0x5407;
-pub const TCSETAF: ::c_ulong = 0x5408;
-pub const TCSBRK: ::c_ulong = 0x5409;
-pub const TCXONC: ::c_ulong = 0x540A;
-pub const TCFLSH: ::c_ulong = 0x540B;
-pub const TIOCINQ: ::c_ulong = 0x541B;
-pub const TIOCGPGRP: ::c_ulong = 0x540F;
-pub const TIOCSPGRP: ::c_ulong = 0x5410;
-pub const TIOCOUTQ: ::c_ulong = 0x5411;
-pub const TIOCGWINSZ: ::c_ulong = 0x5413;
-pub const TIOCSWINSZ: ::c_ulong = 0x5414;
-pub const FIONREAD: ::c_ulong = 0x541B;
-
-extern {
-    pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int;
-    pub fn setcontext(ucp: *const ucontext_t) -> ::c_int;
-    pub fn makecontext(ucp: *mut ucontext_t,
-                       func:  extern fn (),
-                       argc: ::c_int, ...);
-    pub fn swapcontext(uocp: *mut ucontext_t,
-                       ucp: *const ucontext_t) -> ::c_int;
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/linux/other/b64/aarch64.rs
+++ /dev/null
@@ -1,447 +0,0 @@
-//! AArch64-specific definitions for 64-bit linux-like values
-
-pub type c_char = u8;
-pub type wchar_t = u32;
-pub type nlink_t = u32;
-pub type blksize_t = i32;
-pub type suseconds_t = i64;
-
-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,
-        __pad1: ::dev_t,
-        pub st_size: ::off_t,
-        pub st_blksize: ::blksize_t,
-        __pad2: ::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_int; 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,
-        __pad1: ::dev_t,
-        pub st_size: ::off64_t,
-        pub st_blksize: ::blksize_t,
-        __pad2: ::c_int,
-        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,
-        __unused: [::c_int; 2],
-    }
-
-    pub struct pthread_attr_t {
-        __size: [u64; 8]
-    }
-
-    pub struct ipc_perm {
-        pub __key: ::key_t,
-        pub uid: ::uid_t,
-        pub gid: ::gid_t,
-        pub cuid: ::uid_t,
-        pub cgid: ::gid_t,
-        pub mode: ::c_uint,
-        pub __seq: ::c_ushort,
-        __pad1: ::c_ushort,
-        __unused1: ::c_ulong,
-        __unused2: ::c_ulong
-    }
-
-    pub struct shmid_ds {
-        pub shm_perm: ::ipc_perm,
-        pub shm_segsz: ::size_t,
-        pub shm_atime: ::time_t,
-        pub shm_dtime: ::time_t,
-        pub shm_ctime: ::time_t,
-        pub shm_cpid: ::pid_t,
-        pub shm_lpid: ::pid_t,
-        pub shm_nattch: ::shmatt_t,
-        __unused4: ::c_ulong,
-        __unused5: ::c_ulong
-    }
-}
-
-pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
-pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
-
-pub const RLIMIT_NOFILE: ::c_int = 7;
-pub const RLIMIT_NPROC: ::c_int = 6;
-
-pub const O_APPEND: ::c_int = 1024;
-pub const O_CREAT: ::c_int = 64;
-pub const O_EXCL: ::c_int = 128;
-pub const O_NOCTTY: ::c_int = 256;
-pub const O_NONBLOCK: ::c_int = 2048;
-pub const O_SYNC: ::c_int = 1052672;
-pub const O_RSYNC: ::c_int = 1052672;
-pub const O_DSYNC: ::c_int = 4096;
-pub const O_FSYNC: ::c_int = 0x101000;
-
-pub const MAP_GROWSDOWN: ::c_int = 0x0100;
-
-pub const EDEADLK: ::c_int = 35;
-pub const ENAMETOOLONG: ::c_int = 36;
-pub const ENOLCK: ::c_int = 37;
-pub const ENOSYS: ::c_int = 38;
-pub const ENOTEMPTY: ::c_int = 39;
-pub const ELOOP: ::c_int = 40;
-pub const ENOMSG: ::c_int = 42;
-pub const EIDRM: ::c_int = 43;
-pub const ECHRNG: ::c_int = 44;
-pub const EL2NSYNC: ::c_int = 45;
-pub const EL3HLT: ::c_int = 46;
-pub const EL3RST: ::c_int = 47;
-pub const ELNRNG: ::c_int = 48;
-pub const EUNATCH: ::c_int = 49;
-pub const ENOCSI: ::c_int = 50;
-pub const EL2HLT: ::c_int = 51;
-pub const EBADE: ::c_int = 52;
-pub const EBADR: ::c_int = 53;
-pub const EXFULL: ::c_int = 54;
-pub const ENOANO: ::c_int = 55;
-pub const EBADRQC: ::c_int = 56;
-pub const EBADSLT: ::c_int = 57;
-pub const EMULTIHOP: ::c_int = 72;
-pub const EOVERFLOW: ::c_int = 75;
-pub const ENOTUNIQ: ::c_int = 76;
-pub const EBADFD: ::c_int = 77;
-pub const EBADMSG: ::c_int = 74;
-pub const EREMCHG: ::c_int = 78;
-pub const ELIBACC: ::c_int = 79;
-pub const ELIBBAD: ::c_int = 80;
-pub const ELIBSCN: ::c_int = 81;
-pub const ELIBMAX: ::c_int = 82;
-pub const ELIBEXEC: ::c_int = 83;
-pub const EILSEQ: ::c_int = 84;
-pub const ERESTART: ::c_int = 85;
-pub const ESTRPIPE: ::c_int = 86;
-pub const EUSERS: ::c_int = 87;
-pub const ENOTSOCK: ::c_int = 88;
-pub const EDESTADDRREQ: ::c_int = 89;
-pub const EMSGSIZE: ::c_int = 90;
-pub const EPROTOTYPE: ::c_int = 91;
-pub const ENOPROTOOPT: ::c_int = 92;
-pub const EPROTONOSUPPORT: ::c_int = 93;
-pub const ESOCKTNOSUPPORT: ::c_int = 94;
-pub const EOPNOTSUPP: ::c_int = 95;
-pub const EPFNOSUPPORT: ::c_int = 96;
-pub const EAFNOSUPPORT: ::c_int = 97;
-pub const EADDRINUSE: ::c_int = 98;
-pub const EADDRNOTAVAIL: ::c_int = 99;
-pub const ENETDOWN: ::c_int = 100;
-pub const ENETUNREACH: ::c_int = 101;
-pub const ENETRESET: ::c_int = 102;
-pub const ECONNABORTED: ::c_int = 103;
-pub const ECONNRESET: ::c_int = 104;
-pub const ENOBUFS: ::c_int = 105;
-pub const EISCONN: ::c_int = 106;
-pub const ENOTCONN: ::c_int = 107;
-pub const ESHUTDOWN: ::c_int = 108;
-pub const ETOOMANYREFS: ::c_int = 109;
-pub const ETIMEDOUT: ::c_int = 110;
-pub const ECONNREFUSED: ::c_int = 111;
-pub const EHOSTDOWN: ::c_int = 112;
-pub const EHOSTUNREACH: ::c_int = 113;
-pub const EALREADY: ::c_int = 114;
-pub const EINPROGRESS: ::c_int = 115;
-pub const ESTALE: ::c_int = 116;
-pub const EDQUOT: ::c_int = 122;
-pub const ENOMEDIUM: ::c_int = 123;
-pub const EMEDIUMTYPE: ::c_int = 124;
-pub const ECANCELED: ::c_int = 125;
-pub const ENOKEY: ::c_int = 126;
-pub const EKEYEXPIRED: ::c_int = 127;
-pub const EKEYREVOKED: ::c_int = 128;
-pub const EKEYREJECTED: ::c_int = 129;
-pub const EOWNERDEAD: ::c_int = 130;
-pub const ENOTRECOVERABLE: ::c_int = 131;
-pub const EHWPOISON: ::c_int = 133;
-pub const ERFKILL: ::c_int = 132;
-
-pub const SOL_SOCKET: ::c_int = 1;
-
-pub const SO_REUSEADDR: ::c_int = 2;
-pub const SO_TYPE: ::c_int = 3;
-pub const SO_ERROR: ::c_int = 4;
-pub const SO_DONTROUTE: ::c_int = 5;
-pub const SO_BROADCAST: ::c_int = 6;
-pub const SO_SNDBUF: ::c_int = 7;
-pub const SO_RCVBUF: ::c_int = 8;
-pub const SO_SNDBUFFORCE: ::c_int = 32;
-pub const SO_RCVBUFFORCE: ::c_int = 33;
-pub const SO_KEEPALIVE: ::c_int = 9;
-pub const SO_OOBINLINE: ::c_int = 10;
-pub const SO_NO_CHECK: ::c_int = 11;
-pub const SO_PRIORITY: ::c_int = 12;
-pub const SO_LINGER: ::c_int = 13;
-pub const SO_BSDCOMPAT: ::c_int = 14;
-pub const SO_REUSEPORT: ::c_int = 15;
-pub const SO_PASSCRED: ::c_int = 16;
-pub const SO_PEERCRED: ::c_int = 17;
-pub const SO_RCVLOWAT: ::c_int = 18;
-pub const SO_SNDLOWAT: ::c_int = 19;
-pub const SO_RCVTIMEO: ::c_int = 20;
-pub const SO_SNDTIMEO: ::c_int = 21;
-pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22;
-pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23;
-pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24;
-pub const SO_BINDTODEVICE: ::c_int = 25;
-pub const SO_ATTACH_FILTER: ::c_int = 26;
-pub const SO_DETACH_FILTER: ::c_int = 27;
-pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
-pub const SO_PEERNAME: ::c_int = 28;
-pub const SO_TIMESTAMP: ::c_int = 29;
-pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP;
-pub const SO_ACCEPTCONN: ::c_int = 30;
-pub const SO_PEERSEC: ::c_int = 31;
-pub const SO_PASSSEC: ::c_int = 34;
-pub const SO_TIMESTAMPNS: ::c_int = 35;
-pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
-pub const SO_MARK: ::c_int = 36;
-pub const SO_TIMESTAMPING: ::c_int = 37;
-pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING;
-pub const SO_PROTOCOL: ::c_int = 38;
-pub const SO_DOMAIN: ::c_int = 39;
-pub const SO_RXQ_OVFL: ::c_int = 40;
-pub const SO_WIFI_STATUS: ::c_int = 41;
-pub const SCM_WIFI_STATUS: ::c_int = SO_WIFI_STATUS;
-pub const SO_PEEK_OFF: ::c_int = 42;
-pub const SO_NOFCS: ::c_int = 43;
-pub const SO_LOCK_FILTER: ::c_int = 44;
-pub const SO_SELECT_ERR_QUEUE: ::c_int = 45;
-pub const SO_BUSY_POLL: ::c_int = 46;
-pub const SO_MAX_PACING_RATE: ::c_int = 47;
-pub const SO_BPF_EXTENSIONS: ::c_int = 48;
-pub const SO_INCOMING_CPU: ::c_int = 49;
-pub const SO_ATTACH_BPF: ::c_int = 50;
-pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER;
-
-pub const SA_ONSTACK: ::c_int = 0x08000000;
-pub const SA_SIGINFO: ::c_int = 0x00000004;
-pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
-
-pub const SIGCHLD: ::c_int = 17;
-pub const SIGBUS: ::c_int = 7;
-pub const SIGUSR1: ::c_int = 10;
-pub const SIGUSR2: ::c_int = 12;
-pub const SIGCONT: ::c_int = 18;
-pub const SIGSTOP: ::c_int = 19;
-pub const SIGTSTP: ::c_int = 20;
-pub const SIGURG: ::c_int = 23;
-pub const SIGIO: ::c_int = 29;
-pub const SIGSYS: ::c_int = 31;
-pub const SIGSTKFLT: ::c_int = 16;
-pub const SIGUNUSED: ::c_int = 31;
-pub const SIGPOLL: ::c_int = 29;
-pub const SIGPWR: ::c_int = 30;
-pub const SIG_SETMASK: ::c_int = 2;
-pub const SIG_BLOCK: ::c_int = 0x000000;
-pub const SIG_UNBLOCK: ::c_int = 0x01;
-
-pub const POLLWRNORM: ::c_short = 0x100;
-pub const POLLWRBAND: ::c_short = 0x200;
-
-pub const O_ASYNC: ::c_int = 0x2000;
-pub const O_NDELAY: ::c_int = 0x800;
-
-pub const PTRACE_DETACH: ::c_uint = 17;
-
-pub const EFD_NONBLOCK: ::c_int = 0x800;
-
-pub const F_GETLK: ::c_int = 5;
-pub const F_GETOWN: ::c_int = 9;
-pub const F_SETOWN: ::c_int = 8;
-pub const F_SETLK: ::c_int = 6;
-pub const F_SETLKW: ::c_int = 7;
-
-pub const SFD_NONBLOCK: ::c_int = 0x0800;
-
-pub const TIOCEXCL: ::c_ulong = 0x540C;
-pub const TIOCNXCL: ::c_ulong = 0x540D;
-pub const TIOCSCTTY: ::c_ulong = 0x540E;
-pub const TIOCSTI: ::c_ulong = 0x5412;
-pub const TIOCMGET: ::c_ulong = 0x5415;
-pub const TIOCMBIS: ::c_ulong = 0x5416;
-pub const TIOCMBIC: ::c_ulong = 0x5417;
-pub const TIOCMSET: ::c_ulong = 0x5418;
-pub const TIOCCONS: ::c_ulong = 0x541D;
-
-pub const CLONE_NEWCGROUP: ::c_int = 0x02000000;
-
-pub const SFD_CLOEXEC: ::c_int = 0x080000;
-
-pub const NCCS: usize = 32;
-
-pub const O_TRUNC: ::c_int = 512;
-
-pub const O_CLOEXEC: ::c_int = 0x80000;
-
-pub const EBFONT: ::c_int = 59;
-pub const ENOSTR: ::c_int = 60;
-pub const ENODATA: ::c_int = 61;
-pub const ETIME: ::c_int = 62;
-pub const ENOSR: ::c_int = 63;
-pub const ENONET: ::c_int = 64;
-pub const ENOPKG: ::c_int = 65;
-pub const EREMOTE: ::c_int = 66;
-pub const ENOLINK: ::c_int = 67;
-pub const EADV: ::c_int = 68;
-pub const ESRMNT: ::c_int = 69;
-pub const ECOMM: ::c_int = 70;
-pub const EPROTO: ::c_int = 71;
-pub const EDOTDOT: ::c_int = 73;
-
-pub const SA_NODEFER: ::c_int = 0x40000000;
-pub const SA_RESETHAND: ::c_int = 0x80000000;
-pub const SA_RESTART: ::c_int = 0x10000000;
-pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
-
-pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
-
-pub const EFD_CLOEXEC: ::c_int = 0x80000;
-
-pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 8;
-pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 48;
-pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 8;
-
-pub const O_DIRECT: ::c_int = 0x10000;
-pub const O_DIRECTORY: ::c_int = 0x4000;
-pub const O_NOFOLLOW: ::c_int = 0x8000;
-
-pub const MAP_LOCKED: ::c_int = 0x02000;
-pub const MAP_NORESERVE: ::c_int = 0x04000;
-
-pub const EDEADLOCK: ::c_int = 35;
-
-pub const FIOCLEX: ::c_ulong = 0x5451;
-pub const FIONBIO: ::c_ulong = 0x5421;
-
-pub const SYS_gettid: ::c_long = 178;
-pub const SYS_perf_event_open: ::c_long = 241;
-
-pub const MCL_CURRENT: ::c_int = 0x0001;
-pub const MCL_FUTURE: ::c_int = 0x0002;
-
-pub const SIGSTKSZ: ::size_t = 16384;
-pub const MINSIGSTKSZ: ::size_t = 5120;
-pub const CBAUD: ::tcflag_t = 0o0010017;
-pub const TAB1: ::c_int = 0x00000800;
-pub const TAB2: ::c_int = 0x00001000;
-pub const TAB3: ::c_int = 0x00001800;
-pub const CR1: ::c_int  = 0x00000200;
-pub const CR2: ::c_int  = 0x00000400;
-pub const CR3: ::c_int  = 0x00000600;
-pub const FF1: ::c_int  = 0x00008000;
-pub const BS1: ::c_int  = 0x00002000;
-pub const VT1: ::c_int  = 0x00004000;
-pub const VWERASE: usize = 14;
-pub const VREPRINT: usize = 12;
-pub const VSUSP: usize = 10;
-pub const VSTART: usize = 8;
-pub const VSTOP: usize = 9;
-pub const VDISCARD: usize = 13;
-pub const VTIME: usize = 5;
-pub const IXON: ::tcflag_t = 0x00000400;
-pub const IXOFF: ::tcflag_t = 0x00001000;
-pub const ONLCR: ::tcflag_t = 0x4;
-pub const CSIZE: ::tcflag_t = 0x00000030;
-pub const CS6: ::tcflag_t = 0x00000010;
-pub const CS7: ::tcflag_t = 0x00000020;
-pub const CS8: ::tcflag_t = 0x00000030;
-pub const CSTOPB: ::tcflag_t = 0x00000040;
-pub const CREAD: ::tcflag_t = 0x00000080;
-pub const PARENB: ::tcflag_t = 0x00000100;
-pub const PARODD: ::tcflag_t = 0x00000200;
-pub const HUPCL: ::tcflag_t = 0x00000400;
-pub const CLOCAL: ::tcflag_t = 0x00000800;
-pub const ECHOKE: ::tcflag_t = 0x00000800;
-pub const ECHOE: ::tcflag_t = 0x00000010;
-pub const ECHOK: ::tcflag_t = 0x00000020;
-pub const ECHONL: ::tcflag_t = 0x00000040;
-pub const ECHOPRT: ::tcflag_t = 0x00000400;
-pub const ECHOCTL: ::tcflag_t = 0x00000200;
-pub const ISIG: ::tcflag_t = 0x00000001;
-pub const ICANON: ::tcflag_t = 0x00000002;
-pub const PENDIN: ::tcflag_t = 0x00004000;
-pub const NOFLSH: ::tcflag_t = 0x00000080;
-
-pub const B0: ::speed_t = 0o000000;
-pub const B50: ::speed_t = 0o000001;
-pub const B75: ::speed_t = 0o000002;
-pub const B110: ::speed_t = 0o000003;
-pub const B134: ::speed_t = 0o000004;
-pub const B150: ::speed_t = 0o000005;
-pub const B200: ::speed_t = 0o000006;
-pub const B300: ::speed_t = 0o000007;
-pub const B600: ::speed_t = 0o000010;
-pub const B1200: ::speed_t = 0o000011;
-pub const B1800: ::speed_t = 0o000012;
-pub const B2400: ::speed_t = 0o000013;
-pub const B4800: ::speed_t = 0o000014;
-pub const B9600: ::speed_t = 0o000015;
-pub const B19200: ::speed_t = 0o000016;
-pub const B38400: ::speed_t = 0o000017;
-pub const EXTA: ::speed_t = B19200;
-pub const EXTB: ::speed_t = B38400;
-pub const B57600: ::speed_t = 0o010001;
-pub const B115200: ::speed_t = 0o010002;
-pub const B230400: ::speed_t = 0o010003;
-pub const B460800: ::speed_t = 0o010004;
-pub const B500000: ::speed_t = 0o010005;
-pub const B576000: ::speed_t = 0o010006;
-pub const B921600: ::speed_t = 0o010007;
-pub const B1000000: ::speed_t = 0o010010;
-pub const B1152000: ::speed_t = 0o010011;
-pub const B1500000: ::speed_t = 0o010012;
-pub const B2000000: ::speed_t = 0o010013;
-pub const B2500000: ::speed_t = 0o010014;
-pub const B3000000: ::speed_t = 0o010015;
-pub const B3500000: ::speed_t = 0o010016;
-pub const B4000000: ::speed_t = 0o010017;
-
-pub const VEOL: usize = 11;
-pub const VEOL2: usize = 16;
-pub const VMIN: usize = 6;
-pub const IEXTEN: ::tcflag_t = 0x00008000;
-pub const TOSTOP: ::tcflag_t = 0x00000100;
-pub const FLUSHO: ::tcflag_t = 0x00001000;
-pub const EXTPROC: ::tcflag_t = 0x00010000;
-pub const TCGETS: ::c_ulong = 0x5401;
-pub const TCSETS: ::c_ulong = 0x5402;
-pub const TCSETSW: ::c_ulong = 0x5403;
-pub const TCSETSF: ::c_ulong = 0x5404;
-pub const TCGETA: ::c_ulong = 0x5405;
-pub const TCSETA: ::c_ulong = 0x5406;
-pub const TCSETAW: ::c_ulong = 0x5407;
-pub const TCSETAF: ::c_ulong = 0x5408;
-pub const TCSBRK: ::c_ulong = 0x5409;
-pub const TCXONC: ::c_ulong = 0x540A;
-pub const TCFLSH: ::c_ulong = 0x540B;
-pub const TIOCINQ: ::c_ulong = 0x541B;
-pub const TIOCGPGRP: ::c_ulong = 0x540F;
-pub const TIOCSPGRP: ::c_ulong = 0x5410;
-pub const TIOCOUTQ: ::c_ulong = 0x5411;
-pub const TIOCGWINSZ: ::c_ulong = 0x5413;
-pub const TIOCSWINSZ: ::c_ulong = 0x5414;
-pub const FIONREAD: ::c_ulong = 0x541B;
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/linux/other/b64/mod.rs
+++ /dev/null
@@ -1,67 +0,0 @@
-//! 64-bit specific definitions for linux-like values
-
-pub type c_long = i64;
-pub type c_ulong = u64;
-pub type clock_t = i64;
-pub type time_t = i64;
-pub type ino_t = u64;
-pub type off_t = i64;
-pub type blkcnt_t = i64;
-pub type __fsword_t = ::c_long;
-
-s! {
-    pub struct sigset_t {
-        __val: [::c_ulong; 16],
-    }
-
-    pub struct sysinfo {
-        pub uptime: ::c_long,
-        pub loads: [::c_ulong; 3],
-        pub totalram: ::c_ulong,
-        pub freeram: ::c_ulong,
-        pub sharedram: ::c_ulong,
-        pub bufferram: ::c_ulong,
-        pub totalswap: ::c_ulong,
-        pub freeswap: ::c_ulong,
-        pub procs: ::c_ushort,
-        pub pad: ::c_ushort,
-        pub totalhigh: ::c_ulong,
-        pub freehigh: ::c_ulong,
-        pub mem_unit: ::c_uint,
-        pub _f: [::c_char; 0],
-    }
-
-    pub struct msqid_ds {
-        pub msg_perm: ::ipc_perm,
-        pub msg_stime: ::time_t,
-        pub msg_rtime: ::time_t,
-        pub msg_ctime: ::time_t,
-        __msg_cbytes: ::c_ulong,
-        pub msg_qnum: ::msgqnum_t,
-        pub msg_qbytes: ::msglen_t,
-        pub msg_lspid: ::pid_t,
-        pub msg_lrpid: ::pid_t,
-        __glibc_reserved4: ::c_ulong,
-        __glibc_reserved5: ::c_ulong,
-    }
-}
-
-pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
-
-cfg_if! {
-    if #[cfg(target_arch = "aarch64")] {
-        mod aarch64;
-        pub use self::aarch64::*;
-    } else if #[cfg(any(target_arch = "powerpc64"))] {
-        mod powerpc64;
-        pub use self::powerpc64::*;
-    } else if #[cfg(any(target_arch = "sparc64"))] {
-        mod sparc64;
-        pub use self::sparc64::*;
-    } else if #[cfg(any(target_arch = "x86_64"))] {
-        mod x86_64;
-        pub use self::x86_64::*;
-    } else {
-        // Unknown target_arch
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/linux/other/b64/powerpc64.rs
+++ /dev/null
@@ -1,446 +0,0 @@
-//! PowerPC64-specific definitions for 64-bit linux-like values
-
-pub type c_char = u8;
-pub type wchar_t = i32;
-pub type nlink_t = u64;
-pub type blksize_t = i64;
-pub type suseconds_t = i64;
-
-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: ::off64_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 pthread_attr_t {
-        __size: [u64; 7]
-    }
-
-    pub struct ipc_perm {
-        pub __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: ::uint32_t,
-        __pad1: ::uint32_t,
-        __unused1: ::uint64_t,
-        __unused2: ::c_ulong,
-    }
-
-    pub struct shmid_ds {
-        pub shm_perm: ::ipc_perm,
-        pub shm_atime: ::time_t,
-        pub shm_dtime: ::time_t,
-        pub shm_ctime: ::time_t,
-        pub shm_segsz: ::size_t,
-        pub shm_cpid: ::pid_t,
-        pub shm_lpid: ::pid_t,
-        pub shm_nattch: ::shmatt_t,
-        __unused4: ::c_ulong,
-        __unused5: ::c_ulong
-    }
-}
-
-pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
-pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
-
-pub const RLIMIT_NOFILE: ::c_int = 7;
-pub const RLIMIT_NPROC: ::c_int = 6;
-
-pub const O_APPEND: ::c_int = 1024;
-pub const O_CREAT: ::c_int = 64;
-pub const O_EXCL: ::c_int = 128;
-pub const O_NOCTTY: ::c_int = 256;
-pub const O_NONBLOCK: ::c_int = 2048;
-pub const O_SYNC: ::c_int = 1052672;
-pub const O_RSYNC: ::c_int = 1052672;
-pub const O_DSYNC: ::c_int = 4096;
-pub const O_FSYNC: ::c_int = 0x101000;
-
-pub const MAP_GROWSDOWN: ::c_int = 0x0100;
-
-pub const EDEADLK: ::c_int = 35;
-pub const ENAMETOOLONG: ::c_int = 36;
-pub const ENOLCK: ::c_int = 37;
-pub const ENOSYS: ::c_int = 38;
-pub const ENOTEMPTY: ::c_int = 39;
-pub const ELOOP: ::c_int = 40;
-pub const ENOMSG: ::c_int = 42;
-pub const EIDRM: ::c_int = 43;
-pub const ECHRNG: ::c_int = 44;
-pub const EL2NSYNC: ::c_int = 45;
-pub const EL3HLT: ::c_int = 46;
-pub const EL3RST: ::c_int = 47;
-pub const ELNRNG: ::c_int = 48;
-pub const EUNATCH: ::c_int = 49;
-pub const ENOCSI: ::c_int = 50;
-pub const EL2HLT: ::c_int = 51;
-pub const EBADE: ::c_int = 52;
-pub const EBADR: ::c_int = 53;
-pub const EXFULL: ::c_int = 54;
-pub const ENOANO: ::c_int = 55;
-pub const EBADRQC: ::c_int = 56;
-pub const EBADSLT: ::c_int = 57;
-pub const EMULTIHOP: ::c_int = 72;
-pub const EOVERFLOW: ::c_int = 75;
-pub const ENOTUNIQ: ::c_int = 76;
-pub const EBADFD: ::c_int = 77;
-pub const EBADMSG: ::c_int = 74;
-pub const EREMCHG: ::c_int = 78;
-pub const ELIBACC: ::c_int = 79;
-pub const ELIBBAD: ::c_int = 80;
-pub const ELIBSCN: ::c_int = 81;
-pub const ELIBMAX: ::c_int = 82;
-pub const ELIBEXEC: ::c_int = 83;
-pub const EILSEQ: ::c_int = 84;
-pub const ERESTART: ::c_int = 85;
-pub const ESTRPIPE: ::c_int = 86;
-pub const EUSERS: ::c_int = 87;
-pub const ENOTSOCK: ::c_int = 88;
-pub const EDESTADDRREQ: ::c_int = 89;
-pub const EMSGSIZE: ::c_int = 90;
-pub const EPROTOTYPE: ::c_int = 91;
-pub const ENOPROTOOPT: ::c_int = 92;
-pub const EPROTONOSUPPORT: ::c_int = 93;
-pub const ESOCKTNOSUPPORT: ::c_int = 94;
-pub const EOPNOTSUPP: ::c_int = 95;
-pub const EPFNOSUPPORT: ::c_int = 96;
-pub const EAFNOSUPPORT: ::c_int = 97;
-pub const EADDRINUSE: ::c_int = 98;
-pub const EADDRNOTAVAIL: ::c_int = 99;
-pub const ENETDOWN: ::c_int = 100;
-pub const ENETUNREACH: ::c_int = 101;
-pub const ENETRESET: ::c_int = 102;
-pub const ECONNABORTED: ::c_int = 103;
-pub const ECONNRESET: ::c_int = 104;
-pub const ENOBUFS: ::c_int = 105;
-pub const EISCONN: ::c_int = 106;
-pub const ENOTCONN: ::c_int = 107;
-pub const ESHUTDOWN: ::c_int = 108;
-pub const ETOOMANYREFS: ::c_int = 109;
-pub const ETIMEDOUT: ::c_int = 110;
-pub const ECONNREFUSED: ::c_int = 111;
-pub const EHOSTDOWN: ::c_int = 112;
-pub const EHOSTUNREACH: ::c_int = 113;
-pub const EALREADY: ::c_int = 114;
-pub const EINPROGRESS: ::c_int = 115;
-pub const ESTALE: ::c_int = 116;
-pub const EDQUOT: ::c_int = 122;
-pub const ENOMEDIUM: ::c_int = 123;
-pub const EMEDIUMTYPE: ::c_int = 124;
-pub const ECANCELED: ::c_int = 125;
-pub const ENOKEY: ::c_int = 126;
-pub const EKEYEXPIRED: ::c_int = 127;
-pub const EKEYREVOKED: ::c_int = 128;
-pub const EKEYREJECTED: ::c_int = 129;
-pub const EOWNERDEAD: ::c_int = 130;
-pub const ENOTRECOVERABLE: ::c_int = 131;
-pub const EHWPOISON: ::c_int = 133;
-pub const ERFKILL: ::c_int = 132;
-
-pub const SOL_SOCKET: ::c_int = 1;
-
-pub const SO_REUSEADDR: ::c_int = 2;
-pub const SO_TYPE: ::c_int = 3;
-pub const SO_ERROR: ::c_int = 4;
-pub const SO_DONTROUTE: ::c_int = 5;
-pub const SO_BROADCAST: ::c_int = 6;
-pub const SO_SNDBUF: ::c_int = 7;
-pub const SO_RCVBUF: ::c_int = 8;
-pub const SO_SNDBUFFORCE: ::c_int = 32;
-pub const SO_RCVBUFFORCE: ::c_int = 33;
-pub const SO_KEEPALIVE: ::c_int = 9;
-pub const SO_OOBINLINE: ::c_int = 10;
-pub const SO_NO_CHECK: ::c_int = 11;
-pub const SO_PRIORITY: ::c_int = 12;
-pub const SO_LINGER: ::c_int = 13;
-pub const SO_BSDCOMPAT: ::c_int = 14;
-pub const SO_REUSEPORT: ::c_int = 15;
-pub const SO_PASSCRED: ::c_int = 20;
-pub const SO_PEERCRED: ::c_int = 21;
-pub const SO_RCVLOWAT: ::c_int = 16;
-pub const SO_SNDLOWAT: ::c_int = 17;
-pub const SO_RCVTIMEO: ::c_int = 18;
-pub const SO_SNDTIMEO: ::c_int = 19;
-pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22;
-pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23;
-pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24;
-pub const SO_BINDTODEVICE: ::c_int = 25;
-pub const SO_ATTACH_FILTER: ::c_int = 26;
-pub const SO_DETACH_FILTER: ::c_int = 27;
-pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
-pub const SO_PEERNAME: ::c_int = 28;
-pub const SO_TIMESTAMP: ::c_int = 29;
-pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP;
-pub const SO_ACCEPTCONN: ::c_int = 30;
-pub const SO_PEERSEC: ::c_int = 31;
-pub const SO_PASSSEC: ::c_int = 34;
-pub const SO_TIMESTAMPNS: ::c_int = 35;
-pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
-pub const SO_MARK: ::c_int = 36;
-pub const SO_TIMESTAMPING: ::c_int = 37;
-pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING;
-pub const SO_PROTOCOL: ::c_int = 38;
-pub const SO_DOMAIN: ::c_int = 39;
-pub const SO_RXQ_OVFL: ::c_int = 40;
-pub const SO_WIFI_STATUS: ::c_int = 41;
-pub const SCM_WIFI_STATUS: ::c_int = SO_WIFI_STATUS;
-pub const SO_PEEK_OFF: ::c_int = 42;
-pub const SO_NOFCS: ::c_int = 43;
-pub const SO_LOCK_FILTER: ::c_int = 44;
-pub const SO_SELECT_ERR_QUEUE: ::c_int = 45;
-pub const SO_BUSY_POLL: ::c_int = 46;
-pub const SO_MAX_PACING_RATE: ::c_int = 47;
-pub const SO_BPF_EXTENSIONS: ::c_int = 48;
-pub const SO_INCOMING_CPU: ::c_int = 49;
-pub const SO_ATTACH_BPF: ::c_int = 50;
-pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER;
-
-pub const SA_ONSTACK: ::c_int = 0x08000000;
-pub const SA_SIGINFO: ::c_int = 0x00000004;
-pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
-
-pub const SIGCHLD: ::c_int = 17;
-pub const SIGBUS: ::c_int = 7;
-pub const SIGUSR1: ::c_int = 10;
-pub const SIGUSR2: ::c_int = 12;
-pub const SIGCONT: ::c_int = 18;
-pub const SIGSTOP: ::c_int = 19;
-pub const SIGTSTP: ::c_int = 20;
-pub const SIGURG: ::c_int = 23;
-pub const SIGIO: ::c_int = 29;
-pub const SIGSYS: ::c_int = 31;
-pub const SIGSTKFLT: ::c_int = 16;
-pub const SIGUNUSED: ::c_int = 31;
-pub const SIGPOLL: ::c_int = 29;
-pub const SIGPWR: ::c_int = 30;
-pub const SIG_SETMASK: ::c_int = 2;
-pub const SIG_BLOCK: ::c_int = 0x000000;
-pub const SIG_UNBLOCK: ::c_int = 0x01;
-
-pub const POLLWRNORM: ::c_short = 0x100;
-pub const POLLWRBAND: ::c_short = 0x200;
-
-pub const O_ASYNC: ::c_int = 0x2000;
-pub const O_NDELAY: ::c_int = 0x800;
-
-pub const PTRACE_DETACH: ::c_uint = 17;
-
-pub const EFD_NONBLOCK: ::c_int = 0x800;
-
-pub const F_GETLK: ::c_int = 5;
-pub const F_GETOWN: ::c_int = 9;
-pub const F_SETOWN: ::c_int = 8;
-pub const F_SETLK: ::c_int = 6;
-pub const F_SETLKW: ::c_int = 7;
-
-pub const SFD_NONBLOCK: ::c_int = 0x0800;
-
-pub const TIOCEXCL: ::c_ulong = 0x540C;
-pub const TIOCNXCL: ::c_ulong = 0x540D;
-pub const TIOCSCTTY: ::c_ulong = 0x540E;
-pub const TIOCSTI: ::c_ulong = 0x5412;
-pub const TIOCMGET: ::c_ulong = 0x5415;
-pub const TIOCMBIS: ::c_ulong = 0x5416;
-pub const TIOCMBIC: ::c_ulong = 0x5417;
-pub const TIOCMSET: ::c_ulong = 0x5418;
-pub const TIOCCONS: ::c_ulong = 0x541D;
-
-pub const CLONE_NEWCGROUP: ::c_int = 0x02000000;
-
-pub const SFD_CLOEXEC: ::c_int = 0x080000;
-
-pub const NCCS: usize = 32;
-
-pub const O_TRUNC: ::c_int = 512;
-
-pub const O_CLOEXEC: ::c_int = 0x80000;
-
-pub const EBFONT: ::c_int = 59;
-pub const ENOSTR: ::c_int = 60;
-pub const ENODATA: ::c_int = 61;
-pub const ETIME: ::c_int = 62;
-pub const ENOSR: ::c_int = 63;
-pub const ENONET: ::c_int = 64;
-pub const ENOPKG: ::c_int = 65;
-pub const EREMOTE: ::c_int = 66;
-pub const ENOLINK: ::c_int = 67;
-pub const EADV: ::c_int = 68;
-pub const ESRMNT: ::c_int = 69;
-pub const ECOMM: ::c_int = 70;
-pub const EPROTO: ::c_int = 71;
-pub const EDOTDOT: ::c_int = 73;
-
-pub const SA_NODEFER: ::c_int = 0x40000000;
-pub const SA_RESETHAND: ::c_int = 0x80000000;
-pub const SA_RESTART: ::c_int = 0x10000000;
-pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
-
-pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
-
-pub const EFD_CLOEXEC: ::c_int = 0x80000;
-
-pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
-pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
-pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
-
-pub const O_DIRECTORY: ::c_int = 0x4000;
-pub const O_NOFOLLOW: ::c_int = 0x8000;
-pub const O_DIRECT: ::c_int = 0x20000;
-
-pub const MAP_LOCKED: ::c_int = 0x00080;
-pub const MAP_NORESERVE: ::c_int = 0x00040;
-
-pub const EDEADLOCK: ::c_int = 58;
-
-pub const FIOCLEX: ::c_ulong = 0x20006601;
-pub const FIONBIO: ::c_ulong = 0x8004667e;
-
-pub const SYS_gettid: ::c_long = 207;
-pub const SYS_perf_event_open: ::c_long = 319;
-
-pub const MCL_CURRENT: ::c_int = 0x2000;
-pub const MCL_FUTURE: ::c_int = 0x4000;
-
-pub const SIGSTKSZ: ::size_t = 0x4000;
-pub const MINSIGSTKSZ: ::size_t = 4096;
-pub const CBAUD: ::tcflag_t = 0xff;
-pub const TAB1: ::c_int = 0x400;
-pub const TAB2: ::c_int = 0x800;
-pub const TAB3: ::c_int = 0xc00;
-pub const CR1: ::c_int  = 0x1000;
-pub const CR2: ::c_int  = 0x2000;
-pub const CR3: ::c_int  = 0x3000;
-pub const FF1: ::c_int  = 0x4000;
-pub const BS1: ::c_int  = 0x8000;
-pub const VT1: ::c_int  = 0x10000;
-pub const VWERASE: usize = 0xa;
-pub const VREPRINT: usize = 0xb;
-pub const VSUSP: usize = 0xc;
-pub const VSTART: usize = 0xd;
-pub const VSTOP: usize = 0xe;
-pub const VDISCARD: usize = 0x10;
-pub const VTIME: usize = 0x7;
-pub const IXON: ::tcflag_t = 0x200;
-pub const IXOFF: ::tcflag_t = 0x400;
-pub const ONLCR: ::tcflag_t = 0x2;
-pub const CSIZE: ::tcflag_t = 0x300;
-pub const CS6: ::tcflag_t = 0x100;
-pub const CS7: ::tcflag_t = 0x200;
-pub const CS8: ::tcflag_t = 0x300;
-pub const CSTOPB: ::tcflag_t = 0x400;
-pub const CREAD: ::tcflag_t = 0x800;
-pub const PARENB: ::tcflag_t = 0x1000;
-pub const PARODD: ::tcflag_t = 0x2000;
-pub const HUPCL: ::tcflag_t = 0x4000;
-pub const CLOCAL: ::tcflag_t = 0x8000;
-pub const ECHOKE: ::tcflag_t = 0x1;
-pub const ECHOE: ::tcflag_t = 0x2;
-pub const ECHOK: ::tcflag_t = 0x4;
-pub const ECHONL: ::tcflag_t = 0x10;
-pub const ECHOPRT: ::tcflag_t = 0x20;
-pub const ECHOCTL: ::tcflag_t = 0x40;
-pub const ISIG: ::tcflag_t = 0x80;
-pub const ICANON: ::tcflag_t = 0x100;
-pub const PENDIN: ::tcflag_t = 0x20000000;
-pub const NOFLSH: ::tcflag_t = 0x80000000;
-
-pub const B0: ::speed_t = 0o000000;
-pub const B50: ::speed_t = 0o000001;
-pub const B75: ::speed_t = 0o000002;
-pub const B110: ::speed_t = 0o000003;
-pub const B134: ::speed_t = 0o000004;
-pub const B150: ::speed_t = 0o000005;
-pub const B200: ::speed_t = 0o000006;
-pub const B300: ::speed_t = 0o000007;
-pub const B600: ::speed_t = 0o000010;
-pub const B1200: ::speed_t = 0o000011;
-pub const B1800: ::speed_t = 0o000012;
-pub const B2400: ::speed_t = 0o000013;
-pub const B4800: ::speed_t = 0o000014;
-pub const B9600: ::speed_t = 0o000015;
-pub const B19200: ::speed_t = 0o000016;
-pub const B38400: ::speed_t = 0o000017;
-pub const EXTA: ::speed_t = B19200;
-pub const EXTB: ::speed_t = B38400;
-pub const CBAUDEX: ::speed_t = 0o000020;
-pub const B57600: ::speed_t = 0o0020;
-pub const B115200: ::speed_t = 0o0021;
-pub const B230400: ::speed_t = 0o0022;
-pub const B460800: ::speed_t = 0o0023;
-pub const B500000: ::speed_t = 0o0024;
-pub const B576000: ::speed_t = 0o0025;
-pub const B921600: ::speed_t = 0o0026;
-pub const B1000000: ::speed_t = 0o0027;
-pub const B1152000: ::speed_t = 0o0030;
-pub const B1500000: ::speed_t = 0o0031;
-pub const B2000000: ::speed_t = 0o0032;
-pub const B2500000: ::speed_t = 0o0033;
-pub const B3000000: ::speed_t = 0o0034;
-pub const B3500000: ::speed_t = 0o0035;
-pub const B4000000: ::speed_t = 0o0036;
-
-pub const VEOL: usize = 6;
-pub const VEOL2: usize = 8;
-pub const VMIN: usize = 5;
-pub const IEXTEN: ::tcflag_t = 0x400;
-pub const TOSTOP: ::tcflag_t = 0x400000;
-pub const FLUSHO: ::tcflag_t = 0x800000;
-pub const EXTPROC: ::tcflag_t = 0x10000000;
-pub const TCGETS: ::c_ulong = 0x403c7413;
-pub const TCSETS: ::c_ulong = 0x803c7414;
-pub const TCSETSW: ::c_ulong = 0x803c7415;
-pub const TCSETSF: ::c_ulong = 0x803c7416;
-pub const TCGETA: ::c_ulong = 0x40147417;
-pub const TCSETA: ::c_ulong = 0x80147418;
-pub const TCSETAW: ::c_ulong = 0x80147419;
-pub const TCSETAF: ::c_ulong = 0x8014741c;
-pub const TCSBRK: ::c_ulong = 0x2000741d;
-pub const TCXONC: ::c_ulong = 0x2000741e;
-pub const TCFLSH: ::c_ulong = 0x2000741f;
-pub const TIOCINQ: ::c_ulong = 0x4004667f;
-pub const TIOCGPGRP: ::c_ulong = 0x40047477;
-pub const TIOCSPGRP: ::c_ulong = 0x80047476;
-pub const TIOCOUTQ: ::c_ulong = 0x40047473;
-pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
-pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
-pub const FIONREAD: ::c_ulong = 0x4004667f;
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/linux/other/b64/sparc64.rs
+++ /dev/null
@@ -1,370 +0,0 @@
-//! SPARC64-specific definitions for 64-bit linux-like values
-
-pub type c_char = i8;
-pub type wchar_t = i32;
-pub type nlink_t = u32;
-pub type blksize_t = i64;
-pub type suseconds_t = i32;
-
-s! {
-    pub struct stat {
-        pub st_dev: ::dev_t,
-        __pad0: u64,
-        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,
-        __pad1: u64,
-        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; 2],
-    }
-
-    pub struct stat64 {
-        pub st_dev: ::dev_t,
-        __pad0: u64,
-        pub st_ino: ::ino64_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,
-        __pad2: ::c_int,
-        pub st_size: ::off64_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; 2],
-    }
-
-    pub struct pthread_attr_t {
-        __size: [u64; 7]
-    }
-
-    pub struct ipc_perm {
-        pub __key: ::key_t,
-        pub uid: ::uid_t,
-        pub gid: ::gid_t,
-        pub cuid: ::uid_t,
-        pub cgid: ::gid_t,
-        pub mode: ::mode_t,
-        __pad0: u16,
-        pub __seq: ::c_ushort,
-        __unused1: ::c_ulonglong,
-        __unused2: ::c_ulonglong,
-    }
-
-    pub struct shmid_ds {
-        pub shm_perm: ::ipc_perm,
-        pub shm_atime: ::time_t,
-        pub shm_dtime: ::time_t,
-        pub shm_ctime: ::time_t,
-        pub shm_segsz: ::size_t,
-        pub shm_cpid: ::pid_t,
-        pub shm_lpid: ::pid_t,
-        pub shm_nattch: ::shmatt_t,
-        __reserved1: ::c_ulong,
-        __reserved2: ::c_ulong
-    }
-}
-
-pub const TIOCGSOFTCAR: ::c_ulong = 0x40047464;
-pub const TIOCSSOFTCAR: ::c_ulong = 0x80047465;
-
-pub const RLIMIT_NOFILE: ::c_int = 6;
-pub const RLIMIT_NPROC: ::c_int = 7;
-
-pub const O_APPEND: ::c_int = 0x8;
-pub const O_CREAT: ::c_int = 0x200;
-pub const O_EXCL: ::c_int = 0x800;
-pub const O_NOCTTY: ::c_int = 0x8000;
-pub const O_NONBLOCK: ::c_int = 0x4000;
-pub const O_SYNC: ::c_int = 0x802000;
-pub const O_RSYNC: ::c_int = 0x802000;
-pub const O_DSYNC: ::c_int = 0x2000;
-pub const O_FSYNC: ::c_int = 0x802000;
-
-pub const MAP_GROWSDOWN: ::c_int = 0x0200;
-
-pub const EDEADLK: ::c_int = 78;
-pub const ENAMETOOLONG: ::c_int = 63;
-pub const ENOLCK: ::c_int = 79;
-pub const ENOSYS: ::c_int = 90;
-pub const ENOTEMPTY: ::c_int = 66;
-pub const ELOOP: ::c_int = 62;
-pub const ENOMSG: ::c_int = 75;
-pub const EIDRM: ::c_int = 77;
-pub const ECHRNG: ::c_int = 94;
-pub const EL2NSYNC: ::c_int = 95;
-pub const EL3HLT: ::c_int = 96;
-pub const EL3RST: ::c_int = 97;
-pub const ELNRNG: ::c_int = 98;
-pub const EUNATCH: ::c_int = 99;
-pub const ENOCSI: ::c_int = 100;
-pub const EL2HLT: ::c_int = 101;
-pub const EBADE: ::c_int = 102;
-pub const EBADR: ::c_int = 103;
-pub const EXFULL: ::c_int = 104;
-pub const ENOANO: ::c_int = 105;
-pub const EBADRQC: ::c_int = 106;
-pub const EBADSLT: ::c_int = 107;
-pub const EMULTIHOP: ::c_int = 87;
-pub const EOVERFLOW: ::c_int = 92;
-pub const ENOTUNIQ: ::c_int = 115;
-pub const EBADFD: ::c_int = 93;
-pub const EBADMSG: ::c_int = 76;
-pub const EREMCHG: ::c_int = 89;
-pub const ELIBACC: ::c_int = 114;
-pub const ELIBBAD: ::c_int = 112;
-pub const ELIBSCN: ::c_int = 124;
-pub const ELIBMAX: ::c_int = 123;
-pub const ELIBEXEC: ::c_int = 110;
-pub const EILSEQ: ::c_int = 122;
-pub const ERESTART: ::c_int = 116;
-pub const ESTRPIPE: ::c_int = 91;
-pub const EUSERS: ::c_int = 68;
-pub const ENOTSOCK: ::c_int = 38;
-pub const EDESTADDRREQ: ::c_int = 39;
-pub const EMSGSIZE: ::c_int = 40;
-pub const EPROTOTYPE: ::c_int = 41;
-pub const ENOPROTOOPT: ::c_int = 42;
-pub const EPROTONOSUPPORT: ::c_int = 43;
-pub const ESOCKTNOSUPPORT: ::c_int = 44;
-pub const EOPNOTSUPP: ::c_int = 45;
-pub const EPFNOSUPPORT: ::c_int = 46;
-pub const EAFNOSUPPORT: ::c_int = 47;
-pub const EADDRINUSE: ::c_int = 48;
-pub const EADDRNOTAVAIL: ::c_int = 49;
-pub const ENETDOWN: ::c_int = 50;
-pub const ENETUNREACH: ::c_int = 51;
-pub const ENETRESET: ::c_int = 52;
-pub const ECONNABORTED: ::c_int = 53;
-pub const ECONNRESET: ::c_int = 54;
-pub const ENOBUFS: ::c_int = 55;
-pub const EISCONN: ::c_int = 56;
-pub const ENOTCONN: ::c_int = 57;
-pub const ESHUTDOWN: ::c_int = 58;
-pub const ETOOMANYREFS: ::c_int = 59;
-pub const ETIMEDOUT: ::c_int = 60;
-pub const ECONNREFUSED: ::c_int = 61;
-pub const EHOSTDOWN: ::c_int = 64;
-pub const EHOSTUNREACH: ::c_int = 65;
-pub const EALREADY: ::c_int = 37;
-pub const EINPROGRESS: ::c_int = 36;
-pub const ESTALE: ::c_int = 70;
-pub const EDQUOT: ::c_int = 69;
-pub const ENOMEDIUM: ::c_int = 125;
-pub const EMEDIUMTYPE: ::c_int = 126;
-pub const ECANCELED: ::c_int = 127;
-pub const ENOKEY: ::c_int = 128;
-pub const EKEYEXPIRED: ::c_int = 129;
-pub const EKEYREVOKED: ::c_int = 130;
-pub const EKEYREJECTED: ::c_int = 131;
-pub const EOWNERDEAD: ::c_int = 132;
-pub const ENOTRECOVERABLE: ::c_int = 133;
-pub const EHWPOISON: ::c_int = 135;
-pub const ERFKILL: ::c_int = 134;
-
-pub const SOL_SOCKET: ::c_int = 0xffff;
-
-pub const SO_REUSEADDR: ::c_int = 4;
-pub const SO_TYPE: ::c_int = 0x1008;
-pub const SO_ERROR: ::c_int = 0x1007;
-pub const SO_DONTROUTE: ::c_int = 16;
-pub const SO_BROADCAST: ::c_int = 32;
-pub const SO_SNDBUF: ::c_int = 0x1001;
-pub const SO_RCVBUF: ::c_int = 0x1002;
-pub const SO_KEEPALIVE: ::c_int = 8;
-pub const SO_OOBINLINE: ::c_int = 0x100;
-pub const SO_LINGER: ::c_int = 128;
-pub const SO_REUSEPORT: ::c_int = 0x200;
-pub const SO_ACCEPTCONN: ::c_int = 0x8000;
-
-pub const SA_ONSTACK: ::c_int = 1;
-pub const SA_SIGINFO: ::c_int = 0x200;
-pub const SA_NOCLDWAIT: ::c_int = 0x100;
-
-pub const SIGCHLD: ::c_int = 20;
-pub const SIGBUS: ::c_int = 10;
-pub const SIGUSR1: ::c_int = 30;
-pub const SIGUSR2: ::c_int = 31;
-pub const SIGCONT: ::c_int = 19;
-pub const SIGSTOP: ::c_int = 17;
-pub const SIGTSTP: ::c_int = 18;
-pub const SIGURG: ::c_int = 16;
-pub const SIGIO: ::c_int = 23;
-pub const SIGSYS: ::c_int = 12;
-pub const SIGPOLL: ::c_int = 23;
-pub const SIGPWR: ::c_int = 29;
-pub const SIG_SETMASK: ::c_int = 4;
-pub const SIG_BLOCK: ::c_int = 1;
-pub const SIG_UNBLOCK: ::c_int = 2;
-
-pub const POLLWRNORM: ::c_short = 4;
-pub const POLLWRBAND: ::c_short = 0x100;
-
-pub const O_ASYNC: ::c_int = 0x40;
-pub const O_NDELAY: ::c_int = 0x4004;
-
-pub const PTRACE_DETACH: ::c_uint = 11;
-
-pub const EFD_NONBLOCK: ::c_int = 0x4000;
-
-pub const F_GETLK: ::c_int = 7;
-pub const F_GETOWN: ::c_int = 5;
-pub const F_SETOWN: ::c_int = 6;
-pub const F_SETLK: ::c_int = 8;
-pub const F_SETLKW: ::c_int = 9;
-
-pub const SFD_NONBLOCK: ::c_int = 0x4000;
-
-pub const TIOCEXCL: ::c_ulong = 0x2000740d;
-pub const TIOCNXCL: ::c_ulong = 0x2000740e;
-pub const TIOCSCTTY: ::c_ulong = 0x20007484;
-pub const TIOCSTI: ::c_ulong = 0x80017472;
-pub const TIOCMGET: ::c_ulong = 0x4004746a;
-pub const TIOCMBIS: ::c_ulong = 0x8004746c;
-pub const TIOCMBIC: ::c_ulong = 0x8004746b;
-pub const TIOCMSET: ::c_ulong = 0x8004746d;
-pub const TIOCCONS: ::c_ulong = 0x20007424;
-
-pub const SFD_CLOEXEC: ::c_int = 0x400000;
-
-pub const NCCS: usize = 17;
-pub const O_TRUNC: ::c_int = 0x400;
-
-pub const O_CLOEXEC: ::c_int = 0x400000;
-
-pub const EBFONT: ::c_int = 109;
-pub const ENOSTR: ::c_int = 72;
-pub const ENODATA: ::c_int = 111;
-pub const ETIME: ::c_int = 73;
-pub const ENOSR: ::c_int = 74;
-pub const ENONET: ::c_int = 80;
-pub const ENOPKG: ::c_int = 113;
-pub const EREMOTE: ::c_int = 71;
-pub const ENOLINK: ::c_int = 82;
-pub const EADV: ::c_int = 83;
-pub const ESRMNT: ::c_int = 84;
-pub const ECOMM: ::c_int = 85;
-pub const EPROTO: ::c_int = 86;
-pub const EDOTDOT: ::c_int = 88;
-
-pub const SA_NODEFER: ::c_int = 0x20;
-pub const SA_RESETHAND: ::c_int = 0x4;
-pub const SA_RESTART: ::c_int = 0x2;
-pub const SA_NOCLDSTOP: ::c_int = 0x00000008;
-
-pub const EPOLL_CLOEXEC: ::c_int = 0x400000;
-
-pub const EFD_CLOEXEC: ::c_int = 0x400000;
-pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
-pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
-pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
-
-pub const O_DIRECTORY: ::c_int = 0o200000;
-pub const O_NOFOLLOW: ::c_int = 0o400000;
-pub const O_DIRECT: ::c_int = 0x100000;
-
-pub const MAP_LOCKED: ::c_int = 0x0100;
-pub const MAP_NORESERVE: ::c_int = 0x00040;
-
-pub const EDEADLOCK: ::c_int = 108;
-
-pub const SO_PEERCRED: ::c_int = 0x40;
-pub const SO_RCVLOWAT: ::c_int = 0x800;
-pub const SO_SNDLOWAT: ::c_int = 0x1000;
-pub const SO_RCVTIMEO: ::c_int = 0x2000;
-pub const SO_SNDTIMEO: ::c_int = 0x4000;
-
-pub const FIOCLEX: ::c_ulong = 0x20006601;
-pub const FIONBIO: ::c_ulong = 0x8004667e;
-
-pub const SYS_gettid: ::c_long = 143;
-pub const SYS_perf_event_open: ::c_long = 327;
-
-pub const MCL_CURRENT: ::c_int = 0x2000;
-pub const MCL_FUTURE: ::c_int = 0x4000;
-
-pub const SIGSTKSZ: ::size_t = 16384;
-pub const MINSIGSTKSZ: ::size_t = 4096;
-pub const CBAUD: ::tcflag_t = 0x0000100f;
-pub const TAB1: ::c_int = 0x800;
-pub const TAB2: ::c_int = 0x1000;
-pub const TAB3: ::c_int = 0x1800;
-pub const CR1: ::c_int  = 0x200;
-pub const CR2: ::c_int  = 0x400;
-pub const CR3: ::c_int  = 0x600;
-pub const FF1: ::c_int  = 0x8000;
-pub const BS1: ::c_int  = 0x2000;
-pub const VT1: ::c_int  = 0x4000;
-pub const VWERASE: usize = 0xe;
-pub const VREPRINT: usize = 0xc;
-pub const VSUSP: usize = 0xa;
-pub const VSTART: usize = 0x8;
-pub const VSTOP: usize = 0x9;
-pub const VDISCARD: usize = 0xd;
-pub const VTIME: usize = 0x5;
-pub const IXON: ::tcflag_t = 0x400;
-pub const IXOFF: ::tcflag_t = 0x1000;
-pub const ONLCR: ::tcflag_t = 0x4;
-pub const CSIZE: ::tcflag_t = 0x30;
-pub const CS6: ::tcflag_t = 0x10;
-pub const CS7: ::tcflag_t = 0x20;
-pub const CS8: ::tcflag_t = 0x30;
-pub const CSTOPB: ::tcflag_t = 0x40;
-pub const CREAD: ::tcflag_t = 0x80;
-pub const PARENB: ::tcflag_t = 0x100;
-pub const PARODD: ::tcflag_t = 0x200;
-pub const HUPCL: ::tcflag_t = 0x400;
-pub const CLOCAL: ::tcflag_t = 0x800;
-pub const ECHOKE: ::tcflag_t = 0x800;
-pub const ECHOE: ::tcflag_t = 0x10;
-pub const ECHOK: ::tcflag_t = 0x20;
-pub const ECHONL: ::tcflag_t = 0x40;
-pub const ECHOPRT: ::tcflag_t = 0x400;
-pub const ECHOCTL: ::tcflag_t = 0x200;
-pub const ISIG: ::tcflag_t = 0x1;
-pub const ICANON: ::tcflag_t = 0x2;
-pub const PENDIN: ::tcflag_t = 0x4000;
-pub const NOFLSH: ::tcflag_t = 0x80;
-
-pub const VEOL: usize = 5;
-pub const VEOL2: usize = 6;
-pub const VMIN: usize = 4;
-pub const IEXTEN: ::tcflag_t = 0x8000;
-pub const TOSTOP: ::tcflag_t = 0x100;
-pub const FLUSHO: ::tcflag_t = 0x2000;
-pub const EXTPROC: ::tcflag_t = 0x10000;
-pub const TCGETS: ::c_ulong = 0x40245408;
-pub const TCSETS: ::c_ulong = 0x80245409;
-pub const TCSETSW: ::c_ulong = 0x8024540a;
-pub const TCSETSF: ::c_ulong = 0x8024540b;
-pub const TCGETA: ::c_ulong = 0x40125401;
-pub const TCSETA: ::c_ulong = 0x80125402;
-pub const TCSETAW: ::c_ulong = 0x80125403;
-pub const TCSETAF: ::c_ulong = 0x80125404;
-pub const TCSBRK: ::c_ulong = 0x20005405;
-pub const TCXONC: ::c_ulong = 0x20005406;
-pub const TCFLSH: ::c_ulong = 0x20005407;
-pub const TIOCINQ: ::c_ulong = 0x4004667f;
-pub const TIOCGPGRP: ::c_ulong = 0x40047483;
-pub const TIOCSPGRP: ::c_ulong = 0x80047482;
-pub const TIOCOUTQ: ::c_ulong = 0x40047473;
-pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
-pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
-pub const FIONREAD: ::c_ulong = 0x4004667f;
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/linux/other/b64/x86_64.rs
+++ /dev/null
@@ -1,580 +0,0 @@
-//! x86_64-specific definitions for 64-bit linux-like values
-
-pub type c_char = i8;
-pub type wchar_t = i32;
-pub type nlink_t = u64;
-pub type blksize_t = i64;
-pub type greg_t = i64;
-pub type suseconds_t = i64;
-
-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 pthread_attr_t {
-        __size: [u64; 7]
-    }
-
-    pub struct _libc_fpxreg {
-        pub significand: [u16; 4],
-        pub exponent: u16,
-        __private: [u16; 3],
-    }
-
-    pub struct _libc_xmmreg {
-        pub element: [u32; 4],
-    }
-
-    pub struct _libc_fpstate {
-        pub cwd: u16,
-        pub swd: u16,
-        pub ftw: u16,
-        pub fop: u16,
-        pub rip: u64,
-        pub rdp: u64,
-        pub mxcsr: u32,
-        pub mxcr_mask: u32,
-        pub _st: [_libc_fpxreg; 8],
-        pub _xmm: [_libc_xmmreg; 16],
-        __private: [u64; 12],
-    }
-
-    pub struct user_fpregs_struct {
-        pub cwd: ::c_ushort,
-        pub swd: ::c_ushort,
-        pub ftw: ::c_ushort,
-        pub fop: ::c_ushort,
-        pub rip: ::c_ulonglong,
-        pub rdp: ::c_ulonglong,
-        pub mxcsr: ::c_uint,
-        pub mxcr_mask: ::c_uint,
-        pub st_space: [::c_uint; 32],
-        pub xmm_space: [::c_uint; 64],
-        padding: [::c_uint; 24],
-    }
-
-    pub struct user_regs_struct {
-        pub r15: ::c_ulonglong,
-        pub r14: ::c_ulonglong,
-        pub r13: ::c_ulonglong,
-        pub r12: ::c_ulonglong,
-        pub rbp: ::c_ulonglong,
-        pub rbx: ::c_ulonglong,
-        pub r11: ::c_ulonglong,
-        pub r10: ::c_ulonglong,
-        pub r9: ::c_ulonglong,
-        pub r8: ::c_ulonglong,
-        pub rax: ::c_ulonglong,
-        pub rcx: ::c_ulonglong,
-        pub rdx: ::c_ulonglong,
-        pub rsi: ::c_ulonglong,
-        pub rdi: ::c_ulonglong,
-        pub orig_rax: ::c_ulonglong,
-        pub rip: ::c_ulonglong,
-        pub cs: ::c_ulonglong,
-        pub eflags: ::c_ulonglong,
-        pub rsp: ::c_ulonglong,
-        pub ss: ::c_ulonglong,
-        pub fs_base: ::c_ulonglong,
-        pub gs_base: ::c_ulonglong,
-        pub ds: ::c_ulonglong,
-        pub es: ::c_ulonglong,
-        pub fs: ::c_ulonglong,
-        pub gs: ::c_ulonglong,
-    }
-
-    pub struct user {
-        pub regs: user_regs_struct,
-        pub u_fpvalid: ::c_int,
-        pub i387: user_fpregs_struct,
-        pub u_tsize: ::c_ulonglong,
-        pub u_dsize: ::c_ulonglong,
-        pub u_ssize: ::c_ulonglong,
-        pub start_code: ::c_ulonglong,
-        pub start_stack: ::c_ulonglong,
-        pub signal: ::c_longlong,
-        __reserved: ::c_int,
-        pub u_ar0: *mut user_regs_struct,
-        pub u_fpstate: *mut user_fpregs_struct,
-        pub magic: ::c_ulonglong,
-        pub u_comm: [::c_char; 32],
-        pub u_debugreg: [::c_ulonglong; 8],
-    }
-
-    pub struct mcontext_t {
-        pub gregs: [greg_t; 23],
-        pub fpregs: *mut _libc_fpstate,
-        __private: [u64; 8],
-    }
-
-    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 __key: ::key_t,
-        pub uid: ::uid_t,
-        pub gid: ::gid_t,
-        pub cuid: ::uid_t,
-        pub cgid: ::gid_t,
-        pub mode: ::c_ushort,
-        __pad1: ::c_ushort,
-        pub __seq: ::c_ushort,
-        __pad2: ::c_ushort,
-        __unused1: ::c_ulong,
-        __unused2: ::c_ulong
-    }
-
-    pub struct shmid_ds {
-        pub shm_perm: ::ipc_perm,
-        pub shm_segsz: ::size_t,
-        pub shm_atime: ::time_t,
-        pub shm_dtime: ::time_t,
-        pub shm_ctime: ::time_t,
-        pub shm_cpid: ::pid_t,
-        pub shm_lpid: ::pid_t,
-        pub shm_nattch: ::shmatt_t,
-        __unused4: ::c_ulong,
-        __unused5: ::c_ulong
-    }
-}
-
-pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
-pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
-
-pub const RLIMIT_NOFILE: ::c_int = 7;
-pub const RLIMIT_NPROC: ::c_int = 6;
-
-pub const O_APPEND: ::c_int = 1024;
-pub const O_CREAT: ::c_int = 64;
-pub const O_EXCL: ::c_int = 128;
-pub const O_NOCTTY: ::c_int = 256;
-pub const O_NONBLOCK: ::c_int = 2048;
-pub const O_SYNC: ::c_int = 1052672;
-pub const O_RSYNC: ::c_int = 1052672;
-pub const O_DSYNC: ::c_int = 4096;
-pub const O_FSYNC: ::c_int = 0x101000;
-
-pub const MAP_GROWSDOWN: ::c_int = 0x0100;
-
-pub const EDEADLK: ::c_int = 35;
-pub const ENAMETOOLONG: ::c_int = 36;
-pub const ENOLCK: ::c_int = 37;
-pub const ENOSYS: ::c_int = 38;
-pub const ENOTEMPTY: ::c_int = 39;
-pub const ELOOP: ::c_int = 40;
-pub const ENOMSG: ::c_int = 42;
-pub const EIDRM: ::c_int = 43;
-pub const ECHRNG: ::c_int = 44;
-pub const EL2NSYNC: ::c_int = 45;
-pub const EL3HLT: ::c_int = 46;
-pub const EL3RST: ::c_int = 47;
-pub const ELNRNG: ::c_int = 48;
-pub const EUNATCH: ::c_int = 49;
-pub const ENOCSI: ::c_int = 50;
-pub const EL2HLT: ::c_int = 51;
-pub const EBADE: ::c_int = 52;
-pub const EBADR: ::c_int = 53;
-pub const EXFULL: ::c_int = 54;
-pub const ENOANO: ::c_int = 55;
-pub const EBADRQC: ::c_int = 56;
-pub const EBADSLT: ::c_int = 57;
-pub const EMULTIHOP: ::c_int = 72;
-pub const EOVERFLOW: ::c_int = 75;
-pub const ENOTUNIQ: ::c_int = 76;
-pub const EBADFD: ::c_int = 77;
-pub const EBADMSG: ::c_int = 74;
-pub const EREMCHG: ::c_int = 78;
-pub const ELIBACC: ::c_int = 79;
-pub const ELIBBAD: ::c_int = 80;
-pub const ELIBSCN: ::c_int = 81;
-pub const ELIBMAX: ::c_int = 82;
-pub const ELIBEXEC: ::c_int = 83;
-pub const EILSEQ: ::c_int = 84;
-pub const ERESTART: ::c_int = 85;
-pub const ESTRPIPE: ::c_int = 86;
-pub const EUSERS: ::c_int = 87;
-pub const ENOTSOCK: ::c_int = 88;
-pub const EDESTADDRREQ: ::c_int = 89;
-pub const EMSGSIZE: ::c_int = 90;
-pub const EPROTOTYPE: ::c_int = 91;
-pub const ENOPROTOOPT: ::c_int = 92;
-pub const EPROTONOSUPPORT: ::c_int = 93;
-pub const ESOCKTNOSUPPORT: ::c_int = 94;
-pub const EOPNOTSUPP: ::c_int = 95;
-pub const EPFNOSUPPORT: ::c_int = 96;
-pub const EAFNOSUPPORT: ::c_int = 97;
-pub const EADDRINUSE: ::c_int = 98;
-pub const EADDRNOTAVAIL: ::c_int = 99;
-pub const ENETDOWN: ::c_int = 100;
-pub const ENETUNREACH: ::c_int = 101;
-pub const ENETRESET: ::c_int = 102;
-pub const ECONNABORTED: ::c_int = 103;
-pub const ECONNRESET: ::c_int = 104;
-pub const ENOBUFS: ::c_int = 105;
-pub const EISCONN: ::c_int = 106;
-pub const ENOTCONN: ::c_int = 107;
-pub const ESHUTDOWN: ::c_int = 108;
-pub const ETOOMANYREFS: ::c_int = 109;
-pub const ETIMEDOUT: ::c_int = 110;
-pub const ECONNREFUSED: ::c_int = 111;
-pub const EHOSTDOWN: ::c_int = 112;
-pub const EHOSTUNREACH: ::c_int = 113;
-pub const EALREADY: ::c_int = 114;
-pub const EINPROGRESS: ::c_int = 115;
-pub const ESTALE: ::c_int = 116;
-pub const EDQUOT: ::c_int = 122;
-pub const ENOMEDIUM: ::c_int = 123;
-pub const EMEDIUMTYPE: ::c_int = 124;
-pub const ECANCELED: ::c_int = 125;
-pub const ENOKEY: ::c_int = 126;
-pub const EKEYEXPIRED: ::c_int = 127;
-pub const EKEYREVOKED: ::c_int = 128;
-pub const EKEYREJECTED: ::c_int = 129;
-pub const EOWNERDEAD: ::c_int = 130;
-pub const ENOTRECOVERABLE: ::c_int = 131;
-pub const EHWPOISON: ::c_int = 133;
-pub const ERFKILL: ::c_int = 132;
-
-pub const SOL_SOCKET: ::c_int = 1;
-
-pub const SO_REUSEADDR: ::c_int = 2;
-pub const SO_TYPE: ::c_int = 3;
-pub const SO_ERROR: ::c_int = 4;
-pub const SO_DONTROUTE: ::c_int = 5;
-pub const SO_BROADCAST: ::c_int = 6;
-pub const SO_SNDBUF: ::c_int = 7;
-pub const SO_RCVBUF: ::c_int = 8;
-pub const SO_SNDBUFFORCE: ::c_int = 32;
-pub const SO_RCVBUFFORCE: ::c_int = 33;
-pub const SO_KEEPALIVE: ::c_int = 9;
-pub const SO_OOBINLINE: ::c_int = 10;
-pub const SO_NO_CHECK: ::c_int = 11;
-pub const SO_PRIORITY: ::c_int = 12;
-pub const SO_LINGER: ::c_int = 13;
-pub const SO_BSDCOMPAT: ::c_int = 14;
-pub const SO_REUSEPORT: ::c_int = 15;
-pub const SO_PASSCRED: ::c_int = 16;
-pub const SO_PEERCRED: ::c_int = 17;
-pub const SO_RCVLOWAT: ::c_int = 18;
-pub const SO_SNDLOWAT: ::c_int = 19;
-pub const SO_RCVTIMEO: ::c_int = 20;
-pub const SO_SNDTIMEO: ::c_int = 21;
-pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22;
-pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23;
-pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24;
-pub const SO_BINDTODEVICE: ::c_int = 25;
-pub const SO_ATTACH_FILTER: ::c_int = 26;
-pub const SO_DETACH_FILTER: ::c_int = 27;
-pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
-pub const SO_PEERNAME: ::c_int = 28;
-pub const SO_TIMESTAMP: ::c_int = 29;
-pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP;
-pub const SO_ACCEPTCONN: ::c_int = 30;
-pub const SO_PEERSEC: ::c_int = 31;
-pub const SO_PASSSEC: ::c_int = 34;
-pub const SO_TIMESTAMPNS: ::c_int = 35;
-pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
-pub const SO_MARK: ::c_int = 36;
-pub const SO_TIMESTAMPING: ::c_int = 37;
-pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING;
-pub const SO_PROTOCOL: ::c_int = 38;
-pub const SO_DOMAIN: ::c_int = 39;
-pub const SO_RXQ_OVFL: ::c_int = 40;
-pub const SO_WIFI_STATUS: ::c_int = 41;
-pub const SCM_WIFI_STATUS: ::c_int = SO_WIFI_STATUS;
-pub const SO_PEEK_OFF: ::c_int = 42;
-pub const SO_NOFCS: ::c_int = 43;
-pub const SO_LOCK_FILTER: ::c_int = 44;
-pub const SO_SELECT_ERR_QUEUE: ::c_int = 45;
-pub const SO_BUSY_POLL: ::c_int = 46;
-pub const SO_MAX_PACING_RATE: ::c_int = 47;
-pub const SO_BPF_EXTENSIONS: ::c_int = 48;
-pub const SO_INCOMING_CPU: ::c_int = 49;
-pub const SO_ATTACH_BPF: ::c_int = 50;
-pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER;
-
-pub const SA_ONSTACK: ::c_int = 0x08000000;
-pub const SA_SIGINFO: ::c_int = 0x00000004;
-pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
-
-pub const SIGCHLD: ::c_int = 17;
-pub const SIGBUS: ::c_int = 7;
-pub const SIGUSR1: ::c_int = 10;
-pub const SIGUSR2: ::c_int = 12;
-pub const SIGCONT: ::c_int = 18;
-pub const SIGSTOP: ::c_int = 19;
-pub const SIGTSTP: ::c_int = 20;
-pub const SIGURG: ::c_int = 23;
-pub const SIGIO: ::c_int = 29;
-pub const SIGSYS: ::c_int = 31;
-pub const SIGSTKFLT: ::c_int = 16;
-pub const SIGUNUSED: ::c_int = 31;
-pub const SIGPOLL: ::c_int = 29;
-pub const SIGPWR: ::c_int = 30;
-pub const SIG_SETMASK: ::c_int = 2;
-pub const SIG_BLOCK: ::c_int = 0x000000;
-pub const SIG_UNBLOCK: ::c_int = 0x01;
-
-pub const POLLWRNORM: ::c_short = 0x100;
-pub const POLLWRBAND: ::c_short = 0x200;
-
-pub const O_ASYNC: ::c_int = 0x2000;
-pub const O_NDELAY: ::c_int = 0x800;
-
-pub const PTRACE_DETACH: ::c_uint = 17;
-
-pub const EFD_NONBLOCK: ::c_int = 0x800;
-
-pub const F_GETLK: ::c_int = 5;
-pub const F_GETOWN: ::c_int = 9;
-pub const F_SETOWN: ::c_int = 8;
-pub const F_SETLK: ::c_int = 6;
-pub const F_SETLKW: ::c_int = 7;
-
-pub const SFD_NONBLOCK: ::c_int = 0x0800;
-
-pub const TIOCEXCL: ::c_ulong = 0x540C;
-pub const TIOCNXCL: ::c_ulong = 0x540D;
-pub const TIOCSCTTY: ::c_ulong = 0x540E;
-pub const TIOCSTI: ::c_ulong = 0x5412;
-pub const TIOCMGET: ::c_ulong = 0x5415;
-pub const TIOCMBIS: ::c_ulong = 0x5416;
-pub const TIOCMBIC: ::c_ulong = 0x5417;
-pub const TIOCMSET: ::c_ulong = 0x5418;
-pub const TIOCCONS: ::c_ulong = 0x541D;
-
-pub const CLONE_NEWCGROUP: ::c_int = 0x02000000;
-
-pub const SFD_CLOEXEC: ::c_int = 0x080000;
-
-pub const NCCS: usize = 32;
-
-pub const O_TRUNC: ::c_int = 512;
-
-pub const O_CLOEXEC: ::c_int = 0x80000;
-
-pub const EBFONT: ::c_int = 59;
-pub const ENOSTR: ::c_int = 60;
-pub const ENODATA: ::c_int = 61;
-pub const ETIME: ::c_int = 62;
-pub const ENOSR: ::c_int = 63;
-pub const ENONET: ::c_int = 64;
-pub const ENOPKG: ::c_int = 65;
-pub const EREMOTE: ::c_int = 66;
-pub const ENOLINK: ::c_int = 67;
-pub const EADV: ::c_int = 68;
-pub const ESRMNT: ::c_int = 69;
-pub const ECOMM: ::c_int = 70;
-pub const EPROTO: ::c_int = 71;
-pub const EDOTDOT: ::c_int = 73;
-
-pub const SA_NODEFER: ::c_int = 0x40000000;
-pub const SA_RESETHAND: ::c_int = 0x80000000;
-pub const SA_RESTART: ::c_int = 0x10000000;
-pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
-
-pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
-
-pub const EFD_CLOEXEC: ::c_int = 0x80000;
-
-pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
-pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
-pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
-
-pub const O_DIRECT: ::c_int = 0x4000;
-pub const O_DIRECTORY: ::c_int = 0x10000;
-pub const O_NOFOLLOW: ::c_int = 0x20000;
-
-pub const MAP_LOCKED: ::c_int = 0x02000;
-pub const MAP_NORESERVE: ::c_int = 0x04000;
-pub const MAP_32BIT: ::c_int = 0x0040;
-
-pub const EDEADLOCK: ::c_int = 35;
-
-pub const FIOCLEX: ::c_ulong = 0x5451;
-pub const FIONBIO: ::c_ulong = 0x5421;
-
-pub const PTRACE_GETFPREGS: ::c_uint = 14;
-pub const PTRACE_SETFPREGS: ::c_uint = 15;
-pub const PTRACE_GETFPXREGS: ::c_uint = 18;
-pub const PTRACE_SETFPXREGS: ::c_uint = 19;
-pub const PTRACE_GETREGS: ::c_uint = 12;
-pub const PTRACE_SETREGS: ::c_uint = 13;
-pub const PTRACE_O_EXITKILL: ::c_uint = 1048576;
-pub const PTRACE_O_TRACECLONE: ::c_uint = 8;
-pub const PTRACE_O_TRACEEXEC: ::c_uint = 16;
-pub const PTRACE_O_TRACEEXIT: ::c_uint = 64;
-pub const PTRACE_O_TRACEFORK: ::c_uint = 2;
-pub const PTRACE_O_TRACESYSGOOD: ::c_uint = 1;
-pub const PTRACE_O_TRACEVFORK: ::c_uint = 4;
-pub const PTRACE_O_TRACEVFORKDONE: ::c_uint = 32;
-pub const PTRACE_O_TRACESECCOMP: ::c_uint = 128;
-pub const PTRACE_O_SUSPEND_SECCOMP: ::c_uint = 2097152;
-pub const PTRACE_PEEKSIGINFO_SHARED: ::c_uint = 1;
-
-pub const SYS_gettid: ::c_long = 186;
-pub const SYS_perf_event_open: ::c_long = 298;
-
-pub const MCL_CURRENT: ::c_int = 0x0001;
-pub const MCL_FUTURE: ::c_int = 0x0002;
-
-pub const SIGSTKSZ: ::size_t = 8192;
-pub const MINSIGSTKSZ: ::size_t = 2048;
-pub const CBAUD: ::tcflag_t = 0o0010017;
-pub const TAB1: ::c_int = 0x00000800;
-pub const TAB2: ::c_int = 0x00001000;
-pub const TAB3: ::c_int = 0x00001800;
-pub const CR1: ::c_int  = 0x00000200;
-pub const CR2: ::c_int  = 0x00000400;
-pub const CR3: ::c_int  = 0x00000600;
-pub const FF1: ::c_int  = 0x00008000;
-pub const BS1: ::c_int  = 0x00002000;
-pub const VT1: ::c_int  = 0x00004000;
-pub const VWERASE: usize = 14;
-pub const VREPRINT: usize = 12;
-pub const VSUSP: usize = 10;
-pub const VSTART: usize = 8;
-pub const VSTOP: usize = 9;
-pub const VDISCARD: usize = 13;
-pub const VTIME: usize = 5;
-pub const IXON: ::tcflag_t = 0x00000400;
-pub const IXOFF: ::tcflag_t = 0x00001000;
-pub const ONLCR: ::tcflag_t = 0x4;
-pub const CSIZE: ::tcflag_t = 0x00000030;
-pub const CS6: ::tcflag_t = 0x00000010;
-pub const CS7: ::tcflag_t = 0x00000020;
-pub const CS8: ::tcflag_t = 0x00000030;
-pub const CSTOPB: ::tcflag_t = 0x00000040;
-pub const CREAD: ::tcflag_t = 0x00000080;
-pub const PARENB: ::tcflag_t = 0x00000100;
-pub const PARODD: ::tcflag_t = 0x00000200;
-pub const HUPCL: ::tcflag_t = 0x00000400;
-pub const CLOCAL: ::tcflag_t = 0x00000800;
-pub const ECHOKE: ::tcflag_t = 0x00000800;
-pub const ECHOE: ::tcflag_t = 0x00000010;
-pub const ECHOK: ::tcflag_t = 0x00000020;
-pub const ECHONL: ::tcflag_t = 0x00000040;
-pub const ECHOPRT: ::tcflag_t = 0x00000400;
-pub const ECHOCTL: ::tcflag_t = 0x00000200;
-pub const ISIG: ::tcflag_t = 0x00000001;
-pub const ICANON: ::tcflag_t = 0x00000002;
-pub const PENDIN: ::tcflag_t = 0x00004000;
-pub const NOFLSH: ::tcflag_t = 0x00000080;
-
-pub const B0: ::speed_t = 0o000000;
-pub const B50: ::speed_t = 0o000001;
-pub const B75: ::speed_t = 0o000002;
-pub const B110: ::speed_t = 0o000003;
-pub const B134: ::speed_t = 0o000004;
-pub const B150: ::speed_t = 0o000005;
-pub const B200: ::speed_t = 0o000006;
-pub const B300: ::speed_t = 0o000007;
-pub const B600: ::speed_t = 0o000010;
-pub const B1200: ::speed_t = 0o000011;
-pub const B1800: ::speed_t = 0o000012;
-pub const B2400: ::speed_t = 0o000013;
-pub const B4800: ::speed_t = 0o000014;
-pub const B9600: ::speed_t = 0o000015;
-pub const B19200: ::speed_t = 0o000016;
-pub const B38400: ::speed_t = 0o000017;
-pub const EXTA: ::speed_t = B19200;
-pub const EXTB: ::speed_t = B38400;
-pub const B57600: ::speed_t = 0o010001;
-pub const B115200: ::speed_t = 0o010002;
-pub const B230400: ::speed_t = 0o010003;
-pub const B460800: ::speed_t = 0o010004;
-pub const B500000: ::speed_t = 0o010005;
-pub const B576000: ::speed_t = 0o010006;
-pub const B921600: ::speed_t = 0o010007;
-pub const B1000000: ::speed_t = 0o010010;
-pub const B1152000: ::speed_t = 0o010011;
-pub const B1500000: ::speed_t = 0o010012;
-pub const B2000000: ::speed_t = 0o010013;
-pub const B2500000: ::speed_t = 0o010014;
-pub const B3000000: ::speed_t = 0o010015;
-pub const B3500000: ::speed_t = 0o010016;
-pub const B4000000: ::speed_t = 0o010017;
-
-pub const VEOL: usize = 11;
-pub const VEOL2: usize = 16;
-pub const VMIN: usize = 6;
-pub const IEXTEN: ::tcflag_t = 0x00008000;
-pub const TOSTOP: ::tcflag_t = 0x00000100;
-pub const FLUSHO: ::tcflag_t = 0x00001000;
-pub const EXTPROC: ::tcflag_t = 0x00010000;
-pub const TCGETS: ::c_ulong = 0x5401;
-pub const TCSETS: ::c_ulong = 0x5402;
-pub const TCSETSW: ::c_ulong = 0x5403;
-pub const TCSETSF: ::c_ulong = 0x5404;
-pub const TCGETA: ::c_ulong = 0x5405;
-pub const TCSETA: ::c_ulong = 0x5406;
-pub const TCSETAW: ::c_ulong = 0x5407;
-pub const TCSETAF: ::c_ulong = 0x5408;
-pub const TCSBRK: ::c_ulong = 0x5409;
-pub const TCXONC: ::c_ulong = 0x540A;
-pub const TCFLSH: ::c_ulong = 0x540B;
-pub const TIOCINQ: ::c_ulong = 0x541B;
-pub const TIOCGPGRP: ::c_ulong = 0x540F;
-pub const TIOCSPGRP: ::c_ulong = 0x5410;
-pub const TIOCOUTQ: ::c_ulong = 0x5411;
-pub const TIOCGWINSZ: ::c_ulong = 0x5413;
-pub const TIOCSWINSZ: ::c_ulong = 0x5414;
-pub const FIONREAD: ::c_ulong = 0x541B;
-
-extern {
-    pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int;
-    pub fn setcontext(ucp: *const ucontext_t) -> ::c_int;
-    pub fn makecontext(ucp: *mut ucontext_t,
-                       func:  extern fn (),
-                       argc: ::c_int, ...);
-    pub fn swapcontext(uocp: *mut ucontext_t,
-                       ucp: *const ucontext_t) -> ::c_int;
-    pub fn iopl(level: ::c_int) -> ::c_int;
-    pub fn ioperm(from: ::c_ulong, num: ::c_ulong,
-                  turn_on: ::c_int) -> ::c_int;
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/linux/other/mod.rs
+++ /dev/null
@@ -1,521 +0,0 @@
-pub type fsblkcnt_t = ::c_ulong;
-pub type fsfilcnt_t = ::c_ulong;
-pub type rlim_t = c_ulong;
-pub type __priority_which_t = ::c_uint;
-
-s! {
-    pub struct aiocb {
-        pub aio_fildes: ::c_int,
-        pub aio_lio_opcode: ::c_int,
-        pub aio_reqprio: ::c_int,
-        pub aio_buf: *mut ::c_void,
-        pub aio_nbytes: ::size_t,
-        pub aio_sigevent: ::sigevent,
-        __next_prio: *mut aiocb,
-        __abs_prio: ::c_int,
-        __policy: ::c_int,
-        __error_code: ::c_int,
-        __return_value: ::ssize_t,
-        pub aio_offset: off_t,
-        #[cfg(target_pointer_width = "32")]
-        __unused1: [::c_char; 4],
-        __glibc_reserved: [::c_char; 32]
-    }
-
-    pub struct __exit_status {
-        pub e_termination: ::c_short,
-        pub e_exit: ::c_short,
-    }
-
-    pub struct __timeval {
-        pub tv_sec: ::int32_t,
-        pub tv_usec: ::int32_t,
-    }
-
-    pub struct utmpx {
-        pub ut_type: ::c_short,
-        pub ut_pid: ::pid_t,
-        pub ut_line: [::c_char; __UT_LINESIZE],
-        pub ut_id: [::c_char; 4],
-
-        pub ut_user: [::c_char; __UT_NAMESIZE],
-        pub ut_host: [::c_char; __UT_HOSTSIZE],
-        pub ut_exit: __exit_status,
-
-        #[cfg(any(target_arch = "aarch64",
-                  target_arch = "sparc64",
-                  target_pointer_width = "32"))]
-        pub ut_session: ::c_long,
-        #[cfg(any(target_arch = "aarch64",
-                  target_arch = "sparc64",
-                  target_pointer_width = "32"))]
-        pub ut_tv: ::timeval,
-
-        #[cfg(not(any(target_arch = "aarch64",
-                      target_arch = "sparc64",
-                      target_pointer_width = "32")))]
-        pub ut_session: ::int32_t,
-        #[cfg(not(any(target_arch = "aarch64",
-                      target_arch = "sparc64",
-                      target_pointer_width = "32")))]
-        pub ut_tv: __timeval,
-
-        pub ut_addr_v6: [::int32_t; 4],
-        __glibc_reserved: [::c_char; 20],
-    }
-
-    pub struct sigaction {
-        pub sa_sigaction: ::sighandler_t,
-        pub sa_mask: ::sigset_t,
-        #[cfg(target_arch = "sparc64")]
-        __reserved0: ::c_int,
-        pub sa_flags: ::c_int,
-        pub sa_restorer: ::dox::Option<extern fn()>,
-    }
-
-    pub struct stack_t {
-        pub ss_sp: *mut ::c_void,
-        pub ss_flags: ::c_int,
-        pub ss_size: ::size_t
-    }
-
-    pub struct siginfo_t {
-        pub si_signo: ::c_int,
-        pub si_errno: ::c_int,
-        pub si_code: ::c_int,
-        pub _pad: [::c_int; 29],
-        _align: [usize; 0],
-    }
-
-    pub struct glob64_t {
-        pub gl_pathc: ::size_t,
-        pub gl_pathv: *mut *mut ::c_char,
-        pub gl_offs: ::size_t,
-        pub gl_flags: ::c_int,
-
-        __unused1: *mut ::c_void,
-        __unused2: *mut ::c_void,
-        __unused3: *mut ::c_void,
-        __unused4: *mut ::c_void,
-        __unused5: *mut ::c_void,
-    }
-
-    pub struct ucred {
-        pub pid: ::pid_t,
-        pub uid: ::uid_t,
-        pub gid: ::gid_t,
-    }
-
-    pub struct statfs {
-        pub f_type: __fsword_t,
-        pub f_bsize: __fsword_t,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-
-        pub f_files: ::fsfilcnt_t,
-        pub f_ffree: ::fsfilcnt_t,
-        pub f_fsid: ::fsid_t,
-
-        pub f_namelen: __fsword_t,
-        pub f_frsize: __fsword_t,
-        f_spare: [__fsword_t; 5],
-    }
-
-    pub struct msghdr {
-        pub msg_name: *mut ::c_void,
-        pub msg_namelen: ::socklen_t,
-        pub msg_iov: *mut ::iovec,
-        pub msg_iovlen: ::size_t,
-        pub msg_control: *mut ::c_void,
-        pub msg_controllen: ::size_t,
-        pub msg_flags: ::c_int,
-    }
-
-    pub struct cmsghdr {
-        pub cmsg_len: ::size_t,
-        pub cmsg_level: ::c_int,
-        pub cmsg_type: ::c_int,
-    }
-
-    pub struct termios {
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_line: ::cc_t,
-        pub c_cc: [::cc_t; ::NCCS],
-        #[cfg(not(target_arch = "sparc64"))]
-        pub c_ispeed: ::speed_t,
-        #[cfg(not(target_arch = "sparc64"))]
-        pub c_ospeed: ::speed_t,
-    }
-
-    pub struct flock {
-        pub l_type: ::c_short,
-        pub l_whence: ::c_short,
-        pub l_start: ::off_t,
-        pub l_len: ::off_t,
-        pub l_pid: ::pid_t,
-    }
-
-    // FIXME this is actually a union
-    pub struct sem_t {
-        #[cfg(target_pointer_width = "32")]
-        __size: [::c_char; 16],
-        #[cfg(target_pointer_width = "64")]
-        __size: [::c_char; 32],
-        __align: [::c_long; 0],
-    }
-}
-
-pub const __UT_LINESIZE: usize = 32;
-pub const __UT_NAMESIZE: usize = 32;
-pub const __UT_HOSTSIZE: usize = 256;
-pub const EMPTY: ::c_short = 0;
-pub const RUN_LVL: ::c_short = 1;
-pub const BOOT_TIME: ::c_short = 2;
-pub const NEW_TIME: ::c_short = 3;
-pub const OLD_TIME: ::c_short = 4;
-pub const INIT_PROCESS: ::c_short = 5;
-pub const LOGIN_PROCESS: ::c_short = 6;
-pub const USER_PROCESS: ::c_short = 7;
-pub const DEAD_PROCESS: ::c_short = 8;
-pub const ACCOUNTING: ::c_short = 9;
-
-pub const RLIMIT_RSS: ::c_int = 5;
-pub const RLIMIT_AS: ::c_int = 9;
-pub const RLIMIT_MEMLOCK: ::c_int = 8;
-pub const RLIM_INFINITY: ::rlim_t = !0;
-pub const RLIMIT_RTTIME: ::c_int = 15;
-pub const RLIMIT_NLIMITS: ::c_int = 16;
-
-pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK;
-
-pub const SOL_RXRPC: ::c_int = 272;
-pub const SOL_PPPOL2TP: ::c_int = 273;
-pub const SOL_BLUETOOTH: ::c_int = 274;
-pub const SOL_PNPIPE: ::c_int = 275;
-pub const SOL_RDS: ::c_int = 276;
-pub const SOL_IUCV: ::c_int = 277;
-pub const SOL_CAIF: ::c_int = 278;
-pub const SOL_ALG: ::c_int = 279;
-pub const SOL_NFC: ::c_int = 280;
-
-pub const MSG_TRYHARD: ::c_int = 4;
-
-pub const LC_PAPER: ::c_int = 7;
-pub const LC_NAME: ::c_int = 8;
-pub const LC_ADDRESS: ::c_int = 9;
-pub const LC_TELEPHONE: ::c_int = 10;
-pub const LC_MEASUREMENT: ::c_int = 11;
-pub const LC_IDENTIFICATION: ::c_int = 12;
-pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
-pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
-pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
-pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
-pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
-pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
-pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
-                               | ::LC_NUMERIC_MASK
-                               | ::LC_TIME_MASK
-                               | ::LC_COLLATE_MASK
-                               | ::LC_MONETARY_MASK
-                               | ::LC_MESSAGES_MASK
-                               | LC_PAPER_MASK
-                               | LC_NAME_MASK
-                               | LC_ADDRESS_MASK
-                               | LC_TELEPHONE_MASK
-                               | LC_MEASUREMENT_MASK
-                               | LC_IDENTIFICATION_MASK;
-
-pub const MAP_ANON: ::c_int = 0x0020;
-pub const MAP_ANONYMOUS: ::c_int = 0x0020;
-pub const MAP_DENYWRITE: ::c_int = 0x0800;
-pub const MAP_EXECUTABLE: ::c_int = 0x01000;
-pub const MAP_POPULATE: ::c_int = 0x08000;
-pub const MAP_NONBLOCK: ::c_int = 0x010000;
-pub const MAP_STACK: ::c_int = 0x020000;
-
-pub const ENOTSUP: ::c_int = EOPNOTSUPP;
-pub const EUCLEAN: ::c_int = 117;
-pub const ENOTNAM: ::c_int = 118;
-pub const ENAVAIL: ::c_int = 119;
-pub const EISNAM: ::c_int = 120;
-pub const EREMOTEIO: ::c_int = 121;
-
-pub const SOCK_STREAM: ::c_int = 1;
-pub const SOCK_DGRAM: ::c_int = 2;
-pub const SOCK_SEQPACKET: ::c_int = 5;
-
-pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15;
-pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16;
-pub const TCP_THIN_DUPACK: ::c_int = 17;
-pub const TCP_USER_TIMEOUT: ::c_int = 18;
-pub const TCP_REPAIR: ::c_int = 19;
-pub const TCP_REPAIR_QUEUE: ::c_int = 20;
-pub const TCP_QUEUE_SEQ: ::c_int = 21;
-pub const TCP_REPAIR_OPTIONS: ::c_int = 22;
-pub const TCP_FASTOPEN: ::c_int = 23;
-pub const TCP_TIMESTAMP: ::c_int = 24;
-
-pub const SIGTTIN: ::c_int = 21;
-pub const SIGTTOU: ::c_int = 22;
-pub const SIGXCPU: ::c_int = 24;
-pub const SIGXFSZ: ::c_int = 25;
-pub const SIGVTALRM: ::c_int = 26;
-pub const SIGPROF: ::c_int = 27;
-pub const SIGWINCH: ::c_int = 28;
-
-pub const SIGEV_THREAD_ID: ::c_int = 4;
-
-pub const POLLRDNORM: ::c_short = 0x040;
-pub const POLLRDBAND: ::c_short = 0x080;
-
-pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01;
-pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02;
-
-pub const BUFSIZ: ::c_uint = 8192;
-pub const TMP_MAX: ::c_uint = 238328;
-pub const FOPEN_MAX: ::c_uint = 16;
-pub const POSIX_FADV_DONTNEED: ::c_int = 4;
-pub const POSIX_FADV_NOREUSE: ::c_int = 5;
-pub const POSIX_MADV_DONTNEED: ::c_int = 4;
-pub const _SC_2_C_VERSION: ::c_int = 96;
-pub const O_ACCMODE: ::c_int = 3;
-pub const ST_RELATIME: ::c_ulong = 4096;
-pub const NI_MAXHOST: ::socklen_t = 1025;
-
-pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;
-pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff;
-pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245;
-pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45;
-pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53;
-pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53;
-pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53;
-pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53;
-pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849;
-pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6;
-pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660;
-pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6;
-pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f;
-pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f;
-pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468;
-pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478;
-pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44;
-pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c;
-pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969;
-pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1;
-pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0;
-pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f;
-pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973;
-pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b;
-pub const TMPFS_MAGIC: ::c_long = 0x01021994;
-pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2;
-
-pub const VEOF: usize = 4;
-
-pub const CPU_SETSIZE: ::c_int = 0x400;
-
-pub const QFMT_VFS_V1: ::c_int = 4;
-
-pub const PTRACE_TRACEME: ::c_uint = 0;
-pub const PTRACE_PEEKTEXT: ::c_uint = 1;
-pub const PTRACE_PEEKDATA: ::c_uint = 2;
-pub const PTRACE_PEEKUSER: ::c_uint = 3;
-pub const PTRACE_POKETEXT: ::c_uint = 4;
-pub const PTRACE_POKEDATA: ::c_uint = 5;
-pub const PTRACE_POKEUSER: ::c_uint = 6;
-pub const PTRACE_CONT: ::c_uint = 7;
-pub const PTRACE_KILL: ::c_uint = 8;
-pub const PTRACE_SINGLESTEP: ::c_uint = 9;
-pub const PTRACE_ATTACH: ::c_uint = 16;
-pub const PTRACE_SYSCALL: ::c_uint = 24;
-pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200;
-pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201;
-pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202;
-pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203;
-pub const PTRACE_GETREGSET: ::c_uint = 0x4204;
-pub const PTRACE_SETREGSET: ::c_uint = 0x4205;
-pub const PTRACE_SEIZE: ::c_uint = 0x4206;
-pub const PTRACE_INTERRUPT: ::c_uint = 0x4207;
-pub const PTRACE_LISTEN: ::c_uint = 0x4208;
-pub const PTRACE_PEEKSIGINFO: ::c_uint = 0x4209;
-
-pub const MADV_DODUMP: ::c_int = 17;
-pub const MADV_DONTDUMP: ::c_int = 16;
-
-pub const EPOLLWAKEUP: ::c_int = 0x20000000;
-
-pub const MADV_HUGEPAGE: ::c_int = 14;
-pub const MADV_NOHUGEPAGE: ::c_int = 15;
-pub const MAP_HUGETLB: ::c_int = 0x040000;
-
-pub const SEEK_DATA: ::c_int = 3;
-pub const SEEK_HOLE: ::c_int = 4;
-
-pub const TCSANOW: ::c_int = 0;
-pub const TCSADRAIN: ::c_int = 1;
-pub const TCSAFLUSH: ::c_int = 2;
-
-pub const TIOCLINUX: ::c_ulong = 0x541C;
-pub const TIOCGSERIAL: ::c_ulong = 0x541E;
-
-pub const RTLD_DEEPBIND: ::c_int = 0x8;
-pub const RTLD_GLOBAL: ::c_int = 0x100;
-pub const RTLD_NOLOAD: ::c_int = 0x4;
-
-pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
-pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
-pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
-pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
-pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
-
-pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
-pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
-pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
-pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
-pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
-pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
-pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
-pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
-
-pub const NETLINK_ROUTE: ::c_int = 0;
-pub const NETLINK_UNUSED: ::c_int = 1;
-pub const NETLINK_USERSOCK: ::c_int = 2;
-pub const NETLINK_FIREWALL: ::c_int = 3;
-pub const NETLINK_SOCK_DIAG: ::c_int = 4;
-pub const NETLINK_NFLOG: ::c_int = 5;
-pub const NETLINK_XFRM: ::c_int = 6;
-pub const NETLINK_SELINUX: ::c_int = 7;
-pub const NETLINK_ISCSI: ::c_int = 8;
-pub const NETLINK_AUDIT: ::c_int = 9;
-pub const NETLINK_FIB_LOOKUP: ::c_int = 10;
-pub const NETLINK_CONNECTOR: ::c_int = 11;
-pub const NETLINK_NETFILTER: ::c_int = 12;
-pub const NETLINK_IP6_FW: ::c_int = 13;
-pub const NETLINK_DNRTMSG: ::c_int = 14;
-pub const NETLINK_KOBJECT_UEVENT: ::c_int = 15;
-pub const NETLINK_GENERIC: ::c_int = 16;
-pub const NETLINK_SCSITRANSPORT: ::c_int = 18;
-pub const NETLINK_ECRYPTFS: ::c_int = 19;
-pub const NETLINK_RDMA: ::c_int = 20;
-pub const NETLINK_CRYPTO: ::c_int = 21;
-pub const NETLINK_INET_DIAG: ::c_int = NETLINK_SOCK_DIAG;
-
-pub const MAX_LINKS: ::c_int = 32;
-
-pub const NLM_F_REQUEST: ::c_int = 1;
-pub const NLM_F_MULTI: ::c_int = 2;
-pub const NLM_F_ACK: ::c_int = 4;
-pub const NLM_F_ECHO: ::c_int = 8;
-pub const NLM_F_DUMP_INTR: ::c_int = 16;
-pub const NLM_F_DUMP_FILTERED: ::c_int = 32;
-
-pub const NLM_F_ROOT: ::c_int = 0x100;
-pub const NLM_F_MATCH: ::c_int = 0x200;
-pub const NLM_F_ATOMIC: ::c_int = 0x400;
-pub const NLM_F_DUMP: ::c_int = NLM_F_ROOT | NLM_F_MATCH;
-
-pub const NLM_F_REPLACE: ::c_int = 0x100;
-pub const NLM_F_EXCL: ::c_int = 0x200;
-pub const NLM_F_CREATE: ::c_int = 0x400;
-pub const NLM_F_APPEND: ::c_int = 0x800;
-
-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 NETLINK_ADD_MEMBERSHIP: ::c_int = 1;
-pub const NETLINK_DROP_MEMBERSHIP: ::c_int = 2;
-pub const NETLINK_PKTINFO: ::c_int = 3;
-pub const NETLINK_BROADCAST_ERROR: ::c_int = 4;
-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 NETLINK_LISTEN_ALL_NSID: ::c_int = 8;
-pub const NETLINK_LIST_MEMBERSHIPS: ::c_int = 9;
-pub const NETLINK_CAP_ACK: ::c_int = 10;
-
-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);
-
-cfg_if! {
-    if #[cfg(any(target_arch = "arm", target_arch = "x86",
-                 target_arch = "x86_64"))] {
-        pub const PTHREAD_STACK_MIN: ::size_t = 16384;
-    } else if #[cfg(target_arch = "sparc64")] {
-        pub const PTHREAD_STACK_MIN: ::size_t = 0x6000;
-    } else {
-        pub const PTHREAD_STACK_MIN: ::size_t = 131072;
-    }
-}
-
-extern {
-    pub fn utmpxname(file: *const ::c_char) -> ::c_int;
-    pub fn getutxent() -> *mut utmpx;
-    pub fn getutxid(ut: *const utmpx) -> *mut utmpx;
-    pub fn getutxline(ut: *const utmpx) -> *mut utmpx;
-    pub fn pututxline(ut: *const utmpx) -> *mut utmpx;
-    pub fn setutxent();
-    pub fn endutxent();
-    pub fn getpt() -> ::c_int;
-}
-
-#[link(name = "util")]
-extern {
-    pub fn sysctl(name: *mut ::c_int,
-                  namelen: ::c_int,
-                  oldp: *mut ::c_void,
-                  oldlenp: *mut ::size_t,
-                  newp: *mut ::c_void,
-                  newlen: ::size_t)
-                  -> ::c_int;
-    pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
-    pub fn backtrace(buf: *mut *mut ::c_void,
-                     sz: ::c_int) -> ::c_int;
-    pub fn glob64(pattern: *const ::c_char,
-                  flags: ::c_int,
-                  errfunc: ::dox::Option<extern fn(epath: *const ::c_char,
-                                                   errno: ::c_int)
-                                                   -> ::c_int>,
-                  pglob: *mut glob64_t) -> ::c_int;
-    pub fn globfree64(pglob: *mut glob64_t);
-    pub fn ptrace(request: ::c_uint, ...) -> ::c_long;
-    pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t,
-                                       cpusetsize: ::size_t,
-                                       cpuset: *mut ::cpu_set_t) -> ::c_int;
-    pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t,
-                                       cpusetsize: ::size_t,
-                                       cpuset: *const ::cpu_set_t) -> ::c_int;
-    pub fn getpriority(which: ::__priority_which_t, who: ::id_t) -> ::c_int;
-    pub fn setpriority(which: ::__priority_which_t, who: ::id_t,
-                                       prio: ::c_int) -> ::c_int;
-    pub fn pthread_getaffinity_np(thread: ::pthread_t,
-                                  cpusetsize: ::size_t,
-                                  cpuset: *mut ::cpu_set_t) -> ::c_int;
-    pub fn pthread_setaffinity_np(thread: ::pthread_t,
-                                  cpusetsize: ::size_t,
-                                  cpuset: *const ::cpu_set_t) -> ::c_int;
-    pub fn sched_getcpu() -> ::c_int;
-}
-
-cfg_if! {
-    if #[cfg(any(target_arch = "x86",
-                 target_arch = "arm",
-                 target_arch = "powerpc"))] {
-        mod b32;
-        pub use self::b32::*;
-    } else if #[cfg(any(target_arch = "x86_64",
-                        target_arch = "aarch64",
-                        target_arch = "powerpc64",
-                        target_arch = "sparc64"))] {
-        mod b64;
-        pub use self::b64::*;
-    } else {
-        // Unknown target_arch
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/linux/s390x.rs
+++ /dev/null
@@ -1,738 +0,0 @@
-pub type blkcnt_t = i64;
-pub type blksize_t = i64;
-pub type c_char = u8;
-pub type c_long = i64;
-pub type c_ulong = u64;
-pub type fsblkcnt_t = u64;
-pub type fsfilcnt_t = u64;
-pub type ino_t = u64;
-pub type nlink_t = u64;
-pub type off_t = i64;
-pub type rlim_t = u64;
-pub type suseconds_t = i64;
-pub type time_t = i64;
-pub type wchar_t = i32;
-pub type greg_t = u64;
-pub type clock_t = i64;
-pub type __fsword_t = ::c_long;
-pub type __priority_which_t = ::c_uint;
-
-s! {
-    pub struct aiocb {
-        pub aio_fildes: ::c_int,
-        pub aio_lio_opcode: ::c_int,
-        pub aio_reqprio: ::c_int,
-        pub aio_buf: *mut ::c_void,
-        pub aio_nbytes: ::size_t,
-        pub aio_sigevent: ::sigevent,
-        __next_prio: *mut aiocb,
-        __abs_prio: ::c_int,
-        __policy: ::c_int,
-        __error_code: ::c_int,
-        __return_value: ::ssize_t,
-        pub aio_offset: off_t,
-        #[cfg(target_pointer_width = "32")]
-        __unused1: [::c_char; 4],
-        __glibc_reserved: [::c_char; 32]
-    }
-
-    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,
-        st_pad0: ::c_int,
-        pub st_rdev: ::dev_t,
-        pub st_size: ::off_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,
-        pub st_blksize: ::blksize_t,
-        pub st_blocks: ::blkcnt_t,
-        __glibc_reserved: [::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,
-        st_pad0: ::c_int,
-        pub st_rdev: ::dev_t,
-        pub st_size: ::off_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,
-        pub st_blksize: ::blksize_t,
-        pub st_blocks: ::blkcnt64_t,
-        __glibc_reserved: [::c_long; 3],
-    }
-
-    pub struct pthread_attr_t {
-        __size: [::c_ulong; 7]
-    }
-
-    pub struct sigaction {
-        pub sa_sigaction: ::sighandler_t,
-        __glibc_reserved0: ::c_int,
-        pub sa_flags: ::c_int,
-        pub sa_restorer: ::dox::Option<extern fn()>,
-        pub sa_mask: sigset_t,
-    }
-
-    pub struct stack_t {
-        pub ss_sp: *mut ::c_void,
-        pub ss_flags: ::c_int,
-        pub ss_size: ::size_t,
-    }
-
-    pub struct sigset_t {
-        __size: [::c_ulong; 16],
-    }
-
-    pub struct siginfo_t {
-        pub si_signo: ::c_int,
-        pub si_errno: ::c_int,
-        pub si_code: ::c_int,
-        _pad: ::c_int,
-        _pad2: [::c_long; 14],
-    }
-
-    pub struct ipc_perm {
-        pub __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,
-        __pad1: ::c_ushort,
-        __unused1: ::c_ulong,
-        __unused2: ::c_ulong
-    }
-
-    pub struct shmid_ds {
-        pub shm_perm: ::ipc_perm,
-        pub shm_segsz: ::size_t,
-        pub shm_atime: ::time_t,
-        pub shm_dtime: ::time_t,
-        pub shm_ctime: ::time_t,
-        pub shm_cpid: ::pid_t,
-        pub shm_lpid: ::pid_t,
-        pub shm_nattch: ::shmatt_t,
-        __unused4: ::c_ulong,
-        __unused5: ::c_ulong
-    }
-
-    pub struct statfs {
-        pub f_type: ::c_uint,
-        pub f_bsize: ::c_uint,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_files: ::fsfilcnt_t,
-        pub f_ffree: ::fsfilcnt_t,
-        pub f_fsid: ::fsid_t,
-        pub f_namelen: ::c_uint,
-        pub f_frsize: ::c_uint,
-        pub f_flags: ::c_uint,
-        f_spare: [::c_uint; 4],
-    }
-
-    pub struct msghdr {
-        pub msg_name: *mut ::c_void,
-        pub msg_namelen: ::socklen_t,
-        pub msg_iov: *mut ::iovec,
-        pub msg_iovlen: ::size_t,
-        pub msg_control: *mut ::c_void,
-        pub msg_controllen: ::size_t,
-        pub msg_flags: ::c_int,
-    }
-
-    pub struct cmsghdr {
-        pub cmsg_len: ::size_t,
-        pub cmsg_level: ::c_int,
-        pub cmsg_type: ::c_int,
-    }
-
-    pub struct termios {
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_line: ::cc_t,
-        pub c_cc: [::cc_t; ::NCCS],
-        pub c_ispeed: ::speed_t,
-        pub c_ospeed: ::speed_t,
-    }
-
-    pub struct sysinfo {
-        pub uptime: ::c_long,
-        pub loads: [::c_ulong; 3],
-        pub totalram: ::c_ulong,
-        pub freeram: ::c_ulong,
-        pub sharedram: ::c_ulong,
-        pub bufferram: ::c_ulong,
-        pub totalswap: ::c_ulong,
-        pub freeswap: ::c_ulong,
-        pub procs: ::c_ushort,
-        pub pad: ::c_ushort,
-        pub totalhigh: ::c_ulong,
-        pub freehigh: ::c_ulong,
-        pub mem_unit: ::c_uint,
-        pub _f: [::c_char; 0],
-    }
-
-    pub struct glob64_t {
-        pub gl_pathc: ::size_t,
-        pub gl_pathv: *mut *mut ::c_char,
-        pub gl_offs: ::size_t,
-        pub gl_flags: ::c_int,
-
-        __unused1: *mut ::c_void,
-        __unused2: *mut ::c_void,
-        __unused3: *mut ::c_void,
-        __unused4: *mut ::c_void,
-        __unused5: *mut ::c_void,
-    }
-
-    pub struct ucred {
-        pub pid: ::pid_t,
-        pub uid: ::uid_t,
-        pub gid: ::gid_t,
-    }
-
-    pub struct flock {
-        pub l_type: ::c_short,
-        pub l_whence: ::c_short,
-        pub l_start: ::off_t,
-        pub l_len: ::off_t,
-        pub l_pid: ::pid_t,
-    }
-
-    // FIXME this is actually a union
-    pub struct sem_t {
-        __size: [::c_char; 32],
-        __align: [::c_long; 0],
-    }
-
-    pub struct __psw_t {
-        pub mask: u64,
-        pub addr: u64,
-    }
-
-    // FIXME: This is actually a union.
-    pub struct fpreg_t {
-        pub d: ::c_double,
-        // f: ::c_float,
-    }
-
-    pub struct fpregset_t {
-        pub fpc: u32,
-        __pad: u32,
-        pub fprs: [fpreg_t; 16],
-    }
-
-    pub struct mcontext_t {
-        pub psw: __psw_t,
-        pub gregs: [u64; 16],
-        pub aregs: [u32; 16],
-        pub fpregs: fpregset_t,
-    }
-
-    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,
-    }
-
-    pub struct msqid_ds {
-        pub msg_perm: ::ipc_perm,
-        pub msg_stime: ::time_t,
-        pub msg_rtime: ::time_t,
-        pub msg_ctime: ::time_t,
-        __msg_cbytes: ::c_ulong,
-        pub msg_qnum: ::msgqnum_t,
-        pub msg_qbytes: ::msglen_t,
-        pub msg_lspid: ::pid_t,
-        pub msg_lrpid: ::pid_t,
-        __glibc_reserved4: ::c_ulong,
-        __glibc_reserved5: ::c_ulong,
-    }
-}
-
-pub const CLONE_NEWCGROUP: ::c_int = 0x02000000;
-
-pub const SFD_CLOEXEC: ::c_int = 0x080000;
-
-pub const NCCS: usize = 32;
-
-pub const O_TRUNC: ::c_int = 512;
-
-pub const O_CLOEXEC: ::c_int = 0x80000;
-
-pub const EBFONT: ::c_int = 59;
-pub const ENOSTR: ::c_int = 60;
-pub const ENODATA: ::c_int = 61;
-pub const ETIME: ::c_int = 62;
-pub const ENOSR: ::c_int = 63;
-pub const ENONET: ::c_int = 64;
-pub const ENOPKG: ::c_int = 65;
-pub const EREMOTE: ::c_int = 66;
-pub const ENOLINK: ::c_int = 67;
-pub const EADV: ::c_int = 68;
-pub const ESRMNT: ::c_int = 69;
-pub const ECOMM: ::c_int = 70;
-pub const EPROTO: ::c_int = 71;
-pub const EDOTDOT: ::c_int = 73;
-
-pub const SA_NODEFER: ::c_int = 0x40000000;
-pub const SA_RESETHAND: ::c_int = 0x80000000;
-pub const SA_RESTART: ::c_int = 0x10000000;
-pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
-
-pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
-
-pub const EFD_CLOEXEC: ::c_int = 0x80000;
-
-pub const POSIX_FADV_DONTNEED: ::c_int = 6;
-pub const POSIX_FADV_NOREUSE: ::c_int = 7;
-
-pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
-pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
-pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
-pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
-
-pub const EADDRINUSE: ::c_int = 98;
-pub const EADDRNOTAVAIL: ::c_int = 99;
-pub const ECONNABORTED: ::c_int = 103;
-pub const ECONNREFUSED: ::c_int = 111;
-pub const ECONNRESET: ::c_int = 104;
-pub const EDEADLK: ::c_int = 35;
-pub const ENOSYS: ::c_int = 38;
-pub const ENOTCONN: ::c_int = 107;
-pub const ETIMEDOUT: ::c_int = 110;
-pub const FIOCLEX: ::c_ulong = 0x5451;
-pub const FIONBIO: ::c_ulong = 0x5421;
-pub const MAP_ANON: ::c_int = 0x20;
-pub const O_ACCMODE: ::c_int = 3;
-pub const O_APPEND: ::c_int = 1024;
-pub const O_CREAT: ::c_int = 64;
-pub const O_EXCL: ::c_int = 128;
-pub const O_NONBLOCK: ::c_int = 2048;
-pub const PTHREAD_STACK_MIN: ::size_t = 16384;
-pub const RLIM_INFINITY: ::rlim_t = 0xffffffffffffffff;
-pub const SA_NOCLDWAIT: ::c_int = 2;
-pub const SA_ONSTACK: ::c_int = 0x08000000;
-pub const SA_SIGINFO: ::c_int = 4;
-pub const SIGBUS: ::c_int = 7;
-pub const SIGSTKSZ: ::size_t = 0x2000;
-pub const MINSIGSTKSZ: ::size_t = 2048;
-pub const SIG_SETMASK: ::c_int = 2;
-pub const SOCK_DGRAM: ::c_int = 2;
-pub const SOCK_STREAM: ::c_int = 1;
-pub const SOL_SOCKET: ::c_int = 1;
-pub const SO_BROADCAST: ::c_int = 6;
-pub const SO_ERROR: ::c_int = 4;
-pub const SO_RCVTIMEO: ::c_int = 20;
-pub const SO_REUSEADDR: ::c_int = 2;
-pub const SO_SNDTIMEO: ::c_int = 21;
-
-pub const RLIMIT_RSS: ::c_int = 5;
-pub const RLIMIT_NOFILE: ::c_int = 7;
-pub const RLIMIT_AS: ::c_int = 9;
-pub const RLIMIT_NPROC: ::c_int = 6;
-pub const RLIMIT_MEMLOCK: ::c_int = 8;
-pub const RLIMIT_RTTIME: ::c_int = 15;
-pub const RLIMIT_NLIMITS: ::c_int = 16;
-
-pub const O_NOCTTY: ::c_int = 256;
-pub const O_SYNC: ::c_int = 1052672;
-pub const O_RSYNC: ::c_int = 1052672;
-pub const O_DSYNC: ::c_int = 4096;
-pub const O_FSYNC: ::c_int = 0x101000;
-pub const O_DIRECT: ::c_int = 0x4000;
-pub const O_DIRECTORY: ::c_int = 0x10000;
-pub const O_NOFOLLOW: ::c_int = 0x20000;
-
-pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK;
-
-pub const LC_PAPER: ::c_int = 7;
-pub const LC_NAME: ::c_int = 8;
-pub const LC_ADDRESS: ::c_int = 9;
-pub const LC_TELEPHONE: ::c_int = 10;
-pub const LC_MEASUREMENT: ::c_int = 11;
-pub const LC_IDENTIFICATION: ::c_int = 12;
-pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
-pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
-pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
-pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
-pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
-pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
-pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
-                               | ::LC_NUMERIC_MASK
-                               | ::LC_TIME_MASK
-                               | ::LC_COLLATE_MASK
-                               | ::LC_MONETARY_MASK
-                               | ::LC_MESSAGES_MASK
-                               | LC_PAPER_MASK
-                               | LC_NAME_MASK
-                               | LC_ADDRESS_MASK
-                               | LC_TELEPHONE_MASK
-                               | LC_MEASUREMENT_MASK
-                               | LC_IDENTIFICATION_MASK;
-
-pub const MAP_ANONYMOUS: ::c_int = 0x0020;
-pub const MAP_GROWSDOWN: ::c_int = 0x0100;
-pub const MAP_DENYWRITE: ::c_int = 0x0800;
-pub const MAP_EXECUTABLE: ::c_int = 0x01000;
-pub const MAP_LOCKED: ::c_int = 0x02000;
-pub const MAP_NORESERVE: ::c_int = 0x04000;
-pub const MAP_POPULATE: ::c_int = 0x08000;
-pub const MAP_NONBLOCK: ::c_int = 0x010000;
-pub const MAP_STACK: ::c_int = 0x020000;
-
-pub const EDEADLOCK: ::c_int = 35;
-pub const ENAMETOOLONG: ::c_int = 36;
-pub const ENOLCK: ::c_int = 37;
-pub const ENOTEMPTY: ::c_int = 39;
-pub const ELOOP: ::c_int = 40;
-pub const ENOMSG: ::c_int = 42;
-pub const EIDRM: ::c_int = 43;
-pub const ECHRNG: ::c_int = 44;
-pub const EL2NSYNC: ::c_int = 45;
-pub const EL3HLT: ::c_int = 46;
-pub const EL3RST: ::c_int = 47;
-pub const ELNRNG: ::c_int = 48;
-pub const EUNATCH: ::c_int = 49;
-pub const ENOCSI: ::c_int = 50;
-pub const EL2HLT: ::c_int = 51;
-pub const EBADE: ::c_int = 52;
-pub const EBADR: ::c_int = 53;
-pub const EXFULL: ::c_int = 54;
-pub const ENOANO: ::c_int = 55;
-pub const EBADRQC: ::c_int = 56;
-pub const EBADSLT: ::c_int = 57;
-pub const EMULTIHOP: ::c_int = 72;
-pub const EOVERFLOW: ::c_int = 75;
-pub const ENOTUNIQ: ::c_int = 76;
-pub const EBADFD: ::c_int = 77;
-pub const EBADMSG: ::c_int = 74;
-pub const EREMCHG: ::c_int = 78;
-pub const ELIBACC: ::c_int = 79;
-pub const ELIBBAD: ::c_int = 80;
-pub const ELIBSCN: ::c_int = 81;
-pub const ELIBMAX: ::c_int = 82;
-pub const ELIBEXEC: ::c_int = 83;
-pub const EILSEQ: ::c_int = 84;
-pub const ERESTART: ::c_int = 85;
-pub const ESTRPIPE: ::c_int = 86;
-pub const EUSERS: ::c_int = 87;
-pub const ENOTSOCK: ::c_int = 88;
-pub const EDESTADDRREQ: ::c_int = 89;
-pub const EMSGSIZE: ::c_int = 90;
-pub const EPROTOTYPE: ::c_int = 91;
-pub const ENOPROTOOPT: ::c_int = 92;
-pub const EPROTONOSUPPORT: ::c_int = 93;
-pub const ESOCKTNOSUPPORT: ::c_int = 94;
-pub const EOPNOTSUPP: ::c_int = 95;
-pub const ENOTSUP: ::c_int = EOPNOTSUPP;
-pub const EPFNOSUPPORT: ::c_int = 96;
-pub const EAFNOSUPPORT: ::c_int = 97;
-pub const ENETDOWN: ::c_int = 100;
-pub const ENETUNREACH: ::c_int = 101;
-pub const ENETRESET: ::c_int = 102;
-pub const ENOBUFS: ::c_int = 105;
-pub const EISCONN: ::c_int = 106;
-pub const ESHUTDOWN: ::c_int = 108;
-pub const ETOOMANYREFS: ::c_int = 109;
-pub const EHOSTDOWN: ::c_int = 112;
-pub const EHOSTUNREACH: ::c_int = 113;
-pub const EALREADY: ::c_int = 114;
-pub const EINPROGRESS: ::c_int = 115;
-pub const ESTALE: ::c_int = 116;
-pub const EUCLEAN: ::c_int = 117;
-pub const ENOTNAM: ::c_int = 118;
-pub const ENAVAIL: ::c_int = 119;
-pub const EISNAM: ::c_int = 120;
-pub const EREMOTEIO: ::c_int = 121;
-pub const EDQUOT: ::c_int = 122;
-pub const ENOMEDIUM: ::c_int = 123;
-pub const EMEDIUMTYPE: ::c_int = 124;
-pub const ECANCELED: ::c_int = 125;
-pub const ENOKEY: ::c_int = 126;
-pub const EKEYEXPIRED: ::c_int = 127;
-pub const EKEYREVOKED: ::c_int = 128;
-pub const EKEYREJECTED: ::c_int = 129;
-pub const EOWNERDEAD: ::c_int = 130;
-pub const ENOTRECOVERABLE: ::c_int = 131;
-pub const EHWPOISON: ::c_int = 133;
-pub const ERFKILL: ::c_int = 132;
-
-pub const SOCK_SEQPACKET: ::c_int = 5;
-
-pub const SO_TYPE: ::c_int = 3;
-pub const SO_DONTROUTE: ::c_int = 5;
-pub const SO_SNDBUF: ::c_int = 7;
-pub const SO_RCVBUF: ::c_int = 8;
-pub const SO_KEEPALIVE: ::c_int = 9;
-pub const SO_OOBINLINE: ::c_int = 10;
-pub const SO_LINGER: ::c_int = 13;
-pub const SO_REUSEPORT: ::c_int = 15;
-pub const SO_PEERCRED: ::c_int = 17;
-pub const SO_RCVLOWAT: ::c_int = 18;
-pub const SO_SNDLOWAT: ::c_int = 19;
-pub const SO_ACCEPTCONN: ::c_int = 30;
-
-pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15;
-pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16;
-pub const TCP_THIN_DUPACK: ::c_int = 17;
-pub const TCP_USER_TIMEOUT: ::c_int = 18;
-pub const TCP_REPAIR: ::c_int = 19;
-pub const TCP_REPAIR_QUEUE: ::c_int = 20;
-pub const TCP_QUEUE_SEQ: ::c_int = 21;
-pub const TCP_REPAIR_OPTIONS: ::c_int = 22;
-pub const TCP_FASTOPEN: ::c_int = 23;
-pub const TCP_TIMESTAMP: ::c_int = 24;
-
-pub const SIGCHLD: ::c_int = 17;
-pub const SIGUSR1: ::c_int = 10;
-pub const SIGUSR2: ::c_int = 12;
-pub const SIGCONT: ::c_int = 18;
-pub const SIGSTOP: ::c_int = 19;
-pub const SIGTSTP: ::c_int = 20;
-pub const SIGURG: ::c_int = 23;
-pub const SIGIO: ::c_int = 29;
-pub const SIGSYS: ::c_int = 31;
-pub const SIGSTKFLT: ::c_int = 16;
-pub const SIGUNUSED: ::c_int = 31;
-pub const SIGTTIN: ::c_int = 21;
-pub const SIGTTOU: ::c_int = 22;
-pub const SIGXCPU: ::c_int = 24;
-pub const SIGXFSZ: ::c_int = 25;
-pub const SIGVTALRM: ::c_int = 26;
-pub const SIGPROF: ::c_int = 27;
-pub const SIGWINCH: ::c_int = 28;
-pub const SIGPOLL: ::c_int = 29;
-pub const SIGPWR: ::c_int = 30;
-pub const SIG_BLOCK: ::c_int = 0x000000;
-pub const SIG_UNBLOCK: ::c_int = 0x01;
-
-pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01;
-pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02;
-
-pub const BUFSIZ: ::c_uint = 8192;
-pub const TMP_MAX: ::c_uint = 238328;
-pub const FOPEN_MAX: ::c_uint = 16;
-pub const POSIX_MADV_DONTNEED: ::c_int = 4;
-pub const _SC_2_C_VERSION: ::c_int = 96;
-pub const O_ASYNC: ::c_int = 0x2000;
-pub const O_NDELAY: ::c_int = 0x800;
-pub const ST_RELATIME: ::c_ulong = 4096;
-pub const NI_MAXHOST: ::socklen_t = 1025;
-
-pub const ADFS_SUPER_MAGIC: ::c_int = 0x0000adf5;
-pub const AFFS_SUPER_MAGIC: ::c_int = 0x0000adff;
-pub const CODA_SUPER_MAGIC: ::c_int = 0x73757245;
-pub const CRAMFS_MAGIC: ::c_int = 0x28cd3d45;
-pub const EFS_SUPER_MAGIC: ::c_int = 0x00414a53;
-pub const EXT2_SUPER_MAGIC: ::c_int = 0x0000ef53;
-pub const EXT3_SUPER_MAGIC: ::c_int = 0x0000ef53;
-pub const EXT4_SUPER_MAGIC: ::c_int = 0x0000ef53;
-pub const HPFS_SUPER_MAGIC: ::c_int = 0xf995e849;
-pub const HUGETLBFS_MAGIC: ::c_int = 0x958458f6;
-pub const ISOFS_SUPER_MAGIC: ::c_int = 0x00009660;
-pub const JFFS2_SUPER_MAGIC: ::c_int = 0x000072b6;
-pub const MINIX_SUPER_MAGIC: ::c_int = 0x0000137f;
-pub const MINIX_SUPER_MAGIC2: ::c_int = 0x0000138f;
-pub const MINIX2_SUPER_MAGIC: ::c_int = 0x00002468;
-pub const MINIX2_SUPER_MAGIC2: ::c_int = 0x00002478;
-pub const MSDOS_SUPER_MAGIC: ::c_int = 0x00004d44;
-pub const NCP_SUPER_MAGIC: ::c_int = 0x0000564c;
-pub const NFS_SUPER_MAGIC: ::c_int = 0x00006969;
-pub const OPENPROM_SUPER_MAGIC: ::c_int = 0x00009fa1;
-pub const PROC_SUPER_MAGIC: ::c_int = 0x00009fa0;
-pub const QNX4_SUPER_MAGIC: ::c_int = 0x0000002f;
-pub const REISERFS_SUPER_MAGIC: ::c_int = 0x52654973;
-pub const SMB_SUPER_MAGIC: ::c_int = 0x0000517b;
-pub const TMPFS_MAGIC: ::c_int = 0x01021994;
-pub const USBDEVICE_SUPER_MAGIC: ::c_int = 0x00009fa2;
-
-pub const VEOF: usize = 4;
-pub const VEOL: usize = 11;
-pub const VEOL2: usize = 16;
-pub const VMIN: usize = 6;
-pub const IEXTEN: ::tcflag_t = 0x00008000;
-pub const TOSTOP: ::tcflag_t = 0x00000100;
-pub const FLUSHO: ::tcflag_t = 0x00001000;
-
-pub const CPU_SETSIZE: ::c_int = 0x400;
-
-pub const EXTPROC: ::tcflag_t = 0x00010000;
-
-pub const QFMT_VFS_V1: ::c_int = 4;
-
-pub const PTRACE_TRACEME: ::c_uint = 0;
-pub const PTRACE_PEEKTEXT: ::c_uint = 1;
-pub const PTRACE_PEEKDATA: ::c_uint = 2;
-pub const PTRACE_PEEKUSER: ::c_uint = 3;
-pub const PTRACE_POKETEXT: ::c_uint = 4;
-pub const PTRACE_POKEDATA: ::c_uint = 5;
-pub const PTRACE_POKEUSER: ::c_uint = 6;
-pub const PTRACE_CONT: ::c_uint = 7;
-pub const PTRACE_KILL: ::c_uint = 8;
-pub const PTRACE_SINGLESTEP: ::c_uint = 9;
-pub const PTRACE_GETREGS: ::c_uint = 12;
-pub const PTRACE_SETREGS: ::c_uint = 13;
-pub const PTRACE_GETFPREGS: ::c_uint = 14;
-pub const PTRACE_SETFPREGS: ::c_uint = 15;
-pub const PTRACE_ATTACH: ::c_uint = 16;
-pub const PTRACE_DETACH: ::c_uint = 17;
-pub const PTRACE_SYSCALL: ::c_uint = 24;
-pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200;
-pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201;
-pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202;
-pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203;
-pub const PTRACE_GETREGSET: ::c_uint = 0x4204;
-pub const PTRACE_SETREGSET: ::c_uint = 0x4205;
-pub const PTRACE_SEIZE: ::c_uint = 0x4206;
-pub const PTRACE_INTERRUPT: ::c_uint = 0x4207;
-pub const PTRACE_LISTEN: ::c_uint = 0x4208;
-pub const PTRACE_PEEKSIGINFO: ::c_uint = 0x4209;
-
-pub const MADV_DODUMP: ::c_int = 17;
-pub const MADV_DONTDUMP: ::c_int = 16;
-
-pub const EPOLLWAKEUP: ::c_int = 0x20000000;
-
-pub const MADV_HUGEPAGE: ::c_int = 14;
-pub const MADV_NOHUGEPAGE: ::c_int = 15;
-pub const MAP_HUGETLB: ::c_int = 0x040000;
-
-pub const EFD_NONBLOCK: ::c_int = 0x800;
-
-pub const F_GETLK: ::c_int = 5;
-pub const F_GETOWN: ::c_int = 9;
-pub const F_SETOWN: ::c_int = 8;
-pub const F_SETLK: ::c_int = 6;
-pub const F_SETLKW: ::c_int = 7;
-
-pub const SEEK_DATA: ::c_int = 3;
-pub const SEEK_HOLE: ::c_int = 4;
-
-pub const SFD_NONBLOCK: ::c_int = 0x0800;
-
-pub const TCSANOW: ::c_int = 0;
-pub const TCSADRAIN: ::c_int = 1;
-pub const TCSAFLUSH: ::c_int = 2;
-
-pub const TCGETS: ::c_ulong = 0x5401;
-pub const TCSETS: ::c_ulong = 0x5402;
-pub const TCSETSW: ::c_ulong = 0x5403;
-pub const TCSETSF: ::c_ulong = 0x5404;
-pub const TCGETA: ::c_ulong = 0x5405;
-pub const TCSETA: ::c_ulong = 0x5406;
-pub const TCSETAW: ::c_ulong = 0x5407;
-pub const TCSETAF: ::c_ulong = 0x5408;
-pub const TCSBRK: ::c_ulong = 0x5409;
-pub const TCXONC: ::c_ulong = 0x540A;
-pub const TCFLSH: ::c_ulong = 0x540B;
-pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
-pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
-pub const TIOCINQ: ::c_ulong = 0x541B;
-pub const TIOCLINUX: ::c_ulong = 0x541C;
-pub const TIOCGSERIAL: ::c_ulong = 0x541E;
-pub const TIOCEXCL: ::c_ulong = 0x540C;
-pub const TIOCNXCL: ::c_ulong = 0x540D;
-pub const TIOCSCTTY: ::c_ulong = 0x540E;
-pub const TIOCGPGRP: ::c_ulong = 0x540F;
-pub const TIOCSPGRP: ::c_ulong = 0x5410;
-pub const TIOCOUTQ: ::c_ulong = 0x5411;
-pub const TIOCSTI: ::c_ulong = 0x5412;
-pub const TIOCGWINSZ: ::c_ulong = 0x5413;
-pub const TIOCSWINSZ: ::c_ulong = 0x5414;
-pub const TIOCMGET: ::c_ulong = 0x5415;
-pub const TIOCMBIS: ::c_ulong = 0x5416;
-pub const TIOCMBIC: ::c_ulong = 0x5417;
-pub const TIOCMSET: ::c_ulong = 0x5418;
-pub const FIONREAD: ::c_ulong = 0x541B;
-pub const TIOCCONS: ::c_ulong = 0x541D;
-
-pub const RTLD_DEEPBIND: ::c_int = 0x8;
-pub const RTLD_GLOBAL: ::c_int = 0x100;
-pub const RTLD_NOLOAD: ::c_int = 0x4;
-
-pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
-pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
-pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
-pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
-pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
-
-pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
-pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
-pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
-pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
-pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
-pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
-pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
-pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
-
-pub const SYS_gettid: ::c_long = 236;
-pub const SYS_perf_event_open: ::c_long = 331;
-
-#[link(name = "util")]
-extern {
-    pub fn sysctl(name: *mut ::c_int,
-                  namelen: ::c_int,
-                  oldp: *mut ::c_void,
-                  oldlenp: *mut ::size_t,
-                  newp: *mut ::c_void,
-                  newlen: ::size_t)
-                  -> ::c_int;
-    pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
-    pub fn backtrace(buf: *mut *mut ::c_void,
-                     sz: ::c_int) -> ::c_int;
-    pub fn glob64(pattern: *const ::c_char,
-                  flags: ::c_int,
-                  errfunc: ::dox::Option<extern fn(epath: *const ::c_char,
-                                                   errno: ::c_int)
-                                                   -> ::c_int>,
-                  pglob: *mut glob64_t) -> ::c_int;
-    pub fn globfree64(pglob: *mut glob64_t);
-    pub fn ptrace(request: ::c_uint, ...) -> ::c_long;
-    pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t,
-                                       cpusetsize: ::size_t,
-                                       cpuset: *mut ::cpu_set_t) -> ::c_int;
-    pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t,
-                                       cpusetsize: ::size_t,
-                                       cpuset: *const ::cpu_set_t) -> ::c_int;
-    pub fn getpriority(which: ::__priority_which_t, who: ::id_t) -> ::c_int;
-    pub fn setpriority(which: ::__priority_which_t, who: ::id_t,
-                                       prio: ::c_int) -> ::c_int;
-    pub fn pthread_getaffinity_np(thread: ::pthread_t,
-                                  cpusetsize: ::size_t,
-                                  cpuset: *mut ::cpu_set_t) -> ::c_int;
-    pub fn pthread_setaffinity_np(thread: ::pthread_t,
-                                  cpusetsize: ::size_t,
-                                  cpuset: *const ::cpu_set_t) -> ::c_int;
-    pub fn sched_getcpu() -> ::c_int;
-    pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int;
-    pub fn setcontext(ucp: *const ucontext_t) -> ::c_int;
-    pub fn makecontext(ucp: *mut ucontext_t,
-                       func:  extern fn (),
-                       argc: ::c_int, ...);
-    pub fn swapcontext(uocp: *mut ucontext_t,
-                       ucp: *const ucontext_t) -> ::c_int;
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/notbsd/mod.rs
+++ /dev/null
@@ -1,1026 +0,0 @@
-use dox::mem;
-
-pub type sa_family_t = u16;
-pub type pthread_key_t = ::c_uint;
-pub type speed_t = ::c_uint;
-pub type tcflag_t = ::c_uint;
-pub type loff_t = ::c_longlong;
-pub type clockid_t = ::c_int;
-pub type key_t = ::c_int;
-pub type id_t = ::c_uint;
-
-pub enum timezone {}
-
-s! {
-    pub struct sockaddr {
-        pub sa_family: sa_family_t,
-        pub sa_data: [::c_char; 14],
-    }
-
-    pub struct sockaddr_in {
-        pub sin_family: sa_family_t,
-        pub sin_port: ::in_port_t,
-        pub sin_addr: ::in_addr,
-        pub sin_zero: [u8; 8],
-    }
-
-    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_un {
-        pub sun_family: sa_family_t,
-        pub sun_path: [::c_char; 108]
-    }
-
-    pub struct sockaddr_storage {
-        pub ss_family: sa_family_t,
-        __ss_align: ::size_t,
-        #[cfg(target_pointer_width = "32")]
-        __ss_pad2: [u8; 128 - 2 * 4],
-        #[cfg(target_pointer_width = "64")]
-        __ss_pad2: [u8; 128 - 2 * 8],
-    }
-
-    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,
-
-        #[cfg(any(target_os = "linux",
-                  target_os = "emscripten",
-                  target_os = "fuchsia"))]
-        pub ai_addr: *mut ::sockaddr,
-
-        pub ai_canonname: *mut c_char,
-
-        #[cfg(target_os = "android")]
-        pub ai_addr: *mut ::sockaddr,
-
-        pub ai_next: *mut addrinfo,
-    }
-
-    pub struct sockaddr_nl {
-        pub nl_family: ::sa_family_t,
-        nl_pad: ::c_ushort,
-        pub nl_pid: u32,
-        pub nl_groups: u32
-    }
-
-    pub struct sockaddr_ll {
-        pub sll_family: ::c_ushort,
-        pub sll_protocol: ::c_ushort,
-        pub sll_ifindex: ::c_int,
-        pub sll_hatype: ::c_ushort,
-        pub sll_pkttype: ::c_uchar,
-        pub sll_halen: ::c_uchar,
-        pub sll_addr: [::c_uchar; 8]
-    }
-
-    pub struct fd_set {
-        fds_bits: [::c_ulong; FD_SETSIZE / ULONG_SIZE],
-    }
-
-    pub struct tm {
-        pub tm_sec: ::c_int,
-        pub tm_min: ::c_int,
-        pub tm_hour: ::c_int,
-        pub tm_mday: ::c_int,
-        pub tm_mon: ::c_int,
-        pub tm_year: ::c_int,
-        pub tm_wday: ::c_int,
-        pub tm_yday: ::c_int,
-        pub tm_isdst: ::c_int,
-        pub tm_gmtoff: ::c_long,
-        pub tm_zone: *const ::c_char,
-    }
-
-    pub struct sched_param {
-        pub sched_priority: ::c_int,
-        #[cfg(any(target_env = "musl"))]
-        pub sched_ss_low_priority: ::c_int,
-        #[cfg(any(target_env = "musl"))]
-        pub sched_ss_repl_period: ::timespec,
-        #[cfg(any(target_env = "musl"))]
-        pub sched_ss_init_budget: ::timespec,
-        #[cfg(any(target_env = "musl"))]
-        pub sched_ss_max_repl: ::c_int,
-    }
-
-    pub struct Dl_info {
-        pub dli_fname: *const ::c_char,
-        pub dli_fbase: *mut ::c_void,
-        pub dli_sname: *const ::c_char,
-        pub dli_saddr: *mut ::c_void,
-    }
-
-    #[cfg_attr(any(all(target_arch = "x86",
-                       not(target_env = "musl"),
-                       not(target_os = "android")),
-                   target_arch = "x86_64"),
-               repr(packed))]
-    pub struct epoll_event {
-        pub events: ::uint32_t,
-        pub u64: ::uint64_t,
-    }
-
-    pub struct utsname {
-        pub sysname: [::c_char; 65],
-        pub nodename: [::c_char; 65],
-        pub release: [::c_char; 65],
-        pub version: [::c_char; 65],
-        pub machine: [::c_char; 65],
-        pub domainname: [::c_char; 65]
-    }
-
-    pub struct lconv {
-        pub decimal_point: *mut ::c_char,
-        pub thousands_sep: *mut ::c_char,
-        pub grouping: *mut ::c_char,
-        pub int_curr_symbol: *mut ::c_char,
-        pub currency_symbol: *mut ::c_char,
-        pub mon_decimal_point: *mut ::c_char,
-        pub mon_thousands_sep: *mut ::c_char,
-        pub mon_grouping: *mut ::c_char,
-        pub positive_sign: *mut ::c_char,
-        pub negative_sign: *mut ::c_char,
-        pub int_frac_digits: ::c_char,
-        pub frac_digits: ::c_char,
-        pub p_cs_precedes: ::c_char,
-        pub p_sep_by_space: ::c_char,
-        pub n_cs_precedes: ::c_char,
-        pub n_sep_by_space: ::c_char,
-        pub p_sign_posn: ::c_char,
-        pub n_sign_posn: ::c_char,
-        pub int_p_cs_precedes: ::c_char,
-        pub int_p_sep_by_space: ::c_char,
-        pub int_n_cs_precedes: ::c_char,
-        pub int_n_sep_by_space: ::c_char,
-        pub int_p_sign_posn: ::c_char,
-        pub int_n_sign_posn: ::c_char,
-    }
-
-    pub struct sigevent {
-        pub sigev_value: ::sigval,
-        pub sigev_signo: ::c_int,
-        pub sigev_notify: ::c_int,
-        // Actually a union.  We only expose sigev_notify_thread_id because it's
-        // the most useful member
-        pub sigev_notify_thread_id: ::c_int,
-        #[cfg(target_pointer_width = "64")]
-        __unused1: [::c_int; 11],
-        #[cfg(target_pointer_width = "32")]
-        __unused1: [::c_int; 12]
-    }
-}
-
-// intentionally not public, only used for fd_set
-cfg_if! {
-    if #[cfg(target_pointer_width = "32")] {
-        const ULONG_SIZE: usize = 32;
-    } else if #[cfg(target_pointer_width = "64")] {
-        const ULONG_SIZE: usize = 64;
-    } else {
-        // Unknown target_pointer_width
-    }
-}
-
-pub const EXIT_FAILURE: ::c_int = 1;
-pub const EXIT_SUCCESS: ::c_int = 0;
-pub const RAND_MAX: ::c_int = 2147483647;
-pub const EOF: ::c_int = -1;
-pub const SEEK_SET: ::c_int = 0;
-pub const SEEK_CUR: ::c_int = 1;
-pub const SEEK_END: ::c_int = 2;
-pub const _IOFBF: ::c_int = 0;
-pub const _IONBF: ::c_int = 2;
-pub const _IOLBF: ::c_int = 1;
-
-pub const F_DUPFD: ::c_int = 0;
-pub const F_GETFD: ::c_int = 1;
-pub const F_SETFD: ::c_int = 2;
-pub const F_GETFL: ::c_int = 3;
-pub const F_SETFL: ::c_int = 4;
-
-// Linux-specific fcntls
-pub const F_SETLEASE: ::c_int = 1024;
-pub const F_GETLEASE: ::c_int = 1025;
-pub const F_NOTIFY: ::c_int = 1026;
-pub const F_DUPFD_CLOEXEC: ::c_int = 1030;
-pub const F_SETPIPE_SZ: ::c_int = 1031;
-pub const F_GETPIPE_SZ: ::c_int = 1032;
-
-// TODO(#235): Include file sealing fcntls once we have a way to verify them.
-
-pub const SIGTRAP: ::c_int = 5;
-
-pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0;
-pub const PTHREAD_CREATE_DETACHED: ::c_int = 1;
-
-pub const CLOCK_REALTIME: clockid_t = 0;
-pub const CLOCK_MONOTONIC: clockid_t = 1;
-pub const CLOCK_PROCESS_CPUTIME_ID: clockid_t = 2;
-pub const CLOCK_THREAD_CPUTIME_ID: clockid_t = 3;
-pub const CLOCK_MONOTONIC_RAW: clockid_t = 4;
-pub const CLOCK_REALTIME_COARSE: clockid_t = 5;
-pub const CLOCK_MONOTONIC_COARSE: clockid_t = 6;
-pub const CLOCK_BOOTTIME: clockid_t = 7;
-pub const CLOCK_REALTIME_ALARM: clockid_t = 8;
-pub const CLOCK_BOOTTIME_ALARM: clockid_t = 9;
-// TODO(#247) Someday our Travis shall have glibc 2.21 (released in Sep
-// 2014.) See also musl/mod.rs
-// pub const CLOCK_SGI_CYCLE: clockid_t = 10;
-// pub const CLOCK_TAI: clockid_t = 11;
-pub const TIMER_ABSTIME: ::c_int = 1;
-
-pub const RLIMIT_CPU: ::c_int = 0;
-pub const RLIMIT_FSIZE: ::c_int = 1;
-pub const RLIMIT_DATA: ::c_int = 2;
-pub const RLIMIT_STACK: ::c_int = 3;
-pub const RLIMIT_CORE: ::c_int = 4;
-pub const RLIMIT_LOCKS: ::c_int = 10;
-pub const RLIMIT_SIGPENDING: ::c_int = 11;
-pub const RLIMIT_MSGQUEUE: ::c_int = 12;
-pub const RLIMIT_NICE: ::c_int = 13;
-pub const RLIMIT_RTPRIO: ::c_int = 14;
-
-pub const RUSAGE_SELF: ::c_int = 0;
-
-pub const O_RDONLY: ::c_int = 0;
-pub const O_WRONLY: ::c_int = 1;
-pub const O_RDWR: ::c_int = 2;
-pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY;
-
-pub const SOCK_CLOEXEC: ::c_int = O_CLOEXEC;
-
-pub const S_IFIFO: ::mode_t = 4096;
-pub const S_IFCHR: ::mode_t = 8192;
-pub const S_IFBLK: ::mode_t = 24576;
-pub const S_IFDIR: ::mode_t = 16384;
-pub const S_IFREG: ::mode_t = 32768;
-pub const S_IFLNK: ::mode_t = 40960;
-pub const S_IFSOCK: ::mode_t = 49152;
-pub const S_IFMT: ::mode_t = 61440;
-pub const S_IRWXU: ::mode_t = 448;
-pub const S_IXUSR: ::mode_t = 64;
-pub const S_IWUSR: ::mode_t = 128;
-pub const S_IRUSR: ::mode_t = 256;
-pub const S_IRWXG: ::mode_t = 56;
-pub const S_IXGRP: ::mode_t = 8;
-pub const S_IWGRP: ::mode_t = 16;
-pub const S_IRGRP: ::mode_t = 32;
-pub const S_IRWXO: ::mode_t = 7;
-pub const S_IXOTH: ::mode_t = 1;
-pub const S_IWOTH: ::mode_t = 2;
-pub const S_IROTH: ::mode_t = 4;
-pub const F_OK: ::c_int = 0;
-pub const R_OK: ::c_int = 4;
-pub const W_OK: ::c_int = 2;
-pub const X_OK: ::c_int = 1;
-pub const STDIN_FILENO: ::c_int = 0;
-pub const STDOUT_FILENO: ::c_int = 1;
-pub const STDERR_FILENO: ::c_int = 2;
-pub const SIGHUP: ::c_int = 1;
-pub const SIGINT: ::c_int = 2;
-pub const SIGQUIT: ::c_int = 3;
-pub const SIGILL: ::c_int = 4;
-pub const SIGABRT: ::c_int = 6;
-pub const SIGFPE: ::c_int = 8;
-pub const SIGKILL: ::c_int = 9;
-pub const SIGSEGV: ::c_int = 11;
-pub const SIGPIPE: ::c_int = 13;
-pub const SIGALRM: ::c_int = 14;
-pub const SIGTERM: ::c_int = 15;
-
-pub const PROT_NONE: ::c_int = 0;
-pub const PROT_READ: ::c_int = 1;
-pub const PROT_WRITE: ::c_int = 2;
-pub const PROT_EXEC: ::c_int = 4;
-
-pub const LC_CTYPE: ::c_int = 0;
-pub const LC_NUMERIC: ::c_int = 1;
-pub const LC_TIME: ::c_int = 2;
-pub const LC_COLLATE: ::c_int = 3;
-pub const LC_MONETARY: ::c_int = 4;
-pub const LC_MESSAGES: ::c_int = 5;
-pub const LC_ALL: ::c_int = 6;
-pub const LC_CTYPE_MASK: ::c_int = (1 << LC_CTYPE);
-pub const LC_NUMERIC_MASK: ::c_int = (1 << LC_NUMERIC);
-pub const LC_TIME_MASK: ::c_int = (1 << LC_TIME);
-pub const LC_COLLATE_MASK: ::c_int = (1 << LC_COLLATE);
-pub const LC_MONETARY_MASK: ::c_int = (1 << LC_MONETARY);
-pub const LC_MESSAGES_MASK: ::c_int = (1 << LC_MESSAGES);
-// LC_ALL_MASK defined per platform
-
-pub const MAP_FILE: ::c_int = 0x0000;
-pub const MAP_SHARED: ::c_int = 0x0001;
-pub const MAP_PRIVATE: ::c_int = 0x0002;
-pub const MAP_FIXED: ::c_int = 0x0010;
-
-pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
-
-// MS_ flags for msync(2)
-pub const MS_ASYNC: ::c_int = 0x0001;
-pub const MS_INVALIDATE: ::c_int = 0x0002;
-pub const MS_SYNC: ::c_int = 0x0004;
-
-// MS_ flags for mount(2)
-pub const MS_RDONLY: ::c_ulong = 0x01;
-pub const MS_NOSUID: ::c_ulong = 0x02;
-pub const MS_NODEV: ::c_ulong = 0x04;
-pub const MS_NOEXEC: ::c_ulong = 0x08;
-pub const MS_SYNCHRONOUS: ::c_ulong = 0x10;
-pub const MS_REMOUNT: ::c_ulong = 0x20;
-pub const MS_MANDLOCK: ::c_ulong = 0x40;
-pub const MS_DIRSYNC: ::c_ulong = 0x80;
-pub const MS_NOATIME: ::c_ulong = 0x0400;
-pub const MS_NODIRATIME: ::c_ulong = 0x0800;
-pub const MS_BIND: ::c_ulong = 0x1000;
-pub const MS_MOVE: ::c_ulong = 0x2000;
-pub const MS_REC: ::c_ulong = 0x4000;
-pub const MS_SILENT: ::c_ulong = 0x8000;
-pub const MS_POSIXACL: ::c_ulong = 0x010000;
-pub const MS_UNBINDABLE: ::c_ulong = 0x020000;
-pub const MS_PRIVATE: ::c_ulong = 0x040000;
-pub const MS_SLAVE: ::c_ulong = 0x080000;
-pub const MS_SHARED: ::c_ulong = 0x100000;
-pub const MS_RELATIME: ::c_ulong = 0x200000;
-pub const MS_KERNMOUNT: ::c_ulong = 0x400000;
-pub const MS_I_VERSION: ::c_ulong = 0x800000;
-pub const MS_STRICTATIME: ::c_ulong = 0x1000000;
-pub const MS_ACTIVE: ::c_ulong = 0x40000000;
-pub const MS_NOUSER: ::c_ulong = 0x80000000;
-pub const MS_MGC_VAL: ::c_ulong = 0xc0ed0000;
-pub const MS_MGC_MSK: ::c_ulong = 0xffff0000;
-pub const MS_RMT_MASK: ::c_ulong = 0x800051;
-
-pub const EPERM: ::c_int = 1;
-pub const ENOENT: ::c_int = 2;
-pub const ESRCH: ::c_int = 3;
-pub const EINTR: ::c_int = 4;
-pub const EIO: ::c_int = 5;
-pub const ENXIO: ::c_int = 6;
-pub const E2BIG: ::c_int = 7;
-pub const ENOEXEC: ::c_int = 8;
-pub const EBADF: ::c_int = 9;
-pub const ECHILD: ::c_int = 10;
-pub const EAGAIN: ::c_int = 11;
-pub const ENOMEM: ::c_int = 12;
-pub const EACCES: ::c_int = 13;
-pub const EFAULT: ::c_int = 14;
-pub const ENOTBLK: ::c_int = 15;
-pub const EBUSY: ::c_int = 16;
-pub const EEXIST: ::c_int = 17;
-pub const EXDEV: ::c_int = 18;
-pub const ENODEV: ::c_int = 19;
-pub const ENOTDIR: ::c_int = 20;
-pub const EISDIR: ::c_int = 21;
-pub const EINVAL: ::c_int = 22;
-pub const ENFILE: ::c_int = 23;
-pub const EMFILE: ::c_int = 24;
-pub const ENOTTY: ::c_int = 25;
-pub const ETXTBSY: ::c_int = 26;
-pub const EFBIG: ::c_int = 27;
-pub const ENOSPC: ::c_int = 28;
-pub const ESPIPE: ::c_int = 29;
-pub const EROFS: ::c_int = 30;
-pub const EMLINK: ::c_int = 31;
-pub const EPIPE: ::c_int = 32;
-pub const EDOM: ::c_int = 33;
-pub const ERANGE: ::c_int = 34;
-pub const EWOULDBLOCK: ::c_int = EAGAIN;
-
-pub const SCM_RIGHTS: ::c_int = 0x01;
-pub const SCM_CREDENTIALS: ::c_int = 0x02;
-
-pub const IPPROTO_RAW: ::c_int = 255;
-
-pub const PROT_GROWSDOWN: ::c_int = 0x1000000;
-pub const PROT_GROWSUP: ::c_int = 0x2000000;
-
-pub const MAP_TYPE: ::c_int = 0x000f;
-
-pub const MADV_NORMAL: ::c_int = 0;
-pub const MADV_RANDOM: ::c_int = 1;
-pub const MADV_SEQUENTIAL: ::c_int = 2;
-pub const MADV_WILLNEED: ::c_int = 3;
-pub const MADV_DONTNEED: ::c_int = 4;
-pub const MADV_REMOVE: ::c_int = 9;
-pub const MADV_DONTFORK: ::c_int = 10;
-pub const MADV_DOFORK: ::c_int = 11;
-pub const MADV_MERGEABLE: ::c_int = 12;
-pub const MADV_UNMERGEABLE: ::c_int = 13;
-pub const MADV_HWPOISON: ::c_int = 100;
-
-pub const IFF_UP: ::c_int = 0x1;
-pub const IFF_BROADCAST: ::c_int = 0x2;
-pub const IFF_DEBUG: ::c_int = 0x4;
-pub const IFF_LOOPBACK: ::c_int = 0x8;
-pub const IFF_POINTOPOINT: ::c_int = 0x10;
-pub const IFF_NOTRAILERS: ::c_int = 0x20;
-pub const IFF_RUNNING: ::c_int = 0x40;
-pub const IFF_NOARP: ::c_int = 0x80;
-pub const IFF_PROMISC: ::c_int = 0x100;
-pub const IFF_ALLMULTI: ::c_int = 0x200;
-pub const IFF_MASTER: ::c_int = 0x400;
-pub const IFF_SLAVE: ::c_int = 0x800;
-pub const IFF_MULTICAST: ::c_int = 0x1000;
-pub const IFF_PORTSEL: ::c_int = 0x2000;
-pub const IFF_AUTOMEDIA: ::c_int = 0x4000;
-pub const IFF_DYNAMIC: ::c_int = 0x8000;
-
-pub const SOL_IP: ::c_int = 0;
-pub const SOL_TCP: ::c_int = 6;
-pub const SOL_IPV6: ::c_int = 41;
-pub const SOL_ICMPV6: ::c_int = 58;
-pub const SOL_RAW: ::c_int = 255;
-pub const SOL_DECNET: ::c_int = 261;
-pub const SOL_X25: ::c_int = 262;
-pub const SOL_PACKET: ::c_int = 263;
-pub const SOL_ATM: ::c_int = 264;
-pub const SOL_AAL: ::c_int = 265;
-pub const SOL_IRDA: ::c_int = 266;
-pub const SOL_NETBEUI: ::c_int = 267;
-pub const SOL_LLC: ::c_int = 268;
-pub const SOL_DCCP: ::c_int = 269;
-pub const SOL_NETLINK: ::c_int = 270;
-pub const SOL_TIPC: ::c_int = 271;
-
-pub const AF_UNSPEC: ::c_int = 0;
-pub const AF_UNIX: ::c_int = 1;
-pub const AF_LOCAL: ::c_int = 1;
-pub const AF_INET: ::c_int = 2;
-pub const AF_AX25: ::c_int = 3;
-pub const AF_IPX: ::c_int = 4;
-pub const AF_APPLETALK: ::c_int = 5;
-pub const AF_NETROM: ::c_int = 6;
-pub const AF_BRIDGE: ::c_int = 7;
-pub const AF_ATMPVC: ::c_int = 8;
-pub const AF_X25: ::c_int = 9;
-pub const AF_INET6: ::c_int = 10;
-pub const AF_ROSE: ::c_int = 11;
-pub const AF_DECnet: ::c_int = 12;
-pub const AF_NETBEUI: ::c_int = 13;
-pub const AF_SECURITY: ::c_int = 14;
-pub const AF_KEY: ::c_int = 15;
-pub const AF_NETLINK: ::c_int = 16;
-pub const AF_ROUTE: ::c_int = AF_NETLINK;
-pub const AF_PACKET: ::c_int = 17;
-pub const AF_ASH: ::c_int = 18;
-pub const AF_ECONET: ::c_int = 19;
-pub const AF_ATMSVC: ::c_int = 20;
-pub const AF_RDS: ::c_int = 21;
-pub const AF_SNA: ::c_int = 22;
-pub const AF_IRDA: ::c_int = 23;
-pub const AF_PPPOX: ::c_int = 24;
-pub const AF_WANPIPE: ::c_int = 25;
-pub const AF_LLC: ::c_int = 26;
-pub const AF_CAN: ::c_int = 29;
-pub const AF_TIPC: ::c_int = 30;
-pub const AF_BLUETOOTH: ::c_int = 31;
-pub const AF_IUCV: ::c_int = 32;
-pub const AF_RXRPC: ::c_int = 33;
-pub const AF_ISDN: ::c_int = 34;
-pub const AF_PHONET: ::c_int = 35;
-pub const AF_IEEE802154: ::c_int = 36;
-pub const AF_CAIF: ::c_int = 37;
-pub const AF_ALG: ::c_int = 38;
-
-pub const PF_UNSPEC: ::c_int = AF_UNSPEC;
-pub const PF_UNIX: ::c_int = AF_UNIX;
-pub const PF_LOCAL: ::c_int = AF_LOCAL;
-pub const PF_INET: ::c_int = AF_INET;
-pub const PF_AX25: ::c_int = AF_AX25;
-pub const PF_IPX: ::c_int = AF_IPX;
-pub const PF_APPLETALK: ::c_int = AF_APPLETALK;
-pub const PF_NETROM: ::c_int = AF_NETROM;
-pub const PF_BRIDGE: ::c_int = AF_BRIDGE;
-pub const PF_ATMPVC: ::c_int = AF_ATMPVC;
-pub const PF_X25: ::c_int = AF_X25;
-pub const PF_INET6: ::c_int = AF_INET6;
-pub const PF_ROSE: ::c_int = AF_ROSE;
-pub const PF_DECnet: ::c_int = AF_DECnet;
-pub const PF_NETBEUI: ::c_int = AF_NETBEUI;
-pub const PF_SECURITY: ::c_int = AF_SECURITY;
-pub const PF_KEY: ::c_int = AF_KEY;
-pub const PF_NETLINK: ::c_int = AF_NETLINK;
-pub const PF_ROUTE: ::c_int = AF_ROUTE;
-pub const PF_PACKET: ::c_int = AF_PACKET;
-pub const PF_ASH: ::c_int = AF_ASH;
-pub const PF_ECONET: ::c_int = AF_ECONET;
-pub const PF_ATMSVC: ::c_int = AF_ATMSVC;
-pub const PF_RDS: ::c_int = AF_RDS;
-pub const PF_SNA: ::c_int = AF_SNA;
-pub const PF_IRDA: ::c_int = AF_IRDA;
-pub const PF_PPPOX: ::c_int = AF_PPPOX;
-pub const PF_WANPIPE: ::c_int = AF_WANPIPE;
-pub const PF_LLC: ::c_int = AF_LLC;
-pub const PF_CAN: ::c_int = AF_CAN;
-pub const PF_TIPC: ::c_int = AF_TIPC;
-pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
-pub const PF_IUCV: ::c_int = AF_IUCV;
-pub const PF_RXRPC: ::c_int = AF_RXRPC;
-pub const PF_ISDN: ::c_int = AF_ISDN;
-pub const PF_PHONET: ::c_int = AF_PHONET;
-pub const PF_IEEE802154: ::c_int = AF_IEEE802154;
-pub const PF_CAIF: ::c_int = AF_CAIF;
-pub const PF_ALG: ::c_int = AF_ALG;
-
-pub const SOMAXCONN: ::c_int = 128;
-
-pub const MSG_OOB: ::c_int = 1;
-pub const MSG_PEEK: ::c_int = 2;
-pub const MSG_DONTROUTE: ::c_int = 4;
-pub const MSG_CTRUNC: ::c_int = 8;
-pub const MSG_TRUNC: ::c_int = 0x20;
-pub const MSG_DONTWAIT: ::c_int = 0x40;
-pub const MSG_EOR: ::c_int = 0x80;
-pub const MSG_WAITALL: ::c_int = 0x100;
-pub const MSG_FIN: ::c_int = 0x200;
-pub const MSG_SYN: ::c_int = 0x400;
-pub const MSG_CONFIRM: ::c_int = 0x800;
-pub const MSG_RST: ::c_int = 0x1000;
-pub const MSG_ERRQUEUE: ::c_int = 0x2000;
-pub const MSG_NOSIGNAL: ::c_int = 0x4000;
-pub const MSG_MORE: ::c_int = 0x8000;
-pub const MSG_WAITFORONE: ::c_int = 0x10000;
-pub const MSG_FASTOPEN: ::c_int = 0x20000000;
-pub const MSG_CMSG_CLOEXEC: ::c_int = 0x40000000;
-
-pub const SOCK_RAW: ::c_int = 3;
-pub const IPPROTO_ICMP: ::c_int = 1;
-pub const IPPROTO_ICMPV6: ::c_int = 58;
-pub const IPPROTO_TCP: ::c_int = 6;
-pub const IPPROTO_IP: ::c_int = 0;
-pub const IPPROTO_IPV6: ::c_int = 41;
-pub const IP_MULTICAST_TTL: ::c_int = 33;
-pub const IP_MULTICAST_LOOP: ::c_int = 34;
-pub const IP_TTL: ::c_int = 2;
-pub const IP_HDRINCL: ::c_int = 3;
-pub const IP_ADD_MEMBERSHIP: ::c_int = 35;
-pub const IP_DROP_MEMBERSHIP: ::c_int = 36;
-pub const IP_TRANSPARENT: ::c_int = 19;
-pub const IPV6_ADD_MEMBERSHIP: ::c_int = 20;
-pub const IPV6_DROP_MEMBERSHIP: ::c_int = 21;
-
-pub const TCP_NODELAY: ::c_int = 1;
-pub const TCP_MAXSEG: ::c_int = 2;
-pub const TCP_CORK: ::c_int = 3;
-pub const TCP_KEEPIDLE: ::c_int = 4;
-pub const TCP_KEEPINTVL: ::c_int = 5;
-pub const TCP_KEEPCNT: ::c_int = 6;
-pub const TCP_SYNCNT: ::c_int = 7;
-pub const TCP_LINGER2: ::c_int = 8;
-pub const TCP_DEFER_ACCEPT: ::c_int = 9;
-pub const TCP_WINDOW_CLAMP: ::c_int = 10;
-pub const TCP_INFO: ::c_int = 11;
-pub const TCP_QUICKACK: ::c_int = 12;
-pub const TCP_CONGESTION: ::c_int = 13;
-
-pub const IPV6_MULTICAST_LOOP: ::c_int = 19;
-pub const IPV6_V6ONLY: ::c_int = 26;
-
-pub const SO_DEBUG: ::c_int = 1;
-
-pub const SHUT_RD: ::c_int = 0;
-pub const SHUT_WR: ::c_int = 1;
-pub const SHUT_RDWR: ::c_int = 2;
-
-pub const LOCK_SH: ::c_int = 1;
-pub const LOCK_EX: ::c_int = 2;
-pub const LOCK_NB: ::c_int = 4;
-pub const LOCK_UN: ::c_int = 8;
-
-pub const SS_ONSTACK: ::c_int = 1;
-pub const SS_DISABLE: ::c_int = 2;
-
-pub const PATH_MAX: ::c_int = 4096;
-
-pub const FD_SETSIZE: usize = 1024;
-
-pub const EPOLLIN: ::c_int = 0x1;
-pub const EPOLLPRI: ::c_int = 0x2;
-pub const EPOLLOUT: ::c_int = 0x4;
-pub const EPOLLRDNORM: ::c_int = 0x40;
-pub const EPOLLRDBAND: ::c_int = 0x80;
-pub const EPOLLWRNORM: ::c_int = 0x100;
-pub const EPOLLWRBAND: ::c_int = 0x200;
-pub const EPOLLMSG: ::c_int = 0x400;
-pub const EPOLLERR: ::c_int = 0x8;
-pub const EPOLLHUP: ::c_int = 0x10;
-pub const EPOLLET: ::c_int = 0x80000000;
-
-pub const EPOLL_CTL_ADD: ::c_int = 1;
-pub const EPOLL_CTL_MOD: ::c_int = 3;
-pub const EPOLL_CTL_DEL: ::c_int = 2;
-
-pub const MNT_DETACH: ::c_int = 0x2;
-pub const MNT_EXPIRE: ::c_int = 0x4;
-
-pub const Q_GETFMT: ::c_int = 0x800004;
-pub const Q_GETINFO: ::c_int = 0x800005;
-pub const Q_SETINFO: ::c_int = 0x800006;
-pub const QIF_BLIMITS: ::uint32_t = 1;
-pub const QIF_SPACE: ::uint32_t = 2;
-pub const QIF_ILIMITS: ::uint32_t = 4;
-pub const QIF_INODES: ::uint32_t = 8;
-pub const QIF_BTIME: ::uint32_t = 16;
-pub const QIF_ITIME: ::uint32_t = 32;
-pub const QIF_LIMITS: ::uint32_t = 5;
-pub const QIF_USAGE: ::uint32_t = 10;
-pub const QIF_TIMES: ::uint32_t = 48;
-pub const QIF_ALL: ::uint32_t = 63;
-
-pub const MNT_FORCE: ::c_int = 0x1;
-
-pub const Q_SYNC: ::c_int = 0x800001;
-pub const Q_QUOTAON: ::c_int = 0x800002;
-pub const Q_QUOTAOFF: ::c_int = 0x800003;
-pub const Q_GETQUOTA: ::c_int = 0x800007;
-pub const Q_SETQUOTA: ::c_int = 0x800008;
-
-pub const TCIOFF: ::c_int = 2;
-pub const TCION: ::c_int = 3;
-pub const TCOOFF: ::c_int = 0;
-pub const TCOON: ::c_int = 1;
-pub const TCIFLUSH: ::c_int = 0;
-pub const TCOFLUSH: ::c_int = 1;
-pub const TCIOFLUSH: ::c_int = 2;
-pub const NL0: ::c_int  = 0x00000000;
-pub const NL1: ::c_int  = 0x00000100;
-pub const TAB0: ::c_int = 0x00000000;
-pub const CR0: ::c_int  = 0x00000000;
-pub const FF0: ::c_int  = 0x00000000;
-pub const BS0: ::c_int  = 0x00000000;
-pub const VT0: ::c_int  = 0x00000000;
-pub const VERASE: usize = 2;
-pub const VKILL: usize = 3;
-pub const VINTR: usize = 0;
-pub const VQUIT: usize = 1;
-pub const VLNEXT: usize = 15;
-pub const IGNBRK: ::tcflag_t = 0x00000001;
-pub const BRKINT: ::tcflag_t = 0x00000002;
-pub const IGNPAR: ::tcflag_t = 0x00000004;
-pub const PARMRK: ::tcflag_t = 0x00000008;
-pub const INPCK: ::tcflag_t = 0x00000010;
-pub const ISTRIP: ::tcflag_t = 0x00000020;
-pub const INLCR: ::tcflag_t = 0x00000040;
-pub const IGNCR: ::tcflag_t = 0x00000080;
-pub const ICRNL: ::tcflag_t = 0x00000100;
-pub const IXANY: ::tcflag_t = 0x00000800;
-pub const IMAXBEL: ::tcflag_t = 0x00002000;
-pub const IUTF8: ::tcflag_t = 0x00004000;
-pub const OPOST: ::tcflag_t = 0x1;
-pub const CS5: ::tcflag_t = 0x00000000;
-pub const CRTSCTS: ::tcflag_t = 0x80000000;
-pub const ECHO: ::tcflag_t = 0x00000008;
-
-pub const CLONE_VM: ::c_int = 0x100;
-pub const CLONE_FS: ::c_int = 0x200;
-pub const CLONE_FILES: ::c_int = 0x400;
-pub const CLONE_SIGHAND: ::c_int = 0x800;
-pub const CLONE_PTRACE: ::c_int = 0x2000;
-pub const CLONE_VFORK: ::c_int = 0x4000;
-pub const CLONE_PARENT: ::c_int = 0x8000;
-pub const CLONE_THREAD: ::c_int = 0x10000;
-pub const CLONE_NEWNS: ::c_int = 0x20000;
-pub const CLONE_SYSVSEM: ::c_int = 0x40000;
-pub const CLONE_SETTLS: ::c_int = 0x80000;
-pub const CLONE_PARENT_SETTID: ::c_int = 0x100000;
-pub const CLONE_CHILD_CLEARTID: ::c_int = 0x200000;
-pub const CLONE_DETACHED: ::c_int = 0x400000;
-pub const CLONE_UNTRACED: ::c_int = 0x800000;
-pub const CLONE_CHILD_SETTID: ::c_int = 0x01000000;
-pub const CLONE_NEWUTS: ::c_int = 0x04000000;
-pub const CLONE_NEWIPC: ::c_int = 0x08000000;
-pub const CLONE_NEWUSER: ::c_int = 0x10000000;
-pub const CLONE_NEWPID: ::c_int = 0x20000000;
-pub const CLONE_NEWNET: ::c_int = 0x40000000;
-pub const CLONE_IO: ::c_int = 0x80000000;
-
-pub const WNOHANG: ::c_int = 0x00000001;
-pub const WUNTRACED: ::c_int = 0x00000002;
-pub const WSTOPPED: ::c_int = WUNTRACED;
-pub const WEXITED: ::c_int = 0x00000004;
-pub const WCONTINUED: ::c_int = 0x00000008;
-pub const WNOWAIT: ::c_int = 0x01000000;
-
-pub const __WNOTHREAD: ::c_int = 0x20000000;
-pub const __WALL: ::c_int = 0x40000000;
-pub const __WCLONE: ::c_int = 0x80000000;
-
-pub const SPLICE_F_MOVE: ::c_uint = 0x01;
-pub const SPLICE_F_NONBLOCK: ::c_uint = 0x02;
-pub const SPLICE_F_MORE: ::c_uint = 0x04;
-pub const SPLICE_F_GIFT: ::c_uint = 0x08;
-
-pub const RTLD_LOCAL: ::c_int = 0;
-
-pub const POSIX_FADV_NORMAL: ::c_int = 0;
-pub const POSIX_FADV_RANDOM: ::c_int = 1;
-pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2;
-pub const POSIX_FADV_WILLNEED: ::c_int = 3;
-
-pub const AT_FDCWD: ::c_int = -100;
-pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x100;
-pub const AT_REMOVEDIR: ::c_int = 0x200;
-pub const AT_SYMLINK_FOLLOW: ::c_int = 0x400;
-pub const AT_NO_AUTOMOUNT: ::c_int = 0x800;
-pub const AT_EMPTY_PATH: ::c_int = 0x1000;
-
-pub const LOG_CRON: ::c_int = 9 << 3;
-pub const LOG_AUTHPRIV: ::c_int = 10 << 3;
-pub const LOG_FTP: ::c_int = 11 << 3;
-pub const LOG_PERROR: ::c_int = 0x20;
-
-pub const PIPE_BUF: usize = 4096;
-
-pub const SI_LOAD_SHIFT: ::c_uint = 16;
-
-pub const SIGEV_SIGNAL: ::c_int = 0;
-pub const SIGEV_NONE: ::c_int = 1;
-pub const SIGEV_THREAD: ::c_int = 2;
-
-pub const P_ALL: idtype_t = 0;
-pub const P_PID: idtype_t = 1;
-pub const P_PGID: idtype_t = 2;
-
-pub const UTIME_OMIT: c_long = 1073741822;
-pub const UTIME_NOW: c_long = 1073741823;
-
-f! {
-    pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
-        let fd = fd as usize;
-        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
-        (*set).fds_bits[fd / size] &= !(1 << (fd % size));
-        return
-    }
-
-    pub fn FD_ISSET(fd: ::c_int, set: *mut fd_set) -> bool {
-        let fd = fd as usize;
-        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
-        return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0
-    }
-
-    pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () {
-        let fd = fd as usize;
-        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
-        (*set).fds_bits[fd / size] |= 1 << (fd % size);
-        return
-    }
-
-    pub fn FD_ZERO(set: *mut fd_set) -> () {
-        for slot in (*set).fds_bits.iter_mut() {
-            *slot = 0;
-        }
-    }
-
-    pub fn WIFSTOPPED(status: ::c_int) -> bool {
-        (status & 0xff) == 0x7f
-    }
-
-    pub fn WSTOPSIG(status: ::c_int) -> ::c_int {
-        (status >> 8) & 0xff
-    }
-
-    pub fn WIFCONTINUED(status: ::c_int) -> bool {
-        status == 0xffff
-    }
-
-    pub fn WIFSIGNALED(status: ::c_int) -> bool {
-        ((status & 0x7f) + 1) as i8 >= 2
-    }
-
-    pub fn WTERMSIG(status: ::c_int) -> ::c_int {
-        status & 0x7f
-    }
-
-    pub fn WIFEXITED(status: ::c_int) -> bool {
-        (status & 0x7f) == 0
-    }
-
-    pub fn WEXITSTATUS(status: ::c_int) -> ::c_int {
-        (status >> 8) & 0xff
-    }
-
-    pub fn WCOREDUMP(status: ::c_int) -> bool {
-        (status & 0x80) != 0
-    }
-}
-
-extern {
-    pub fn getpwnam_r(name: *const ::c_char,
-                      pwd: *mut passwd,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut passwd) -> ::c_int;
-    pub fn getpwuid_r(uid: ::uid_t,
-                      pwd: *mut passwd,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut passwd) -> ::c_int;
-    pub fn fdatasync(fd: ::c_int) -> ::c_int;
-    pub fn mincore(addr: *mut ::c_void, len: ::size_t,
-                   vec: *mut ::c_uchar) -> ::c_int;
-    pub fn clock_getres(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
-    pub fn clock_gettime(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
-    pub fn clock_nanosleep(clk_id: clockid_t,
-                           flags: ::c_int,
-                           rqtp: *const ::timespec,
-                           rmtp:  *mut ::timespec) -> ::c_int;
-    pub fn clock_settime(clk_id: clockid_t, tp: *const ::timespec) -> ::c_int;
-    pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
-    pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int;
-
-    pub fn prctl(option: ::c_int, ...) -> ::c_int;
-    pub fn pthread_getattr_np(native: ::pthread_t,
-                              attr: *mut ::pthread_attr_t) -> ::c_int;
-    pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
-                                     guardsize: *mut ::size_t) -> ::c_int;
-    pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,
-                                 stackaddr: *mut *mut ::c_void,
-                                 stacksize: *mut ::size_t) -> ::c_int;
-    pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
-    pub fn setgroups(ngroups: ::size_t,
-                     ptr: *const ::gid_t) -> ::c_int;
-    pub fn initgroups(user: *const ::c_char, group: ::gid_t) -> ::c_int;
-    pub fn sched_setscheduler(pid: ::pid_t,
-                              policy: ::c_int,
-                              param: *const sched_param) -> ::c_int;
-    pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int;
-    pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int;
-    pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int;
-    pub fn sched_setparam(pid: ::pid_t, param: *const sched_param) -> ::c_int;
-    pub fn sched_getparam(pid: ::pid_t, param: *mut sched_param) -> ::c_int;
-    pub fn sched_rr_get_interval(pid: ::pid_t, tp: *mut ::timespec) -> ::c_int;
-    pub fn epoll_create(size: ::c_int) -> ::c_int;
-    pub fn epoll_create1(flags: ::c_int) -> ::c_int;
-    pub fn epoll_ctl(epfd: ::c_int,
-                     op: ::c_int,
-                     fd: ::c_int,
-                     event: *mut epoll_event) -> ::c_int;
-    pub fn epoll_wait(epfd: ::c_int,
-                      events: *mut epoll_event,
-                      maxevents: ::c_int,
-                      timeout: ::c_int) -> ::c_int;
-    pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int;
-    pub fn mount(src: *const ::c_char,
-                 target: *const ::c_char,
-                 fstype: *const ::c_char,
-                 flags: ::c_ulong,
-                 data: *const ::c_void) -> ::c_int;
-    pub fn umount(target: *const ::c_char) -> ::c_int;
-    pub fn umount2(target: *const ::c_char, flags: ::c_int) -> ::c_int;
-    pub fn clone(cb: extern fn(*mut ::c_void) -> ::c_int,
-                 child_stack: *mut ::c_void,
-                 flags: ::c_int,
-                 arg: *mut ::c_void, ...) -> ::c_int;
-    pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int;
-    pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int;
-    pub fn memrchr(cx: *const ::c_void,
-                   c: ::c_int,
-                   n: ::size_t) -> *mut ::c_void;
-    pub fn syscall(num: ::c_long, ...) -> ::c_long;
-    pub fn sendfile(out_fd: ::c_int,
-                    in_fd: ::c_int,
-                    offset: *mut off_t,
-                    count: ::size_t) -> ::ssize_t;
-    pub fn splice(fd_in: ::c_int,
-                  off_in: *mut ::loff_t,
-                  fd_out: ::c_int,
-                  off_out: *mut ::loff_t,
-                  len: ::size_t,
-                  flags: ::c_uint) -> ::ssize_t;
-    pub fn tee(fd_in: ::c_int,
-               fd_out: ::c_int,
-               len: ::size_t,
-               flags: ::c_uint) -> ::ssize_t;
-    pub fn vmsplice(fd: ::c_int,
-                    iov: *const ::iovec,
-                    nr_segs: ::size_t,
-                    flags: ::c_uint) -> ::ssize_t;
-
-    pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t,
-                         advise: ::c_int) -> ::c_int;
-    pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int;
-    pub fn utimensat(dirfd: ::c_int, path: *const ::c_char,
-                     times: *const ::timespec, flag: ::c_int) -> ::c_int;
-    pub fn duplocale(base: ::locale_t) -> ::locale_t;
-    pub fn freelocale(loc: ::locale_t);
-    pub fn newlocale(mask: ::c_int,
-                     locale: *const ::c_char,
-                     base: ::locale_t) -> ::locale_t;
-    pub fn uselocale(loc: ::locale_t) -> ::locale_t;
-    pub fn creat64(path: *const c_char, mode: mode_t) -> ::c_int;
-    pub fn fstat64(fildes: ::c_int, buf: *mut stat64) -> ::c_int;
-    pub fn ftruncate64(fd: ::c_int, length: off64_t) -> ::c_int;
-    pub fn getrlimit64(resource: ::c_int, rlim: *mut rlimit64) -> ::c_int;
-    pub fn lseek64(fd: ::c_int, offset: off64_t, whence: ::c_int) -> off64_t;
-    pub fn lstat64(path: *const c_char, buf: *mut stat64) -> ::c_int;
-    pub fn mmap64(addr: *mut ::c_void,
-                  len: ::size_t,
-                  prot: ::c_int,
-                  flags: ::c_int,
-                  fd: ::c_int,
-                  offset: off64_t)
-                  -> *mut ::c_void;
-    pub fn open64(path: *const c_char, oflag: ::c_int, ...) -> ::c_int;
-    pub fn openat64(fd: ::c_int,
-                    path: *const c_char,
-                    oflag: ::c_int, ...) -> ::c_int;
-    pub fn pread64(fd: ::c_int, buf: *mut ::c_void, count: ::size_t,
-                   offset: off64_t) -> ::ssize_t;
-    pub fn pwrite64(fd: ::c_int, buf: *const ::c_void, count: ::size_t,
-                    offset: off64_t) -> ::ssize_t;
-    pub fn readdir64(dirp: *mut ::DIR) -> *mut ::dirent64;
-    pub fn readdir64_r(dirp: *mut ::DIR, entry: *mut ::dirent64,
-                       result: *mut *mut ::dirent64) -> ::c_int;
-    pub fn setrlimit64(resource: ::c_int, rlim: *const rlimit64) -> ::c_int;
-    pub fn stat64(path: *const c_char, buf: *mut stat64) -> ::c_int;
-    pub fn truncate64(path: *const c_char, length: off64_t) -> ::c_int;
-    pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int;
-    pub fn sysinfo (info: *mut ::sysinfo) -> ::c_int;
-
-    pub fn fdopendir(fd: ::c_int) -> *mut ::DIR;
-
-    pub fn mknodat(dirfd: ::c_int, pathname: *const ::c_char,
-                   mode: ::mode_t, dev: dev_t) -> ::c_int;
-    pub fn ppoll(fds: *mut ::pollfd,
-                 nfds: nfds_t,
-                 timeout: *const ::timespec,
-                 sigmask: *const sigset_t) -> ::c_int;
-    pub fn pthread_condattr_getclock(attr: *const pthread_condattr_t,
-                                     clock_id: *mut clockid_t) -> ::c_int;
-    pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
-                                     clock_id: clockid_t) -> ::c_int;
-    pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t,
-                                       pshared: ::c_int) -> ::c_int;
-    pub fn pthread_condattr_getpshared(attr: *const pthread_condattr_t,
-                                       pshared: *mut ::c_int) -> ::c_int;
-    pub fn pthread_getschedparam(native: ::pthread_t,
-                                 policy: *mut ::c_int,
-                                 param: *mut ::sched_param) -> ::c_int;
-    pub fn pthread_setschedparam(native: ::pthread_t,
-                                 policy: ::c_int,
-                                 param: *const ::sched_param) -> ::c_int;
-    pub fn sched_getaffinity(pid: ::pid_t,
-                             cpusetsize: ::size_t,
-                             cpuset: *mut cpu_set_t) -> ::c_int;
-    pub fn sched_setaffinity(pid: ::pid_t,
-                             cpusetsize: ::size_t,
-                             cpuset: *const cpu_set_t) -> ::c_int;
-    pub fn unshare(flags: ::c_int) -> ::c_int;
-    pub fn setns(fd: ::c_int, nstype: ::c_int) -> ::c_int;
-    pub fn sem_timedwait(sem: *mut sem_t,
-                         abstime: *const ::timespec) -> ::c_int;
-    pub fn accept4(fd: ::c_int, addr: *mut ::sockaddr, len: *mut ::socklen_t,
-                   flg: ::c_int) -> ::c_int;
-    pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
-                                   abstime: *const ::timespec) -> ::c_int;
-    pub fn pthread_mutexattr_setpshared(attr: *mut pthread_mutexattr_t,
-                                        pshared: ::c_int) -> ::c_int;
-    pub fn pthread_mutexattr_getpshared(attr: *const pthread_mutexattr_t,
-                                        pshared: *mut ::c_int) -> ::c_int;
-    pub fn ptsname_r(fd: ::c_int,
-                     buf: *mut ::c_char,
-                     buflen: ::size_t) -> ::c_int;
-    pub fn clearenv() -> ::c_int;
-    pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t,
-                  options: ::c_int) -> ::c_int;
-    pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int;
-    pub fn setreuid(ruid: ::uid_t, euid: ::uid_t) -> ::c_int;
-    pub fn setregid(rgid: ::gid_t, egid: ::gid_t) -> ::c_int;
-    pub fn getresuid(ruid: *mut ::uid_t, euid: *mut ::uid_t,
-                     suid: *mut ::uid_t) -> ::c_int;
-    pub fn getresgid(rgid: *mut ::gid_t, egid: *mut ::gid_t,
-                     sgid: *mut ::gid_t) -> ::c_int;
-    pub fn personality(persona: ::c_ulong) -> ::c_int;
-    pub fn swapon(path: *const ::c_char, swapflags: ::c_int) -> ::c_int;
-    pub fn swapoff(puath: *const ::c_char) -> ::c_int;
-    pub fn acct(filename: *const ::c_char) -> ::c_int;
-    pub fn brk(addr: *mut ::c_void) -> ::c_int;
-    pub fn sbrk(increment: ::intptr_t) -> *mut ::c_void;
-    pub fn vfork() -> ::pid_t;
-    pub fn wait4(pid: ::pid_t, status: *mut ::c_int, options: ::c_int,
-                 rusage: *mut ::rusage) -> ::pid_t;
-}
-
-cfg_if! {
-    if #[cfg(any(target_os = "linux",
-                 target_os = "emscripten",
-                 target_os = "fuchsia"))] {
-        mod linux;
-        pub use self::linux::*;
-    } else if #[cfg(target_os = "android")] {
-        mod android;
-        pub use self::android::*;
-    } else {
-        // Unknown target_os
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/solaris/mod.rs
+++ /dev/null
@@ -1,1194 +0,0 @@
-use dox::{mem, Option};
-
-pub type c_char = i8;
-pub type c_long = i64;
-pub type c_ulong = u64;
-
-pub type clockid_t = ::c_int;
-pub type blkcnt_t = ::c_long;
-pub type clock_t = ::c_long;
-pub type daddr_t = ::c_long;
-pub type dev_t = ::c_ulong;
-pub type fsblkcnt_t = ::c_ulong;
-pub type fsfilcnt_t = ::c_ulong;
-pub type ino_t = ::c_ulong;
-pub type key_t = ::c_int;
-pub type major_t = ::c_uint;
-pub type minor_t = ::c_uint;
-pub type mode_t = ::c_uint;
-pub type nlink_t = ::c_uint;
-pub type rlim_t = ::c_ulong;
-pub type speed_t = ::c_uint;
-pub type tcflag_t = ::c_uint;
-pub type time_t = ::c_long;
-pub type wchar_t = ::c_int;
-pub type nfds_t = ::c_ulong;
-
-pub type suseconds_t = ::c_long;
-pub type off_t = ::c_long;
-pub type useconds_t = ::c_uint;
-pub type socklen_t = ::c_uint;
-pub type sa_family_t = u16;
-pub type pthread_t = ::c_uint;
-pub type pthread_key_t = ::c_uint;
-pub type blksize_t = ::c_int;
-pub type fflags_t = ::c_int;
-pub type nl_item = ::c_int;
-pub type id_t = ::c_int;
-pub type idtype_t = ::c_uint;
-
-pub enum timezone {}
-
-s! {
-    pub struct sockaddr {
-        pub sa_family: sa_family_t,
-        pub sa_data: [::c_char; 14],
-    }
-
-    pub struct sockaddr_in {
-        pub sin_family: sa_family_t,
-        pub sin_port: ::in_port_t,
-        pub sin_addr: ::in_addr,
-        pub sin_zero: [::c_char; 8]
-    }
-
-    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 __sin6_src_id: u32
-    }
-
-    pub struct sockaddr_un {
-        pub sun_family: sa_family_t,
-        pub sun_path: [c_char; 108]
-    }
-
-    pub struct passwd {
-        pub pw_name: *mut ::c_char,
-        pub pw_passwd: *mut ::c_char,
-        pub pw_uid: ::uid_t,
-        pub pw_gid: ::gid_t,
-        pub pw_age: *mut ::c_char,
-        pub pw_comment: *mut ::c_char,
-        pub pw_gecos: *mut ::c_char,
-        pub pw_dir: *mut ::c_char,
-        pub pw_shell: *mut ::c_char
-    }
-
-    pub struct ifaddrs {
-        pub ifa_next: *mut ifaddrs,
-        pub ifa_name: *mut ::c_char,
-        pub ifa_flags: ::c_ulong,
-        pub ifa_addr: *mut ::sockaddr,
-        pub ifa_netmask: *mut ::sockaddr,
-        pub ifa_dstaddr: *mut ::sockaddr,
-        pub ifa_data: *mut ::c_void
-    }
-
-    pub struct tm {
-        pub tm_sec: ::c_int,
-        pub tm_min: ::c_int,
-        pub tm_hour: ::c_int,
-        pub tm_mday: ::c_int,
-        pub tm_mon: ::c_int,
-        pub tm_year: ::c_int,
-        pub tm_wday: ::c_int,
-        pub tm_yday: ::c_int,
-        pub tm_isdst: ::c_int
-    }
-
-    pub struct utsname {
-        pub sysname: [::c_char; 257],
-        pub nodename: [::c_char; 257],
-        pub release: [::c_char; 257],
-        pub version: [::c_char; 257],
-        pub machine: [::c_char; 257],
-    }
-
-    pub struct msghdr {
-        pub msg_name: *mut ::c_void,
-        pub msg_namelen: ::socklen_t,
-        pub msg_iov: *mut ::iovec,
-        pub msg_iovlen: ::c_int,
-        pub msg_control: *mut ::c_void,
-        pub msg_controllen: ::socklen_t,
-        pub msg_flags: ::c_int,
-    }
-
-    pub struct cmsghdr {
-        pub cmsg_len: ::size_t,
-        pub cmsg_level: ::c_int,
-        pub cmsg_type: ::c_int,
-    }
-
-    pub struct fd_set {
-        #[cfg(target_pointer_width = "64")]
-        fds_bits: [i64; FD_SETSIZE / 64],
-        #[cfg(target_pointer_width = "32")]
-        fds_bits: [i32; FD_SETSIZE / 32],
-    }
-
-    pub struct pthread_attr_t {
-        __pthread_attrp: *mut ::c_void
-    }
-
-    pub struct pthread_mutex_t {
-        __pthread_mutex_flag1: u16,
-        __pthread_mutex_flag2: u8,
-        __pthread_mutex_ceiling: u8,
-        __pthread_mutex_type: u16,
-        __pthread_mutex_magic: u16,
-        __pthread_mutex_lock: u64,
-        __pthread_mutex_data: u64
-    }
-
-    pub struct pthread_mutexattr_t {
-        __pthread_mutexattrp: *mut ::c_void
-    }
-
-    pub struct pthread_cond_t {
-        __pthread_cond_flag: [u8; 4],
-        __pthread_cond_type: u16,
-        __pthread_cond_magic: u16,
-        __pthread_cond_data: u64
-    }
-
-    pub struct pthread_condattr_t {
-        __pthread_condattrp: *mut ::c_void,
-    }
-
-    pub struct pthread_rwlock_t {
-        __pthread_rwlock_readers: i32,
-        __pthread_rwlock_type: u16,
-        __pthread_rwlock_magic: u16,
-        __pthread_rwlock_mutex: ::pthread_mutex_t,
-        __pthread_rwlock_readercv: ::pthread_cond_t,
-        __pthread_rwlock_writercv: ::pthread_cond_t
-    }
-
-    pub struct dirent {
-        pub d_ino: ::ino_t,
-        pub d_off: ::off_t,
-        pub d_reclen: u16,
-        pub d_name: [::c_char; 1]
-    }
-
-    pub struct glob_t {
-        pub gl_pathc: ::size_t,
-        pub gl_pathv:  *mut *mut ::c_char,
-        pub gl_offs: ::size_t,
-        __unused1: *mut ::c_void,
-        __unused2: ::c_int,
-        __unused3: ::c_int,
-        __unused4: ::c_int,
-        __unused5: *mut ::c_void,
-        __unused6: *mut ::c_void,
-        __unused7: *mut ::c_void,
-        __unused8: *mut ::c_void,
-        __unused9: *mut ::c_void,
-        __unused10: *mut ::c_void,
-    }
-
-    pub struct sockaddr_storage {
-        pub ss_family: ::sa_family_t,
-        __ss_pad1: [u8; 6],
-        __ss_align: i64,
-        __ss_pad2: [u8; 240],
-    }
-
-    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_canonname: *mut ::c_char,
-        pub ai_addr: *mut ::sockaddr,
-        pub ai_next: *mut addrinfo,
-    }
-
-    pub struct sigset_t {
-        bits: [u32; 4],
-    }
-
-    pub struct siginfo_t {
-        pub si_signo: ::c_int,
-        pub si_code: ::c_int,
-        pub si_errno: ::c_int,
-        pub si_pad: ::c_int,
-        pub si_addr: *mut ::c_void,
-        __pad: [u8; 232],
-    }
-
-    pub struct sigaction {
-        pub sa_flags: ::c_int,
-        pub sa_sigaction: ::sighandler_t,
-        pub sa_mask: sigset_t,
-    }
-
-    pub struct stack_t {
-        pub ss_sp: *mut ::c_void,
-        pub ss_size: ::size_t,
-        pub ss_flags: ::c_int,
-    }
-
-    pub struct statvfs {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_files: ::fsfilcnt_t,
-        pub f_ffree: ::fsfilcnt_t,
-        pub f_favail: ::fsfilcnt_t,
-        pub f_fsid: ::c_ulong,
-        pub f_basetype: [::c_char; 16],
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-        pub f_fstr: [::c_char; 32]
-    }
-
-    pub struct sched_param {
-        pub sched_priority: ::c_int,
-        sched_pad: [::c_int; 8]
-    }
-
-    pub struct Dl_info {
-        pub dli_fname: *const ::c_char,
-        pub dli_fbase: *mut ::c_void,
-        pub dli_sname: *const ::c_char,
-        pub dli_saddr: *mut ::c_void,
-    }
-
-    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,
-        pub st_size: ::off_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,
-        pub st_blksize: ::blksize_t,
-        pub st_blocks: ::blkcnt_t,
-        __unused: [::c_char; 16]
-    }
-
-    pub struct termios {
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_cc: [::cc_t; ::NCCS]
-    }
-
-    pub struct lconv {
-        pub decimal_point: *mut ::c_char,
-        pub thousands_sep: *mut ::c_char,
-        pub grouping: *mut ::c_char,
-        pub int_curr_symbol: *mut ::c_char,
-        pub currency_symbol: *mut ::c_char,
-        pub mon_decimal_point: *mut ::c_char,
-        pub mon_thousands_sep: *mut ::c_char,
-        pub mon_grouping: *mut ::c_char,
-        pub positive_sign: *mut ::c_char,
-        pub negative_sign: *mut ::c_char,
-        pub int_frac_digits: ::c_char,
-        pub frac_digits: ::c_char,
-        pub p_cs_precedes: ::c_char,
-        pub p_sep_by_space: ::c_char,
-        pub n_cs_precedes: ::c_char,
-        pub n_sep_by_space: ::c_char,
-        pub p_sign_posn: ::c_char,
-        pub n_sign_posn: ::c_char,
-        pub int_p_cs_precedes: ::c_char,
-        pub int_p_sep_by_space: ::c_char,
-        pub int_n_cs_precedes: ::c_char,
-        pub int_n_sep_by_space: ::c_char,
-        pub int_p_sign_posn: ::c_char,
-        pub int_n_sign_posn: ::c_char,
-    }
-
-    pub struct sem_t {
-        pub sem_count: u32,
-        pub sem_type: u16,
-        pub sem_magic: u16,
-        pub sem_pad1: [u64; 3],
-        pub sem_pad2: [u64; 2]
-    }
-
-    pub struct flock {
-        pub l_type: ::c_short,
-        pub l_whence: ::c_short,
-        pub l_start: ::off_t,
-        pub l_len: ::off_t,
-        pub l_sysid: ::c_int,
-        pub l_pid: ::pid_t,
-        pub l_pad: [::c_long; 4]
-    }
-
-    pub struct if_nameindex {
-        pub if_index: ::c_uint,
-        pub if_name: *mut ::c_char,
-    }
-
-    pub struct port_event {
-        pub portev_events: ::c_int,
-        pub portev_source: ::c_ushort,
-        pub portev_pad: ::c_ushort,
-        pub portev_object: ::uintptr_t,
-        pub portev_user: ::uintptr_t,
-    }
-}
-
-pub const LC_CTYPE: ::c_int = 0;
-pub const LC_NUMERIC: ::c_int = 1;
-pub const LC_TIME: ::c_int = 2;
-pub const LC_COLLATE: ::c_int = 3;
-pub const LC_MONETARY: ::c_int = 4;
-pub const LC_MESSAGES: ::c_int = 5;
-pub const LC_ALL: ::c_int = 6;
-pub const LC_CTYPE_MASK: ::c_int = (1 << LC_CTYPE);
-pub const LC_NUMERIC_MASK: ::c_int = (1 << LC_NUMERIC);
-pub const LC_TIME_MASK: ::c_int = (1 << LC_TIME);
-pub const LC_COLLATE_MASK: ::c_int = (1 << LC_COLLATE);
-pub const LC_MONETARY_MASK: ::c_int = (1 << LC_MONETARY);
-pub const LC_MESSAGES_MASK: ::c_int = (1 << LC_MESSAGES);
-pub const LC_ALL_MASK: ::c_int = LC_CTYPE_MASK
-                               | LC_NUMERIC_MASK
-                               | LC_TIME_MASK
-                               | LC_COLLATE_MASK
-                               | LC_MONETARY_MASK
-                               | LC_MESSAGES_MASK;
-
-pub const DAY_1: ::nl_item = 1;
-pub const DAY_2: ::nl_item = 2;
-pub const DAY_3: ::nl_item = 3;
-pub const DAY_4: ::nl_item = 4;
-pub const DAY_5: ::nl_item = 5;
-pub const DAY_6: ::nl_item = 6;
-pub const DAY_7: ::nl_item = 7;
-
-pub const ABDAY_1: ::nl_item = 8;
-pub const ABDAY_2: ::nl_item = 9;
-pub const ABDAY_3: ::nl_item = 10;
-pub const ABDAY_4: ::nl_item = 11;
-pub const ABDAY_5: ::nl_item = 12;
-pub const ABDAY_6: ::nl_item = 13;
-pub const ABDAY_7: ::nl_item = 14;
-
-pub const MON_1: ::nl_item = 15;
-pub const MON_2: ::nl_item = 16;
-pub const MON_3: ::nl_item = 17;
-pub const MON_4: ::nl_item = 18;
-pub const MON_5: ::nl_item = 19;
-pub const MON_6: ::nl_item = 20;
-pub const MON_7: ::nl_item = 21;
-pub const MON_8: ::nl_item = 22;
-pub const MON_9: ::nl_item = 23;
-pub const MON_10: ::nl_item = 24;
-pub const MON_11: ::nl_item = 25;
-pub const MON_12: ::nl_item = 26;
-
-pub const ABMON_1: ::nl_item = 27;
-pub const ABMON_2: ::nl_item = 28;
-pub const ABMON_3: ::nl_item = 29;
-pub const ABMON_4: ::nl_item = 30;
-pub const ABMON_5: ::nl_item = 31;
-pub const ABMON_6: ::nl_item = 32;
-pub const ABMON_7: ::nl_item = 33;
-pub const ABMON_8: ::nl_item = 34;
-pub const ABMON_9: ::nl_item = 35;
-pub const ABMON_10: ::nl_item = 36;
-pub const ABMON_11: ::nl_item = 37;
-pub const ABMON_12: ::nl_item = 38;
-
-pub const RADIXCHAR: ::nl_item = 39;
-pub const THOUSEP: ::nl_item = 40;
-pub const YESSTR: ::nl_item = 41;
-pub const NOSTR: ::nl_item = 42;
-pub const CRNCYSTR: ::nl_item = 43;
-
-pub const D_T_FMT: ::nl_item = 44;
-pub const D_FMT: ::nl_item = 45;
-pub const T_FMT: ::nl_item = 46;
-pub const AM_STR: ::nl_item = 47;
-pub const PM_STR: ::nl_item = 48;
-
-pub const CODESET: ::nl_item = 49;
-pub const T_FMT_AMPM: ::nl_item = 50;
-pub const ERA: ::nl_item = 51;
-pub const ERA_D_FMT: ::nl_item = 52;
-pub const ERA_D_T_FMT: ::nl_item = 53;
-pub const ERA_T_FMT: ::nl_item = 54;
-pub const ALT_DIGITS: ::nl_item = 55;
-pub const YESEXPR: ::nl_item = 56;
-pub const NOEXPR: ::nl_item = 57;
-pub const _DATE_FMT: ::nl_item = 58;
-pub const MAXSTRMSG: ::nl_item = 58;
-
-pub const PATH_MAX: ::c_int = 1024;
-
-pub const SA_ONSTACK: ::c_int = 0x00000001;
-pub const SA_RESETHAND: ::c_int = 0x00000002;
-pub const SA_RESTART: ::c_int = 0x00000004;
-pub const SA_SIGINFO: ::c_int = 0x00000008;
-pub const SA_NODEFER: ::c_int = 0x00000010;
-pub const SA_NOCLDWAIT: ::c_int = 0x00010000;
-pub const SA_NOCLDSTOP: ::c_int = 0x00020000;
-
-pub const SS_ONSTACK: ::c_int = 1;
-pub const SS_DISABLE: ::c_int = 2;
-
-pub const FIOCLEX: ::c_int = 0x20006601;
-pub const FIONCLEX: ::c_int = 0x20006602;
-pub const FIONREAD: ::c_int = 0x4004667f;
-pub const FIONBIO: ::c_int = 0x8004667e;
-pub const FIOASYNC: ::c_int = 0x8004667d;
-pub const FIOSETOWN: ::c_int = 0x8004667c;
-pub const FIOGETOWN: ::c_int = 0x4004667b;
-
-pub const SIGCHLD: ::c_int = 18;
-pub const SIGBUS: ::c_int = 10;
-pub const SIGINFO: ::c_int = 41;
-pub const SIG_BLOCK: ::c_int = 1;
-pub const SIG_UNBLOCK: ::c_int = 2;
-pub const SIG_SETMASK: ::c_int = 3;
-
-pub const IPV6_MULTICAST_LOOP: ::c_int = 0x8;
-pub const IPV6_V6ONLY: ::c_int = 0x27;
-
-cfg_if! {
-    if #[cfg(target_pointer_width = "64")] {
-        pub const FD_SETSIZE: usize = 65536;
-    } else {
-        pub const FD_SETSIZE: usize = 1024;
-    }
-}
-
-pub const ST_RDONLY: ::c_ulong = 1;
-pub const ST_NOSUID: ::c_ulong = 2;
-
-pub const NI_MAXHOST: ::socklen_t = 1025;
-
-pub const EXIT_FAILURE: ::c_int = 1;
-pub const EXIT_SUCCESS: ::c_int = 0;
-pub const RAND_MAX: ::c_int = 32767;
-pub const EOF: ::c_int = -1;
-pub const SEEK_SET: ::c_int = 0;
-pub const SEEK_CUR: ::c_int = 1;
-pub const SEEK_END: ::c_int = 2;
-pub const _IOFBF: ::c_int = 0;
-pub const _IONBF: ::c_int = 4;
-pub const _IOLBF: ::c_int = 64;
-pub const BUFSIZ: ::c_uint = 1024;
-pub const FOPEN_MAX: ::c_uint = 20;
-pub const FILENAME_MAX: ::c_uint = 1024;
-pub const L_tmpnam: ::c_uint = 25;
-pub const TMP_MAX: ::c_uint = 17576;
-
-pub const O_RDONLY: ::c_int = 0;
-pub const O_WRONLY: ::c_int = 1;
-pub const O_RDWR: ::c_int = 2;
-pub const O_SEARCH: ::c_int = 0x200000;
-pub const O_EXEC: ::c_int = 0x400000;
-pub const O_APPEND: ::c_int = 8;
-pub const O_CREAT: ::c_int = 256;
-pub const O_EXCL: ::c_int = 1024;
-pub const O_NOCTTY: ::c_int = 2048;
-pub const O_TRUNC: ::c_int = 512;
-pub const O_CLOEXEC: ::c_int = 0x800000;
-pub const O_ACCMODE: ::c_int = 0x600003;
-pub const S_IFIFO: mode_t = 4096;
-pub const S_IFCHR: mode_t = 8192;
-pub const S_IFBLK: mode_t = 24576;
-pub const S_IFDIR: mode_t = 16384;
-pub const S_IFREG: mode_t = 32768;
-pub const S_IFLNK: mode_t = 40960;
-pub const S_IFSOCK: mode_t = 49152;
-pub const S_IFMT: mode_t = 61440;
-pub const S_IEXEC: mode_t = 64;
-pub const S_IWRITE: mode_t = 128;
-pub const S_IREAD: mode_t = 256;
-pub const S_IRWXU: mode_t = 448;
-pub const S_IXUSR: mode_t = 64;
-pub const S_IWUSR: mode_t = 128;
-pub const S_IRUSR: mode_t = 256;
-pub const S_IRWXG: mode_t = 56;
-pub const S_IXGRP: mode_t = 8;
-pub const S_IWGRP: mode_t = 16;
-pub const S_IRGRP: mode_t = 32;
-pub const S_IRWXO: mode_t = 7;
-pub const S_IXOTH: mode_t = 1;
-pub const S_IWOTH: mode_t = 2;
-pub const S_IROTH: mode_t = 4;
-pub const F_OK: ::c_int = 0;
-pub const R_OK: ::c_int = 4;
-pub const W_OK: ::c_int = 2;
-pub const X_OK: ::c_int = 1;
-pub const STDIN_FILENO: ::c_int = 0;
-pub const STDOUT_FILENO: ::c_int = 1;
-pub const STDERR_FILENO: ::c_int = 2;
-pub const F_LOCK: ::c_int = 1;
-pub const F_TEST: ::c_int = 3;
-pub const F_TLOCK: ::c_int = 2;
-pub const F_ULOCK: ::c_int = 0;
-pub const F_DUPFD_CLOEXEC: ::c_int = 37;
-pub const F_SETLK: ::c_int = 6;
-pub const F_SETLKW: ::c_int = 7;
-pub const F_GETLK: ::c_int = 14;
-pub const SIGHUP: ::c_int = 1;
-pub const SIGINT: ::c_int = 2;
-pub const SIGQUIT: ::c_int = 3;
-pub const SIGILL: ::c_int = 4;
-pub const SIGABRT: ::c_int = 6;
-pub const SIGEMT: ::c_int = 7;
-pub const SIGFPE: ::c_int = 8;
-pub const SIGKILL: ::c_int = 9;
-pub const SIGSEGV: ::c_int = 11;
-pub const SIGSYS: ::c_int = 12;
-pub const SIGPIPE: ::c_int = 13;
-pub const SIGALRM: ::c_int = 14;
-pub const SIGTERM: ::c_int = 15;
-pub const SIGUSR1: ::c_int = 16;
-pub const SIGUSR2: ::c_int = 17;
-pub const SIGPWR: ::c_int = 19;
-pub const SIGWINCH: ::c_int = 20;
-pub const SIGURG: ::c_int = 21;
-pub const SIGPOLL: ::c_int = 22;
-pub const SIGIO: ::c_int = SIGPOLL;
-pub const SIGSTOP: ::c_int = 23;
-pub const SIGTSTP: ::c_int = 24;
-pub const SIGCONT: ::c_int = 25;
-pub const SIGTTIN: ::c_int = 26;
-pub const SIGTTOU: ::c_int = 27;
-pub const SIGVTALRM: ::c_int = 28;
-pub const SIGPROF: ::c_int = 29;
-pub const SIGXCPU: ::c_int = 30;
-pub const SIGXFSZ: ::c_int = 31;
-
-pub const WNOHANG: ::c_int = 0x40;
-pub const WUNTRACED: ::c_int = 0x04;
-
-pub const WEXITED: ::c_int = 0x01;
-pub const WTRAPPED: ::c_int = 0x02;
-pub const WSTOPPED: ::c_int = WUNTRACED;
-pub const WCONTINUED: ::c_int = 0x08;
-pub const WNOWAIT: ::c_int = 0x80;
-
-// Solaris defines a great many more of these; we only expose the
-// standardized ones.
-pub const P_PID: idtype_t = 0;
-pub const P_PGID: idtype_t = 2;
-pub const P_ALL: idtype_t = 7;
-
-pub const PROT_NONE: ::c_int = 0;
-pub const PROT_READ: ::c_int = 1;
-pub const PROT_WRITE: ::c_int = 2;
-pub const PROT_EXEC: ::c_int = 4;
-
-pub const MAP_SHARED: ::c_int = 0x0001;
-pub const MAP_PRIVATE: ::c_int = 0x0002;
-pub const MAP_FIXED: ::c_int = 0x0010;
-pub const MAP_NORESERVE: ::c_int = 0x40;
-pub const MAP_ANON: ::c_int = 0x0100;
-pub const MAP_RENAME: ::c_int = 0x20;
-pub const MAP_ALIGN: ::c_int = 0x200;
-pub const MAP_TEXT: ::c_int = 0x400;
-pub const MAP_INITDATA: ::c_int = 0x800;
-pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
-
-pub const MCL_CURRENT: ::c_int = 0x0001;
-pub const MCL_FUTURE: ::c_int = 0x0002;
-
-pub const MS_SYNC: ::c_int = 0x0004;
-pub const MS_ASYNC: ::c_int = 0x0001;
-pub const MS_INVALIDATE: ::c_int = 0x0002;
-pub const MS_INVALCURPROC: ::c_int = 0x0008;
-
-pub const EPERM: ::c_int = 1;
-pub const ENOENT: ::c_int = 2;
-pub const ESRCH: ::c_int = 3;
-pub const EINTR: ::c_int = 4;
-pub const EIO: ::c_int = 5;
-pub const ENXIO: ::c_int = 6;
-pub const E2BIG: ::c_int = 7;
-pub const ENOEXEC: ::c_int = 8;
-pub const EBADF: ::c_int = 9;
-pub const ECHILD: ::c_int = 10;
-pub const EAGAIN: ::c_int = 11;
-pub const ENOMEM: ::c_int = 12;
-pub const EACCES: ::c_int = 13;
-pub const EFAULT: ::c_int = 14;
-pub const ENOTBLK: ::c_int = 15;
-pub const EBUSY: ::c_int = 16;
-pub const EEXIST: ::c_int = 17;
-pub const EXDEV: ::c_int = 18;
-pub const ENODEV: ::c_int = 19;
-pub const ENOTDIR: ::c_int = 20;
-pub const EISDIR: ::c_int = 21;
-pub const EINVAL: ::c_int = 22;
-pub const ENFILE: ::c_int = 23;
-pub const EMFILE: ::c_int = 24;
-pub const ENOTTY: ::c_int = 25;
-pub const ETXTBSY: ::c_int = 26;
-pub const EFBIG: ::c_int = 27;
-pub const ENOSPC: ::c_int = 28;
-pub const ESPIPE: ::c_int = 29;
-pub const EROFS: ::c_int = 30;
-pub const EMLINK: ::c_int = 31;
-pub const EPIPE: ::c_int = 32;
-pub const EDOM: ::c_int = 33;
-pub const ERANGE: ::c_int = 34;
-pub const ENOMSG: ::c_int = 35;
-pub const EIDRM: ::c_int = 36;
-pub const ECHRNG: ::c_int = 37;
-pub const EL2NSYNC: ::c_int = 38;
-pub const EL3HLT: ::c_int = 39;
-pub const EL3RST: ::c_int = 40;
-pub const ELNRNG: ::c_int = 41;
-pub const EUNATCH: ::c_int = 42;
-pub const ENOCSI: ::c_int = 43;
-pub const EL2HLT: ::c_int = 44;
-pub const EDEADLK: ::c_int = 45;
-pub const ENOLCK: ::c_int = 46;
-pub const ECANCELED: ::c_int = 47;
-pub const ENOTSUP: ::c_int = 48;
-pub const EDQUOT: ::c_int = 49;
-pub const EBADE: ::c_int = 50;
-pub const EBADR: ::c_int = 51;
-pub const EXFULL: ::c_int = 52;
-pub const ENOANO: ::c_int = 53;
-pub const EBADRQC: ::c_int = 54;
-pub const EBADSLT: ::c_int = 55;
-pub const EDEADLOCK: ::c_int = 56;
-pub const EBFONT: ::c_int = 57;
-pub const EOWNERDEAD: ::c_int = 58;
-pub const ENOTRECOVERABLE: ::c_int = 59;
-pub const ENOSTR: ::c_int = 60;
-pub const ENODATA: ::c_int = 61;
-pub const ETIME: ::c_int = 62;
-pub const ENOSR: ::c_int = 63;
-pub const ENONET: ::c_int = 64;
-pub const ENOPKG: ::c_int = 65;
-pub const EREMOTE: ::c_int = 66;
-pub const ENOLINK: ::c_int = 67;
-pub const EADV: ::c_int = 68;
-pub const ESRMNT: ::c_int = 69;
-pub const ECOMM: ::c_int = 70;
-pub const EPROTO: ::c_int = 71;
-pub const ELOCKUNMAPPED: ::c_int = 72;
-pub const ENOTACTIVE: ::c_int = 73;
-pub const EMULTIHOP: ::c_int = 74;
-pub const EADI: ::c_int = 75;
-pub const EBADMSG: ::c_int = 77;
-pub const ENAMETOOLONG: ::c_int = 78;
-pub const EOVERFLOW: ::c_int = 79;
-pub const ENOTUNIQ: ::c_int = 80;
-pub const EBADFD: ::c_int = 81;
-pub const EREMCHG: ::c_int = 82;
-pub const ELIBACC: ::c_int = 83;
-pub const ELIBBAD: ::c_int = 84;
-pub const ELIBSCN: ::c_int = 85;
-pub const ELIBMAX: ::c_int = 86;
-pub const ELIBEXEC: ::c_int = 87;
-pub const EILSEQ: ::c_int = 88;
-pub const ENOSYS: ::c_int = 89;
-pub const ELOOP: ::c_int = 90;
-pub const ERESTART: ::c_int = 91;
-pub const ESTRPIPE: ::c_int = 92;
-pub const ENOTEMPTY: ::c_int = 93;
-pub const EUSERS: ::c_int = 94;
-pub const ENOTSOCK: ::c_int = 95;
-pub const EDESTADDRREQ: ::c_int = 96;
-pub const EMSGSIZE: ::c_int = 97;
-pub const EPROTOTYPE: ::c_int = 98;
-pub const ENOPROTOOPT: ::c_int = 99;
-pub const EPROTONOSUPPORT: ::c_int = 120;
-pub const ESOCKTNOSUPPORT: ::c_int = 121;
-pub const EOPNOTSUPP: ::c_int = 122;
-pub const EPFNOSUPPORT: ::c_int = 123;
-pub const EAFNOSUPPORT: ::c_int = 124;
-pub const EADDRINUSE: ::c_int = 125;
-pub const EADDRNOTAVAIL: ::c_int = 126;
-pub const ENETDOWN: ::c_int = 127;
-pub const ENETUNREACH: ::c_int = 128;
-pub const ENETRESET: ::c_int = 129;
-pub const ECONNABORTED: ::c_int = 130;
-pub const ECONNRESET: ::c_int = 131;
-pub const ENOBUFS: ::c_int = 132;
-pub const EISCONN: ::c_int = 133;
-pub const ENOTCONN: ::c_int = 134;
-pub const ESHUTDOWN: ::c_int = 143;
-pub const ETOOMANYREFS: ::c_int = 144;
-pub const ETIMEDOUT: ::c_int = 145;
-pub const ECONNREFUSED: ::c_int = 146;
-pub const EHOSTDOWN: ::c_int = 147;
-pub const EHOSTUNREACH: ::c_int = 148;
-pub const EWOULDBLOCK: ::c_int = EAGAIN;
-pub const EALREADY: ::c_int = 149;
-pub const EINPROGRESS: ::c_int = 150;
-
-pub const EAI_SYSTEM: ::c_int = 11;
-
-pub const F_DUPFD: ::c_int = 0;
-pub const F_GETFD: ::c_int = 1;
-pub const F_SETFD: ::c_int = 2;
-pub const F_GETFL: ::c_int = 3;
-pub const F_SETFL: ::c_int = 4;
-
-pub const SIGTRAP: ::c_int = 5;
-
-pub const GLOB_APPEND  : ::c_int = 32;
-pub const GLOB_DOOFFS  : ::c_int = 16;
-pub const GLOB_ERR     : ::c_int = 1;
-pub const GLOB_MARK    : ::c_int = 2;
-pub const GLOB_NOCHECK : ::c_int = 8;
-pub const GLOB_NOSORT  : ::c_int = 4;
-pub const GLOB_NOESCAPE: ::c_int = 64;
-
-pub const GLOB_NOSPACE : ::c_int = -2;
-pub const GLOB_ABORTED : ::c_int = -1;
-pub const GLOB_NOMATCH : ::c_int = -3;
-
-pub const POSIX_MADV_NORMAL: ::c_int = 0;
-pub const POSIX_MADV_RANDOM: ::c_int = 1;
-pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2;
-pub const POSIX_MADV_WILLNEED: ::c_int = 3;
-pub const POSIX_MADV_DONTNEED: ::c_int = 4;
-
-pub const _SC_IOV_MAX: ::c_int = 77;
-pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 569;
-pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 570;
-pub const _SC_LOGIN_NAME_MAX: ::c_int = 571;
-pub const _SC_MQ_PRIO_MAX: ::c_int = 30;
-pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 577;
-pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 578;
-pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 568;
-pub const _SC_THREAD_KEYS_MAX: ::c_int = 572;
-pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 580;
-pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 581;
-pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 579;
-pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 582;
-pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 583;
-pub const _SC_THREAD_STACK_MIN: ::c_int = 573;
-pub const _SC_THREAD_THREADS_MAX: ::c_int = 574;
-pub const _SC_THREADS: ::c_int = 576;
-pub const _SC_TTY_NAME_MAX: ::c_int = 575;
-pub const _SC_ATEXIT_MAX: ::c_int = 76;
-pub const _SC_XOPEN_CRYPT: ::c_int = 62;
-pub const _SC_XOPEN_ENH_I18N: ::c_int = 63;
-pub const _SC_XOPEN_LEGACY: ::c_int = 717;
-pub const _SC_XOPEN_REALTIME: ::c_int = 718;
-pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 719;
-pub const _SC_XOPEN_SHM: ::c_int = 64;
-pub const _SC_XOPEN_UNIX: ::c_int = 78;
-pub const _SC_XOPEN_VERSION: ::c_int = 12;
-pub const _SC_XOPEN_XCU_VERSION: ::c_int = 67;
-
-pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0;
-pub const PTHREAD_CREATE_DETACHED: ::c_int = 0x40;
-pub const PTHREAD_PROCESS_SHARED: ::c_int = 1;
-pub const PTHREAD_PROCESS_PRIVATE: u16 = 0;
-pub const PTHREAD_STACK_MIN: ::size_t = 4096;
-
-pub const SIGSTKSZ: ::size_t = 8192;
-
-// https://illumos.org/man/3c/clock_gettime
-// https://github.com/illumos/illumos-gate/
-//   blob/HEAD/usr/src/lib/libc/amd64/sys/__clock_gettime.s
-// clock_gettime(3c) doesn't seem to accept anything other than CLOCK_REALTIME
-// or __CLOCK_REALTIME0
-//
-// https://github.com/illumos/illumos-gate/
-//   blob/HEAD/usr/src/uts/common/sys/time_impl.h
-// Confusing! CLOCK_HIGHRES==CLOCK_MONOTONIC==4
-// __CLOCK_REALTIME0==0 is an obsoleted version of CLOCK_REALTIME==3
-pub const CLOCK_REALTIME: clockid_t = 3;
-pub const CLOCK_MONOTONIC: clockid_t = 4;
-pub const TIMER_RELTIME: ::c_int = 0;
-pub const TIMER_ABSTIME: ::c_int = 1;
-
-pub const RLIMIT_CPU: ::c_int = 0;
-pub const RLIMIT_FSIZE: ::c_int = 1;
-pub const RLIMIT_DATA: ::c_int = 2;
-pub const RLIMIT_STACK: ::c_int = 3;
-pub const RLIMIT_CORE: ::c_int = 4;
-pub const RLIMIT_NOFILE: ::c_int = 5;
-pub const RLIMIT_VMEM: ::c_int = 6;
-pub const RLIMIT_AS: ::c_int = RLIMIT_VMEM;
-
-pub const RLIM_NLIMITS: rlim_t = 7;
-pub const RLIM_INFINITY: rlim_t = 0x7fffffff;
-
-pub const RUSAGE_SELF: ::c_int = 0;
-pub const RUSAGE_CHILDREN: ::c_int = -1;
-
-pub const MADV_NORMAL: ::c_int = 0;
-pub const MADV_RANDOM: ::c_int = 1;
-pub const MADV_SEQUENTIAL: ::c_int = 2;
-pub const MADV_WILLNEED: ::c_int = 3;
-pub const MADV_DONTNEED: ::c_int = 4;
-pub const MADV_FREE: ::c_int = 5;
-
-pub const AF_INET: ::c_int = 2;
-pub const AF_INET6: ::c_int = 26;
-pub const AF_UNIX: ::c_int = 1;
-pub const SOCK_DGRAM: ::c_int = 1;
-pub const SOCK_STREAM: ::c_int = 2;
-pub const SOCK_RAW: ::c_int = 4;
-pub const SOCK_RDM: ::c_int = 5;
-pub const SOCK_SEQPACKET: ::c_int = 6;
-pub const IPPROTO_ICMP: ::c_int = 1;
-pub const IPPROTO_ICMPV6: ::c_int = 58;
-pub const IPPROTO_TCP: ::c_int = 6;
-pub const IPPROTO_IP: ::c_int = 0;
-pub const IPPROTO_IPV6: ::c_int = 41;
-pub const IP_MULTICAST_TTL: ::c_int = 17;
-pub const IP_MULTICAST_LOOP: ::c_int = 18;
-pub const IP_TTL: ::c_int = 4;
-pub const IP_HDRINCL: ::c_int = 2;
-pub const IP_ADD_MEMBERSHIP: ::c_int = 19;
-pub const IP_DROP_MEMBERSHIP: ::c_int = 20;
-pub const IPV6_JOIN_GROUP: ::c_int = 9;
-pub const IPV6_LEAVE_GROUP: ::c_int = 10;
-
-pub const TCP_NODELAY: ::c_int = 1;
-pub const TCP_KEEPIDLE: ::c_int = 34;
-pub const SOL_SOCKET: ::c_int = 0xffff;
-pub const SO_DEBUG: ::c_int = 0x01;
-pub const SO_ACCEPTCONN: ::c_int = 0x0002;
-pub const SO_REUSEADDR: ::c_int = 0x0004;
-pub const SO_KEEPALIVE: ::c_int = 0x0008;
-pub const SO_DONTROUTE: ::c_int = 0x0010;
-pub const SO_BROADCAST: ::c_int = 0x0020;
-pub const SO_USELOOPBACK: ::c_int = 0x0040;
-pub const SO_LINGER: ::c_int = 0x0080;
-pub const SO_OOBINLINE: ::c_int = 0x0100;
-pub const SO_SNDBUF: ::c_int = 0x1001;
-pub const SO_RCVBUF: ::c_int = 0x1002;
-pub const SO_SNDLOWAT: ::c_int = 0x1003;
-pub const SO_RCVLOWAT: ::c_int = 0x1004;
-pub const SO_SNDTIMEO: ::c_int = 0x1005;
-pub const SO_RCVTIMEO: ::c_int = 0x1006;
-pub const SO_ERROR: ::c_int = 0x1007;
-pub const SO_TYPE: ::c_int = 0x1008;
-
-pub const MSG_PEEK: ::c_int = 0x2;
-
-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;
-
-pub const LOCK_SH: ::c_int = 1;
-pub const LOCK_EX: ::c_int = 2;
-pub const LOCK_NB: ::c_int = 4;
-pub const LOCK_UN: ::c_int = 8;
-
-pub const F_RDLCK: ::c_short = 1;
-pub const F_WRLCK: ::c_short = 2;
-pub const F_UNLCK: ::c_short = 3;
-
-pub const O_SYNC: ::c_int = 16;
-pub const O_NONBLOCK: ::c_int = 128;
-
-pub const IPPROTO_RAW: ::c_int = 255;
-
-pub const _SC_ARG_MAX: ::c_int = 1;
-pub const _SC_CHILD_MAX: ::c_int = 2;
-pub const _SC_CLK_TCK: ::c_int = 3;
-pub const _SC_NGROUPS_MAX: ::c_int = 4;
-pub const _SC_OPEN_MAX: ::c_int = 5;
-pub const _SC_JOB_CONTROL: ::c_int = 6;
-pub const _SC_SAVED_IDS: ::c_int = 7;
-pub const _SC_VERSION: ::c_int = 8;
-pub const _SC_PAGESIZE: ::c_int = 11;
-pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
-pub const _SC_NPROCESSORS_ONLN: ::c_int = 15;
-pub const _SC_STREAM_MAX: ::c_int = 16;
-pub const _SC_TZNAME_MAX: ::c_int = 17;
-pub const _SC_AIO_LISTIO_MAX: ::c_int = 18;
-pub const _SC_AIO_MAX: ::c_int = 19;
-pub const _SC_BC_BASE_MAX: ::c_int = 54;
-pub const _SC_BC_DIM_MAX: ::c_int = 55;
-pub const _SC_BC_SCALE_MAX: ::c_int = 56;
-pub const _SC_BC_STRING_MAX: ::c_int = 57;
-pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 58;
-pub const _SC_EXPR_NEST_MAX: ::c_int = 59;
-pub const _SC_LINE_MAX: ::c_int = 60;
-pub const _SC_RE_DUP_MAX: ::c_int = 61;
-pub const _SC_2_VERSION: ::c_int = 53;
-pub const _SC_2_C_BIND: ::c_int = 45;
-pub const _SC_2_C_DEV: ::c_int = 46;
-pub const _SC_2_CHAR_TERM: ::c_int = 66;
-pub const _SC_2_FORT_DEV: ::c_int = 48;
-pub const _SC_2_FORT_RUN: ::c_int = 49;
-pub const _SC_2_LOCALEDEF: ::c_int = 50;
-pub const _SC_2_SW_DEV: ::c_int = 51;
-pub const _SC_2_UPE: ::c_int = 52;
-pub const _SC_ASYNCHRONOUS_IO: ::c_int = 21;
-pub const _SC_MAPPED_FILES: ::c_int = 24;
-pub const _SC_MEMLOCK: ::c_int = 25;
-pub const _SC_MEMLOCK_RANGE: ::c_int = 26;
-pub const _SC_MEMORY_PROTECTION: ::c_int = 27;
-pub const _SC_MESSAGE_PASSING: ::c_int = 28;
-pub const _SC_PRIORITIZED_IO: ::c_int = 31;
-pub const _SC_PRIORITY_SCHEDULING: ::c_int = 32;
-pub const _SC_REALTIME_SIGNALS: ::c_int = 33;
-pub const _SC_SEMAPHORES: ::c_int = 35;
-pub const _SC_FSYNC: ::c_int = 23;
-pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 38;
-pub const _SC_SYNCHRONIZED_IO: ::c_int = 42;
-pub const _SC_TIMERS: ::c_int = 43;
-pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 20;
-pub const _SC_DELAYTIMER_MAX: ::c_int = 22;
-pub const _SC_MQ_OPEN_MAX: ::c_int = 29;
-pub const _SC_RTSIG_MAX: ::c_int = 34;
-pub const _SC_SEM_NSEMS_MAX: ::c_int = 36;
-pub const _SC_SEM_VALUE_MAX: ::c_int = 37;
-pub const _SC_SIGQUEUE_MAX: ::c_int = 39;
-pub const _SC_TIMER_MAX: ::c_int = 44;
-
-pub const _MUTEX_MAGIC: u16 = 0x4d58; // MX
-pub const _COND_MAGIC: u16 = 0x4356;  // CV
-pub const _RWL_MAGIC: u16 = 0x5257;   // RW
-
-pub const NCCS: usize = 19;
-
-pub const LOG_CRON: ::c_int = 15 << 3;
-
-pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
-    __pthread_mutex_flag1: 0,
-    __pthread_mutex_flag2: 0,
-    __pthread_mutex_ceiling: 0,
-    __pthread_mutex_type: PTHREAD_PROCESS_PRIVATE,
-    __pthread_mutex_magic: _MUTEX_MAGIC,
-    __pthread_mutex_lock: 0,
-    __pthread_mutex_data: 0
-};
-pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
-    __pthread_cond_flag: [0; 4],
-    __pthread_cond_type: PTHREAD_PROCESS_PRIVATE,
-    __pthread_cond_magic: _COND_MAGIC,
-    __pthread_cond_data: 0
-};
-pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
-    __pthread_rwlock_readers: 0,
-    __pthread_rwlock_type: PTHREAD_PROCESS_PRIVATE,
-    __pthread_rwlock_magic: _RWL_MAGIC,
-    __pthread_rwlock_mutex: PTHREAD_MUTEX_INITIALIZER,
-    __pthread_rwlock_readercv: PTHREAD_COND_INITIALIZER,
-    __pthread_rwlock_writercv: PTHREAD_COND_INITIALIZER
-};
-pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
-pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
-pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 4;
-pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
-
-pub const RTLD_NEXT: *mut ::c_void = -1isize as *mut ::c_void;
-pub const RTLD_DEFAULT: *mut ::c_void = -2isize as *mut ::c_void;
-pub const RTLD_SELF: *mut ::c_void = -3isize as *mut ::c_void;
-pub const RTLD_PROBE: *mut ::c_void = -4isize as *mut ::c_void;
-
-pub const RTLD_NOW: ::c_int = 0x2;
-pub const RTLD_NOLOAD: ::c_int = 0x4;
-pub const RTLD_GLOBAL: ::c_int = 0x100;
-pub const RTLD_LOCAL: ::c_int = 0x0;
-pub const RTLD_PARENT: ::c_int = 0x200;
-pub const RTLD_GROUP: ::c_int = 0x400;
-pub const RTLD_WORLD: ::c_int = 0x800;
-pub const RTLD_NODELETE: ::c_int = 0x1000;
-pub const RTLD_FIRST: ::c_int = 0x2000;
-pub const RTLD_CONFGEN: ::c_int = 0x10000;
-
-pub const PORT_SOURCE_AIO: ::c_int = 1;
-pub const PORT_SOURCE_TIMER: ::c_int = 2;
-pub const PORT_SOURCE_USER: ::c_int = 3;
-pub const PORT_SOURCE_FD: ::c_int = 4;
-pub const PORT_SOURCE_ALERT: ::c_int = 5;
-pub const PORT_SOURCE_MQ: ::c_int = 6;
-pub const PORT_SOURCE_FILE: ::c_int = 7;
-pub const PORT_SOURCE_POSTWAIT: ::c_int = 8;
-pub const PORT_SOURCE_SIGNAL: ::c_int = 9;
-
-f! {
-    pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
-        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
-        let fd = fd as usize;
-        (*set).fds_bits[fd / bits] &= !(1 << (fd % bits));
-        return
-    }
-
-    pub fn FD_ISSET(fd: ::c_int, set: *mut fd_set) -> bool {
-        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
-        let fd = fd as usize;
-        return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0
-    }
-
-    pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () {
-        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
-        let fd = fd as usize;
-        (*set).fds_bits[fd / bits] |= 1 << (fd % bits);
-        return
-    }
-
-    pub fn FD_ZERO(set: *mut fd_set) -> () {
-        for slot in (*set).fds_bits.iter_mut() {
-            *slot = 0;
-        }
-    }
-
-    pub fn WIFEXITED(status: ::c_int) -> bool {
-        (status & 0xFF) == 0
-    }
-
-    pub fn WEXITSTATUS(status: ::c_int) -> ::c_int {
-        (status >> 8) & 0xFF
-    }
-
-    pub fn WTERMSIG(status: ::c_int) -> ::c_int {
-        status & 0x7F
-    }
-}
-
-extern {
-    pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int;
-    pub fn freeifaddrs(ifa: *mut ::ifaddrs);
-
-    pub fn stack_getbounds(sp: *mut ::stack_t) -> ::c_int;
-    pub fn mincore(addr: *const ::c_void, len: ::size_t,
-                   vec: *mut c_char) -> ::c_int;
-    pub fn setgroups(ngroups: ::c_int,
-                     ptr: *const ::gid_t) -> ::c_int;
-    pub fn ioctl(fildes: ::c_int, request: ::c_int, ...) -> ::c_int;
-    pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int)
-                    -> ::c_int;
-    pub fn clock_getres(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
-    pub fn clock_gettime(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
-    pub fn clock_nanosleep(clk_id: clockid_t,
-                           flags: ::c_int,
-                           rqtp: *const ::timespec,
-                           rmtp:  *mut ::timespec) -> ::c_int;
-    pub fn clock_settime(clk_id: clockid_t, tp: *const ::timespec) -> ::c_int;
-    pub fn getnameinfo(sa: *const ::sockaddr,
-                       salen: ::socklen_t,
-                       host: *mut ::c_char,
-                       hostlen: ::socklen_t,
-                       serv: *mut ::c_char,
-                       sevlen: ::socklen_t,
-                       flags: ::c_int) -> ::c_int;
-    #[link_name = "__posix_getpwnam_r"]
-    pub fn getpwnam_r(name: *const ::c_char,
-                      pwd: *mut passwd,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut passwd) -> ::c_int;
-
-    #[link_name = "__posix_getpwuid_r"]
-    pub fn getpwuid_r(uid: ::uid_t,
-                      pwd: *mut passwd,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut passwd) -> ::c_int;
-    pub fn setpwent();
-    pub fn getpwent() -> *mut passwd;
-    pub fn fdatasync(fd: ::c_int) -> ::c_int;
-    pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char;
-    pub fn duplocale(base: ::locale_t) -> ::locale_t;
-    pub fn freelocale(loc: ::locale_t);
-    pub fn newlocale(mask: ::c_int,
-                     locale: *const ::c_char,
-                     base: ::locale_t) -> ::locale_t;
-    pub fn uselocale(loc: ::locale_t) -> ::locale_t;
-    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;
-    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 fdopendir(fd: ::c_int) -> *mut ::DIR;
-
-    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,
-                    mode: ::mode_t) -> ::c_int;
-    pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
-    pub fn if_nameindex() -> *mut if_nameindex;
-    pub fn if_freenameindex(ptr: *mut if_nameindex);
-    pub fn pthread_condattr_getclock(attr: *const pthread_condattr_t,
-                                     clock_id: *mut clockid_t) -> ::c_int;
-    pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
-                                     clock_id: clockid_t) -> ::c_int;
-    pub fn sem_timedwait(sem: *mut sem_t,
-                         abstime: *const ::timespec) -> ::c_int;
-    pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
-                                   abstime: *const ::timespec) -> ::c_int;
-    pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t,
-                  options: ::c_int) -> ::c_int;
-
-    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;
-
-    pub fn globfree(pglob: *mut ::glob_t);
-
-    pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
-                         -> ::c_int;
-
-    pub fn shm_unlink(name: *const ::c_char) -> ::c_int;
-
-    pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long);
-
-    pub fn telldir(dirp: *mut ::DIR) -> ::c_long;
-    pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
-                  -> ::c_int;
-
-    pub fn msync(addr: *mut ::c_void, len: ::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;
-    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 nl_langinfo(item: ::nl_item) -> *mut ::c_char;
-
-    pub fn bind(socket: ::c_int, address: *const ::sockaddr,
-                address_len: ::socklen_t) -> ::c_int;
-
-    pub fn writev(fd: ::c_int,
-                  iov: *const ::iovec,
-                  iovcnt: ::c_int) -> ::ssize_t;
-    pub fn readv(fd: ::c_int,
-                 iov: *const ::iovec,
-                 iovcnt: ::c_int) -> ::ssize_t;
-
-    pub fn sendmsg(fd: ::c_int,
-                   msg: *const ::msghdr,
-                   flags: ::c_int) -> ::ssize_t;
-    pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
-                   -> ::ssize_t;
-
-    pub fn port_create() -> ::c_int;
-    pub fn port_associate(port: ::c_int, source: ::c_int, object: ::uintptr_t,
-                          events: ::c_int, user: ::uintptr_t) -> ::c_int;
-    pub fn port_dissociate(port: ::c_int, source: ::c_int, object: ::uintptr_t)
-                           -> ::c_int;
-    pub fn port_get(port: ::c_int, pe: *mut port_event,
-                    timeout: *const ::timespec) -> ::c_int;
-    pub fn port_getn(port: ::c_int, pe_list: *mut port_event, max: ::c_uint,
-                     nget: *mut ::c_uint, timeout: *const ::timespec)
-                     -> ::c_int;
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/uclibc/mips/mips32.rs
+++ /dev/null
@@ -1,269 +0,0 @@
-pub type c_char = i8;
-pub type c_long = i32;
-pub type c_ulong = u32;
-pub type clock_t = i32;
-pub type time_t = i32;
-pub type suseconds_t = i32;
-pub type wchar_t = i32;
-pub type off_t = i32;
-pub type ino_t = u32;
-pub type blkcnt_t = i32;
-pub type blksize_t = i32;
-pub type nlink_t = u32;
-pub type fsblkcnt_t = ::c_ulong;
-pub type fsfilcnt_t = ::c_ulong;
-pub type rlim_t = c_ulong;
-
-s! {
-    pub struct stat {
-        pub st_dev: ::dev_t,
-        st_pad1: [::c_long; 2],
-        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,
-        pub st_pad2: [::c_long; 1],
-        pub st_size: ::off_t,
-        st_pad3: ::c_long,
-        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,
-        pub st_blksize: ::blksize_t,
-        pub st_blocks: ::blkcnt_t,
-        st_pad5: [::c_long; 14],
-    }
-
-    pub struct stat64 {
-        pub st_dev: ::dev_t,
-        st_pad1: [::c_long; 2],
-        pub st_ino: ::ino64_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,
-        st_pad2: [::c_long; 2],
-        pub st_size: ::off64_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,
-        pub st_blksize: ::blksize_t,
-        st_pad3: ::c_long,
-        pub st_blocks: ::blkcnt64_t,
-        st_pad5: [::c_long; 14],
-    }
-
-    pub struct pthread_attr_t {
-        __size: [u32; 9]
-    }
-
-    pub struct sigaction {
-        pub sa_flags: ::c_uint,
-        pub sa_sigaction: ::sighandler_t,
-        pub sa_mask: sigset_t,
-        _restorer: *mut ::c_void,
-    }
-
-    pub struct stack_t {
-        pub ss_sp: *mut ::c_void,
-        pub ss_size: ::size_t,
-        pub ss_flags: ::c_int,
-    }
-
-    pub struct sigset_t {
-        __val: [::c_ulong; 4],
-    }
-
-    pub struct siginfo_t {
-        pub si_signo: ::c_int,
-        pub si_code: ::c_int,
-        pub si_errno: ::c_int,
-        pub _pad: [::c_int; 29],
-    }
-
-    pub struct glob64_t {
-        pub gl_pathc: ::size_t,
-        pub gl_pathv: *mut *mut ::c_char,
-        pub gl_offs: ::size_t,
-        pub gl_flags: ::c_int,
-
-        __unused1: *mut ::c_void,
-        __unused2: *mut ::c_void,
-        __unused3: *mut ::c_void,
-        __unused4: *mut ::c_void,
-        __unused5: *mut ::c_void,
-    }
-
-    pub struct ipc_perm {
-        pub __key: ::key_t,
-        pub uid: ::uid_t,
-        pub gid: ::gid_t,
-        pub cuid: ::uid_t,
-        pub cgid: ::gid_t,
-        pub mode: ::c_uint,
-        pub __seq: ::c_ushort,
-        __pad1: ::c_ushort,
-        __unused1: ::c_ulong,
-        __unused2: ::c_ulong
-    }
-
-    pub struct shmid_ds {
-        pub shm_perm: ::ipc_perm,
-        pub shm_segsz: ::size_t,
-        pub shm_atime: ::time_t,
-        pub shm_dtime: ::time_t,
-        pub shm_ctime: ::time_t,
-        pub shm_cpid: ::pid_t,
-        pub shm_lpid: ::pid_t,
-        pub shm_nattch: ::shmatt_t,
-        __unused4: ::c_ulong,
-        __unused5: ::c_ulong
-    }
-
-    pub struct msqid_ds {
-        pub msg_perm: ::ipc_perm,
-        #[cfg(target_endian = "big")]
-        __glibc_reserved1: ::c_ulong,
-        pub msg_stime: ::time_t,
-        #[cfg(target_endian = "little")]
-        __glibc_reserved1: ::c_ulong,
-        #[cfg(target_endian = "big")]
-        __glibc_reserved2: ::c_ulong,
-        pub msg_rtime: ::time_t,
-        #[cfg(target_endian = "little")]
-        __glibc_reserved2: ::c_ulong,
-        #[cfg(target_endian = "big")]
-        __glibc_reserved3: ::c_ulong,
-        pub msg_ctime: ::time_t,
-        #[cfg(target_endian = "little")]
-        __glibc_reserved3: ::c_ulong,
-        __msg_cbytes: ::c_ulong,
-        pub msg_qnum: ::msgqnum_t,
-        pub msg_qbytes: ::msglen_t,
-        pub msg_lspid: ::pid_t,
-        pub msg_lrpid: ::pid_t,
-        __glibc_reserved4: ::c_ulong,
-        __glibc_reserved5: ::c_ulong,
-    }
-
-    pub struct statfs {
-        pub f_type: ::c_long,
-        pub f_bsize: ::c_long,
-        pub f_frsize: ::c_long,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_files: ::fsblkcnt_t,
-        pub f_ffree: ::fsblkcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_fsid: ::fsid_t,
-
-        pub f_namelen: ::c_long,
-        f_spare: [::c_long; 6],
-    }
-
-    pub struct msghdr {
-        pub msg_name: *mut ::c_void,
-        pub msg_namelen: ::socklen_t,
-        pub msg_iov: *mut ::iovec,
-        pub msg_iovlen: ::c_int,
-        pub msg_control: *mut ::c_void,
-        pub msg_controllen: ::size_t,
-        pub msg_flags: ::c_int,
-    }
-
-    pub struct cmsghdr {
-        pub cmsg_len: ::size_t,
-        pub cmsg_level: ::c_int,
-        pub cmsg_type: ::c_int,
-    }
-
-    pub struct termios {
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_line: ::cc_t,
-        pub c_cc: [::cc_t; ::NCCS],
-    }
-
-    pub struct flock {
-        pub l_type: ::c_short,
-        pub l_whence: ::c_short,
-        pub l_start: ::off_t,
-        pub l_len: ::off_t,
-        pub l_sysid: ::c_long,
-        pub l_pid: ::pid_t,
-        pad: [::c_long; 4],
-    }
-
-    pub struct sysinfo {
-        pub uptime: ::c_long,
-        pub loads: [::c_ulong; 3],
-        pub totalram: ::c_ulong,
-        pub freeram: ::c_ulong,
-        pub sharedram: ::c_ulong,
-        pub bufferram: ::c_ulong,
-        pub totalswap: ::c_ulong,
-        pub freeswap: ::c_ulong,
-        pub procs: ::c_ushort,
-        pub pad: ::c_ushort,
-        pub totalhigh: ::c_ulong,
-        pub freehigh: ::c_ulong,
-        pub mem_unit: ::c_uint,
-        pub _f: [::c_char; 8],
-    }
-
-    // FIXME this is actually a union
-    pub struct sem_t {
-        #[cfg(target_pointer_width = "32")]
-        __size: [::c_char; 16],
-        #[cfg(target_pointer_width = "64")]
-        __size: [::c_char; 32],
-        __align: [::c_long; 0],
-    }
-}
-
-pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
-pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24;
-pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
-pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
-
-pub const RLIM_INFINITY: ::rlim_t = 0x7fffffff;
-
-pub const SYS_gettid: ::c_long = 4222;   // Valid for O32
-
-#[link(name = "util")]
-extern {
-    pub fn sysctl(name: *mut ::c_int,
-                  namelen: ::c_int,
-                  oldp: *mut ::c_void,
-                  oldlenp: *mut ::size_t,
-                  newp: *mut ::c_void,
-                  newlen: ::size_t)
-                  -> ::c_int;
-    pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
-    pub fn backtrace(buf: *mut *mut ::c_void,
-                     sz: ::c_int) -> ::c_int;
-    pub fn glob64(pattern: *const ::c_char,
-                  flags: ::c_int,
-                  errfunc: ::dox::Option<extern fn(epath: *const ::c_char,
-                                                   errno: ::c_int)
-                                                   -> ::c_int>,
-                  pglob: *mut glob64_t) -> ::c_int;
-    pub fn globfree64(pglob: *mut glob64_t);
-    pub fn ptrace(request: ::c_uint, ...) -> ::c_long;
-    pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t,
-                                       cpusetsize: ::size_t,
-                                       cpuset: *mut ::cpu_set_t) -> ::c_int;
-    pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t,
-                                       cpusetsize: ::size_t,
-                                       cpuset: *const ::cpu_set_t) -> ::c_int;
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/uclibc/mips/mips64.rs
+++ /dev/null
@@ -1,209 +0,0 @@
-pub type blkcnt_t = i64;
-pub type blksize_t = i64;
-pub type c_char = i8;
-pub type c_long = i64;
-pub type c_ulong = u64;
-pub type fsblkcnt_t = ::c_ulong;
-pub type fsfilcnt_t = ::c_ulong;
-pub type ino_t = u64;
-pub type nlink_t = u64;
-pub type off_t = i64;
-pub type rlim_t = ::c_ulong;
-pub type suseconds_t = i64;
-pub type time_t = i64;
-pub type wchar_t = i32;
-
-s! {
-    pub struct stat {
-        pub st_dev: ::c_ulong,
-        st_pad1: [::c_long; 2],
-        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: ::c_ulong,
-        st_pad2: [::c_ulong; 1],
-        pub st_size: ::off_t,
-        st_pad3: ::c_long,
-        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,
-        pub st_blksize: ::blksize_t,
-        st_pad4: ::c_long,
-        pub st_blocks: ::blkcnt_t,
-        st_pad5: [::c_long; 7],
-    }
-
-    pub struct stat64 {
-        pub st_dev: ::c_ulong,
-        st_pad1: [::c_long; 2],
-        pub st_ino: ::ino64_t,
-        pub st_mode: ::mode_t,
-        pub st_nlink: ::nlink_t,
-        pub st_uid: ::uid_t,
-        pub st_gid: ::gid_t,
-        pub st_rdev: ::c_ulong,
-        st_pad2: [::c_long; 2],
-        pub st_size: ::off64_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,
-        pub st_blksize: ::blksize_t,
-        st_pad3: ::c_long,
-        pub st_blocks: ::blkcnt64_t,
-        st_pad5: [::c_long; 7],
-    }
-
-    pub struct pthread_attr_t {
-        __size: [::c_ulong; 7]
-    }
-
-    pub struct sigaction {
-        pub sa_flags: ::c_int,
-        pub sa_sigaction: ::sighandler_t,
-        pub sa_mask: sigset_t,
-        _restorer: *mut ::c_void,
-    }
-
-    pub struct stack_t {
-        pub ss_sp: *mut ::c_void,
-        pub ss_size: ::size_t,
-        pub ss_flags: ::c_int,
-    }
-
-    pub struct sigset_t {
-        __size: [::c_ulong; 16],
-    }
-
-    pub struct siginfo_t {
-        pub si_signo: ::c_int,
-        pub si_code: ::c_int,
-        pub si_errno: ::c_int,
-        _pad: ::c_int,
-        _pad2: [::c_long; 14],
-    }
-
-    pub struct ipc_perm {
-        pub __key: ::key_t,
-        pub uid: ::uid_t,
-        pub gid: ::gid_t,
-        pub cuid: ::uid_t,
-        pub cgid: ::gid_t,
-        pub mode: ::c_uint,
-        pub __seq: ::c_ushort,
-        __pad1: ::c_ushort,
-        __unused1: ::c_ulong,
-        __unused2: ::c_ulong
-    }
-
-    pub struct shmid_ds {
-        pub shm_perm: ::ipc_perm,
-        pub shm_segsz: ::size_t,
-        pub shm_atime: ::time_t,
-        pub shm_dtime: ::time_t,
-        pub shm_ctime: ::time_t,
-        pub shm_cpid: ::pid_t,
-        pub shm_lpid: ::pid_t,
-        pub shm_nattch: ::shmatt_t,
-        __unused4: ::c_ulong,
-        __unused5: ::c_ulong
-    }
-
-    pub struct msqid_ds {
-        pub msg_perm: ::ipc_perm,
-        pub msg_stime: ::time_t,
-        pub msg_rtime: ::time_t,
-        pub msg_ctime: ::time_t,
-        __msg_cbytes: ::c_ulong,
-        pub msg_qnum: ::msgqnum_t,
-        pub msg_qbytes: ::msglen_t,
-        pub msg_lspid: ::pid_t,
-        pub msg_lrpid: ::pid_t,
-        __glibc_reserved4: ::c_ulong,
-        __glibc_reserved5: ::c_ulong,
-    }
-
-    pub struct statfs {
-        pub f_type: ::c_long,
-        pub f_bsize: ::c_long,
-        pub f_frsize: ::c_long,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_files: ::fsblkcnt_t,
-        pub f_ffree: ::fsblkcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_fsid: ::fsid_t,
-
-        pub f_namelen: ::c_long,
-        f_spare: [::c_long; 6],
-    }
-
-    pub struct msghdr {
-        pub msg_name: *mut ::c_void,
-        pub msg_namelen: ::socklen_t,
-        pub msg_iov: *mut ::iovec,
-        pub msg_iovlen: ::size_t,
-        pub msg_control: *mut ::c_void,
-        pub msg_controllen: ::size_t,
-        pub msg_flags: ::c_int,
-    }
-
-    pub struct cmsghdr {
-        pub cmsg_len: ::size_t,
-        pub cmsg_level: ::c_int,
-        pub cmsg_type: ::c_int,
-    }
-
-    pub struct termios {
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_line: ::cc_t,
-        pub c_cc: [::cc_t; ::NCCS],
-    }
-
-    pub struct sysinfo {
-        pub uptime: ::c_long,
-        pub loads: [::c_ulong; 3],
-        pub totalram: ::c_ulong,
-        pub freeram: ::c_ulong,
-        pub sharedram: ::c_ulong,
-        pub bufferram: ::c_ulong,
-        pub totalswap: ::c_ulong,
-        pub freeswap: ::c_ulong,
-        pub procs: ::c_ushort,
-        pub pad: ::c_ushort,
-        pub totalhigh: ::c_ulong,
-        pub freehigh: ::c_ulong,
-        pub mem_unit: ::c_uint,
-        pub _f: [::c_char; 0],
-    }
-
-    // FIXME this is actually a union
-    pub struct sem_t {
-        __size: [::c_char; 32],
-        __align: [::c_long; 0],
-    }
-}
-
-pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
-pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
-pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
-pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
-
-pub const RLIM_INFINITY: ::rlim_t = 0xffff_ffff_ffff_ffff;
-
-pub const SYS_gettid: ::c_long = 5178;   // Valid for n64
-
-#[link(name = "util")]
-extern {
-    pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/uclibc/mips/mod.rs
+++ /dev/null
@@ -1,476 +0,0 @@
-pub const SFD_CLOEXEC: ::c_int = 0x080000;
-
-pub const NCCS: usize = 32;
-
-pub const O_TRUNC: ::c_int = 512;
-
-pub const O_CLOEXEC: ::c_int = 0x80000;
-
-pub const EBFONT: ::c_int = 59;
-pub const ENOSTR: ::c_int = 60;
-pub const ENODATA: ::c_int = 61;
-pub const ETIME: ::c_int = 62;
-pub const ENOSR: ::c_int = 63;
-pub const ENONET: ::c_int = 64;
-pub const ENOPKG: ::c_int = 65;
-pub const EREMOTE: ::c_int = 66;
-pub const ENOLINK: ::c_int = 67;
-pub const EADV: ::c_int = 68;
-pub const ESRMNT: ::c_int = 69;
-pub const ECOMM: ::c_int = 70;
-pub const EPROTO: ::c_int = 71;
-pub const EDOTDOT: ::c_int = 73;
-
-pub const SA_NODEFER: ::c_int = 0x40000000;
-pub const SA_RESETHAND: ::c_int = 0x80000000;
-pub const SA_RESTART: ::c_int = 0x10000000;
-pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
-
-pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
-
-pub const EFD_CLOEXEC: ::c_int = 0x80000;
-
-pub const BUFSIZ: ::c_uint = 4096;
-pub const TMP_MAX: ::c_uint = 238328;
-pub const FOPEN_MAX: ::c_uint = 16;
-pub const POSIX_FADV_DONTNEED: ::c_int = 4;
-pub const POSIX_FADV_NOREUSE: ::c_int = 5;
-pub const POSIX_MADV_DONTNEED: ::c_int = 4;
-pub const _SC_2_C_VERSION: ::c_int = 96;
-pub const O_ACCMODE: ::c_int = 3;
-pub const O_DIRECT: ::c_int = 0x8000;
-pub const O_DIRECTORY: ::c_int = 0x10000;
-pub const O_NOFOLLOW: ::c_int = 0x20000;
-pub const ST_RELATIME: ::c_ulong = 4096;
-pub const NI_MAXHOST: ::socklen_t = 1025;
-
-pub const RLIMIT_NOFILE: ::c_int = 5;
-pub const RLIMIT_AS: ::c_int = 6;
-pub const RLIMIT_RSS: ::c_int = 7;
-pub const RLIMIT_NPROC: ::c_int = 8;
-pub const RLIMIT_MEMLOCK: ::c_int = 9;
-pub const RLIMIT_NLIMITS: ::c_int = 15;
-
-pub const O_APPEND: ::c_int = 8;
-pub const O_CREAT: ::c_int = 256;
-pub const O_EXCL: ::c_int = 1024;
-pub const O_NOCTTY: ::c_int = 2048;
-pub const O_NONBLOCK: ::c_int = 128;
-pub const O_SYNC: ::c_int = 0x10;
-pub const O_RSYNC: ::c_int = 0x10;
-pub const O_DSYNC: ::c_int = 0x10;
-pub const O_FSYNC: ::c_int = 0x10;
-pub const O_ASYNC: ::c_int = 0x1000;
-pub const O_NDELAY: ::c_int = 0x80;
-
-pub const SOCK_NONBLOCK: ::c_int = 128;
-
-pub const EDEADLK: ::c_int = 45;
-pub const ENAMETOOLONG: ::c_int = 78;
-pub const ENOLCK: ::c_int = 46;
-pub const ENOSYS: ::c_int = 89;
-pub const ENOTEMPTY: ::c_int = 93;
-pub const ELOOP: ::c_int = 90;
-pub const ENOMSG: ::c_int = 35;
-pub const EIDRM: ::c_int = 36;
-pub const ECHRNG: ::c_int = 37;
-pub const EL2NSYNC: ::c_int = 38;
-pub const EL3HLT: ::c_int = 39;
-pub const EL3RST: ::c_int = 40;
-pub const ELNRNG: ::c_int = 41;
-pub const EUNATCH: ::c_int = 42;
-pub const ENOCSI: ::c_int = 43;
-pub const EL2HLT: ::c_int = 44;
-pub const EBADE: ::c_int = 50;
-pub const EBADR: ::c_int = 51;
-pub const EXFULL: ::c_int = 52;
-pub const ENOANO: ::c_int = 53;
-pub const EBADRQC: ::c_int = 54;
-pub const EBADSLT: ::c_int = 55;
-pub const EDEADLOCK: ::c_int = 56;
-pub const EMULTIHOP: ::c_int = 74;
-pub const EOVERFLOW: ::c_int = 79;
-pub const ENOTUNIQ: ::c_int = 80;
-pub const EBADFD: ::c_int = 81;
-pub const EBADMSG: ::c_int = 77;
-pub const EREMCHG: ::c_int = 82;
-pub const ELIBACC: ::c_int = 83;
-pub const ELIBBAD: ::c_int = 84;
-pub const ELIBSCN: ::c_int = 85;
-pub const ELIBMAX: ::c_int = 86;
-pub const ELIBEXEC: ::c_int = 87;
-pub const EILSEQ: ::c_int = 88;
-pub const ERESTART: ::c_int = 91;
-pub const ESTRPIPE: ::c_int = 92;
-pub const EUSERS: ::c_int = 94;
-pub const ENOTSOCK: ::c_int = 95;
-pub const EDESTADDRREQ: ::c_int = 96;
-pub const EMSGSIZE: ::c_int = 97;
-pub const EPROTOTYPE: ::c_int = 98;
-pub const ENOPROTOOPT: ::c_int = 99;
-pub const EPROTONOSUPPORT: ::c_int = 120;
-pub const ESOCKTNOSUPPORT: ::c_int = 121;
-pub const EOPNOTSUPP: ::c_int = 122;
-pub const ENOTSUP: ::c_int = EOPNOTSUPP;
-pub const EPFNOSUPPORT: ::c_int = 123;
-pub const EAFNOSUPPORT: ::c_int = 124;
-pub const EADDRINUSE: ::c_int = 125;
-pub const EADDRNOTAVAIL: ::c_int = 126;
-pub const ENETDOWN: ::c_int = 127;
-pub const ENETUNREACH: ::c_int = 128;
-pub const ENETRESET: ::c_int = 129;
-pub const ECONNABORTED: ::c_int = 130;
-pub const ECONNRESET: ::c_int = 131;
-pub const ENOBUFS: ::c_int = 132;
-pub const EISCONN: ::c_int = 133;
-pub const ENOTCONN: ::c_int = 134;
-pub const ESHUTDOWN: ::c_int = 143;
-pub const ETOOMANYREFS: ::c_int = 144;
-pub const ETIMEDOUT: ::c_int = 145;
-pub const ECONNREFUSED: ::c_int = 146;
-pub const EHOSTDOWN: ::c_int = 147;
-pub const EHOSTUNREACH: ::c_int = 148;
-pub const EALREADY: ::c_int = 149;
-pub const EINPROGRESS: ::c_int = 150;
-pub const ESTALE: ::c_int = 151;
-pub const EUCLEAN: ::c_int = 135;
-pub const ENOTNAM: ::c_int = 137;
-pub const ENAVAIL: ::c_int = 138;
-pub const EISNAM: ::c_int = 139;
-pub const EREMOTEIO: ::c_int = 140;
-pub const EDQUOT: ::c_int = 1133;
-pub const ENOMEDIUM: ::c_int = 159;
-pub const EMEDIUMTYPE: ::c_int = 160;
-pub const ECANCELED: ::c_int = 158;
-pub const ENOKEY: ::c_int = 161;
-pub const EKEYEXPIRED: ::c_int = 162;
-pub const EKEYREVOKED: ::c_int = 163;
-pub const EKEYREJECTED: ::c_int = 164;
-pub const EOWNERDEAD: ::c_int = 165;
-pub const ENOTRECOVERABLE: ::c_int = 166;
-pub const ERFKILL: ::c_int = 167;
-
-pub const MAP_NORESERVE: ::c_int = 0x400;
-pub const MAP_ANON: ::c_int = 0x800;
-pub const MAP_ANONYMOUS: ::c_int = 0x800;
-pub const MAP_GROWSDOWN: ::c_int = 0x1000;
-pub const MAP_DENYWRITE: ::c_int = 0x2000;
-pub const MAP_EXECUTABLE: ::c_int = 0x4000;
-pub const MAP_LOCKED: ::c_int = 0x8000;
-pub const MAP_POPULATE: ::c_int = 0x10000;
-pub const MAP_NONBLOCK: ::c_int = 0x20000;
-pub const MAP_STACK: ::c_int = 0x40000;
-
-pub const SOCK_STREAM: ::c_int = 2;
-pub const SOCK_DGRAM: ::c_int = 1;
-pub const SOCK_SEQPACKET: ::c_int = 5;
-
-pub const SOL_SOCKET: ::c_int = 0xffff;
-
-pub const SO_REUSEADDR: ::c_int = 0x0004;
-pub const SO_KEEPALIVE: ::c_int = 0x0008;
-pub const SO_DONTROUTE: ::c_int = 0x0010;
-pub const SO_BROADCAST: ::c_int = 0x0020;
-pub const SO_LINGER: ::c_int = 0x0080;
-pub const SO_OOBINLINE: ::c_int = 0x0100;
-pub const SO_REUSEPORT: ::c_int = 0x0200;
-pub const SO_TYPE: ::c_int = 0x1008;
-pub const SO_STYLE: ::c_int = SO_TYPE;
-pub const SO_ERROR: ::c_int = 0x1007;
-pub const SO_SNDBUF: ::c_int = 0x1001;
-pub const SO_RCVBUF: ::c_int = 0x1002;
-pub const SO_SNDLOWAT: ::c_int = 0x1003;
-pub const SO_RCVLOWAT: ::c_int = 0x1004;
-pub const SO_SNDTIMEO: ::c_int = 0x1005;
-pub const SO_RCVTIMEO: ::c_int = 0x1006;
-pub const SO_ACCEPTCONN: ::c_int = 0x1009;
-pub const SO_PROTOCOL: ::c_int = 0x1028;
-pub const SO_DOMAIN: ::c_int = 0x1029;
-pub const SO_NO_CHECK: ::c_int = 11;
-pub const SO_PRIORITY: ::c_int = 12;
-pub const SO_BSDCOMPAT: ::c_int = 14;
-pub const SO_PASSCRED: ::c_int = 17;
-pub const SO_PEERCRED: ::c_int = 18;
-pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22;
-pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23;
-pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24;
-pub const SO_BINDTODEVICE: ::c_int = 25;
-pub const SO_ATTACH_FILTER: ::c_int = 26;
-pub const SO_DETACH_FILTER: ::c_int = 27;
-pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
-pub const SO_PEERNAME: ::c_int = 28;
-pub const SO_TIMESTAMP: ::c_int = 29;
-pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP;
-pub const SO_PEERSEC: ::c_int = 30;
-pub const SO_SNDBUFFORCE: ::c_int = 31;
-pub const SO_RCVBUFFORCE: ::c_int = 33;
-pub const SO_PASSSEC: ::c_int = 34;
-pub const SO_TIMESTAMPNS: ::c_int = 35;
-pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
-pub const SO_MARK: ::c_int = 36;
-pub const SO_TIMESTAMPING: ::c_int = 37;
-pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING;
-pub const SO_RXQ_OVFL: ::c_int = 40;
-pub const SO_WIFI_STATUS: ::c_int = 41;
-pub const SCM_WIFI_STATUS: ::c_int = SO_WIFI_STATUS;
-pub const SO_PEEK_OFF: ::c_int = 42;
-pub const SO_NOFCS: ::c_int = 43;
-pub const SO_LOCK_FILTER: ::c_int = 44;
-pub const SO_SELECT_ERR_QUEUE: ::c_int = 45;
-pub const SO_BUSY_POLL: ::c_int = 46;
-pub const SO_MAX_PACING_RATE: ::c_int = 47;
-pub const SO_BPF_EXTENSIONS: ::c_int = 48;
-
-pub const FIOCLEX: ::c_ulong = 0x6601;
-pub const FIONBIO: ::c_ulong = 0x667e;
-
-pub const SA_ONSTACK: ::c_int = 0x08000000;
-pub const SA_SIGINFO: ::c_int = 0x00000008;
-pub const SA_NOCLDWAIT: ::c_int = 0x00010000;
-
-pub const SIGCHLD: ::c_int = 18;
-pub const SIGBUS: ::c_int = 10;
-pub const SIGTTIN: ::c_int = 26;
-pub const SIGTTOU: ::c_int = 27;
-pub const SIGXCPU: ::c_int = 30;
-pub const SIGXFSZ: ::c_int = 31;
-pub const SIGVTALRM: ::c_int = 28;
-pub const SIGPROF: ::c_int = 29;
-pub const SIGWINCH: ::c_int = 20;
-pub const SIGUSR1: ::c_int = 16;
-pub const SIGUSR2: ::c_int = 17;
-pub const SIGCONT: ::c_int = 25;
-pub const SIGSTOP: ::c_int = 23;
-pub const SIGTSTP: ::c_int = 24;
-pub const SIGURG: ::c_int = 21;
-pub const SIGIO: ::c_int = 22;
-pub const SIGSYS: ::c_int = 12;
-pub const SIGPOLL: ::c_int = 22;
-pub const SIGPWR: ::c_int = 19;
-pub const SIG_SETMASK: ::c_int = 3;
-pub const SIG_BLOCK: ::c_int = 0x1;
-pub const SIG_UNBLOCK: ::c_int = 0x2;
-
-pub const POLLRDNORM: ::c_short = 0x040;
-pub const POLLWRNORM: ::c_short = 0x004;
-pub const POLLRDBAND: ::c_short = 0x080;
-pub const POLLWRBAND: ::c_short = 0x100;
-
-pub const PTHREAD_STACK_MIN: ::size_t = 16384;
-
-pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;
-pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff;
-pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245;
-pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45;
-pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53;
-pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53;
-pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53;
-pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53;
-pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849;
-pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6;
-pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660;
-pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6;
-pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f;
-pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f;
-pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468;
-pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478;
-pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44;
-pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c;
-pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969;
-pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1;
-pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0;
-pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f;
-pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973;
-pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b;
-pub const TMPFS_MAGIC: ::c_long = 0x01021994;
-pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2;
-
-pub const VEOF: usize = 16;
-pub const VEOL: usize = 17;
-pub const VEOL2: usize = 6;
-pub const VMIN: usize = 4;
-pub const IEXTEN: ::tcflag_t = 0x00000100;
-pub const TOSTOP: ::tcflag_t = 0x00008000;
-pub const FLUSHO: ::tcflag_t = 0x00002000;
-pub const IUTF8: ::tcflag_t = 0x00004000;
-pub const TCSANOW: ::c_int = 0x540e;
-pub const TCSADRAIN: ::c_int = 0x540f;
-pub const TCSAFLUSH: ::c_int = 0x5410;
-
-pub const CPU_SETSIZE: ::c_int = 0x400;
-
-pub const PTRACE_TRACEME: ::c_uint = 0;
-pub const PTRACE_PEEKTEXT: ::c_uint = 1;
-pub const PTRACE_PEEKDATA: ::c_uint = 2;
-pub const PTRACE_PEEKUSER: ::c_uint = 3;
-pub const PTRACE_POKETEXT: ::c_uint = 4;
-pub const PTRACE_POKEDATA: ::c_uint = 5;
-pub const PTRACE_POKEUSER: ::c_uint = 6;
-pub const PTRACE_CONT: ::c_uint = 7;
-pub const PTRACE_KILL: ::c_uint = 8;
-pub const PTRACE_SINGLESTEP: ::c_uint = 9;
-pub const PTRACE_ATTACH: ::c_uint = 16;
-pub const PTRACE_DETACH: ::c_uint = 17;
-pub const PTRACE_SYSCALL: ::c_uint = 24;
-pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200;
-pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201;
-pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202;
-pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203;
-pub const PTRACE_GETFPREGS: ::c_uint = 14;
-pub const PTRACE_SETFPREGS: ::c_uint = 15;
-pub const PTRACE_GETFPXREGS: ::c_uint = 18;
-pub const PTRACE_SETFPXREGS: ::c_uint = 19;
-pub const PTRACE_GETREGS: ::c_uint = 12;
-pub const PTRACE_SETREGS: ::c_uint = 13;
-
-pub const EFD_NONBLOCK: ::c_int = 0x80;
-
-pub const F_GETLK: ::c_int = 14;
-pub const F_GETOWN: ::c_int = 23;
-pub const F_SETOWN: ::c_int = 24;
-pub const F_SETLK: ::c_int = 6;
-pub const F_SETLKW: ::c_int = 7;
-
-pub const SFD_NONBLOCK: ::c_int = 0x80;
-
-pub const TCGETS: ::c_ulong = 0x540d;
-pub const TCSETS: ::c_ulong = 0x540e;
-pub const TCSETSW: ::c_ulong = 0x540f;
-pub const TCSETSF: ::c_ulong = 0x5410;
-pub const TCGETA: ::c_ulong = 0x5401;
-pub const TCSETA: ::c_ulong = 0x5402;
-pub const TCSETAW: ::c_ulong = 0x5403;
-pub const TCSETAF: ::c_ulong = 0x5404;
-pub const TCSBRK: ::c_ulong = 0x5405;
-pub const TCXONC: ::c_ulong = 0x5406;
-pub const TCFLSH: ::c_ulong = 0x5407;
-pub const TIOCGSOFTCAR: ::c_ulong = 0x5481;
-pub const TIOCSSOFTCAR: ::c_ulong = 0x5482;
-pub const TIOCINQ: ::c_ulong = 0x467f;
-pub const TIOCLINUX: ::c_ulong = 0x5483;
-pub const TIOCGSERIAL: ::c_ulong = 0x5484;
-pub const TIOCEXCL: ::c_ulong = 0x740d;
-pub const TIOCNXCL: ::c_ulong = 0x740e;
-pub const TIOCSCTTY: ::c_ulong = 0x5480;
-pub const TIOCGPGRP: ::c_ulong = 0x40047477;
-pub const TIOCSPGRP: ::c_ulong = 0x80047476;
-pub const TIOCOUTQ: ::c_ulong = 0x7472;
-pub const TIOCSTI: ::c_ulong = 0x5472;
-pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
-pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
-pub const TIOCMGET: ::c_ulong = 0x741d;
-pub const TIOCMBIS: ::c_ulong = 0x741b;
-pub const TIOCMBIC: ::c_ulong = 0x741c;
-pub const TIOCMSET: ::c_ulong = 0x741a;
-pub const FIONREAD: ::c_ulong = 0x467f;
-pub const TIOCCONS: ::c_ulong = 0x80047478;
-
-pub const RTLD_DEEPBIND: ::c_int = 0x10;
-pub const RTLD_GLOBAL: ::c_int = 0x4;
-pub const RTLD_NOLOAD: ::c_int = 0x8;
-
-pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
-pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
-pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
-pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
-pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
-
-pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
-pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
-pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
-pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
-pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
-pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
-pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
-pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
-
-pub const MCL_CURRENT: ::c_int = 0x0001;
-pub const MCL_FUTURE: ::c_int = 0x0002;
-
-pub const SIGSTKSZ: ::size_t = 8192;
-pub const CBAUD: ::tcflag_t = 0o0010017;
-pub const TAB1: ::c_int = 0x00000800;
-pub const TAB2: ::c_int = 0x00001000;
-pub const TAB3: ::c_int = 0x00001800;
-pub const CR1: ::c_int  = 0x00000200;
-pub const CR2: ::c_int  = 0x00000400;
-pub const CR3: ::c_int  = 0x00000600;
-pub const FF1: ::c_int  = 0x00008000;
-pub const BS1: ::c_int  = 0x00002000;
-pub const VT1: ::c_int  = 0x00004000;
-pub const VWERASE: usize = 14;
-pub const VREPRINT: usize = 12;
-pub const VSUSP: usize = 10;
-pub const VSTART: usize = 8;
-pub const VSTOP: usize = 9;
-pub const VDISCARD: usize = 13;
-pub const VTIME: usize = 5;
-pub const IXON: ::tcflag_t = 0x00000400;
-pub const IXOFF: ::tcflag_t = 0x00001000;
-pub const ONLCR: ::tcflag_t = 0x4;
-pub const CSIZE: ::tcflag_t = 0x00000030;
-pub const CS6: ::tcflag_t = 0x00000010;
-pub const CS7: ::tcflag_t = 0x00000020;
-pub const CS8: ::tcflag_t = 0x00000030;
-pub const CSTOPB: ::tcflag_t = 0x00000040;
-pub const CREAD: ::tcflag_t = 0x00000080;
-pub const PARENB: ::tcflag_t = 0x00000100;
-pub const PARODD: ::tcflag_t = 0x00000200;
-pub const HUPCL: ::tcflag_t = 0x00000400;
-pub const CLOCAL: ::tcflag_t = 0x00000800;
-pub const ECHOKE: ::tcflag_t = 0x00000800;
-pub const ECHOE: ::tcflag_t = 0x00000010;
-pub const ECHOK: ::tcflag_t = 0x00000020;
-pub const ECHONL: ::tcflag_t = 0x00000040;
-pub const ECHOPRT: ::tcflag_t = 0x00000400;
-pub const ECHOCTL: ::tcflag_t = 0x00000200;
-pub const ISIG: ::tcflag_t = 0x00000001;
-pub const ICANON: ::tcflag_t = 0x00000002;
-pub const PENDIN: ::tcflag_t = 0x00004000;
-pub const NOFLSH: ::tcflag_t = 0x00000080;
-
-pub const B0: ::speed_t = 0o000000;
-pub const B50: ::speed_t = 0o000001;
-pub const B75: ::speed_t = 0o000002;
-pub const B110: ::speed_t = 0o000003;
-pub const B134: ::speed_t = 0o000004;
-pub const B150: ::speed_t = 0o000005;
-pub const B200: ::speed_t = 0o000006;
-pub const B300: ::speed_t = 0o000007;
-pub const B600: ::speed_t = 0o000010;
-pub const B1200: ::speed_t = 0o000011;
-pub const B1800: ::speed_t = 0o000012;
-pub const B2400: ::speed_t = 0o000013;
-pub const B4800: ::speed_t = 0o000014;
-pub const B9600: ::speed_t = 0o000015;
-pub const B19200: ::speed_t = 0o000016;
-pub const B38400: ::speed_t = 0o000017;
-pub const EXTA: ::speed_t = B19200;
-pub const EXTB: ::speed_t = B38400;
-pub const B57600: ::speed_t = 0o010001;
-pub const B115200: ::speed_t = 0o010002;
-pub const B230400: ::speed_t = 0o010003;
-pub const B460800: ::speed_t = 0o010004;
-pub const B500000: ::speed_t = 0o010005;
-pub const B576000: ::speed_t = 0o010006;
-pub const B921600: ::speed_t = 0o010007;
-pub const B1000000: ::speed_t = 0o010010;
-pub const B1152000: ::speed_t = 0o010011;
-pub const B1500000: ::speed_t = 0o010012;
-pub const B2000000: ::speed_t = 0o010013;
-pub const B2500000: ::speed_t = 0o010014;
-pub const B3000000: ::speed_t = 0o010015;
-pub const B3500000: ::speed_t = 0o010016;
-pub const B4000000: ::speed_t = 0o010017;
-
-cfg_if! {
-    if #[cfg(target_arch = "mips")] {
-        mod mips32;
-        pub use self::mips32::*;
-    } else if #[cfg(target_arch = "mips64")] {
-        mod mips64;
-        pub use self::mips64::*;
-    } else {
-        // Unknown target_arch
-    }
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/uclibc/mod.rs
+++ /dev/null
@@ -1,1769 +0,0 @@
-use dox::{mem, Option};
-
-pub type sa_family_t = u16;
-pub type pthread_key_t = ::c_uint;
-pub type speed_t = ::c_uint;
-pub type tcflag_t = ::c_uint;
-pub type loff_t = ::c_longlong;
-pub type clockid_t = ::c_int;
-pub type key_t = ::c_int;
-pub type id_t = ::c_uint;
-pub type useconds_t = u32;
-pub type dev_t = u64;
-pub type socklen_t = u32;
-pub type pthread_t = ::c_ulong;
-pub type mode_t = u32;
-pub type ino64_t = u64;
-pub type off64_t = i64;
-pub type blkcnt64_t = i64;
-pub type rlim64_t = u64;
-pub type shmatt_t = ::c_ulong;
-pub type mqd_t = ::c_int;
-pub type msgqnum_t = ::c_ulong;
-pub type msglen_t = ::c_ulong;
-pub type nfds_t = ::c_ulong;
-pub type nl_item = ::c_int;
-pub type idtype_t = ::c_uint;
-
-pub enum fpos64_t {} // TODO: fill this out with a struct
-
-pub enum timezone {}
-
-s! {
-    pub struct sockaddr {
-        pub sa_family: sa_family_t,
-        pub sa_data: [::c_char; 14],
-    }
-
-    pub struct sockaddr_in {
-        pub sin_family: sa_family_t,
-        pub sin_port: ::in_port_t,
-        pub sin_addr: ::in_addr,
-        pub sin_zero: [u8; 8],
-    }
-
-    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_un {
-        pub sun_family: sa_family_t,
-        pub sun_path: [::c_char; 108]
-    }
-
-    pub struct sockaddr_storage {
-        pub ss_family: sa_family_t,
-        __ss_align: ::size_t,
-        #[cfg(target_pointer_width = "32")]
-        __ss_pad2: [u8; 128 - 2 * 4],
-        #[cfg(target_pointer_width = "64")]
-        __ss_pad2: [u8; 128 - 2 * 8],
-    }
-
-    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 sockaddr_nl {
-        pub nl_family: ::sa_family_t,
-        nl_pad: ::c_ushort,
-        pub nl_pid: u32,
-        pub nl_groups: u32
-    }
-
-    pub struct sockaddr_ll {
-        pub sll_family: ::c_ushort,
-        pub sll_protocol: ::c_ushort,
-        pub sll_ifindex: ::c_int,
-        pub sll_hatype: ::c_ushort,
-        pub sll_pkttype: ::c_uchar,
-        pub sll_halen: ::c_uchar,
-        pub sll_addr: [::c_uchar; 8]
-    }
-
-    pub struct fd_set {
-        fds_bits: [::c_ulong; FD_SETSIZE / ULONG_SIZE],
-    }
-
-    pub struct tm {
-        pub tm_sec: ::c_int,
-        pub tm_min: ::c_int,
-        pub tm_hour: ::c_int,
-        pub tm_mday: ::c_int,
-        pub tm_mon: ::c_int,
-        pub tm_year: ::c_int,
-        pub tm_wday: ::c_int,
-        pub tm_yday: ::c_int,
-        pub tm_isdst: ::c_int,
-        pub tm_gmtoff: ::c_long,
-        pub tm_zone: *const ::c_char,
-    }
-
-    pub struct sched_param {
-        pub sched_priority: ::c_int,
-    }
-
-    pub struct Dl_info {
-        pub dli_fname: *const ::c_char,
-        pub dli_fbase: *mut ::c_void,
-        pub dli_sname: *const ::c_char,
-        pub dli_saddr: *mut ::c_void,
-    }
-
-    #[cfg_attr(any(all(target_arch = "x86",
-                   target_arch = "x86_64")),
-               repr(packed))]
-    pub struct epoll_event {
-        pub events: ::uint32_t,
-        pub u64: ::uint64_t,
-    }
-
-    pub struct utsname {
-        pub sysname: [::c_char; 65],
-        pub nodename: [::c_char; 65],
-        pub release: [::c_char; 65],
-        pub version: [::c_char; 65],
-        pub machine: [::c_char; 65],
-        pub domainname: [::c_char; 65]
-    }
-
-    pub struct lconv {
-        pub decimal_point: *mut ::c_char,
-        pub thousands_sep: *mut ::c_char,
-        pub grouping: *mut ::c_char,
-        pub int_curr_symbol: *mut ::c_char,
-        pub currency_symbol: *mut ::c_char,
-        pub mon_decimal_point: *mut ::c_char,
-        pub mon_thousands_sep: *mut ::c_char,
-        pub mon_grouping: *mut ::c_char,
-        pub positive_sign: *mut ::c_char,
-        pub negative_sign: *mut ::c_char,
-        pub int_frac_digits: ::c_char,
-        pub frac_digits: ::c_char,
-        pub p_cs_precedes: ::c_char,
-        pub p_sep_by_space: ::c_char,
-        pub n_cs_precedes: ::c_char,
-        pub n_sep_by_space: ::c_char,
-        pub p_sign_posn: ::c_char,
-        pub n_sign_posn: ::c_char,
-        pub int_p_cs_precedes: ::c_char,
-        pub int_p_sep_by_space: ::c_char,
-        pub int_n_cs_precedes: ::c_char,
-        pub int_n_sep_by_space: ::c_char,
-        pub int_p_sign_posn: ::c_char,
-        pub int_n_sign_posn: ::c_char,
-    }
-
-    pub struct sigevent {
-        pub sigev_value: ::sigval,
-        pub sigev_signo: ::c_int,
-        pub sigev_notify: ::c_int,
-        // Actually a union.  We only expose sigev_notify_thread_id because it's
-        // the most useful member
-        pub sigev_notify_thread_id: ::c_int,
-        #[cfg(target_pointer_width = "64")]
-        __unused1: [::c_int; 11],
-        #[cfg(target_pointer_width = "32")]
-        __unused1: [::c_int; 12]
-    }
-
-    pub struct dirent {
-        pub d_ino: ::ino_t,
-        pub d_off: ::off_t,
-        pub d_reclen: ::c_ushort,
-        pub d_type: ::c_uchar,
-        pub d_name: [::c_char; 256],
-    }
-
-    pub struct dirent64 {
-        pub d_ino: ::ino64_t,
-        pub d_off: ::off64_t,
-        pub d_reclen: ::c_ushort,
-        pub d_type: ::c_uchar,
-        pub d_name: [::c_char; 256],
-    }
-
-    pub struct rlimit64 {
-        pub rlim_cur: rlim64_t,
-        pub rlim_max: rlim64_t,
-    }
-
-    pub struct glob_t {
-        pub gl_pathc: ::size_t,
-        pub gl_pathv: *mut *mut c_char,
-        pub gl_offs: ::size_t,
-        pub gl_flags: ::c_int,
-
-        __unused1: *mut ::c_void,
-        __unused2: *mut ::c_void,
-        __unused3: *mut ::c_void,
-        __unused4: *mut ::c_void,
-        __unused5: *mut ::c_void,
-    }
-
-    pub struct ifaddrs {
-        pub ifa_next: *mut ifaddrs,
-        pub ifa_name: *mut c_char,
-        pub ifa_flags: ::c_uint,
-        pub ifa_addr: *mut ::sockaddr,
-        pub ifa_netmask: *mut ::sockaddr,
-        pub ifa_ifu: *mut ::sockaddr, // FIXME This should be a union
-        pub ifa_data: *mut ::c_void
-    }
-
-    pub struct pthread_mutex_t {
-        #[cfg(any(target_arch = "mips", target_arch = "arm",
-                  target_arch = "powerpc"))]
-        __align: [::c_long; 0],
-        #[cfg(not(any(target_arch = "mips", target_arch = "arm",
-                      target_arch = "powerpc")))]
-        __align: [::c_longlong; 0],
-        size: [u8; __SIZEOF_PTHREAD_MUTEX_T],
-    }
-
-    pub struct pthread_rwlock_t {
-        #[cfg(any(target_arch = "mips", target_arch = "arm",
-                  target_arch = "powerpc"))]
-        __align: [::c_long; 0],
-        #[cfg(not(any(target_arch = "mips", target_arch = "arm",
-                      target_arch = "powerpc")))]
-        __align: [::c_longlong; 0],
-        size: [u8; __SIZEOF_PTHREAD_RWLOCK_T],
-    }
-
-    pub struct pthread_mutexattr_t {
-        #[cfg(any(target_arch = "x86_64", target_arch = "powerpc64",
-                  target_arch = "mips64", target_arch = "s390x",
-                  target_arch = "sparc64"))]
-        __align: [::c_int; 0],
-        #[cfg(not(any(target_arch = "x86_64", target_arch = "powerpc64",
-                      target_arch = "mips64", target_arch = "s390x",
-                      target_arch = "sparc64")))]
-        __align: [::c_long; 0],
-        size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T],
-    }
-
-    pub struct pthread_cond_t {
-        __align: [::c_longlong; 0],
-        size: [u8; __SIZEOF_PTHREAD_COND_T],
-    }
-
-    pub struct pthread_condattr_t {
-        __align: [::c_int; 0],
-        size: [u8; __SIZEOF_PTHREAD_CONDATTR_T],
-    }
-
-    pub struct passwd {
-        pub pw_name: *mut ::c_char,
-        pub pw_passwd: *mut ::c_char,
-        pub pw_uid: ::uid_t,
-        pub pw_gid: ::gid_t,
-        pub pw_gecos: *mut ::c_char,
-        pub pw_dir: *mut ::c_char,
-        pub pw_shell: *mut ::c_char,
-    }
-
-    pub struct spwd {
-        pub sp_namp: *mut ::c_char,
-        pub sp_pwdp: *mut ::c_char,
-        pub sp_lstchg: ::c_long,
-        pub sp_min: ::c_long,
-        pub sp_max: ::c_long,
-        pub sp_warn: ::c_long,
-        pub sp_inact: ::c_long,
-        pub sp_expire: ::c_long,
-        pub sp_flag: ::c_ulong,
-    }
-
-    pub struct statvfs {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_files: ::fsfilcnt_t,
-        pub f_ffree: ::fsfilcnt_t,
-        pub f_favail: ::fsfilcnt_t,
-        #[cfg(target_endian = "little")]
-        pub f_fsid: ::c_ulong,
-        #[cfg(target_pointer_width = "32")]
-        __f_unused: ::c_int,
-        #[cfg(target_endian = "big")]
-        pub f_fsid: ::c_ulong,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-        __f_spare: [::c_int; 6],
-    }
-
-    pub struct dqblk {
-        pub dqb_bhardlimit: ::uint32_t,
-        pub dqb_bsoftlimit: ::uint32_t,
-        pub dqb_curblocks: ::uint32_t,
-        pub dqb_ihardlimit: ::uint32_t,
-        pub dqb_isoftlimit: ::uint32_t,
-        pub dqb_curinodes: ::uint32_t,
-        pub dqb_btime: ::time_t,
-        pub dqb_itime: ::time_t,
-    }
-
-    pub struct signalfd_siginfo {
-        pub ssi_signo: ::uint32_t,
-        pub ssi_errno: ::int32_t,
-        pub ssi_code: ::int32_t,
-        pub ssi_pid: ::uint32_t,
-        pub ssi_uid: ::uint32_t,
-        pub ssi_fd: ::int32_t,
-        pub ssi_tid: ::uint32_t,
-        pub ssi_band: ::uint32_t,
-        pub ssi_overrun: ::uint32_t,
-        pub ssi_trapno: ::uint32_t,
-        pub ssi_status: ::int32_t,
-        pub ssi_int: ::int32_t,
-        pub ssi_ptr: ::uint64_t,
-        pub ssi_utime: ::uint64_t,
-        pub ssi_stime: ::uint64_t,
-        pub ssi_addr: ::uint64_t,
-        _pad: [::uint8_t; 48],
-    }
-
-    pub struct fsid_t {
-        __val: [::c_int; 2],
-    }
-
-    pub struct mq_attr {
-        pub mq_flags: ::c_long,
-        pub mq_maxmsg: ::c_long,
-        pub mq_msgsize: ::c_long,
-        pub mq_curmsgs: ::c_long,
-        pad: [::c_long; 4]
-    }
-
-    pub struct cpu_set_t {
-        #[cfg(target_pointer_width = "32")]
-        bits: [u32; 32],
-        #[cfg(target_pointer_width = "64")]
-        bits: [u64; 16],
-    }
-
-    pub struct if_nameindex {
-        pub if_index: ::c_uint,
-        pub if_name: *mut ::c_char,
-    }
-
-    // System V IPC
-    pub struct msginfo {
-        pub msgpool: ::c_int,
-        pub msgmap: ::c_int,
-        pub msgmax: ::c_int,
-        pub msgmnb: ::c_int,
-        pub msgmni: ::c_int,
-        pub msgssz: ::c_int,
-        pub msgtql: ::c_int,
-        pub msgseg: ::c_ushort,
-    }
-}
-
-// intentionally not public, only used for fd_set
-cfg_if! {
-    if #[cfg(target_pointer_width = "32")] {
-        const ULONG_SIZE: usize = 32;
-    } else if #[cfg(target_pointer_width = "64")] {
-        const ULONG_SIZE: usize = 64;
-    } else {
-        // Unknown target_pointer_width
-    }
-}
-
-pub const EXIT_FAILURE: ::c_int = 1;
-pub const EXIT_SUCCESS: ::c_int = 0;
-pub const RAND_MAX: ::c_int = 2147483647;
-pub const EOF: ::c_int = -1;
-pub const SEEK_SET: ::c_int = 0;
-pub const SEEK_CUR: ::c_int = 1;
-pub const SEEK_END: ::c_int = 2;
-pub const _IOFBF: ::c_int = 0;
-pub const _IONBF: ::c_int = 2;
-pub const _IOLBF: ::c_int = 1;
-
-pub const F_DUPFD: ::c_int = 0;
-pub const F_GETFD: ::c_int = 1;
-pub const F_SETFD: ::c_int = 2;
-pub const F_GETFL: ::c_int = 3;
-pub const F_SETFL: ::c_int = 4;
-
-// Linux-specific fcntls
-pub const F_SETLEASE: ::c_int = 1024;
-pub const F_GETLEASE: ::c_int = 1025;
-pub const F_NOTIFY: ::c_int = 1026;
-pub const F_DUPFD_CLOEXEC: ::c_int = 1030;
-
-// TODO(#235): Include file sealing fcntls once we have a way to verify them.
-
-pub const SIGTRAP: ::c_int = 5;
-
-pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0;
-pub const PTHREAD_CREATE_DETACHED: ::c_int = 1;
-
-pub const CLOCK_REALTIME: clockid_t = 0;
-pub const CLOCK_MONOTONIC: clockid_t = 1;
-pub const CLOCK_PROCESS_CPUTIME_ID: clockid_t = 2;
-pub const CLOCK_THREAD_CPUTIME_ID: clockid_t = 3;
-// TODO(#247) Someday our Travis shall have glibc 2.21 (released in Sep
-// 2014.) See also musl/mod.rs
-// pub const CLOCK_SGI_CYCLE: clockid_t = 10;
-// pub const CLOCK_TAI: clockid_t = 11;
-pub const TIMER_ABSTIME: ::c_int = 1;
-
-pub const RLIMIT_CPU: ::c_int = 0;
-pub const RLIMIT_FSIZE: ::c_int = 1;
-pub const RLIMIT_DATA: ::c_int = 2;
-pub const RLIMIT_STACK: ::c_int = 3;
-pub const RLIMIT_CORE: ::c_int = 4;
-pub const RLIMIT_LOCKS: ::c_int = 10;
-pub const RLIMIT_SIGPENDING: ::c_int = 11;
-pub const RLIMIT_MSGQUEUE: ::c_int = 12;
-pub const RLIMIT_NICE: ::c_int = 13;
-pub const RLIMIT_RTPRIO: ::c_int = 14;
-
-pub const RUSAGE_SELF: ::c_int = 0;
-
-pub const O_RDONLY: ::c_int = 0;
-pub const O_WRONLY: ::c_int = 1;
-pub const O_RDWR: ::c_int = 2;
-
-pub const SOCK_CLOEXEC: ::c_int = O_CLOEXEC;
-
-pub const S_IFIFO: ::mode_t = 4096;
-pub const S_IFCHR: ::mode_t = 8192;
-pub const S_IFBLK: ::mode_t = 24576;
-pub const S_IFDIR: ::mode_t = 16384;
-pub const S_IFREG: ::mode_t = 32768;
-pub const S_IFLNK: ::mode_t = 40960;
-pub const S_IFSOCK: ::mode_t = 49152;
-pub const S_IFMT: ::mode_t = 61440;
-pub const S_IRWXU: ::mode_t = 448;
-pub const S_IXUSR: ::mode_t = 64;
-pub const S_IWUSR: ::mode_t = 128;
-pub const S_IRUSR: ::mode_t = 256;
-pub const S_IRWXG: ::mode_t = 56;
-pub const S_IXGRP: ::mode_t = 8;
-pub const S_IWGRP: ::mode_t = 16;
-pub const S_IRGRP: ::mode_t = 32;
-pub const S_IRWXO: ::mode_t = 7;
-pub const S_IXOTH: ::mode_t = 1;
-pub const S_IWOTH: ::mode_t = 2;
-pub const S_IROTH: ::mode_t = 4;
-pub const F_OK: ::c_int = 0;
-pub const R_OK: ::c_int = 4;
-pub const W_OK: ::c_int = 2;
-pub const X_OK: ::c_int = 1;
-pub const STDIN_FILENO: ::c_int = 0;
-pub const STDOUT_FILENO: ::c_int = 1;
-pub const STDERR_FILENO: ::c_int = 2;
-pub const SIGHUP: ::c_int = 1;
-pub const SIGINT: ::c_int = 2;
-pub const SIGQUIT: ::c_int = 3;
-pub const SIGILL: ::c_int = 4;
-pub const SIGABRT: ::c_int = 6;
-pub const SIGFPE: ::c_int = 8;
-pub const SIGKILL: ::c_int = 9;
-pub const SIGSEGV: ::c_int = 11;
-pub const SIGPIPE: ::c_int = 13;
-pub const SIGALRM: ::c_int = 14;
-pub const SIGTERM: ::c_int = 15;
-
-pub const PROT_NONE: ::c_int = 0;
-pub const PROT_READ: ::c_int = 1;
-pub const PROT_WRITE: ::c_int = 2;
-pub const PROT_EXEC: ::c_int = 4;
-
-pub const LC_CTYPE: ::c_int = 0;
-pub const LC_NUMERIC: ::c_int = 1;
-pub const LC_MONETARY: ::c_int = 2;
-pub const LC_TIME: ::c_int = 3;
-pub const LC_COLLATE: ::c_int = 4;
-pub const LC_MESSAGES: ::c_int = 5;
-pub const LC_ALL: ::c_int = 6;
-pub const LC_CTYPE_MASK: ::c_int = (1 << LC_CTYPE);
-pub const LC_NUMERIC_MASK: ::c_int = (1 << LC_NUMERIC);
-pub const LC_TIME_MASK: ::c_int = (1 << LC_TIME);
-pub const LC_COLLATE_MASK: ::c_int = (1 << LC_COLLATE);
-pub const LC_MONETARY_MASK: ::c_int = (1 << LC_MONETARY);
-pub const LC_MESSAGES_MASK: ::c_int = (1 << LC_MESSAGES);
-// LC_ALL_MASK defined per platform
-
-pub const MAP_FILE: ::c_int = 0x0000;
-pub const MAP_SHARED: ::c_int = 0x0001;
-pub const MAP_PRIVATE: ::c_int = 0x0002;
-pub const MAP_FIXED: ::c_int = 0x0010;
-
-pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
-
-// MS_ flags for msync(2)
-pub const MS_ASYNC: ::c_int = 0x0001;
-pub const MS_INVALIDATE: ::c_int = 0x0002;
-pub const MS_SYNC: ::c_int = 0x0004;
-
-// MS_ flags for mount(2)
-pub const MS_RDONLY: ::c_ulong = 0x01;
-pub const MS_NOSUID: ::c_ulong = 0x02;
-pub const MS_NODEV: ::c_ulong = 0x04;
-pub const MS_NOEXEC: ::c_ulong = 0x08;
-pub const MS_SYNCHRONOUS: ::c_ulong = 0x10;
-pub const MS_REMOUNT: ::c_ulong = 0x20;
-pub const MS_MANDLOCK: ::c_ulong = 0x40;
-pub const MS_NOATIME: ::c_ulong = 0x0400;
-pub const MS_NODIRATIME: ::c_ulong = 0x0800;
-pub const MS_BIND: ::c_ulong = 0x1000;
-pub const MS_NOUSER: ::c_ulong = 0x80000000;
-pub const MS_MGC_VAL: ::c_ulong = 0xc0ed0000;
-pub const MS_MGC_MSK: ::c_ulong = 0xffff0000;
-pub const MS_RMT_MASK: ::c_ulong = 0x800051;
-
-pub const EPERM: ::c_int = 1;
-pub const ENOENT: ::c_int = 2;
-pub const ESRCH: ::c_int = 3;
-pub const EINTR: ::c_int = 4;
-pub const EIO: ::c_int = 5;
-pub const ENXIO: ::c_int = 6;
-pub const E2BIG: ::c_int = 7;
-pub const ENOEXEC: ::c_int = 8;
-pub const EBADF: ::c_int = 9;
-pub const ECHILD: ::c_int = 10;
-pub const EAGAIN: ::c_int = 11;
-pub const ENOMEM: ::c_int = 12;
-pub const EACCES: ::c_int = 13;
-pub const EFAULT: ::c_int = 14;
-pub const ENOTBLK: ::c_int = 15;
-pub const EBUSY: ::c_int = 16;
-pub const EEXIST: ::c_int = 17;
-pub const EXDEV: ::c_int = 18;
-pub const ENODEV: ::c_int = 19;
-pub const ENOTDIR: ::c_int = 20;
-pub const EISDIR: ::c_int = 21;
-pub const EINVAL: ::c_int = 22;
-pub const ENFILE: ::c_int = 23;
-pub const EMFILE: ::c_int = 24;
-pub const ENOTTY: ::c_int = 25;
-pub const ETXTBSY: ::c_int = 26;
-pub const EFBIG: ::c_int = 27;
-pub const ENOSPC: ::c_int = 28;
-pub const ESPIPE: ::c_int = 29;
-pub const EROFS: ::c_int = 30;
-pub const EMLINK: ::c_int = 31;
-pub const EPIPE: ::c_int = 32;
-pub const EDOM: ::c_int = 33;
-pub const ERANGE: ::c_int = 34;
-pub const EWOULDBLOCK: ::c_int = EAGAIN;
-
-pub const SCM_RIGHTS: ::c_int = 0x01;
-pub const SCM_CREDENTIALS: ::c_int = 0x02;
-
-pub const IPPROTO_RAW: ::c_int = 255;
-
-pub const PROT_GROWSDOWN: ::c_int = 0x1000000;
-pub const PROT_GROWSUP: ::c_int = 0x2000000;
-
-pub const MAP_TYPE: ::c_int = 0x000f;
-
-pub const MADV_NORMAL: ::c_int = 0;
-pub const MADV_RANDOM: ::c_int = 1;
-pub const MADV_SEQUENTIAL: ::c_int = 2;
-pub const MADV_WILLNEED: ::c_int = 3;
-pub const MADV_DONTNEED: ::c_int = 4;
-pub const MADV_REMOVE: ::c_int = 9;
-pub const MADV_DONTFORK: ::c_int = 10;
-pub const MADV_DOFORK: ::c_int = 11;
-pub const MADV_MERGEABLE: ::c_int = 12;
-pub const MADV_UNMERGEABLE: ::c_int = 13;
-pub const MADV_HWPOISON: ::c_int = 100;
-
-pub const IFF_UP: ::c_int = 0x1;
-pub const IFF_BROADCAST: ::c_int = 0x2;
-pub const IFF_DEBUG: ::c_int = 0x4;
-pub const IFF_LOOPBACK: ::c_int = 0x8;
-pub const IFF_POINTOPOINT: ::c_int = 0x10;
-pub const IFF_NOTRAILERS: ::c_int = 0x20;
-pub const IFF_RUNNING: ::c_int = 0x40;
-pub const IFF_NOARP: ::c_int = 0x80;
-pub const IFF_PROMISC: ::c_int = 0x100;
-pub const IFF_ALLMULTI: ::c_int = 0x200;
-pub const IFF_MASTER: ::c_int = 0x400;
-pub const IFF_SLAVE: ::c_int = 0x800;
-pub const IFF_MULTICAST: ::c_int = 0x1000;
-pub const IFF_PORTSEL: ::c_int = 0x2000;
-pub const IFF_AUTOMEDIA: ::c_int = 0x4000;
-pub const IFF_DYNAMIC: ::c_int = 0x8000;
-
-pub const SOL_IP: ::c_int = 0;
-pub const SOL_TCP: ::c_int = 6;
-pub const SOL_IPV6: ::c_int = 41;
-pub const SOL_ICMPV6: ::c_int = 58;
-pub const SOL_RAW: ::c_int = 255;
-pub const SOL_DECNET: ::c_int = 261;
-pub const SOL_X25: ::c_int = 262;
-pub const SOL_PACKET: ::c_int = 263;
-pub const SOL_ATM: ::c_int = 264;
-pub const SOL_AAL: ::c_int = 265;
-pub const SOL_IRDA: ::c_int = 266;
-
-pub const AF_UNSPEC: ::c_int = 0;
-pub const AF_UNIX: ::c_int = 1;
-pub const AF_LOCAL: ::c_int = 1;
-pub const AF_INET: ::c_int = 2;
-pub const AF_AX25: ::c_int = 3;
-pub const AF_IPX: ::c_int = 4;
-pub const AF_APPLETALK: ::c_int = 5;
-pub const AF_NETROM: ::c_int = 6;
-pub const AF_BRIDGE: ::c_int = 7;
-pub const AF_ATMPVC: ::c_int = 8;
-pub const AF_X25: ::c_int = 9;
-pub const AF_INET6: ::c_int = 10;
-pub const AF_ROSE: ::c_int = 11;
-pub const AF_DECnet: ::c_int = 12;
-pub const AF_NETBEUI: ::c_int = 13;
-pub const AF_SECURITY: ::c_int = 14;
-pub const AF_KEY: ::c_int = 15;
-pub const AF_NETLINK: ::c_int = 16;
-pub const AF_ROUTE: ::c_int = AF_NETLINK;
-pub const AF_PACKET: ::c_int = 17;
-pub const AF_ASH: ::c_int = 18;
-pub const AF_ECONET: ::c_int = 19;
-pub const AF_ATMSVC: ::c_int = 20;
-pub const AF_SNA: ::c_int = 22;
-pub const AF_IRDA: ::c_int = 23;
-pub const AF_PPPOX: ::c_int = 24;
-pub const AF_WANPIPE: ::c_int = 25;
-pub const AF_LLC: ::c_int = 26;
-pub const AF_CAN: ::c_int = 29;
-pub const AF_TIPC: ::c_int = 30;
-pub const AF_BLUETOOTH: ::c_int = 31;
-pub const AF_IUCV: ::c_int = 32;
-pub const AF_RXRPC: ::c_int = 33;
-pub const AF_ISDN: ::c_int = 34;
-pub const AF_PHONET: ::c_int = 35;
-pub const AF_IEEE802154: ::c_int = 36;
-pub const AF_CAIF: ::c_int = 37;
-pub const AF_ALG: ::c_int = 38;
-
-pub const PF_UNSPEC: ::c_int = AF_UNSPEC;
-pub const PF_UNIX: ::c_int = AF_UNIX;
-pub const PF_LOCAL: ::c_int = AF_LOCAL;
-pub const PF_INET: ::c_int = AF_INET;
-pub const PF_AX25: ::c_int = AF_AX25;
-pub const PF_IPX: ::c_int = AF_IPX;
-pub const PF_APPLETALK: ::c_int = AF_APPLETALK;
-pub const PF_NETROM: ::c_int = AF_NETROM;
-pub const PF_BRIDGE: ::c_int = AF_BRIDGE;
-pub const PF_ATMPVC: ::c_int = AF_ATMPVC;
-pub const PF_X25: ::c_int = AF_X25;
-pub const PF_INET6: ::c_int = AF_INET6;
-pub const PF_ROSE: ::c_int = AF_ROSE;
-pub const PF_DECnet: ::c_int = AF_DECnet;
-pub const PF_NETBEUI: ::c_int = AF_NETBEUI;
-pub const PF_SECURITY: ::c_int = AF_SECURITY;
-pub const PF_KEY: ::c_int = AF_KEY;
-pub const PF_NETLINK: ::c_int = AF_NETLINK;
-pub const PF_ROUTE: ::c_int = AF_ROUTE;
-pub const PF_PACKET: ::c_int = AF_PACKET;
-pub const PF_ASH: ::c_int = AF_ASH;
-pub const PF_ECONET: ::c_int = AF_ECONET;
-pub const PF_ATMSVC: ::c_int = AF_ATMSVC;
-pub const PF_SNA: ::c_int = AF_SNA;
-pub const PF_IRDA: ::c_int = AF_IRDA;
-pub const PF_PPPOX: ::c_int = AF_PPPOX;
-pub const PF_WANPIPE: ::c_int = AF_WANPIPE;
-pub const PF_LLC: ::c_int = AF_LLC;
-pub const PF_CAN: ::c_int = AF_CAN;
-pub const PF_TIPC: ::c_int = AF_TIPC;
-pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
-pub const PF_IUCV: ::c_int = AF_IUCV;
-pub const PF_RXRPC: ::c_int = AF_RXRPC;
-pub const PF_ISDN: ::c_int = AF_ISDN;
-pub const PF_PHONET: ::c_int = AF_PHONET;
-pub const PF_IEEE802154: ::c_int = AF_IEEE802154;
-pub const PF_CAIF: ::c_int = AF_CAIF;
-pub const PF_ALG: ::c_int = AF_ALG;
-
-pub const SOMAXCONN: ::c_int = 128;
-
-pub const MSG_OOB: ::c_int = 1;
-pub const MSG_PEEK: ::c_int = 2;
-pub const MSG_DONTROUTE: ::c_int = 4;
-pub const MSG_CTRUNC: ::c_int = 8;
-pub const MSG_TRUNC: ::c_int = 0x20;
-pub const MSG_DONTWAIT: ::c_int = 0x40;
-pub const MSG_EOR: ::c_int = 0x80;
-pub const MSG_WAITALL: ::c_int = 0x100;
-pub const MSG_FIN: ::c_int = 0x200;
-pub const MSG_SYN: ::c_int = 0x400;
-pub const MSG_CONFIRM: ::c_int = 0x800;
-pub const MSG_RST: ::c_int = 0x1000;
-pub const MSG_ERRQUEUE: ::c_int = 0x2000;
-pub const MSG_NOSIGNAL: ::c_int = 0x4000;
-pub const MSG_MORE: ::c_int = 0x8000;
-pub const MSG_WAITFORONE: ::c_int = 0x10000;
-pub const MSG_CMSG_CLOEXEC: ::c_int = 0x40000000;
-
-pub const SOCK_RAW: ::c_int = 3;
-pub const IPPROTO_ICMP: ::c_int = 1;
-pub const IPPROTO_ICMPV6: ::c_int = 58;
-pub const IPPROTO_TCP: ::c_int = 6;
-pub const IPPROTO_IP: ::c_int = 0;
-pub const IPPROTO_IPV6: ::c_int = 41;
-pub const IP_MULTICAST_TTL: ::c_int = 33;
-pub const IP_MULTICAST_LOOP: ::c_int = 34;
-pub const IP_TTL: ::c_int = 2;
-pub const IP_HDRINCL: ::c_int = 3;
-pub const IP_ADD_MEMBERSHIP: ::c_int = 35;
-pub const IP_DROP_MEMBERSHIP: ::c_int = 36;
-
-pub const TCP_NODELAY: ::c_int = 1;
-pub const TCP_MAXSEG: ::c_int = 2;
-pub const TCP_CORK: ::c_int = 3;
-pub const TCP_KEEPIDLE: ::c_int = 4;
-pub const TCP_KEEPINTVL: ::c_int = 5;
-pub const TCP_KEEPCNT: ::c_int = 6;
-pub const TCP_SYNCNT: ::c_int = 7;
-pub const TCP_LINGER2: ::c_int = 8;
-pub const TCP_DEFER_ACCEPT: ::c_int = 9;
-pub const TCP_WINDOW_CLAMP: ::c_int = 10;
-pub const TCP_INFO: ::c_int = 11;
-pub const TCP_QUICKACK: ::c_int = 12;
-pub const TCP_CONGESTION: ::c_int = 13;
-
-pub const IPV6_MULTICAST_LOOP: ::c_int = 19;
-pub const IPV6_V6ONLY: ::c_int = 26;
-
-pub const SO_DEBUG: ::c_int = 1;
-
-pub const SHUT_RD: ::c_int = 0;
-pub const SHUT_WR: ::c_int = 1;
-pub const SHUT_RDWR: ::c_int = 2;
-
-pub const LOCK_SH: ::c_int = 1;
-pub const LOCK_EX: ::c_int = 2;
-pub const LOCK_NB: ::c_int = 4;
-pub const LOCK_UN: ::c_int = 8;
-
-pub const SS_ONSTACK: ::c_int = 1;
-pub const SS_DISABLE: ::c_int = 2;
-
-pub const PATH_MAX: ::c_int = 4096;
-
-pub const FD_SETSIZE: usize = 1024;
-
-pub const EPOLLIN: ::c_int = 0x1;
-pub const EPOLLPRI: ::c_int = 0x2;
-pub const EPOLLOUT: ::c_int = 0x4;
-pub const EPOLLRDNORM: ::c_int = 0x40;
-pub const EPOLLRDBAND: ::c_int = 0x80;
-pub const EPOLLWRNORM: ::c_int = 0x100;
-pub const EPOLLWRBAND: ::c_int = 0x200;
-pub const EPOLLMSG: ::c_int = 0x400;
-pub const EPOLLERR: ::c_int = 0x8;
-pub const EPOLLHUP: ::c_int = 0x10;
-pub const EPOLLET: ::c_int = 0x80000000;
-
-pub const EPOLL_CTL_ADD: ::c_int = 1;
-pub const EPOLL_CTL_MOD: ::c_int = 3;
-pub const EPOLL_CTL_DEL: ::c_int = 2;
-
-pub const MNT_DETACH: ::c_int = 0x2;
-pub const MNT_EXPIRE: ::c_int = 0x4;
-
-pub const MNT_FORCE: ::c_int = 0x1;
-
-pub const Q_SYNC: ::c_int = 0x600;
-pub const Q_QUOTAON: ::c_int = 0x100;
-pub const Q_QUOTAOFF: ::c_int = 0x200;
-pub const Q_GETQUOTA: ::c_int = 0x300;
-pub const Q_SETQUOTA: ::c_int = 0x400;
-
-pub const TCIOFF: ::c_int = 2;
-pub const TCION: ::c_int = 3;
-pub const TCOOFF: ::c_int = 0;
-pub const TCOON: ::c_int = 1;
-pub const TCIFLUSH: ::c_int = 0;
-pub const TCOFLUSH: ::c_int = 1;
-pub const TCIOFLUSH: ::c_int = 2;
-pub const NL0: ::c_int  = 0x00000000;
-pub const NL1: ::c_int  = 0x00000100;
-pub const TAB0: ::c_int = 0x00000000;
-pub const CR0: ::c_int  = 0x00000000;
-pub const FF0: ::c_int  = 0x00000000;
-pub const BS0: ::c_int  = 0x00000000;
-pub const VT0: ::c_int  = 0x00000000;
-pub const VERASE: usize = 2;
-pub const VKILL: usize = 3;
-pub const VINTR: usize = 0;
-pub const VQUIT: usize = 1;
-pub const VLNEXT: usize = 15;
-pub const IGNBRK: ::tcflag_t = 0x00000001;
-pub const BRKINT: ::tcflag_t = 0x00000002;
-pub const IGNPAR: ::tcflag_t = 0x00000004;
-pub const PARMRK: ::tcflag_t = 0x00000008;
-pub const INPCK: ::tcflag_t = 0x00000010;
-pub const ISTRIP: ::tcflag_t = 0x00000020;
-pub const INLCR: ::tcflag_t = 0x00000040;
-pub const IGNCR: ::tcflag_t = 0x00000080;
-pub const ICRNL: ::tcflag_t = 0x00000100;
-pub const IXANY: ::tcflag_t = 0x00000800;
-pub const IMAXBEL: ::tcflag_t = 0x00002000;
-pub const OPOST: ::tcflag_t = 0x1;
-pub const CS5: ::tcflag_t = 0x00000000;
-pub const CRTSCTS: ::tcflag_t = 0x80000000;
-pub const ECHO: ::tcflag_t = 0x00000008;
-
-pub const CLONE_VM: ::c_int = 0x100;
-pub const CLONE_FS: ::c_int = 0x200;
-pub const CLONE_FILES: ::c_int = 0x400;
-pub const CLONE_SIGHAND: ::c_int = 0x800;
-pub const CLONE_PTRACE: ::c_int = 0x2000;
-pub const CLONE_VFORK: ::c_int = 0x4000;
-pub const CLONE_PARENT: ::c_int = 0x8000;
-pub const CLONE_THREAD: ::c_int = 0x10000;
-pub const CLONE_NEWNS: ::c_int = 0x20000;
-pub const CLONE_SYSVSEM: ::c_int = 0x40000;
-pub const CLONE_SETTLS: ::c_int = 0x80000;
-pub const CLONE_PARENT_SETTID: ::c_int = 0x100000;
-pub const CLONE_CHILD_CLEARTID: ::c_int = 0x200000;
-pub const CLONE_DETACHED: ::c_int = 0x400000;
-pub const CLONE_UNTRACED: ::c_int = 0x800000;
-pub const CLONE_CHILD_SETTID: ::c_int = 0x01000000;
-pub const CLONE_NEWUTS: ::c_int = 0x04000000;
-pub const CLONE_NEWIPC: ::c_int = 0x08000000;
-pub const CLONE_NEWUSER: ::c_int = 0x10000000;
-pub const CLONE_NEWPID: ::c_int = 0x20000000;
-pub const CLONE_NEWNET: ::c_int = 0x40000000;
-pub const CLONE_IO: ::c_int = 0x80000000;
-
-pub const WNOHANG: ::c_int = 0x00000001;
-pub const WUNTRACED: ::c_int = 0x00000002;
-pub const WSTOPPED: ::c_int = WUNTRACED;
-pub const WEXITED: ::c_int = 0x00000004;
-pub const WCONTINUED: ::c_int = 0x00000008;
-pub const WNOWAIT: ::c_int = 0x01000000;
-
-pub const __WNOTHREAD: ::c_int = 0x20000000;
-pub const __WALL: ::c_int = 0x40000000;
-pub const __WCLONE: ::c_int = 0x80000000;
-
-pub const SPLICE_F_MOVE: ::c_uint = 0x01;
-pub const SPLICE_F_NONBLOCK: ::c_uint = 0x02;
-pub const SPLICE_F_MORE: ::c_uint = 0x04;
-pub const SPLICE_F_GIFT: ::c_uint = 0x08;
-
-pub const RTLD_LOCAL: ::c_int = 0;
-
-pub const POSIX_FADV_NORMAL: ::c_int = 0;
-pub const POSIX_FADV_RANDOM: ::c_int = 1;
-pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2;
-pub const POSIX_FADV_WILLNEED: ::c_int = 3;
-
-pub const AT_FDCWD: ::c_int = -100;
-pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x100;
-pub const AT_REMOVEDIR: ::c_int = 0x200;
-pub const AT_SYMLINK_FOLLOW: ::c_int = 0x400;
-
-pub const LOG_CRON: ::c_int = 9 << 3;
-pub const LOG_AUTHPRIV: ::c_int = 10 << 3;
-pub const LOG_FTP: ::c_int = 11 << 3;
-pub const LOG_PERROR: ::c_int = 0x20;
-
-pub const PIPE_BUF: usize = 4096;
-
-pub const SI_LOAD_SHIFT: ::c_uint = 16;
-
-pub const SIGEV_SIGNAL: ::c_int = 0;
-pub const SIGEV_NONE: ::c_int = 1;
-pub const SIGEV_THREAD: ::c_int = 2;
-
-pub const P_ALL: idtype_t = 0;
-pub const P_PID: idtype_t = 1;
-pub const P_PGID: idtype_t = 2;
-
-pub const UTIME_OMIT: c_long = 1073741822;
-pub const UTIME_NOW: c_long = 1073741823;
-
-pub const L_tmpnam: ::c_uint = 20;
-pub const _PC_LINK_MAX: ::c_int = 0;
-pub const _PC_MAX_CANON: ::c_int = 1;
-pub const _PC_MAX_INPUT: ::c_int = 2;
-pub const _PC_NAME_MAX: ::c_int = 3;
-pub const _PC_PATH_MAX: ::c_int = 4;
-pub const _PC_PIPE_BUF: ::c_int = 5;
-pub const _PC_CHOWN_RESTRICTED: ::c_int = 6;
-pub const _PC_NO_TRUNC: ::c_int = 7;
-pub const _PC_VDISABLE: ::c_int = 8;
-
-pub const _SC_ARG_MAX: ::c_int = 0;
-pub const _SC_CHILD_MAX: ::c_int = 1;
-pub const _SC_CLK_TCK: ::c_int = 2;
-pub const _SC_NGROUPS_MAX: ::c_int = 3;
-pub const _SC_OPEN_MAX: ::c_int = 4;
-pub const _SC_STREAM_MAX: ::c_int = 5;
-pub const _SC_TZNAME_MAX: ::c_int = 6;
-pub const _SC_JOB_CONTROL: ::c_int = 7;
-pub const _SC_SAVED_IDS: ::c_int = 8;
-pub const _SC_REALTIME_SIGNALS: ::c_int = 9;
-pub const _SC_PRIORITY_SCHEDULING: ::c_int = 10;
-pub const _SC_TIMERS: ::c_int = 11;
-pub const _SC_ASYNCHRONOUS_IO: ::c_int = 12;
-pub const _SC_PRIORITIZED_IO: ::c_int = 13;
-pub const _SC_SYNCHRONIZED_IO: ::c_int = 14;
-pub const _SC_FSYNC: ::c_int = 15;
-pub const _SC_MAPPED_FILES: ::c_int = 16;
-pub const _SC_MEMLOCK: ::c_int = 17;
-pub const _SC_MEMLOCK_RANGE: ::c_int = 18;
-pub const _SC_MEMORY_PROTECTION: ::c_int = 19;
-pub const _SC_MESSAGE_PASSING: ::c_int = 20;
-pub const _SC_SEMAPHORES: ::c_int = 21;
-pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 22;
-pub const _SC_AIO_LISTIO_MAX: ::c_int = 23;
-pub const _SC_AIO_MAX: ::c_int = 24;
-pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 25;
-pub const _SC_DELAYTIMER_MAX: ::c_int = 26;
-pub const _SC_MQ_OPEN_MAX: ::c_int = 27;
-pub const _SC_MQ_PRIO_MAX: ::c_int = 28;
-pub const _SC_VERSION: ::c_int = 29;
-pub const _SC_PAGESIZE: ::c_int = 30;
-pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
-pub const _SC_RTSIG_MAX: ::c_int = 31;
-pub const _SC_SEM_NSEMS_MAX: ::c_int = 32;
-pub const _SC_SEM_VALUE_MAX: ::c_int = 33;
-pub const _SC_SIGQUEUE_MAX: ::c_int = 34;
-pub const _SC_TIMER_MAX: ::c_int = 35;
-pub const _SC_BC_BASE_MAX: ::c_int = 36;
-pub const _SC_BC_DIM_MAX: ::c_int = 37;
-pub const _SC_BC_SCALE_MAX: ::c_int = 38;
-pub const _SC_BC_STRING_MAX: ::c_int = 39;
-pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 40;
-pub const _SC_EXPR_NEST_MAX: ::c_int = 42;
-pub const _SC_LINE_MAX: ::c_int = 43;
-pub const _SC_RE_DUP_MAX: ::c_int = 44;
-pub const _SC_2_VERSION: ::c_int = 46;
-pub const _SC_2_C_BIND: ::c_int = 47;
-pub const _SC_2_C_DEV: ::c_int = 48;
-pub const _SC_2_FORT_DEV: ::c_int = 49;
-pub const _SC_2_FORT_RUN: ::c_int = 50;
-pub const _SC_2_SW_DEV: ::c_int = 51;
-pub const _SC_2_LOCALEDEF: ::c_int = 52;
-pub const _SC_IOV_MAX: ::c_int = 60;
-pub const _SC_THREADS: ::c_int = 67;
-pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 68;
-pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 69;
-pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 70;
-pub const _SC_LOGIN_NAME_MAX: ::c_int = 71;
-pub const _SC_TTY_NAME_MAX: ::c_int = 72;
-pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 73;
-pub const _SC_THREAD_KEYS_MAX: ::c_int = 74;
-pub const _SC_THREAD_STACK_MIN: ::c_int = 75;
-pub const _SC_THREAD_THREADS_MAX: ::c_int = 76;
-pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 77;
-pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 78;
-pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 79;
-pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 80;
-pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 81;
-pub const _SC_NPROCESSORS_ONLN: ::c_int = 84;
-pub const _SC_ATEXIT_MAX: ::c_int = 87;
-pub const _SC_XOPEN_VERSION: ::c_int = 89;
-pub const _SC_XOPEN_XCU_VERSION: ::c_int = 90;
-pub const _SC_XOPEN_UNIX: ::c_int = 91;
-pub const _SC_XOPEN_CRYPT: ::c_int = 92;
-pub const _SC_XOPEN_ENH_I18N: ::c_int = 93;
-pub const _SC_XOPEN_SHM: ::c_int = 94;
-pub const _SC_2_CHAR_TERM: ::c_int = 95;
-pub const _SC_2_UPE: ::c_int = 97;
-pub const _SC_XBS5_ILP32_OFF32: ::c_int = 125;
-pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 126;
-pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 128;
-pub const _SC_XOPEN_LEGACY: ::c_int = 129;
-pub const _SC_XOPEN_REALTIME: ::c_int = 130;
-pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 131;
-pub const _SC_HOST_NAME_MAX: ::c_int = 180;
-
-pub const RLIM_SAVED_MAX: ::rlim_t = RLIM_INFINITY;
-pub const RLIM_SAVED_CUR: ::rlim_t = RLIM_INFINITY;
-
-pub const GLOB_ERR: ::c_int = 1 << 0;
-pub const GLOB_MARK: ::c_int = 1 << 1;
-pub const GLOB_NOSORT: ::c_int = 1 << 2;
-pub const GLOB_DOOFFS: ::c_int = 1 << 3;
-pub const GLOB_NOCHECK: ::c_int = 1 << 4;
-pub const GLOB_APPEND: ::c_int = 1 << 5;
-pub const GLOB_NOESCAPE: ::c_int = 1 << 6;
-
-pub const GLOB_NOSPACE: ::c_int = 1;
-pub const GLOB_ABORTED: ::c_int = 2;
-pub const GLOB_NOMATCH: ::c_int = 3;
-
-pub const POSIX_MADV_NORMAL: ::c_int = 0;
-pub const POSIX_MADV_RANDOM: ::c_int = 1;
-pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2;
-pub const POSIX_MADV_WILLNEED: ::c_int = 3;
-
-pub const S_IEXEC: mode_t = 64;
-pub const S_IWRITE: mode_t = 128;
-pub const S_IREAD: mode_t = 256;
-
-pub const F_LOCK: ::c_int = 1;
-pub const F_TEST: ::c_int = 3;
-pub const F_TLOCK: ::c_int = 2;
-pub const F_ULOCK: ::c_int = 0;
-
-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_WRITE: ::c_ulong = 128;
-pub const ST_APPEND: ::c_ulong = 256;
-pub const ST_IMMUTABLE: ::c_ulong = 512;
-pub const ST_NOATIME: ::c_ulong = 1024;
-pub const ST_NODIRATIME: ::c_ulong = 2048;
-
-pub const RTLD_NEXT: *mut ::c_void = -1i64 as *mut ::c_void;
-pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void;
-pub const RTLD_NODELETE: ::c_int = 0x1000;
-pub const RTLD_NOW: ::c_int = 0x2;
-
-pub const TCP_MD5SIG: ::c_int = 14;
-
-pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
-    __align: [],
-    size: [0; __SIZEOF_PTHREAD_MUTEX_T],
-};
-pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
-    __align: [],
-    size: [0; __SIZEOF_PTHREAD_COND_T],
-};
-pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
-    __align: [],
-    size: [0; __SIZEOF_PTHREAD_RWLOCK_T],
-};
-pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
-pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
-pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
-pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
-pub const __SIZEOF_PTHREAD_COND_T: usize = 48;
-
-pub const SCHED_OTHER: ::c_int = 0;
-pub const SCHED_FIFO: ::c_int = 1;
-pub const SCHED_RR: ::c_int = 2;
-pub const SCHED_BATCH: ::c_int = 3;
-pub const SCHED_IDLE: ::c_int = 5;
-
-// System V IPC
-pub const IPC_PRIVATE: ::key_t = 0;
-
-pub const IPC_CREAT: ::c_int = 0o1000;
-pub const IPC_EXCL: ::c_int = 0o2000;
-pub const IPC_NOWAIT: ::c_int = 0o4000;
-
-pub const IPC_RMID: ::c_int = 0;
-pub const IPC_SET: ::c_int = 1;
-pub const IPC_STAT: ::c_int = 2;
-pub const IPC_INFO: ::c_int = 3;
-pub const MSG_STAT: ::c_int = 11;
-pub const MSG_INFO: ::c_int = 12;
-
-pub const MSG_NOERROR: ::c_int = 0o10000;
-pub const MSG_EXCEPT: ::c_int = 0o20000;
-
-pub const SHM_R: ::c_int = 0o400;
-pub const SHM_W: ::c_int = 0o200;
-
-pub const SHM_RDONLY: ::c_int = 0o10000;
-pub const SHM_RND: ::c_int = 0o20000;
-pub const SHM_REMAP: ::c_int = 0o40000;
-
-pub const SHM_LOCK: ::c_int = 11;
-pub const SHM_UNLOCK: ::c_int = 12;
-
-pub const SHM_HUGETLB: ::c_int = 0o4000;
-pub const SHM_NORESERVE: ::c_int = 0o10000;
-
-pub const EPOLLRDHUP: ::c_int = 0x2000;
-pub const EPOLLONESHOT: ::c_int = 0x40000000;
-
-pub const QFMT_VFS_OLD: ::c_int = 1;
-pub const QFMT_VFS_V0: ::c_int = 2;
-
-pub const EFD_SEMAPHORE: ::c_int = 0x1;
-
-pub const LOG_NFACILITIES: ::c_int = 24;
-
-pub const SEM_FAILED: *mut ::sem_t = 0 as *mut sem_t;
-
-pub const RB_AUTOBOOT: ::c_int = 0x01234567u32 as i32;
-pub const RB_HALT_SYSTEM: ::c_int = 0xcdef0123u32 as i32;
-pub const RB_ENABLE_CAD: ::c_int = 0x89abcdefu32 as i32;
-pub const RB_DISABLE_CAD: ::c_int = 0x00000000u32 as i32;
-pub const RB_POWER_OFF: ::c_int = 0x4321fedcu32 as i32;
-
-pub const AI_PASSIVE: ::c_int = 0x0001;
-pub const AI_CANONNAME: ::c_int = 0x0002;
-pub const AI_NUMERICHOST: ::c_int = 0x0004;
-pub const AI_V4MAPPED: ::c_int = 0x0008;
-pub const AI_ALL: ::c_int = 0x0010;
-pub const AI_ADDRCONFIG: ::c_int = 0x0020;
-
-pub const AI_NUMERICSERV: ::c_int = 0x0400;
-
-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_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_OVERFLOW: ::c_int = -12;
-
-pub const NI_NUMERICHOST: ::c_int = 1;
-pub const NI_NUMERICSERV: ::c_int = 2;
-pub const NI_NOFQDN: ::c_int = 4;
-pub const NI_NAMEREQD: ::c_int = 8;
-pub const NI_DGRAM: ::c_int = 16;
-
-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 MREMAP_MAYMOVE: ::c_int = 1;
-pub const MREMAP_FIXED: ::c_int = 2;
-
-pub const PR_SET_PDEATHSIG: ::c_int = 1;
-pub const PR_GET_PDEATHSIG: ::c_int = 2;
-
-pub const PR_GET_DUMPABLE: ::c_int = 3;
-pub const PR_SET_DUMPABLE: ::c_int = 4;
-
-pub const PR_GET_UNALIGN: ::c_int = 5;
-pub const PR_SET_UNALIGN: ::c_int = 6;
-pub const PR_UNALIGN_NOPRINT: ::c_int = 1;
-pub const PR_UNALIGN_SIGBUS: ::c_int = 2;
-
-pub const PR_GET_KEEPCAPS: ::c_int = 7;
-pub const PR_SET_KEEPCAPS: ::c_int = 8;
-
-pub const PR_GET_FPEMU: ::c_int = 9;
-pub const PR_SET_FPEMU: ::c_int = 10;
-pub const PR_FPEMU_NOPRINT: ::c_int = 1;
-pub const PR_FPEMU_SIGFPE: ::c_int = 2;
-
-pub const PR_GET_FPEXC: ::c_int = 11;
-pub const PR_SET_FPEXC: ::c_int = 12;
-pub const PR_FP_EXC_SW_ENABLE: ::c_int = 0x80;
-pub const PR_FP_EXC_DIV: ::c_int = 0x010000;
-pub const PR_FP_EXC_OVF: ::c_int = 0x020000;
-pub const PR_FP_EXC_UND: ::c_int = 0x040000;
-pub const PR_FP_EXC_RES: ::c_int = 0x080000;
-pub const PR_FP_EXC_INV: ::c_int = 0x100000;
-pub const PR_FP_EXC_DISABLED: ::c_int = 0;
-pub const PR_FP_EXC_NONRECOV: ::c_int = 1;
-pub const PR_FP_EXC_ASYNC: ::c_int = 2;
-pub const PR_FP_EXC_PRECISE: ::c_int = 3;
-
-pub const PR_GET_TIMING: ::c_int = 13;
-pub const PR_SET_TIMING: ::c_int = 14;
-pub const PR_TIMING_STATISTICAL: ::c_int = 0;
-pub const PR_TIMING_TIMESTAMP: ::c_int = 1;
-
-pub const PR_SET_NAME: ::c_int = 15;
-pub const PR_GET_NAME: ::c_int = 16;
-
-pub const PR_GET_ENDIAN: ::c_int = 19;
-pub const PR_SET_ENDIAN: ::c_int = 20;
-pub const PR_ENDIAN_BIG: ::c_int = 0;
-pub const PR_ENDIAN_LITTLE: ::c_int = 1;
-pub const PR_ENDIAN_PPC_LITTLE: ::c_int = 2;
-
-pub const PR_GET_SECCOMP: ::c_int = 21;
-pub const PR_SET_SECCOMP: ::c_int = 22;
-
-pub const PR_CAPBSET_READ: ::c_int = 23;
-pub const PR_CAPBSET_DROP: ::c_int = 24;
-
-pub const PR_GET_TSC: ::c_int = 25;
-pub const PR_SET_TSC: ::c_int = 26;
-pub const PR_TSC_ENABLE: ::c_int = 1;
-pub const PR_TSC_SIGSEGV: ::c_int = 2;
-
-pub const PR_GET_SECUREBITS: ::c_int = 27;
-pub const PR_SET_SECUREBITS: ::c_int = 28;
-
-pub const PR_SET_TIMERSLACK: ::c_int = 29;
-pub const PR_GET_TIMERSLACK: ::c_int = 30;
-
-pub const PR_TASK_PERF_EVENTS_DISABLE: ::c_int = 31;
-pub const PR_TASK_PERF_EVENTS_ENABLE: ::c_int = 32;
-
-pub const PR_MCE_KILL: ::c_int = 33;
-pub const PR_MCE_KILL_CLEAR: ::c_int = 0;
-pub const PR_MCE_KILL_SET: ::c_int = 1;
-
-pub const PR_MCE_KILL_LATE: ::c_int = 0;
-pub const PR_MCE_KILL_EARLY: ::c_int = 1;
-pub const PR_MCE_KILL_DEFAULT: ::c_int = 2;
-
-pub const PR_MCE_KILL_GET: ::c_int = 34;
-
-pub const PR_SET_MM: ::c_int = 35;
-pub const PR_SET_MM_START_CODE: ::c_int = 1;
-pub const PR_SET_MM_END_CODE: ::c_int = 2;
-pub const PR_SET_MM_START_DATA: ::c_int = 3;
-pub const PR_SET_MM_END_DATA: ::c_int = 4;
-pub const PR_SET_MM_START_STACK: ::c_int = 5;
-pub const PR_SET_MM_START_BRK: ::c_int = 6;
-pub const PR_SET_MM_BRK: ::c_int = 7;
-pub const PR_SET_MM_ARG_START: ::c_int = 8;
-pub const PR_SET_MM_ARG_END: ::c_int = 9;
-pub const PR_SET_MM_ENV_START: ::c_int = 10;
-pub const PR_SET_MM_ENV_END: ::c_int = 11;
-pub const PR_SET_MM_AUXV: ::c_int = 12;
-pub const PR_SET_MM_EXE_FILE: ::c_int = 13;
-pub const PR_SET_MM_MAP: ::c_int = 14;
-pub const PR_SET_MM_MAP_SIZE: ::c_int = 15;
-
-pub const PR_SET_PTRACER: ::c_int = 0x59616d61;
-
-pub const PR_SET_CHILD_SUBREAPER: ::c_int = 36;
-pub const PR_GET_CHILD_SUBREAPER: ::c_int = 37;
-
-pub const PR_SET_NO_NEW_PRIVS: ::c_int = 38;
-pub const PR_GET_NO_NEW_PRIVS: ::c_int = 39;
-
-pub const PR_GET_TID_ADDRESS: ::c_int = 40;
-
-pub const PR_SET_THP_DISABLE: ::c_int = 41;
-pub const PR_GET_THP_DISABLE: ::c_int = 42;
-
-pub const ABDAY_1: ::nl_item = 0x300;
-pub const ABDAY_2: ::nl_item = 0x301;
-pub const ABDAY_3: ::nl_item = 0x302;
-pub const ABDAY_4: ::nl_item = 0x303;
-pub const ABDAY_5: ::nl_item = 0x304;
-pub const ABDAY_6: ::nl_item = 0x305;
-pub const ABDAY_7: ::nl_item = 0x306;
-
-pub const DAY_1: ::nl_item = 0x307;
-pub const DAY_2: ::nl_item = 0x308;
-pub const DAY_3: ::nl_item = 0x309;
-pub const DAY_4: ::nl_item = 0x30A;
-pub const DAY_5: ::nl_item = 0x30B;
-pub const DAY_6: ::nl_item = 0x30C;
-pub const DAY_7: ::nl_item = 0x30D;
-
-pub const ABMON_1: ::nl_item = 0x30E;
-pub const ABMON_2: ::nl_item = 0x30F;
-pub const ABMON_3: ::nl_item = 0x310;
-pub const ABMON_4: ::nl_item = 0x311;
-pub const ABMON_5: ::nl_item = 0x312;
-pub const ABMON_6: ::nl_item = 0x313;
-pub const ABMON_7: ::nl_item = 0x314;
-pub const ABMON_8: ::nl_item = 0x315;
-pub const ABMON_9: ::nl_item = 0x316;
-pub const ABMON_10: ::nl_item = 0x317;
-pub const ABMON_11: ::nl_item = 0x318;
-pub const ABMON_12: ::nl_item = 0x319;
-
-pub const MON_1: ::nl_item = 0x31A;
-pub const MON_2: ::nl_item = 0x31B;
-pub const MON_3: ::nl_item = 0x31C;
-pub const MON_4: ::nl_item = 0x31D;
-pub const MON_5: ::nl_item = 0x31E;
-pub const MON_6: ::nl_item = 0x31F;
-pub const MON_7: ::nl_item = 0x320;
-pub const MON_8: ::nl_item = 0x321;
-pub const MON_9: ::nl_item = 0x322;
-pub const MON_10: ::nl_item = 0x323;
-pub const MON_11: ::nl_item = 0x324;
-pub const MON_12: ::nl_item = 0x325;
-
-pub const AM_STR: ::nl_item = 0x326;
-pub const PM_STR: ::nl_item = 0x327;
-
-pub const D_T_FMT: ::nl_item = 0x328;
-pub const D_FMT: ::nl_item = 0x329;
-pub const T_FMT: ::nl_item = 0x32A;
-pub const T_FMT_AMPM: ::nl_item = 0x32B;
-
-pub const ERA: ::nl_item = 0x32C;
-pub const ERA_D_FMT: ::nl_item = 0x32E;
-pub const ALT_DIGITS: ::nl_item = 0x32F;
-pub const ERA_D_T_FMT: ::nl_item = 0x330;
-pub const ERA_T_FMT: ::nl_item = 0x331;
-
-pub const CODESET: ::nl_item = 10;
-
-pub const CRNCYSTR: ::nl_item = 0x215;
-
-pub const RADIXCHAR: ::nl_item = 0x100;
-pub const THOUSEP: ::nl_item = 0x101;
-
-pub const NOEXPR: ::nl_item = 0x501;
-pub const YESSTR: ::nl_item = 0x502;
-pub const NOSTR: ::nl_item = 0x503;
-
-pub const FILENAME_MAX: ::c_uint = 4095;
-
-pub const AF_MAX: ::c_int = 39;
-
-f! {
-    pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
-        let fd = fd as usize;
-        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
-        (*set).fds_bits[fd / size] &= !(1 << (fd % size));
-        return
-    }
-
-    pub fn FD_ISSET(fd: ::c_int, set: *mut fd_set) -> bool {
-        let fd = fd as usize;
-        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
-        return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0
-    }
-
-    pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () {
-        let fd = fd as usize;
-        let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
-        (*set).fds_bits[fd / size] |= 1 << (fd % size);
-        return
-    }
-
-    pub fn FD_ZERO(set: *mut fd_set) -> () {
-        for slot in (*set).fds_bits.iter_mut() {
-            *slot = 0;
-        }
-    }
-
-    pub fn WIFSTOPPED(status: ::c_int) -> bool {
-        (status & 0xff) == 0x7f
-    }
-
-    pub fn WSTOPSIG(status: ::c_int) -> ::c_int {
-        (status >> 8) & 0xff
-    }
-
-    pub fn WIFCONTINUED(status: ::c_int) -> bool {
-        status == 0xffff
-    }
-
-    pub fn WIFSIGNALED(status: ::c_int) -> bool {
-        ((status & 0x7f) + 1) as i8 >= 2
-    }
-
-    pub fn WTERMSIG(status: ::c_int) -> ::c_int {
-        status & 0x7f
-    }
-
-    pub fn WIFEXITED(status: ::c_int) -> bool {
-        (status & 0x7f) == 0
-    }
-
-    pub fn WEXITSTATUS(status: ::c_int) -> ::c_int {
-        (status >> 8) & 0xff
-    }
-
-    pub fn WCOREDUMP(status: ::c_int) -> bool {
-        (status & 0x80) != 0
-    }
-
-    pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
-        for slot in cpuset.bits.iter_mut() {
-            *slot = 0;
-        }
-    }
-
-    pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () {
-        let size_in_bits = 8 * mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc
-        let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
-        cpuset.bits[idx] |= 1 << offset;
-        ()
-    }
-
-    pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () {
-        let size_in_bits = 8 * mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc
-        let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
-        cpuset.bits[idx] &= !(1 << offset);
-        ()
-    }
-
-    pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool {
-        let size_in_bits = 8 * mem::size_of_val(&cpuset.bits[0]);
-        let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
-        0 != (cpuset.bits[idx] & (1 << offset))
-    }
-
-    pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool {
-        set1.bits == set2.bits
-    }
-}
-
-extern {
-    pub fn getpwnam_r(name: *const ::c_char,
-                      pwd: *mut passwd,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut passwd) -> ::c_int;
-    pub fn getpwuid_r(uid: ::uid_t,
-                      pwd: *mut passwd,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut passwd) -> ::c_int;
-    pub fn fdatasync(fd: ::c_int) -> ::c_int;
-    pub fn mincore(addr: *mut ::c_void, len: ::size_t,
-                   vec: *mut ::c_uchar) -> ::c_int;
-    pub fn clock_getres(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
-    pub fn clock_gettime(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
-    pub fn clock_nanosleep(clk_id: clockid_t,
-                           flags: ::c_int,
-                           rqtp: *const ::timespec,
-                           rmtp:  *mut ::timespec) -> ::c_int;
-    pub fn clock_settime(clk_id: clockid_t, tp: *const ::timespec) -> ::c_int;
-    pub fn prctl(option: ::c_int, ...) -> ::c_int;
-    pub fn pthread_getattr_np(native: ::pthread_t,
-                              attr: *mut ::pthread_attr_t) -> ::c_int;
-    pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
-                                     guardsize: *mut ::size_t) -> ::c_int;
-    pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,
-                                 stackaddr: *mut *mut ::c_void,
-                                 stacksize: *mut ::size_t) -> ::c_int;
-    pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
-    pub fn setgroups(ngroups: ::size_t,
-                     ptr: *const ::gid_t) -> ::c_int;
-    pub fn initgroups(user: *const ::c_char, group: ::gid_t) -> ::c_int;
-    pub fn sched_setscheduler(pid: ::pid_t,
-                              policy: ::c_int,
-                              param: *const sched_param) -> ::c_int;
-    pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int;
-    pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int;
-    pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int;
-    pub fn epoll_create(size: ::c_int) -> ::c_int;
-    pub fn epoll_create1(flags: ::c_int) -> ::c_int;
-    pub fn epoll_ctl(epfd: ::c_int,
-                     op: ::c_int,
-                     fd: ::c_int,
-                     event: *mut epoll_event) -> ::c_int;
-    pub fn epoll_wait(epfd: ::c_int,
-                      events: *mut epoll_event,
-                      maxevents: ::c_int,
-                      timeout: ::c_int) -> ::c_int;
-    pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int;
-    pub fn mount(src: *const ::c_char,
-                 target: *const ::c_char,
-                 fstype: *const ::c_char,
-                 flags: ::c_ulong,
-                 data: *const ::c_void) -> ::c_int;
-    pub fn umount(target: *const ::c_char) -> ::c_int;
-    pub fn umount2(target: *const ::c_char, flags: ::c_int) -> ::c_int;
-    pub fn clone(cb: extern fn(*mut ::c_void) -> ::c_int,
-                 child_stack: *mut ::c_void,
-                 flags: ::c_int,
-                 arg: *mut ::c_void, ...) -> ::c_int;
-    pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int;
-    pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int;
-    pub fn memrchr(cx: *const ::c_void,
-                   c: ::c_int,
-                   n: ::size_t) -> *mut ::c_void;
-    pub fn syscall(num: ::c_long, ...) -> ::c_long;
-    pub fn sendfile(out_fd: ::c_int,
-                    in_fd: ::c_int,
-                    offset: *mut off_t,
-                    count: ::size_t) -> ::ssize_t;
-    pub fn splice(fd_in: ::c_int,
-                  off_in: *mut ::loff_t,
-                  fd_out: ::c_int,
-                  off_out: *mut ::loff_t,
-                  len: ::size_t,
-                  flags: ::c_uint) -> ::ssize_t;
-    pub fn tee(fd_in: ::c_int,
-               fd_out: ::c_int,
-               len: ::size_t,
-               flags: ::c_uint) -> ::ssize_t;
-    pub fn vmsplice(fd: ::c_int,
-                    iov: *const ::iovec,
-                    nr_segs: ::size_t,
-                    flags: ::c_uint) -> ::ssize_t;
-
-    pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t,
-                         advise: ::c_int) -> ::c_int;
-    pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int;
-    pub fn utimensat(dirfd: ::c_int, path: *const ::c_char,
-                     times: *const ::timespec, flag: ::c_int) -> ::c_int;
-    pub fn duplocale(base: ::locale_t) -> ::locale_t;
-    pub fn freelocale(loc: ::locale_t);
-    pub fn newlocale(mask: ::c_int,
-                     locale: *const ::c_char,
-                     base: ::locale_t) -> ::locale_t;
-    pub fn uselocale(loc: ::locale_t) -> ::locale_t;
-    pub fn creat64(path: *const c_char, mode: mode_t) -> ::c_int;
-    pub fn fstat64(fildes: ::c_int, buf: *mut stat64) -> ::c_int;
-    pub fn ftruncate64(fd: ::c_int, length: off64_t) -> ::c_int;
-    pub fn getrlimit64(resource: ::c_int, rlim: *mut rlimit64) -> ::c_int;
-    pub fn lseek64(fd: ::c_int, offset: off64_t, whence: ::c_int) -> off64_t;
-    pub fn lstat64(path: *const c_char, buf: *mut stat64) -> ::c_int;
-    pub fn mmap64(addr: *mut ::c_void,
-                  len: ::size_t,
-                  prot: ::c_int,
-                  flags: ::c_int,
-                  fd: ::c_int,
-                  offset: off64_t)
-                  -> *mut ::c_void;
-    pub fn open64(path: *const c_char, oflag: ::c_int, ...) -> ::c_int;
-    pub fn openat64(fd: ::c_int,
-                    path: *const c_char,
-                    oflag: ::c_int, ...) -> ::c_int;
-    pub fn pread64(fd: ::c_int, buf: *mut ::c_void, count: ::size_t,
-                   offset: off64_t) -> ::ssize_t;
-    pub fn pwrite64(fd: ::c_int, buf: *const ::c_void, count: ::size_t,
-                    offset: off64_t) -> ::ssize_t;
-    pub fn readdir64(dirp: *mut ::DIR) -> *mut ::dirent64;
-    pub fn readdir64_r(dirp: *mut ::DIR, entry: *mut ::dirent64,
-                       result: *mut *mut ::dirent64) -> ::c_int;
-    pub fn setrlimit64(resource: ::c_int, rlim: *const rlimit64) -> ::c_int;
-    pub fn stat64(path: *const c_char, buf: *mut stat64) -> ::c_int;
-    pub fn truncate64(path: *const c_char, length: off64_t) -> ::c_int;
-    pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int;
-
-    pub fn fdopendir(fd: ::c_int) -> *mut ::DIR;
-
-    pub fn mknodat(dirfd: ::c_int, pathname: *const ::c_char,
-                   mode: ::mode_t, dev: dev_t) -> ::c_int;
-    pub fn ppoll(fds: *mut ::pollfd,
-                 nfds: nfds_t,
-                 timeout: *const ::timespec,
-                 sigmask: *const sigset_t) -> ::c_int;
-    pub fn pthread_condattr_getclock(attr: *const pthread_condattr_t,
-                                     clock_id: *mut clockid_t) -> ::c_int;
-    pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
-                                     clock_id: clockid_t) -> ::c_int;
-    pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t,
-                                       pshared: ::c_int) -> ::c_int;
-    pub fn pthread_condattr_getpshared(attr: *const pthread_condattr_t,
-                                       pshared: *mut ::c_int) -> ::c_int;
-    pub fn sched_getaffinity(pid: ::pid_t,
-                             cpusetsize: ::size_t,
-                             cpuset: *mut cpu_set_t) -> ::c_int;
-    pub fn sched_setaffinity(pid: ::pid_t,
-                             cpusetsize: ::size_t,
-                             cpuset: *const cpu_set_t) -> ::c_int;
-    pub fn unshare(flags: ::c_int) -> ::c_int;
-    pub fn sem_timedwait(sem: *mut sem_t,
-                         abstime: *const ::timespec) -> ::c_int;
-    pub fn accept4(fd: ::c_int, addr: *mut ::sockaddr, len: *mut ::socklen_t,
-                   flg: ::c_int) -> ::c_int;
-    pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
-                                   abstime: *const ::timespec) -> ::c_int;
-    pub fn pthread_mutexattr_setpshared(attr: *mut pthread_mutexattr_t,
-                                        pshared: ::c_int) -> ::c_int;
-    pub fn pthread_mutexattr_getpshared(attr: *const pthread_mutexattr_t,
-                                        pshared: *mut ::c_int) -> ::c_int;
-    pub fn ptsname_r(fd: ::c_int,
-                     buf: *mut ::c_char,
-                     buflen: ::size_t) -> ::c_int;
-    pub fn clearenv() -> ::c_int;
-    pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t,
-                  options: ::c_int) -> ::c_int;
-
-    pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
-
-    pub fn setpwent();
-    pub fn getpwent() -> *mut passwd;
-    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,
-                    mode: mode_t) -> ::c_int;
-
-    // System V IPC
-    pub fn shmget(key: ::key_t, size: ::size_t, shmflg: ::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;
-    pub fn shmctl(shmid: ::c_int,
-                  cmd: ::c_int,
-                  buf: *mut ::shmid_ds) -> ::c_int;
-    pub fn ftok(pathname: *const ::c_char, proj_id: ::c_int) -> ::key_t;
-    pub fn msgctl(msqid: ::c_int, cmd: ::c_int, buf: *mut msqid_ds) -> ::c_int;
-    pub fn msgget(key: ::key_t, msgflg: ::c_int) -> ::c_int;
-    pub fn msgrcv(msqid: ::c_int, msgp: *mut ::c_void, msgsz: ::size_t,
-                  msgtyp: ::c_long, msgflg: ::c_int) -> ::ssize_t;
-    pub fn msgsnd(msqid: ::c_int, msgp: *const ::c_void, msgsz: ::size_t,
-                  msgflg: ::c_int) -> ::c_int;
-
-    pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
-                    -> ::c_int;
-    pub fn __errno_location() -> *mut ::c_int;
-
-    pub fn fopen64(filename: *const c_char,
-                   mode: *const c_char) -> *mut ::FILE;
-    pub fn freopen64(filename: *const c_char, mode: *const c_char,
-                     file: *mut ::FILE) -> *mut ::FILE;
-    pub fn tmpfile64() -> *mut ::FILE;
-    pub fn fgetpos64(stream: *mut ::FILE, ptr: *mut fpos64_t) -> ::c_int;
-    pub fn fsetpos64(stream: *mut ::FILE, ptr: *const fpos64_t) -> ::c_int;
-    pub fn fseeko64(stream: *mut ::FILE,
-                    offset: ::off64_t,
-                    whence: ::c_int) -> ::c_int;
-    pub fn ftello64(stream: *mut ::FILE) -> ::off64_t;
-    pub fn readahead(fd: ::c_int, offset: ::off64_t,
-                     count: ::size_t) -> ::ssize_t;
-    pub fn getxattr(path: *const c_char, name: *const c_char,
-                    value: *mut ::c_void, size: ::size_t) -> ::ssize_t;
-    pub fn lgetxattr(path: *const c_char, name: *const c_char,
-                     value: *mut ::c_void, size: ::size_t) -> ::ssize_t;
-    pub fn fgetxattr(filedes: ::c_int, name: *const c_char,
-                     value: *mut ::c_void, size: ::size_t) -> ::ssize_t;
-    pub fn setxattr(path: *const c_char, name: *const c_char,
-                    value: *const ::c_void, size: ::size_t,
-                    flags: ::c_int) -> ::c_int;
-    pub fn lsetxattr(path: *const c_char, name: *const c_char,
-                     value: *const ::c_void, size: ::size_t,
-                     flags: ::c_int) -> ::c_int;
-    pub fn fsetxattr(filedes: ::c_int, name: *const c_char,
-                     value: *const ::c_void, size: ::size_t,
-                     flags: ::c_int) -> ::c_int;
-    pub fn listxattr(path: *const c_char, list: *mut c_char,
-                     size: ::size_t) -> ::ssize_t;
-    pub fn llistxattr(path: *const c_char, list: *mut c_char,
-                      size: ::size_t) -> ::ssize_t;
-    pub fn flistxattr(filedes: ::c_int, list: *mut c_char,
-                      size: ::size_t) -> ::ssize_t;
-    pub fn removexattr(path: *const c_char, name: *const c_char) -> ::c_int;
-    pub fn lremovexattr(path: *const c_char, name: *const c_char) -> ::c_int;
-    pub fn fremovexattr(filedes: ::c_int, name: *const c_char) -> ::c_int;
-    pub fn signalfd(fd: ::c_int,
-                    mask: *const ::sigset_t,
-                    flags: ::c_int) -> ::c_int;
-    pub fn quotactl(cmd: ::c_int,
-                    special: *const ::c_char,
-                    id: ::c_int,
-                    data: *mut ::c_char) -> ::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_unlink(name: *const ::c_char) -> ::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_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int;
-    pub fn mq_setattr(mqd: ::mqd_t,
-                      newattr: *const ::mq_attr,
-                      oldattr: *mut ::mq_attr) -> ::c_int;
-    pub fn epoll_pwait(epfd: ::c_int,
-                       events: *mut ::epoll_event,
-                       maxevents: ::c_int,
-                       timeout: ::c_int,
-                       sigmask: *const ::sigset_t) -> ::c_int;
-    pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
-    pub fn sigtimedwait(set: *const sigset_t,
-                        info: *mut siginfo_t,
-                        timeout: *const ::timespec) -> ::c_int;
-    pub fn sigwaitinfo(set: *const sigset_t,
-                       info: *mut siginfo_t) -> ::c_int;
-    pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char;
-    pub fn prlimit(pid: ::pid_t, resource: ::c_int, new_limit: *const ::rlimit,
-                   old_limit: *mut ::rlimit) -> ::c_int;
-    pub fn prlimit64(pid: ::pid_t,
-                     resource: ::c_int,
-                     new_limit: *const ::rlimit64,
-                     old_limit: *mut ::rlimit64) -> ::c_int;
-    pub fn reboot(how_to: ::c_int) -> ::c_int;
-    pub fn setfsgid(gid: ::gid_t) -> ::c_int;
-    pub fn setfsuid(uid: ::uid_t) -> ::c_int;
-    pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int;
-    pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int;
-
-    // Not available now on Android
-    pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,
-                    mode: ::mode_t) -> ::c_int;
-    pub fn if_nameindex() -> *mut if_nameindex;
-    pub fn if_freenameindex(ptr: *mut if_nameindex);
-    pub fn sync_file_range(fd: ::c_int, offset: ::off64_t,
-                           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,
-                  flags: ::c_int,
-                  ...) -> *mut ::c_void;
-
-    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;
-    pub fn globfree(pglob: *mut ::glob_t);
-
-    pub fn shm_unlink(name: *const ::c_char) -> ::c_int;
-
-    pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long);
-
-    pub fn telldir(dirp: *mut ::DIR) -> ::c_long;
-    pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
-                  -> ::c_int;
-
-    pub fn msync(addr: *mut ::c_void, len: ::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;
-    pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char;
-
-    pub fn bind(socket: ::c_int, address: *const ::sockaddr,
-                address_len: ::socklen_t) -> ::c_int;
-
-    pub fn writev(fd: ::c_int,
-                  iov: *const ::iovec,
-                  iovcnt: ::c_int) -> ::ssize_t;
-    pub fn readv(fd: ::c_int,
-                 iov: *const ::iovec,
-                 iovcnt: ::c_int) -> ::ssize_t;
-
-    pub fn sendmsg(fd: ::c_int,
-                   msg: *const ::msghdr,
-                   flags: ::c_int) -> ::ssize_t;
-    pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
-                   -> ::ssize_t;
-}
-
-cfg_if! {
-    if #[cfg(target_arch = "mips")] {
-        mod mips;
-        pub use self::mips::*;
-    } else if #[cfg(target_arch = "x86_64")] {
-        mod x86_64;
-        pub use self::x86_64::*;
-    } else {
-        pub use unsupported_target;
-    }
-}
-
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/unix/uclibc/x86_64/mod.rs
+++ /dev/null
@@ -1,312 +0,0 @@
-//! Definitions for l4re-uclibc on 64bit systems
-
-pub type blkcnt_t = i64;
-pub type blksize_t = i64;
-pub type c_char = u8;
-pub type c_long = i64;
-pub type c_ulong = u64;
-pub type fsblkcnt_t = ::c_ulong;
-pub type fsfilcnt_t = ::c_ulong;
-pub type fsword_t = ::c_long;
-pub type ino_t = ::c_ulong;
-pub type nlink_t = ::c_uint;
-pub type off_t = ::c_long;
-pub type rlim_t = c_ulong;
-pub type rlim64_t = u64;
-pub type suseconds_t = ::c_long;
-pub type time_t = ::c_int;
-pub type wchar_t = ::c_int;
-
-// ToDo, used?
-//pub type d_ino = ::c_ulong;
-pub type nfds_t = ::c_ulong;
-
-s! {
-    // ------------------------------------------------------------
-    // networking
-    pub struct in_addr {
-        pub s_addr: in_addr_t,
-    }
-
-    pub struct in6_addr {
-        pub s6_addr: [u8; 16],
-        __align: [u32; 0],
-    }
-
-    pub struct sockaddr {
-        pub sa_family: sa_family_t,
-        pub sa_data: [::c_char; 14],
-    }
-
-    pub struct sockaddr_in {
-        pub sin_family: sa_family_t,
-        pub sin_port: ::in_port_t,
-        pub sin_addr: ::in_addr,
-        pub sin_zero: [u8; 8],
-    }
-
-    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,
-    }
-
-    // ------------------------------------------------------------
-    // definitions below are *unverified* and might **break** the software
-    pub struct stat { // ToDo
-        pub st_dev: ::c_ulong,
-        st_pad1: [::c_long; 2],
-        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: u64,
-        pub st_pad2: [u64; 1],
-        pub st_size: off_t,
-        st_pad3: ::c_long,
-        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,
-        pub st_blksize: ::blksize_t,
-        st_pad4: ::c_long,
-        pub st_blocks: ::blkcnt_t,
-        st_pad5: [::c_long; 7],
-    }
-
-    pub struct statvfs { // ToDo: broken
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_files: ::fsfilcnt_t,
-        pub f_ffree: ::fsfilcnt_t,
-        pub f_favail: ::fsfilcnt_t,
-        #[cfg(target_endian = "little")]
-        pub f_fsid: ::c_ulong,
-        #[cfg(target_pointer_width = "32")]
-        __f_unused: ::c_int,
-        #[cfg(target_endian = "big")]
-        pub f_fsid: ::c_ulong,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-        __f_spare: [::c_int; 6],
-    }
-
-    pub struct dirent { // Todo
-        pub d_ino: ino_64_t,
-        pub d_off: off64_t,
-        d_reclen: u16,
-        pub d_type: u8,
-        pub d_name: [i8; 256],
-    }
-
-    pub struct dirent64 { //
-        pub d_ino: ino64_t,
-        pub d_off: off64_t,
-        pub d_reclen: u16,
-        pub d_type: u8,
-        pub d_name: [i8; 256],
-    }
-
-    pub struct pthread_attr_t { // ToDo
-        __size: [u64; 7]
-    }
-
-    pub struct sigaction { // TODO!!
-        pub sa_sigaction: ::sighandler_t,
-        pub sa_mask: ::sigset_t,
-        #[cfg(target_arch = "sparc64")]
-        __reserved0: ::c_int,
-        pub sa_flags: ::c_int,
-        _restorer: *mut ::c_void,
-    }
-
-    pub struct stack_t { // ToDo
-        pub ss_sp: *mut ::c_void,
-        pub ss_flags: ::c_int,
-        pub ss_size: ::size_t
-    }
-
-    pub struct statfs { // ToDo
-        pub f_type: fsword_t,
-        pub f_bsize: fsword_t,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_files: ::fsfilcnt_t,
-        pub f_ffree: ::fsfilcnt_t,
-        pub f_fsid: ::fsid_t,
-        pub f_namelen: fsword_t,
-        pub f_frsize: fsword_t,
-        f_spare: [fsword_t; 5],
-    }
-
-    pub struct msghdr { // ToDo
-        pub msg_name: *mut ::c_void,
-        pub msg_namelen: ::socklen_t,
-        pub msg_iov: *mut ::iovec,
-        pub msg_iovlen: ::size_t,
-        pub msg_control: *mut ::c_void,
-        pub msg_controllen: ::size_t,
-        pub msg_flags: ::c_int,
-    }
-
-    pub struct termios { // ToDo
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_line: ::cc_t,
-        pub c_cc: [::cc_t; ::NCCS],
-    }
-
-    pub struct sem_t { // ToDo
-        #[cfg(target_pointer_width = "32")]
-        __size: [::c_char; 16],
-        #[cfg(target_pointer_width = "64")]
-        __size: [::c_char; 32],
-        __align: [::c_long; 0],
-    }
-
-    pub struct pthread_mutex_t { // ToDo
-        #[cfg(any(target_arch = "mips", target_arch = "arm",
-                  target_arch = "powerpc"))]
-        __align: [::c_long; 0],
-        #[cfg(not(any(target_arch = "mips", target_arch = "arm",
-                      target_arch = "powerpc")))]
-        __align: [::c_longlong; 0],
-        size: [u8; __SIZEOF_PTHREAD_MUTEX_T],
-    }
-
-    pub struct pthread_mutexattr_t { // ToDo
-        #[cfg(any(target_arch = "x86_64", target_arch = "powerpc64",
-                  target_arch = "mips64", target_arch = "s390x",
-                  target_arch = "sparc64"))]
-        __align: [::c_int; 0],
-        #[cfg(not(any(target_arch = "x86_64", target_arch = "powerpc64",
-                      target_arch = "mips64", target_arch = "s390x",
-                      target_arch = "sparc64")))]
-        __align: [::c_long; 0],
-        size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T],
-    }
-
-    pub struct pthread_cond_t { // ToDo
-        __align: [::c_longlong; 0],
-        size: [u8; __SIZEOF_PTHREAD_COND_T],
-    }
-
-    pub struct pthread_condattr_t { // ToDo
-        __align: [::c_int; 0],
-        size: [u8; __SIZEOF_PTHREAD_CONDATTR_T],
-    }
-
-    pub struct pthread_rwlock_t { // ToDo
-        #[cfg(any(target_arch = "mips", target_arch = "arm",
-                  target_arch = "powerpc"))]
-        __align: [::c_long; 0],
-        #[cfg(not(any(target_arch = "mips", target_arch = "arm",
-                      target_arch = "powerpc")))]
-        __align: [::c_longlong; 0],
-        size: [u8; __SIZEOF_PTHREAD_RWLOCK_T],
-    }
-
-    pub struct sigset_t { // ToDo
-        __val: [::c_ulong; 16],
-    }
-
-    pub struct sysinfo { // ToDo
-        pub uptime: ::c_long,
-        pub loads: [::c_ulong; 3],
-        pub totalram: ::c_ulong,
-        pub freeram: ::c_ulong,
-        pub sharedram: ::c_ulong,
-        pub bufferram: ::c_ulong,
-        pub totalswap: ::c_ulong,
-        pub freeswap: ::c_ulong,
-        pub procs: ::c_ushort,
-        pub pad: ::c_ushort,
-        pub totalhigh: ::c_ulong,
-        pub freehigh: ::c_ulong,
-        pub mem_unit: ::c_uint,
-        pub _f: [::c_char; 0],
-    }
-
-    pub struct glob_t { // ToDo
-        pub gl_pathc: ::size_t,
-        pub gl_pathv: *mut *mut c_char,
-        pub gl_offs: ::size_t,
-        pub gl_flags: ::c_int,
-        __unused1: *mut ::c_void,
-        __unused2: *mut ::c_void,
-        __unused3: *mut ::c_void,
-        __unused4: *mut ::c_void,
-        __unused5: *mut ::c_void,
-    }
-
-    pub struct stat64 { // ToDo
-        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 rlimit64 { // ToDo
-        pub rlim_cur: rlim64_t,
-        pub rlim_max: rlim64_t,
-    }
-
-    pub struct cpu_set_t { // ToDo
-        #[cfg(target_pointer_width = "32")]
-        bits: [u32; 32],
-        #[cfg(target_pointer_width = "64")]
-        bits: [u64; 16],
-    }
-
-    pub struct timespec { // ToDo
-        tv_sec: time_t, // seconds
-        tv_nsec: ::c_ulong, // nanoseconds
-    }
-
-    pub struct fsid_t { // ToDo
-        __val: [::c_int; 2],
-    }
-}
-
-// constants
-pub const O_CLOEXEC: ::c_int = 0x80000;
-pub const O_DIRECTORY: ::c_int = 0200000;
-pub const NCCS: usize = 32;
-pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
-pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
-pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
-pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
-pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
-pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
-pub const __SIZEOF_PTHREAD_COND_T: usize = 48;
-pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
-pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
-
-extern {
-    pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
-}
deleted file mode 100644
--- a/third_party/rust/libc-0.2.24/src/windows.rs
+++ /dev/null
@@ -1,235 +0,0 @@
-//! Windows CRT definitions
-
-pub type c_char = i8;
-pub type c_long = i32;
-pub type c_ulong = u32;
-pub type wchar_t = u16;
-
-pub type clock_t = i32;
-
-cfg_if! {
-    if #[cfg(all(target_arch = "x86", target_env = "gnu"))] {
-        pub type time_t = i32;
-    } else {
-        pub type time_t = i64;
-    }
-}
-
-pub type off_t = i32;
-pub type dev_t = u32;
-pub type ino_t = u16;
-pub enum timezone {}
-pub type time64_t = i64;
-
-s! {
-    // note this is the struct called stat64 in Windows. Not stat, nor stati64.
-    pub struct stat {
-        pub st_dev: dev_t,
-        pub st_ino: ino_t,
-        pub st_mode: u16,
-        pub st_nlink: ::c_short,
-        pub st_uid: ::c_short,
-        pub st_gid: ::c_short,
-        pub st_rdev: dev_t,
-        pub st_size: i64,
-        pub st_atime: time64_t,
-        pub st_mtime: time64_t,
-        pub st_ctime: time64_t,
-    }
-
-    // note that this is called utimbuf64 in Windows
-    pub struct utimbuf {
-        pub actime: time64_t,
-        pub modtime: time64_t,
-    }
-
-    pub struct timeval {
-        pub tv_sec: c_long,
-        pub tv_usec: c_long,
-    }
-
-    pub struct timespec {
-        pub tv_sec: time_t,
-        pub tv_nsec: c_long,
-    }
-}
-
-pub const EXIT_FAILURE: ::c_int = 1;
-pub const EXIT_SUCCESS: ::c_int = 0;
-pub const RAND_MAX: ::c_int = 32767;
-pub const EOF: ::c_int = -1;
-pub const SEEK_SET: ::c_int = 0;
-pub const SEEK_CUR: ::c_int = 1;
-pub const SEEK_END: ::c_int = 2;
-pub const _IOFBF: ::c_int = 0;
-pub const _IONBF: ::c_int = 4;
-pub const _IOLBF: ::c_int = 64;
-pub const BUFSIZ: ::c_uint = 512;
-pub const FOPEN_MAX: ::c_uint = 20;
-pub const FILENAME_MAX: ::c_uint = 260;
-
-cfg_if! {
-    if #[cfg(all(target_env = "gnu"))] {
-        pub const L_tmpnam: ::c_uint = 14;
-        pub const TMP_MAX: ::c_uint = 0x7fff;
-    } else if #[cfg(all(target_env = "msvc"))] {
-        pub const L_tmpnam: ::c_uint = 260;
-        pub const TMP_MAX: ::c_uint = 0x7fff_ffff;
-    } else {
-        // Unknown target_env
-    }
-}
-
-pub const O_RDONLY: ::c_int = 0;
-pub const O_WRONLY: ::c_int = 1;
-pub const O_RDWR: ::c_int = 2;
-pub const O_APPEND: ::c_int = 8;
-pub const O_CREAT: ::c_int = 256;
-pub const O_EXCL: ::c_int = 1024;
-pub const O_TEXT: ::c_int = 16384;
-pub const O_BINARY: ::c_int = 32768;
-pub const O_NOINHERIT: ::c_int = 128;
-pub const O_TRUNC: ::c_int = 512;
-pub const S_IFCHR: ::c_int = 8192;
-pub const S_IFDIR: ::c_int = 16384;
-pub const S_IFREG: ::c_int = 32768;
-pub const S_IFMT: ::c_int = 61440;
-pub const S_IEXEC: ::c_int = 64;
-pub const S_IWRITE: ::c_int = 128;
-pub const S_IREAD: ::c_int = 256;
-
-pub const LC_ALL: ::c_int = 0;
-pub const LC_COLLATE: ::c_int = 1;
-pub const LC_CTYPE: ::c_int = 2;
-pub const LC_MONETARY: ::c_int = 3;
-pub const LC_NUMERIC: ::c_int = 4;
-pub const LC_TIME: ::c_int = 5;
-
-pub const EPERM: ::c_int = 1;
-pub const ENOENT: ::c_int = 2;
-pub const ESRCH: ::c_int = 3;
-pub const EINTR: ::c_int = 4;
-pub const EIO: ::c_int = 5;
-pub const ENXIO: ::c_int = 6;
-pub const E2BIG: ::c_int = 7;
-pub const ENOEXEC: ::c_int = 8;
-pub const EBADF: ::c_int = 9;
-pub const ECHILD: ::c_int = 10;
-pub const EAGAIN: ::c_int = 11;
-pub const ENOMEM: ::c_int = 12;
-pub const EACCES: ::c_int = 13;
-pub const EFAULT: ::c_int = 14;
-pub const EBUSY: ::c_int = 16;
-pub const EEXIST: ::c_int = 17;
-pub const EXDEV: ::c_int = 18;
-pub const ENODEV: ::c_int = 19;
-pub const ENOTDIR: ::c_int = 20;
-pub const EISDIR: ::c_int = 21;
-pub const EINVAL: ::c_int = 22;
-pub const ENFILE: ::c_int = 23;
-pub const EMFILE: ::c_int = 24;
-pub const ENOTTY: ::c_int = 25;
-pub const EFBIG: ::c_int = 27;
-pub const ENOSPC: ::c_int = 28;
-pub const ESPIPE: ::c_int = 29;
-pub const EROFS: ::c_int = 30;
-pub const EMLINK: ::c_int = 31;
-pub const EPIPE: ::c_int = 32;
-pub const EDOM: ::c_int = 33;
-pub const ERANGE: ::c_int = 34;
-pub const EDEADLK: ::c_int = 36;
-pub const EDEADLOCK: ::c_int = 36;
-pub const ENAMETOOLONG: ::c_int = 38;
-pub const ENOLCK: ::c_int = 39;
-pub const ENOSYS: ::c_int = 40;
-pub const ENOTEMPTY: ::c_int = 41;
-pub const EILSEQ: ::c_int = 42;
-pub const STRUNCATE: ::c_int = 80;
-
-#[cfg(all(target_env = "msvc", stdbuild))] // " if " -- appease style checker
-#[link(name = "msvcrt", cfg(not(target_feature = "crt-static")))]
-#[link(name = "libcmt", cfg(target_feature = "crt-static"))]
-extern {}
-
-extern {
-    #[link_name = "_chmod"]
-    pub fn chmod(path: *const c_char, mode: ::c_int) -> ::c_int;
-    #[link_name = "_wchmod"]
-    pub fn wchmod(path: *const wchar_t, mode: ::c_int) -> ::c_int;
-    #[link_name = "_mkdir"]
-    pub fn mkdir(path: *const c_char) -> ::c_int;
-    #[link_name = "_wrmdir"]
-    pub fn wrmdir(path: *const wchar_t) -> ::c_int;
-    #[link_name = "_fstat64"]
-    pub fn fstat(fildes: ::c_int, buf: *mut stat) -> ::c_int;
-    #[link_name = "_stat64"]
-    pub fn stat(path: *const c_char, buf: *mut stat) -> ::c_int;
-    #[link_name = "_wstat64"]
-    pub fn wstat(path: *const wchar_t, buf: *mut stat) -> ::c_int;
-    #[link_name = "_wutime64"]
-    pub fn wutime(file: *const wchar_t, buf: *mut utimbuf) -> ::c_int;
-    #[link_name = "_popen"]
-    pub fn popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE;
-    #[link_name = "_pclose"]
-    pub fn pclose(stream: *mut ::FILE) -> ::c_int;
-    #[link_name = "_fdopen"]
-    pub fn fdopen(fd: ::c_int, mode: *const c_char) -> *mut ::FILE;
-    #[link_name = "_fileno"]
-    pub fn fileno(stream: *mut ::FILE) -> ::c_int;
-    #[link_name = "_open"]
-    pub fn open(path: *const c_char, oflag: ::c_int, ...) -> ::c_int;
-    #[link_name = "_wopen"]
-    pub fn wopen(path: *const wchar_t, oflag: ::c_int, ...) -> ::c_int;
-    #[link_name = "_creat"]
-    pub fn creat(path: *const c_char, mode: ::c_int) -> ::c_int;
-    #[link_name = "_access"]
-    pub fn access(path: *const c_char, amode: ::c_int) -> ::c_int;
-    #[link_name = "_chdir"]
-    pub fn chdir(dir: *const c_char) -> ::c_int;
-    #[link_name = "_close"]
-    pub fn close(fd: ::c_int) -> ::c_int;
-    #[link_name = "_dup"]
-    pub fn dup(fd: ::c_int) -> ::c_int;
-    #[link_name = "_dup2"]
-    pub fn dup2(src: ::c_int, dst: ::c_int) -> ::c_int;
-    #[link_name = "_execv"]
-    pub fn execv(prog: *const c_char, argv: *const *const c_char) -> ::intptr_t;
-    #[link_name = "_execve"]
-    pub fn execve(prog: *const c_char, argv: *const *const c_char,
-                  envp: *const *const c_char) -> ::c_int;
-    #[link_name = "_execvp"]
-    pub fn execvp(c: *const c_char, argv: *const *const c_char) -> ::c_int;
-    #[link_name = "_execvpe"]
-    pub fn execvpe(c: *const c_char, argv: *const *const c_char,
-                   envp: *const *const c_char) -> ::c_int;
-    #[link_name = "_getcwd"]
-    pub fn getcwd(buf: *mut c_char, size: ::c_int) -> *mut c_char;
-    #[link_name = "_getpid"]
-    pub fn getpid() -> ::c_int;
-    #[link_name = "_isatty"]
-    pub fn isatty(fd: ::c_int) -> ::c_int;
-    #[link_name = "_lseek"]
-    pub fn lseek(fd: ::c_int, offset: c_long, origin: ::c_int) -> c_long;
-    #[link_name = "_pipe"]
-    pub fn pipe(fds: *mut ::c_int,
-                psize: ::c_uint,
-                textmode: ::c_int) -> ::c_int;
-    #[link_name = "_read"]
-    pub fn read(fd: ::c_int, buf: *mut ::c_void, count: ::c_uint) -> ::c_int;
-    #[link_name = "_rmdir"]
-    pub fn rmdir(path: *const c_char) -> ::c_int;
-    #[link_name = "_unlink"]
-    pub fn unlink(c: *const c_char) -> ::c_int;
-    #[link_name = "_write"]
-    pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::c_uint) -> ::c_int;
-    #[link_name = "_commit"]
-    pub fn commit(fd: ::c_int) -> ::c_int;
-    #[link_name = "_get_osfhandle"]
-    pub fn get_osfhandle(fd: ::c_int) -> ::intptr_t;
-    #[link_name = "_open_osfhandle"]
-    pub fn open_osfhandle(osfhandle: ::intptr_t, flags: ::c_int) -> ::c_int;
-    pub fn setlocale(category: ::c_int, locale: *const c_char) -> *mut c_char;
-    #[link_name = "_wsetlocale"]
-    pub fn wsetlocale(category: ::c_int,
-                      locale: *const wchar_t) -> *mut wchar_t;
-}
--- a/third_party/rust/libc/.cargo-checksum.json
+++ b/third_party/rust/libc/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".travis.yml":"d323dad8a4a6a7f88471a3a671478ee56ef1a6b26472358650a0e7597b239c65","Cargo.toml":"3642623f8dc43de106c0f1e53ba38c09a06e709713360ac45ab661bab95527ed","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"00fbfd7e989de6ecc270aed1f1c2c20560ac67e6c1564833622b8e34385c6170","appveyor.yml":"fec0ac820d19c40534301966f82524372e4855e4f61eeec486d42bf850d77f71","ci/README.md":"b8debdd9044a773dbccc85e574eed21008784117d77c24a15f207d4b2a173a14","ci/android-install-ndk.sh":"725db9025c5905849916bf7c910f98ff0e753484397c2a1f836d48a576d10890","ci/android-install-sdk.sh":"5c3fbe402ac611239ac7715a61f247d1c55fa012f33a5be0b0127dfc196965cf","ci/android-sysimage.sh":"901415631752827454c827e8c51906ba4260612e4021eda98eb7fff771c7d0e8","ci/docker/aarch64-linux-android/Dockerfile":"e17945fba1786dfe766006f50e79baf3f4151ca0c0c14ae96f91483bf345afd7","ci/docker/aarch64-unknown-linux-gnu/Dockerfile":"5f430271941e1eecdf9d1a5fb701dd5622e2c4b9da03140fd829bf216e55529d","ci/docker/aarch64-unknown-linux-musl/Dockerfile":"3e1cbf0fa728571b9be9769e5a6281c964fa5b26d586265117ccee017ca4022c","ci/docker/arm-linux-androideabi/Dockerfile":"4e0bdc13254f99bd0db195f91331c634050426e3e4a0fcc63ef25ab795fe2d46","ci/docker/arm-unknown-linux-gnueabihf/Dockerfile":"dbb025b53b27e406893184290836a50133ecae8295711d5e05b4e41fac9bd262","ci/docker/arm-unknown-linux-musleabihf/Dockerfile":"7cb6e0f8fb91c97f142a9c827687bbbc1a5e7643a3081160025d0365593a596c","ci/docker/asmjs-unknown-emscripten/Dockerfile":"0d9aea5119c2cd136cc2c0a578105d91210e45901ac49b17c5e45f458b1c7551","ci/docker/i686-linux-android/Dockerfile":"4e8377ec0bd9ad2df23bf2c5373200a12750dc9f28c4f10bc83a0150fe1623ee","ci/docker/i686-unknown-linux-gnu/Dockerfile":"ca61f403bd3eaec7f3e51165ae7f74cd559a65ce657aed4700d726a2aabea648","ci/docker/i686-unknown-linux-musl/Dockerfile":"4ac86fe9e159d454616396a9f3f07ce0f5d99cc4b49898b8d2486e6bdbfed9e9","ci/docker/mips-unknown-linux-gnu/Dockerfile":"6d2a9daa299003497c1d441d07b69f730ad75ee49f34520f959b5158e60072e0","ci/docker/mips-unknown-linux-musl/Dockerfile":"4773b2656a7dd6a3b106fcb737428436652edf3d1f48181de3f62c16bf5bd49d","ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile":"7c4d26232f1c1553a6612d9b0b3faac9887e139eaffa025f70d34113dcee812f","ci/docker/mips64el-unknown-linux-gnuabi64/Dockerfile":"edb4144c07ade1a8bd65272ec1d3672ad794e9e6b7d01197896e159a70175b58","ci/docker/mipsel-unknown-linux-musl/Dockerfile":"0ca9c12b5618c6d2df04ff820d56fb28e05b43e45eaa506480126b03c5072d48","ci/docker/powerpc-unknown-linux-gnu/Dockerfile":"4b247dcc399395815ec9153c1247cc03d764896c484eddcb196d0bf8650d6311","ci/docker/powerpc64-unknown-linux-gnu/Dockerfile":"e949717a8ba5e123940729ff47ce1c45989c8b8247c576f1488f698b534e0283","ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile":"018591017f499414a9f79477e1c39baa6a47f71fce6812fb1868fb0fcdfb8cea","ci/docker/s390x-unknown-linux-gnu/Dockerfile":"63bb605e333b8351ee2366def0cfb77f206c66f43bc2d5d9ca18ee0119fa5672","ci/docker/sparc64-unknown-linux-gnu/Dockerfile":"6eae4d575de47aefc429dfb1957856bc7107fc7456883563acdfb9886154e5bb","ci/docker/wasm32-unknown-emscripten/Dockerfile":"bd072d6ae91a9160693e402dd77462d3c9dd0716711e719a62af330ae479eb4e","ci/docker/wasm32-unknown-emscripten/node-wrapper.sh":"6ec19745e08690b7b5d7f882004a8a63b69ac815d66e3f8c5a38d2c3e78b962e","ci/docker/x86_64-linux-android/Dockerfile":"aeeaa540189ca712369c564c9a14cbace63217dadcfaf879a2cb40fbdeb08199","ci/docker/x86_64-rumprun-netbsd/Dockerfile":"e8f9287b267c6058eec42d1bca0007cb9a78a1d244dd8e11088368cb61fb17d6","ci/docker/x86_64-rumprun-netbsd/runtest.rs":"53302e9ed39293c1ec68ab56287593907d4aaf5bac9c1c2857b29f754a71d62b","ci/docker/x86_64-unknown-freebsd/Dockerfile":"dfc00fa7d5dbb24e6864fb62cdbd48536c14c0be2d40fd02de53d1374e4b760a","ci/docker/x86_64-unknown-linux-gnu/Dockerfile":"342e16d6d1dd3c23b735b0705aa04e48261401746edcf24170910d5650eeda56","ci/docker/x86_64-unknown-linux-gnux32/Dockerfile":"ca61f403bd3eaec7f3e51165ae7f74cd559a65ce657aed4700d726a2aabea648","ci/docker/x86_64-unknown-linux-musl/Dockerfile":"e145784741473150473b1bef7cc3c2cf0c6339d4fc480113ac41b4247a9b38ec","ci/dox.sh":"9ea240a4a607036235fd68c01b5d2a59f365768d103d3be774dcf34aa3ff563e","ci/emscripten-entry.sh":"1c1384b4a8b0c055d8095d9d9b2c9dccbdcdb2d5f90fdca34a1976ca8fc379c6","ci/emscripten.sh":"6f66c7b5c3d34a41afc59ceb0a8c3b0880cd6fd9a6344b874ae80bac0639ccb2","ci/ios/deploy_and_run_on_ios_simulator.rs":"3175066fd7f82390f6226d881e1a1dda9767ea2705656870e0d7774e2731800e","ci/landing-page-footer.html":"b70b3112c2147f5c967e7481061ef38bc2d79a28dd55a16fb916d9c9426da2c4","ci/landing-page-head.html":"ad69663fac7924f27d0209bc519d55838e86edfc4133713a6fd08caadac1b142","ci/run-docker.sh":"be83bc5a8b5ef913a7c9941ffca24734716028650c9a876123c4c160672c18de","ci/run-qemu.sh":"bb859421170871ef23a8940c5e150efec0c01b95e32d2ce2d37b79a45d9d346c","ci/run.sh":"f78a0aff66c19002b9a39ef557adb28dcf0a73e18c3eb4934943a4745df8b8fa","ci/runtest-android.rs":"a07ddbdd276aedda7876c7e676774178a60d9aeab95df01275a4ee95f59e3044","ci/style.rs":"60564abc1d5197ed1598426dd0d6ee9939a16d2875b03373538f58843bb616c4","src/dox.rs":"a2b4907054e260e2db31415379d4db87acd91a8d02fb2178679628079910404f","src/lib.rs":"5f6bee7224a6131862e6cba9dfff57a6340329694b97da9d9f30a668271c0f78","src/macros.rs":"e1b0bf5db89faa8fcb39a3fd46cdb5fdcfabb7f3524eb2192157f0188b8a764b","src/redox/mod.rs":"07ae6652bc6f7fe276255bda210eae7a197d3d64d9dede6dadce0478e8890e2b","src/redox/net.rs":"a1e9d2291e2c12833333ac8706b23f388ce5dbe1718bdd7b38fd68c74559f0b4","src/unix/bsd/apple/b32.rs":"d107376452f731f5d8a1e6b544bdcaac826c95a383d4b20e2032f115eb9f3256","src/unix/bsd/apple/b64.rs":"ab141ad0c8c58342c06858f6f34b75eef70e58cb58e7375d460a9be6739b5e6a","src/unix/bsd/apple/mod.rs":"a7e48a4e3edb132c433e76a3f60f85ae2fd3f28f48e79b41f7461076c7233859","src/unix/bsd/freebsdlike/dragonfly/mod.rs":"62689b8aa80d308d425385daf9b4ea2ed20b19e0590dc57b6efa08b266945bbd","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"97132e2097411034271b8c927ecc94a208a361564680972a6c82998bd30a9826","src/unix/bsd/freebsdlike/freebsd/mod.rs":"9a8cb662cb2cbe5facba1b3519748f657b18b3eee30fa43b75125012745a5cb1","src/unix/bsd/freebsdlike/freebsd/x86.rs":"54311d3ebf2bb091ab22361e377e6ef9224aec2ecfe459fbfcedde4932db9c58","src/unix/bsd/freebsdlike/freebsd/x86_64.rs":"97132e2097411034271b8c927ecc94a208a361564680972a6c82998bd30a9826","src/unix/bsd/freebsdlike/mod.rs":"c9895c61e4b01f0b397cbd9d40c977e71774888cad85455bbb23eded85311284","src/unix/bsd/mod.rs":"1546c73fd87103a7282c3ceaa2d1e55f91b8bab2ec705c733351f715722e6b2f","src/unix/bsd/netbsdlike/mod.rs":"edbc1ff82f6a71999cc8664a4e10e43302d33f93b925649b52d97be3821c63d5","src/unix/bsd/netbsdlike/netbsd/mod.rs":"a20d0283670a6a700fa56d12c8a4285ff75ae5a2603706bc17c4cf9799ffd8c3","src/unix/bsd/netbsdlike/netbsd/other/b32/mod.rs":"bd251a102bed65d5cb3459275f6ec3310fe5803ff4c9651212115548f86256d0","src/unix/bsd/netbsdlike/netbsd/other/b64/mod.rs":"927eeccaf3269d299db4c2a55f8010807bf43dfa894aea6a783215f5d3560baa","src/unix/bsd/netbsdlike/netbsd/other/mod.rs":"4d9f7091af8e166943ac6f42ce85558909e5b6e61325039bff7adfbcf4b90212","src/unix/bsd/netbsdlike/openbsdlike/bitrig.rs":"f8cd05dacd3a3136c58da5a2fbe26f703767823b28e74fe8a2b57a7bd98d6d5c","src/unix/bsd/netbsdlike/openbsdlike/mod.rs":"3ba4790618db8308e74f8fec16587ae7d584773eefb619948a25a7330b832b3f","src/unix/bsd/netbsdlike/openbsdlike/openbsd.rs":"302817036aa7e7afbc82248cf66b040ef1edfbcb136c9ad243fe20f98df8d6f8","src/unix/bsd/netbsdlike/openbsdlike/other/b32/mod.rs":"bd251a102bed65d5cb3459275f6ec3310fe5803ff4c9651212115548f86256d0","src/unix/bsd/netbsdlike/openbsdlike/other/b64/mod.rs":"927eeccaf3269d299db4c2a55f8010807bf43dfa894aea6a783215f5d3560baa","src/unix/bsd/netbsdlike/openbsdlike/other/mod.rs":"f5d8db6f54efd05520b31b764a6bacbf612e1aebce097d2d5bfaaef3b91f37b5","src/unix/haiku/b32.rs":"69ae47fc52c6880e85416b4744500d5655c9ec6131cb737f3b649fceaadce15a","src/unix/haiku/b64.rs":"73e64db09275a8da8d50a13cce2cfa2b136036ddf3a930d2939f337fc995900b","src/unix/haiku/mod.rs":"f3c940954b2a404e07afc512e78b4e496628b9a9036bd9221ee265b67c618f16","src/unix/mod.rs":"1d95051294ac738f852fc6bb85921618efd911b5772a321f7465a73dabb930e9","src/unix/newlib/arm/mod.rs":"2b6dba2e697ab9b4f4bc4dd5f28057249e9b596d1cb395a9322ec87605c4a5c4","src/unix/newlib/mod.rs":"49227cd0ec18911a91b6ab8a278da3b430321c562b393fbfac92edd354b0a7ee","src/unix/notbsd/android/b32/arm.rs":"3625a32c7e58cfe683a53486fbe3d42d4e28f00bea31e19cb46ed2bb0b6a140b","src/unix/notbsd/android/b32/mod.rs":"e9ec6f08e20ea235cd7095604ea6e37c739c1276e9f40fa31a4db4951fa005af","src/unix/notbsd/android/b32/x86.rs":"ae2b7f1d6278caddc007749bb1d09ca33f7593478a0fd7fe98b457dae86c7814","src/unix/notbsd/android/b64/aarch64.rs":"63d65629d79371814910f691672ef593d20244ee09be26f1ebe07ee6212d0163","src/unix/notbsd/android/b64/mod.rs":"63290adc8122c040f9be369ef4180975bcf1a967a717aa75d30371162d5d5fa9","src/unix/notbsd/android/b64/x86_64.rs":"5547aef8dcbaa5a932559f34606fd8d89f6c9c15173d2b1412c12d39b3c1045f","src/unix/notbsd/android/mod.rs":"7fa19bd63dc3582f12769be51e9a1b355d24744e17ea9aef67380f535b58e2b1","src/unix/notbsd/emscripten.rs":"f8d8acf5cef1acd1a6bdd41299054120820865d072c4c2e3c740fbd0c6e9b3e7","src/unix/notbsd/linux/mips/mips32.rs":"f769bbe5c48f77e6bc94e37deccd2866e7e52e7eb1b3cd7611dbad95574e82f8","src/unix/notbsd/linux/mips/mips64.rs":"ef678b48b571428d46fef5b2ca9bef7251b5f27fcd2c38d987d1b80f2ad3ece0","src/unix/notbsd/linux/mips/mod.rs":"515eb57ee1798fadb6654ce845fb49098593815c2130a30010959f36565e65f9","src/unix/notbsd/linux/mod.rs":"1e1a96e85a9ffcd618f7b459ef2a2ccf9487b3eb97c74cff6c7ce83bb115815e","src/unix/notbsd/linux/musl/b32/arm.rs":"d2998b13648696304bb34f0793715d821178baf8e88a45b532764a20b5294232","src/unix/notbsd/linux/musl/b32/mips.rs":"340be794362a4532d709ef23542b10762f710f7bfd0c4fafa5166a3fb9a15b4f","src/unix/notbsd/linux/musl/b32/mod.rs":"3cc7979546258a47df6b0fcd7ad64571826623671857633a7acafe87e05e56a1","src/unix/notbsd/linux/musl/b32/x86.rs":"df114102dcf35bc32f891d4a9e09ce02fbe4c096a196c6b98b10ff87b29dbe4d","src/unix/notbsd/linux/musl/b64/aarch64.rs":"12c590fde2a1450c08934234c4f5bcd94ee7b58ca21f8e93bc930148c15fb0b0","src/unix/notbsd/linux/musl/b64/mod.rs":"b1991ef46a00d2db7ce3e36f6596685c1d508786c4dd4e62cbbf65ac3c256cc0","src/unix/notbsd/linux/musl/b64/powerpc64.rs":"239c5754811e2d75723bd0d540e732630c9817c5f24513d1f02b63e6b27a3a57","src/unix/notbsd/linux/musl/b64/x86_64.rs":"bf8fc10a09bf700084db0381c484ddec3add79aa1726954cb14d21802ff7d199","src/unix/notbsd/linux/musl/mod.rs":"60cf407596bc7b369d2e6a4d8f2e821d203f6a4284cc5e71312d1fb141a81f1d","src/unix/notbsd/linux/other/b32/arm.rs":"d9892f7350b2978335f734f1cd2d7fed60f0f2e66aa05bee3f69549c031f8b14","src/unix/notbsd/linux/other/b32/mod.rs":"ea91ffe90cd71d45a6e00e7d001cfcfafc8a840aa2b372078798b160968bdaf6","src/unix/notbsd/linux/other/b32/powerpc.rs":"253fcd2f9978525285be1903cc08f3fec2dc3b12d1660a33e2995b4f6b810d1c","src/unix/notbsd/linux/other/b32/x86.rs":"49376e3ed0f3ff95c230ac20751911fe3c608dfe15c7c118b069fd7a954d8db9","src/unix/notbsd/linux/other/b64/aarch64.rs":"cd04a0c1f8d090753600143495b975d8fa4eacc96fc6eeacd8f378ba70d8c838","src/unix/notbsd/linux/other/b64/mod.rs":"63e1a3fdf5f4d1b9820934ab344c91aed5e458e7e05908535d2e942d51a08bf8","src/unix/notbsd/linux/other/b64/not_x32.rs":"e1cf87b9dbe89e9fff667c6fc8eff0166a02565ef65aae3dc9304dc70f7a5624","src/unix/notbsd/linux/other/b64/powerpc64.rs":"25de66d04d2200f00a2e6e0eb97484b43c466897cc789598c728323ee311000b","src/unix/notbsd/linux/other/b64/sparc64.rs":"f26439fa0506ffc5efb0314fcef63cd69964bb5602baec2a0bd1439444dac5e3","src/unix/notbsd/linux/other/b64/x32.rs":"e521bd43a2d66f09f03a045b2e1f69f2ca91cff37922ac5b7c437d888799cee6","src/unix/notbsd/linux/other/b64/x86_64.rs":"924d0282f549507ce46bddc4ac2c489641f883c0620438eea1f6d9fbbbdbbe4b","src/unix/notbsd/linux/other/mod.rs":"5b62146535521c1e7730ea7cba53fd9285831616318abcf5134af992d6cca4a3","src/unix/notbsd/linux/s390x.rs":"f11f595427393a90803a180fa9ca77b048d1d76da0634b92f4b038db07f5623b","src/unix/notbsd/mod.rs":"d2643df7dc6c4affb0ea43ff4471558df317e788942dfde5096c2479f6d42f08","src/unix/solaris/mod.rs":"972b7847f7a67135a93f7604928645103e13f2cf00d1b8bc82994a620101a145","src/unix/uclibc/mips/mips32.rs":"31b23e466cffb86116421ec9240b86e7419aacd84b0b1b04d23c7142c8717566","src/unix/uclibc/mips/mips64.rs":"e67eec1636a998b047d89a4cda1c99cb6bc3071db017762675179a68201c4438","src/unix/uclibc/mips/mod.rs":"74817a9b1ee3998d8e0b751a555d57225f70fd979c283c94ada344a162a8b856","src/unix/uclibc/mod.rs":"89429fbdca93bcdd84a35a36583a143dd67d3e282d7dcb6b7f73fd9a9c038108","src/unix/uclibc/x86_64/l4re.rs":"54b4e58ce5a671348c32bc41c1607dbc5c13fa6818cc3e0e0e2b409c300a305e","src/unix/uclibc/x86_64/mod.rs":"bd569360c45a6f2b585cfb47544d223e92243a2ff4f8429b78fecac6b889f9fd","src/windows.rs":"e41357d610608bad81abf285306ad8b127b6f02d5132f63c4942861980b47d59"},"package":"5ba3df4dcb460b9dfbd070d41c94c19209620c191b0340b929ce748a2bcd42d2"}
\ No newline at end of file
+{"files":{".travis.yml":"85d7a35a85a0653ea7072811fd0ba37cf00df4e0b2bcc3781bfc171220046001","Cargo.toml":"7ea5ce66ef7d756befcc155bdeb4135171920a934ecd384eb9f54359a4ce547a","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"8a9859c60f78d9075e22bc9f85b40e0b0216cccaeb7025c9f464cc33dcddaf5c","appveyor.yml":"483ae27670e061eb91f055699a9ad88255050b7b300f183b8580340407751bb4","ci/README.md":"be804f15e2128e5fd4b160cb0b13cff5f19e7d77b55ec5254aa6fd8731c84f0d","ci/android-accept-licenses.sh":"84ad00815f628005ed22c5d6cd14990ebc97812a7163bd275b2877904eddab53","ci/android-install-ndk.sh":"73c5f21438c024ce1b8c793184447ff9aecd83c87cbde8de580b782842b3563f","ci/android-install-sdk.sh":"891900fe4e4ceb04717b91a253753858270defc6d6401936d08c09801c1de178","ci/android-sysimage.sh":"901415631752827454c827e8c51906ba4260612e4021eda98eb7fff771c7d0e8","ci/docker/aarch64-linux-android/Dockerfile":"68f375c6e0b3716f8c0b6ed217bc6c3631fa2b86c578b983a0bf60d0344efd74","ci/docker/aarch64-unknown-linux-gnu/Dockerfile":"62ca7317439f9c303990e897450a91cd467be05eb75dfc01456d417932ac8672","ci/docker/arm-linux-androideabi/Dockerfile":"1193bf048efbeb9be3c9fac0836dcf6ae07e12cdf09b36b386dd4cbd62abbffa","ci/docker/arm-unknown-linux-gnueabihf/Dockerfile":"e349f7caa463adbde8d6ec4d2b9f7720ed81c77f48d75bbfb78c89751f55c2dc","ci/docker/i686-linux-android/Dockerfile":"7c353aecdf0b21d8584392cc6ea31d455adad769034c3ea09191a1b26a2521e1","ci/docker/i686-unknown-linux-gnu/Dockerfile":"07e9df6ba91025cbec7ae81ade63f8cfb8a54c5e1e5a8f8def0617e17bd59db0","ci/docker/i686-unknown-linux-musl/Dockerfile":"fcaedc90fbb90375186b36b4324bff0a042aae70695be0f2b632e3cf7479eae6","ci/docker/mips-unknown-linux-gnu/Dockerfile":"860299d96ee50ebdbd788e65eb6ba1f561ef66107647bddffcb2567ac350896b","ci/docker/mips-unknown-linux-musl/Dockerfile":"711c43122fa34cee83a69944493213924b0ff1fccd78c7a141cb2b2127526484","ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile":"163776e0fd38f66df7415421202ac29efc7d345a628947434e573c3885594ab5","ci/docker/mipsel-unknown-linux-musl/Dockerfile":"aef213df08da03ab6a723c3e6e5594a0586251950d81482cf53179d8e64e95c7","ci/docker/powerpc-unknown-linux-gnu/Dockerfile":"08b846a338c2ee70100f4e80db812668dc58bfb536c44a95cd1cf004d965186b","ci/docker/powerpc64-unknown-linux-gnu/Dockerfile":"4da285ffd035d16f5da9e3701841eb86049c8cfa417fa81e53da4ef74152eac0","ci/docker/x86_64-linux-android/Dockerfile":"a73a344c60575b8ef78b0178f93285ffa2e2d9aa5eb0d2e86d4bad3cab63276f","ci/docker/x86_64-rumprun-netbsd/Dockerfile":"44c3107fb30380785aaed6ff73fa334017a5bb4e3b5c7d4876154f09023a2b99","ci/docker/x86_64-unknown-freebsd/Dockerfile":"ef0f9f63065218728d2daafaa5ba71b17e4ccc23d72e859e0a7133fc64c0815e","ci/docker/x86_64-unknown-linux-gnu/Dockerfile":"67fabbc8c6ac02376cf9344251ad49ecdac396b71accb572fd1ae65225325bc0","ci/docker/x86_64-unknown-linux-musl/Dockerfile":"f71019fed5204b950843ef5e56144161fda7e27fad68ed0e8bc4353c388c7bcf","ci/docker/x86_64-unknown-openbsd/Dockerfile":"dfa5c23a6cff8c7a9a846668118c71a8406a360801fd3632fb12e8fbda6b7338","ci/dox.sh":"9ea240a4a607036235fd68c01b5d2a59f365768d103d3be774dcf34aa3ff563e","ci/ios/deploy_and_run_on_ios_simulator.rs":"3175066fd7f82390f6226d881e1a1dda9767ea2705656870e0d7774e2731800e","ci/landing-page-footer.html":"b70b3112c2147f5c967e7481061ef38bc2d79a28dd55a16fb916d9c9426da2c4","ci/landing-page-head.html":"ad69663fac7924f27d0209bc519d55838e86edfc4133713a6fd08caadac1b142","ci/run-docker.sh":"655712ba6127eb2efe2c641cf4cf1246f3e485096d72ec57b423e9d2bff6fb73","ci/run-qemu.sh":"bb859421170871ef23a8940c5e150efec0c01b95e32d2ce2d37b79a45d9d346c","ci/run.sh":"48c0318287f02889cb73a55e3e2058e79c556d11797d47a1ed66d7c55d1be12f","ci/style.rs":"60564abc1d5197ed1598426dd0d6ee9939a16d2875b03373538f58843bb616c4","src/dox.rs":"bb9a85519e0d4a8d3bfb81301759b9b938435d79da9ce2918248fb2b0df19638","src/lib.rs":"651696755aed40230cde8a505a2dfef61bea52d6349c9b9343497a5c7158ec92","src/macros.rs":"bd9802772b0e5c8b3c550d1c24307f06c0d1e4ce656b4ae1cf092142bbe5412c","src/redox.rs":"3dd158ba9fbbabe96ce2607e91dbf07b93b37c0427734118702dcb4901fe8964","src/unix/bsd/apple/b32.rs":"110ecff78da0e8d405d861447904da403d8b3f6da1f0f9dc9987633f3f04fe46","src/unix/bsd/apple/b64.rs":"2c51c1c063bfb5076ecf08fbc9371ce9473878d2e046c186eb9433955f6f8ba6","src/unix/bsd/apple/mod.rs":"8e437addefb32336671f46b93a5a8827260163abcf623c0f1613d4d685faca34","src/unix/bsd/freebsdlike/dragonfly/mod.rs":"54b3b30c4cac35ced9197e7267f209b0f168de8a6899ab0cba290c5ae399f0e7","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"c7f46b9ae23fde5a9e245a28ed1380066e67f081323b4d253a18e9da3b97b860","src/unix/bsd/freebsdlike/freebsd/mod.rs":"ba1bd1487b41be91115a21e3968d15e4d877043ba4946cd11ed2be2ee66afc19","src/unix/bsd/freebsdlike/freebsd/x86.rs":"54311d3ebf2bb091ab22361e377e6ef9224aec2ecfe459fbfcedde4932db9c58","src/unix/bsd/freebsdlike/freebsd/x86_64.rs":"c7f46b9ae23fde5a9e245a28ed1380066e67f081323b4d253a18e9da3b97b860","src/unix/bsd/freebsdlike/mod.rs":"6b184872bf7979e5da042399a8aa3a46fff6716301f3d068912a2d6296c6ab94","src/unix/bsd/mod.rs":"c75c328dc62a621ce2a9408cb8764206e365e6f14db1bfe535a23c4728521d97","src/unix/bsd/netbsdlike/mod.rs":"50ca4e29f06669a0ebff72f2f24b2b08ff55478f580b1684e16a0cf6938a6a50","src/unix/bsd/netbsdlike/netbsd/mod.rs":"51f6f2309d59f8fb5dbd6b29ac4aa7ad431f1dddae151aef2db9f66c5f3362b0","src/unix/bsd/netbsdlike/netbsd/other/b32/mod.rs":"bd251a102bed65d5cb3459275f6ec3310fe5803ff4c9651212115548f86256d0","src/unix/bsd/netbsdlike/netbsd/other/b64/mod.rs":"927eeccaf3269d299db4c2a55f8010807bf43dfa894aea6a783215f5d3560baa","src/unix/bsd/netbsdlike/netbsd/other/mod.rs":"4d9f7091af8e166943ac6f42ce85558909e5b6e61325039bff7adfbcf4b90212","src/unix/bsd/netbsdlike/openbsdlike/bitrig.rs":"f8cd05dacd3a3136c58da5a2fbe26f703767823b28e74fe8a2b57a7bd98d6d5c","src/unix/bsd/netbsdlike/openbsdlike/mod.rs":"97a7cdb8824949e6ca7202691bde4e1c46c2cfdeb5f3735a033448b52da1bb59","src/unix/bsd/netbsdlike/openbsdlike/openbsd.rs":"31686679c2df5f11437a338b9281fa0dd4f8d061dcd895d67619992171e115c9","src/unix/bsd/netbsdlike/openbsdlike/other/b32/mod.rs":"bd251a102bed65d5cb3459275f6ec3310fe5803ff4c9651212115548f86256d0","src/unix/bsd/netbsdlike/openbsdlike/other/b64/mod.rs":"927eeccaf3269d299db4c2a55f8010807bf43dfa894aea6a783215f5d3560baa","src/unix/bsd/netbsdlike/openbsdlike/other/mod.rs":"f5d8db6f54efd05520b31b764a6bacbf612e1aebce097d2d5bfaaef3b91f37b5","src/unix/haiku/b32.rs":"bd251a102bed65d5cb3459275f6ec3310fe5803ff4c9651212115548f86256d0","src/unix/haiku/b64.rs":"b422430c550c0ba833c9206d1350861e344e3a2eb33d7d58693efb35044be1cc","src/unix/haiku/mod.rs":"f0daa9910d2beade8be1d67bab652c239e779a27e4be54f93b7bceb7afe45d30","src/unix/mod.rs":"841d523014553865ee35355425da44fe1a31944a991831efc7c046263ad44a89","src/unix/notbsd/android/b32/arm.rs":"d63a234f3a2399bdef1fa13c6a209386cb5ddac04c90f2c6d42badc8235dc49d","src/unix/notbsd/android/b32/mod.rs":"c09b53e42b286a7ec56fb28d0a3e71ec42fecaec39b2015d1d4a3338b172c570","src/unix/notbsd/android/b32/x86.rs":"10e6879dcbf136f0e907337987a0609b357e27e0f24ccb907525fcad881c24c3","src/unix/notbsd/android/b64/aarch64.rs":"d0a25e73f8d02f8412fa9237e41d3f4993b45603a2a8f8d1690bc6624a190d42","src/unix/notbsd/android/b64/mod.rs":"172d704a50d6fb9f67683c7e66ff15b5c9f7b11e7064aa8bd129228ff074393f","src/unix/notbsd/android/b64/x86_64.rs":"a2b048dad18c60ede035645bbfea2ba3dd75197c1ee0d54fb5fcab14d6c35194","src/unix/notbsd/android/mod.rs":"25d09d308f0beb7925a3efdf1fae8412251ea04f595f6852e52114df51b6747e","src/unix/notbsd/linux/mips/mips32.rs":"003b4e204e13380cd7f1ce783a0eded0f520f4e7d25634738e8ee50fc09b07c9","src/unix/notbsd/linux/mips/mips64.rs":"a8d3e38e9f9359233db04c66d7a8de957530ad2b8596661d3ac25ea81ee44a78","src/unix/notbsd/linux/mips/mod.rs":"7157a427fabff6e970288c75cb246981e316f76f3c2bb59b254d613a8389f859","src/unix/notbsd/linux/mod.rs":"c200ff5e7c7ad5d0b4c01531384acd408057665cb49175fba0d453b08c166bcf","src/unix/notbsd/linux/musl/b32/arm.rs":"d43ba5c528926261b1ccd529ab55636254360a084ab84a7ec22a4eb5afddb8f8","src/unix/notbsd/linux/musl/b32/asmjs.rs":"085e410f990312de76f74cb9bbf9fcc27d686e94334143b34511f565d1b8bb91","src/unix/notbsd/linux/musl/b32/mips.rs":"941c88bc413ba2b87eb6a6cfe03355ee148b865f39598456965b3d04b3adbbe6","src/unix/notbsd/linux/musl/b32/mod.rs":"fc7e055edbe6fa170c2bda6b3415066c1871b3e60ebb70a6329d008f77100f0b","src/unix/notbsd/linux/musl/b32/x86.rs":"ffa5781b52a7d2774a34b1e3e2034a498b919fd96eb85e88098dba2e674a3797","src/unix/notbsd/linux/musl/b64/aarch64.rs":"4009c7eaf703472daef2a70bdac910d9fc395a33689ef2e8cf1c4e692445d3f0","src/unix/notbsd/linux/musl/b64/mod.rs":"d9b03a59a54a568b07ffa4380103a926cbb45dbfd87745edef79cd971ef31283","src/unix/notbsd/linux/musl/b64/powerpc64.rs":"dc28f5b7284235d6cf5519053cac59a1c16dc39223b71cca0871e4880755f852","src/unix/notbsd/linux/musl/b64/x86_64.rs":"43291acc0dfc92c2fec8ba6ce77ee9ca3c20bcdccec18e149f95ba911cee704b","src/unix/notbsd/linux/musl/mod.rs":"0bd97702f5c84181c53f45466fb04afb9441f6950580b6ad59257e5c73089796","src/unix/notbsd/linux/other/b32/arm.rs":"d373022fd152341ec8f5d106937c7898dd68fb4c0346bd94a37526542a605e9a","src/unix/notbsd/linux/other/b32/mod.rs":"6122be151c5d85b9df6a3aaefc5cafd0657b371cafa9cb31ed9b1a394976af45","src/unix/notbsd/linux/other/b32/powerpc.rs":"cc85e75675abc37414fc7701dda7c3f6396e7b2d3c52eea7febdc41f7b033ea9","src/unix/notbsd/linux/other/b32/x86.rs":"5a6c789355da5abf64c2a0c867d2dfd4f72f004d0bd6c476fd34172b340ea1c3","src/unix/notbsd/linux/other/b64/aarch64.rs":"ce342b37a4a60c216625c8e177a50b3f328bdfd5c527e32e06c73f4aa5926829","src/unix/notbsd/linux/other/b64/mod.rs":"bee90e8d9217ee344d0e99fd483766a1b28e8b1ded930d44a0400a5e5224bb6a","src/unix/notbsd/linux/other/b64/powerpc64.rs":"fc7131f39a75a9e35d474d70b0bc829c52590dadf472ae5785972a94ffb95f12","src/unix/notbsd/linux/other/b64/sparc64.rs":"0ba7f399349bc586ebb73d0caef5c67f195c9e3a942eabfb2efd133b4cea9872","src/unix/notbsd/linux/other/b64/x86_64.rs":"bf17645b237d8059da5e9cc0f6d2d56bc665b0946a6deb8aedf46e5b44578fa6","src/unix/notbsd/linux/other/mod.rs":"46b060787a60493e71406be35b77c24048cdc54326b65c9961fbb1fb9d354de3","src/unix/notbsd/linux/s390x.rs":"2dec96036cadd8354cd56ef8dd7018e75ae92326ec7b5963bc9cdbba0c7d694b","src/unix/notbsd/mod.rs":"bb4550e749328a3aebc450a1684c136821babc3fc161093eecb231f3998cfe8c","src/unix/solaris/mod.rs":"ba70c4ebd371f2580c1fb8f3f6cd32a391ec017e1eed9812137caa94e5149a03","src/unix/uclibc/mips/mips32.rs":"31b23e466cffb86116421ec9240b86e7419aacd84b0b1b04d23c7142c8717566","src/unix/uclibc/mips/mips64.rs":"e67eec1636a998b047d89a4cda1c99cb6bc3071db017762675179a68201c4438","src/unix/uclibc/mips/mod.rs":"74817a9b1ee3998d8e0b751a555d57225f70fd979c283c94ada344a162a8b856","src/unix/uclibc/mod.rs":"3cef4087b743e5af239a8c699c2eeaeda4e19bb57a3683736c8bd87dc71e0a2d","src/unix/uclibc/x86_64/mod.rs":"98e6685519372f7b247e3bb0008ed2ee8d94fd7cca0ed2f0b9336485c734d8a9","src/windows.rs":"acccbd341e81206cb1dc66af41762c193ac0dd719d700b64f7e26c967ee7d670"},"package":"38f5c2b18a287cf78b4097db62e20f43cace381dc76ae5c0a3073067f78b7ddc"}
\ No newline at end of file
--- a/third_party/rust/libc/.travis.yml
+++ b/third_party/rust/libc/.travis.yml
@@ -1,112 +1,136 @@
 language: rust
-rust: stable
 sudo: required
 dist: trusty
 services:
   - docker
 install:
   - if [ -z "$NO_ADD" ]; then rustup target add $TARGET; fi
 script:
-  - cargo build $OPT
-  - cargo build $OPT --no-default-features
+  - cargo build
+  - cargo build --no-default-features
   - cargo generate-lockfile --manifest-path libc-test/Cargo.toml
   - if [[ $TRAVIS_OS_NAME = "linux" ]]; then
       sh ci/run-docker.sh $TARGET;
     else
       export CARGO_TARGET_DIR=`pwd`/target;
       sh ci/run.sh $TARGET;
     fi
   - rustc ci/style.rs && ./style src
 env:
   global:
     secure: "e2/3QjgRN9atOuSHp22TrYG7QVKcYUWY48Hi9b60w+r1+BhPkTseIJLte7WefRhdXtqpjjUJTooKDhnurFOeHaCT+nmBgiv+FPU893sBl4bhesY4m0vgUJVbNZcs6lTImYekWVb+aqjGdgV/XAgCw7c3kPmrZV0MzGDWL64Xaps="
 matrix:
   include:
     # 1.0.0 compat
-    - env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
+    - os: linux
+      env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
       rust: 1.0.0
-      script: rm -f Cargo.lock && cargo build
+      script: cargo build
       install:
 
     # build documentation
-    - env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
+    - os: linux
+      env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
       rust: nightly
       script: sh ci/dox.sh
 
     # stable compat
-    - env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
-    - env: TARGET=i686-unknown-linux-gnu
+    - os: linux
+      env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
+      rust: stable
+    - os: linux
+      env: TARGET=i686-unknown-linux-gnu
+      rust: stable
     - os: osx
       env: TARGET=x86_64-apple-darwin NO_ADD=1
-      osx_image: xcode8.3
+      rust: stable
     - os: osx
       env: TARGET=i686-apple-darwin
-      osx_image: xcode8.3
-    - env: TARGET=arm-linux-androideabi
-    - env: TARGET=aarch64-linux-android
-    # FIXME(#826) should reenable
-    #- env: TARGET=i686-linux-android
-    - env: TARGET=x86_64-linux-android
-    - env: TARGET=x86_64-unknown-linux-musl
-    - env: TARGET=i686-unknown-linux-musl
-    - env: TARGET=arm-unknown-linux-gnueabihf
-    - env: TARGET=arm-unknown-linux-musleabihf
-    - env: TARGET=aarch64-unknown-linux-gnu
-    - env: TARGET=aarch64-unknown-linux-musl
+      rust: stable
+    - os: linux
+      env: TARGET=arm-linux-androideabi
+      rust: stable
+    - os: linux
+      env: TARGET=aarch64-linux-android
+      rust: stable
+    - os: linux
+      env: TARGET=i686-linux-android
+      rust: stable
+    # as of 2017/05/03 x86_64-linux-android are not on stable
+    - os: linux
+      env: TARGET=x86_64-linux-android
       rust: beta
+    - os: linux
+      env: TARGET=x86_64-unknown-linux-musl
+      rust: stable
+    - os: linux
+      env: TARGET=i686-unknown-linux-musl
+      rust: stable
+    - os: linux
+      env: TARGET=arm-unknown-linux-gnueabihf
+      rust: stable
+    - os: linux
+      env: TARGET=aarch64-unknown-linux-gnu
+      rust: stable
     - os: osx
       osx_image: xcode8.2
       env: TARGET=i386-apple-ios
-           CARGO_TARGET_I386_APPLE_IOS_RUNNER=$HOME/runtest
-           RUSTFLAGS=-Clink-arg=-mios-simulator-version-min=7.0
-      before_install:
-        rustc ./ci/ios/deploy_and_run_on_ios_simulator.rs -o $HOME/runtest
+      rust: stable
     - os: osx
       osx_image: xcode8.2
       env: TARGET=x86_64-apple-ios
-           CARGO_TARGET_X86_64_APPLE_IOS_RUNNER=$HOME/runtest
-           RUSTFLAGS=-Clink-arg=-mios-simulator-version-min=7.0
-      before_install:
-        rustc ./ci/ios/deploy_and_run_on_ios_simulator.rs -o $HOME/runtest
-    - env: TARGET=x86_64-rumprun-netbsd
-    - env: TARGET=powerpc-unknown-linux-gnu
-    - env: TARGET=powerpc64-unknown-linux-gnu
-    - env: TARGET=powerpc64le-unknown-linux-gnu
-    - env: TARGET=mips-unknown-linux-musl
-    - env: TARGET=mipsel-unknown-linux-musl
-    - env: TARGET=mips64-unknown-linux-gnuabi64
-    - env: TARGET=mips64el-unknown-linux-gnuabi64
-    - env: TARGET=mips-unknown-linux-gnu
-    - env: TARGET=s390x-unknown-linux-gnu
-    - env: TARGET=sparc64-unknown-linux-gnu
-    - env: TARGET=asmjs-unknown-emscripten
-    - env: TARGET=wasm32-unknown-emscripten
+      rust: stable
+    - os: linux
+      env: TARGET=x86_64-rumprun-netbsd
+      rust: stable
+    - os: linux
+      env: TARGET=powerpc-unknown-linux-gnu
+      rust: stable
+    - os: linux
+      env: TARGET=powerpc64-unknown-linux-gnu
+      rust: beta
+    - os: linux
+      env: TARGET=mips-unknown-linux-musl
+      rust: stable
+    - os: linux
+      env: TARGET=mipsel-unknown-linux-musl
+      rust: stable
+    - os: linux
+      env: TARGET=mips64-unknown-linux-gnuabi64
+      rust: beta
+    - os: linux
+      env: TARGET=mips-unknown-linux-gnu
+      rust: beta
 
     # beta
-    - env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
+    - os: linux
+      env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
       rust: beta
     - os: osx
       env: TARGET=x86_64-apple-darwin NO_ADD=1
-      osx_image: xcode8.3
       rust: beta
 
     # nightly
-    - env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
+    - os: linux
+      env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
       rust: nightly
     - os: osx
       env: TARGET=x86_64-apple-darwin NO_ADD=1
-      osx_image: xcode8.3
-      rust: nightly
-    # not available on stable
-    # without --release the build fails
-    # see https://github.com/rust-lang/rust/issues/45417
-    - env: TARGET=x86_64-unknown-linux-gnux32 OPT="--release"
       rust: nightly
 
     # QEMU based targets that compile in an emulator
-    - env: TARGET=x86_64-unknown-freebsd
+    - os: linux
+      env: TARGET=x86_64-unknown-freebsd
+      rust: stable
+    - os: linux
+      env: TARGET=x86_64-unknown-openbsd QEMU=openbsd.qcow2
+      rust: stable
+      script: sh ci/run-docker.sh $TARGET
+      install:
+
+cache: cargo
 
 notifications:
   email:
     on_success: never
   webhooks: https://buildbot.rust-lang.org/homu/travis
--- a/third_party/rust/libc/Cargo.toml
+++ b/third_party/rust/libc/Cargo.toml
@@ -1,32 +1,21 @@
-# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
-#
-# When uploading crates to the registry Cargo will automatically
-# "normalize" Cargo.toml files for maximal compatibility
-# with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g. crates.io) dependencies
-#
-# If you believe there's an error in this file please file an
-# issue against the rust-lang/cargo repository. If you're
-# editing this file be aware that the upstream Cargo.toml
-# will likely look very different (and much more reasonable)
+[package]
 
-[package]
 name = "libc"
-version = "0.2.33"
+version = "0.2.24"
 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"
+license = "MIT/Apache-2.0"
+readme = "README.md"
+repository = "https://github.com/rust-lang/libc"
 homepage = "https://github.com/rust-lang/libc"
 documentation = "http://doc.rust-lang.org/libc"
-readme = "README.md"
-license = "MIT/Apache-2.0"
-repository = "https://github.com/rust-lang/libc"
+description = """
+A library for types and bindings to native C functions often found in libc or
+other common platform libraries.
+"""
 
 [features]
 default = ["use_std"]
 use_std = []
-[badges.appveyor]
-repository = "rust-lang/libc"
-project_name = "rust-lang-libs/libc"
 
-[badges.travis-ci]
-repository = "rust-lang/libc"
+[workspace]
+members = ["libc-test", "libc-test/generate-files"]
--- a/third_party/rust/libc/README.md
+++ b/third_party/rust/libc/README.md
@@ -88,17 +88,17 @@ 3. Send a PR to this repo.
 4. Wait for CI to pass, fixing errors.
 5. Wait for a merge!
 
 ### Test before you commit
 
 We have two automated tests running on [Travis](https://travis-ci.org/rust-lang/libc):
 
 1. [`libc-test`](https://github.com/alexcrichton/ctest)
-  - `cd libc-test && cargo test`
+  - `cd libc-test && cargo run`
   - Use the `skip_*()` functions in `build.rs` if you really need a workaround.
 2. Style checker
   - `rustc ci/style.rs && ./style src`
 
 ### Releasing your change to crates.io
 
 Now that you've done the amazing job of landing your new API or your new
 platform in this crate, the next step is to get that sweet, sweet usage from
@@ -133,19 +133,16 @@ Tested:
   * `i386-apple-ios`
   * `x86_64-apple-ios`
   * [`i686-unknown-linux-gnu`](https://doc.rust-lang.org/libc/i686-unknown-linux-gnu/libc/)
   * [`x86_64-unknown-linux-gnu`](https://doc.rust-lang.org/libc/x86_64-unknown-linux-gnu/libc/)
     (Linux)
   * [`x86_64-unknown-linux-musl`](https://doc.rust-lang.org/libc/x86_64-unknown-linux-musl/libc/)
     (Linux MUSL)
   * [`aarch64-unknown-linux-gnu`](https://doc.rust-lang.org/libc/aarch64-unknown-linux-gnu/libc/)
-    (Linux)
-  * [`aarch64-unknown-linux-musl`](https://doc.rust-lang.org/libc/aarch64-unknown-linux-musl/libc/)
-    (Linux MUSL)
   * [`mips-unknown-linux-gnu`](https://doc.rust-lang.org/libc/mips-unknown-linux-gnu/libc/)
   * [`arm-unknown-linux-gnueabihf`](https://doc.rust-lang.org/libc/arm-unknown-linux-gnueabihf/libc/)
   * [`arm-linux-androideabi`](https://doc.rust-lang.org/libc/arm-linux-androideabi/libc/)
     (Android)
   * [`x86_64-unknown-freebsd`](https://doc.rust-lang.org/libc/x86_64-unknown-freebsd/libc/)
   * [`x86_64-unknown-openbsd`](https://doc.rust-lang.org/libc/x86_64-unknown-openbsd/libc/)
   * [`x86_64-rumprun-netbsd`](https://doc.rust-lang.org/libc/x86_64-unknown-netbsd/libc/)
 
--- a/third_party/rust/libc/appveyor.yml
+++ b/third_party/rust/libc/appveyor.yml
@@ -1,15 +1,9 @@
 environment:
-  # When this was added there were revocation check failures when using the
-  # libcurl backend as libcurl checks by default, but rustup doesn't provide the
-  # switch to turn this off. Switch to Hyper which looks to not check for
-  # revocation by default like libcurl does.
-  RUSTUP_USE_HYPER: 1
-  CARGO_HTTP_CHECK_REVOKE: false
   matrix:
   - TARGET: x86_64-pc-windows-gnu
     MSYS2_BITS: 64
   - TARGET: i686-pc-windows-gnu
     MSYS2_BITS: 32
   - TARGET: x86_64-pc-windows-msvc
   - TARGET: i686-pc-windows-msvc
 install:
@@ -19,9 +13,13 @@ install:
   - if defined MSYS2_BITS set PATH=%PATH%;C:\msys64\mingw%MSYS2_BITS%\bin
   - rustc -V
   - cargo -V
 
 build: false
 
 test_script:
   - cargo test --target %TARGET%
-  - cargo test --manifest-path libc-test/Cargo.toml --target %TARGET%
+  - cargo run --manifest-path libc-test/Cargo.toml --target %TARGET%
+
+cache:
+  - target
+  - C:\Users\appveyor\.cargo\registry
--- a/third_party/rust/libc/ci/README.md
+++ b/third_party/rust/libc/ci/README.md
@@ -34,17 +34,17 @@ First up, let's talk about the files in 
 
 Currently this repository leverages a combination of Travis CI and AppVeyor for
 running tests. The triples tested are:
 
 * AppVeyor
   * `{i686,x86_64}-pc-windows-{msvc,gnu}`
 * Travis
   * `{i686,x86_64,mips,aarch64}-unknown-linux-gnu`
-  * `{x86_64,aarch64}-unknown-linux-musl`
+  * `x86_64-unknown-linux-musl`
   * `arm-unknown-linux-gnueabihf`
   * `arm-linux-androideabi`
   * `{i686,x86_64}-apple-{darwin,ios}`
   * `x86_64-rumprun-netbsd`
   * `x86_64-unknown-freebsd`
   * `x86_64-unknown-openbsd`
 
 The Windows triples are all pretty standard, they just set up their environment
rename from third_party/rust/libc-0.2.24/ci/android-accept-licenses.sh
rename to third_party/rust/libc/ci/android-accept-licenses.sh
--- a/third_party/rust/libc/ci/android-install-ndk.sh
+++ b/third_party/rust/libc/ci/android-install-ndk.sh
@@ -6,32 +6,31 @@
 # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
 # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
 # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 # option. This file may not be copied, modified, or distributed
 # except according to those terms.
 
 set -ex
 
-curl -O https://dl.google.com/android/repository/android-ndk-r15b-linux-x86_64.zip
-unzip -q android-ndk-r15b-linux-x86_64.zip
+curl -O https://dl.google.com/android/repository/android-ndk-r13b-linux-x86_64.zip
+unzip -q android-ndk-r13b-linux-x86_64.zip
 
 case "$1" in
   aarch64)
     arch=arm64
     ;;
 
   i686)
     arch=x86
     ;;
 
   *)
     arch=$1
     ;;
 esac;
 
-android-ndk-r15b/build/tools/make_standalone_toolchain.py \
-        --unified-headers \
+android-ndk-r13b/build/tools/make_standalone_toolchain.py \
         --install-dir /android/ndk-$1 \
         --arch $arch \
         --api 24
 
-rm -rf ./android-ndk-r15b-linux-x86_64.zip ./android-ndk-r15b
+rm -rf ./android-ndk-r13b-linux-x86_64.zip ./android-ndk-r13b
--- a/third_party/rust/libc/ci/android-install-sdk.sh
+++ b/third_party/rust/libc/ci/android-install-sdk.sh
@@ -14,18 +14,20 @@ set -ex
 # Prep the SDK and emulator
 #
 # Note that the update process requires that we accept a bunch of licenses, and
 # we can't just pipe `yes` into it for some reason, so we take the same strategy
 # located in https://github.com/appunite/docker by just wrapping it in a script
 # which apparently magically accepts the licenses.
 
 mkdir sdk
-curl https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip -O
-unzip -d sdk sdk-tools-linux-3859397.zip
+curl https://dl.google.com/android/repository/tools_r25.2.5-linux.zip -O
+unzip -d sdk tools_r25.2.5-linux.zip
+
+filter="platform-tools,android-24"
 
 case "$1" in
   arm | armv7)
     abi=armeabi-v7a
     ;;
 
   aarch64)
     abi=arm64-v8a
@@ -40,21 +42,16 @@ case "$1" in
     ;;
 
   *)
     echo "invalid arch: $1"
     exit 1
     ;;
 esac;
 
-# --no_https avoids
-# javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
-echo "yes" | \
-    ./sdk/tools/bin/sdkmanager --no_https \
-        "emulator" \
-        "platform-tools" \
-        "platforms;android-24" \
-        "system-images;android-24;default;$abi"
+filter="$filter,sys-img-$abi-android-24"
+
+./android-accept-licenses.sh "android - update sdk -a --no-ui --filter $filter"
 
-echo "no" |
-    ./sdk/tools/bin/avdmanager create avd \
-        --name $1 \
-        --package "system-images;android-24;default;$abi"
+echo "no" | android create avd \
+                --name $1 \
+                --target android-24 \
+                --abi $abi
--- a/third_party/rust/libc/ci/docker/aarch64-linux-android/Dockerfile
+++ b/third_party/rust/libc/ci/docker/aarch64-linux-android/Dockerfile
@@ -20,26 +20,13 @@ COPY android* /android/
 
 ENV ANDROID_ARCH=aarch64
 ENV PATH=$PATH:/android/ndk-$ANDROID_ARCH/bin:/android/sdk/tools:/android/sdk/platform-tools
 
 RUN sh /android/android-install-ndk.sh $ANDROID_ARCH
 RUN sh /android/android-install-sdk.sh $ANDROID_ARCH
 RUN mv /root/.android /tmp
 RUN chmod 777 -R /tmp/.android
-RUN chmod 755 /android/sdk/tools/* /android/sdk/emulator/qemu/linux-x86_64/*
+RUN chmod 755 /android/sdk/tools/* /android/sdk/tools/qemu/linux-x86_64/*
 
 ENV PATH=$PATH:/rust/bin \
     CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=aarch64-linux-android-gcc \
-    CARGO_TARGET_AARCH64_LINUX_ANDROID_RUNNER=/tmp/runtest \
     HOME=/tmp
-
-ADD runtest-android.rs /tmp/runtest.rs
-ENTRYPOINT [ \
-  "bash", \
-  "-c", \
-  # set SHELL so android can detect a 64bits system, see
-  # http://stackoverflow.com/a/41789144
-  "SHELL=/bin/dash /android/sdk/emulator/emulator @aarch64 -no-window & \
-   rustc /tmp/runtest.rs -o /tmp/runtest && \
-   exec \"$@\"", \
-  "--" \
-]
--- a/third_party/rust/libc/ci/docker/aarch64-unknown-linux-gnu/Dockerfile
+++ b/third_party/rust/libc/ci/docker/aarch64-unknown-linux-gnu/Dockerfile
@@ -1,7 +1,7 @@
-FROM ubuntu:17.10
-RUN apt-get update && apt-get install -y --no-install-recommends \
+FROM ubuntu:16.10
+RUN apt-get update
+RUN apt-get install -y --no-install-recommends \
   gcc libc6-dev ca-certificates \
   gcc-aarch64-linux-gnu libc6-dev-arm64-cross qemu-user
 ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
-    CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER="qemu-aarch64 -L /usr/aarch64-linux-gnu" \
     PATH=$PATH:/rust/bin
deleted file mode 100644
--- a/third_party/rust/libc/ci/docker/aarch64-unknown-linux-musl/Dockerfile
+++ /dev/null
@@ -1,27 +0,0 @@
-FROM ubuntu:17.10
-
-RUN apt-get update && apt-get install -y --no-install-recommends \
-  gcc make libc6-dev git curl ca-certificates \
-  gcc-aarch64-linux-gnu qemu-user
-RUN curl https://www.musl-libc.org/releases/musl-1.1.16.tar.gz | \
-    tar xzf - && \
-    cd musl-1.1.16 && \
-    CC=aarch64-linux-gnu-gcc \
-    ./configure --prefix=/musl-aarch64 --enable-wrapper=yes && \
-    make install -j4 && \
-    cd .. && \
-    rm -rf musl-1.1.16 && \
-# Install linux kernel headers sanitized for use with musl
-    curl -L  https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-5.tar.gz | \
-    tar xzf - && \
-    cd kernel-headers-3.12.6-5 && \
-    make ARCH=arm64 prefix=/musl-aarch64 install -j4 && \
-    cd .. && \
-    rm -rf kernel-headers-3.12.6-5
-
-# FIXME: shouldn't need the `-lgcc` here, shouldn't that be in libstd?
-ENV PATH=$PATH:/musl-aarch64/bin:/rust/bin \
-    CC_aarch64_unknown_linux_musl=musl-gcc \
-    RUSTFLAGS='-Clink-args=-lgcc' \
-    CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=musl-gcc \
-    CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUNNER="qemu-aarch64 -L /musl-aarch64"
--- a/third_party/rust/libc/ci/docker/arm-linux-androideabi/Dockerfile
+++ b/third_party/rust/libc/ci/docker/arm-linux-androideabi/Dockerfile
@@ -20,26 +20,13 @@ COPY android* /android/
 
 ENV ANDROID_ARCH=arm
 ENV PATH=$PATH:/android/ndk-$ANDROID_ARCH/bin:/android/sdk/tools:/android/sdk/platform-tools
 
 RUN sh /android/android-install-ndk.sh $ANDROID_ARCH
 RUN sh /android/android-install-sdk.sh $ANDROID_ARCH
 RUN mv /root/.android /tmp
 RUN chmod 777 -R /tmp/.android
-RUN chmod 755 /android/sdk/tools/* /android/sdk/emulator/qemu/linux-x86_64/*
+RUN chmod 755 /android/sdk/tools/* /android/sdk/tools/qemu/linux-x86_64/*
 
 ENV PATH=$PATH:/rust/bin \
     CARGO_TARGET_ARM_LINUX_ANDROIDEABI_LINKER=arm-linux-androideabi-gcc \
-    CARGO_TARGET_ARM_LINUX_ANDROIDEABI_RUNNER=/tmp/runtest \
     HOME=/tmp
-
-ADD runtest-android.rs /tmp/runtest.rs
-ENTRYPOINT [ \
-  "bash", \
-  "-c", \
-  # set SHELL so android can detect a 64bits system, see
-  # http://stackoverflow.com/a/41789144
-  "SHELL=/bin/dash /android/sdk/emulator/emulator @arm -no-window & \
-   rustc /tmp/runtest.rs -o /tmp/runtest && \
-   exec \"$@\"", \
-  "--" \
-]
--- a/third_party/rust/libc/ci/docker/arm-unknown-linux-gnueabihf/Dockerfile
+++ b/third_party/rust/libc/ci/docker/arm-unknown-linux-gnueabihf/Dockerfile
@@ -1,7 +1,7 @@
-FROM ubuntu:17.10
-RUN apt-get update && apt-get install -y --no-install-recommends \
+FROM ubuntu:16.10
+RUN apt-get update
+RUN apt-get install -y --no-install-recommends \
   gcc libc6-dev ca-certificates \
   gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user
 ENV CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
-    CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_RUNNER="qemu-arm -L /usr/arm-linux-gnueabihf" \
     PATH=$PATH:/rust/bin
deleted file mode 100644
--- a/third_party/rust/libc/ci/docker/arm-unknown-linux-musleabihf/Dockerfile
+++ /dev/null
@@ -1,25 +0,0 @@
-FROM ubuntu:17.10
-
-RUN apt-get update && apt-get install -y --no-install-recommends \
-  gcc make libc6-dev git curl ca-certificates \
-  gcc-arm-linux-gnueabihf qemu-user
-
-RUN curl https://www.musl-libc.org/releases/musl-1.1.16.tar.gz | tar xzf -
-WORKDIR /musl-1.1.16
-RUN CC=arm-linux-gnueabihf-gcc \
-    CFLAGS="-march=armv6 -marm" \
-    ./configure --prefix=/musl-arm --enable-wrapper=yes
-RUN make install -j4
-
-# Install linux kernel headers sanitized for use with musl
-RUN \
-    curl -L  https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-5.tar.gz | \
-    tar xzf - && \
-    cd kernel-headers-3.12.6-5 && \
-    make ARCH=arm prefix=/musl-arm install -j4 && \
-    cd .. && \
-    rm -rf kernel-headers-3.12.6-5
-ENV PATH=$PATH:/musl-arm/bin:/rust/bin \
-    CC_arm_unknown_linux_musleabihf=musl-gcc \
-    CARGO_TARGET_ARM_UNKNOWN_LINUX_MUSLEABIHF_LINKER=musl-gcc \
-    CARGO_TARGET_ARM_UNKNOWN_LINUX_MUSLEABIHF_RUNNER="qemu-arm -L /musl-arm"
deleted file mode 100644
--- a/third_party/rust/libc/ci/docker/asmjs-unknown-emscripten/Dockerfile
+++ /dev/null
@@ -1,20 +0,0 @@
-FROM ubuntu:16.04
-
-RUN apt-get update && \
-    apt-get install -y --no-install-recommends \
-    ca-certificates \
-    curl \
-    gcc \
-    git \
-    libc6-dev \
-    python \
-    xz-utils
-
-COPY emscripten.sh /
-RUN bash /emscripten.sh
-
-ENV PATH=$PATH:/rust/bin \
-    CARGO_TARGET_ASMJS_UNKNOWN_EMSCRIPTEN_RUNNER=node
-
-COPY emscripten-entry.sh /
-ENTRYPOINT ["/emscripten-entry.sh"]
--- a/third_party/rust/libc/ci/docker/i686-linux-android/Dockerfile
+++ b/third_party/rust/libc/ci/docker/i686-linux-android/Dockerfile
@@ -20,26 +20,13 @@ COPY android* /android/
 
 ENV ANDROID_ARCH=i686
 ENV PATH=$PATH:/android/ndk-$ANDROID_ARCH/bin:/android/sdk/tools:/android/sdk/platform-tools
 
 RUN sh /android/android-install-ndk.sh $ANDROID_ARCH
 RUN sh /android/android-install-sdk.sh $ANDROID_ARCH
 RUN mv /root/.android /tmp
 RUN chmod 777 -R /tmp/.android
-RUN chmod 755 /android/sdk/tools/* /android/sdk/emulator/qemu/linux-x86_64/*
+RUN chmod 755 /android/sdk/tools/* /android/sdk/tools/qemu/linux-x86_64/*
 
 ENV PATH=$PATH:/rust/bin \
     CARGO_TARGET_I686_LINUX_ANDROID_LINKER=i686-linux-android-gcc \
-    CARGO_TARGET_I686_LINUX_ANDROID_RUNNER=/tmp/runtest \
     HOME=/tmp
-
-ADD runtest-android.rs /tmp/runtest.rs
-ENTRYPOINT [ \
-  "bash", \
-  "-c", \
-  # set SHELL so android can detect a 64bits system, see
-  # http://stackoverflow.com/a/41789144
-  "SHELL=/bin/dash /android/sdk/emulator/emulator @i686 -no-window -no-accel & \
-   rustc /tmp/runtest.rs -o /tmp/runtest && \
-   exec \"$@\"", \
-  "--" \
-]
--- a/third_party/rust/libc/ci/docker/i686-unknown-linux-gnu/Dockerfile
+++ b/third_party/rust/libc/ci/docker/i686-unknown-linux-gnu/Dockerfile
@@ -1,5 +1,5 @@
-FROM ubuntu:17.04
+FROM ubuntu:16.10
 RUN apt-get update
 RUN apt-get install -y --no-install-recommends \
   gcc-multilib libc6-dev ca-certificates
 ENV PATH=$PATH:/rust/bin
--- a/third_party/rust/libc/ci/docker/i686-unknown-linux-musl/Dockerfile
+++ b/third_party/rust/libc/ci/docker/i686-unknown-linux-musl/Dockerfile
@@ -1,9 +1,9 @@
-FROM ubuntu:17.10
+FROM ubuntu:16.10
 
 RUN dpkg --add-architecture i386
 RUN apt-get update
 RUN apt-get install -y --no-install-recommends \
   gcc-multilib make libc6-dev git curl ca-certificates libc6:i386
 # Below we're cross-compiling musl for i686 using the system compiler on an
 # x86_64 system. This is an awkward thing to be doing and so we have to jump
 # through a couple hoops to get musl to be happy. In particular:
@@ -13,18 +13,11 @@ RUN apt-get install -y --no-install-reco
 # * We manually unset CROSS_COMPILE when running make; otherwise the makefile
 #   will call the non-existent binary 'i686-ar'.
 RUN curl https://www.musl-libc.org/releases/musl-1.1.15.tar.gz | \
     tar xzf - && \
     cd musl-1.1.15 && \
     CC=gcc CFLAGS=-m32 ./configure --prefix=/musl-i686 --disable-shared --target=i686 && \
     make CROSS_COMPILE= install -j4 && \
     cd .. && \
-    rm -rf musl-1.1.15 && \
-# Install linux kernel headers sanitized for use with musl
-    curl -L  https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-5.tar.gz | \
-    tar xzf - && \
-    cd kernel-headers-3.12.6-5 && \
-    make ARCH=i386 prefix=/musl-i686 install -j4 && \
-    cd .. && \
-    rm -rf kernel-headers-3.12.6-5
+    rm -rf musl-1.1.15
 ENV PATH=$PATH:/musl-i686/bin:/rust/bin \
     CC_i686_unknown_linux_musl=musl-gcc
--- a/third_party/rust/libc/ci/docker/mips-unknown-linux-gnu/Dockerfile
+++ b/third_party/rust/libc/ci/docker/mips-unknown-linux-gnu/Dockerfile
@@ -1,10 +1,10 @@
-FROM ubuntu:17.10
+FROM ubuntu:16.10
 
-RUN apt-get update && apt-get install -y --no-install-recommends \
+RUN apt-get update
+RUN apt-get install -y --no-install-recommends \
         gcc libc6-dev qemu-user ca-certificates \
         gcc-mips-linux-gnu libc6-dev-mips-cross \
         qemu-system-mips
 
 ENV CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_LINKER=mips-linux-gnu-gcc \
-    CARGO_TARGET_MIPS_UNKNOWN_LINUX_GNU_RUNNER="qemu-mips -L /usr/mips-linux-gnu" \
     PATH=$PATH:/rust/bin
--- a/third_party/rust/libc/ci/docker/mips-unknown-linux-musl/Dockerfile
+++ b/third_party/rust/libc/ci/docker/mips-unknown-linux-musl/Dockerfile
@@ -1,17 +1,17 @@
-FROM ubuntu:17.10
+FROM ubuntu:16.10
 
-RUN apt-get update && apt-get install -y --no-install-recommends \
+RUN apt-get update
+RUN apt-get install -y --no-install-recommends \
         gcc libc6-dev qemu-user ca-certificates qemu-system-mips curl \
         bzip2
 
 RUN mkdir /toolchain
 
 # Note that this originally came from:
 # https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/OpenWrt-SDK-ar71xx-generic_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2
-RUN curl -L https://s3-us-west-1.amazonaws.com/rust-lang-ci2/libc/OpenWrt-SDK-ar71xx-generic_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | \
+RUN curl -L https://s3.amazonaws.com/rust-lang-ci/libc/OpenWrt-SDK-ar71xx-generic_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | \
       tar xjf - -C /toolchain --strip-components=1
 
 ENV PATH=$PATH:/rust/bin:/toolchain/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.15/bin \
     CC_mips_unknown_linux_musl=mips-openwrt-linux-gcc \
-    CARGO_TARGET_MIPS_UNKNOWN_LINUX_MUSL_LINKER=mips-openwrt-linux-gcc \
-    CARGO_TARGET_MIPS_UNKNOWN_LINUX_MUSL_RUNNER="qemu-mips -L /toolchain/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.15"
+    CARGO_TARGET_MIPS_UNKNOWN_LINUX_MUSL_LINKER=mips-openwrt-linux-gcc
--- a/third_party/rust/libc/ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile
+++ b/third_party/rust/libc/ci/docker/mips64-unknown-linux-gnuabi64/Dockerfile
@@ -1,11 +1,11 @@
-FROM ubuntu:17.10
+FROM ubuntu:16.10
 
-RUN apt-get update && apt-get install -y --no-install-recommends \
+RUN apt-get update
+RUN apt-get install -y --no-install-recommends \
         gcc libc6-dev qemu-user ca-certificates \
         gcc-mips64-linux-gnuabi64 libc6-dev-mips64-cross \
         qemu-system-mips64
 
 ENV CARGO_TARGET_MIPS64_UNKNOWN_LINUX_GNUABI64_LINKER=mips64-linux-gnuabi64-gcc \
-    CARGO_TARGET_MIPS64_UNKNOWN_LINUX_GNUABI64_RUNNER="qemu-mips64 -L /usr/mips64-linux-gnuabi64" \
     CC_mips64_unknown_linux_gnuabi64=mips64-linux-gnuabi64-gcc \
     PATH=$PATH:/rust/bin
deleted file mode 100644
--- a/third_party/rust/libc/ci/docker/mips64el-unknown-linux-gnuabi64/Dockerfile
+++ /dev/null
@@ -1,11 +0,0 @@
-FROM ubuntu:17.10
-
-RUN apt-get update && apt-get install -y --no-install-recommends \
-        gcc libc6-dev qemu-user ca-certificates \
-        gcc-mips64el-linux-gnuabi64 libc6-dev-mips64el-cross \
-        qemu-system-mips64el
-
-ENV CARGO_TARGET_MIPS64EL_UNKNOWN_LINUX_GNUABI64_LINKER=mips64el-linux-gnuabi64-gcc \
-    CARGO_TARGET_MIPS64EL_UNKNOWN_LINUX_GNUABI64_RUNNER="qemu-mips64el -L /usr/mips64el-linux-gnuabi64" \
-    CC_mips64el_unknown_linux_gnuabi64=mips64el-linux-gnuabi64-gcc \
-    PATH=$PATH:/rust/bin
--- a/third_party/rust/libc/ci/docker/mipsel-unknown-linux-musl/Dockerfile
+++ b/third_party/rust/libc/ci/docker/mipsel-unknown-linux-musl/Dockerfile
@@ -1,17 +1,17 @@
-FROM ubuntu:17.10
+FROM ubuntu:16.10
 
-RUN apt-get update && apt-get install -y --no-install-recommends \
+RUN apt-get update
+RUN apt-get install -y --no-install-recommends \
         gcc libc6-dev qemu-user ca-certificates qemu-system-mips curl \
         bzip2
 
 RUN mkdir /toolchain
 
 # Note that this originally came from:
 # https://downloads.openwrt.org/snapshots/trunk/malta/generic/OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2
-RUN curl -L https://s3-us-west-1.amazonaws.com/rust-lang-ci2/libc/OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | \
+RUN curl -L https://s3.amazonaws.com/rust-lang-ci/libc/OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | \
       tar xjf - -C /toolchain --strip-components=2
 
 ENV PATH=$PATH:/rust/bin:/toolchain/bin \
     CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \
-    CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_MUSL_LINKER=mipsel-openwrt-linux-gcc \
-    CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_MUSL_RUNNER="qemu-mipsel -L /toolchain"
+    CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_MUSL_LINKER=mipsel-openwrt-linux-gcc
--- a/third_party/rust/libc/ci/docker/powerpc-unknown-linux-gnu/Dockerfile
+++ b/third_party/rust/libc/ci/docker/powerpc-unknown-linux-gnu/Dockerfile
@@ -1,10 +1,10 @@
-FROM ubuntu:17.10
+FROM ubuntu:16.10
 
-RUN apt-get update && apt-get install -y --no-install-recommends \
+RUN apt-get update
+RUN apt-get install -y --no-install-recommends \
         gcc libc6-dev qemu-user ca-certificates \
         gcc-powerpc-linux-gnu libc6-dev-powerpc-cross \
         qemu-system-ppc
 
 ENV CARGO_TARGET_POWERPC_UNKNOWN_LINUX_GNU_LINKER=powerpc-linux-gnu-gcc \
-    CARGO_TARGET_POWERPC_UNKNOWN_LINUX_GNU_RUNNER="qemu-ppc -L /usr/powerpc-linux-gnu" \
     PATH=$PATH:/rust/bin
--- a/third_party/rust/libc/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile
+++ b/third_party/rust/libc/ci/docker/powerpc64-unknown-linux-gnu/Dockerfile
@@ -1,11 +1,11 @@
-FROM ubuntu:17.10
+FROM ubuntu:16.10
 
-RUN apt-get update && apt-get install -y --no-install-recommends \
+RUN apt-get update
+RUN apt-get install -y --no-install-recommends \
         gcc libc6-dev qemu-user ca-certificates \
         gcc-powerpc64-linux-gnu libc6-dev-ppc64-cross \
         qemu-system-ppc
 
 ENV CARGO_TARGET_POWERPC64_UNKNOWN_LINUX_GNU_LINKER=powerpc64-linux-gnu-gcc \
-    CARGO_TARGET_POWERPC64_UNKNOWN_LINUX_GNU_RUNNER="qemu-ppc64 -L /usr/powerpc64-linux-gnu" \
     CC=powerpc64-linux-gnu-gcc \
     PATH=$PATH:/rust/bin
deleted file mode 100644
--- a/third_party/rust/libc/ci/docker/powerpc64le-unknown-linux-gnu/Dockerfile
+++ /dev/null
@@ -1,11 +0,0 @@
-FROM ubuntu:17.10
-
-RUN apt-get update && apt-get install -y --no-install-recommends \
-        gcc libc6-dev qemu-user ca-certificates \
-        gcc-powerpc64le-linux-gnu libc6-dev-ppc64el-cross \
-        qemu-system-ppc
-
-ENV CARGO_TARGET_POWERPC64LE_UNKNOWN_LINUX_GNU_LINKER=powerpc64le-linux-gnu-gcc \
-    CARGO_TARGET_POWERPC64LE_UNKNOWN_LINUX_GNU_RUNNER="qemu-ppc64le -L /usr/powerpc64le-linux-gnu" \
-    CC=powerpc64le-linux-gnu-gcc \
-    PATH=$PATH:/rust/bin
deleted file mode 100644
--- a/third_party/rust/libc/ci/docker/s390x-unknown-linux-gnu/Dockerfile
+++ /dev/null
@@ -1,12 +0,0 @@
-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
-
-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 \
-    CC_s390x_unknown_linux_gnu=s390x-linux-gnu-gcc \
-    PATH=$PATH:/rust/bin
deleted file mode 100644
--- a/third_party/rust/libc/ci/docker/sparc64-unknown-linux-gnu/Dockerfile
+++ /dev/null
@@ -1,14 +0,0 @@
-# link fails on 17.10
-FROM ubuntu:17.04
-
-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
-
-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 \
-    CC_sparc64_unknown_linux_gnu=sparc64-linux-gnu-gcc \
-    PATH=$PATH:/rust/bin
deleted file mode 100644
--- a/third_party/rust/libc/ci/docker/wasm32-unknown-emscripten/Dockerfile
+++ /dev/null
@@ -1,21 +0,0 @@
-FROM ubuntu:16.04
-
-RUN apt-get update && \
-    apt-get install -y --no-install-recommends \
-    ca-certificates \
-    curl \
-    gcc \
-    git \
-    libc6-dev \
-    python \
-    xz-utils
-
-COPY emscripten.sh /
-RUN bash /emscripten.sh
-
-ENV PATH=$PATH:/rust/bin \
-    CARGO_TARGET_WASM32_UNKNOWN_EMSCRIPTEN_RUNNER=node-wrapper.sh
-
-COPY emscripten-entry.sh /
-COPY docker/wasm32-unknown-emscripten/node-wrapper.sh /usr/local/bin/node-wrapper.sh
-ENTRYPOINT ["/emscripten-entry.sh"]
deleted file mode 100755
--- a/third_party/rust/libc/ci/docker/wasm32-unknown-emscripten/node-wrapper.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-set -e
-
-me=$1
-shift
-dir=$(dirname $me)
-file=$(basename $me)
-
-cd $dir
-exec node $file "$@"
--- a/third_party/rust/libc/ci/docker/x86_64-linux-android/Dockerfile
+++ b/third_party/rust/libc/ci/docker/x86_64-linux-android/Dockerfile
@@ -12,15 +12,15 @@ RUN apt-get update && \
 WORKDIR /android/
 ENV ANDROID_ARCH=x86_64
 COPY android-install-ndk.sh /android/
 RUN sh /android/android-install-ndk.sh $ANDROID_ARCH
 
 # We do not run x86_64-linux-android tests on an android emulator.
 # See ci/android-sysimage.sh for informations about how tests are run.
 COPY android-sysimage.sh /android/
-RUN bash /android/android-sysimage.sh x86_64 x86_64-24_r07.zip
+RUN bash /android/android-sysimage.sh x86_64 x86_64-21_r04.zip
 
 ENV PATH=$PATH:/rust/bin:/android/ndk-$ANDROID_ARCH/bin \
     CARGO_TARGET_X86_64_LINUX_ANDROID_LINKER=x86_64-linux-android-gcc \
     CC_x86_64_linux_android=x86_64-linux-android-gcc \
     CXX_x86_64_linux_android=x86_64-linux-android-g++ \
     HOME=/tmp
--- a/third_party/rust/libc/ci/docker/x86_64-rumprun-netbsd/Dockerfile
+++ b/third_party/rust/libc/ci/docker/x86_64-rumprun-netbsd/Dockerfile
@@ -1,10 +1,6 @@
 FROM mato/rumprun-toolchain-hw-x86_64
 USER root
 RUN apt-get update
 RUN apt-get install -y --no-install-recommends \
   qemu
-ENV PATH=$PATH:/rust/bin \
-    CARGO_TARGET_X86_64_RUMPRUN_NETBSD_RUNNER=/tmp/runtest
-
-ADD docker/x86_64-rumprun-netbsd/runtest.rs /tmp/
-ENTRYPOINT ["sh", "-c", "rustc /tmp/runtest.rs -o /tmp/runtest && exec \"$@\"", "--"]
+ENV PATH=$PATH:/rust/bin
deleted file mode 100644
--- a/third_party/rust/libc/ci/docker/x86_64-rumprun-netbsd/runtest.rs
+++ /dev/null
@@ -1,54 +0,0 @@
-use std::env;
-use std::process::{Command, Stdio};
-use std::sync::mpsc;
-use std::thread;
-use std::time::Duration;
-use std::io::{BufRead, BufReader, Read};
-
-fn main() {
-    assert_eq!(env::args().len(), 2);
-
-    let status = Command::new("rumprun-bake")
-        .arg("hw_virtio")
-        .arg("/tmp/libc-test.img")
-        .arg(env::args().nth(1).unwrap())
-        .status()
-        .expect("failed to run rumprun-bake");
-    assert!(status.success());
-
-    let mut child = Command::new("qemu-system-x86_64")
-        .arg("-nographic")
-        .arg("-vga").arg("none")
-        .arg("-m").arg("64")
-        .arg("-kernel").arg("/tmp/libc-test.img")
-        .stdout(Stdio::piped())
-        .stderr(Stdio::piped())
-        .spawn()
-        .expect("failed to spawn qemu");
-
-    let mut stdout = child.stdout.take().unwrap();
-    let mut stderr = child.stderr.take().unwrap();
-    let (tx, rx) = mpsc::channel();
-    let tx2 = tx.clone();
-    let t1 = thread::spawn(move || find_ok(&mut stdout, tx));
-    let t2 = thread::spawn(move || find_ok(&mut stderr, tx2));
-
-    let res = rx.recv_timeout(Duration::new(5, 0));
-    child.kill().unwrap();
-    t1.join().unwrap();
-    t2.join().unwrap();
-
-    if res.is_err() {
-        panic!("didn't find success");
-    }
-}
-
-fn find_ok(input: &mut Read, tx: mpsc::Sender<()>) {
-    for line in BufReader::new(input).lines() {
-        let line = line.unwrap();
-        println!("{}", line);
-        if line.starts_with("PASSED ") && line.contains(" tests") {
-            tx.send(()).unwrap();
-        }
-    }
-}
--- a/third_party/rust/libc/ci/docker/x86_64-unknown-freebsd/Dockerfile
+++ b/third_party/rust/libc/ci/docker/x86_64-unknown-freebsd/Dockerfile
@@ -1,13 +1,13 @@
-FROM alexcrichton/port-prebuilt-freebsd:2017-09-16
+FROM alexcrichton/rust-slave-linux-cross:2016-04-15
+USER root
 
 RUN apt-get update
 RUN apt-get install -y --no-install-recommends \
   qemu genext2fs
-RUN apt-get install -y curl ca-certificates gcc
 
 ENTRYPOINT ["sh"]
 
 ENV PATH=$PATH:/rust/bin \
     QEMU=2016-11-06/freebsd.qcow2.gz \
     CAN_CROSS=1 \
     CARGO_TARGET_X86_64_UNKNOWN_FREEBSD_LINKER=x86_64-unknown-freebsd10-gcc
--- a/third_party/rust/libc/ci/docker/x86_64-unknown-linux-gnu/Dockerfile
+++ b/third_party/rust/libc/ci/docker/x86_64-unknown-linux-gnu/Dockerfile
@@ -1,5 +1,5 @@
-FROM ubuntu:17.04
+FROM ubuntu:16.10
 RUN apt-get update
 RUN apt-get install -y --no-install-recommends \
   gcc libc6-dev ca-certificates
 ENV PATH=$PATH:/rust/bin
deleted file mode 100644
--- a/third_party/rust/libc/ci/docker/x86_64-unknown-linux-gnux32/Dockerfile
+++ /dev/null
@@ -1,5 +0,0 @@
-FROM ubuntu:17.04
-RUN apt-get update
-RUN apt-get install -y --no-install-recommends \
-  gcc-multilib libc6-dev ca-certificates
-ENV PATH=$PATH:/rust/bin
--- a/third_party/rust/libc/ci/docker/x86_64-unknown-linux-musl/Dockerfile
+++ b/third_party/rust/libc/ci/docker/x86_64-unknown-linux-musl/Dockerfile
@@ -1,20 +1,13 @@
-FROM ubuntu:17.10
+FROM ubuntu:16.10
 
 RUN apt-get update
 RUN apt-get install -y --no-install-recommends \
   gcc make libc6-dev git curl ca-certificates
 RUN curl https://www.musl-libc.org/releases/musl-1.1.15.tar.gz | \
     tar xzf - && \
     cd musl-1.1.15 && \
     ./configure --prefix=/musl-x86_64 && \
     make install -j4 && \
     cd .. && \
-    rm -rf musl-1.1.15 && \
-# Install linux kernel headers sanitized for use with musl
-    curl -L  https://github.com/sabotage-linux/kernel-headers/archive/v3.12.6-5.tar.gz | \
-    tar xzf - && \
-    cd kernel-headers-3.12.6-5 && \
-    make ARCH=x86_64 prefix=/musl-x86_64 install -j4 && \
-    cd .. && \
-    rm -rf kernel-headers-3.12.6-5
+    rm -rf musl-1.1.15
 ENV PATH=$PATH:/musl-x86_64/bin:/rust/bin
rename from third_party/rust/libc-0.2.24/ci/docker/x86_64-unknown-openbsd/Dockerfile
rename to third_party/rust/libc/ci/docker/x86_64-unknown-openbsd/Dockerfile
deleted file mode 100755
--- a/third_party/rust/libc/ci/emscripten-entry.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/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.
-#
-# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-# option. This file may not be copied, modified, or distributed
-# except according to those terms.
-
-set -ex
-
-source /emsdk-portable/emsdk_env.sh &> /dev/null
-
-# emsdk-portable provides a node binary, but we need version 8 to run wasm
-export PATH="/node-v8.0.0-linux-x64/bin:$PATH"
-
-exec "$@"
deleted file mode 100644
--- a/third_party/rust/libc/ci/emscripten.sh
+++ /dev/null
@@ -1,54 +0,0 @@
-# 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.
-#
-# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-# option. This file may not be copied, modified, or distributed
-# except according to those terms.
-
-set -ex
-
-hide_output() {
-  set +x
-  on_err="
-echo ERROR: An error was encountered with the build.
-cat /tmp/build.log
-exit 1
-"
-  trap "$on_err" ERR
-  bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
-  PING_LOOP_PID=$!
-  $@ &> /tmp/build.log
-  trap - ERR
-  kill $PING_LOOP_PID
-  rm -f /tmp/build.log
-  set -x
-}
-
-cd /
-curl -L https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz | \
-    tar -xz
-
-cd /emsdk-portable
-./emsdk update
-hide_output ./emsdk install sdk-1.37.20-64bit
-./emsdk activate sdk-1.37.20-64bit
-
-# Compile and cache libc
-source ./emsdk_env.sh
-echo "main(){}" > a.c
-HOME=/emsdk-portable/ emcc a.c
-HOME=/emsdk-portable/ emcc -s BINARYEN=1 a.c
-rm -f a.*
-
-# Make emsdk usable by any user
-cp /root/.emscripten /emsdk-portable
-chmod a+rxw -R /emsdk-portable
-
-# node 8 is required to run wasm
-cd /
-curl -L https://nodejs.org/dist/v8.0.0/node-v8.0.0-linux-x64.tar.xz | \
-    tar -xJ
-
old mode 100755
new mode 100644
--- a/third_party/rust/libc/ci/run-docker.sh
+++ b/third_party/rust/libc/ci/run-docker.sh
@@ -9,25 +9,25 @@ run() {
     docker build -t libc -f ci/docker/$1/Dockerfile ci/
     mkdir -p target
     if [ -w /dev/kvm ]; then
       kvm="--volume /dev/kvm:/dev/kvm"
     fi
     docker run \
       --user `id -u`:`id -g` \
       --rm \
-      --init \
       --volume $HOME/.cargo:/cargo \
       $kvm \
       --env CARGO_HOME=/cargo \
       --volume `rustc --print sysroot`:/rust:ro \
       --volume `pwd`:/checkout:ro \
       --volume `pwd`/target:/checkout/target \
       --env CARGO_TARGET_DIR=/checkout/target \
       --workdir /checkout \
+      --privileged \
       libc \
       ci/run.sh $1
 }
 
 if [ -z "$1" ]; then
   for d in `ls ci/docker/`; do
     run $d
   done
--- a/third_party/rust/libc/ci/run.sh
+++ b/third_party/rust/libc/ci/run.sh
@@ -16,39 +16,64 @@ TARGET=$1
 if [ "$QEMU" != "" ]; then
   tmpdir=/tmp/qemu-img-creation
   mkdir -p $tmpdir
 
   if [ -z "${QEMU#*.gz}" ]; then
     # image is .gz : download and uncompress it
     qemufile=$(echo ${QEMU%.gz} | sed 's/\//__/g')
     if [ ! -f $tmpdir/$qemufile ]; then
-      curl https://s3-us-west-1.amazonaws.com/rust-lang-ci2/libc/$QEMU | \
+      curl https://s3.amazonaws.com/rust-lang-ci/libc/$QEMU | \
         gunzip -d > $tmpdir/$qemufile
     fi
   else
     # plain qcow2 image: just download it
     qemufile=$(echo ${QEMU} | sed 's/\//__/g')
     if [ ! -f $tmpdir/$qemufile ]; then
-      curl https://s3-us-west-1.amazonaws.com/rust-lang-ci2/libc/$QEMU \
+      curl https://s3.amazonaws.com/rust-lang-ci/libc/$QEMU \
         > $tmpdir/$qemufile
     fi
   fi
 
   # Create a mount a fresh new filesystem image that we'll later pass to QEMU.
   # This will have a `run.sh` script will which use the artifacts inside to run
   # on the host.
   rm -f $tmpdir/libc-test.img
   mkdir $tmpdir/mount
 
-  # 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
-  cp $CARGO_TARGET_DIR/$TARGET/debug/main-* $tmpdir/mount/libc-test
-  echo 'exec $1/libc-test' > $tmpdir/mount/run.sh
+  # If we have a cross compiler, then we just do the standard rigamarole of
+  # cross-compiling an executable and then the script to run just executes the
+  # binary.
+  #
+  # If we don't have a cross-compiler, however, then we need to do some crazy
+  # acrobatics to get this to work.  Generate all.{c,rs} on the host which will
+  # be compiled inside QEMU. Do this here because compiling syntex_syntax in
+  # QEMU would time out basically everywhere.
+  if [ "$CAN_CROSS" = "1" ]; then
+    cargo build --manifest-path libc-test/Cargo.toml --target $TARGET
+    cp $CARGO_TARGET_DIR/$TARGET/debug/libc-test $tmpdir/mount/
+    echo 'exec $1/libc-test' > $tmpdir/mount/run.sh
+  else
+    rm -rf $tmpdir/generated
+    mkdir -p $tmpdir/generated
+    cargo build --manifest-path libc-test/generate-files/Cargo.toml
+    (cd libc-test && TARGET=$TARGET OUT_DIR=$tmpdir/generated SKIP_COMPILE=1 \
+      $CARGO_TARGET_DIR/debug/generate-files)
+
+    # Copy this folder into the mounted image, the `run.sh` entry point, and
+    # overwrite the standard libc-test Cargo.toml with the overlay one which will
+    # assume the all.{c,rs} test files have already been generated
+    mkdir $tmpdir/mount/libc
+    cp -r Cargo.* libc-test src ci $tmpdir/mount/libc/
+    ln -s libc-test/target $tmpdir/mount/libc/target
+    cp ci/run-qemu.sh $tmpdir/mount/run.sh
+    echo $TARGET | tee -a $tmpdir/mount/TARGET
+    cp $tmpdir/generated/* $tmpdir/mount/libc/libc-test
+    cp libc-test/run-generated-Cargo.toml $tmpdir/mount/libc/libc-test/Cargo.toml
+  fi
 
   du -sh $tmpdir/mount
   genext2fs \
       --root $tmpdir/mount \
       --size-in-blocks 100000 \
       $tmpdir/libc-test.img
 
   # Pass -snapshot to prevent tampering with the disk images, this helps when
@@ -63,16 +88,95 @@ if [ "$QEMU" != "" ]; then
     -drive if=virtio,file=$tmpdir/libc-test.img \
     -net nic,model=virtio \
     -net user \
     -nographic \
     -vga none 2>&1 | tee $CARGO_TARGET_DIR/out.log
   exec grep "^PASSED .* tests" $CARGO_TARGET_DIR/out.log
 fi
 
-# FIXME: x86_64-unknown-linux-gnux32 fail to compile wihout --release
-# See https://github.com/rust-lang/rust/issues/45417
-opt=
-if [ "$TARGET" = "x86_64-unknown-linux-gnux32" ]; then
-  opt="--release"
-fi
+case "$TARGET" in
+  *-apple-ios)
+    cargo rustc --manifest-path libc-test/Cargo.toml --target $TARGET -- \
+        -C link-args=-mios-simulator-version-min=7.0
+    ;;
+
+  *)
+    cargo build --manifest-path libc-test/Cargo.toml --target $TARGET
+    ;;
+esac
+
+case "$TARGET" in
+  # Android emulator for x86_64 does not work on travis (missing hardware
+  # acceleration). Tests are run on case *). See ci/android-sysimage.sh for
+  # informations about how tests are run.
+  arm-linux-androideabi | aarch64-linux-android | i686-linux-android)
+    # set SHELL so android can detect a 64bits system, see
+    # http://stackoverflow.com/a/41789144
+    # https://issues.jenkins-ci.org/browse/JENKINS-26930?focusedCommentId=230791&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-230791
+    export SHELL=/bin/dash
+    arch=$(echo $TARGET | cut -d- -f1)
+    accel="-no-accel"
+    if emulator -accel-check; then
+      accel=""
+    fi
+    emulator @$arch -no-window $accel &
+    adb wait-for-device
+    adb push $CARGO_TARGET_DIR/$TARGET/debug/libc-test /data/local/tmp/libc-test
+    adb shell /data/local/tmp/libc-test 2>&1 | tee /tmp/out
+    grep "^PASSED .* tests" /tmp/out
+    ;;
+
+  i386-apple-ios)
+    rustc -O ./ci/ios/deploy_and_run_on_ios_simulator.rs
+    ./deploy_and_run_on_ios_simulator $CARGO_TARGET_DIR/$TARGET/debug/libc-test
+    ;;
+
+  x86_64-apple-ios)
+    rustc -O ./ci/ios/deploy_and_run_on_ios_simulator.rs
+    ./deploy_and_run_on_ios_simulator $CARGO_TARGET_DIR/$TARGET/debug/libc-test
+    ;;
 
-exec cargo test $opt --manifest-path libc-test/Cargo.toml --target $TARGET
+  arm-unknown-linux-gnueabihf)
+    qemu-arm -L /usr/arm-linux-gnueabihf $CARGO_TARGET_DIR/$TARGET/debug/libc-test
+    ;;
+
+  mips-unknown-linux-gnu)
+    qemu-mips -L /usr/mips-linux-gnu $CARGO_TARGET_DIR/$TARGET/debug/libc-test
+    ;;
+
+  mips64-unknown-linux-gnuabi64)
+    qemu-mips64 -L /usr/mips64-linux-gnuabi64 $CARGO_TARGET_DIR/$TARGET/debug/libc-test
+    ;;
+
+  mips-unknown-linux-musl)
+    qemu-mips -L /toolchain/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.15 \
+              $CARGO_TARGET_DIR/$TARGET/debug/libc-test
+    ;;
+
+  mipsel-unknown-linux-musl)
+      qemu-mipsel -L /toolchain $CARGO_TARGET_DIR/$TARGET/debug/libc-test
+      ;;
+
+  powerpc-unknown-linux-gnu)
+    qemu-ppc -L /usr/powerpc-linux-gnu $CARGO_TARGET_DIR/$TARGET/debug/libc-test
+    ;;
+
+  powerpc64-unknown-linux-gnu)
+    qemu-ppc64 -L /usr/powerpc64-linux-gnu $CARGO_TARGET_DIR/$TARGET/debug/libc-test
+    ;;
+
+  aarch64-unknown-linux-gnu)
+    qemu-aarch64 -L /usr/aarch64-linux-gnu/ $CARGO_TARGET_DIR/$TARGET/debug/libc-test
+    ;;
+
+  *-rumprun-netbsd)
+    rumprun-bake hw_virtio /tmp/libc-test.img $CARGO_TARGET_DIR/$TARGET/debug/libc-test
+    qemu-system-x86_64 -nographic -vga none -m 64 \
+        -kernel /tmp/libc-test.img 2>&1 | tee /tmp/out &
+    sleep 5
+    grep "^PASSED .* tests" /tmp/out
+    ;;
+
+  *)
+    $CARGO_TARGET_DIR/$TARGET/debug/libc-test
+    ;;
+esac
deleted file mode 100644
--- a/third_party/rust/libc/ci/runtest-android.rs
+++ /dev/null
@@ -1,41 +0,0 @@
-use std::env;
-use std::process::Command;
-use std::path::{Path, PathBuf};
-
-fn main() {
-    assert_eq!(env::args_os().len(), 2);
-    let test = PathBuf::from(env::args_os().nth(1).unwrap());
-    let dst = Path::new("/data/local/tmp").join(test.file_name().unwrap());
-
-    let status = Command::new("adb")
-        .arg("wait-for-device")
-        .status()
-        .expect("failed to run rumprun-bake");
-    assert!(status.success());
-
-    let status = Command::new("adb")
-        .arg("push")
-        .arg(&test)
-        .arg(&dst)
-        .status()
-        .expect("failed to run rumprun-bake");
-    assert!(status.success());
-
-    let output = Command::new("adb")
-        .arg("shell")
-        .arg(&dst)
-        .output()
-        .expect("failed to run rumprun-bake");
-    assert!(status.success());
-
-    println!("status: {}\nstdout ---\n{}\nstderr ---\n{}",
-             output.status,
-             String::from_utf8_lossy(&output.stdout),
-             String::from_utf8_lossy(&output.stderr));
-
-    let stdout = String::from_utf8_lossy(&output.stdout);
-    let mut lines = stdout.lines().filter(|l| l.starts_with("PASSED "));
-    if !lines.any(|l| l.contains(" tests")) {
-        panic!("failed to find successful test run");
-    }
-}
--- a/third_party/rust/libc/src/dox.rs
+++ b/third_party/rust/libc/src/dox.rs
@@ -58,93 +58,118 @@ mod imp {
     }
 
     #[lang = "div"]
     pub trait Div<RHS> {
         type Output;
         fn div(self, rhs: RHS) -> Self::Output;
     }
 
+    macro_rules! impl_div {
+        ($($i:ident)*) => ($(
+            impl Div<$i> for $i {
+                type Output = $i;
+                fn div(self, rhs: $i) -> $i { self / rhs }
+            }
+        )*)
+    }
+    each_int!(impl_div);
+
     #[lang = "shl"]
     pub trait Shl<RHS> {
         type Output;
         fn shl(self, rhs: RHS) -> Self::Output;
     }
 
+    macro_rules! impl_shl {
+        ($($i:ident)*) => ($(
+            impl Shl<$i> for $i {
+                type Output = $i;
+                fn shl(self, rhs: $i) -> $i { self << rhs }
+            }
+        )*)
+    }
+    each_int!(impl_shl);
+
     #[lang = "mul"]
     pub trait Mul<RHS=Self> {
         type Output;
         fn mul(self, rhs: RHS) -> Self::Output;
     }
 
+    macro_rules! impl_mul {
+        ($($i:ident)*) => ($(
+            impl Mul for $i {
+                type Output = $i;
+                fn mul(self, rhs: $i) -> $i { self * rhs }
+            }
+        )*)
+    }
+    each_int!(impl_mul);
+
     #[lang = "sub"]
     pub trait Sub<RHS=Self> {
         type Output;
         fn sub(self, rhs: RHS) -> Self::Output;
     }
 
+    macro_rules! impl_sub {
+        ($($i:ident)*) => ($(
+            impl Sub for $i {
+                type Output = $i;
+                fn sub(self, rhs: $i) -> $i { self - rhs }
+            }
+        )*)
+    }
+    each_int!(impl_sub);
+
     #[lang = "bitor"]
     pub trait Bitor<RHS=Self> {
         type Output;
         fn bitor(self, rhs: RHS) -> Self::Output;
     }
 
+    macro_rules! impl_bitor {
+        ($($i:ident)*) => ($(
+            impl Bitor for $i {
+                type Output = $i;
+                fn bitor(self, rhs: $i) -> $i { self | rhs }
+            }
+        )*)
+    }
+    each_int!(impl_bitor);
+
     #[lang = "neg"]
     pub trait Neg {
         type Output;
         fn neg(self) -> Self::Output;
     }
 
+    macro_rules! impl_neg {
+        ($($i:ident)*) => ($(
+            impl Neg for $i {
+                type Output = $i;
+                fn neg(self) -> $i { -self }
+            }
+        )*)
+    }
+    each_signed_int!(impl_neg);
+
     #[lang = "not"]
     pub trait Not {
         type Output;
         fn not(self) -> Self::Output;
     }
 
-    #[lang = "add"]
-    pub trait Add<RHS = Self> {
-        type Output;
-        fn add(self, r: RHS) -> Self::Output;
-    }
-
-    macro_rules! impl_traits {
+    macro_rules! impl_not {
         ($($i:ident)*) => ($(
-            impl Div<$i> for $i {
-                type Output = $i;
-                fn div(self, rhs: $i) -> $i { self / rhs }
-            }
-            impl Shl<$i> for $i {
-                type Output = $i;
-                fn shl(self, rhs: $i) -> $i { self << rhs }
-            }
-            impl Mul for $i {
-                type Output = $i;
-                fn mul(self, rhs: $i) -> $i { self * rhs }
-            }
-
-            impl Sub for $i {
-                type Output = $i;
-                fn sub(self, rhs: $i) -> $i { self - rhs }
-            }
-            impl Bitor for $i {
-                type Output = $i;
-                fn bitor(self, rhs: $i) -> $i { self | rhs }
-            }
-            impl Neg for $i {
-                type Output = $i;
-                fn neg(self) -> $i { -self }
-            }
             impl Not for $i {
                 type Output = $i;
                 fn not(self) -> $i { !self }
             }
-            impl Add<$i> for $i {
-                type Output = $i;
-                fn add(self, other: $i) -> $i { self + other }
-            }
         )*)
     }
-    each_int!(impl_traits);
+    each_int!(impl_not);
 
     pub mod mem {
         pub fn size_of_val<T>(_: &T) -> usize { 4 }
     }
 }
--- a/third_party/rust/libc/src/lib.rs
+++ b/third_party/rust/libc/src/lib.rs
@@ -67,39 +67,30 @@
     html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-bitrig"
 ))]
 #![cfg_attr(target_os = "netbsd", doc(
     html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-netbsd"
 ))]
 #![cfg_attr(target_os = "dragonfly", doc(
     html_root_url = "https://doc.rust-lang.org/libc/x86_64-unknown-dragonfly"
 ))]
-#![cfg_attr(all(target_os = "emscripten", target_arch = "asmjs"), doc(
-    html_root_url = "https://doc.rust-lang.org/libc/asmjs-unknown-emscripten"
-))]
-#![cfg_attr(all(target_os = "emscripten", target_arch = "wasm32"), doc(
-    html_root_url = "https://doc.rust-lang.org/libc/wasm32-unknown-emscripten"
-))]
-#![cfg_attr(all(target_os = "linux", target_arch = "xparc64"), doc(
-    html_root_url = "https://doc.rust-lang.org/libc/sparc64-unknown-linux-gnu"
-))]
 
 // Attributes needed when building as part of the standard library
-#![cfg_attr(feature = "stdbuild", feature(no_std, staged_api, custom_attribute, cfg_target_vendor))]
-#![cfg_attr(feature = "stdbuild", feature(link_cfg))]
-#![cfg_attr(feature = "stdbuild", no_std)]
-#![cfg_attr(feature = "stdbuild", staged_api)]
-#![cfg_attr(feature = "stdbuild", allow(warnings))]
-#![cfg_attr(feature = "stdbuild", unstable(feature = "libc",
+#![cfg_attr(stdbuild, feature(no_std, core, core_slice_ext, staged_api, custom_attribute, cfg_target_vendor))]
+#![cfg_attr(stdbuild, feature(link_cfg))]
+#![cfg_attr(stdbuild, no_std)]
+#![cfg_attr(stdbuild, staged_api)]
+#![cfg_attr(stdbuild, allow(warnings))]
+#![cfg_attr(stdbuild, unstable(feature = "libc",
                                reason = "use `libc` from crates.io",
                                issue = "27783"))]
 
 #![cfg_attr(not(feature = "use_std"), no_std)]
 
-#[cfg(all(not(dox), feature = "use_std"))]
+#[cfg(all(not(stdbuild), not(dox), feature = "use_std"))]
 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.
--- a/third_party/rust/libc/src/macros.rs
+++ b/third_party/rust/libc/src/macros.rs
@@ -64,8 +64,45 @@ macro_rules! f {
             loop {}
         }
     )*)
 }
 
 macro_rules! __item {
     ($i:item) => ($i)
 }
+
+#[cfg(test)]
+mod tests {
+    cfg_if! {
+        if #[cfg(test)] {
+            use std::option::Option as Option2;
+            fn works1() -> Option2<u32> { Some(1) }
+        } else {
+            fn works1() -> Option<u32> { None }
+        }
+    }
+
+    cfg_if! {
+        if #[cfg(foo)] {
+            fn works2() -> bool { false }
+        } else if #[cfg(test)] {
+            fn works2() -> bool { true }
+        } else {
+            fn works2() -> bool { false }
+        }
+    }
+
+    cfg_if! {
+        if #[cfg(foo)] {
+            fn works3() -> bool { false }
+        } else {
+            fn works3() -> bool { true }
+        }
+    }
+
+    #[test]
+    fn it_works() {
+        assert!(works1().is_some());
+        assert!(works2());
+        assert!(works3());
+    }
+}
rename from third_party/rust/libc-0.2.24/src/redox.rs
rename to third_party/rust/libc/src/redox.rs
deleted file mode 100644
--- a/third_party/rust/libc/src/redox/mod.rs
+++ /dev/null
@@ -1,104 +0,0 @@
-pub type c_char = i8;
-pub type c_long = i64;
-pub type c_ulong = u64;
-
-pub type wchar_t = i16;
-
-pub type off_t = c_long;
-pub type mode_t = u16;
-pub type time_t = i64;
-pub type pid_t = usize;
-pub type gid_t = usize;
-pub type uid_t = usize;
-
-pub type suseconds_t = i64;
-
-s! {
-    pub struct timeval {
-        pub tv_sec: time_t,
-        pub tv_usec: suseconds_t,
-    }
-
-    pub struct timespec {
-        pub tv_sec: time_t,
-        pub tv_nsec: c_long,
-    }
-}
-
-pub const STDIN_FILENO: ::c_int = 0;
-pub const STDOUT_FILENO: ::c_int = 1;
-pub const STDERR_FILENO: ::c_int = 2;
-
-pub const EXIT_FAILURE: ::c_int = 1;
-pub const EXIT_SUCCESS: ::c_int = 0;
-
-pub const S_ISUID: ::c_int = 0x800;
-pub const S_ISGID: ::c_int = 0x400;
-pub const S_ISVTX: ::c_int = 0x200;
-
-pub const S_IFIFO: mode_t = 0x1000;
-pub const S_IFCHR: mode_t = 0x2000;
-pub const S_IFBLK: mode_t = 0x6000;
-pub const S_IFDIR: mode_t = 0x4000;
-pub const S_IFREG: mode_t = 0x8000;
-pub const S_IFLNK: mode_t = 0xA000;
-pub const S_IFSOCK: mode_t = 0xC000;
-pub const S_IFMT: mode_t = 0xF000;
-pub const S_IEXEC: mode_t = 0x40;
-pub const S_IWRITE: mode_t = 0x80;
-pub const S_IREAD: mode_t = 0x100;
-pub const S_IRWXU: mode_t = 0x1C0;
-pub const S_IXUSR: mode_t = 0x40;
-pub const S_IWUSR: mode_t = 0x80;
-pub const S_IRUSR: mode_t = 0x100;
-pub const S_IRWXG: mode_t = 0x38;
-pub const S_IXGRP: mode_t = 0x8;
-pub const S_IWGRP: mode_t = 0x10;
-pub const S_IRGRP: mode_t = 0x20;
-pub const S_IRWXO: mode_t = 0x7;
-pub const S_IXOTH: mode_t = 0x1;
-pub const S_IWOTH: mode_t = 0x2;
-pub const S_IROTH: mode_t = 0x4;
-
-pub const F_DUPFD: ::c_int = 0;
-pub const F_GETFD: ::c_int = 1;
-pub const F_SETFD: ::c_int = 2;
-pub const F_GETFL: ::c_int = 3;
-pub const F_SETFL: ::c_int = 4;
-
-pub const O_RDONLY: ::c_int =     0x0001_0000;
-pub const O_WRONLY: ::c_int =     0x0002_0000;
-pub const O_RDWR: ::c_int =       0x0003_0000;
-pub const O_NONBLOCK: ::c_int =   0x0004_0000;
-pub const O_APPEND: ::c_int =     0x0008_0000;
-pub const O_SHLOCK: ::c_int =     0x0010_0000;
-pub const O_EXLOCK: ::c_int =     0x0020_0000;
-pub const O_ASYNC: ::c_int =      0x0040_0000;
-pub const O_FSYNC: ::c_int =      0x0080_0000;
-pub const O_CLOEXEC: ::c_int =    0x0100_0000;
-pub const O_CREAT: ::c_int =      0x0200_0000;
-pub const O_TRUNC: ::c_int =      0x0400_0000;
-pub const O_EXCL: ::c_int =       0x0800_0000;
-pub const O_DIRECTORY: ::c_int =  0x1000_0000;
-pub const O_STAT: ::c_int =       0x2000_0000;
-pub const O_SYMLINK: ::c_int =    0x4000_0000;
-pub const O_NOFOLLOW: ::c_int =   0x8000_0000;
-pub const O_ACCMODE: ::c_int =    O_RDONLY | O_WRONLY | O_RDWR;
-
-extern {
-    pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
-    pub fn read(fd: ::c_int, buf: *mut ::c_void, count: ::size_t)
-                -> ::ssize_t;
-    pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::size_t)
-                 -> ::ssize_t;
-    pub fn fcntl(fd: ::c_int, cmd: ::c_int, ...) -> ::c_int;
-    pub fn close(fd: ::c_int) -> ::c_int;
-}
-
-#[link(name = "c")]
-#[link(name = "m")]
-extern {}
-
-pub use self::net::*;
-
-mod net;
deleted file mode 100644
--- a/third_party/rust/libc/src/redox/net.rs
+++ /dev/null
@@ -1,110 +0,0 @@
-pub type in_addr_t = u32;
-pub type in_port_t = u16;
-
-pub type socklen_t = u32;
-pub type sa_family_t = u16;
-
-s! {
-    pub struct in_addr {
-        pub s_addr: in_addr_t,
-    }
-
-    pub struct in6_addr {
-        pub s6_addr: [u8; 16],
-        __align: [u32; 0],
-    }
-
-    pub struct ip_mreq {
-        pub imr_multiaddr: in_addr,
-        pub imr_interface: in_addr,
-    }
-
-    pub struct ipv6_mreq {
-        pub ipv6mr_multiaddr: in6_addr,
-        pub ipv6mr_interface: ::c_uint,
-    }
-
-    pub struct linger {
-        pub l_onoff: ::c_int,
-        pub l_linger: ::c_int,
-    }
-
-    pub struct sockaddr {
-        pub sa_family: sa_family_t,
-        pub sa_data: [::c_char; 14],
-    }
-
-    pub struct sockaddr_in {
-        pub sin_family: sa_family_t,
-        pub sin_port: ::in_port_t,
-        pub sin_addr: ::in_addr,
-        pub sin_zero: [u8; 8],
-    }
-
-    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,
-        pub __ss_padding: [u8; 26],
-    }
-}
-
-pub const AF_INET: ::c_int = 2;
-pub const AF_INET6: ::c_int = 23;
-
-pub const SOCK_STREAM: ::c_int = 1;
-pub const SOCK_DGRAM: ::c_int = 2;
-
-pub const IPPROTO_TCP: ::c_int = 6;
-pub const IPPROTO_IP: ::c_int = 0;
-pub const IPPROTO_IPV6: ::c_int = 41;
-
-pub const TCP_KEEPIDLE: ::c_int = 4;
-pub const TCP_NODELAY: ::c_int = 8193;
-
-pub const IP_TTL: ::c_int = 8;
-pub const IP_MULTICAST_LOOP: ::c_int = 9;
-pub const IP_MULTICAST_TTL: ::c_int = 10;
-pub const IP_ADD_MEMBERSHIP: ::c_int = 11;
-pub const IP_DROP_MEMBERSHIP: ::c_int = 12;
-
-pub const IPV6_MULTICAST_LOOP: ::c_int = 19;
-pub const IPV6_ADD_MEMBERSHIP: ::c_int = 20;
-pub const IPV6_DROP_MEMBERSHIP: ::c_int = 21;
-pub const IPV6_V6ONLY: ::c_int = 26;
-
-pub const SOL_SOCKET: ::c_int = 65535;
-
-pub const SO_REUSEADDR: ::c_int = 4;
-pub const SO_BROADCAST: ::c_int = 6;
-pub const SO_KEEPALIVE: ::c_int = 8;
-pub const SO_RCVTIMEO: ::c_int = 20;
-pub const SO_SNDTIMEO: ::c_int = 21;
-pub const SO_LINGER: ::c_int = 128;
-pub const SO_SNDBUF: ::c_int = 4097;
-pub const SO_RCVBUF: ::c_int = 4098;
-pub const SO_ERROR: ::c_int = 4105;
-
-extern {
-    pub fn socket(domain: ::c_int, ty: ::c_int, protocol: ::c_int) -> ::c_int;
-    pub fn bind(fd: ::c_int, addr: *const sockaddr, len: socklen_t) -> ::c_int;
-    pub fn connect(socket: ::c_int, address: *const sockaddr,
-                   len: socklen_t) -> ::c_int;
-    pub fn listen(socket: ::c_int, backlog: ::c_int) -> ::c_int;
-    pub fn getsockname(socket: ::c_int, address: *mut sockaddr,
-                       address_len: *mut socklen_t) -> ::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 setsockopt(socket: ::c_int, level: ::c_int, name: ::c_int,
-                      value: *const ::c_void,
-                      option_len: socklen_t) -> ::c_int;
-}
--- a/third_party/rust/libc/src/unix/bsd/apple/b32.rs
+++ b/third_party/rust/libc/src/unix/bsd/apple/b32.rs
@@ -1,53 +1,19 @@
 //! 32-bit specific Apple (ios/darwin) definitions
 
 pub type c_long = i32;
 pub type c_ulong = u32;
-pub type boolean_t = ::c_int;
 
 s! {
     pub struct pthread_attr_t {
         __sig: c_long,
         __opaque: [::c_char; 36]
     }
-
-    pub struct if_data {
-        pub ifi_type: ::c_uchar,
-        pub ifi_typelen: ::c_uchar,
-        pub ifi_physical: ::c_uchar,
-        pub ifi_addrlen: ::c_uchar,
-        pub ifi_hdrlen: ::c_uchar,
-        pub ifi_recvquota: ::c_uchar,
-        pub ifi_xmitquota: ::c_uchar,
-        pub ifi_unused1: ::c_uchar,
-        pub ifi_mtu: u32,
-        pub ifi_metric: u32,
-        pub ifi_baudrate: u32,
-        pub ifi_ipackets: u32,
-        pub ifi_ierrors: u32,
-        pub ifi_opackets: u32,
-        pub ifi_oerrors: u32,
-        pub ifi_collisions: u32,
-        pub ifi_ibytes: u32,
-        pub ifi_obytes: u32,
-        pub ifi_imcasts: u32,
-        pub ifi_omcasts: u32,
-        pub ifi_iqdrops: u32,
-        pub ifi_noproto: u32,
-        pub ifi_recvtiming: u32,
-        pub ifi_xmittiming: u32,
-        pub ifi_lastchange: ::timeval,
-        pub ifi_unused2: u32,
-        pub ifi_hwassist: u32,
-        pub ifi_reserved1: u32,
-        pub ifi_reserved2: u32,
-    }
 }
 
 pub const __PTHREAD_MUTEX_SIZE__: usize = 40;
 pub const __PTHREAD_COND_SIZE__: usize = 24;
 pub const __PTHREAD_CONDATTR_SIZE__: usize = 4;
 pub const __PTHREAD_RWLOCK_SIZE__: usize = 124;
-pub const __PTHREAD_RWLOCKATTR_SIZE__: usize = 12;
 
 pub const TIOCTIMESTAMP: ::c_ulong = 0x40087459;
 pub const TIOCDCDTIMESTAMP: ::c_ulong = 0x40087458;
--- a/third_party/rust/libc/src/unix/bsd/apple/b64.rs
+++ b/third_party/rust/libc/src/unix/bsd/apple/b64.rs
@@ -1,60 +1,21 @@
 //! 64-bit specific Apple (ios/darwin) definitions
 
 pub type c_long = i64;
 pub type c_ulong = u64;
-pub type boolean_t = ::c_uint;
 
 s! {
     pub struct pthread_attr_t {
         __sig: c_long,
         __opaque: [::c_char; 56]
     }
-
-    pub struct timeval32 {
-        pub tv_sec: i32,
-        pub tv_usec: i32,
-    }
-
-    pub struct if_data {
-        pub ifi_type: ::c_uchar,
-        pub ifi_typelen: ::c_uchar,
-        pub ifi_physical: ::c_uchar,
-        pub ifi_addrlen: ::c_uchar,
-        pub ifi_hdrlen: ::c_uchar,
-        pub ifi_recvquota: ::c_uchar,
-        pub ifi_xmitquota: ::c_uchar,
-        pub ifi_unused1: ::c_uchar,
-        pub ifi_mtu: u32,
-        pub ifi_metric: u32,
-        pub ifi_baudrate: u32,
-        pub ifi_ipackets: u32,
-        pub ifi_ierrors: u32,
-        pub ifi_opackets: u32,
-        pub ifi_oerrors: u32,
-        pub ifi_collisions: u32,
-        pub ifi_ibytes: u32,
-        pub ifi_obytes: u32,
-        pub ifi_imcasts: u32,
-        pub ifi_omcasts: u32,
-        pub ifi_iqdrops: u32,
-        pub ifi_noproto: u32,
-        pub ifi_recvtiming: u32,
-        pub ifi_xmittiming: u32,
-        pub ifi_lastchange: timeval32,
-        pub ifi_unused2: u32,
-        pub ifi_hwassist: u32,
-        pub ifi_reserved1: u32,
-        pub ifi_reserved2: u32,
-    }
 }
 
 pub const __PTHREAD_MUTEX_SIZE__: usize = 56;
 pub const __PTHREAD_COND_SIZE__: usize = 40;
 pub const __PTHREAD_CONDATTR_SIZE__: usize = 8;
 pub const __PTHREAD_RWLOCK_SIZE__: usize = 192;
-pub const __PTHREAD_RWLOCKATTR_SIZE__: usize = 16;
 
 pub const TIOCTIMESTAMP: ::c_ulong = 0x40107459;
 pub const TIOCDCDTIMESTAMP: ::c_ulong = 0x40107458;
 
 pub const FIONREAD: ::c_ulong = 0x4004667f;
--- a/third_party/rust/libc/src/unix/bsd/apple/mod.rs
+++ b/third_party/rust/libc/src/unix/bsd/apple/mod.rs
@@ -9,17 +9,16 @@ pub type dev_t = i32;
 pub type ino_t = u64;
 pub type mode_t = u16;
 pub type nlink_t = u16;
 pub type blksize_t = i32;
 pub type rlim_t = u64;
 pub type mach_timebase_info_data_t = mach_timebase_info;
 pub type pthread_key_t = c_ulong;
 pub type sigset_t = u32;
-pub type clockid_t = ::c_uint;
 pub type fsblkcnt_t = ::c_uint;
 pub type fsfilcnt_t = ::c_uint;
 pub type speed_t = ::c_ulong;
 pub type tcflag_t = ::c_ulong;
 pub type nl_item = ::c_int;
 pub type id_t = ::c_uint;
 pub type sem_t = ::c_int;
 pub type idtype_t = ::c_uint;
@@ -142,21 +141,16 @@ s! {
         __opaque: [u8; __PTHREAD_CONDATTR_SIZE__],
     }
 
     pub struct pthread_rwlock_t {
         __sig: ::c_long,
         __opaque: [u8; __PTHREAD_RWLOCK_SIZE__],
     }
 
-    pub struct pthread_rwlockattr_t {
-        __sig: ::c_long,
-        __opaque: [u8; __PTHREAD_RWLOCKATTR_SIZE__],
-    }
-
     pub struct siginfo_t {
         pub si_signo: ::c_int,
         pub si_errno: ::c_int,
         pub si_code: ::c_int,
         pub si_pid: ::pid_t,
         pub si_uid: ::uid_t,
         pub si_status: ::c_int,
         pub si_addr: *mut ::c_void,
@@ -264,26 +258,16 @@ s! {
         pub dqb_isoftlimit: ::uint32_t,
         pub dqb_curinodes: ::uint32_t,
         pub dqb_btime: ::uint32_t,
         pub dqb_itime: ::uint32_t,
         pub dqb_id: ::uint32_t,
         pub dqb_spare: [::uint32_t; 4],
     }
 
-    pub struct if_msghdr {
-        pub ifm_msglen: ::c_ushort,
-        pub ifm_version: ::c_uchar,
-        pub ifm_type: ::c_uchar,
-        pub ifm_addrs: ::c_int,
-        pub ifm_flags: ::c_int,
-        pub ifm_index: ::c_ushort,
-        pub ifm_data: if_data,
-    }
-
     pub struct termios {
         pub c_iflag: ::tcflag_t,
         pub c_oflag: ::tcflag_t,
         pub c_cflag: ::tcflag_t,
         pub c_lflag: ::tcflag_t,
         pub c_cc: [::cc_t; ::NCCS],
         pub c_ispeed: ::speed_t,
         pub c_ospeed: ::speed_t,
@@ -333,96 +317,16 @@ s! {
 
     pub struct sigevent {
         pub sigev_notify: ::c_int,
         pub sigev_signo: ::c_int,
         pub sigev_value: ::sigval,
         __unused1: *mut ::c_void,       //actually a function pointer
         pub sigev_notify_attributes: *mut ::pthread_attr_t
     }
-
-    pub struct proc_taskinfo {
-        pub pti_virtual_size: u64,
-        pub pti_resident_size: u64,
-        pub pti_total_user: u64,
-        pub pti_total_system: u64,
-        pub pti_threads_user: u64,
-        pub pti_threads_system: u64,
-        pub pti_policy: i32,
-        pub pti_faults: i32,
-        pub pti_pageins: i32,
-        pub pti_cow_faults: i32,
-        pub pti_messages_sent: i32,
-        pub pti_messages_received: i32,
-        pub pti_syscalls_mach: i32,
-        pub pti_syscalls_unix: i32,
-        pub pti_csw: i32,
-        pub pti_threadnum: i32,
-        pub pti_numrunning: i32,
-        pub pti_priority: i32,
-    }
-
-    pub struct proc_bsdinfo {
-        pub pbi_flags: u32,
-        pub pbi_status: u32,
-        pub pbi_xstatus: u32,
-        pub pbi_pid: u32,
-        pub pbi_ppid: u32,
-        pub pbi_uid: ::uid_t,
-        pub pbi_gid: ::gid_t,
-        pub pbi_ruid: ::uid_t,
-        pub pbi_rgid: ::gid_t,
-        pub pbi_svuid: ::uid_t,
-        pub pbi_svgid: ::gid_t,
-        pub rfu_1: u32,
-        pub pbi_comm: [::c_char; MAXCOMLEN],
-        pub pbi_name: [::c_char; 32], // MAXCOMLEN * 2, but macro isn't happy...
-        pub pbi_nfiles: u32,
-        pub pbi_pgid: u32,
-        pub pbi_pjobc: u32,
-        pub e_tdev: u32,
-        pub e_tpgid: u32,
-        pub pbi_nice: i32,
-        pub pbi_start_tvsec: u64,
-        pub pbi_start_tvusec: u64,
-    }
-
-    pub struct proc_taskallinfo {
-        pub pbsd: proc_bsdinfo,
-        pub ptinfo: proc_taskinfo,
-    }
-
-    pub struct proc_threadinfo {
-        pub pth_user_time: u64,
-        pub pth_system_time: u64,
-        pub pth_cpu_usage: i32,
-        pub pth_policy: i32,
-        pub pth_run_state: i32,
-        pub pth_flags: i32,
-        pub pth_sleep_time: i32,
-        pub pth_curpri: i32,
-        pub pth_priority: i32,
-        pub pth_maxpriority: i32,
-        pub pth_name: [::c_char; MAXTHREADNAMESIZE],
-    }
-
-    pub struct xsw_usage {
-        pub xsu_total: u64,
-        pub xsu_avail: u64,
-        pub xsu_used: u64,
-        pub xsu_pagesize: u32,
-        pub xsu_encrypted: ::boolean_t,
-    }
-
-    pub struct xucred {
-        pub cr_version: ::c_uint,
-        pub cr_uid: ::uid_t,
-        pub cr_ngroups: ::c_short,
-        pub cr_groups: [::gid_t;16]
-    }
 }
 
 pub const _UTX_USERSIZE: usize = 256;
 pub const _UTX_LINESIZE: usize = 32;
 pub const _UTX_IDSIZE: usize = 4;
 pub const _UTX_HOSTSIZE: usize = 256;
 
 pub const EMPTY: ::c_short = 0;
@@ -496,21 +400,16 @@ pub const ABMON_5: ::nl_item = 37;
 pub const ABMON_6: ::nl_item = 38;
 pub const ABMON_7: ::nl_item = 39;
 pub const ABMON_8: ::nl_item = 40;
 pub const ABMON_9: ::nl_item = 41;
 pub const ABMON_10: ::nl_item = 42;
 pub const ABMON_11: ::nl_item = 43;
 pub const ABMON_12: ::nl_item = 44;
 
-pub const CLOCK_REALTIME: ::clockid_t = 0;
-pub const CLOCK_MONOTONIC: ::clockid_t = 6;
-pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 12;
-pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 16;
-
 pub const ERA: ::nl_item = 45;
 pub const ERA_D_FMT: ::nl_item = 46;
 pub const ERA_D_T_FMT: ::nl_item = 47;
 pub const ERA_T_FMT: ::nl_item = 48;
 pub const ALT_DIGITS: ::nl_item = 49;
 
 pub const RADIXCHAR: ::nl_item = 50;
 pub const THOUSEP: ::nl_item = 51;
@@ -544,18 +443,24 @@ pub const _PC_LINK_MAX: ::c_int = 1;
 pub const _PC_MAX_CANON: ::c_int = 2;
 pub const _PC_MAX_INPUT: ::c_int = 3;
 pub const _PC_NAME_MAX: ::c_int = 4;
 pub const _PC_PATH_MAX: ::c_int = 5;
 pub const _PC_PIPE_BUF: ::c_int = 6;
 pub const _PC_CHOWN_RESTRICTED: ::c_int = 7;
 pub const _PC_NO_TRUNC: ::c_int = 8;
 pub const _PC_VDISABLE: ::c_int = 9;
-pub const O_DSYNC: ::c_int = 0x400000;
-pub const O_NOCTTY: ::c_int = 0x20000;
+pub const O_RDONLY: ::c_int = 0;
+pub const O_WRONLY: ::c_int = 1;
+pub const O_RDWR: ::c_int = 2;
+pub const O_APPEND: ::c_int = 8;
+pub const O_CREAT: ::c_int = 512;
+pub const O_EXCL: ::c_int = 2048;
+pub const O_NOCTTY: ::c_int = 131072;
+pub const O_TRUNC: ::c_int = 1024;
 pub const O_CLOEXEC: ::c_int = 0x1000000;
 pub const O_DIRECTORY: ::c_int = 0x100000;
 pub const S_IFIFO: mode_t = 4096;
 pub const S_IFCHR: mode_t = 8192;
 pub const S_IFBLK: mode_t = 24576;
 pub const S_IFDIR: mode_t = 16384;
 pub const S_IFREG: mode_t = 32768;
 pub const S_IFLNK: mode_t = 40960;
@@ -609,122 +514,16 @@ pub const PROT_WRITE: ::c_int = 2;
 pub const PROT_EXEC: ::c_int = 4;
 
 pub const MAP_FILE: ::c_int = 0x0000;
 pub const MAP_SHARED: ::c_int = 0x0001;
 pub const MAP_PRIVATE: ::c_int = 0x0002;
 pub const MAP_FIXED: ::c_int = 0x0010;
 pub const MAP_ANON: ::c_int = 0x1000;
 
-pub const VM_FLAGS_FIXED: ::c_int = 0x0000;
-pub const VM_FLAGS_ANYWHERE: ::c_int = 0x0001;
-pub const VM_FLAGS_PURGABLE: ::c_int = 0x0002;
-pub const VM_FLAGS_RANDOM_ADDR: ::c_int = 0x0008;
-pub const VM_FLAGS_NO_CACHE: ::c_int = 0x0010;
-pub const VM_FLAGS_RESILIENT_CODESIGN: ::c_int = 0x0020;
-pub const VM_FLAGS_RESILIENT_MEDIA: ::c_int = 0x0040;
-pub const VM_FLAGS_OVERWRITE: ::c_int = 0x4000;
-pub const VM_FLAGS_SUPERPAGE_MASK: ::c_int = 0x70000;
-pub const VM_FLAGS_RETURN_DATA_ADDR: ::c_int = 0x100000;
-pub const VM_FLAGS_RETURN_4K_DATA_ADDR: ::c_int = 0x800000;
-pub const VM_FLAGS_ALIAS_MASK: ::c_int = 0xFF000000;
-pub const VM_FLAGS_USER_ALLOCATE: ::c_int = VM_FLAGS_FIXED | VM_FLAGS_ANYWHERE |
-                                            VM_FLAGS_PURGABLE |
-                                            VM_FLAGS_RANDOM_ADDR |
-                                            VM_FLAGS_NO_CACHE |
-                                            VM_FLAGS_OVERWRITE |
-                                            VM_FLAGS_SUPERPAGE_MASK |
-                                            VM_FLAGS_ALIAS_MASK;
-pub const VM_FLAGS_USER_MAP: ::c_int = VM_FLAGS_USER_ALLOCATE |
-                                       VM_FLAGS_RETURN_4K_DATA_ADDR |
-                                       VM_FLAGS_RETURN_DATA_ADDR;
-pub const VM_FLAGS_USER_REMAP: ::c_int = VM_FLAGS_FIXED | VM_FLAGS_ANYWHERE |
-                                        VM_FLAGS_RANDOM_ADDR |
-                                        VM_FLAGS_OVERWRITE |
-                                        VM_FLAGS_RETURN_DATA_ADDR |
-                                        VM_FLAGS_RESILIENT_CODESIGN;
-
-pub const VM_FLAGS_SUPERPAGE_SHIFT: ::c_int = 16;
-pub const SUPERPAGE_NONE: ::c_int = 0;
-pub const SUPERPAGE_SIZE_ANY: ::c_int = 1;
-pub const VM_FLAGS_SUPERPAGE_NONE: ::c_int = SUPERPAGE_NONE <<
-                                             VM_FLAGS_SUPERPAGE_SHIFT;
-pub const VM_FLAGS_SUPERPAGE_SIZE_ANY: ::c_int = SUPERPAGE_SIZE_ANY <<
-                                                 VM_FLAGS_SUPERPAGE_SHIFT;
-pub const SUPERPAGE_SIZE_2MB: ::c_int = 2;
-pub const VM_FLAGS_SUPERPAGE_SIZE_2MB: ::c_int = SUPERPAGE_SIZE_2MB <<
-                                                 VM_FLAGS_SUPERPAGE_SHIFT;
-
-pub const VM_MEMORY_MALLOC: ::c_int = 1;
-pub const VM_MEMORY_MALLOC_SMALL: ::c_int = 2;
-pub const VM_MEMORY_MALLOC_LARGE: ::c_int = 3;
-pub const VM_MEMORY_MALLOC_HUGE: ::c_int = 4;
-pub const VM_MEMORY_SBRK: ::c_int = 5;
-pub const VM_MEMORY_REALLOC: ::c_int = 6;
-pub const VM_MEMORY_MALLOC_TINY: ::c_int = 7;
-pub const VM_MEMORY_MALLOC_LARGE_REUSABLE: ::c_int = 8;
-pub const VM_MEMORY_MALLOC_LARGE_REUSED: ::c_int = 9;
-pub const VM_MEMORY_ANALYSIS_TOOL: ::c_int = 10;
-pub const VM_MEMORY_MALLOC_NANO: ::c_int = 11;
-pub const VM_MEMORY_MACH_MSG: ::c_int = 20;
-pub const VM_MEMORY_IOKIT: ::c_int = 21;
-pub const VM_MEMORY_STACK: ::c_int = 30;
-pub const VM_MEMORY_GUARD: ::c_int = 31;
-pub const VM_MEMORY_SHARED_PMAP: ::c_int = 32;
-pub const VM_MEMORY_DYLIB: ::c_int = 33;
-pub const VM_MEMORY_OBJC_DISPATCHERS: ::c_int = 34;
-pub const VM_MEMORY_UNSHARED_PMAP: ::c_int = 35;
-pub const VM_MEMORY_APPKIT: ::c_int = 40;
-pub const VM_MEMORY_FOUNDATION: ::c_int = 41;
-pub const VM_MEMORY_COREGRAPHICS: ::c_int = 42;
-pub const VM_MEMORY_CORESERVICES: ::c_int = 43;
-pub const VM_MEMORY_CARBON: ::c_int = VM_MEMORY_CORESERVICES;
-pub const VM_MEMORY_JAVA: ::c_int = 44;
-pub const VM_MEMORY_COREDATA: ::c_int = 45;
-pub const VM_MEMORY_COREDATA_OBJECTIDS: ::c_int = 46;
-pub const VM_MEMORY_ATS: ::c_int = 50;
-pub const VM_MEMORY_LAYERKIT: ::c_int = 51;
-pub const VM_MEMORY_CGIMAGE: ::c_int = 52;
-pub const VM_MEMORY_TCMALLOC: ::c_int = 53;
-pub const VM_MEMORY_COREGRAPHICS_DATA: ::c_int = 54;
-pub const VM_MEMORY_COREGRAPHICS_SHARED: ::c_int = 55;
-pub const VM_MEMORY_COREGRAPHICS_FRAMEBUFFERS: ::c_int = 56;
-pub const VM_MEMORY_COREGRAPHICS_BACKINGSTORES: ::c_int = 57;
-pub const VM_MEMORY_COREGRAPHICS_XALLOC: ::c_int = 58;
-pub const VM_MEMORY_COREGRAPHICS_MISC: ::c_int = VM_MEMORY_COREGRAPHICS;
-pub const VM_MEMORY_DYLD: ::c_int = 60;
-pub const VM_MEMORY_DYLD_MALLOC: ::c_int = 61;
-pub const VM_MEMORY_SQLITE: ::c_int = 62;
-pub const VM_MEMORY_JAVASCRIPT_CORE: ::c_int = 63;
-pub const VM_MEMORY_JAVASCRIPT_JIT_EXECUTABLE_ALLOCATOR: ::c_int = 64;
-pub const VM_MEMORY_JAVASCRIPT_JIT_REGISTER_FILE: ::c_int = 65;
-pub const VM_MEMORY_GLSL: ::c_int = 66;
-pub const VM_MEMORY_OPENCL: ::c_int = 67;
-pub const VM_MEMORY_COREIMAGE: ::c_int = 68;
-pub const VM_MEMORY_WEBCORE_PURGEABLE_BUFFERS: ::c_int = 69;
-pub const VM_MEMORY_IMAGEIO: ::c_int = 70;
-pub const VM_MEMORY_COREPROFILE: ::c_int = 71;
-pub const VM_MEMORY_ASSETSD: ::c_int = 72;
-pub const VM_MEMORY_OS_ALLOC_ONCE: ::c_int = 73;
-pub const VM_MEMORY_LIBDISPATCH: ::c_int = 74;
-pub const VM_MEMORY_ACCELERATE: ::c_int = 75;
-pub const VM_MEMORY_COREUI: ::c_int = 76;
-pub const VM_MEMORY_COREUIFILE: ::c_int = 77;
-pub const VM_MEMORY_GENEALOGY: ::c_int = 78;
-pub const VM_MEMORY_RAWCAMERA: ::c_int = 79;
-pub const VM_MEMORY_CORPSEINFO: ::c_int = 80;
-pub const VM_MEMORY_ASL: ::c_int = 81;
-pub const VM_MEMORY_SWIFT_RUNTIME: ::c_int = 82;
-pub const VM_MEMORY_SWIFT_METADATA: ::c_int = 83;
-pub const VM_MEMORY_DHMM: ::c_int = 84;
-pub const VM_MEMORY_SCENEKIT: ::c_int = 86;
-pub const VM_MEMORY_SKYWALK: ::c_int = 87;
-pub const VM_MEMORY_APPLICATION_SPECIFIC_1: ::c_int = 240;
-pub const VM_MEMORY_APPLICATION_SPECIFIC_16: ::c_int = 255;
-
 pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
 
 pub const MCL_CURRENT: ::c_int = 0x0001;
 pub const MCL_FUTURE: ::c_int = 0x0002;
 
 pub const MS_ASYNC: ::c_int = 0x0001;
 pub const MS_INVALIDATE: ::c_int = 0x0002;
 pub const MS_SYNC: ::c_int = 0x0010;
@@ -867,16 +666,18 @@ pub const F_PEOFPOSMODE: ::c_int = 3;
 pub const F_VOLPOSMODE: ::c_int = 4;
 
 pub const AT_FDCWD: ::c_int = -2;
 pub const AT_EACCESS: ::c_int = 0x0010;
 pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x0020;
 pub const AT_SYMLINK_FOLLOW: ::c_int = 0x0040;
 pub const AT_REMOVEDIR: ::c_int = 0x0080;
 
+pub const O_ACCMODE: ::c_int = 3;
+
 pub const TIOCMODG: ::c_ulong = 0x40047403;
 pub const TIOCMODS: ::c_ulong = 0x80047404;
 pub const TIOCM_LE: ::c_int = 0x1;
 pub const TIOCM_DTR: ::c_int = 0x2;
 pub const TIOCM_RTS: ::c_int = 0x4;
 pub const TIOCM_ST: ::c_int = 0x8;
 pub const TIOCM_SR: ::c_int = 0x10;
 pub const TIOCM_CTS: ::c_int = 0x20;
@@ -1006,18 +807,16 @@ pub const _SC_XOPEN_ENH_I18N: ::c_int = 
 pub const _SC_XOPEN_LEGACY: ::c_int = 110;
 pub const _SC_XOPEN_REALTIME: ::c_int = 111;
 pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 112;
 pub const _SC_XOPEN_SHM: ::c_int = 113;
 pub const _SC_XOPEN_UNIX: ::c_int = 115;
 pub const _SC_XOPEN_VERSION: ::c_int = 116;
 pub const _SC_XOPEN_XCU_VERSION: ::c_int = 121;
 
-pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 2;
-pub const PTHREAD_PROCESS_SHARED: ::c_int = 1;
 pub const PTHREAD_CREATE_JOINABLE: ::c_int = 1;
 pub const PTHREAD_CREATE_DETACHED: ::c_int = 2;
 pub const PTHREAD_STACK_MIN: ::size_t = 8192;
 
 pub const RLIMIT_CPU: ::c_int = 0;
 pub const RLIMIT_FSIZE: ::c_int = 1;
 pub const RLIMIT_DATA: ::c_int = 2;
 pub const RLIMIT_STACK: ::c_int = 3;
@@ -1047,233 +846,16 @@ pub const MADV_FREE_REUSE: ::c_int = 8;
 pub const MADV_CAN_REUSE: ::c_int = 9;
 
 pub const MINCORE_INCORE: ::c_int =  0x1;
 pub const MINCORE_REFERENCED: ::c_int = 0x2;
 pub const MINCORE_MODIFIED: ::c_int = 0x4;
 pub const MINCORE_REFERENCED_OTHER: ::c_int = 0x8;
 pub const MINCORE_MODIFIED_OTHER: ::c_int = 0x10;
 
-//
-// sys/netinet/in.h
-// Protocols (RFC 1700)
-// NOTE: These are in addition to the constants defined in src/unix/mod.rs
-
-// IPPROTO_IP defined in src/unix/mod.rs
-/// IP6 hop-by-hop options
-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)
-pub const IPPROTO_GGP: ::c_int = 3;
-/// for compatibility
-pub const IPPROTO_IPIP: ::c_int = 4;
-// IPPROTO_TCP defined in src/unix/mod.rs
-/// Stream protocol II.
-pub const IPPROTO_ST: ::c_int = 7;
-/// exterior gateway protocol
-pub const IPPROTO_EGP: ::c_int = 8;
-/// private interior gateway
-pub const IPPROTO_PIGP: ::c_int = 9;
-/// BBN RCC Monitoring
-pub const IPPROTO_RCCMON: ::c_int = 10;
-/// network voice protocol
-pub const IPPROTO_NVPII: ::c_int = 11;
-/// pup
-pub const IPPROTO_PUP: ::c_int = 12;
-/// Argus
-pub const IPPROTO_ARGUS: ::c_int = 13;
-/// EMCON
-pub const IPPROTO_EMCON: ::c_int = 14;
-/// Cross Net Debugger
-pub const IPPROTO_XNET: ::c_int = 15;
-/// Chaos
-pub const IPPROTO_CHAOS: ::c_int = 16;
-// IPPROTO_UDP defined in src/unix/mod.rs
-/// Multiplexing
-pub const IPPROTO_MUX: ::c_int = 18;
-/// DCN Measurement Subsystems
-pub const IPPROTO_MEAS: ::c_int = 19;
-/// Host Monitoring
-pub const IPPROTO_HMP: ::c_int = 20;
-/// Packet Radio Measurement
-pub const IPPROTO_PRM: ::c_int = 21;
-/// xns idp
-pub const IPPROTO_IDP: ::c_int = 22;
-/// Trunk-1
-pub const IPPROTO_TRUNK1: ::c_int = 23;
-/// Trunk-2
-pub const IPPROTO_TRUNK2: ::c_int = 24;
-/// Leaf-1
-pub const IPPROTO_LEAF1: ::c_int = 25;
-/// Leaf-2
-pub const IPPROTO_LEAF2: ::c_int = 26;
-/// Reliable Data
-pub const IPPROTO_RDP: ::c_int = 27;
-/// Reliable Transaction
-pub const IPPROTO_IRTP: ::c_int = 28;
-/// tp-4 w/ class negotiation
-pub const IPPROTO_TP: ::c_int = 29;
-/// Bulk Data Transfer
-pub const IPPROTO_BLT: ::c_int = 30;
-/// Network Services
-pub const IPPROTO_NSP: ::c_int = 31;
-/// Merit Internodal
-pub const IPPROTO_INP: ::c_int = 32;
-/// Sequential Exchange
-pub const IPPROTO_SEP: ::c_int = 33;
-/// Third Party Connect
-pub const IPPROTO_3PC: ::c_int = 34;
-/// InterDomain Policy Routing
-pub const IPPROTO_IDPR: ::c_int = 35;
-/// XTP
-pub const IPPROTO_XTP: ::c_int = 36;
-/// Datagram Delivery
-pub const IPPROTO_DDP: ::c_int = 37;
-/// Control Message Transport
-pub const IPPROTO_CMTP: ::c_int = 38;
-/// TP++ Transport
-pub const IPPROTO_TPXX: ::c_int = 39;
-/// IL transport protocol
-pub const IPPROTO_IL: ::c_int = 40;
-// IPPROTO_IPV6 defined in src/unix/mod.rs
-/// Source Demand Routing
-pub const IPPROTO_SDRP: ::c_int = 42;
-/// IP6 routing header
-pub const IPPROTO_ROUTING: ::c_int = 43;
-/// IP6 fragmentation header
-pub const IPPROTO_FRAGMENT: ::c_int = 44;
-/// InterDomain Routing
-pub const IPPROTO_IDRP: ::c_int = 45;
-/// resource reservation
-pub const IPPROTO_RSVP: ::c_int = 46;
-/// General Routing Encap.
-pub const IPPROTO_GRE: ::c_int = 47;
-/// Mobile Host Routing
-pub const IPPROTO_MHRP: ::c_int = 48;
-/// BHA
-pub const IPPROTO_BHA: ::c_int = 49;
-/// IP6 Encap Sec. Payload
-pub const IPPROTO_ESP: ::c_int = 50;
-/// IP6 Auth Header
-pub const IPPROTO_AH: ::c_int = 51;
-/// Integ. Net Layer Security
-pub const IPPROTO_INLSP: ::c_int = 52;
-/// IP with encryption
-pub const IPPROTO_SWIPE: ::c_int = 53;
-/// Next Hop Resolution
-pub const IPPROTO_NHRP: ::c_int = 54;
-/* 55-57: Unassigned */
-// IPPROTO_ICMPV6 defined in src/unix/mod.rs
-/// IP6 no next header
-pub const IPPROTO_NONE: ::c_int = 59;
-/// IP6 destination option
-pub const IPPROTO_DSTOPTS: ::c_int = 60;
-/// any host internal protocol
-pub const IPPROTO_AHIP: ::c_int = 61;
-/// CFTP
-pub const IPPROTO_CFTP: ::c_int = 62;
-/// "hello" routing protocol
-pub const IPPROTO_HELLO: ::c_int = 63;
-/// SATNET/Backroom EXPAK
-pub const IPPROTO_SATEXPAK: ::c_int = 64;
-/// Kryptolan
-pub const IPPROTO_KRYPTOLAN: ::c_int = 65;
-/// Remote Virtual Disk
-pub const IPPROTO_RVD: ::c_int = 66;
-/// Pluribus Packet Core
-pub const IPPROTO_IPPC: ::c_int = 67;
-/// Any distributed FS
-pub const IPPROTO_ADFS: ::c_int = 68;
-/// Satnet Monitoring
-pub const IPPROTO_SATMON: ::c_int = 69;
-/// VISA Protocol
-pub const IPPROTO_VISA: ::c_int = 70;
-/// Packet Core Utility
-pub const IPPROTO_IPCV: ::c_int = 71;
-/// Comp. Prot. Net. Executive
-pub const IPPROTO_CPNX: ::c_int = 72;
-/// Comp. Prot. HeartBeat
-pub const IPPROTO_CPHB: ::c_int = 73;
-/// Wang Span Network
-pub const IPPROTO_WSN: ::c_int = 74;
-/// Packet Video Protocol
-pub const IPPROTO_PVP: ::c_int = 75;
-/// BackRoom SATNET Monitoring
-pub const IPPROTO_BRSATMON: ::c_int = 76;
-/// Sun net disk proto (temp.)
-pub const IPPROTO_ND: ::c_int = 77;
-/// WIDEBAND Monitoring
-pub const IPPROTO_WBMON: ::c_int = 78;
-/// WIDEBAND EXPAK
-pub const IPPROTO_WBEXPAK: ::c_int = 79;
-/// ISO cnlp
-pub const IPPROTO_EON: ::c_int = 80;
-/// VMTP
-pub const IPPROTO_VMTP: ::c_int = 81;
-/// Secure VMTP
-pub const IPPROTO_SVMTP: ::c_int = 82;
-/// Banyon VINES
-pub const IPPROTO_VINES: ::c_int = 83;
-/// TTP
-pub const IPPROTO_TTP: ::c_int = 84;
-/// NSFNET-IGP
-pub const IPPROTO_IGP: ::c_int = 85;
-/// dissimilar gateway prot.
-pub const IPPROTO_DGP: ::c_int = 86;
-/// TCF
-pub const IPPROTO_TCF: ::c_int = 87;
-/// Cisco/GXS IGRP
-pub const IPPROTO_IGRP: ::c_int = 88;
-/// OSPFIGP
-pub const IPPROTO_OSPFIGP: ::c_int = 89;
-/// Strite RPC protocol
-pub const IPPROTO_SRPC: ::c_int = 90;
-/// Locus Address Resoloution
-pub const IPPROTO_LARP: ::c_int = 91;
-/// Multicast Transport
-pub const IPPROTO_MTP: ::c_int = 92;
-/// AX.25 Frames
-pub const IPPROTO_AX25: ::c_int = 93;
-/// IP encapsulated in IP
-pub const IPPROTO_IPEIP: ::c_int = 94;
-/// Mobile Int.ing control
-pub const IPPROTO_MICP: ::c_int = 95;
-/// Semaphore Comm. security
-pub const IPPROTO_SCCSP: ::c_int = 96;
-/// Ethernet IP encapsulation
-pub const IPPROTO_ETHERIP: ::c_int = 97;
-/// encapsulation header
-pub const IPPROTO_ENCAP: ::c_int = 98;
-/// any private encr. scheme
-pub const IPPROTO_APES: ::c_int = 99;
-/// GMTP
-pub const IPPROTO_GMTP: ::c_int = 100;
-
-/* 101-254: Partly Unassigned */
-/// Protocol Independent Mcast
-pub const IPPROTO_PIM: ::c_int = 103;
-/// payload compression (IPComp)
-pub const IPPROTO_IPCOMP: ::c_int = 108;
-/// PGM
-pub const IPPROTO_PGM: ::c_int = 113;
-/// SCTP
-pub const IPPROTO_SCTP: ::c_int = 132;
-
-/* 255: Reserved */
-/* BSD Private, local use, namespace incursion */
-/// divert pseudo-protocol
-pub const IPPROTO_DIVERT: ::c_int = 254;
-/// raw IP packet
-pub const IPPROTO_RAW: ::c_int = 255;
-pub const IPPROTO_MAX: ::c_int = 256;
-/// last return value of *_input(), meaning "all job for this pkt is done".
-pub const IPPROTO_DONE: ::c_int = 257;
-
 pub const AF_UNSPEC: ::c_int = 0;
 pub const AF_LOCAL: ::c_int = 1;
 pub const AF_UNIX: ::c_int = AF_LOCAL;
 pub const AF_INET: ::c_int = 2;
 pub const AF_IMPLINK: ::c_int = 3;
 pub const AF_PUP: ::c_int = 4;
 pub const AF_CHAOS: ::c_int = 5;
 pub const AF_NS: ::c_int = 6;
@@ -1303,20 +885,16 @@ pub const pseudo_AF_KEY: ::c_int = 29;
 pub const AF_INET6: ::c_int = 30;
 pub const AF_NATM: ::c_int = 31;
 pub const AF_SYSTEM: ::c_int = 32;
 pub const AF_NETBIOS: ::c_int = 33;
 pub const AF_PPP: ::c_int = 34;
 pub const pseudo_AF_HDRCMPLT: ::c_int = 35;
 #[doc(hidden)]
 pub const AF_MAX: ::c_int = 40;
-pub const AF_SYS_CONTROL: ::c_int = 2;
-
-pub const SYSPROTO_EVENT: ::c_int = 1;
-pub const SYSPROTO_CONTROL: ::c_int = 2;
 
 pub const PF_UNSPEC: ::c_int = AF_UNSPEC;
 pub const PF_LOCAL: ::c_int = AF_LOCAL;
 pub const PF_UNIX: ::c_int =  PF_LOCAL;
 pub const PF_INET: ::c_int =  AF_INET;
 pub const PF_IMPLINK: ::c_int = AF_IMPLINK;
 pub const PF_PUP: ::c_int =  AF_PUP;
 pub const PF_CHAOS: ::c_int = AF_CHAOS;
@@ -1364,70 +942,61 @@ pub const SOMAXCONN: ::c_int = 128;
 
 pub const SOCK_MAXADDRLEN: ::c_int = 255;
 
 pub const SOCK_STREAM: ::c_int = 1;
 pub const SOCK_DGRAM: ::c_int = 2;
 pub const SOCK_RAW: ::c_int = 3;
 pub const SOCK_RDM: ::c_int = 4;
 pub const SOCK_SEQPACKET: ::c_int = 5;
+pub const IPPROTO_ICMP: ::c_int = 1;
+pub const IPPROTO_ICMPV6: ::c_int = 58;
+pub const IPPROTO_TCP: ::c_int = 6;
+pub const IPPROTO_IP: ::c_int = 0;
+pub const IPPROTO_IPV6: ::c_int = 41;
+pub const IP_MULTICAST_TTL: ::c_int = 10;
+pub const IP_MULTICAST_LOOP: ::c_int = 11;
 pub const IP_TTL: ::c_int = 4;
 pub const IP_HDRINCL: ::c_int = 2;
 pub const IP_ADD_MEMBERSHIP: ::c_int = 12;
 pub const IP_DROP_MEMBERSHIP: ::c_int = 13;
 pub const IPV6_JOIN_GROUP: ::c_int = 12;
 pub const IPV6_LEAVE_GROUP: ::c_int = 13;
 
 pub const TCP_NODELAY: ::c_int = 0x01;
 pub const TCP_KEEPALIVE: ::c_int = 0x10;
-
-pub const SOL_LOCAL: ::c_int = 0;
-
-pub const LOCAL_PEERCRED: ::c_int = 0x001;
-pub const LOCAL_PEERPID: ::c_int = 0x002;
-pub const LOCAL_PEEREPID: ::c_int = 0x003;
-pub const LOCAL_PEERUUID: ::c_int = 0x004;
-pub const LOCAL_PEEREUUID: ::c_int = 0x005;
-
 pub const SOL_SOCKET: ::c_int = 0xffff;
 
 pub const SO_DEBUG: ::c_int = 0x01;
 pub const SO_ACCEPTCONN: ::c_int = 0x0002;
 pub const SO_REUSEADDR: ::c_int = 0x0004;
 pub const SO_KEEPALIVE: ::c_int = 0x0008;
 pub const SO_DONTROUTE: ::c_int = 0x0010;
 pub const SO_BROADCAST: ::c_int = 0x0020;
 pub const SO_USELOOPBACK: ::c_int = 0x0040;
 pub const SO_LINGER: ::c_int = 0x0080;
 pub const SO_OOBINLINE: ::c_int = 0x0100;
 pub const SO_REUSEPORT: ::c_int = 0x0200;
 pub const SO_TIMESTAMP: ::c_int = 0x0400;
-pub const SO_TIMESTAMP_MONOTONIC: ::c_int = 0x0800;
 pub const SO_DONTTRUNC: ::c_int = 0x2000;
 pub const SO_WANTMORE: ::c_int = 0x4000;
 pub const SO_WANTOOBFLAG: ::c_int = 0x8000;
 pub const SO_SNDBUF: ::c_int = 0x1001;
 pub const SO_RCVBUF: ::c_int = 0x1002;
 pub const SO_SNDLOWAT: ::c_int = 0x1003;
 pub const SO_RCVLOWAT: ::c_int = 0x1004;
 pub const SO_SNDTIMEO: ::c_int = 0x1005;
 pub const SO_RCVTIMEO: ::c_int = 0x1006;
 pub const SO_ERROR: ::c_int = 0x1007;
 pub const SO_TYPE: ::c_int = 0x1008;
-pub const SO_LABEL: ::c_int = 0x1010;
-pub const SO_PEERLABEL: ::c_int = 0x1011;
 pub const SO_NREAD: ::c_int = 0x1020;
 pub const SO_NKE: ::c_int = 0x1021;
 pub const SO_NOSIGPIPE: ::c_int = 0x1022;
 pub const SO_NOADDRERR: ::c_int = 0x1023;
 pub const SO_NWRITE: ::c_int = 0x1024;
-pub const SO_REUSESHAREUID: ::c_int = 0x1025;
-pub const SO_NOTIFYCONFLICT: ::c_int = 0x1026;
-pub const SO_RANDOMPORT: ::c_int = 0x1082;
-pub const SO_NP_EXTENSIONS: ::c_int = 0x1083;
 
 pub const MSG_OOB: ::c_int =  0x1;
 pub const MSG_PEEK: ::c_int = 0x2;
 pub const MSG_DONTROUTE: ::c_int = 0x4;
 pub const MSG_EOR: ::c_int =  0x8;
 pub const MSG_TRUNC: ::c_int = 0x10;
 pub const MSG_CTRUNC: ::c_int = 0x20;
 pub const MSG_WAITALL: ::c_int = 0x40;
@@ -1435,38 +1004,45 @@ pub const MSG_DONTWAIT: ::c_int = 0x80;
 pub const MSG_EOF: ::c_int =  0x100;
 pub const MSG_FLUSH: ::c_int = 0x400;
 pub const MSG_HOLD: ::c_int = 0x800;
 pub const MSG_SEND: ::c_int = 0x1000;
 pub const MSG_HAVEMORE: ::c_int = 0x2000;
 pub const MSG_RCVMORE: ::c_int = 0x4000;
 // pub const MSG_COMPAT: ::c_int = 0x8000;
 
+pub const SCM_RIGHTS: ::c_int = 0x01;
 pub const SCM_TIMESTAMP: ::c_int = 0x02;
 pub const SCM_CREDS: ::c_int = 0x03;
 
 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;
 
 pub const LOCK_SH: ::c_int = 1;
 pub const LOCK_EX: ::c_int = 2;
 pub const LOCK_NB: ::c_int = 4;
 pub const LOCK_UN: ::c_int = 8;
 
+pub const O_DSYNC: ::c_int = 4194304;
+pub const O_SYNC: ::c_int = 128;
+pub const O_NONBLOCK: ::c_int = 4;
+
 pub const MAP_COPY: ::c_int = 0x0002;
 pub const MAP_RENAME: ::c_int = 0x0020;
 pub const MAP_NORESERVE: ::c_int = 0x0040;
 pub const MAP_NOEXTEND: ::c_int = 0x0100;
 pub const MAP_HASSEMAPHORE: ::c_int = 0x0200;
 pub const MAP_NOCACHE: ::c_int = 0x0400;
 pub const MAP_JIT: ::c_int = 0x0800;
 
+pub const IPPROTO_RAW: ::c_int = 255;
+
 pub const _SC_ARG_MAX: ::c_int = 1;
 pub const _SC_CHILD_MAX: ::c_int = 2;
 pub const _SC_CLK_TCK: ::c_int = 3;
 pub const _SC_NGROUPS_MAX: ::c_int = 4;
 pub const _SC_OPEN_MAX: ::c_int = 5;
 pub const _SC_JOB_CONTROL: ::c_int = 6;
 pub const _SC_SAVED_IDS: ::c_int = 7;
 pub const _SC_VERSION: ::c_int = 8;
@@ -1657,28 +1233,16 @@ pub const NOTE_NSECONDS: ::uint32_t = 0x
 pub const NOTE_ABSOLUTE: ::uint32_t = 0x00000008;
 pub const NOTE_LEEWAY: ::uint32_t = 0x00000010;
 pub const NOTE_CRITICAL: ::uint32_t = 0x00000020;
 pub const NOTE_BACKGROUND: ::uint32_t = 0x00000040;
 pub const NOTE_TRACK: ::uint32_t = 0x00000001;
 pub const NOTE_TRACKERR: ::uint32_t = 0x00000002;
 pub const NOTE_CHILD: ::uint32_t = 0x00000004;
 
-pub const OCRNL: ::c_int = 0x00000010;
-pub const ONOCR: ::c_int = 0x00000020;
-pub const ONLRET: ::c_int = 0x00000040;
-pub const OFILL: ::c_int = 0x00000080;
-pub const NLDLY: ::c_int = 0x00000300;
-pub const TABDLY: ::c_int = 0x00000c04;
-pub const CRDLY: ::c_int = 0x00003000;
-pub const FFDLY: ::c_int = 0x00004000;
-pub const BSDLY: ::c_int = 0x00008000;
-pub const VTDLY: ::c_int = 0x00010000;
-pub const OFDEL: ::c_int = 0x00020000;
-
 pub const NL0: ::c_int  = 0x00000000;
 pub const NL1: ::c_int  = 0x00000100;
 pub const TAB0: ::c_int = 0x00000000;
 pub const TAB1: ::c_int = 0x00000400;
 pub const TAB2: ::c_int = 0x00000800;
 pub const CR0: ::c_int  = 0x00000000;
 pub const CR1: ::c_int  = 0x00001000;
 pub const CR2: ::c_int  = 0x00002000;
@@ -1912,16 +1476,21 @@ pub const USER_POSIX2_SW_DEV: ::c_int = 
 pub const USER_POSIX2_UPE: ::c_int = 18;
 pub const USER_STREAM_MAX: ::c_int = 19;
 pub const USER_TZNAME_MAX: ::c_int = 20;
 pub const USER_MAXID: ::c_int = 21;
 pub const CTL_DEBUG_NAME: ::c_int = 0;
 pub const CTL_DEBUG_VALUE: ::c_int = 1;
 pub const CTL_DEBUG_MAXID: ::c_int = 20;
 
+pub const POLLRDNORM: ::c_short = 0x040;
+pub const POLLWRNORM: ::c_short = 0x004;
+pub const POLLRDBAND: ::c_short = 0x080;
+pub const POLLWRBAND: ::c_short = 0x100;
+
 pub const PRIO_DARWIN_THREAD: ::c_int = 3;
 pub const PRIO_DARWIN_PROCESS: ::c_int = 4;
 pub const PRIO_DARWIN_BG: ::c_int = 0x1000;
 pub const PRIO_DARWIN_NONUI: ::c_int = 0x1001;
 
 pub const SEM_FAILED: *mut sem_t = -1isize as *mut ::sem_t;
 
 pub const SIGEV_NONE: ::c_int = 0;
@@ -1949,29 +1518,16 @@ pub const P_PGID: idtype_t = 2;
 
 pub const XATTR_NOFOLLOW: ::c_int = 0x0001;
 pub const XATTR_CREATE: ::c_int = 0x0002;
 pub const XATTR_REPLACE: ::c_int = 0x0004;
 pub const XATTR_NOSECURITY: ::c_int = 0x0008;
 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;
-
-pub const KERN_PROCARGS2: ::c_int = 49;
-
-pub const PROC_PIDTASKALLINFO: ::c_int = 2;
-pub const PROC_PIDTASKINFO: ::c_int = 4;
-pub const PROC_PIDTHREADINFO: ::c_int = 5;
-pub const MAXCOMLEN: usize = 16;
-pub const MAXTHREADNAMESIZE: usize = 64;
-
-pub const XUCRED_VERSION: ::c_uint = 0;
-
 f! {
     pub fn WSTOPSIG(status: ::c_int) -> ::c_int {
         status >> 8
     }
 
     pub fn _WSTATUS(status: ::c_int) -> ::c_int {
         status & 0x7f
     }
@@ -1995,18 +1551,16 @@ extern {
     pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
     pub fn aio_error(aiocbp: *const aiocb) -> ::c_int;
     pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t;
     #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
                link_name = "aio_suspend$UNIX2003")]
     pub fn aio_suspend(aiocb_list: *const *const aiocb, nitems: ::c_int,
                        timeout: *const ::timespec) -> ::c_int;
     pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
-    pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
-    pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
     pub fn lio_listio(mode: ::c_int, aiocb_list: *const *mut aiocb,
                       nitems: ::c_int, sevp: *mut sigevent) -> ::c_int;
 
     pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
 
     pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
 
     pub fn getutxent() -> *mut utmpx;
@@ -2056,20 +1610,16 @@ extern {
     pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t,
                                        pshared: ::c_int) -> ::c_int;
     pub fn pthread_condattr_getpshared(attr: *const pthread_condattr_t,
                                        pshared: *mut ::c_int) -> ::c_int;
     pub fn pthread_mutexattr_setpshared(attr: *mut pthread_mutexattr_t,
                                         pshared: ::c_int) -> ::c_int;
     pub fn pthread_mutexattr_getpshared(attr: *const pthread_mutexattr_t,
                                         pshared: *mut ::c_int) -> ::c_int;
-    pub fn pthread_rwlockattr_getpshared(attr: *const pthread_rwlockattr_t,
-                                         val: *mut ::c_int) -> ::c_int;
-    pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t,
-                                         val: ::c_int) -> ::c_int;
     pub fn __error() -> *mut ::c_int;
     pub fn backtrace(buf: *mut *mut ::c_void,
                      sz: ::c_int) -> ::c_int;
     #[cfg_attr(target_os = "macos", link_name = "statfs$INODE64")]
     pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int;
     #[cfg_attr(target_os = "macos", link_name = "fstatfs$INODE64")]
     pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int;
     pub fn kevent(kq: ::c_int,
@@ -2084,17 +1634,17 @@ extern {
                     eventlist: *mut ::kevent64_s,
                     nevents: ::c_int,
                     flags: ::c_uint,
                     timeout: *const ::timespec) -> ::c_int;
     pub fn mount(src: *const ::c_char,
                  target: *const ::c_char,
                  flags: ::c_int,
                  data: *mut ::c_void) -> ::c_int;
-    pub fn ptrace(request: ::c_int,
+    pub fn ptrace(requeset: ::c_int,
                   pid: ::pid_t,
                   addr: *mut ::c_char,
                   data: ::c_int) -> ::c_int;
     pub fn quotactl(special: *const ::c_char,
                     cmd: ::c_int,
                     id: ::c_int,
                     data: *mut ::c_char) -> ::c_int;
     pub fn sethostname(name: *const ::c_char, len: ::c_int) -> ::c_int;
@@ -2140,20 +1690,16 @@ extern {
                      size: ::size_t, flags: ::c_int) -> ::ssize_t;
     pub fn flistxattr(filedes: ::c_int, list: *mut ::c_char,
                       size: ::size_t, flags: ::c_int) -> ::ssize_t;
     pub fn removexattr(path: *const ::c_char, name: *const ::c_char,
                        flags: ::c_int) -> ::c_int;
     pub fn fremovexattr(filedes: ::c_int, name: *const ::c_char,
                         flags: ::c_int) -> ::c_int;
 
-    pub fn getgrouplist(name: *const ::c_char,
-                        basegid: ::c_int,
-                        groups: *mut ::c_int,
-                        ngroups: *mut ::c_int) -> ::c_int;
     pub fn initgroups(user: *const ::c_char, basegroup: ::c_int) -> ::c_int;
 
     #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
                link_name = "waitid$UNIX2003")]
     pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t,
                   options: ::c_int) -> ::c_int;
     pub fn brk(addr: *const ::c_void) -> *mut ::c_void;
     pub fn sbrk(increment: ::c_int) -> *mut ::c_void;
--- a/third_party/rust/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs
+++ b/third_party/rust/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs
@@ -126,85 +126,47 @@ s! {
         pub st_blocks: ::int64_t,
         pub st_blksize: ::uint32_t,
         pub st_flags: ::uint32_t,
         pub st_gen: ::uint32_t,
         pub st_lspare: ::int32_t,
         pub st_qspare1: ::int64_t,
         pub st_qspare2: ::int64_t,
     }
-
-    pub struct if_data {
-        pub ifi_type: ::c_uchar,
-        pub ifi_physical: ::c_uchar,
-        pub ifi_addrlen: ::c_uchar,
-        pub ifi_hdrlen: ::c_uchar,
-        pub ifi_recvquota: ::c_uchar,
-        pub ifi_xmitquota: ::c_uchar,
-        pub ifi_mtu: ::c_ulong,
-        pub ifi_metric: ::c_ulong,
-        pub ifi_link_state: ::c_ulong,
-        pub ifi_baudrate: u64,
-        pub ifi_ipackets: ::c_ulong,
-        pub ifi_ierrors: ::c_ulong,
-        pub ifi_opackets: ::c_ulong,
-        pub ifi_oerrors: ::c_ulong,
-        pub ifi_collisions: ::c_ulong,
-        pub ifi_ibytes: ::c_ulong,
-        pub ifi_obytes: ::c_ulong,
-        pub ifi_imcasts: ::c_ulong,
-        pub ifi_omcasts: ::c_ulong,
-        pub ifi_iqdrops: ::c_ulong,
-        pub ifi_noproto: ::c_ulong,
-        pub ifi_hwassist: ::c_ulong,
-        pub ifi_oqdrops: ::c_ulong,
-        pub ifi_lastchange: ::timeval,
-    }
-
-    pub struct if_msghdr {
-        pub ifm_msglen: ::c_ushort,
-        pub ifm_version: ::c_uchar,
-        pub ifm_type: ::c_uchar,
-        pub ifm_addrs: ::c_int,
-        pub ifm_flags: ::c_int,
-        pub ifm_index: ::c_ushort,
-        pub ifm_data: if_data,
-    }
 }
 
 pub const RAND_MAX: ::c_int = 0x7fff_ffff;
-pub const PTHREAD_STACK_MIN: ::size_t = 16384;
+pub const PTHREAD_STACK_MIN: ::size_t = 1024;
 pub const SIGSTKSZ: ::size_t = 40960;
 pub const MADV_INVAL: ::c_int = 10;
 pub const O_CLOEXEC: ::c_int = 0x00020000;
-pub const O_DIRECTORY: ::c_int = 0x08000000;
 pub const F_GETLK: ::c_int = 7;
 pub const F_SETLK: ::c_int = 8;
 pub const F_SETLKW: ::c_int = 9;
 pub const ELAST: ::c_int = 99;
 pub const RLIMIT_POSIXLOCKS: ::c_int = 11;
 pub const RLIM_NLIMITS: ::rlim_t = 12;
 
 pub const Q_GETQUOTA: ::c_int = 0x300;
 pub const Q_SETQUOTA: ::c_int = 0x400;
 
-pub const CLOCK_REALTIME: ::clockid_t = 0;
-pub const CLOCK_VIRTUAL: ::clockid_t = 1;
-pub const CLOCK_PROF: ::clockid_t = 2;
-pub const CLOCK_MONOTONIC: ::clockid_t = 4;
-pub const CLOCK_UPTIME: ::clockid_t = 5;
-pub const CLOCK_UPTIME_PRECISE: ::clockid_t = 7;
-pub const CLOCK_UPTIME_FAST: ::clockid_t = 8;
-pub const CLOCK_REALTIME_PRECISE: ::clockid_t = 9;
-pub const CLOCK_REALTIME_FAST: ::clockid_t = 10;
-pub const CLOCK_MONOTONIC_PRECISE: ::clockid_t = 11;
-pub const CLOCK_MONOTONIC_FAST: ::clockid_t = 12;
-pub const CLOCK_SECOND: ::clockid_t = 13;
-pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 14;
-pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 15;
+pub const CLOCK_REALTIME: clockid_t = 0;
+pub const CLOCK_VIRTUAL: clockid_t = 1;
+pub const CLOCK_PROF: clockid_t = 2;
+pub const CLOCK_MONOTONIC: clockid_t = 4;
+pub const CLOCK_UPTIME: clockid_t = 5;
+pub const CLOCK_UPTIME_PRECISE: clockid_t = 7;
+pub const CLOCK_UPTIME_FAST: clockid_t = 8;
+pub const CLOCK_REALTIME_PRECISE: clockid_t = 9;
+pub const CLOCK_REALTIME_FAST: clockid_t = 10;
+pub const CLOCK_MONOTONIC_PRECISE: clockid_t = 11;
+pub const CLOCK_MONOTONIC_FAST: clockid_t = 12;
+pub const CLOCK_SECOND: clockid_t = 13;
+pub const CLOCK_THREAD_CPUTIME_ID: clockid_t = 14;
+pub const CLOCK_PROCESS_CPUTIME_ID: clockid_t = 15;
 
 pub const CTL_UNSPEC: ::c_int = 0;
 pub const CTL_KERN: ::c_int = 1;
 pub const CTL_VM: ::c_int = 2;
 pub const CTL_VFS: ::c_int = 3;
 pub const CTL_NET: ::c_int = 4;
 pub const CTL_DEBUG: ::c_int = 5;
 pub const CTL_HW: ::c_int = 6;
@@ -335,17 +297,16 @@ pub const CTL_P1003_1B_MAXID: ::c_int = 
 
 pub const EVFILT_READ: ::int16_t = -1;
 pub const EVFILT_WRITE: ::int16_t = -2;
 pub const EVFILT_AIO: ::int16_t = -3;
 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_EXCEPT: ::int16_t = -8;
 pub const EVFILT_USER: ::int16_t = -9;
 pub const EVFILT_FS: ::int16_t = -10;
 
 pub const EV_ADD: ::uint16_t = 0x1;
 pub const EV_DELETE: ::uint16_t = 0x2;
 pub const EV_ENABLE: ::uint16_t = 0x4;
 pub const EV_DISABLE: ::uint16_t = 0x8;
 pub const EV_ONESHOT: ::uint16_t = 0x10;
@@ -381,241 +342,16 @@ pub const NOTE_PDATAMASK: ::uint32_t = 0
 pub const NOTE_PCTRLMASK: ::uint32_t = 0xf0000000;
 pub const NOTE_TRACK: ::uint32_t = 0x00000001;
 pub const NOTE_TRACKERR: ::uint32_t = 0x00000002;
 pub const NOTE_CHILD: ::uint32_t = 0x00000004;
 
 pub const SO_SNDSPACE: ::c_int = 0x100a;
 pub const SO_CPUHINT: ::c_int = 0x1030;
 
-//
-// sys/netinet/in.h
-// Protocols (RFC 1700)
-// NOTE: These are in addition to the constants defined in src/unix/mod.rs
-
-// IPPROTO_IP defined in src/unix/mod.rs
-/// IP6 hop-by-hop options
-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)
-pub const IPPROTO_GGP: ::c_int = 3;
-/// for compatibility
-pub const IPPROTO_IPIP: ::c_int = 4;
-// IPPROTO_TCP defined in src/unix/mod.rs
-/// Stream protocol II.
-pub const IPPROTO_ST: ::c_int = 7;
-/// exterior gateway protocol
-pub const IPPROTO_EGP: ::c_int = 8;
-/// private interior gateway
-pub const IPPROTO_PIGP: ::c_int = 9;
-/// BBN RCC Monitoring
-pub const IPPROTO_RCCMON: ::c_int = 10;
-/// network voice protocol
-pub const IPPROTO_NVPII: ::c_int = 11;
-/// pup
-pub const IPPROTO_PUP: ::c_int = 12;
-/// Argus
-pub const IPPROTO_ARGUS: ::c_int = 13;
-/// EMCON
-pub const IPPROTO_EMCON: ::c_int = 14;
-/// Cross Net Debugger
-pub const IPPROTO_XNET: ::c_int = 15;
-/// Chaos
-pub const IPPROTO_CHAOS: ::c_int = 16;
-// IPPROTO_UDP defined in src/unix/mod.rs
-/// Multiplexing
-pub const IPPROTO_MUX: ::c_int = 18;
-/// DCN Measurement Subsystems
-pub const IPPROTO_MEAS: ::c_int = 19;
-/// Host Monitoring
-pub const IPPROTO_HMP: ::c_int = 20;
-/// Packet Radio Measurement
-pub const IPPROTO_PRM: ::c_int = 21;
-/// xns idp
-pub const IPPROTO_IDP: ::c_int = 22;
-/// Trunk-1
-pub const IPPROTO_TRUNK1: ::c_int = 23;
-/// Trunk-2
-pub const IPPROTO_TRUNK2: ::c_int = 24;
-/// Leaf-1
-pub const IPPROTO_LEAF1: ::c_int = 25;
-/// Leaf-2
-pub const IPPROTO_LEAF2: ::c_int = 26;
-/// Reliable Data
-pub const IPPROTO_RDP: ::c_int = 27;
-/// Reliable Transaction
-pub const IPPROTO_IRTP: ::c_int = 28;
-/// tp-4 w/ class negotiation
-pub const IPPROTO_TP: ::c_int = 29;
-/// Bulk Data Transfer
-pub const IPPROTO_BLT: ::c_int = 30;
-/// Network Services
-pub const IPPROTO_NSP: ::c_int = 31;
-/// Merit Internodal
-pub const IPPROTO_INP: ::c_int = 32;
-/// Sequential Exchange
-pub const IPPROTO_SEP: ::c_int = 33;
-/// Third Party Connect
-pub const IPPROTO_3PC: ::c_int = 34;
-/// InterDomain Policy Routing
-pub const IPPROTO_IDPR: ::c_int = 35;
-/// XTP
-pub const IPPROTO_XTP: ::c_int = 36;
-/// Datagram Delivery
-pub const IPPROTO_DDP: ::c_int = 37;
-/// Control Message Transport
-pub const IPPROTO_CMTP: ::c_int = 38;
-/// TP++ Transport
-pub const IPPROTO_TPXX: ::c_int = 39;
-/// IL transport protocol
-pub const IPPROTO_IL: ::c_int = 40;
-// IPPROTO_IPV6 defined in src/unix/mod.rs
-/// Source Demand Routing
-pub const IPPROTO_SDRP: ::c_int = 42;
-/// IP6 routing header
-pub const IPPROTO_ROUTING: ::c_int = 43;
-/// IP6 fragmentation header
-pub const IPPROTO_FRAGMENT: ::c_int = 44;
-/// InterDomain Routing
-pub const IPPROTO_IDRP: ::c_int = 45;
-/// resource reservation
-pub const IPPROTO_RSVP: ::c_int = 46;
-/// General Routing Encap.
-pub const IPPROTO_GRE: ::c_int = 47;
-/// Mobile Host Routing
-pub const IPPROTO_MHRP: ::c_int = 48;
-/// BHA
-pub const IPPROTO_BHA: ::c_int = 49;
-/// IP6 Encap Sec. Payload
-pub const IPPROTO_ESP: ::c_int = 50;
-/// IP6 Auth Header
-pub const IPPROTO_AH: ::c_int = 51;
-/// Integ. Net Layer Security
-pub const IPPROTO_INLSP: ::c_int = 52;
-/// IP with encryption
-pub const IPPROTO_SWIPE: ::c_int = 53;
-/// Next Hop Resolution
-pub const IPPROTO_NHRP: ::c_int = 54;
-/// IP Mobility
-pub const IPPROTO_MOBILE: ::c_int = 55;
-/// Transport Layer Security
-pub const IPPROTO_TLSP: ::c_int = 56;
-/// SKIP
-pub const IPPROTO_SKIP: ::c_int = 57;
-// IPPROTO_ICMPV6 defined in src/unix/mod.rs
-/// IP6 no next header
-pub const IPPROTO_NONE: ::c_int = 59;
-/// IP6 destination option
-pub const IPPROTO_DSTOPTS: ::c_int = 60;
-/// any host internal protocol
-pub const IPPROTO_AHIP: ::c_int = 61;
-/// CFTP
-pub const IPPROTO_CFTP: ::c_int = 62;
-/// "hello" routing protocol
-pub const IPPROTO_HELLO: ::c_int = 63;
-/// SATNET/Backroom EXPAK
-pub const IPPROTO_SATEXPAK: ::c_int = 64;
-/// Kryptolan
-pub const IPPROTO_KRYPTOLAN: ::c_int = 65;
-/// Remote Virtual Disk
-pub const IPPROTO_RVD: ::c_int = 66;
-/// Pluribus Packet Core
-pub const IPPROTO_IPPC: ::c_int = 67;
-/// Any distributed FS
-pub const IPPROTO_ADFS: ::c_int = 68;
-/// Satnet Monitoring
-pub const IPPROTO_SATMON: ::c_int = 69;
-/// VISA Protocol
-pub const IPPROTO_VISA: ::c_int = 70;
-/// Packet Core Utility
-pub const IPPROTO_IPCV: ::c_int = 71;
-/// Comp. Prot. Net. Executive
-pub const IPPROTO_CPNX: ::c_int = 72;
-/// Comp. Prot. HeartBeat
-pub const IPPROTO_CPHB: ::c_int = 73;
-/// Wang Span Network
-pub const IPPROTO_WSN: ::c_int = 74;
-/// Packet Video Protocol
-pub const IPPROTO_PVP: ::c_int = 75;
-/// BackRoom SATNET Monitoring
-pub const IPPROTO_BRSATMON: ::c_int = 76;
-/// Sun net disk proto (temp.)
-pub const IPPROTO_ND: ::c_int = 77;
-/// WIDEBAND Monitoring
-pub const IPPROTO_WBMON: ::c_int = 78;
-/// WIDEBAND EXPAK
-pub const IPPROTO_WBEXPAK: ::c_int = 79;
-/// ISO cnlp
-pub const IPPROTO_EON: ::c_int = 80;
-/// VMTP
-pub const IPPROTO_VMTP: ::c_int = 81;
-/// Secure VMTP
-pub const IPPROTO_SVMTP: ::c_int = 82;
-/// Banyon VINES
-pub const IPPROTO_VINES: ::c_int = 83;
-/// TTP
-pub const IPPROTO_TTP: ::c_int = 84;
-/// NSFNET-IGP
-pub const IPPROTO_IGP: ::c_int = 85;
-/// dissimilar gateway prot.
-pub const IPPROTO_DGP: ::c_int = 86;
-/// TCF
-pub const IPPROTO_TCF: ::c_int = 87;
-/// Cisco/GXS IGRP
-pub const IPPROTO_IGRP: ::c_int = 88;
-/// OSPFIGP
-pub const IPPROTO_OSPFIGP: ::c_int = 89;
-/// Strite RPC protocol
-pub const IPPROTO_SRPC: ::c_int = 90;
-/// Locus Address Resoloution
-pub const IPPROTO_LARP: ::c_int = 91;
-/// Multicast Transport
-pub const IPPROTO_MTP: ::c_int = 92;
-/// AX.25 Frames
-pub const IPPROTO_AX25: ::c_int = 93;
-/// IP encapsulated in IP
-pub const IPPROTO_IPEIP: ::c_int = 94;
-/// Mobile Int.ing control
-pub const IPPROTO_MICP: ::c_int = 95;
-/// Semaphore Comm. security
-pub const IPPROTO_SCCSP: ::c_int = 96;
-/// Ethernet IP encapsulation
-pub const IPPROTO_ETHERIP: ::c_int = 97;
-/// encapsulation header
-pub const IPPROTO_ENCAP: ::c_int = 98;
-/// any private encr. scheme
-pub const IPPROTO_APES: ::c_int = 99;
-/// GMTP
-pub const IPPROTO_GMTP: ::c_int = 100;
-/// payload compression (IPComp)
-pub const IPPROTO_IPCOMP: ::c_int = 108;
-
-/* 101-254: Partly Unassigned */
-/// Protocol Independent Mcast
-pub const IPPROTO_PIM: ::c_int = 103;
-/// CARP
-pub const IPPROTO_CARP: ::c_int = 112;
-/// PGM
-pub const IPPROTO_PGM: ::c_int = 113;
-/// PFSYNC
-pub const IPPROTO_PFSYNC: ::c_int = 240;
-
-/* 255: Reserved */
-/* BSD Private, local use, namespace incursion, no longer used */
-/// divert pseudo-protocol
-pub const IPPROTO_DIVERT: ::c_int = 254;
-pub const IPPROTO_MAX: ::c_int = 256;
-/// last return value of *_input(), meaning "all job for this pkt is done".
-pub const IPPROTO_DONE: ::c_int = 257;
-
-/// Used by RSS: the layer3 protocol is unknown
-pub const IPPROTO_UNKNOWN: ::c_int = 258;
-
 pub const AF_BLUETOOTH: ::c_int = 33;
 pub const AF_MPLS: ::c_int = 34;
 pub const AF_IEEE80211: ::c_int = 35;
 pub const AF_MAX: ::c_int = 36;
 
 pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
 pub const PF_MAX: ::c_int = AF_MAX;
 
@@ -663,41 +399,22 @@ pub const LC_ALL_MASK: ::c_int = LC_COLL
 pub const TIOCSIG: ::c_uint = 0x2000745f;
 pub const BTUARTDISC: ::c_int = 0x7;
 pub const TIOCDCDTIMESTAMP: ::c_uint = 0x40107458;
 pub const TIOCISPTMASTER: ::c_uint = 0x20007455;
 pub const TIOCMODG: ::c_uint = 0x40047403;
 pub const TIOCMODS: ::c_ulong = 0x80047404;
 pub const TIOCREMOTE: ::c_ulong = 0x80047469;
 
-// Constants used by "at" family of system calls.
-pub const AT_FDCWD:            ::c_int = 0xFFFAFDCD; // invalid file descriptor
-pub const AT_SYMLINK_NOFOLLOW: ::c_int = 1;
-pub const AT_REMOVEDIR:        ::c_int = 2;
-pub const AT_EACCESS:          ::c_int = 4;
-pub const AT_SYMLINK_FOLLOW:   ::c_int = 8;
-
-pub const VCHECKPT: usize = 19;
-
-pub const _PC_2_SYMLINKS: ::c_int = 22;
-pub const _PC_TIMESTAMP_RESOLUTION: ::c_int = 23;
-
-pub const _SC_V7_ILP32_OFF32: ::c_int = 122;
-pub const _SC_V7_ILP32_OFFBIG: ::c_int = 123;
-pub const _SC_V7_LP64_OFF64: ::c_int = 124;
-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;
-
 extern {
     pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
                     -> ::c_int;
-    pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
-    pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
-    pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int;
+    pub fn clock_getres(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
+    pub fn clock_gettime(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
+    pub fn clock_settime(clk_id: clockid_t, tp: *const ::timespec) -> ::c_int;
 
     pub fn setutxdb(_type: ::c_uint, file: *mut ::c_char) -> ::c_int;
 
     pub fn aio_waitcomplete(iocbp: *mut *mut aiocb,
                             timeout: *mut ::timespec) -> ::c_int;
 
     pub fn freelocale(loc: ::locale_t);
 }
--- a/third_party/rust/libc/src/unix/bsd/freebsdlike/freebsd/aarch64.rs
+++ b/third_party/rust/libc/src/unix/bsd/freebsdlike/freebsd/aarch64.rs
@@ -23,10 +23,8 @@ s! {
         pub st_blksize: ::blksize_t,
         pub st_flags: ::fflags_t,
         pub st_gen: ::uint32_t,
         pub st_lspare: ::int32_t,
         pub st_birthtime: ::time_t,
         pub st_birthtime_nsec: ::c_long,
     }
 }
-
-pub const MAP_32BIT: ::c_int = 0x00080000;
--- a/third_party/rust/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs
+++ b/third_party/rust/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs
@@ -122,39 +122,28 @@ s! {
         pub shm_segsz: ::size_t,
         pub shm_lpid: ::pid_t,
         pub shm_cpid: ::pid_t,
         pub shm_nattch: ::c_int,
         pub shm_atime: ::time_t,
         pub shm_dtime: ::time_t,
         pub shm_ctime: ::time_t,
     }
-
-    pub struct xucred {
-        pub cr_version: ::c_uint,
-        pub cr_uid: ::uid_t,
-        pub cr_ngroups: ::c_short,
-        pub cr_groups: [::gid_t;16],
-        __cr_unused1: *mut ::c_void,
-    }
 }
 
 pub const SIGEV_THREAD_ID: ::c_int = 4;
 
 pub const RAND_MAX: ::c_int = 0x7fff_fffd;
 pub const PTHREAD_STACK_MIN: ::size_t = 2048;
 pub const PTHREAD_MUTEX_ADAPTIVE_NP: ::c_int = 4;
 pub const SIGSTKSZ: ::size_t = 34816;
 pub const SF_NODISKIO: ::c_int = 0x00000001;
 pub const SF_MNOWAIT: ::c_int = 0x00000002;
 pub const SF_SYNC: ::c_int = 0x00000004;
 pub const O_CLOEXEC: ::c_int = 0x00100000;
-pub const O_DIRECTORY: ::c_int = 0x00020000;
-pub const O_EXEC: ::c_int = 0x00040000;
-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 ELAST: ::c_int = 96;
 pub const RLIMIT_NPTS: ::c_int = 11;
 pub const RLIMIT_SWAP: ::c_int = 12;
 pub const RLIM_NLIMITS: ::rlim_t = 13;
 
@@ -163,18 +152,16 @@ pub const Q_SETQUOTA: ::c_int = 0x800;
 
 pub const POSIX_FADV_NORMAL: ::c_int = 0;
 pub const POSIX_FADV_RANDOM: ::c_int = 1;
 pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2;
 pub const POSIX_FADV_WILLNEED: ::c_int = 3;
 pub const POSIX_FADV_DONTNEED: ::c_int = 4;
 pub const POSIX_FADV_NOREUSE: ::c_int = 5;
 
-pub const POLLINIGNEOF: ::c_short = 0x2000;
-
 pub const EVFILT_READ: ::int16_t = -1;
 pub const EVFILT_WRITE: ::int16_t = -2;
 pub const EVFILT_AIO: ::int16_t = -3;
 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_FS: ::int16_t = -9;
@@ -221,30 +208,30 @@ pub const NOTE_CHILD: ::uint32_t = 0x000
 pub const NOTE_SECONDS: ::uint32_t = 0x00000001;
 pub const NOTE_MSECONDS: ::uint32_t = 0x00000002;
 pub const NOTE_USECONDS: ::uint32_t = 0x00000004;
 pub const NOTE_NSECONDS: ::uint32_t = 0x00000008;
 
 pub const MADV_PROTECT: ::c_int = 10;
 pub const RUSAGE_THREAD: ::c_int = 1;
 
-pub const CLOCK_REALTIME: ::clockid_t = 0;
-pub const CLOCK_VIRTUAL: ::clockid_t = 1;
-pub const CLOCK_PROF: ::clockid_t = 2;
-pub const CLOCK_MONOTONIC: ::clockid_t = 4;
-pub const CLOCK_UPTIME: ::clockid_t = 5;
-pub const CLOCK_UPTIME_PRECISE: ::clockid_t = 7;
-pub const CLOCK_UPTIME_FAST: ::clockid_t = 8;
-pub const CLOCK_REALTIME_PRECISE: ::clockid_t = 9;
-pub const CLOCK_REALTIME_FAST: ::clockid_t = 10;
-pub const CLOCK_MONOTONIC_PRECISE: ::clockid_t = 11;
-pub const CLOCK_MONOTONIC_FAST: ::clockid_t = 12;
-pub const CLOCK_SECOND: ::clockid_t = 13;
-pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 14;
-pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 15;
+pub const CLOCK_REALTIME: clockid_t = 0;
+pub const CLOCK_VIRTUAL: clockid_t = 1;
+pub const CLOCK_PROF: clockid_t = 2;
+pub const CLOCK_MONOTONIC: clockid_t = 4;
+pub const CLOCK_UPTIME: clockid_t = 5;
+pub const CLOCK_UPTIME_PRECISE: clockid_t = 7;
+pub const CLOCK_UPTIME_FAST: clockid_t = 8;
+pub const CLOCK_REALTIME_PRECISE: clockid_t = 9;
+pub const CLOCK_REALTIME_FAST: clockid_t = 10;
+pub const CLOCK_MONOTONIC_PRECISE: clockid_t = 11;
+pub const CLOCK_MONOTONIC_FAST: clockid_t = 12;
+pub const CLOCK_SECOND: clockid_t = 13;
+pub const CLOCK_THREAD_CPUTIME_ID: clockid_t = 14;
+pub const CLOCK_PROCESS_CPUTIME_ID: clockid_t = 15;
 
 pub const CTL_UNSPEC: ::c_int = 0;
 pub const CTL_KERN: ::c_int = 1;
 pub const CTL_VM: ::c_int = 2;
 pub const CTL_VFS: ::c_int = 3;
 pub const CTL_NET: ::c_int = 4;
 pub const CTL_DEBUG: ::c_int = 5;
 pub const CTL_HW: ::c_int = 6;
@@ -405,271 +392,27 @@ pub const SO_LISTENQLIMIT: ::c_int = 0x1
 pub const SO_LISTENQLEN: ::c_int = 0x1012;
 pub const SO_LISTENINCQLEN: ::c_int = 0x1013;
 pub const SO_SETFIB: ::c_int = 0x1014;
 pub const SO_USER_COOKIE: ::c_int = 0x1015;
 pub const SO_PROTOCOL: ::c_int = 0x1016;
 pub const SO_PROTOTYPE: ::c_int = SO_PROTOCOL;
 pub const SO_VENDOR: ::c_int = 0x80000000;
 
-pub const LOCAL_PEERCRED: ::c_int = 1;
-pub const LOCAL_CREDS: ::c_int = 2;
-pub const LOCAL_CONNWAIT: ::c_int = 4;
-pub const LOCAL_VENDOR: ::c_int = SO_VENDOR;
-
 pub const AF_SLOW: ::c_int = 33;
 pub const AF_SCLUSTER: ::c_int = 34;
 pub const AF_ARP: ::c_int = 35;
 pub const AF_BLUETOOTH: ::c_int = 36;
 pub const AF_IEEE80211: ::c_int = 37;
 pub const AF_INET_SDP: ::c_int = 40;
 pub const AF_INET6_SDP: ::c_int = 42;
 #[doc(hidden)]
 pub const AF_MAX: ::c_int = 42;
 
-// sys/netinet/in.h
-// Protocols (RFC 1700)
-// NOTE: These are in addition to the constants defined in src/unix/mod.rs
-
-// IPPROTO_IP defined in src/unix/mod.rs
-/// IP6 hop-by-hop options
-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)
-pub const IPPROTO_GGP: ::c_int = 3;
-/// for compatibility
-pub const IPPROTO_IPIP: ::c_int = 4;
-// IPPROTO_TCP defined in src/unix/mod.rs
-/// Stream protocol II.
-pub const IPPROTO_ST: ::c_int = 7;
-/// exterior gateway protocol
-pub const IPPROTO_EGP: ::c_int = 8;
-/// private interior gateway
-pub const IPPROTO_PIGP: ::c_int = 9;
-/// BBN RCC Monitoring
-pub const IPPROTO_RCCMON: ::c_int = 10;
-/// network voice protocol
-pub const IPPROTO_NVPII: ::c_int = 11;
-/// pup
-pub const IPPROTO_PUP: ::c_int = 12;
-/// Argus
-pub const IPPROTO_ARGUS: ::c_int = 13;
-/// EMCON
-pub const IPPROTO_EMCON: ::c_int = 14;
-/// Cross Net Debugger
-pub const IPPROTO_XNET: ::c_int = 15;
-/// Chaos
-pub const IPPROTO_CHAOS: ::c_int = 16;
-// IPPROTO_UDP defined in src/unix/mod.rs
-/// Multiplexing
-pub const IPPROTO_MUX: ::c_int = 18;
-/// DCN Measurement Subsystems
-pub const IPPROTO_MEAS: ::c_int = 19;
-/// Host Monitoring
-pub const IPPROTO_HMP: ::c_int = 20;
-/// Packet Radio Measurement
-pub const IPPROTO_PRM: ::c_int = 21;
-/// xns idp
-pub const IPPROTO_IDP: ::c_int = 22;
-/// Trunk-1
-pub const IPPROTO_TRUNK1: ::c_int = 23;
-/// Trunk-2
-pub const IPPROTO_TRUNK2: ::c_int = 24;
-/// Leaf-1
-pub const IPPROTO_LEAF1: ::c_int = 25;
-/// Leaf-2
-pub const IPPROTO_LEAF2: ::c_int = 26;
-/// Reliable Data
-pub const IPPROTO_RDP: ::c_int = 27;
-/// Reliable Transaction
-pub const IPPROTO_IRTP: ::c_int = 28;
-/// tp-4 w/ class negotiation
-pub const IPPROTO_TP: ::c_int = 29;
-/// Bulk Data Transfer
-pub const IPPROTO_BLT: ::c_int = 30;
-/// Network Services
-pub const IPPROTO_NSP: ::c_int = 31;
-/// Merit Internodal
-pub const IPPROTO_INP: ::c_int = 32;
-/// Sequential Exchange
-pub const IPPROTO_SEP: ::c_int = 33;
-/// Third Party Connect
-pub const IPPROTO_3PC: ::c_int = 34;
-/// InterDomain Policy Routing
-pub const IPPROTO_IDPR: ::c_int = 35;
-/// XTP
-pub const IPPROTO_XTP: ::c_int = 36;
-/// Datagram Delivery
-pub const IPPROTO_DDP: ::c_int = 37;
-/// Control Message Transport
-pub const IPPROTO_CMTP: ::c_int = 38;
-/// TP++ Transport
-pub const IPPROTO_TPXX: ::c_int = 39;
-/// IL transport protocol
-pub const IPPROTO_IL: ::c_int = 40;
-// IPPROTO_IPV6 defined in src/unix/mod.rs
-/// Source Demand Routing
-pub const IPPROTO_SDRP: ::c_int = 42;
-/// IP6 routing header
-pub const IPPROTO_ROUTING: ::c_int = 43;
-/// IP6 fragmentation header
-pub const IPPROTO_FRAGMENT: ::c_int = 44;
-/// InterDomain Routing
-pub const IPPROTO_IDRP: ::c_int = 45;
-/// resource reservation
-pub const IPPROTO_RSVP: ::c_int = 46;
-/// General Routing Encap.
-pub const IPPROTO_GRE: ::c_int = 47;
-/// Mobile Host Routing
-pub const IPPROTO_MHRP: ::c_int = 48;
-/// BHA
-pub const IPPROTO_BHA: ::c_int = 49;
-/// IP6 Encap Sec. Payload
-pub const IPPROTO_ESP: ::c_int = 50;
-/// IP6 Auth Header
-pub const IPPROTO_AH: ::c_int = 51;
-/// Integ. Net Layer Security
-pub const IPPROTO_INLSP: ::c_int = 52;
-/// IP with encryption
-pub const IPPROTO_SWIPE: ::c_int = 53;
-/// Next Hop Resolution
-pub const IPPROTO_NHRP: ::c_int = 54;
-/// IP Mobility
-pub const IPPROTO_MOBILE: ::c_int = 55;
-/// Transport Layer Security
-pub const IPPROTO_TLSP: ::c_int = 56;
-/// SKIP
-pub const IPPROTO_SKIP: ::c_int = 57;
-// IPPROTO_ICMPV6 defined in src/unix/mod.rs
-/// IP6 no next header
-pub const IPPROTO_NONE: ::c_int = 59;
-/// IP6 destination option
-pub const IPPROTO_DSTOPTS: ::c_int = 60;
-/// any host internal protocol
-pub const IPPROTO_AHIP: ::c_int = 61;
-/// CFTP
-pub const IPPROTO_CFTP: ::c_int = 62;
-/// "hello" routing protocol
-pub const IPPROTO_HELLO: ::c_int = 63;
-/// SATNET/Backroom EXPAK
-pub const IPPROTO_SATEXPAK: ::c_int = 64;
-/// Kryptolan
-pub const IPPROTO_KRYPTOLAN: ::c_int = 65;
-/// Remote Virtual Disk
-pub const IPPROTO_RVD: ::c_int = 66;
-/// Pluribus Packet Core
-pub const IPPROTO_IPPC: ::c_int = 67;
-/// Any distributed FS
-pub const IPPROTO_ADFS: ::c_int = 68;
-/// Satnet Monitoring
-pub const IPPROTO_SATMON: ::c_int = 69;
-/// VISA Protocol
-pub const IPPROTO_VISA: ::c_int = 70;
-/// Packet Core Utility
-pub const IPPROTO_IPCV: ::c_int = 71;
-/// Comp. Prot. Net. Executive
-pub const IPPROTO_CPNX: ::c_int = 72;
-/// Comp. Prot. HeartBeat
-pub const IPPROTO_CPHB: ::c_int = 73;
-/// Wang Span Network
-pub const IPPROTO_WSN: ::c_int = 74;
-/// Packet Video Protocol
-pub const IPPROTO_PVP: ::c_int = 75;
-/// BackRoom SATNET Monitoring
-pub const IPPROTO_BRSATMON: ::c_int = 76;
-/// Sun net disk proto (temp.)
-pub const IPPROTO_ND: ::c_int = 77;
-/// WIDEBAND Monitoring
-pub const IPPROTO_WBMON: ::c_int = 78;
-/// WIDEBAND EXPAK
-pub const IPPROTO_WBEXPAK: ::c_int = 79;
-/// ISO cnlp
-pub const IPPROTO_EON: ::c_int = 80;
-/// VMTP
-pub const IPPROTO_VMTP: ::c_int = 81;
-/// Secure VMTP
-pub const IPPROTO_SVMTP: ::c_int = 82;
-/// Banyon VINES
-pub const IPPROTO_VINES: ::c_int = 83;
-/// TTP
-pub const IPPROTO_TTP: ::c_int = 84;
-/// NSFNET-IGP
-pub const IPPROTO_IGP: ::c_int = 85;
-/// dissimilar gateway prot.
-pub const IPPROTO_DGP: ::c_int = 86;
-/// TCF
-pub const IPPROTO_TCF: ::c_int = 87;
-/// Cisco/GXS IGRP
-pub const IPPROTO_IGRP: ::c_int = 88;
-/// OSPFIGP
-pub const IPPROTO_OSPFIGP: ::c_int = 89;
-/// Strite RPC protocol
-pub const IPPROTO_SRPC: ::c_int = 90;
-/// Locus Address Resoloution
-pub const IPPROTO_LARP: ::c_int = 91;
-/// Multicast Transport
-pub const IPPROTO_MTP: ::c_int = 92;
-/// AX.25 Frames
-pub const IPPROTO_AX25: ::c_int = 93;
-/// IP encapsulated in IP
-pub const IPPROTO_IPEIP: ::c_int = 94;
-/// Mobile Int.ing control
-pub const IPPROTO_MICP: ::c_int = 95;
-/// Semaphore Comm. security
-pub const IPPROTO_SCCSP: ::c_int = 96;
-/// Ethernet IP encapsulation
-pub const IPPROTO_ETHERIP: ::c_int = 97;
-/// encapsulation header
-pub const IPPROTO_ENCAP: ::c_int = 98;
-/// any private encr. scheme
-pub const IPPROTO_APES: ::c_int = 99;
-/// GMTP
-pub const IPPROTO_GMTP: ::c_int = 100;
-/// payload compression (IPComp)
-pub const IPPROTO_IPCOMP: ::c_int = 108;
-/// SCTP
-pub const IPPROTO_SCTP: ::c_int = 132;
-/// IPv6 Mobility Header
-pub const IPPROTO_MH: ::c_int = 135;
-/// UDP-Lite
-pub const IPPROTO_UDPLITE: ::c_int = 136;
-/// IP6 Host Identity Protocol
-pub const IPPROTO_HIP: ::c_int = 139;
-/// IP6 Shim6 Protocol
-pub const IPPROTO_SHIM6: ::c_int = 140;
-
-/* 101-254: Partly Unassigned */
-/// Protocol Independent Mcast
-pub const IPPROTO_PIM: ::c_int = 103;
-/// CARP
-pub const IPPROTO_CARP: ::c_int = 112;
-/// PGM
-pub const IPPROTO_PGM: ::c_int = 113;
-/// MPLS-in-IP
-pub const IPPROTO_MPLS: ::c_int = 137;
-/// PFSYNC
-pub const IPPROTO_PFSYNC: ::c_int = 240;
-
-/* 255: Reserved */
-/* BSD Private, local use, namespace incursion, no longer used */
-/// OLD divert pseudo-proto
-pub const IPPROTO_OLD_DIVERT: ::c_int = 254;
-pub const IPPROTO_MAX: ::c_int = 256;
-/// last return value of *_input(), meaning "all job for this pkt is done".
-pub const IPPROTO_DONE: ::c_int = 257;
-
-/* Only used internally, so can be outside the range of valid IP protocols. */
-/// divert pseudo-protocol
 pub const IPPROTO_DIVERT: ::c_int = 258;
-/// SeND pseudo-protocol
-pub const IPPROTO_SEND: ::c_int = 259;
-
-pub const IP_BINDANY: ::c_int = 24;
 
 pub const PF_SLOW: ::c_int = AF_SLOW;
 pub const PF_SCLUSTER: ::c_int = AF_SCLUSTER;
 pub const PF_ARP: ::c_int = AF_ARP;
 pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
 pub const PF_IEEE80211: ::c_int = AF_IEEE80211;
 pub const PF_INET_SDP: ::c_int = AF_INET_SDP;
 pub const PF_INET6_SDP: ::c_int = AF_INET6_SDP;
@@ -760,42 +503,25 @@ pub const WTRAPPED: ::c_int = 32;
 // standardized ones.
 pub const P_PID: idtype_t = 0;
 pub const P_PGID: idtype_t = 2;
 pub const P_ALL: idtype_t = 7;
 
 pub const B460800: ::speed_t = 460800;
 pub const B921600: ::speed_t = 921600;
 
-pub const AT_FDCWD: ::c_int = -100;
-pub const AT_EACCESS: ::c_int = 0x100;
-pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x200;
-pub const AT_SYMLINK_FOLLOW: ::c_int = 0x400;
-pub const AT_REMOVEDIR: ::c_int = 0x800;
-
-pub const TABDLY: ::tcflag_t = 0x00000004;
-pub const TAB0: ::tcflag_t = 0x00000000;
-pub const TAB3: ::tcflag_t = 0x00000004;
-
-pub const _PC_ACL_NFS4: ::c_int = 64;
-
-pub const _SC_CPUSET_SIZE: ::c_int = 122;
-
-pub const XU_NGROUPS: ::c_int = 16;
-pub const XUCRED_VERSION: ::c_uint = 0;
-
 extern {
     pub fn __error() -> *mut ::c_int;
 
     pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int)
                     -> ::c_int;
 
-    pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
-    pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
-    pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int;
+    pub fn clock_getres(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
+    pub fn clock_gettime(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
+    pub fn clock_settime(clk_id: clockid_t, tp: *const ::timespec) -> ::c_int;
 
     pub fn jail(jail: *mut ::jail) -> ::c_int;
     pub fn jail_attach(jid: ::c_int) -> ::c_int;
     pub fn jail_remove(jid: ::c_int) -> ::c_int;
     pub fn jail_get(iov: *mut ::iovec, niov: ::c_uint, flags: ::c_int)
                     -> ::c_int;
     pub fn jail_set(iov: *mut ::iovec, niov: ::c_uint, flags: ::c_int)
                     -> ::c_int;
@@ -828,17 +554,16 @@ extern {
         buf: *mut ::shmid_ds) -> ::c_int;
     pub fn msgctl(msqid: ::c_int, cmd: ::c_int,
         buf: *mut ::msqid_ds) -> ::c_int;
     pub fn msgget(key: ::key_t, msgflg: ::c_int) -> ::c_int;
     pub fn msgrcv(msqid: ::c_int, msgp: *mut ::c_void, msgsz: ::size_t,
         msgtyp: ::c_long, msgflg: ::c_int) -> ::c_int;
     pub fn msgsnd(msqid: ::c_int, msgp: *const ::c_void, msgsz: ::size_t,
         msgflg: ::c_int) -> ::c_int;
-    pub fn cfmakesane(termios: *mut ::termios);
 }
 
 cfg_if! {
     if #[cfg(target_arch = "x86")] {
         mod x86;
         pub use self::x86::*;
     } else if #[cfg(target_arch = "x86_64")] {
         mod x86_64;
--- a/third_party/rust/libc/src/unix/bsd/freebsdlike/freebsd/x86_64.rs
+++ b/third_party/rust/libc/src/unix/bsd/freebsdlike/freebsd/x86_64.rs
@@ -23,10 +23,8 @@ s! {
         pub st_blksize: ::blksize_t,
         pub st_flags: ::fflags_t,
         pub st_gen: ::uint32_t,
         pub st_lspare: ::int32_t,
         pub st_birthtime: ::time_t,
         pub st_birthtime_nsec: ::c_long,
     }
 }
-
-pub const MAP_32BIT: ::c_int = 0x00080000;
--- a/third_party/rust/libc/src/unix/bsd/freebsdlike/mod.rs
+++ b/third_party/rust/libc/src/unix/bsd/freebsdlike/mod.rs
@@ -2,17 +2,16 @@ 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 pthread_mutex_t = *mut ::c_void;
 pub type pthread_mutexattr_t = *mut ::c_void;
 pub type pthread_cond_t = *mut ::c_void;
 pub type pthread_condattr_t = *mut ::c_void;
 pub type pthread_rwlock_t = *mut ::c_void;
-pub type pthread_rwlockattr_t = *mut ::c_void;
 pub type pthread_key_t = ::c_int;
 pub type tcflag_t = ::c_uint;
 pub type speed_t = ::c_uint;
 pub type nl_item = ::c_int;
 pub type id_t = i64;
 
 pub enum timezone {}
 
@@ -259,30 +258,34 @@ pub const ALTMON_11: ::nl_item = 68;
 pub const ALTMON_12: ::nl_item = 69;
 
 pub const EXIT_FAILURE: ::c_int = 1;
 pub const EXIT_SUCCESS: ::c_int = 0;
 pub const EOF: ::c_int = -1;
 pub const SEEK_SET: ::c_int = 0;
 pub const SEEK_CUR: ::c_int = 1;
 pub const SEEK_END: ::c_int = 2;
-pub const SEEK_DATA: ::c_int = 3;
-pub const SEEK_HOLE: ::c_int = 4;
 pub const _IOFBF: ::c_int = 0;
 pub const _IONBF: ::c_int = 2;
 pub const _IOLBF: ::c_int = 1;
 pub const BUFSIZ: ::c_uint = 1024;
 pub const FOPEN_MAX: ::c_uint = 20;
 pub const FILENAME_MAX: ::c_uint = 1024;
 pub const L_tmpnam: ::c_uint = 1024;
 pub const TMP_MAX: ::c_uint = 308915776;
 
+pub const O_RDONLY: ::c_int = 0;
+pub const O_WRONLY: ::c_int = 1;
+pub const O_RDWR: ::c_int = 2;
+pub const O_ACCMODE: ::c_int = 3;
+pub const O_APPEND: ::c_int = 8;
+pub const O_CREAT: ::c_int = 512;
+pub const O_EXCL: ::c_int = 2048;
 pub const O_NOCTTY: ::c_int = 32768;
-pub const O_DIRECT: ::c_int = 0x00010000;
-
+pub const O_TRUNC: ::c_int = 1024;
 pub const S_IFIFO: mode_t = 4096;
 pub const S_IFCHR: mode_t = 8192;
 pub const S_IFBLK: mode_t = 24576;
 pub const S_IFDIR: mode_t = 16384;
 pub const S_IFREG: mode_t = 32768;
 pub const S_IFLNK: mode_t = 40960;
 pub const S_IFSOCK: mode_t = 49152;
 pub const S_IFMT: mode_t = 61440;
@@ -331,17 +334,16 @@ pub const PROT_READ: ::c_int = 1;
 pub const PROT_WRITE: ::c_int = 2;
 pub const PROT_EXEC: ::c_int = 4;
 
 pub const MAP_FILE: ::c_int = 0x0000;
 pub const MAP_SHARED: ::c_int = 0x0001;
 pub const MAP_PRIVATE: ::c_int = 0x0002;
 pub const MAP_FIXED: ::c_int = 0x0010;
 pub const MAP_ANON: ::c_int = 0x1000;
-pub const MAP_ANONYMOUS: ::c_int = MAP_ANON;
 
 pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
 
 pub const MCL_CURRENT: ::c_int = 0x0001;
 pub const MCL_FUTURE: ::c_int = 0x0002;
 
 pub const MS_SYNC: ::c_int = 0x0000;
 pub const MS_ASYNC: ::c_int = 0x0001;
@@ -437,28 +439,29 @@ pub const ECANCELED: ::c_int = 85;
 pub const EILSEQ: ::c_int = 86;
 pub const ENOATTR: ::c_int = 87;
 pub const EDOOFUS: ::c_int = 88;
 pub const EBADMSG: ::c_int = 89;
 pub const EMULTIHOP: ::c_int = 90;
 pub const ENOLINK: ::c_int = 91;
 pub const EPROTO: ::c_int = 92;
 
-pub const POLLSTANDARD: ::c_short = ::POLLIN | ::POLLPRI | ::POLLOUT |
-    ::POLLRDNORM | ::POLLRDBAND | ::POLLWRBAND | ::POLLERR |
-    ::POLLHUP | ::POLLNVAL;
-
 pub const EAI_SYSTEM: ::c_int = 11;
 
 pub const F_DUPFD: ::c_int = 0;
 pub const F_GETFD: ::c_int = 1;
 pub const F_SETFD: ::c_int = 2;
 pub const F_GETFL: ::c_int = 3;
 pub const F_SETFL: ::c_int = 4;
 
+pub const AT_EACCESS: ::c_int = 0x100;
+pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x200;
+pub const AT_SYMLINK_FOLLOW: ::c_int = 0x400;
+pub const AT_REMOVEDIR: ::c_int = 0x800;
+
 pub const SIGTRAP: ::c_int = 5;
 
 pub const GLOB_APPEND  : ::c_int = 0x0001;
 pub const GLOB_DOOFFS  : ::c_int = 0x0002;
 pub const GLOB_ERR     : ::c_int = 0x0004;
 pub const GLOB_MARK    : ::c_int = 0x0008;
 pub const GLOB_NOCHECK : ::c_int = 0x0010;
 pub const GLOB_NOSORT  : ::c_int = 0x0020;
@@ -469,18 +472,46 @@ pub const GLOB_ABORTED : ::c_int = -2;
 pub const GLOB_NOMATCH : ::c_int = -3;
 
 pub const POSIX_MADV_NORMAL: ::c_int = 0;
 pub const POSIX_MADV_RANDOM: ::c_int = 1;
 pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2;
 pub const POSIX_MADV_WILLNEED: ::c_int = 3;
 pub const POSIX_MADV_DONTNEED: ::c_int = 4;
 
-pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 0;
-pub const PTHREAD_PROCESS_SHARED: ::c_int = 1;
+pub const _SC_IOV_MAX: ::c_int = 56;
+pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 70;
+pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 71;
+pub const _SC_LOGIN_NAME_MAX: ::c_int = 73;
+pub const _SC_MQ_PRIO_MAX: ::c_int = 75;
+pub const _SC_NPROCESSORS_ONLN: ::c_int = 58;
+pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 82;
+pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 83;
+pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 85;
+pub const _SC_THREAD_KEYS_MAX: ::c_int = 86;
+pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 87;
+pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 88;
+pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 89;
+pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 90;
+pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 91;
+pub const _SC_THREAD_STACK_MIN: ::c_int = 93;
+pub const _SC_THREAD_THREADS_MAX: ::c_int = 94;
+pub const _SC_THREADS: ::c_int = 96;
+pub const _SC_TTY_NAME_MAX: ::c_int = 101;
+pub const _SC_ATEXIT_MAX: ::c_int = 107;
+pub const _SC_XOPEN_CRYPT: ::c_int = 108;
+pub const _SC_XOPEN_ENH_I18N: ::c_int = 109;
+pub const _SC_XOPEN_LEGACY: ::c_int = 110;
+pub const _SC_XOPEN_REALTIME: ::c_int = 111;
+pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 112;
+pub const _SC_XOPEN_SHM: ::c_int = 113;
+pub const _SC_XOPEN_UNIX: ::c_int = 115;
+pub const _SC_XOPEN_VERSION: ::c_int = 116;
+pub const _SC_XOPEN_XCU_VERSION: ::c_int = 117;
+
 pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0;
 pub const PTHREAD_CREATE_DETACHED: ::c_int = 1;
 
 pub const RLIMIT_CPU: ::c_int = 0;
 pub const RLIMIT_FSIZE: ::c_int = 1;
 pub const RLIMIT_DATA: ::c_int = 2;
 pub const RLIMIT_STACK: ::c_int = 3;
 pub const RLIMIT_CORE: ::c_int = 4;
@@ -593,26 +624,31 @@ pub const MSG_PEEK: ::c_int = 0x00000002
 pub const MSG_DONTROUTE: ::c_int = 0x00000004;
 pub const MSG_EOR: ::c_int =  0x00000008;
 pub const MSG_TRUNC: ::c_int = 0x00000010;
 pub const MSG_CTRUNC: ::c_int = 0x00000020;
 pub const MSG_WAITALL: ::c_int = 0x00000040;
 pub const MSG_DONTWAIT: ::c_int = 0x00000080;
 pub const MSG_EOF: ::c_int = 0x00000100;
 
-pub const SCM_TIMESTAMP: ::c_int = 0x02;
-
 pub const SOCK_STREAM: ::c_int = 1;
 pub const SOCK_DGRAM: ::c_int = 2;
 pub const SOCK_RAW: ::c_int = 3;
 pub const SOCK_RDM: ::c_int = 4;
 pub const SOCK_SEQPACKET: ::c_int = 5;
 pub const SOCK_CLOEXEC: ::c_int = 0x10000000;
 pub const SOCK_NONBLOCK: ::c_int = 0x20000000;
 pub const SOCK_MAXADDRLEN: ::c_int = 255;
+pub const IPPROTO_ICMP: ::c_int = 1;
+pub const IPPROTO_ICMPV6: ::c_int = 58;
+pub const IPPROTO_TCP: ::c_int = 6;
+pub const IPPROTO_IP: ::c_int = 0;
+pub const IPPROTO_IPV6: ::c_int = 41;
+pub const IP_MULTICAST_TTL: ::c_int = 10;
+pub const IP_MULTICAST_LOOP: ::c_int = 11;
 pub const IP_TTL: ::c_int = 4;
 pub const IP_HDRINCL: ::c_int = 2;
 pub const IP_ADD_MEMBERSHIP: ::c_int = 12;
 pub const IP_DROP_MEMBERSHIP: ::c_int = 13;
 pub const IPV6_JOIN_GROUP: ::c_int = 12;
 pub const IPV6_LEAVE_GROUP: ::c_int = 13;
 
 pub const TCP_NODELAY: ::c_int = 1;
@@ -646,52 +682,29 @@ pub const SHUT_RD: ::c_int = 0;
 pub const SHUT_WR: ::c_int = 1;
 pub const SHUT_RDWR: ::c_int = 2;
 
 pub const LOCK_SH: ::c_int = 1;
 pub const LOCK_EX: ::c_int = 2;
 pub const LOCK_NB: ::c_int = 4;
 pub const LOCK_UN: ::c_int = 8;
 
+pub const O_SYNC: ::c_int = 128;
+pub const O_NONBLOCK: ::c_int = 4;
+
 pub const MAP_COPY: ::c_int = 0x0002;
 pub const MAP_RENAME: ::c_int = 0x0020;
 pub const MAP_NORESERVE: ::c_int = 0x0040;
 pub const MAP_HASSEMAPHORE: ::c_int = 0x0200;
 pub const MAP_STACK: ::c_int = 0x0400;
 pub const MAP_NOSYNC: ::c_int = 0x0800;
 pub const MAP_NOCORE: ::c_int = 0x020000;
 
 pub const IPPROTO_RAW: ::c_int = 255;
 
-pub const _PC_LINK_MAX: ::c_int = 1;
-pub const _PC_MAX_CANON: ::c_int = 2;
-pub const _PC_MAX_INPUT: ::c_int = 3;
-pub const _PC_NAME_MAX: ::c_int = 4;
-pub const _PC_PATH_MAX: ::c_int = 5;
-pub const _PC_PIPE_BUF: ::c_int = 6;
-pub const _PC_CHOWN_RESTRICTED: ::c_int = 7;
-pub const _PC_NO_TRUNC: ::c_int = 8;
-pub const _PC_VDISABLE: ::c_int = 9;
-pub const _PC_ALLOC_SIZE_MIN: ::c_int = 10;
-pub const _PC_FILESIZEBITS: ::c_int = 12;
-pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 14;
-pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 15;
-pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 16;
-pub const _PC_REC_XFER_ALIGN: ::c_int = 17;
-pub const _PC_SYMLINK_MAX: ::c_int = 18;
-pub const _PC_MIN_HOLE_SIZE: ::c_int = 21;
-pub const _PC_ASYNC_IO: ::c_int = 53;
-pub const _PC_PRIO_IO: ::c_int = 54;
-pub const _PC_SYNC_IO: ::c_int = 55;
-pub const _PC_ACL_EXTENDED: ::c_int = 59;
-pub const _PC_ACL_PATH_MAX: ::c_int = 60;
-pub const _PC_CAP_PRESENT: ::c_int = 61;
-pub const _PC_INF_PRESENT: ::c_int = 62;
-pub const _PC_MAC_PRESENT: ::c_int = 63;
-
 pub const _SC_ARG_MAX: ::c_int = 1;
 pub const _SC_CHILD_MAX: ::c_int = 2;
 pub const _SC_CLK_TCK: ::c_int = 3;
 pub const _SC_NGROUPS_MAX: ::c_int = 4;
 pub const _SC_OPEN_MAX: ::c_int = 5;
 pub const _SC_JOB_CONTROL: ::c_int = 6;
 pub const _SC_SAVED_IDS: ::c_int = 7;
 pub const _SC_VERSION: ::c_int = 8;
@@ -735,81 +748,17 @@ pub const _SC_DELAYTIMER_MAX: ::c_int = 
 pub const _SC_MQ_OPEN_MAX: ::c_int = 46;
 pub const _SC_PAGESIZE: ::c_int = 47;
 pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
 pub const _SC_RTSIG_MAX: ::c_int = 48;
 pub const _SC_SEM_NSEMS_MAX: ::c_int = 49;
 pub const _SC_SEM_VALUE_MAX: ::c_int = 50;
 pub const _SC_SIGQUEUE_MAX: ::c_int = 51;
 pub const _SC_TIMER_MAX: ::c_int = 52;
-pub const _SC_IOV_MAX: ::c_int = 56;
-pub const _SC_NPROCESSORS_CONF: ::c_int = 57;
-pub const _SC_2_PBS: ::c_int = 59;
-pub const _SC_2_PBS_ACCOUNTING: ::c_int = 60;
-pub const _SC_2_PBS_CHECKPOINT: ::c_int = 61;
-pub const _SC_2_PBS_LOCATE: ::c_int = 62;
-pub const _SC_2_PBS_MESSAGE: ::c_int = 63;
-pub const _SC_2_PBS_TRACK: ::c_int = 64;
-pub const _SC_ADVISORY_INFO: ::c_int = 65;
-pub const _SC_BARRIERS: ::c_int = 66;
-pub const _SC_CLOCK_SELECTION: ::c_int = 67;
-pub const _SC_CPUTIME: ::c_int = 68;
-pub const _SC_FILE_LOCKING: ::c_int = 69;
-pub const _SC_NPROCESSORS_ONLN: ::c_int = 58;
-pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 70;
-pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 71;
 pub const _SC_HOST_NAME_MAX: ::c_int = 72;
-pub const _SC_LOGIN_NAME_MAX: ::c_int = 73;
-pub const _SC_MONOTONIC_CLOCK: ::c_int = 74;
-pub const _SC_MQ_PRIO_MAX: ::c_int = 75;
-pub const _SC_READER_WRITER_LOCKS: ::c_int = 76;
-pub const _SC_REGEXP: ::c_int = 77;
-pub const _SC_SHELL: ::c_int = 78;
-pub const _SC_SPAWN: ::c_int = 79;
-pub const _SC_SPIN_LOCKS: ::c_int = 80;
-pub const _SC_SPORADIC_SERVER: ::c_int = 81;
-pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 82;
-pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 83;
-pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 85;
-pub const _SC_THREAD_KEYS_MAX: ::c_int = 86;
-pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 87;
-pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 88;
-pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 89;
-pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 90;
-pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 91;
-pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 92;
-pub const _SC_THREAD_STACK_MIN: ::c_int = 93;
-pub const _SC_THREAD_THREADS_MAX: ::c_int = 94;
-pub const _SC_TIMEOUTS: ::c_int = 95;
-pub const _SC_THREADS: ::c_int = 96;
-pub const _SC_TRACE: ::c_int = 97;
-pub const _SC_TRACE_EVENT_FILTER: ::c_int = 98;
-pub const _SC_TRACE_INHERIT: ::c_int = 99;
-pub const _SC_TRACE_LOG: ::c_int = 100;
-pub const _SC_TTY_NAME_MAX: ::c_int = 101;
-pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 102;
-pub const _SC_V6_ILP32_OFF32: ::c_int = 103;
-pub const _SC_V6_ILP32_OFFBIG: ::c_int = 104;
-pub const _SC_V6_LP64_OFF64: ::c_int = 105;
-pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 106;
-pub const _SC_ATEXIT_MAX: ::c_int = 107;
-pub const _SC_XOPEN_CRYPT: ::c_int = 108;
-pub const _SC_XOPEN_ENH_I18N: ::c_int = 109;
-pub const _SC_XOPEN_LEGACY: ::c_int = 110;
-pub const _SC_XOPEN_REALTIME: ::c_int = 111;
-pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 112;
-pub const _SC_XOPEN_SHM: ::c_int = 113;
-pub const _SC_XOPEN_STREAMS: ::c_int = 114;
-pub const _SC_XOPEN_UNIX: ::c_int = 115;
-pub const _SC_XOPEN_VERSION: ::c_int = 116;
-pub const _SC_XOPEN_XCU_VERSION: ::c_int = 117;
-pub const _SC_IPV6: ::c_int = 118;
-pub const _SC_RAW_SOCKETS: ::c_int = 119;
-pub const _SC_SYMLOOP_MAX: ::c_int = 120;
-pub const _SC_PHYS_PAGES: ::c_int = 121;
 
 pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = 0 as *mut _;
 pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0 as *mut _;
 pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = 0 as *mut _;
 pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 1;
 pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2;
 pub const PTHREAD_MUTEX_NORMAL: ::c_int = 3;
 pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_ERRORCHECK;
@@ -921,25 +870,18 @@ pub const B76800: speed_t = 76800;
 pub const B115200: speed_t = 115200;
 pub const B230400: speed_t = 230400;
 pub const EXTA: speed_t = 19200;
 pub const EXTB: speed_t = 38400;
 
 pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t;
 
 pub const CRTSCTS: ::tcflag_t = 0x00030000;
-pub const CCTS_OFLOW: ::tcflag_t = 0x00010000;
-pub const CRTS_IFLOW: ::tcflag_t = 0x00020000;
-pub const CDTR_IFLOW: ::tcflag_t = 0x00040000;
-pub const CDSR_OFLOW: ::tcflag_t = 0x00080000;
-pub const CCAR_OFLOW: ::tcflag_t = 0x00100000;
-pub const VERASE2: usize = 7;
-pub const OCRNL: ::tcflag_t = 0x10;
-pub const ONOCR: ::tcflag_t = 0x20;
-pub const ONLRET: ::tcflag_t = 0x40;
+
+pub const AT_FDCWD: ::c_int = -100;
 
 f! {
     pub fn WIFCONTINUED(status: ::c_int) -> bool {
         status == 0x13
     }
 
     pub fn WSTOPSIG(status: ::c_int) -> ::c_int {
         status >> 8
@@ -957,23 +899,16 @@ f! {
 extern {
     pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
     pub fn endutxent();
     pub fn getutxent() -> *mut utmpx;
     pub fn getutxid(ut: *const utmpx) -> *mut utmpx;
     pub fn getutxline(ut: *const utmpx) -> *mut utmpx;
     pub fn pututxline(ut: *const utmpx) -> *mut utmpx;
     pub fn setutxent();
-    pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int;
-    pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int;
-    pub fn getgrouplist(name: *const ::c_char,
-                        basegid: ::gid_t,
-                        groups: *mut ::gid_t,
-                        ngroups: *mut ::c_int) -> ::c_int;
-    pub fn initgroups(name: *const ::c_char, basegid: ::gid_t) -> ::c_int;
 }
 
 #[link(name = "util")]
 extern {
     pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int;
     pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
     pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
     pub fn aio_error(aiocbp: *const aiocb) -> ::c_int;
@@ -994,24 +929,16 @@ extern {
     pub fn kevent(kq: ::c_int,
                   changelist: *const ::kevent,
                   nchanges: ::c_int,
                   eventlist: *mut ::kevent,
                   nevents: ::c_int,
                   timeout: *const ::timespec) -> ::c_int;
     pub fn mincore(addr: *const ::c_void, len: ::size_t,
                    vec: *mut ::c_char) -> ::c_int;
-    pub fn pwritev(fd: ::c_int,
-                   iov: *const ::iovec,
-                   iovcnt: ::c_int,
-                   offset: ::off_t) -> ::ssize_t;
-    pub fn preadv(fd: ::c_int,
-                  iov: *const ::iovec,
-                  iovcnt: ::c_int,
-                  offset: ::off_t) -> ::ssize_t;
     pub fn sysctlnametomib(name: *const ::c_char,
                            mibp: *mut ::c_int,
                            sizep: *mut ::size_t)
                            -> ::c_int;
     pub fn shm_open(name: *const ::c_char, oflag: ::c_int, mode: ::mode_t)
                     -> ::c_int;
     pub fn sysctl(name: *const ::c_int,
                   namelen: ::c_uint,
@@ -1023,17 +950,17 @@ extern {
     pub fn sysctlbyname(name: *const ::c_char,
                         oldp: *mut ::c_void,
                         oldlenp: *mut ::size_t,
                         newp: *const ::c_void,
                         newlen: ::size_t)
                         -> ::c_int;
     pub fn sched_setscheduler(pid: ::pid_t,
                               policy: ::c_int,
-                              param: *const ::sched_param) -> ::c_int;
+                              param: *const sched_param) -> ::c_int;
     pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int;
     pub fn memrchr(cx: *const ::c_void,
                    c: ::c_int,
                    n: ::size_t) -> *mut ::c_void;
     pub fn sendfile(fd: ::c_int,
                     s: ::c_int,
                     offset: ::off_t,
                     nbytes: ::size_t,
@@ -1074,47 +1001,40 @@ extern {
     pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t,
                                        pshared: ::c_int) -> ::c_int;
     pub fn pthread_condattr_getpshared(attr: *const pthread_condattr_t,
                                        pshared: *mut ::c_int) -> ::c_int;
     pub fn pthread_mutexattr_setpshared(attr: *mut pthread_mutexattr_t,
                                         pshared: ::c_int) -> ::c_int;
     pub fn pthread_mutexattr_getpshared(attr: *const pthread_mutexattr_t,
                                         pshared: *mut ::c_int) -> ::c_int;
-    pub fn pthread_rwlockattr_getpshared(attr: *const pthread_rwlockattr_t,
-                                         val: *mut ::c_int) -> ::c_int;
-    pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t,
-                                         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 fdopendir(fd: ::c_int) -> *mut ::DIR;
 
     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,
                     mode: ::mode_t) -> ::c_int;
     pub fn pthread_condattr_getclock(attr: *const pthread_condattr_t,
                                      clock_id: *mut clockid_t) -> ::c_int;
     pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
-                                     clock_id: ::clockid_t) -> ::c_int;
+                                     clock_id: clockid_t) -> ::c_int;
     pub fn sethostname(name: *const ::c_char, len: ::c_int) -> ::c_int;
     pub fn sem_timedwait(sem: *mut sem_t,
                          abstime: *const ::timespec) -> ::c_int;
     pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
                                    abstime: *const ::timespec) -> ::c_int;
     pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int;
     pub fn ppoll(fds: *mut ::pollfd,
                  nfds: ::nfds_t,
                  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;
 }
 
 cfg_if! {
     if #[cfg(target_os = "freebsd")] {
         mod freebsd;
         pub use self::freebsd::*;
     } else if #[cfg(target_os = "dragonfly")] {
         mod dragonfly;
--- a/third_party/rust/libc/src/unix/bsd/mod.rs
+++ b/third_party/rust/libc/src/unix/bsd/mod.rs
@@ -175,45 +175,27 @@ pub const SIGVTALRM: ::c_int = 26;
 pub const SIGPROF: ::c_int = 27;
 pub const SIGWINCH: ::c_int = 28;
 pub const SIGINFO: ::c_int = 29;
 
 pub const SIG_SETMASK: ::c_int = 3;
 pub const SIG_BLOCK: ::c_int = 0x1;
 pub const SIG_UNBLOCK: ::c_int = 0x2;
 
-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_MULTICAST_LOOP: ::c_int = 11;
 pub const IPV6_V6ONLY: ::c_int = 27;
 
 pub const ST_RDONLY: ::c_ulong = 1;
 
-pub const SCM_RIGHTS: ::c_int = 0x01;
-
 pub const NCCS: usize = 20;
 
-pub const O_ACCMODE: ::c_int = 0x3;
-pub const O_RDONLY: ::c_int = 0;
-pub const O_WRONLY: ::c_int = 1;
-pub const O_RDWR: ::c_int = 2;
-pub const O_APPEND: ::c_int = 8;
-pub const O_CREAT: ::c_int = 512;
-pub const O_TRUNC: ::c_int = 1024;
-pub const O_EXCL: ::c_int = 2048;
 pub const O_ASYNC: ::c_int = 0x40;
-pub const O_SYNC: ::c_int = 0x80;
-pub const O_NONBLOCK: ::c_int = 0x4;
+pub const O_FSYNC: ::c_int = 0x80;
+pub const O_NDELAY: ::c_int = 0x4;
 pub const O_NOFOLLOW: ::c_int = 0x100;
-pub const O_SHLOCK: ::c_int = 0x10;
-pub const O_EXLOCK: ::c_int = 0x20;
-pub const O_FSYNC: ::c_int = O_SYNC;
-pub const O_NDELAY: ::c_int = O_NONBLOCK;
 
 pub const F_GETOWN: ::c_int = 5;
 pub const F_SETOWN: ::c_int = 6;
 
 pub const MNT_FORCE: ::c_int = 0x80000;
 
 pub const Q_SYNC: ::c_int = 0x600;
 pub const Q_QUOTAON: ::c_int = 0x100;
@@ -234,25 +216,22 @@ pub const VEOL: usize = 1;
 pub const VEOL2: usize = 2;
 pub const VERASE: usize = 3;
 pub const VWERASE: usize = 4;
 pub const VKILL: usize = 5;
 pub const VREPRINT: usize = 6;
 pub const VINTR: usize = 8;
 pub const VQUIT: usize = 9;
 pub const VSUSP: usize = 10;
-pub const VDSUSP: usize = 11;
 pub const VSTART: usize = 12;
 pub const VSTOP: usize = 13;
 pub const VLNEXT: usize = 14;
 pub const VDISCARD: usize = 15;
 pub const VMIN: usize = 16;
 pub const VTIME: usize = 17;
-pub const VSTATUS: usize = 18;
-pub const _POSIX_VDISABLE: ::cc_t = 0xff;
 pub const IGNBRK: ::tcflag_t = 0x00000001;
 pub const BRKINT: ::tcflag_t = 0x00000002;
 pub const IGNPAR: ::tcflag_t = 0x00000004;
 pub const PARMRK: ::tcflag_t = 0x00000008;
 pub const INPCK: ::tcflag_t = 0x00000010;
 pub const ISTRIP: ::tcflag_t = 0x00000020;
 pub const INLCR: ::tcflag_t = 0x00000040;
 pub const IGNCR: ::tcflag_t = 0x00000080;
@@ -260,17 +239,16 @@ pub const ICRNL: ::tcflag_t = 0x00000100
 pub const IXON: ::tcflag_t = 0x00000200;
 pub const IXOFF: ::tcflag_t = 0x00000400;
 pub const IXANY: ::tcflag_t = 0x00000800;
 pub const IMAXBEL: ::tcflag_t = 0x00002000;
 pub const OPOST: ::tcflag_t = 0x1;
 pub const ONLCR: ::tcflag_t = 0x2;
 pub const OXTABS: ::tcflag_t = 0x4;
 pub const ONOEOT: ::tcflag_t = 0x8;
-pub const CIGNORE: ::tcflag_t = 0x00000001;
 pub const CSIZE: ::tcflag_t = 0x00000300;
 pub const CS5: ::tcflag_t = 0x00000000;
 pub const CS6: ::tcflag_t = 0x00000100;
 pub const CS7: ::tcflag_t = 0x00000200;
 pub const CS8: ::tcflag_t = 0x00000300;
 pub const CSTOPB: ::tcflag_t = 0x00000400;
 pub const CREAD: ::tcflag_t = 0x00000800;
 pub const PARENB: ::tcflag_t = 0x00001000;
@@ -281,55 +259,38 @@ pub const ECHOKE: ::tcflag_t = 0x0000000
 pub const ECHOE: ::tcflag_t = 0x00000002;
 pub const ECHOK: ::tcflag_t = 0x00000004;
 pub const ECHO: ::tcflag_t = 0x00000008;
 pub const ECHONL: ::tcflag_t = 0x00000010;
 pub const ECHOPRT: ::tcflag_t = 0x00000020;
 pub const ECHOCTL: ::tcflag_t = 0x00000040;
 pub const ISIG: ::tcflag_t = 0x00000080;
 pub const ICANON: ::tcflag_t = 0x00000100;
-pub const ALTWERASE: ::tcflag_t = 0x00000200;
 pub const IEXTEN: ::tcflag_t = 0x00000400;
 pub const EXTPROC: ::tcflag_t = 0x00000800;
 pub const TOSTOP: ::tcflag_t = 0x00400000;
 pub const FLUSHO: ::tcflag_t = 0x00800000;
-pub const NOKERNINFO: ::tcflag_t = 0x02000000;
 pub const PENDIN: ::tcflag_t = 0x20000000;
 pub const NOFLSH: ::tcflag_t = 0x80000000;
-pub const MDMBUF: ::tcflag_t = 0x00100000;
 
 pub const WNOHANG: ::c_int = 0x00000001;
 pub const WUNTRACED: ::c_int = 0x00000002;
 
-pub const RTLD_LAZY: ::c_int = 0x1;
 pub const RTLD_NOW: ::c_int = 0x2;
 pub const RTLD_NEXT: *mut ::c_void = -1isize as *mut ::c_void;
 pub const RTLD_DEFAULT: *mut ::c_void = -2isize as *mut ::c_void;
 pub const RTLD_SELF: *mut ::c_void = -3isize as *mut ::c_void;
 
 pub const LOG_CRON: ::c_int = 9 << 3;
 pub const LOG_AUTHPRIV: ::c_int = 10 << 3;
 pub const LOG_FTP: ::c_int = 11 << 3;
 pub const LOG_PERROR: ::c_int = 0x20;
 
-pub const TCP_MAXSEG: ::c_int = 2;
-
 pub const PIPE_BUF: usize = 512;
 
-pub const POLLIN: ::c_short = 0x1;
-pub const POLLPRI: ::c_short = 0x2;
-pub const POLLOUT: ::c_short = 0x4;
-pub const POLLERR: ::c_short = 0x8;
-pub const POLLHUP: ::c_short = 0x10;
-pub const POLLNVAL: ::c_short = 0x20;
-pub const POLLRDNORM: ::c_short = 0x040;
-pub const POLLWRNORM: ::c_short = 0x004;
-pub const POLLRDBAND: ::c_short = 0x080;
-pub const POLLWRBAND: ::c_short = 0x100;
-
 f! {
     pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
         let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
         let fd = fd as usize;
         (*set).fds_bits[fd / bits] &= !(1 << (fd % bits));
         return
     }
 
@@ -362,35 +323,42 @@ f! {
 
     pub fn WEXITSTATUS(status: ::c_int) -> ::c_int {
         status >> 8
     }
 
     pub fn WCOREDUMP(status: ::c_int) -> bool {
         (status & 0o200) != 0
     }
-
-    pub fn QCMD(cmd: ::c_int, type_: ::c_int) -> ::c_int {
-        (cmd << 8) | (type_ & 0x00ff)
-    }
 }
 
 extern {
     pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int;
     pub fn freeifaddrs(ifa: *mut ::ifaddrs);
     pub fn setgroups(ngroups: ::c_int,
                      ptr: *const ::gid_t) -> ::c_int;
     pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
     pub fn kqueue() -> ::c_int;
     pub fn unmount(target: *const ::c_char, arg: ::c_int) -> ::c_int;
     pub fn syscall(num: ::c_int, ...) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__getpwnam_r50")]
+    pub fn getpwnam_r(name: *const ::c_char,
+                      pwd: *mut passwd,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut passwd) -> ::c_int;
+    #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid_r50")]
+    pub fn getpwuid_r(uid: ::uid_t,
+                      pwd: *mut passwd,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut passwd) -> ::c_int;
     #[cfg_attr(target_os = "netbsd", link_name = "__getpwent50")]
     pub fn getpwent() -> *mut passwd;
     pub fn setpwent();
-    pub fn endpwent();
     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;
     pub fn if_nameindex() -> *mut if_nameindex;
     pub fn if_freenameindex(ptr: *mut if_nameindex);
 
     pub fn getpeereid(socket: ::c_int,
                       euid: *mut ::uid_t,
@@ -461,80 +429,16 @@ extern {
                    msg: *const ::msghdr,
                    flags: ::c_int) -> ::ssize_t;
     #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
                link_name = "recvmsg$UNIX2003")]
     pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
                    -> ::ssize_t;
 
     pub fn sync();
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")]
-    pub fn getgrgid_r(uid: ::uid_t,
-                      grp: *mut ::group,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut ::group) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "sigaltstack$UNIX2003")]
-    #[cfg_attr(target_os = "netbsd", link_name = "__sigaltstack14")]
-    pub fn sigaltstack(ss: *const stack_t,
-                       oss: *mut stack_t) -> ::c_int;
-    pub fn sem_close(sem: *mut sem_t) -> ::c_int;
-    pub fn getdtablesize() -> ::c_int;
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrnam_r")]
-    pub fn getgrnam_r(name: *const ::c_char,
-                      grp: *mut ::group,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut ::group) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "pthread_sigmask$UNIX2003")]
-    pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t,
-                           oldset: *mut sigset_t) -> ::c_int;
-    pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t;
-    pub fn getgrnam(name: *const ::c_char) -> *mut ::group;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "pthread_cancel$UNIX2003")]
-    pub fn pthread_cancel(thread: ::pthread_t) -> ::c_int;
-    pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
-    pub fn sem_unlink(name: *const ::c_char) -> ::c_int;
-    pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__getpwnam_r50")]
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwnam_r")]
-    pub fn getpwnam_r(name: *const ::c_char,
-                      pwd: *mut passwd,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut passwd) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid_r50")]
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwuid_r")]
-    pub fn getpwuid_r(uid: ::uid_t,
-                      pwd: *mut passwd,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut passwd) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch ="x86"),
-               link_name = "sigwait$UNIX2003")]
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_sigwait")]
-    pub fn sigwait(set: *const sigset_t,
-                   sig: *mut ::c_int) -> ::c_int;
-    pub fn pthread_atfork(prepare: Option<unsafe extern fn()>,
-                          parent: Option<unsafe extern fn()>,
-                          child: Option<unsafe extern fn()>) -> ::c_int;
-    pub fn getgrgid(gid: ::gid_t) -> *mut ::group;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "popen$UNIX2003")]
-    pub fn popen(command: *const c_char,
-                 mode: *const c_char) -> *mut ::FILE;
-    pub fn faccessat(dirfd: ::c_int, pathname: *const ::c_char,
-                     mode: ::c_int, flags: ::c_int) -> ::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;
 }
 
 cfg_if! {
     if #[cfg(any(target_os = "macos", target_os = "ios"))] {
         mod apple;
         pub use self::apple::*;
     } else if #[cfg(any(target_os = "openbsd", target_os = "netbsd",
                         target_os = "bitrig"))] {
--- a/third_party/rust/libc/src/unix/bsd/netbsdlike/mod.rs
+++ b/third_party/rust/libc/src/unix/bsd/netbsdlike/mod.rs
@@ -122,17 +122,26 @@ pub const SEEK_CUR : ::c_int = 1;
 pub const SEEK_END : ::c_int = 2;
 pub const _IOFBF : ::c_int = 0;
 pub const _IONBF : ::c_int = 2;
 pub const _IOLBF : ::c_int = 1;
 pub const BUFSIZ : ::c_uint = 1024;
 pub const FOPEN_MAX : ::c_uint = 20;
 pub const FILENAME_MAX : ::c_uint = 1024;
 pub const L_tmpnam : ::c_uint = 1024;
+pub const O_RDONLY : ::c_int = 0;
+pub const O_WRONLY : ::c_int = 1;
+pub const O_RDWR : ::c_int = 2;
+pub const O_ACCMODE : ::c_int = 3;
+pub const O_APPEND : ::c_int = 8;
+pub const O_CREAT : ::c_int = 512;
+pub const O_EXCL : ::c_int = 2048;
 pub const O_NOCTTY : ::c_int = 32768;
+pub const O_TRUNC : ::c_int = 1024;
+pub const O_SYNC : ::c_int = 128;
 pub const S_IFIFO : mode_t = 4096;
 pub const S_IFCHR : mode_t = 8192;
 pub const S_IFBLK : mode_t = 24576;
 pub const S_IFDIR : mode_t = 16384;
 pub const S_IFREG : mode_t = 32768;
 pub const S_IFLNK : mode_t = 40960;
 pub const S_IFSOCK : mode_t = 49152;
 pub const S_IFMT : mode_t = 61440;
@@ -302,29 +311,31 @@ pub const GLOB_NOMATCH  : ::c_int = -3;
 pub const GLOB_NOSYS : ::c_int = -4;
 
 pub const POSIX_MADV_NORMAL : ::c_int = 0;
 pub const POSIX_MADV_RANDOM : ::c_int = 1;
 pub const POSIX_MADV_SEQUENTIAL : ::c_int = 2;
 pub const POSIX_MADV_WILLNEED : ::c_int = 3;
 pub const POSIX_MADV_DONTNEED : ::c_int = 4;
 
+pub const _SC_XOPEN_SHM : ::c_int = 30;
+
 pub const PTHREAD_CREATE_JOINABLE : ::c_int = 0;
 pub const PTHREAD_CREATE_DETACHED : ::c_int = 1;
 
 // http://man.openbsd.org/OpenBSD-current/man2/clock_getres.2
 // The man page says clock_gettime(3) can accept various values as clockid_t but
 // http://fxr.watson.org/fxr/source/kern/kern_time.c?v=OPENBSD;im=excerpts#L161
 // the implementation rejects anything other than the below two
 //
 // http://netbsd.gw.com/cgi-bin/man-cgi?clock_gettime
 // https://github.com/jsonn/src/blob/HEAD/sys/kern/subr_time.c#L222
 // Basically the same goes for NetBSD
-pub const CLOCK_REALTIME: ::clockid_t = 0;
-pub const CLOCK_MONOTONIC: ::clockid_t = 3;
+pub const CLOCK_REALTIME: clockid_t = 0;
+pub const CLOCK_MONOTONIC: clockid_t = 3;
 
 pub const RLIMIT_CPU: ::c_int = 0;
 pub const RLIMIT_FSIZE: ::c_int = 1;
 pub const RLIMIT_DATA: ::c_int = 2;
 pub const RLIMIT_STACK: ::c_int = 3;
 pub const RLIMIT_CORE: ::c_int = 4;
 pub const RLIMIT_RSS: ::c_int = 5;
 pub const RLIMIT_MEMLOCK: ::c_int = 6;
@@ -402,18 +413,24 @@ pub const PF_INET6: ::c_int = AF_INET6;
 pub const PF_RTIP: ::c_int = pseudo_AF_RTIP;
 pub const PF_PIP: ::c_int = pseudo_AF_PIP;
 pub const PF_ISDN: ::c_int = AF_ISDN;
 pub const PF_NATM: ::c_int = AF_NATM;
 
 pub const SOCK_STREAM: ::c_int = 1;
 pub const SOCK_DGRAM: ::c_int = 2;
 pub const SOCK_RAW: ::c_int = 3;
-pub const SOCK_RDM: ::c_int = 4;
 pub const SOCK_SEQPACKET: ::c_int = 5;
+pub const IPPROTO_ICMP: ::c_int = 1;
+pub const IPPROTO_ICMPV6: ::c_int = 58;
+pub const IPPROTO_TCP: ::c_int = 6;
+pub const IPPROTO_IP: ::c_int = 0;
+pub const IPPROTO_IPV6: ::c_int = 41;
+pub const IP_MULTICAST_TTL: ::c_int = 10;
+pub const IP_MULTICAST_LOOP: ::c_int = 11;
 pub const IP_TTL: ::c_int = 4;
 pub const IP_HDRINCL: ::c_int = 2;
 pub const IP_ADD_MEMBERSHIP: ::c_int = 12;
 pub const IP_DROP_MEMBERSHIP: ::c_int = 13;
 
 pub const TCP_NODELAY: ::c_int = 0x01;
 pub const SOL_SOCKET: ::c_int = 0xffff;
 pub const SO_DEBUG: ::c_int = 0x01;
@@ -443,27 +460,31 @@ pub const MSG_TRUNC: ::c_int = 0x10;
 pub const MSG_CTRUNC: ::c_int = 0x20;
 pub const MSG_WAITALL: ::c_int = 0x40;
 pub const MSG_DONTWAIT: ::c_int = 0x80;
 pub const MSG_BCAST: ::c_int = 0x100;
 pub const MSG_MCAST: ::c_int = 0x200;
 pub const MSG_NOSIGNAL: ::c_int = 0x400;
 pub const MSG_CMSG_CLOEXEC: ::c_int = 0x800;
 
+pub const SCM_RIGHTS: ::c_int = 0x01;
+
 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;
 
 pub const LOCK_SH: ::c_int = 1;
 pub const LOCK_EX: ::c_int = 2;
 pub const LOCK_NB: ::c_int = 4;
 pub const LOCK_UN: ::c_int = 8;
 
+pub const O_NONBLOCK : ::c_int = 4;
+
 pub const IPPROTO_RAW : ::c_int = 255;
 
 pub const _SC_ARG_MAX : ::c_int = 1;
 pub const _SC_CHILD_MAX : ::c_int = 2;
 pub const _SC_NGROUPS_MAX : ::c_int = 4;
 pub const _SC_OPEN_MAX : ::c_int = 5;
 pub const _SC_JOB_CONTROL : ::c_int = 6;
 pub const _SC_SAVED_IDS : ::c_int = 7;
@@ -485,17 +506,16 @@ pub const _SC_2_FORT_RUN : ::c_int = 22;
 pub const _SC_2_LOCALEDEF : ::c_int = 23;
 pub const _SC_2_SW_DEV : ::c_int = 24;
 pub const _SC_2_UPE : ::c_int = 25;
 pub const _SC_STREAM_MAX : ::c_int = 26;
 pub const _SC_TZNAME_MAX : ::c_int = 27;
 pub const _SC_PAGESIZE : ::c_int = 28;
 pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
 pub const _SC_FSYNC : ::c_int = 29;
-pub const _SC_XOPEN_SHM : ::c_int = 30;
 
 pub const Q_GETQUOTA: ::c_int = 0x300;
 pub const Q_SETQUOTA: ::c_int = 0x400;
 
 pub const RTLD_GLOBAL: ::c_int = 0x100;
 
 pub const LOG_NFACILITIES: ::c_int = 24;
 
@@ -524,33 +544,16 @@ pub const B57600: speed_t = 57600;
 pub const B76800: speed_t = 76800;
 pub const B115200: speed_t = 115200;
 pub const B230400: speed_t = 230400;
 pub const EXTA: speed_t = 19200;
 pub const EXTB: speed_t = 38400;
 
 pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t;
 
-pub const CRTSCTS: ::tcflag_t = 0x00010000;
-pub const CRTS_IFLOW: ::tcflag_t = CRTSCTS;
-pub const CCTS_OFLOW: ::tcflag_t = CRTSCTS;
-pub const OCRNL: ::tcflag_t = 0x10;
-
-pub const TIOCM_LE: ::c_int = 0o0001;
-pub const TIOCM_DTR: ::c_int = 0o0002;
-pub const TIOCM_RTS: ::c_int = 0o0004;
-pub const TIOCM_ST: ::c_int = 0o0010;
-pub const TIOCM_SR: ::c_int = 0o0020;
-pub const TIOCM_CTS: ::c_int = 0o0040;
-pub const TIOCM_CAR: ::c_int = 0o0100;
-pub const TIOCM_RNG: ::c_int = 0o0200;
-pub const TIOCM_DSR: ::c_int = 0o0400;
-pub const TIOCM_CD: ::c_int = TIOCM_CAR;
-pub const TIOCM_RI: ::c_int = TIOCM_RNG;
-
 f! {
     pub fn WSTOPSIG(status: ::c_int) -> ::c_int {
         status >> 8
     }
 
     pub fn WIFSIGNALED(status: ::c_int) -> bool {
         (status & 0o177) != 0o177 && (status & 0o177) != 0
     }
@@ -560,42 +563,32 @@ f! {
     }
 }
 
 #[link(name = "util")]
 extern {
     pub fn mincore(addr: *mut ::c_void, len: ::size_t,
                    vec: *mut ::c_char) -> ::c_int;
     #[cfg_attr(target_os = "netbsd", link_name = "__clock_getres50")]
-    pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
+    pub fn clock_getres(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
     #[cfg_attr(target_os = "netbsd", link_name = "__clock_gettime50")]
-    pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
+    pub fn clock_gettime(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
     #[cfg_attr(target_os = "netbsd", link_name = "__clock_settime50")]
-    pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int;
+    pub fn clock_settime(clk_id: clockid_t, tp: *const ::timespec) -> ::c_int;
     pub fn __errno() -> *mut ::c_int;
     pub fn shm_open(name: *const ::c_char, oflag: ::c_int, mode: ::mode_t)
                     -> ::c_int;
     pub fn memrchr(cx: *const ::c_void,
                    c: ::c_int,
                    n: ::size_t) -> *mut ::c_void;
     pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int;
     pub fn mkostemps(template: *mut ::c_char,
                      suffixlen: ::c_int,
                      flags: ::c_int) -> ::c_int;
-    pub fn pwritev(fd: ::c_int,
-                   iov: *const ::iovec,
-                   iovcnt: ::c_int,
-                   offset: ::off_t) -> ::ssize_t;
-    pub fn preadv(fd: ::c_int,
-                  iov: *const ::iovec,
-                  iovcnt: ::c_int,
-                  offset: ::off_t) -> ::ssize_t;
     pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int;
-    pub fn utimensat(dirfd: ::c_int, path: *const ::c_char,
-                     times: *const ::timespec, flag: ::c_int) -> ::c_int;
     pub fn fdatasync(fd: ::c_int) -> ::c_int;
     pub fn openpty(amaster: *mut ::c_int,
                    aslave: *mut ::c_int,
                    name: *mut ::c_char,
                    termp: *mut termios,
                    winp: *mut ::winsize) -> ::c_int;
     pub fn forkpty(amaster: *mut ::c_int,
                    name: *mut ::c_char,
@@ -608,30 +601,21 @@ extern {
 
     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,
                     mode: ::mode_t) -> ::c_int;
     pub fn sem_timedwait(sem: *mut sem_t,
                          abstime: *const ::timespec) -> ::c_int;
     pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
-                                     clock_id: ::clockid_t) -> ::c_int;
+                                     clock_id: clockid_t) -> ::c_int;
     pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
     pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
                                    abstime: *const ::timespec) -> ::c_int;
     pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int;
-
-    pub fn getgrouplist(name: *const ::c_char,
-                        basegid: ::gid_t,
-                        groups: *mut ::gid_t,
-                        ngroups: *mut ::c_int) -> ::c_int;
-    pub fn initgroups(name: *const ::c_char, basegid: ::gid_t) -> ::c_int;
-    pub fn fexecve(fd: ::c_int, argv: *const *const ::c_char,
-                   envp: *const *const ::c_char)
-                   -> ::c_int;
 }
 
 cfg_if! {
     if #[cfg(target_os = "netbsd")] {
         mod netbsd;
         pub use self::netbsd::*;
     } else if #[cfg(any(target_os = "openbsd", target_os = "bitrig"))] {
         mod openbsdlike;
--- a/third_party/rust/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs
+++ b/third_party/rust/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs
@@ -160,21 +160,16 @@ s! {
         ptm_spare2: *mut ::c_void,
     }
 
     pub struct pthread_mutexattr_t {
         ptma_magic: ::c_uint,
         ptma_private: *mut ::c_void,
     }
 
-    pub struct pthread_rwlockattr_t {
-        ptra_magic: ::c_uint,
-        ptra_private: *mut ::c_void,
-    }
-
     pub struct pthread_cond_t {
         ptc_magic: ::c_uint,
         ptc_lock: ::c_uchar,
         ptc_waiters_first: *mut u8,
         ptc_waiters_last: *mut u8,
         ptc_mutex: *mut ::pthread_mutex_t,
         ptc_private: *mut ::c_void,
     }
@@ -244,48 +239,16 @@ s! {
         pub n_sign_posn: ::c_char,
         pub int_p_cs_precedes: ::c_char,
         pub int_n_cs_precedes: ::c_char,
         pub int_p_sep_by_space: ::c_char,
         pub int_n_sep_by_space: ::c_char,
         pub int_p_sign_posn: ::c_char,
         pub int_n_sign_posn: ::c_char,
     }
-
-    pub struct if_data {
-        pub ifi_type: ::c_uchar,
-        pub ifi_addrlen: ::c_uchar,
-        pub ifi_hdrlen: ::c_uchar,
-        pub ifi_link_state: ::c_int,
-        pub ifi_mtu: u64,
-        pub ifi_metric: u64,
-        pub ifi_baudrate: u64,
-        pub ifi_ipackets: u64,
-        pub ifi_ierrors: u64,
-        pub ifi_opackets: u64,
-        pub ifi_oerrors: u64,
-        pub ifi_collisions: u64,
-        pub ifi_ibytes: u64,
-        pub ifi_obytes: u64,
-        pub ifi_imcasts: u64,
-        pub ifi_omcasts: u64,
-        pub ifi_iqdrops: u64,
-        pub ifi_noproto: u64,
-        pub ifi_lastchange: ::timespec,
-    }
-
-    pub struct if_msghdr {
-        pub ifm_msglen: ::c_ushort,
-        pub ifm_version: ::c_uchar,
-        pub ifm_type: ::c_uchar,
-        pub ifm_addrs: ::c_int,
-        pub ifm_flags: ::c_int,
-        pub ifm_index: ::c_ushort,
-        pub ifm_data: if_data,
-    }
 }
 
 pub const AT_FDCWD: ::c_int = -100;
 pub const AT_EACCESS: ::c_int = 0x100;
 pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x200;
 pub const AT_SYMLINK_FOLLOW: ::c_int = 0x400;
 pub const AT_REMOVEDIR: ::c_int = 0x800;
 
@@ -302,19 +265,19 @@ pub const ERA_D_FMT: ::nl_item = 53;
 pub const ERA_D_T_FMT: ::nl_item = 54;
 pub const ERA_T_FMT: ::nl_item = 55;
 pub const ALT_DIGITS: ::nl_item = 56;
 
 pub const O_CLOEXEC: ::c_int = 0x400000;
 pub const O_ALT_IO: ::c_int = 0x40000;
 pub const O_NOSIGPIPE: ::c_int = 0x1000000;
 pub const O_SEARCH: ::c_int = 0x800000;
+pub const O_EXLOCK: ::c_int = 0x20;
+pub const O_SHLOCK: ::c_int = 0x10;
 pub const O_DIRECTORY: ::c_int = 0x200000;
-pub const O_DIRECT : ::c_int = 0x00080000;
-pub const O_RSYNC : ::c_int = 0x00020000;
 
 pub const MS_SYNC : ::c_int = 0x4;
 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;
@@ -341,95 +304,16 @@ pub const SOCK_FLAGS_MASK: ::c_int = 0xf
 
 pub const SO_SNDTIMEO: ::c_int = 0x100b;
 pub const SO_RCVTIMEO: ::c_int = 0x100c;
 pub const SO_ACCEPTFILTER: ::c_int = 0x1000;
 pub const SO_TIMESTAMP: ::c_int = 0x2000;
 pub const SO_OVERFLOWED: ::c_int = 0x1009;
 pub const SO_NOHEADER: ::c_int = 0x100a;
 
-// sys/netinet/in.h
-// Protocols (RFC 1700)
-// NOTE: These are in addition to the constants defined in src/unix/mod.rs
-
-// IPPROTO_IP defined in src/unix/mod.rs
-/// Hop-by-hop option header
-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)
-pub const IPPROTO_GGP: ::c_int = 3;
-/// for compatibility
-pub const IPPROTO_IPIP: ::c_int = 4;
-// IPPROTO_TCP defined in src/unix/mod.rs
-/// exterior gateway protocol
-pub const IPPROTO_EGP: ::c_int = 8;
-/// pup
-pub const IPPROTO_PUP: ::c_int = 12;
-// IPPROTO_UDP defined in src/unix/mod.rs
-/// xns idp
-pub const IPPROTO_IDP: ::c_int = 22;
-/// tp-4 w/ class negotiation
-pub const IPPROTO_TP: ::c_int = 29;
-/// DCCP
-pub const IPPROTO_DCCP: ::c_int = 33;
-// IPPROTO_IPV6 defined in src/unix/mod.rs
-/// IP6 routing header
-pub const IPPROTO_ROUTING: ::c_int = 43;
-/// IP6 fragmentation header
-pub const IPPROTO_FRAGMENT: ::c_int = 44;
-/// resource reservation
-pub const IPPROTO_RSVP: ::c_int = 46;
-/// General Routing Encap.
-pub const IPPROTO_GRE: ::c_int = 47;
-/// IP6 Encap Sec. Payload
-pub const IPPROTO_ESP: ::c_int = 50;
-/// IP6 Auth Header
-pub const IPPROTO_AH: ::c_int = 51;
-/// IP Mobility RFC 2004
-pub const IPPROTO_MOBILE: ::c_int = 55;
-/// IPv6 ICMP
-pub const IPPROTO_IPV6_ICMP: ::c_int = 58;
-// IPPROTO_ICMPV6 defined in src/unix/mod.rs
-/// IP6 no next header
-pub const IPPROTO_NONE: ::c_int = 59;
-/// IP6 destination option
-pub const IPPROTO_DSTOPTS: ::c_int = 60;
-/// ISO cnlp
-pub const IPPROTO_EON: ::c_int = 80;
-/// Ethernet-in-IP
-pub const IPPROTO_ETHERIP: ::c_int = 97;
-/// encapsulation header
-pub const IPPROTO_ENCAP: ::c_int = 98;
-/// Protocol indep. multicast
-pub const IPPROTO_PIM: ::c_int = 103;
-/// IP Payload Comp. Protocol
-pub const IPPROTO_IPCOMP: ::c_int = 108;
-/// VRRP RFC 2338
-pub const IPPROTO_VRRP: ::c_int = 112;
-/// Common Address Resolution Protocol
-pub const IPPROTO_CARP: ::c_int = 112;
-/// L2TPv3
-// TEMP: Disabled for now; this constant was added to NetBSD on 2017-02-16,
-// but isn't yet supported by the NetBSD rumprun kernel image used for
-// libc testing.
-//pub const IPPROTO_L2TP: ::c_int = 115;
-/// SCTP
-pub const IPPROTO_SCTP: ::c_int = 132;
-/// PFSYNC
-pub const IPPROTO_PFSYNC: ::c_int = 240;
-pub const IPPROTO_MAX: ::c_int = 256;
-
-/// last return value of *_input(), meaning "all job for this pkt is done".
-pub const IPPROTO_DONE: ::c_int = 257;
-
-/// sysctl placeholder for (FAST_)IPSEC
-pub const CTL_IPPROTO_IPSEC: ::c_int = 258;
-
 pub const AF_OROUTE: ::c_int = 17;
 pub const AF_ARP: ::c_int = 28;
 pub const pseudo_AF_KEY: ::c_int = 29;
 pub const pseudo_AF_HDRCMPLT: ::c_int = 30;
 pub const AF_BLUETOOTH: ::c_int = 31;
 pub const AF_IEEE80211: ::c_int = 32;
 pub const AF_MPLS: ::c_int = 33;
 pub const AF_ROUTE: ::c_int = 34;
@@ -460,160 +344,52 @@ pub const SCM_CREDS: ::c_int = 0x10;
 
 pub const O_DSYNC : ::c_int = 0x10000;
 
 pub const MAP_RENAME : ::c_int = 0x20;
 pub const MAP_NORESERVE : ::c_int = 0x40;
 pub const MAP_HASSEMAPHORE : ::c_int = 0x200;
 pub const MAP_WIRED: ::c_int = 0x800;
 
-pub const DCCP_TYPE_REQUEST: ::c_int = 0;
-pub const DCCP_TYPE_RESPONSE: ::c_int = 1;
-pub const DCCP_TYPE_DATA: ::c_int = 2;
-pub const DCCP_TYPE_ACK: ::c_int = 3;
-pub const DCCP_TYPE_DATAACK: ::c_int =  4;
-pub const DCCP_TYPE_CLOSEREQ: ::c_int = 5;
-pub const DCCP_TYPE_CLOSE: ::c_int = 6;
-pub const DCCP_TYPE_RESET: ::c_int = 7;
-pub const DCCP_TYPE_MOVE: ::c_int = 8;
-
-pub const DCCP_FEATURE_CC: ::c_int = 1;
-pub const DCCP_FEATURE_ECN: ::c_int = 2;
-pub const DCCP_FEATURE_ACKRATIO: ::c_int =  3;
-pub const DCCP_FEATURE_ACKVECTOR: ::c_int = 4;
-pub const DCCP_FEATURE_MOBILITY: ::c_int =  5;
-pub const DCCP_FEATURE_LOSSWINDOW: ::c_int = 6;
-pub const DCCP_FEATURE_CONN_NONCE: ::c_int = 8;
-pub const DCCP_FEATURE_IDENTREG: ::c_int =  7;
-
-pub const DCCP_OPT_PADDING: ::c_int = 0;
-pub const DCCP_OPT_DATA_DISCARD: ::c_int = 1;
-pub const DCCP_OPT_SLOW_RECV: ::c_int = 2;
-pub const DCCP_OPT_BUF_CLOSED: ::c_int = 3;
-pub const DCCP_OPT_CHANGE_L: ::c_int = 32;
-pub const DCCP_OPT_CONFIRM_L: ::c_int = 33;
-pub const DCCP_OPT_CHANGE_R: ::c_int = 34;
-pub const DCCP_OPT_CONFIRM_R: ::c_int = 35;
-pub const DCCP_OPT_INIT_COOKIE: ::c_int = 36;
-pub const DCCP_OPT_NDP_COUNT: ::c_int = 37;
-pub const DCCP_OPT_ACK_VECTOR0: ::c_int = 38;
-pub const DCCP_OPT_ACK_VECTOR1: ::c_int = 39;
-pub const DCCP_OPT_RECV_BUF_DROPS: ::c_int = 40;
-pub const DCCP_OPT_TIMESTAMP: ::c_int = 41;
-pub const DCCP_OPT_TIMESTAMP_ECHO: ::c_int = 42;
-pub const DCCP_OPT_ELAPSEDTIME: ::c_int = 43;
-pub const DCCP_OPT_DATACHECKSUM: ::c_int = 44;
-
-pub const DCCP_REASON_UNSPEC: ::c_int = 0;
-pub const DCCP_REASON_CLOSED: ::c_int = 1;
-pub const DCCP_REASON_INVALID: ::c_int = 2;
-pub const DCCP_REASON_OPTION_ERR: ::c_int = 3;
-pub const DCCP_REASON_FEA_ERR: ::c_int = 4;
-pub const DCCP_REASON_CONN_REF: ::c_int = 5;
-pub const DCCP_REASON_BAD_SNAME: ::c_int = 6;
-pub const DCCP_REASON_BAD_COOKIE: ::c_int = 7;
-pub const DCCP_REASON_INV_MOVE: ::c_int = 8;
-pub const DCCP_REASON_UNANSW_CH: ::c_int = 10;
-pub const DCCP_REASON_FRUITLESS_NEG: ::c_int = 11;
-
-pub const DCCP_CCID: ::c_int = 1;
-pub const DCCP_CSLEN: ::c_int = 2;
-pub const DCCP_MAXSEG: ::c_int = 4;
-pub const DCCP_SERVICE: ::c_int = 8;
-
-pub const DCCP_NDP_LIMIT: ::c_int = 16;
-pub const DCCP_SEQ_NUM_LIMIT: ::c_int = 16777216;
-pub const DCCP_MAX_OPTIONS: ::c_int = 32;
-pub const DCCP_MAX_PKTS: ::c_int = 100;
-
-pub const _PC_LINK_MAX : ::c_int = 1;
-pub const _PC_MAX_CANON : ::c_int = 2;
-pub const _PC_MAX_INPUT : ::c_int = 3;
-pub const _PC_NAME_MAX : ::c_int = 4;
-pub const _PC_PATH_MAX : ::c_int = 5;
-pub const _PC_PIPE_BUF : ::c_int = 6;
-pub const _PC_CHOWN_RESTRICTED : ::c_int = 7;
-pub const _PC_NO_TRUNC : ::c_int = 8;
-pub const _PC_VDISABLE : ::c_int = 9;
-pub const _PC_SYNC_IO : ::c_int = 10;
-pub const _PC_FILESIZEBITS : ::c_int = 11;
-pub const _PC_SYMLINK_MAX : ::c_int = 12;
-pub const _PC_2_SYMLINKS : ::c_int = 13;
-pub const _PC_ACL_EXTENDED : ::c_int = 14;
-pub const _PC_MIN_HOLE_SIZE : ::c_int = 15;
-
-pub const _SC_SYNCHRONIZED_IO : ::c_int = 31;
 pub const _SC_IOV_MAX : ::c_int = 32;
+pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 47;
+pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 48;
+pub const _SC_LOGIN_NAME_MAX : ::c_int = 37;
+pub const _SC_MQ_PRIO_MAX : ::c_int = 55;
+pub const _SC_NPROCESSORS_ONLN : ::c_int = 1002;
+pub const _SC_THREADS : ::c_int = 41;
+pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 61;
+pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 62;
+pub const _SC_THREAD_DESTRUCTOR_ITERATIONS : ::c_int = 57;
+pub const _SC_THREAD_KEYS_MAX : ::c_int = 58;
+pub const _SC_THREAD_PRIO_INHERIT : ::c_int = 64;
+pub const _SC_THREAD_PRIO_PROTECT : ::c_int = 65;
+pub const _SC_THREAD_PRIORITY_SCHEDULING : ::c_int = 63;
+pub const _SC_THREAD_PROCESS_SHARED : ::c_int = 66;
+pub const _SC_THREAD_SAFE_FUNCTIONS : ::c_int = 67;
+pub const _SC_THREAD_STACK_MIN : ::c_int = 59;
+pub const _SC_THREAD_THREADS_MAX : ::c_int = 60;
+pub const _SC_TTY_NAME_MAX : ::c_int = 68;
+pub const _SC_ATEXIT_MAX : ::c_int = 40;
+pub const _SC_CLK_TCK : ::c_int = 39;
+pub const _SC_AIO_LISTIO_MAX : ::c_int = 51;
+pub const _SC_AIO_MAX : ::c_int = 52;
+pub const _SC_ASYNCHRONOUS_IO : ::c_int = 50;
 pub const _SC_MAPPED_FILES : ::c_int = 33;
 pub const _SC_MEMLOCK : ::c_int = 34;
 pub const _SC_MEMLOCK_RANGE : ::c_int = 35;
 pub const _SC_MEMORY_PROTECTION : ::c_int = 36;
-pub const _SC_LOGIN_NAME_MAX : ::c_int = 37;
-pub const _SC_MONOTONIC_CLOCK : ::c_int = 38;
-pub const _SC_CLK_TCK : ::c_int = 39;
-pub const _SC_ATEXIT_MAX : ::c_int = 40;
-pub const _SC_THREADS : ::c_int = 41;
-pub const _SC_SEMAPHORES : ::c_int = 42;
-pub const _SC_BARRIERS : ::c_int = 43;
-pub const _SC_TIMERS : ::c_int = 44;
-pub const _SC_SPIN_LOCKS : ::c_int = 45;
-pub const _SC_READER_WRITER_LOCKS : ::c_int = 46;
-pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 47;
-pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 48;
-pub const _SC_CLOCK_SELECTION : ::c_int = 49;
-pub const _SC_ASYNCHRONOUS_IO : ::c_int = 50;
-pub const _SC_AIO_LISTIO_MAX : ::c_int = 51;
-pub const _SC_AIO_MAX : ::c_int = 52;
 pub const _SC_MESSAGE_PASSING : ::c_int = 53;
 pub const _SC_MQ_OPEN_MAX : ::c_int = 54;
-pub const _SC_MQ_PRIO_MAX : ::c_int = 55;
 pub const _SC_PRIORITY_SCHEDULING : ::c_int = 56;
-pub const _SC_THREAD_DESTRUCTOR_ITERATIONS : ::c_int = 57;
-pub const _SC_THREAD_KEYS_MAX : ::c_int = 58;
-pub const _SC_THREAD_STACK_MIN : ::c_int = 59;
-pub const _SC_THREAD_THREADS_MAX : ::c_int = 60;
-pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 61;
-pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 62;
-pub const _SC_THREAD_PRIORITY_SCHEDULING : ::c_int = 63;
-pub const _SC_THREAD_PRIO_INHERIT : ::c_int = 64;
-pub const _SC_THREAD_PRIO_PROTECT : ::c_int = 65;
-pub const _SC_THREAD_PROCESS_SHARED : ::c_int = 66;
-pub const _SC_THREAD_SAFE_FUNCTIONS : ::c_int = 67;
-pub const _SC_TTY_NAME_MAX : ::c_int = 68;
+pub const _SC_SEMAPHORES : ::c_int = 42;
+pub const _SC_SHARED_MEMORY_OBJECTS : ::c_int = 87;
+pub const _SC_SYNCHRONIZED_IO : ::c_int = 31;
+pub const _SC_TIMERS : ::c_int = 44;
 pub const _SC_HOST_NAME_MAX : ::c_int = 69;
-pub const _SC_PASS_MAX : ::c_int = 70;
-pub const _SC_REGEXP : ::c_int = 71;
-pub const _SC_SHELL : ::c_int = 72;
-pub const _SC_SYMLOOP_MAX : ::c_int = 73;
-pub const _SC_V6_ILP32_OFF32 : ::c_int = 74;
-pub const _SC_V6_ILP32_OFFBIG : ::c_int = 75;
-pub const _SC_V6_LP64_OFF64 : ::c_int = 76;
-pub const _SC_V6_LPBIG_OFFBIG : ::c_int = 77;
-pub const _SC_2_PBS : ::c_int = 80;
-pub const _SC_2_PBS_ACCOUNTING : ::c_int = 81;
-pub const _SC_2_PBS_CHECKPOINT : ::c_int = 82;
-pub const _SC_2_PBS_LOCATE : ::c_int = 83;
-pub const _SC_2_PBS_MESSAGE : ::c_int = 84;
-pub const _SC_2_PBS_TRACK : ::c_int = 85;
-pub const _SC_SPAWN : ::c_int = 86;
-pub const _SC_SHARED_MEMORY_OBJECTS : ::c_int = 87;
-pub const _SC_TIMER_MAX : ::c_int = 88;
-pub const _SC_SEM_NSEMS_MAX : ::c_int = 89;
-pub const _SC_CPUTIME : ::c_int = 90;
-pub const _SC_THREAD_CPUTIME : ::c_int = 91;
-pub const _SC_DELAYTIMER_MAX : ::c_int = 92;
-// These two variables will be supported in NetBSD 8.0
-// pub const _SC_SIGQUEUE_MAX : ::c_int = 93;
-// pub const _SC_REALTIME_SIGNALS : ::c_int = 94;
-pub const _SC_PHYS_PAGES : ::c_int = 121;
-pub const _SC_NPROCESSORS_CONF : ::c_int = 1001;
-pub const _SC_NPROCESSORS_ONLN : ::c_int = 1002;
-pub const _SC_SCHED_RT_TS : ::c_int = 2001;
-pub const _SC_SCHED_PRI_MIN : ::c_int = 2002;
-pub const _SC_SCHED_PRI_MAX : ::c_int = 2003;
 
 pub const FD_SETSIZE: usize = 0x100;
 
 pub const ST_NOSUID: ::c_ulong = 8;
 
 pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
     ptm_magic: 0x33330003,
     ptm_errorcheck: 0,
@@ -644,23 +420,23 @@ pub const PTHREAD_RWLOCK_INITIALIZER: pt
     ptr_owner: 0,
     ptr_private: 0 as *mut _,
 };
 pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
 pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 1;
 pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2;
 pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
 
-pub const EVFILT_AIO: ::uint32_t = 2;
-pub const EVFILT_PROC: ::uint32_t = 4;
-pub const EVFILT_READ: ::uint32_t = 0;
-pub const EVFILT_SIGNAL: ::uint32_t = 5;
-pub const EVFILT_TIMER: ::uint32_t = 6;
-pub const EVFILT_VNODE: ::uint32_t = 3;
-pub const EVFILT_WRITE: ::uint32_t = 1;
+pub const EVFILT_AIO: ::int32_t = 2;
+pub const EVFILT_PROC: ::int32_t = 4;
+pub const EVFILT_READ: ::int32_t = 0;
+pub const EVFILT_SIGNAL: ::int32_t = 5;
+pub const EVFILT_TIMER: ::int32_t = 6;
+pub const EVFILT_VNODE: ::int32_t = 3;
+pub const EVFILT_WRITE: ::int32_t = 1;
 
 pub const EV_ADD: ::uint32_t = 0x1;
 pub const EV_DELETE: ::uint32_t = 0x2;
 pub const EV_ENABLE: ::uint32_t = 0x4;
 pub const EV_DISABLE: ::uint32_t = 0x8;
 pub const EV_ONESHOT: ::uint32_t = 0x10;
 pub const EV_CLEAR: ::uint32_t = 0x20;
 pub const EV_RECEIPT: ::uint32_t = 0x40;
@@ -682,16 +458,18 @@ pub const NOTE_EXIT: ::uint32_t = 0x8000
 pub const NOTE_FORK: ::uint32_t = 0x40000000;
 pub const NOTE_EXEC: ::uint32_t = 0x20000000;
 pub const NOTE_PDATAMASK: ::uint32_t = 0x000fffff;
 pub const NOTE_PCTRLMASK: ::uint32_t = 0xf0000000;
 pub const NOTE_TRACK: ::uint32_t = 0x00000001;
 pub const NOTE_TRACKERR: ::uint32_t = 0x00000002;
 pub const NOTE_CHILD: ::uint32_t = 0x00000004;
 
+pub const CRTSCTS: ::tcflag_t = 0x00010000;
+
 pub const TMP_MAX : ::c_uint = 308915776;
 
 pub const NI_MAXHOST: ::socklen_t = 1025;
 
 pub const RTLD_NOLOAD: ::c_int = 0x2000;
 pub const RTLD_LOCAL: ::c_int = 0x200;
 
 pub const CTL_MAXNAME: ::c_int = 12;
@@ -833,21 +611,16 @@ pub const KERN_PROC_ALL: ::c_int = 0;
 pub const KERN_PROC_PID: ::c_int = 1;
 pub const KERN_PROC_PGRP: ::c_int = 2;
 pub const KERN_PROC_SESSION: ::c_int = 3;
 pub const KERN_PROC_TTY: ::c_int = 4;
 pub const KERN_PROC_UID: ::c_int = 5;
 pub const KERN_PROC_RUID: ::c_int = 6;
 pub const KERN_PROC_GID: ::c_int = 7;
 pub const KERN_PROC_RGID: ::c_int = 8;
-pub const KERN_PROC_ARGV: ::c_int = 1;
-pub const KERN_PROC_NARGV: ::c_int = 2;
-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_SYSTEM: ::c_int = 11;
 
 pub const AIO_CANCELED: ::c_int = 1;
 pub const AIO_NOTCANCELED: ::c_int = 2;
 pub const AIO_ALLDONE: ::c_int = 3;
 pub const LIO_NOP: ::c_int = 0;
 pub const LIO_WRITE: ::c_int = 1;
@@ -866,35 +639,23 @@ pub const WNOWAIT: ::c_int = 0x00010000;
 
 pub const P_ALL: idtype_t = 0;
 pub const P_PID: idtype_t = 1;
 pub const P_PGID: idtype_t = 4;
 
 pub const B460800: ::speed_t = 460800;
 pub const B921600: ::speed_t = 921600;
 
-pub const ONOCR: ::tcflag_t = 0x20;
-pub const ONLRET: ::tcflag_t = 0x40;
-pub const CDTRCTS: ::tcflag_t = 0x00020000;
-pub const CHWFLOW: ::tcflag_t = ::MDMBUF | ::CRTSCTS | ::CDTRCTS;
-
-pub const SOCK_CLOEXEC: ::c_int = 0x10000000;
-pub const SOCK_NONBLOCK: ::c_int = 0x20000000;
-
 // dirfd() is a macro on netbsd to access
 // the first field of the struct where dirp points to:
 // 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) }
     }
-
-    pub fn WIFCONTINUED(status: ::c_int) -> bool {
-        status == 0xffff
-    }
 }
 
 extern {
     pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int;
     pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
     pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
     pub fn aio_error(aiocbp: *const aiocb) -> ::c_int;
     pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t;
@@ -936,17 +697,17 @@ extern {
                   nevents: ::size_t,
                   timeout: *const ::timespec) -> ::c_int;
     #[link_name = "__mount50"]
     pub fn mount(src: *const ::c_char,
                  target: *const ::c_char,
                  flags: ::c_int,
                  data: *mut ::c_void,
                  size: ::size_t) -> ::c_int;
-    pub fn ptrace(request: ::c_int,
+    pub fn ptrace(requeset: ::c_int,
                   pid: ::pid_t,
                   addr: *mut ::c_void,
                   data: ::c_int) -> ::c_int;
     pub fn pthread_setname_np(t: ::pthread_t,
                               name: *const ::c_char,
                               arg: *mut ::c_void) -> ::c_int;
     pub fn pthread_getattr_np(native: ::pthread_t,
                               attr: *mut ::pthread_attr_t) -> ::c_int;
--- a/third_party/rust/libc/src/unix/bsd/netbsdlike/openbsdlike/mod.rs
+++ b/third_party/rust/libc/src/unix/bsd/netbsdlike/openbsdlike/mod.rs
@@ -1,24 +1,21 @@
-use unix::bsd::O_SYNC;
-
 pub type clock_t = i64;
 pub type suseconds_t = ::c_long;
 pub type dev_t = i32;
 pub type sigset_t = ::c_uint;
 pub type blksize_t = ::int32_t;
 pub type fsblkcnt_t = ::uint64_t;
 pub type fsfilcnt_t = ::uint64_t;
 pub type pthread_attr_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;
 pub type pthread_condattr_t = *mut ::c_void;
 pub type pthread_rwlock_t = *mut ::c_void;
-pub type pthread_rwlockattr_t = *mut ::c_void;
 
 s! {
     pub struct dirent {
         pub d_fileno: ::ino_t,
         pub d_off: ::off_t,
         pub d_reclen: u16,
         pub d_type: u8,
         pub d_namlen: u8,
@@ -131,73 +128,29 @@ s! {
     }
 
     pub struct utmp {
         pub ut_line: [::c_char; UT_LINESIZE],
         pub ut_name: [::c_char; UT_NAMESIZE],
         pub ut_host: [::c_char; UT_HOSTSIZE],
         pub ut_time: ::time_t,
     }
-
-    pub struct if_data {
-        pub ifi_type: ::c_uchar,
-        pub ifi_addrlen: ::c_uchar,
-        pub ifi_hdrlen: ::c_uchar,
-        pub ifi_link_state: ::c_uchar,
-        pub ifi_mtu: u32,
-        pub ifi_metric: u32,
-        pub ifi_rdomain: u32,
-        pub ifi_baudrate: u64,
-        pub ifi_ipackets: u64,
-        pub ifi_ierrors: u64,
-        pub ifi_opackets: u64,
-        pub ifi_oerrors: u64,
-        pub ifi_collisions: u64,
-        pub ifi_ibytes: u64,
-        pub ifi_obytes: u64,
-        pub ifi_imcasts: u64,
-        pub ifi_omcasts: u64,
-        pub ifi_iqdrops: u64,
-        pub ifi_oqdrops: u64,
-        pub ifi_noproto: u64,
-        pub ifi_capabilities: u32,
-        pub ifi_lastchange: ::timeval,
-    }
-
-    pub struct if_msghdr {
-        pub ifm_msglen: ::c_ushort,
-        pub ifm_version: ::c_uchar,
-        pub ifm_type: ::c_uchar,
-        pub ifm_hdrlen: ::c_ushort,
-        pub ifm_index: ::c_ushort,
-        pub ifm_tableid: ::c_ushort,
-        pub ifm_pad1: ::c_uchar,
-        pub ifm_pad2: ::c_uchar,
-        pub ifm_addrs: ::c_int,
-        pub ifm_flags: ::c_int,
-        pub ifm_xflags: ::c_int,
-        pub ifm_data: if_data,
-    }
 }
 
 pub const UT_NAMESIZE: usize = 32;
 pub const UT_LINESIZE: usize = 8;
 pub const UT_HOSTSIZE: usize = 256;
 
 pub const O_CLOEXEC: ::c_int = 0x10000;
-pub const O_DIRECTORY: ::c_int = 0x20000;
-pub const O_RSYNC: ::c_int = O_SYNC;
 
 pub const MS_SYNC : ::c_int = 0x0002;
 pub const MS_INVALIDATE : ::c_int = 0x0004;
 
 pub const PTHREAD_STACK_MIN : ::size_t = 2048;
 
-pub const POLLNORM: ::c_short = ::POLLRDNORM;
-
 pub const ENOATTR : ::c_int = 83;
 pub const EILSEQ : ::c_int = 84;
 pub const EOVERFLOW : ::c_int = 87;
 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;
@@ -207,91 +160,24 @@ pub const F_DUPFD_CLOEXEC : ::c_int = 10
 pub const AT_FDCWD: ::c_int = -100;
 pub const AT_EACCESS: ::c_int = 0x01;
 pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x02;
 pub const AT_SYMLINK_FOLLOW: ::c_int = 0x04;
 pub const AT_REMOVEDIR: ::c_int = 0x08;
 
 pub const RLIM_NLIMITS: ::c_int = 9;
 
-pub const SO_TIMESTAMP: ::c_int = 0x0800;
 pub const SO_SNDTIMEO: ::c_int = 0x1005;
 pub const SO_RCVTIMEO: ::c_int = 0x1006;
 pub const SO_BINDANY: ::c_int = 0x1000;
 pub const SO_NETPROC: ::c_int = 0x1020;
 pub const SO_RTABLE: ::c_int = 0x1021;
 pub const SO_PEERCRED: ::c_int = 0x1022;
 pub const SO_SPLICE: ::c_int = 0x1023;
 
-// sys/netinet/in.h
-// Protocols (RFC 1700)
-// NOTE: These are in addition to the constants defined in src/unix/mod.rs
-
-// IPPROTO_IP defined in src/unix/mod.rs
-/// Hop-by-hop option header
-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)
-pub const IPPROTO_GGP: ::c_int = 3;
-/// for compatibility
-pub const IPPROTO_IPIP: ::c_int = 4;
-// IPPROTO_TCP defined in src/unix/mod.rs
-/// exterior gateway protocol
-pub const IPPROTO_EGP: ::c_int = 8;
-/// pup
-pub const IPPROTO_PUP: ::c_int = 12;
-// IPPROTO_UDP defined in src/unix/mod.rs
-/// xns idp
-pub const IPPROTO_IDP: ::c_int = 22;
-/// tp-4 w/ class negotiation
-pub const IPPROTO_TP: ::c_int = 29;
-// IPPROTO_IPV6 defined in src/unix/mod.rs
-/// IP6 routing header
-pub const IPPROTO_ROUTING: ::c_int = 43;
-/// IP6 fragmentation header
-pub const IPPROTO_FRAGMENT: ::c_int = 44;
-/// resource reservation
-pub const IPPROTO_RSVP: ::c_int = 46;
-/// General Routing Encap.
-pub const IPPROTO_GRE: ::c_int = 47;
-/// IP6 Encap Sec. Payload
-pub const IPPROTO_ESP: ::c_int = 50;
-/// IP6 Auth Header
-pub const IPPROTO_AH: ::c_int = 51;
-/// IP Mobility RFC 2004
-pub const IPPROTO_MOBILE: ::c_int = 55;
-// IPPROTO_ICMPV6 defined in src/unix/mod.rs
-/// IP6 no next header
-pub const IPPROTO_NONE: ::c_int = 59;
-/// IP6 destination option
-pub const IPPROTO_DSTOPTS: ::c_int = 60;
-/// ISO cnlp
-pub const IPPROTO_EON: ::c_int = 80;
-/// Ethernet-in-IP
-pub const IPPROTO_ETHERIP: ::c_int = 97;
-/// encapsulation header
-pub const IPPROTO_ENCAP: ::c_int = 98;
-/// Protocol indep. multicast
-pub const IPPROTO_PIM: ::c_int = 103;
-/// IP Payload Comp. Protocol
-pub const IPPROTO_IPCOMP: ::c_int = 108;
-/// CARP
-pub const IPPROTO_CARP: ::c_int = 112;
-/// unicast MPLS packet
-pub const IPPROTO_MPLS: ::c_int = 137;
-/// PFSYNC
-pub const IPPROTO_PFSYNC: ::c_int = 240;
-pub const IPPROTO_MAX: ::c_int = 256;
-
-/* Only used internally, so it can be outside the range of valid IP protocols */
-/// Divert sockets
-pub const IPPROTO_DIVERT: ::c_int = 258;
-
 pub const AF_ECMA: ::c_int = 8;
 pub const AF_ROUTE: ::c_int = 17;
 pub const AF_ENCAP: ::c_int = 28;
 pub const AF_SIP: ::c_int = 29;
 pub const AF_KEY: ::c_int = 30;
 pub const pseudo_AF_HDRCMPLT: ::c_int = 31;
 pub const AF_BLUETOOTH: ::c_int = 32;
 pub const AF_MPLS: ::c_int = 33;
@@ -341,138 +227,68 @@ pub const EMEDIUMTYPE : ::c_int = 86;
 
 pub const EAI_SYSTEM: ::c_int = -11;
 
 pub const RUSAGE_THREAD: ::c_int = 1;
 
 pub const MAP_COPY : ::c_int = 0x0002;
 pub const MAP_NOEXTEND : ::c_int = 0x0000;
 
-pub const _PC_LINK_MAX : ::c_int = 1;
-pub const _PC_MAX_CANON : ::c_int = 2;
-pub const _PC_MAX_INPUT : ::c_int = 3;
-pub const _PC_NAME_MAX : ::c_int = 4;
-pub const _PC_PATH_MAX : ::c_int = 5;
-pub const _PC_PIPE_BUF : ::c_int = 6;
-pub const _PC_CHOWN_RESTRICTED : ::c_int = 7;
-pub const _PC_NO_TRUNC : ::c_int = 8;
-pub const _PC_VDISABLE : ::c_int = 9;
-pub const _PC_2_SYMLINKS : ::c_int = 10;
-pub const _PC_ALLOC_SIZE_MIN : ::c_int = 11;
-pub const _PC_ASYNC_IO : ::c_int = 12;
-pub const _PC_FILESIZEBITS : ::c_int = 13;
-pub const _PC_PRIO_IO : ::c_int = 14;
-pub const _PC_REC_INCR_XFER_SIZE : ::c_int = 15;
-pub const _PC_REC_MAX_XFER_SIZE : ::c_int = 16;
-pub const _PC_REC_MIN_XFER_SIZE : ::c_int = 17;
-pub const _PC_REC_XFER_ALIGN : ::c_int = 18;
-pub const _PC_SYMLINK_MAX : ::c_int = 19;
-pub const _PC_SYNC_IO : ::c_int = 20;
-pub const _PC_TIMESTAMP_RESOLUTION : ::c_int = 21;
-
 pub const _SC_CLK_TCK : ::c_int = 3;
-pub const _SC_SEM_NSEMS_MAX : ::c_int = 31;
-pub const _SC_SEM_VALUE_MAX : ::c_int = 32;
-pub const _SC_HOST_NAME_MAX : ::c_int = 33;
-pub const _SC_MONOTONIC_CLOCK : ::c_int = 34;
-pub const _SC_2_PBS : ::c_int = 35;
-pub const _SC_2_PBS_ACCOUNTING : ::c_int = 36;
-pub const _SC_2_PBS_CHECKPOINT : ::c_int = 37;
-pub const _SC_2_PBS_LOCATE : ::c_int = 38;
-pub const _SC_2_PBS_MESSAGE : ::c_int = 39;
-pub const _SC_2_PBS_TRACK : ::c_int = 40;
-pub const _SC_ADVISORY_INFO : ::c_int = 41;
+pub const _SC_IOV_MAX : ::c_int = 51;
+pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 100;
+pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 101;
+pub const _SC_LOGIN_NAME_MAX : ::c_int = 102;
+pub const _SC_MQ_PRIO_MAX : ::c_int = 59;
+pub const _SC_NPROCESSORS_ONLN : ::c_int = 503;
+pub const _SC_THREADS : ::c_int = 91;
+pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 77;
+pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 78;
+pub const _SC_THREAD_DESTRUCTOR_ITERATIONS : ::c_int = 80;
+pub const _SC_THREAD_KEYS_MAX : ::c_int = 81;
+pub const _SC_THREAD_PRIO_INHERIT : ::c_int = 82;
+pub const _SC_THREAD_PRIO_PROTECT : ::c_int = 83;
+pub const _SC_THREAD_PRIORITY_SCHEDULING : ::c_int = 84;
+pub const _SC_THREAD_PROCESS_SHARED : ::c_int = 85;
+pub const _SC_THREAD_SAFE_FUNCTIONS : ::c_int = 103;
+pub const _SC_THREAD_STACK_MIN : ::c_int = 89;
+pub const _SC_THREAD_THREADS_MAX : ::c_int = 90;
+pub const _SC_TTY_NAME_MAX : ::c_int = 107;
+pub const _SC_ATEXIT_MAX : ::c_int = 46;
 pub const _SC_AIO_LISTIO_MAX : ::c_int = 42;
 pub const _SC_AIO_MAX : ::c_int = 43;
-pub const _SC_AIO_PRIO_DELTA_MAX : ::c_int = 44;
 pub const _SC_ASYNCHRONOUS_IO : ::c_int = 45;
-pub const _SC_ATEXIT_MAX : ::c_int = 46;
-pub const _SC_BARRIERS : ::c_int = 47;
-pub const _SC_CLOCK_SELECTION : ::c_int = 48;
-pub const _SC_CPUTIME : ::c_int = 49;
-pub const _SC_DELAYTIMER_MAX : ::c_int = 50;
-pub const _SC_IOV_MAX : ::c_int = 51;
-pub const _SC_IPV6 : ::c_int = 52;
 pub const _SC_MAPPED_FILES : ::c_int = 53;
 pub const _SC_MEMLOCK : ::c_int = 54;
 pub const _SC_MEMLOCK_RANGE : ::c_int = 55;
 pub const _SC_MEMORY_PROTECTION : ::c_int = 56;
 pub const _SC_MESSAGE_PASSING : ::c_int = 57;
 pub const _SC_MQ_OPEN_MAX : ::c_int = 58;
-pub const _SC_MQ_PRIO_MAX : ::c_int = 59;
-pub const _SC_PRIORITIZED_IO : ::c_int = 60;
 pub const _SC_PRIORITY_SCHEDULING : ::c_int = 61;
-pub const _SC_RAW_SOCKETS : ::c_int = 62;
-pub const _SC_READER_WRITER_LOCKS : ::c_int = 63;
-pub const _SC_REALTIME_SIGNALS : ::c_int = 64;
-pub const _SC_REGEXP : ::c_int = 65;
-pub const _SC_RTSIG_MAX : ::c_int = 66;
 pub const _SC_SEMAPHORES : ::c_int = 67;
 pub const _SC_SHARED_MEMORY_OBJECTS : ::c_int = 68;
-pub const _SC_SHELL : ::c_int = 69;
-pub const _SC_SIGQUEUE_MAX : ::c_int = 70;
-pub const _SC_SPAWN : ::c_int = 71;
-pub const _SC_SPIN_LOCKS : ::c_int = 72;
-pub const _SC_SPORADIC_SERVER : ::c_int = 73;
-pub const _SC_SS_REPL_MAX : ::c_int = 74;
 pub const _SC_SYNCHRONIZED_IO : ::c_int = 75;
-pub const _SC_SYMLOOP_MAX : ::c_int = 76;
-pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 77;
-pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 78;
-pub const _SC_THREAD_CPUTIME : ::c_int = 79;
-pub const _SC_THREAD_DESTRUCTOR_ITERATIONS : ::c_int = 80;
-pub const _SC_THREAD_KEYS_MAX : ::c_int = 81;
-pub const _SC_THREAD_PRIO_INHERIT : ::c_int = 82;
-pub const _SC_THREAD_PRIO_PROTECT : ::c_int = 83;
-pub const _SC_THREAD_PRIORITY_SCHEDULING : ::c_int = 84;
-pub const _SC_THREAD_PROCESS_SHARED : ::c_int = 85;
-pub const _SC_THREAD_ROBUST_PRIO_INHERIT : ::c_int = 86;
-pub const _SC_THREAD_ROBUST_PRIO_PROTECT : ::c_int = 87;
-pub const _SC_THREAD_SPORADIC_SERVER : ::c_int = 88;
-pub const _SC_THREAD_STACK_MIN : ::c_int = 89;
-pub const _SC_THREAD_THREADS_MAX : ::c_int = 90;
-pub const _SC_THREADS : ::c_int = 91;
-pub const _SC_TIMEOUTS : ::c_int = 92;
-pub const _SC_TIMER_MAX : ::c_int = 93;
 pub const _SC_TIMERS : ::c_int = 94;
-pub const _SC_TRACE : ::c_int = 95;
-pub const _SC_TRACE_EVENT_FILTER : ::c_int = 96;
-pub const _SC_TRACE_EVENT_NAME_MAX : ::c_int = 97;
-pub const _SC_TRACE_INHERIT : ::c_int = 98;
-pub const _SC_TRACE_LOG : ::c_int = 99;
-pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 100;
-pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 101;
-pub const _SC_LOGIN_NAME_MAX : ::c_int = 102;
-pub const _SC_THREAD_SAFE_FUNCTIONS : ::c_int = 103;
-pub const _SC_TRACE_NAME_MAX : ::c_int = 104;
-pub const _SC_TRACE_SYS_MAX : ::c_int = 105;
-pub const _SC_TRACE_USER_EVENT_MAX : ::c_int = 106;
-pub const _SC_TTY_NAME_MAX : ::c_int = 107;
-pub const _SC_TYPED_MEMORY_OBJECTS : ::c_int = 108;
-pub const _SC_V6_ILP32_OFF32 : ::c_int = 109;
-pub const _SC_V6_ILP32_OFFBIG : ::c_int = 110;
-pub const _SC_V6_LP64_OFF64 : ::c_int = 111;
-pub const _SC_V6_LPBIG_OFFBIG : ::c_int = 112;
-pub const _SC_V7_ILP32_OFF32 : ::c_int = 113;
-pub const _SC_V7_ILP32_OFFBIG : ::c_int = 114;
-pub const _SC_V7_LP64_OFF64 : ::c_int = 115;
-pub const _SC_V7_LPBIG_OFFBIG : ::c_int = 116;
 pub const _SC_XOPEN_CRYPT : ::c_int = 117;
 pub const _SC_XOPEN_ENH_I18N : ::c_int = 118;
 pub const _SC_XOPEN_LEGACY : ::c_int = 119;
 pub const _SC_XOPEN_REALTIME : ::c_int = 120;
 pub const _SC_XOPEN_REALTIME_THREADS : ::c_int = 121;
-pub const _SC_XOPEN_STREAMS : ::c_int = 122;
 pub const _SC_XOPEN_UNIX : ::c_int = 123;
-pub const _SC_XOPEN_UUCP : ::c_int = 124;
 pub const _SC_XOPEN_VERSION : ::c_int = 125;
-pub const _SC_PHYS_PAGES : ::c_int = 500;
-pub const _SC_AVPHYS_PAGES : ::c_int = 501;
-pub const _SC_NPROCESSORS_CONF : ::c_int = 502;
-pub const _SC_NPROCESSORS_ONLN : ::c_int = 503;
+pub const _SC_SEM_NSEMS_MAX : ::c_int = 31;
+pub const _SC_SEM_VALUE_MAX : ::c_int = 32;
+pub const _SC_AIO_PRIO_DELTA_MAX : ::c_int = 44;
+pub const _SC_DELAYTIMER_MAX : ::c_int = 50;
+pub const _SC_PRIORITIZED_IO : ::c_int = 60;
+pub const _SC_REALTIME_SIGNALS : ::c_int = 64;
+pub const _SC_RTSIG_MAX : ::c_int = 66;
+pub const _SC_SIGQUEUE_MAX : ::c_int = 70;
+pub const _SC_TIMER_MAX : ::c_int = 93;
+pub const _SC_HOST_NAME_MAX : ::c_int = 33;
 
 pub const FD_SETSIZE: usize = 1024;
 
 pub const ST_NOSUID: ::c_ulong = 2;
 
 pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = 0 as *mut _;
 pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0 as *mut _;
 pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = 0 as *mut _;
@@ -492,18 +308,16 @@ pub const EVFILT_VNODE: ::int16_t = -4;
 pub const EVFILT_WRITE: ::int16_t = -2;
 
 pub const EV_ADD: ::uint16_t = 0x1;
 pub const EV_DELETE: ::uint16_t = 0x2;
 pub const EV_ENABLE: ::uint16_t = 0x4;
 pub const EV_DISABLE: ::uint16_t = 0x8;
 pub const EV_ONESHOT: ::uint16_t = 0x10;
 pub const EV_CLEAR: ::uint16_t = 0x20;
-pub const EV_RECEIPT: ::uint16_t = 0x40;
-pub const EV_DISPATCH: ::uint16_t = 0x80;
 pub const EV_FLAG1: ::uint16_t = 0x2000;
 pub const EV_ERROR: ::uint16_t = 0x4000;
 pub const EV_EOF: ::uint16_t = 0x8000;
 pub const EV_SYSFLAGS: ::uint16_t = 0xf000;
 
 pub const NOTE_LOWAT: ::uint32_t = 0x00000001;
 pub const NOTE_EOF: ::uint32_t = 0x00000002;
 pub const NOTE_DELETE: ::uint32_t = 0x00000001;
@@ -637,31 +451,16 @@ pub const KERN_PROC_NARGV: ::c_int = 2;
 pub const KERN_PROC_ENV: ::c_int = 3;
 pub const KERN_PROC_NENV: ::c_int = 4;
 pub const KI_NGROUPS: ::c_int = 16;
 pub const KI_MAXCOMLEN: ::c_int = 24;
 pub const KI_WMESGLEN: ::c_int = 8;
 pub const KI_MAXLOGNAME: ::c_int = 32;
 pub const KI_EMULNAMELEN: ::c_int = 8;
 
-pub const CHWFLOW: ::tcflag_t = ::MDMBUF | ::CRTSCTS;
-pub const OLCUC: ::tcflag_t = 0x20;
-pub const ONOCR: ::tcflag_t = 0x40;
-pub const ONLRET: ::tcflag_t = 0x80;
-
-pub const SOCK_CLOEXEC: ::c_int = 0x8000;
-pub const SOCK_NONBLOCK: ::c_int = 0x4000;
-pub const SOCK_DNS: ::c_int = 0x1000;
-
-f! {
-    pub fn WIFCONTINUED(status: ::c_int) -> bool {
-        status & 0o177777 == 0o177777
-    }
-}
-
 extern {
     pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
     pub fn getnameinfo(sa: *const ::sockaddr,
                        salen: ::socklen_t,
                        host: *mut ::c_char,
                        hostlen: ::size_t,
                        serv: *mut ::c_char,
                        servlen: ::size_t,
@@ -683,18 +482,16 @@ extern {
                   oldp: *mut ::c_void,
                   oldlenp: *mut ::size_t,
                   newp: *mut ::c_void,
                   newlen: ::size_t)
                   -> ::c_int;
     pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int;
     pub fn pledge(promises: *const ::c_char,
                   paths: *mut *const ::c_char) -> ::c_int;
-    pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int;
-    pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int;
 }
 
 cfg_if! {
     if #[cfg(target_os = "openbsd")] {
         mod openbsd;
         pub use self::openbsd::*;
     } else if #[cfg(target_os = "bitrig")] {
         mod bitrig;
--- a/third_party/rust/libc/src/unix/bsd/netbsdlike/openbsdlike/openbsd.rs
+++ b/third_party/rust/libc/src/unix/bsd/netbsdlike/openbsdlike/openbsd.rs
@@ -25,11 +25,9 @@ s! {
         pub int_p_sign_posn: ::c_char,
         pub int_n_sign_posn: ::c_char,
     }
 }
 
 extern {
     pub fn accept4(s: ::c_int, addr: *mut ::sockaddr,
                    addrlen: *mut ::socklen_t, flags: ::c_int) -> ::c_int;
-    pub fn execvpe(file: *const ::c_char, argv: *const *const ::c_char,
-                   envp: *const *const ::c_char) -> ::c_int;
 }
--- a/third_party/rust/libc/src/unix/haiku/b32.rs
+++ b/third_party/rust/libc/src/unix/haiku/b32.rs
@@ -1,3 +1,2 @@
 pub type c_long = i32;
 pub type c_ulong = u32;
-pub type time_t = i32;
--- a/third_party/rust/libc/src/unix/haiku/b64.rs
+++ b/third_party/rust/libc/src/unix/haiku/b64.rs
@@ -1,3 +1,2 @@
 pub type c_ulong = u64;
 pub type c_long = i64;
-pub type time_t = i64;
--- a/third_party/rust/libc/src/unix/haiku/mod.rs
+++ b/third_party/rust/libc/src/unix/haiku/mod.rs
@@ -4,30 +4,30 @@ pub type rlim_t = ::uintptr_t;
 pub type sa_family_t = u8;
 pub type pthread_key_t = ::c_int;
 pub type nfds_t = ::c_long;
 pub type tcflag_t = ::c_uint;
 pub type speed_t = ::c_uint;
 pub type c_char = i8;
 pub type clock_t = i32;
 pub type clockid_t = i32;
+pub type time_t = i32;
 pub type suseconds_t = i32;
 pub type wchar_t = i32;
 pub type off_t = i64;
 pub type ino_t = i64;
 pub type blkcnt_t = i64;
 pub type blksize_t = i32;
 pub type dev_t = i32;
 pub type mode_t = u32;
 pub type nlink_t = i32;
 pub type useconds_t = u32;
 pub type socklen_t = u32;
 pub type pthread_t = ::uintptr_t;
 pub type pthread_mutexattr_t = ::uintptr_t;
-pub type pthread_rwlockattr_t = ::uintptr_t;
 pub type sigset_t = u64;
 pub type fsblkcnt_t = i64;
 pub type fsfilcnt_t = i64;
 pub type pthread_attr_t = *mut ::c_void;
 pub type nl_item = ::c_int;
 pub type id_t = i32;
 pub type idtype_t = ::c_uint;
 
@@ -164,24 +164,16 @@ s! {
         pub c_cflag: ::tcflag_t,
         pub c_lflag: ::tcflag_t,
         pub c_line:  ::c_char,
         pub c_ispeed: ::speed_t,
         pub c_ospeed: ::speed_t,
         pub c_cc: [::cc_t; ::NCCS],
     }
 
-    pub struct flock {
-        pub l_type: ::c_short,
-        pub l_whence: ::c_short,
-        pub l_start: ::off_t,
-        pub l_len: ::off_t,
-        pub l_pid: ::pid_t,
-    }
-
     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_size: off_t,
@@ -293,24 +285,16 @@ s! {
 
     pub struct sigaction {
         pub sa_sigaction: ::sighandler_t,
         pub sa_mask: ::sigset_t,
         pub sa_flags: ::c_int,
         sa_userdata: *mut ::c_void,
     }
 
-    pub struct sigevent {
-        pub sigev_notify: ::c_int,
-        pub sigev_signo: ::c_int,
-        pub sigev_value: ::sigval,
-        __unused1: *mut ::c_void, // actually a function pointer
-        pub sigev_notify_attributes: *mut ::pthread_attr_t,
-    }
-
     pub struct sem_t {
         pub se_type: i32,
         pub se_named_id: i32, // this is actually a union
         pub se_unnamed: i32,
         pub se_padding: [i32; 4],
     }
 
     pub struct pthread_condattr_t {
@@ -341,37 +325,18 @@ pub const _IOFBF: ::c_int = 0;
 pub const _IONBF: ::c_int = 2;
 pub const _IOLBF: ::c_int = 1;
 
 pub const F_DUPFD: ::c_int = 0x0001;
 pub const F_GETFD: ::c_int = 0x0002;
 pub const F_SETFD: ::c_int = 0x0004;
 pub const F_GETFL: ::c_int = 0x0008;
 pub const F_SETFL: ::c_int = 0x0010;
-pub const F_GETLK: ::c_int = 0x0020;
-pub const F_SETLK: ::c_int = 0x0080;
-pub const F_SETLKW: ::c_int = 0x0100;
-pub const F_DUPFD_CLOEXEC: ::c_int = 0x0200;
 
-pub const AT_FDCWD: ::c_int = -1;
-pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x01;
-pub const AT_SYMLINK_FOLLOW: ::c_int = 0x02;
-pub const AT_REMOVEDIR: ::c_int = 0x04;
-pub const AT_EACCESS: ::c_int = 0x08;
-
-pub const POLLIN: ::c_short = 0x0001;
-pub const POLLOUT: ::c_short = 0x0002;
-pub const POLLRDNORM: ::c_short = POLLIN;
-pub const POLLWRNORM: ::c_short = POLLOUT;
-pub const POLLRDBAND: ::c_short = 0x0008;
-pub const POLLWRBAND: ::c_short = 0x0010;
-pub const POLLPRI: ::c_short = 0x0020;
-pub const POLLERR: ::c_short = 0x0004;
-pub const POLLHUP: ::c_short = 0x0080;
-pub const POLLNVAL: ::c_short = 0x1000;
+pub const SIGTRAP: ::c_int = 22;
 
 pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0;
 pub const PTHREAD_CREATE_DETACHED: ::c_int = 1;
 
 pub const CLOCK_REALTIME: ::c_int = -1;
 pub const CLOCK_MONOTONIC: ::c_int = 0;
 
 pub const RLIMIT_CORE: ::c_int = 0;
@@ -381,18 +346,16 @@ pub const RLIMIT_FSIZE: ::c_int = 3;
 pub const RLIMIT_NOFILE: ::c_int = 4;
 pub const RLIMIT_AS: ::c_int = 6;
 // Haiku specific
 pub const RLIMIT_NOVMON: ::c_int = 7;
 pub const RLIMIT_NLIMITS: ::c_int = 8;
 
 pub const RUSAGE_SELF: ::c_int = 0;
 
-pub const RTLD_LAXY: ::c_int = 0;
-
 pub const NCCS: usize = 11;
 
 pub const O_RDONLY: ::c_int = 0x0000;
 pub const O_WRONLY: ::c_int = 0x0001;
 pub const O_RDWR: ::c_int = 0x0002;
 pub const O_ACCMODE: ::c_int = 0x0003;
 
 pub const O_EXCL: ::c_int = 0x0100;
@@ -433,55 +396,27 @@ pub const S_IWOTH: ::mode_t = 2;
 pub const S_IROTH: ::mode_t = 4;
 pub const F_OK: ::c_int = 0;
 pub const R_OK: ::c_int = 4;
 pub const W_OK: ::c_int = 2;
 pub const X_OK: ::c_int = 1;
 pub const STDIN_FILENO: ::c_int = 0;
 pub const STDOUT_FILENO: ::c_int = 1;
 pub const STDERR_FILENO: ::c_int = 2;
-
 pub const SIGHUP: ::c_int = 1;
 pub const SIGINT: ::c_int = 2;
 pub const SIGQUIT: ::c_int = 3;
 pub const SIGILL: ::c_int = 4;
-pub const SIGCHLD: ::c_int = 5;
 pub const SIGABRT: ::c_int = 6;
-pub const SIGPIPE: ::c_int = 7;
 pub const SIGFPE: ::c_int = 8;
 pub const SIGKILL: ::c_int = 9;
-pub const SIGSTOP: ::c_int = 10;
 pub const SIGSEGV: ::c_int = 11;
-pub const SIGCONT: ::c_int = 12;
-pub const SIGTSTP: ::c_int = 13;
+pub const SIGPIPE: ::c_int = 7;
 pub const SIGALRM: ::c_int = 14;
 pub const SIGTERM: ::c_int = 15;
-pub const SIGTTIN: ::c_int = 16;
-pub const SIGTTOU: ::c_int = 17;
-pub const SIGUSR1: ::c_int = 18;
-pub const SIGUSR2: ::c_int = 19;
-pub const SIGWINCH: ::c_int = 20;
-pub const SIGKILLTHR: ::c_int = 21;
-pub const SIGTRAP: ::c_int = 22;
-pub const SIGPOLL: ::c_int = 23;
-pub const SIGPROF: ::c_int = 24;
-pub const SIGSYS: ::c_int = 25;
-pub const SIGURG: ::c_int = 26;
-pub const SIGVTALRM: ::c_int = 27;
-pub const SIGXCPU: ::c_int = 28;
-pub const SIGXFSZ: ::c_int = 29;
-pub const SIGBUS: ::c_int = 30;
-
-pub const SIG_BLOCK: ::c_int = 1;
-pub const SIG_UNBLOCK: ::c_int = 2;
-pub const SIG_SETMASK: ::c_int = 3;
-
-pub const SIGEV_NONE: ::c_int = 0;
-pub const SIGEV_SIGNAL: ::c_int = 1;
-pub const SIGEV_THREAD: ::c_int = 2;
 
 pub const EAI_SYSTEM: ::c_int = 11;
 
 pub const PROT_NONE: ::c_int = 0;
 pub const PROT_READ: ::c_int = 1;
 pub const PROT_WRITE: ::c_int = 2;
 pub const PROT_EXEC: ::c_int = 4;
 
@@ -492,141 +427,125 @@ pub const LC_MONETARY: ::c_int = 3;
 pub const LC_NUMERIC: ::c_int = 4;
 pub const LC_TIME: ::c_int = 5;
 pub const LC_MESSAGES: ::c_int = 6;
 
 // TODO: Haiku does not have MAP_FILE, but libstd/os.rs requires it
 pub const MAP_FILE: ::c_int = 0x00;
 pub const MAP_SHARED: ::c_int = 0x01;
 pub const MAP_PRIVATE: ::c_int = 0x02;
-pub const MAP_FIXED: ::c_int = 0x04;
-pub const MAP_ANONYMOUS: ::c_int = 0x08;
-pub const MAP_ANON: ::c_int = MAP_ANONYMOUS;
+pub const MAP_FIXED: ::c_int = 0x004;
 
 pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
 
 pub const MS_ASYNC: ::c_int = 0x01;
 pub const MS_INVALIDATE: ::c_int = 0x04;
 pub const MS_SYNC: ::c_int = 0x02;
 
+pub const EPERM : ::c_int = -2147483633;
+pub const ENOENT : ::c_int = -2147459069;
+pub const ESRCH : ::c_int = -2147454963;
+pub const EINTR : ::c_int = -2147483638;
+pub const EIO : ::c_int = -2147483647;
+pub const ENXIO : ::c_int = -2147454965;
 pub const E2BIG : ::c_int = -2147454975;
+pub const ENOEXEC : ::c_int = -2147478782;
+pub const EBADF : ::c_int = -2147459072;
 pub const ECHILD : ::c_int = -2147454974;
 pub const EDEADLK : ::c_int = -2147454973;
-pub const EFBIG : ::c_int = -2147454972;
-pub const EMLINK : ::c_int = -2147454971;
-pub const ENFILE : ::c_int = -2147454970;
+pub const ENOMEM : ::c_int = -2147454976;
+pub const EACCES : ::c_int = -2147483646;
+pub const EFAULT : ::c_int = -2147478783;
+// pub const ENOTBLK : ::c_int = 15;
+pub const EBUSY : ::c_int = -2147483634;
+pub const EEXIST : ::c_int = -2147459070;
+pub const EXDEV : ::c_int = -2147459061;
 pub const ENODEV : ::c_int = -2147454969;
-pub const ENOLCK : ::c_int = -2147454968;
-pub const ENOSYS : ::c_int = -2147454967;
+pub const ENOTDIR : ::c_int = -2147459067;
+pub const EISDIR : ::c_int = -2147459063;
+pub const EINVAL : ::c_int = -2147483643;
+pub const ENFILE : ::c_int = -2147454970;
+pub const EMFILE : ::c_int = -2147459062;
 pub const ENOTTY : ::c_int = -2147454966;
-pub const ENXIO : ::c_int = -2147454965;
+pub const ETXTBSY : ::c_int = -2147454917;
+pub const EFBIG : ::c_int = -2147454972;
+pub const ENOSPC : ::c_int = -2147459065;
 pub const ESPIPE : ::c_int = -2147454964;
-pub const ESRCH : ::c_int = -2147454963;
-pub const EFPOS : ::c_int = -2147457962;
-pub const ESIGPARM : ::c_int = -2147457961;
+pub const EROFS : ::c_int = -2147459064;
+pub const EMLINK : ::c_int = -2147454971;
+pub const EPIPE : ::c_int = -2147459059;
 pub const EDOM : ::c_int = -2147454960;
 pub const ERANGE : ::c_int = -2147454959;
+pub const EAGAIN : ::c_int = -2147483637;
+pub const EWOULDBLOCK : ::c_int = -2147483637;
+
+pub const EINPROGRESS : ::c_int = -2147454940;
+pub const EALREADY : ::c_int = -2147454939;
+pub const ENOTSOCK : ::c_int = -2147454932;
+pub const EDESTADDRREQ : ::c_int = -2147454928;
+pub const EMSGSIZE : ::c_int = -2147454934;
 pub const EPROTOTYPE : ::c_int = -2147454958;
+pub const ENOPROTOOPT : ::c_int = -2147454942;
 pub const EPROTONOSUPPORT : ::c_int = -2147454957;
+pub const EOPNOTSUPP : ::c_int = -2147454933;
 pub const EPFNOSUPPORT : ::c_int = -2147454956;
 pub const EAFNOSUPPORT : ::c_int = -2147454955;
 pub const EADDRINUSE : ::c_int = -2147454954;
 pub const EADDRNOTAVAIL : ::c_int = -2147454953;
-pub const ENETDOWN : ::c_int = -2147454952;
+pub const ENETDOWN : ::c_int = -2147454953;
 pub const ENETUNREACH : ::c_int = -2147454951;
 pub const ENETRESET : ::c_int = -2147454950;
 pub const ECONNABORTED : ::c_int = -2147454949;
 pub const ECONNRESET : ::c_int = -2147454948;
+pub const ENOBUFS : ::c_int = -2147454941;
 pub const EISCONN : ::c_int = -2147454947;
 pub const ENOTCONN : ::c_int = -2147454946;
 pub const ESHUTDOWN : ::c_int = -2147454945;
+pub const ETIMEDOUT : ::c_int = -2147483639;
 pub const ECONNREFUSED : ::c_int = -2147454944;
-pub const EHOSTUNREACH : ::c_int = -2147454943;
-pub const ENOPROTOOPT : ::c_int = -2147454942;
-pub const ENOBUFS : ::c_int = -2147454941;
-pub const EINPROGRESS : ::c_int = -2147454940;
-pub const EALREADY : ::c_int = -2147454939;
-pub const EILSEQ : ::c_int = -2147454938;
-pub const ENOMSG : ::c_int = -2147454937;
-pub const ESTALE : ::c_int = -2147454936;
-pub const EOVERFLOW : ::c_int = -2147454935;
-pub const EMSGSIZE : ::c_int = -2147454934;
-pub const EOPNOTSUPP : ::c_int = -2147454933;
-pub const ENOTSOCK : ::c_int = -2147454932;
+pub const ELOOP : ::c_int = -2147459060;
+pub const ENAMETOOLONG : ::c_int = -2147459068;
 pub const EHOSTDOWN : ::c_int = -2147454931;
-pub const EBADMSG : ::c_int = -2147454930;
-pub const ECANCELED : ::c_int = -2147454929;
-pub const EDESTADDRREQ : ::c_int = -2147454928;
+pub const EHOSTUNREACH : ::c_int = -2147454943;
+pub const ENOTEMPTY : ::c_int = -2147459066;
 pub const EDQUOT : ::c_int = -2147454927;
+pub const ESTALE : ::c_int = -2147454936;
+pub const ENOLCK : ::c_int = -2147454968;
+pub const ENOSYS : ::c_int = -2147454967;
 pub const EIDRM : ::c_int = -2147454926;
-pub const EMULTIHOP : ::c_int = -2147454925;
-pub const ENODATA : ::c_int = -2147454924;
-pub const ENOLINK : ::c_int = -2147454923;
-pub const ENOSR : ::c_int = -2147454922;
-pub const ENOSTR : ::c_int = -2147454921;
-pub const ENOTSUP : ::c_int = -2147454920;
-pub const EPROTO : ::c_int = -2147454919;
-pub const ETIME : ::c_int = -2147454918;
-pub const ETXTBSY : ::c_int = -2147454917;
+pub const ENOMSG : ::c_int = -2147454937;
+pub const EOVERFLOW : ::c_int = -2147454935;
+pub const ECANCELED : ::c_int = -2147454929;
+pub const EILSEQ : ::c_int = -2147454938;
 pub const ENOATTR : ::c_int = -2147454916;
-
-// INT_MIN
-pub const ENOMEM : ::c_int = -2147454976;
-
-// POSIX errors that can be mapped to BeOS error codes
-pub const EACCES : ::c_int = -2147483646;
-pub const EINTR : ::c_int = -2147483638;
-pub const EIO : ::c_int = -2147483647;
-pub const EBUSY : ::c_int = -2147483634;
-pub const EFAULT : ::c_int = -2147478783;
-pub const ETIMEDOUT : ::c_int = -2147483639;
-pub const EAGAIN : ::c_int = -2147483637;
-pub const EWOULDBLOCK : ::c_int = -2147483637;
-pub const EBADF : ::c_int = -2147459072;
-pub const EEXIST : ::c_int = -2147459070;
-pub const EINVAL : ::c_int = -2147483643;
-pub const ENAMETOOLONG : ::c_int = -2147459068;
-pub const ENOENT : ::c_int = -2147459069;
-pub const EPERM : ::c_int = -2147483633;
-pub const ENOTDIR : ::c_int = -2147459067;
-pub const EISDIR : ::c_int = -2147459063;
-pub const ENOTEMPTY : ::c_int = -2147459066;
-pub const ENOSPC : ::c_int = -2147459065;
-pub const EROFS : ::c_int = -2147459064;
-pub const EMFILE : ::c_int = -2147459062;
-pub const EXDEV : ::c_int = -2147459061;
-pub const ELOOP : ::c_int = -2147459060;
-pub const ENOEXEC : ::c_int = -2147478782;
-pub const EPIPE : ::c_int = -2147459059;
+pub const EBADMSG : ::c_int = -2147454930;
+pub const EMULTIHOP : ::c_int = -2147454925;
+pub const ENOLINK : ::c_int = -2147454923;
+pub const EPROTO : ::c_int = -2147454919;
 
 pub const IPPROTO_RAW: ::c_int = 255;
 
 // These are prefixed with POSIX_ on Haiku
 pub const MADV_NORMAL: ::c_int = 1;
 pub const MADV_SEQUENTIAL: ::c_int = 2;
 pub const MADV_RANDOM: ::c_int = 3;
 pub const MADV_WILLNEED: ::c_int = 4;
 pub const MADV_DONTNEED: ::c_int = 5;
 
 pub const IFF_LOOPBACK: ::c_int = 0x0008;
 
-pub const AF_UNSEC: ::c_int = 0;
+pub const AF_UNIX: ::c_int = 9;
 pub const AF_INET: ::c_int = 1;
-pub const AF_APPLETALK: ::c_int = 2;
-pub const AF_ROUTE: ::c_int = 3;
-pub const AF_LINK: ::c_int = 4;
-pub const AF_INET6: ::c_int = 5;
-pub const AF_DLI: ::c_int = 6;
-pub const AF_IPX: ::c_int = 7;
-pub const AF_NOTIFY: ::c_int = 8;
-pub const AF_LOCAL: ::c_int = 9;
-pub const AF_UNIX: ::c_int = AF_LOCAL;
-pub const AF_BLUETOOTH: ::c_int = 10;
-pub const AF_MAX: ::c_int = 11;
-
+pub const AF_INET6: ::c_int = 6;
+pub const SOCK_RAW: ::c_int = 3;
+pub const IPPROTO_ICMP: ::c_int = 1;
+pub const IPPROTO_ICMPV6: ::c_int = 58;
+pub const IPPROTO_TCP: ::c_int = 6;
+pub const IPPROTO_IP: ::c_int = 0;
+pub const IPPROTO_IPV6: ::c_int = 41;
 pub const IP_MULTICAST_TTL: ::c_int = 10;
 pub const IP_MULTICAST_LOOP: ::c_int = 11;
 pub const IP_TTL: ::c_int = 4;
 pub const IP_HDRINCL: ::c_int = 2;
 pub const IP_ADD_MEMBERSHIP: ::c_int = 12;
 pub const IP_DROP_MEMBERSHIP: ::c_int = 13;
 
 pub const TCP_NODELAY: ::c_int = 0x01;
@@ -634,135 +553,62 @@ pub const TCP_MAXSEG: ::c_int = 0x02;
 pub const TCP_NOPUSH: ::c_int = 0x04;
 pub const TCP_NOOPT: ::c_int = 0x08;
 
 pub const IPV6_MULTICAST_LOOP: ::c_int = 26;
 pub const IPV6_JOIN_GROUP: ::c_int = 28;
 pub const IPV6_LEAVE_GROUP: ::c_int = 29;
 pub const IPV6_V6ONLY: ::c_int = 30;
 
-pub const MSG_OOB: ::c_int = 0x0001;
-pub const MSG_PEEK: ::c_int = 0x0002;
-pub const MSG_DONTROUTE: ::c_int = 0x0004;
-pub const MSG_EOR: ::c_int = 0x0008;
-pub const MSG_TRUNC: ::c_int = 0x0010;
-pub const MSG_CTRUNC: ::c_int = 0x0020;
-pub const MSG_WAITALL: ::c_int = 0x0040;
-pub const MSG_DONTWAIT: ::c_int = 0x0080;
-pub const MSG_BCAST: ::c_int = 0x0100;
-pub const MSG_MCAST: ::c_int = 0x0200;
-pub const MSG_EOF: ::c_int = 0x0400;
+pub const SO_DEBUG: ::c_int = 0x00000004;
+
+pub const MSG_PEEK: ::c_int = 0x2;
 pub const MSG_NOSIGNAL: ::c_int = 0x0800;
 
 pub const SHUT_RD: ::c_int = 0;
 pub const SHUT_WR: ::c_int = 1;
 pub const SHUT_RDWR: ::c_int = 2;
 
 pub const LOCK_SH: ::c_int = 0x01;
 pub const LOCK_EX: ::c_int = 0x02;
 pub const LOCK_NB: ::c_int = 0x04;
 pub const LOCK_UN: ::c_int = 0x08;
 
 pub const SIGSTKSZ: ::size_t = 16384;
 
-pub const PATH_MAX: ::c_int = 1024;
-
-pub const SA_NOCLDSTOP: ::c_int = 0x01;
-pub const SA_NOCLDWAIT: ::c_int = 0x02;
+pub const SA_NODEFER: ::c_int = 0x08;
 pub const SA_RESETHAND: ::c_int = 0x04;
-pub const SA_NODEFER: ::c_int = 0x08;
 pub const SA_RESTART: ::c_int = 0x10;
-pub const SA_ONSTACK: ::c_int = 0x20;
-pub const SA_SIGINFO: ::c_int = 0x40;
-pub const SA_NOMASK: ::c_int = SA_NODEFER;
-pub const SA_STACK: ::c_int = SA_ONSTACK;
-pub const SA_ONESHOT: ::c_int = SA_RESETHAND;
+pub const SA_NOCLDSTOP: ::c_int = 0x01;
 
 pub const FD_SETSIZE: usize = 1024;
 
 pub const RTLD_NOW: ::c_int = 0x1;
 pub const RTLD_DEFAULT: *mut ::c_void = 0isize as *mut ::c_void;
 
 pub const BUFSIZ: ::c_uint = 8192;
 pub const FILENAME_MAX: ::c_uint = 256;
 pub const FOPEN_MAX: ::c_uint = 128;
 pub const L_tmpnam: ::c_uint = 512;
 pub const TMP_MAX: ::c_uint = 32768;
-
-pub const _PC_CHOWN_RESTRICTED: ::c_int = 1;
-pub const _PC_MAX_CANON: ::c_int = 2;
-pub const _PC_MAX_INPUT: ::c_int = 3;
 pub const _PC_NAME_MAX: ::c_int = 4;
-pub const _PC_NO_TRUNC: ::c_int = 5;
-pub const _PC_PATH_MAX: ::c_int = 6;
-pub const _PC_PIPE_BUF: ::c_int = 7;
-pub const _PC_VDISABLE: ::c_int = 8;
-pub const _PC_LINK_MAX: ::c_int = 25;
-pub const _PC_SYNC_IO: ::c_int = 26;
-pub const _PC_ASYNC_IO: ::c_int = 27;
-pub const _PC_PRIO_IO: ::c_int = 28;
-pub const _PC_SOCK_MAXBUF: ::c_int = 29;
-pub const _PC_FILESIZEBITS: ::c_int = 30;
-pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 31;
-pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 32;
-pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 33;
-pub const _PC_REC_XFER_ALIGN: ::c_int = 34;
-pub const _PC_ALLOC_SIZE_MIN: ::c_int = 35;
-pub const _PC_SYMLINK_MAX: ::c_int = 36;
-pub const _PC_2_SYMLINKS: ::c_int = 37;
-pub const _PC_XATTR_EXISTS: ::c_int = 38;
-pub const _PC_XATTR_ENABLED: ::c_int = 39;
 
 pub const FIONBIO: ::c_int = 0xbe000000;
 
-pub const _SC_ARG_MAX : ::c_int = 15;
-pub const _SC_CHILD_MAX : ::c_int = 16;
-pub const _SC_CLK_TCK : ::c_int = 17;
-pub const _SC_JOB_CONTROL : ::c_int = 18;
-pub const _SC_NGROUPS_MAX : ::c_int = 19;
-pub const _SC_OPEN_MAX : ::c_int = 20;
-pub const _SC_SAVED_IDS : ::c_int = 21;
-pub const _SC_STREAM_MAX : ::c_int = 22;
-pub const _SC_TZNAME_MAX : ::c_int = 23;
-pub const _SC_VERSION : ::c_int = 24;
+pub const _SC_IOV_MAX : ::c_int = 32;
 pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 25;
 pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 26;
 pub const _SC_PAGESIZE : ::c_int = 27;
-pub const _SC_PAGE_SIZE : ::c_int = 27;
-pub const _SC_SEM_NSEMS_MAX : ::c_int = 28;
-pub const _SC_SEM_VALUE_MAX : ::c_int = 29;
-pub const _SC_SEMAPHORES : ::c_int = 30;
-pub const _SC_THREADS : ::c_int = 31;
-pub const _SC_IOV_MAX : ::c_int = 32;
-pub const _SC_UIO_MAXIOV : ::c_int = 32;
-pub const _SC_NPROCESSORS_CONF : ::c_int = 34;
-pub const _SC_NPROCESSORS_ONLN : ::c_int = 35;
-pub const _SC_ATEXIT_MAX : ::c_int = 37;
-pub const _SC_PASS_MAX : ::c_int = 39;
-pub const _SC_PHYS_PAGES : ::c_int = 40;
-pub const _SC_AVPHYS_PAGES : ::c_int = 41;
-pub const _SC_PIPE : ::c_int = 42;
-pub const _SC_SELECT : ::c_int = 43;
-pub const _SC_POLL : ::c_int = 44;
-pub const _SC_MAPPED_FILES : ::c_int = 45;
-pub const _SC_THREAD_PROCESS_SHARED : ::c_int = 46;
-pub const _SC_THREAD_STACK_MIN : ::c_int = 47;
 pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 48;
 pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 49;
 pub const _SC_THREAD_PRIORITY_SCHEDULING : ::c_int = 50;
-pub const _SC_REALTIME_SIGNALS : ::c_int = 51;
-pub const _SC_MEMORY_PROTECTION : ::c_int = 52;
-pub const _SC_SIGQUEUE_MAX : ::c_int = 53;
-pub const _SC_RTSIG_MAX : ::c_int = 54;
-pub const _SC_MONOTONIC_CLOCK : ::c_int = 55;
-pub const _SC_DELAYTIMER_MAX : ::c_int = 56;
-pub const _SC_TIMER_MAX : ::c_int = 57;
-pub const _SC_TIMERS : ::c_int = 58;
-pub const _SC_CPUTIME : ::c_int = 59;
-pub const _SC_THREAD_CPUTIME : ::c_int = 60;
+pub const _SC_THREAD_PROCESS_SHARED : ::c_int = 46;
+pub const _SC_THREAD_STACK_MIN : ::c_int = 47;
+pub const _SC_THREADS : ::c_int = 31;
+pub const _SC_ATEXIT_MAX : ::c_int = 37;
 
 pub const PTHREAD_STACK_MIN: ::size_t = 8192;
 
 pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
     flags: 0,
     lock: 0,
     unused: -42,
     owner: -1,
@@ -772,42 +618,47 @@ pub const PTHREAD_COND_INITIALIZER: pthr
     flags: 0,
     unused: -42,
     mutex: 0 as *mut _,
     waiter_count: 0,
     lock: 0,
 };
 pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
     flags: 0,
-    owner: -1,
+    owner: 0,
     lock_sem: 0,
     lock_count: 0,
     reader_count: 0,
     writer_count: 0,
     waiters: [0 as *mut _; 2],
 };
 
 pub const PTHREAD_MUTEX_DEFAULT: ::c_int = 0;
 pub const PTHREAD_MUTEX_NORMAL: ::c_int = 1;
 pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
 pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 3;
 
 pub const FIOCLEX: c_ulong = 0; // TODO: does not exist on Haiku!
 
+pub const SA_ONSTACK: c_ulong = 0x20;
+pub const SA_SIGINFO: c_ulong = 0x40;
+pub const SA_NOCLDWAIT: c_ulong = 0x02;
+
+pub const SIGCHLD: ::c_int = 5;
+pub const SIGBUS: ::c_int = 30;
+pub const SIG_SETMASK: ::c_int = 3;
+
 pub const RUSAGE_CHILDREN: ::c_int = -1;
 
 pub const SOCK_STREAM: ::c_int = 1;
 pub const SOCK_DGRAM: ::c_int = 2;
-pub const SOCK_RAW: ::c_int = 3;
-pub const SOCK_SEQPACKET: ::c_int = 5;
 
 pub const SOL_SOCKET: ::c_int = -1;
 pub const SO_ACCEPTCONN: ::c_int = 0x00000001;
 pub const SO_BROADCAST: ::c_int = 0x00000002;
-pub const SO_DEBUG: ::c_int = 0x00000004;
 pub const SO_DONTROUTE: ::c_int = 0x00000008;
 pub const SO_KEEPALIVE: ::c_int = 0x00000010;
 pub const SO_OOBINLINE: ::c_int = 0x00000020;
 pub const SO_REUSEADDR: ::c_int = 0x00000040;
 pub const SO_REUSEPORT: ::c_int = 0x00000080;
 pub const SO_USELOOPBACK: ::c_int = 0x00000100;
 pub const SO_LINGER: ::c_int = 0x00000200;
 pub const SO_SNDBUF: ::c_int = 0x40000001;
@@ -817,168 +668,29 @@ pub const SO_RCVBUF: ::c_int = 0x4000000
 pub const SO_RCVLOWAT: ::c_int = 0x40000005;
 pub const SO_RCVTIMEO: ::c_int = 0x40000006;
 pub const SO_ERROR: ::c_int = 0x40000007;
 pub const SO_TYPE: ::c_int = 0x40000008;
 pub const SO_NONBLOCK: ::c_int = 0x40000009;
 pub const SO_BINDTODEVICE: ::c_int = 0x4000000a;
 pub const SO_PEERCRED: ::c_int = 0x4000000b;
 
-pub const SCM_RIGHTS: ::c_int = 0x01;
-
 pub const NI_MAXHOST: ::size_t = 1025;
 
 pub const WNOHANG: ::c_int = 0x01;
 pub const WUNTRACED: ::c_int = 0x02;
 pub const WCONTINUED: ::c_int = 0x04;
 pub const WEXITED: ::c_int = 0x08;
 pub const WSTOPPED: ::c_int = 0x10;
 pub const WNOWAIT: ::c_int = 0x20;
 
 pub const P_ALL: idtype_t = 0;
 pub const P_PID: idtype_t = 1;
 pub const P_PGID: idtype_t = 2;
 
-pub const VINTR: usize = 0;
-pub const VQUIT: usize = 1;
-pub const VERASE: usize = 2;
-pub const VKILL: usize = 3;
-pub const VEOF: usize = 4;
-pub const VEOL: usize = 5;
-pub const VMIN: usize = 4;
-pub const VTIME: usize = 5;
-pub const VEOL2: usize = 6;
-pub const VSWTCH: usize = 7;
-pub const VSTART: usize = 8;
-pub const VSTOP: usize = 9;
-pub const VSUSP: usize = 10;
-
-pub const IGNBRK: ::tcflag_t = 0x01;
-pub const BRKINT: ::tcflag_t = 0x02;
-pub const IGNPAR: ::tcflag_t = 0x04;
-pub const PARMRK: ::tcflag_t = 0x08;
-pub const INPCK: ::tcflag_t = 0x10;
-pub const ISTRIP: ::tcflag_t = 0x20;
-pub const INLCR: ::tcflag_t = 0x40;
-pub const IGNCR: ::tcflag_t = 0x80;
-pub const ICRNL: ::tcflag_t = 0x100;
-pub const IUCLC: ::tcflag_t = 0x200;
-pub const IXON: ::tcflag_t = 0x400;
-pub const IXANY: ::tcflag_t = 0x800;
-pub const IXOFF: ::tcflag_t = 0x1000;
-
-pub const OPOST:  ::tcflag_t = 0x00000001;
-pub const OLCUC:  ::tcflag_t = 0x00000002;
-pub const ONLCR:  ::tcflag_t = 0x00000004;
-pub const OCRNL:  ::tcflag_t = 0x00000008;
-pub const ONOCR:  ::tcflag_t = 0x00000010;
-pub const ONLRET: ::tcflag_t = 0x00000020;
-pub const OFILL:  ::tcflag_t = 0x00000040;
-pub const OFDEL:  ::tcflag_t = 0x00000080;
-pub const NLDLY:  ::tcflag_t = 0x00000100;
-pub const NL0:    ::tcflag_t = 0x00000000;
-pub const NL1:    ::tcflag_t = 0x00000100;
-pub const CRDLY:  ::tcflag_t = 0x00000600;
-pub const CR0:    ::tcflag_t = 0x00000000;
-pub const CR1:    ::tcflag_t = 0x00000200;
-pub const CR2:    ::tcflag_t = 0x00000400;
-pub const CR3:    ::tcflag_t = 0x00000600;
-pub const TABDLY: ::tcflag_t = 0x00001800;
-pub const TAB0:   ::tcflag_t = 0x00000000;
-pub const TAB1:   ::tcflag_t = 0x00000800;
-pub const TAB2:   ::tcflag_t = 0x00001000;
-pub const TAB3:   ::tcflag_t = 0x00001800;
-pub const BSDLY:  ::tcflag_t = 0x00002000;
-pub const BS0:    ::tcflag_t = 0x00000000;
-pub const BS1:    ::tcflag_t = 0x00002000;
-pub const VTDLY:  ::tcflag_t = 0x00004000;
-pub const VT0:    ::tcflag_t = 0x00000000;
-pub const VT1:    ::tcflag_t = 0x00004000;
-pub const FFDLY:  ::tcflag_t = 0x00008000;
-pub const FF0:    ::tcflag_t = 0x00000000;
-pub const FF1:    ::tcflag_t = 0x00008000;
-
-pub const CSIZE:      ::tcflag_t = 0x00000020;
-pub const CS5:        ::tcflag_t = 0x00000000;
-pub const CS6:        ::tcflag_t = 0x00000000;
-pub const CS7:        ::tcflag_t = 0x00000000;
-pub const CS8:        ::tcflag_t = 0x00000020;
-pub const CSTOPB:     ::tcflag_t = 0x00000040;
-pub const CREAD:      ::tcflag_t = 0x00000080;
-pub const PARENB:     ::tcflag_t = 0x00000100;
-pub const PARODD:     ::tcflag_t = 0x00000200;
-pub const HUPCL:      ::tcflag_t = 0x00000400;
-pub const CLOCAL:     ::tcflag_t = 0x00000800;
-pub const XLOBLK:     ::tcflag_t = 0x00001000;
-pub const CTSFLOW:    ::tcflag_t = 0x00002000;
-pub const RTSFLOW:    ::tcflag_t = 0x00004000;
-pub const CRTSCTS:    ::tcflag_t = RTSFLOW | CTSFLOW;
-
-pub const ISIG:       ::tcflag_t = 0x00000001;
-pub const ICANON:     ::tcflag_t = 0x00000002;
-pub const XCASE:      ::tcflag_t = 0x00000004;
-pub const ECHO:       ::tcflag_t = 0x00000008;
-pub const ECHOE:      ::tcflag_t = 0x00000010;
-pub const ECHOK:      ::tcflag_t = 0x00000020;
-pub const ECHONL:     ::tcflag_t = 0x00000040;
-pub const NOFLSH:     ::tcflag_t = 0x00000080;
-pub const TOSTOP:     ::tcflag_t = 0x00000100;
-pub const IEXTEN:     ::tcflag_t = 0x00000200;
-pub const ECHOCTL:    ::tcflag_t = 0x00000400;
-pub const ECHOPRT:    ::tcflag_t = 0x00000800;
-pub const ECHOKE:     ::tcflag_t = 0x00001000;
-pub const FLUSHO:     ::tcflag_t = 0x00002000;
-pub const PENDIN:     ::tcflag_t = 0x00004000;
-
-pub const TCGB_CTS: ::c_int = 0x01;
-pub const TCGB_DSR: ::c_int = 0x02;
-pub const TCGB_RI: ::c_int = 0x04;
-pub const TCGB_DCD: ::c_int = 0x08;
-pub const TIOCM_CTS: ::c_int = TCGB_CTS;
-pub const TIOCM_CD: ::c_int = TCGB_DCD;
-pub const TIOCM_CAR: ::c_int = TIOCM_CD;
-pub const TIOCM_RI: ::c_int = TCGB_RI;
-pub const TIOCM_DSR: ::c_int = TCGB_DSR;
-pub const TIOCM_DTR: ::c_int = 0x10;
-pub const TIOCM_RTS: ::c_int = 0x20;
-
-pub const B0:      speed_t = 0x00;
-pub const B50:     speed_t = 0x01;
-pub const B75:     speed_t = 0x02;
-pub const B110:    speed_t = 0x03;
-pub const B134:    speed_t = 0x04;
-pub const B150:    speed_t = 0x05;
-pub const B200:    speed_t = 0x06;
-pub const B300:    speed_t = 0x07;
-pub const B600:    speed_t = 0x08;
-pub const B1200:   speed_t = 0x09;
-pub const B1800:   speed_t = 0x0A;
-pub const B2400:   speed_t = 0x0B;
-pub const B4800:   speed_t = 0x0C;
-pub const B9600:   speed_t = 0x0D;
-pub const B19200:  speed_t = 0x0E;
-pub const B38400:  speed_t = 0x0F;
-pub const B57600:  speed_t = 0x10;
-pub const B115200: speed_t = 0x11;
-pub const B230400: speed_t = 0x12;
-pub const B31250:  speed_t = 0x13;
-
-pub const TCSANOW: ::c_int = 0x01;
-pub const TCSADRAIN: ::c_int = 0x02;
-pub const TCSAFLUSH: ::c_int = 0x04;
-
-pub const TCOOFF: ::c_int = 0x01;
-pub const TCOON: ::c_int = 0x02;
-pub const TCIOFF: ::c_int = 0x04;
-pub const TCION: ::c_int = 0x08;
-
-pub const TCIFLUSH: ::c_int = 0x01;
-pub const TCOFLUSH: ::c_int = 0x02;
-pub const TCIOFLUSH: ::c_int = 0x03;
-
 f! {
     pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
         let fd = fd as usize;
         let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
         (*set).fds_bits[fd / size] &= !(1 << (fd % size));
         return
     }
 
@@ -997,69 +709,48 @@ f! {
 
     pub fn FD_ZERO(set: *mut fd_set) -> () {
         for slot in (*set).fds_bits.iter_mut() {
             *slot = 0;
         }
     }
 
     pub fn WIFEXITED(status: ::c_int) -> bool {
-        (status & !0xff) == 0
+        (status >> 8) == 0
     }
 
     pub fn WEXITSTATUS(status: ::c_int) -> ::c_int {
         (status & 0xff)
     }
 
-    pub fn WIFSIGNALED(status: ::c_int) -> bool {
-        ((status >> 8) & 0xff) != 0
-    }
-
     pub fn WTERMSIG(status: ::c_int) -> ::c_int {
         (status >> 8) & 0xff
     }
-
-    pub fn WIFSTOPPED(status: ::c_int) -> bool {
-        ((status >> 16) & 0xff) != 0
-    }
-
-    pub fn WSTOPSIG(status: ::c_int) -> ::c_int {
-        (status >> 16) & 0xff
-    }
-
-    // actually WIFCORED, but this is used everywhere else
-    pub fn WCOREDUMP(status: ::c_int) -> bool {
-        (status & 0x10000) != 0
-    }
-
-    pub fn WIFCONTINUED(status: ::c_int) -> bool {
-        (status & 0x20000) != 0
-    }
 }
 
-#[link(name = "bsd")]
 extern {
     pub fn clock_gettime(clk_id: ::c_int, tp: *mut ::timespec) -> ::c_int;
     pub fn clock_settime(clk_id: ::c_int, tp: *const ::timespec) -> ::c_int;
-    pub fn pthread_create(thread: *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_attr_getguardsize(attr: *const ::pthread_attr_t,
                                      guardsize: *mut ::size_t) -> ::c_int;
     pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,
                                  stackaddr: *mut *mut ::c_void,
                                  stacksize: *mut ::size_t) -> ::c_int;
     pub fn pthread_condattr_getclock(attr: *const pthread_condattr_t,
                                      clock_id: *mut clockid_t) -> ::c_int;
     pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
-                                     clock_id: ::clockid_t) -> ::c_int;
+                                     clock_id: clockid_t) -> ::c_int;
     pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
     pub fn setgroups(ngroups: ::size_t,
                      ptr: *const ::gid_t) -> ::c_int;
+    pub fn getpwuid_r(uid: ::uid_t,
+                      pwd: *mut passwd,
+                      buffer: *mut ::c_char,
+                      bufferSize: ::size_t,
+                      result: *mut *mut passwd) -> ::c_int;
     pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
     pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int)
                     -> ::c_int;
     pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
     pub fn getnameinfo(sa: *const ::sockaddr,
                        salen: ::socklen_t,
                        host: *mut ::c_char,
                        hostlen: ::size_t,
@@ -1077,18 +768,16 @@ extern {
                 errfunc: Option<extern fn(epath: *const ::c_char,
                                           errno: ::c_int) -> ::c_int>,
                 pglob: *mut ::glob_t) -> ::c_int;
     pub fn globfree(pglob: *mut ::glob_t);
 
     pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
                          -> ::c_int;
 
-    pub fn shm_open(name: *const ::c_char, oflag: ::c_int, mode: ::mode_t)
-                    -> ::c_int;
     pub fn shm_unlink(name: *const ::c_char) -> ::c_int;
 
     pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long);
 
     pub fn telldir(dirp: *mut ::DIR) -> ::c_long;
     pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
                   -> ::c_int;
 
@@ -1111,83 +800,16 @@ extern {
                  iov: *const ::iovec,
                  iovcnt: ::c_int) -> ::ssize_t;
 
     pub fn sendmsg(fd: ::c_int,
                    msg: *const ::msghdr,
                    flags: ::c_int) -> ::ssize_t;
     pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
                    -> ::ssize_t;
-    pub fn execvpe(file: *const ::c_char, argv: *const *const ::c_char,
-                   environment: *const *const ::c_char) -> ::c_int;
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")]
-    pub fn getgrgid_r(uid: ::uid_t,
-                      grp: *mut ::group,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut ::group) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "sigaltstack$UNIX2003")]
-    #[cfg_attr(target_os = "netbsd", link_name = "__sigaltstack14")]
-    pub fn sigaltstack(ss: *const stack_t,
-                       oss: *mut stack_t) -> ::c_int;
-    pub fn sem_close(sem: *mut sem_t) -> ::c_int;
-    pub fn getdtablesize() -> ::c_int;
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrnam_r")]
-    pub fn getgrnam_r(name: *const ::c_char,
-                      grp: *mut ::group,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut ::group) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "pthread_sigmask$UNIX2003")]
-    pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t,
-                           oldset: *mut sigset_t) -> ::c_int;
-    pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t;
-    pub fn getgrnam(name: *const ::c_char) -> *mut ::group;
-    pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
-    pub fn sem_unlink(name: *const ::c_char) -> ::c_int;
-    pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__getpwnam_r50")]
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwnam_r")]
-    pub fn getpwnam_r(name: *const ::c_char,
-                      pwd: *mut passwd,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut passwd) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid_r50")]
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwuid_r")]
-    pub fn getpwuid_r(uid: ::uid_t,
-                      pwd: *mut passwd,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut passwd) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch ="x86"),
-               link_name = "sigwait$UNIX2003")]
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_sigwait")]
-    pub fn sigwait(set: *const sigset_t,
-                   sig: *mut ::c_int) -> ::c_int;
-    pub fn pthread_atfork(prepare: Option<unsafe extern fn()>,
-                          parent: Option<unsafe extern fn()>,
-                          child: Option<unsafe extern fn()>) -> ::c_int;
-    pub fn getgrgid(gid: ::gid_t) -> *mut ::group;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "popen$UNIX2003")]
-    pub fn popen(command: *const c_char,
-                 mode: *const c_char) -> *mut ::FILE;
-    pub fn openpty(amaster: *mut ::c_int,
-                   aslave: *mut ::c_int,
-                   name: *mut ::c_char,
-                   termp: *mut termios,
-                   winp: *mut ::winsize) -> ::c_int;
-    pub fn forkpty(amaster: *mut ::c_int,
-                   name: *mut ::c_char,
-                   termp: *mut termios,
-                   winp: *mut ::winsize) -> ::pid_t;
-    pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
 }
 
 cfg_if! {
     if #[cfg(target_pointer_width = "64")] {
         mod b64;
         pub use self::b64::*;
     } else {
         mod b32;
--- a/third_party/rust/libc/src/unix/mod.rs
+++ b/third_party/rust/libc/src/unix/mod.rs
@@ -29,78 +29,45 @@ s! {
         pub modtime: time_t,
     }
 
     pub struct timeval {
         pub tv_sec: time_t,
         pub tv_usec: suseconds_t,
     }
 
-    // linux x32 compatibility
-    // See https://sourceware.org/bugzilla/show_bug.cgi?id=16437
     pub struct timespec {
         pub tv_sec: time_t,
-        #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
-        pub tv_nsec: i64,
-        #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
-        pub tv_nsec: ::c_long,
+        pub tv_nsec: c_long,
     }
 
     pub struct rlimit {
         pub rlim_cur: rlim_t,
         pub rlim_max: rlim_t,
     }
 
     pub struct rusage {
         pub ru_utime: timeval,
         pub ru_stime: timeval,
         pub ru_maxrss: c_long,
-        #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
-        __pad1: u32,
         pub ru_ixrss: c_long,
-        #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
-        __pad2: u32,
         pub ru_idrss: c_long,
-        #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
-        __pad3: u32,
         pub ru_isrss: c_long,
-        #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
-        __pad4: u32,
         pub ru_minflt: c_long,
-        #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
-        __pad5: u32,
         pub ru_majflt: c_long,
-        #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
-        __pad6: u32,
         pub ru_nswap: c_long,
-        #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
-        __pad7: u32,
         pub ru_inblock: c_long,
-        #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
-        __pad8: u32,
         pub ru_oublock: c_long,
-        #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
-        __pad9: u32,
         pub ru_msgsnd: c_long,
-        #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
-        __pad10: u32,
         pub ru_msgrcv: c_long,
-        #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
-        __pad11: u32,
         pub ru_nsignals: c_long,
-        #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
-        __pad12: u32,
         pub ru_nvcsw: c_long,
-        #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
-        __pad13: u32,
         pub ru_nivcsw: c_long,
-        #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
-        __pad14: u32,
 
-        #[cfg(any(target_env = "musl", target_os = "emscripten"))]
+        #[cfg(any(target_env = "musl"))]
         __reserved: [c_long; 16],
     }
 
     #[cfg_attr(target_os = "netbsd", repr(packed))]
     pub struct in_addr {
         pub s_addr: in_addr_t,
     }
 
@@ -166,29 +133,16 @@ s! {
 
     // <sys/times.h>
     pub struct tms {
         pub tms_utime: ::clock_t,
         pub tms_stime: ::clock_t,
         pub tms_cutime: ::clock_t,
         pub tms_cstime: ::clock_t,
     }
-
-    pub struct servent {
-        pub s_name: *mut ::c_char,
-        pub s_aliases: *mut *mut ::c_char,
-        pub s_port: ::c_int,
-        pub s_proto: *mut ::c_char,
-    }
-
-    pub struct protoent {
-        pub p_name: *mut ::c_char,
-        pub p_aliases: *mut *mut ::c_char,
-        pub p_proto: ::c_int,
-    }
 }
 
 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_FIFO: u8 = 1;
 pub const DT_CHR: u8 = 2;
@@ -204,18 +158,27 @@ pub const USRQUOTA: ::c_int = 0;
 pub const GRPQUOTA: ::c_int = 1;
 
 pub const SIGIOT: ::c_int = 6;
 
 pub const S_ISUID: ::c_int = 0x800;
 pub const S_ISGID: ::c_int = 0x400;
 pub const S_ISVTX: ::c_int = 0x200;
 
+pub const POLLIN: ::c_short = 0x1;
+pub const POLLPRI: ::c_short = 0x2;
+pub const POLLOUT: ::c_short = 0x4;
+pub const POLLERR: ::c_short = 0x8;
+pub const POLLHUP: ::c_short = 0x10;
+pub const POLLNVAL: ::c_short = 0x20;
+
 pub const IF_NAMESIZE: ::size_t = 16;
 
+pub const RTLD_LAZY: ::c_int = 0x1;
+
 pub const LOG_EMERG: ::c_int = 0;
 pub const LOG_ALERT: ::c_int = 1;
 pub const LOG_CRIT: ::c_int = 2;
 pub const LOG_ERR: ::c_int = 3;
 pub const LOG_WARNING: ::c_int = 4;
 pub const LOG_NOTICE: ::c_int = 5;
 pub const LOG_INFO: ::c_int = 6;
 pub const LOG_DEBUG: ::c_int = 7;
@@ -249,35 +212,21 @@ pub const LOG_FACMASK: ::c_int = 0x3f8;
 
 pub const PRIO_PROCESS: ::c_int = 0;
 pub const PRIO_PGRP: ::c_int = 1;
 pub const PRIO_USER: ::c_int = 2;
 
 pub const PRIO_MIN: ::c_int = -20;
 pub const PRIO_MAX: ::c_int = 20;
 
-pub const IPPROTO_ICMP: ::c_int = 1;
-pub const IPPROTO_ICMPV6: ::c_int = 58;
-pub const IPPROTO_TCP: ::c_int = 6;
-pub const IPPROTO_UDP: ::c_int = 17;
-pub const IPPROTO_IP: ::c_int = 0;
-pub const IPPROTO_IPV6: ::c_int = 41;
-
-pub const INADDR_LOOPBACK: in_addr_t = 2130706433;
-pub const INADDR_ANY: in_addr_t = 0;
-pub const INADDR_BROADCAST: in_addr_t = 4294967295;
-pub const INADDR_NONE: in_addr_t = 4294967295;
-
 cfg_if! {
     if #[cfg(dox)] {
         // on dox builds don't pull in anything
-    } else if #[cfg(target_os = "l4re")] {
-        // required libraries for L4Re are linked externally, ATM
-    } else if #[cfg(feature = "use_std")] {
-        // cargo build, don't pull in anything extra as the libstd dep
+    } else if #[cfg(all(not(stdbuild), 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")))]
         extern {}
     } else if #[cfg(target_os = "emscripten")] {
         #[link(name = "c")]
         extern {}
@@ -296,32 +245,32 @@ cfg_if! {
         #[link(name = "m")]
         extern {}
     } else if #[cfg(target_os = "haiku")] {
         #[link(name = "root")]
         #[link(name = "network")]
         extern {}
     } else if #[cfg(target_os = "fuchsia")] {
         #[link(name = "c")]
-        #[link(name = "fdio")]
-        extern {}
-    } else if #[cfg(target_env = "newlib")] {
-        #[link(name = "c")]
-        #[link(name = "m")]
+        #[link(name = "mxio")]
         extern {}
     } else {
         #[link(name = "c")]
         #[link(name = "m")]
         #[link(name = "rt")]
         #[link(name = "pthread")]
         extern {}
     }
 }
 
 extern {
+    pub fn getgrnam(name: *const ::c_char) -> *mut group;
+    pub fn getgrgid(gid: ::gid_t) -> *mut group;
+
+    pub fn endpwent();
     #[cfg_attr(target_os = "netbsd", link_name = "__getpwnam50")]
     pub fn getpwnam(name: *const ::c_char) -> *mut passwd;
     #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid50")]
     pub fn getpwuid(uid: ::uid_t) -> *mut passwd;
 
     pub fn fprintf(stream: *mut ::FILE,
                    format: *const ::c_char, ...) -> ::c_int;
     pub fn printf(format: *const ::c_char, ...) -> ::c_int;
@@ -381,16 +330,20 @@ extern {
     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")]
     pub fn stat(path: *const c_char, buf: *mut stat) -> ::c_int;
 
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "popen$UNIX2003")]
+    pub fn popen(command: *const c_char,
+                 mode: *const c_char) -> *mut ::FILE;
     pub fn pclose(stream: *mut ::FILE) -> ::c_int;
     #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
                link_name = "fdopen$UNIX2003")]
     pub fn fdopen(fd: ::c_int, mode: *const c_char) -> *mut ::FILE;
     pub fn fileno(stream: *mut ::FILE) -> ::c_int;
 
     #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
                link_name = "open$UNIX2003")]
@@ -422,16 +375,18 @@ extern {
     #[cfg_attr(all(target_os = "macos", target_arch = "x86_64"),
                link_name = "rewinddir$INODE64")]
     #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
                link_name = "rewinddir$INODE64$UNIX2003")]
     pub fn rewinddir(dirp: *mut ::DIR);
 
     pub fn openat(dirfd: ::c_int, pathname: *const ::c_char,
                   flags: ::c_int, ...) -> ::c_int;
+    pub fn faccessat(dirfd: ::c_int, pathname: *const ::c_char,
+                     mode: ::c_int, flags: ::c_int) -> ::c_int;
     pub fn fchmodat(dirfd: ::c_int, pathname: *const ::c_char,
                     mode: ::mode_t, flags: ::c_int) -> ::c_int;
     pub fn fchown(fd: ::c_int,
                   owner: ::uid_t,
                   group: ::gid_t) -> ::c_int;
     pub fn fchownat(dirfd: ::c_int, pathname: *const ::c_char,
                     owner: ::uid_t, group: ::gid_t,
                     flags: ::c_int) -> ::c_int;
@@ -612,34 +567,42 @@ extern {
                link_name = "getrlimit$UNIX2003")]
     pub fn getrlimit(resource: ::c_int, rlim: *mut rlimit) -> ::c_int;
     #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
                link_name = "setrlimit$UNIX2003")]
     pub fn setrlimit(resource: ::c_int, rlim: *const rlimit) -> ::c_int;
     #[cfg_attr(target_os = "netbsd", link_name = "__getrusage50")]
     pub fn getrusage(resource: ::c_int, usage: *mut rusage) -> ::c_int;
 
+    pub fn getdtablesize() -> ::c_int;
     #[cfg_attr(any(target_os = "macos", target_os = "ios"),
                link_name = "realpath$DARWIN_EXTSN")]
     pub fn realpath(pathname: *const ::c_char, resolved: *mut ::c_char)
                     -> *mut ::c_char;
 
     pub fn flock(fd: ::c_int, operation: ::c_int) -> ::c_int;
 
     #[cfg_attr(target_os = "netbsd", link_name = "__gettimeofday50")]
     pub fn gettimeofday(tp: *mut ::timeval,
                         tz: *mut ::c_void) -> ::c_int;
     #[cfg_attr(target_os = "netbsd", link_name = "__times13")]
     pub fn times(buf: *mut ::tms) -> ::clock_t;
 
     pub fn pthread_self() -> ::pthread_t;
+    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;
     #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
                link_name = "pthread_join$UNIX2003")]
     pub fn pthread_join(native: ::pthread_t,
                         value: *mut *mut ::c_void) -> ::c_int;
+    pub fn pthread_atfork(prepare: Option<unsafe extern fn()>,
+                          parent: Option<unsafe extern fn()>,
+                          child: Option<unsafe extern fn()>) -> ::c_int;
     pub fn pthread_exit(value: *mut ::c_void);
     pub fn pthread_attr_init(attr: *mut ::pthread_attr_t) -> ::c_int;
     pub fn pthread_attr_destroy(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_attr_setdetachstate(attr: *mut ::pthread_attr_t,
                                        state: ::c_int) -> ::c_int;
     pub fn pthread_detach(thread: ::pthread_t) -> ::c_int;
@@ -680,20 +643,16 @@ extern {
                               lock: *mut pthread_mutex_t,
                               abstime: *const ::timespec) -> ::c_int;
     pub fn pthread_cond_signal(cond: *mut pthread_cond_t) -> ::c_int;
     pub fn pthread_cond_broadcast(cond: *mut pthread_cond_t) -> ::c_int;
     pub fn pthread_cond_destroy(cond: *mut pthread_cond_t) -> ::c_int;
     pub fn pthread_condattr_init(attr: *mut pthread_condattr_t) -> ::c_int;
     pub fn pthread_condattr_destroy(attr: *mut pthread_condattr_t) -> ::c_int;
     #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "pthread_rwlock_init$UNIX2003")]
-    pub fn pthread_rwlock_init(lock: *mut pthread_rwlock_t,
-                               attr: *const pthread_rwlockattr_t) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
                link_name = "pthread_rwlock_destroy$UNIX2003")]
     pub fn pthread_rwlock_destroy(lock: *mut pthread_rwlock_t) -> ::c_int;
     #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
                link_name = "pthread_rwlock_rdlock$UNIX2003")]
     pub fn pthread_rwlock_rdlock(lock: *mut pthread_rwlock_t) -> ::c_int;
     #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
                link_name = "pthread_rwlock_tryrdlock$UNIX2003")]
     pub fn pthread_rwlock_tryrdlock(lock: *mut pthread_rwlock_t) -> ::c_int;
@@ -701,34 +660,46 @@ extern {
                link_name = "pthread_rwlock_wrlock$UNIX2003")]
     pub fn pthread_rwlock_wrlock(lock: *mut pthread_rwlock_t) -> ::c_int;
     #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
                link_name = "pthread_rwlock_trywrlock$UNIX2003")]
     pub fn pthread_rwlock_trywrlock(lock: *mut pthread_rwlock_t) -> ::c_int;
     #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
                link_name = "pthread_rwlock_unlock$UNIX2003")]
     pub fn pthread_rwlock_unlock(lock: *mut pthread_rwlock_t) -> ::c_int;
-    pub fn pthread_rwlockattr_init(attr: *mut pthread_rwlockattr_t) -> ::c_int;
-    pub fn pthread_rwlockattr_destroy(attr: *mut pthread_rwlockattr_t)
-                                      -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "pthread_sigmask$UNIX2003")]
+    pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t,
+                           oldset: *mut sigset_t) -> ::c_int;
+    pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
     #[cfg_attr(all(target_os = "linux", not(target_env = "musl")),
                link_name = "__xpg_strerror_r")]
     pub fn strerror_r(errnum: ::c_int, buf: *mut c_char,
                       buflen: ::size_t) -> ::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 raise(signum: ::c_int) -> ::c_int;
     #[cfg_attr(target_os = "netbsd", link_name = "__sigaction14")]
     pub fn sigaction(signum: ::c_int,
                      act: *const sigaction,
                      oldact: *mut sigaction) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
+               link_name = "sigaltstack$UNIX2003")]
+    #[cfg_attr(target_os = "netbsd", link_name = "__sigaltstack14")]
+    pub fn sigaltstack(ss: *const stack_t,
+                       oss: *mut stack_t) -> ::c_int;
+    #[cfg_attr(all(target_os = "macos", target_arch ="x86"),
+               link_name = "sigwait$UNIX2003")]
+    #[cfg_attr(target_os = "solaris", link_name = "__posix_sigwait")]
+    pub fn sigwait(set: *const sigset_t,
+                   sig: *mut ::c_int) -> ::c_int;
 
     #[cfg_attr(target_os = "netbsd", link_name = "__utimes50")]
     pub fn utimes(filename: *const ::c_char,
                   times: *const ::timeval) -> ::c_int;
     pub fn dlopen(filename: *const ::c_char,
                   flag: ::c_int) -> *mut ::c_void;
     pub fn dlerror() -> *mut ::c_char;
     pub fn dlsym(handle: *mut ::c_void,
@@ -740,18 +711,17 @@ extern {
                        service: *const c_char,
                        hints: *const addrinfo,
                        res: *mut *mut addrinfo) -> ::c_int;
     pub fn freeaddrinfo(res: *mut addrinfo);
     pub fn gai_strerror(errcode: ::c_int) -> *const ::c_char;
     #[cfg_attr(any(
                    all(target_os = "linux", not(target_env = "musl")),
                    target_os = "freebsd",
-                   target_os = "dragonfly",
-                   target_os = "haiku"),
+                   target_os = "dragonfly"),
                link_name = "__res_init")]
     #[cfg_attr(any(target_os = "macos", target_os = "ios"),
                link_name = "res_9_init")]
     pub fn res_init() -> ::c_int;
 
     #[cfg_attr(target_os = "netbsd", link_name = "__gmtime_r50")]
     pub fn gmtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm;
     #[cfg_attr(target_os = "netbsd", link_name = "__localtime_r50")]
@@ -766,21 +736,18 @@ 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 = "__mknod50")]
     pub fn mknod(pathname: *const ::c_char, mode: ::mode_t,
                  dev: ::dev_t) -> ::c_int;
     pub fn uname(buf: *mut ::utsname) -> ::c_int;
+    pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
     pub fn gethostname(name: *mut ::c_char, len: ::size_t) -> ::c_int;
-    pub fn getservbyname(name: *const ::c_char,
-                         proto: *const ::c_char) -> *mut servent;
-    pub fn getprotobyname(name: *const ::c_char) -> *mut protoent;
-    pub fn getprotobynumber(proto: ::c_int) -> *mut protoent;
     pub fn chroot(name: *const ::c_char) -> ::c_int;
     #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
                link_name = "usleep$UNIX2003")]
     pub fn usleep(secs: ::c_uint) -> ::c_int;
     #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
                link_name = "send$UNIX2003")]
     pub fn send(socket: ::c_int, buf: *const ::c_void, len: ::size_t,
                 flags: ::c_int) -> ::ssize_t;
@@ -806,16 +773,19 @@ extern {
                   errorfds: *mut fd_set,
                   timeout: *mut timeval) -> ::c_int;
     #[cfg_attr(target_os = "netbsd", link_name = "__setlocale50")]
     pub fn setlocale(category: ::c_int,
                      locale: *const ::c_char) -> *mut ::c_char;
     pub fn localeconv() -> *mut lconv;
 
     pub fn sem_destroy(sem: *mut sem_t) -> ::c_int;
+    pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t;
+    pub fn sem_close(sem: *mut sem_t) -> ::c_int;
+    pub fn sem_unlink(name: *const ::c_char) -> ::c_int;
     #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
                link_name = "sem_wait$UNIX2003")]
     pub fn sem_wait(sem: *mut sem_t) -> ::c_int;
     pub fn sem_trywait(sem: *mut sem_t) -> ::c_int;
     pub fn sem_post(sem: *mut sem_t) -> ::c_int;
     pub fn sem_init(sem: *mut sem_t,
                     pshared: ::c_int,
                     value: ::c_uint)
@@ -881,17 +851,16 @@ extern {
     pub fn cfsetospeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int;
     pub fn cfsetspeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int;
     pub fn tcgetattr(fd: ::c_int, termios: *mut ::termios) -> ::c_int;
     pub fn tcsetattr(fd: ::c_int,
                      optional_actions: ::c_int,
                      termios: *const ::termios) -> ::c_int;
     pub fn tcflow(fd: ::c_int, action: ::c_int) -> ::c_int;
     pub fn tcflush(fd: ::c_int, action: ::c_int) -> ::c_int;
-    pub fn tcgetsid(fd: ::c_int) -> ::pid_t;
     pub fn tcsendbreak(fd: ::c_int, duration: ::c_int) -> ::c_int;
     pub fn mkstemp(template: *mut ::c_char) -> ::c_int;
     pub fn mkdtemp(template: *mut ::c_char) -> *mut ::c_char;
 
     pub fn tmpnam(ptr: *mut ::c_char) -> *mut ::c_char;
 
     pub fn openlog(ident: *const ::c_char, logopt: ::c_int, facility: ::c_int);
     pub fn closelog();
@@ -906,19 +875,16 @@ extern {
     pub fn ptsname(fd: ::c_int) -> *mut ::c_char;
     pub fn unlockpt(fd: ::c_int) -> ::c_int;
 }
 
 cfg_if! {
     if #[cfg(target_env = "uclibc")] {
         mod uclibc;
         pub use self::uclibc::*;
-    } else if #[cfg(target_env = "newlib")] {
-        mod newlib;
-        pub use self::newlib::*;
     } else if #[cfg(any(target_os = "linux",
                         target_os = "android",
                         target_os = "emscripten",
                         target_os = "fuchsia"))] {
         mod notbsd;
         pub use self::notbsd::*;
     } else if #[cfg(any(target_os = "macos",
                         target_os = "ios",
deleted file mode 100644
--- a/third_party/rust/libc/src/unix/newlib/arm/mod.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-pub type c_char = u8;
-pub type wchar_t = u32;
-
-pub type c_long = i32;
-pub type c_ulong = u32;
deleted file mode 100644
--- a/third_party/rust/libc/src/unix/newlib/mod.rs
+++ /dev/null
@@ -1,667 +0,0 @@
-use dox::mem;
-
-pub type blkcnt_t = i32;
-pub type blksize_t = i32;
-pub type clock_t = i32;
-pub type clockid_t = ::c_ulong;
-pub type dev_t = u32;
-pub type fsblkcnt_t = u64;
-pub type fsfilcnt_t = u32;
-pub type id_t = u32;
-pub type ino_t = u32;
-pub type key_t = ::c_int;
-pub type loff_t = ::c_longlong;
-pub type mode_t = ::c_uint;
-pub type nfds_t = u32;
-pub type nlink_t = ::c_ushort;
-pub type off_t = i64;
-pub type pthread_t = ::c_ulong;
-pub type pthread_key_t = ::c_uint;
-pub type rlim_t = u32;
-pub type sa_family_t = u8;
-pub type socklen_t = u32;
-pub type speed_t = u32;
-pub type suseconds_t = i32;
-pub type tcflag_t = ::c_uint;
-pub type time_t = i32;
-pub type useconds_t = u32;
-
-s! {
-    pub struct sockaddr {
-        pub sa_family: sa_family_t,
-        pub sa_data: [::c_char; 14],
-    }
-
-    pub struct sockaddr_in {
-        pub sin_family: sa_family_t,
-        pub sin_port: ::in_port_t,
-        pub sin_addr: ::in_addr,
-        pub sin_zero: [u8; 8],
-    }
-
-    pub struct sockaddr_in6 { // Unverified
-        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,
-        pub __ss_padding: [u8; 26],
-    }
-
-    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_canonname: *mut ::c_char,
-        pub ai_addr: *mut sockaddr,
-        pub ai_next: *mut addrinfo,
-    }
-
-    pub struct ip_mreq {
-        pub imr_multiaddr: in_addr,
-        pub imr_interface: in_addr,
-    }
-
-    pub struct linger {
-        pub l_onoff: ::c_int,
-        pub l_linger: ::c_int,
-    }
-
-    pub struct in_addr {
-            pub s_addr: ::in_addr_t,
-    }
-
-    pub struct hostent {
-            pub h_name: *mut ::c_char,
-            pub h_aliases: *mut *mut ::c_char,
-            pub h_addrtype: ::c_int,
-            pub h_length: ::c_int,
-            pub h_addr_list: *mut *mut ::c_char,
-            pub h_addr: *mut ::c_char,
-    }
-
-    pub struct pollfd {
-        pub fd: ::c_int,
-        pub events: ::c_int,
-        pub revents: ::c_int,
-    }
-
-    pub struct lconv {
-        pub decimal_point: *mut ::c_char,
-        pub thousands_sep: *mut ::c_char,
-        pub grouping: *mut ::c_char,
-        pub int_curr_symbol: *mut ::c_char,
-        pub currency_symbol: *mut ::c_char,
-        pub mon_decimal_point: *mut ::c_char,
-        pub mon_thousands_sep: *mut ::c_char,
-        pub mon_grouping: *mut ::c_char,
-        pub positive_sign: *mut ::c_char,
-        pub negative_sign: *mut ::c_char,
-        pub int_frac_digits: ::c_char,
-        pub frac_digits: ::c_char,
-        pub p_cs_precedes: ::c_char,
-        pub p_sep_by_space: ::c_char,
-        pub n_cs_precedes: ::c_char,
-        pub n_sep_by_space: ::c_char,
-        pub p_sign_posn: ::c_char,
-        pub n_sign_posn: ::c_char,
-        pub int_n_cs_precedes: ::c_char,
-        pub int_n_sep_by_space: ::c_char,
-        pub int_n_sign_posn: ::c_char,
-        pub int_p_cs_precedes: ::c_char,
-        pub int_p_sep_by_space: ::c_char,
-        pub int_p_sign_posn: ::c_char,
-    }
-
-    pub struct tm {
-        pub tm_sec: ::c_int,
-        pub tm_min: ::c_int,
-        pub tm_hour: ::c_int,
-        pub tm_mday: ::c_int,
-        pub tm_mon: ::c_int,
-        pub tm_year: ::c_int,
-        pub tm_wday: ::c_int,
-        pub tm_yday: ::c_int,
-        pub tm_isdst: ::c_int,
-    }
-
-    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,
-        pub st_size: off_t,
-        pub st_atime: time_t,
-        pub st_spare1: ::c_long,
-        pub st_mtime: time_t,
-        pub st_spare2: ::c_long,
-        pub st_ctime: time_t,
-        pub st_spare3: ::c_long,
-        pub st_blksize: blksize_t,
-        pub st_blocks: blkcnt_t,
-        pub st_spare4: [::c_long; 2usize],
-    }
-
-    pub struct statvfs {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: fsblkcnt_t,
-        pub f_bfree: fsblkcnt_t,
-        pub f_bavail: fsblkcnt_t,
-        pub f_files: fsfilcnt_t,
-        pub f_ffree: fsfilcnt_t,
-        pub f_favail: fsfilcnt_t,
-        pub f_fsid: ::c_ulong,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-    }
-
-    pub struct sigset_t {
-        __val: [::c_ulong; 16],
-    }
-
-    pub struct sigaction {
-        pub sa_handler: extern fn(arg1: ::c_int),
-        pub sa_mask: sigset_t,
-        pub sa_flags: ::c_int,
-    }
-
-    pub struct dirent {
-        pub d_ino: ino_t,
-        pub d_type: ::c_uchar,
-        pub d_name: [::c_char; 256usize],
-    }
-
-    pub struct stack_t {
-        pub ss_sp: *mut ::c_void,
-        pub ss_flags: ::c_int,
-        pub ss_size: usize,
-    }
-
-    pub struct fd_set { // Unverified
-        fds_bits: [::c_ulong; FD_SETSIZE / ULONG_SIZE],
-    }
-
-    pub struct passwd { // Unverified
-        pub pw_name: *mut ::c_char,
-        pub pw_passwd: *mut ::c_char,
-        pub pw_uid: ::uid_t,
-        pub pw_gid: ::gid_t,
-        pub pw_gecos: *mut ::c_char,
-        pub pw_dir: *mut ::c_char,
-        pub pw_shell: *mut ::c_char,
-    }
-
-    pub struct termios { // Unverified
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_line: ::cc_t,
-        pub c_cc: [::cc_t; ::NCCS],
-    }
-
-    pub struct sem_t { // Unverified
-        __size: [::c_char; 16],
-    }
-
-    pub struct Dl_info { // Unverified
-        pub dli_fname: *const ::c_char,
-        pub dli_fbase: *mut ::c_void,
-        pub dli_sname: *const ::c_char,
-        pub dli_saddr: *mut ::c_void,
-    }
-
-    pub struct utsname { // Unverified
-        pub sysname: [::c_char; 65],
-        pub nodename: [::c_char; 65],
-        pub release: [::c_char; 65],
-        pub version: [::c_char; 65],
-        pub machine: [::c_char; 65],
-        pub domainname: [::c_char; 65]
-    }
-
-    pub struct cpu_set_t { // Unverified
-        bits: [u32; 32],
-    }
-
-    pub struct pthread_attr_t { // Unverified
-        __size: [u64; 7]
-    }
-
-    pub struct pthread_mutex_t { // Unverified
-        #[cfg(any(target_arch = "mips", target_arch = "arm",
-                  target_arch = "powerpc"))]
-        __align: [::c_long; 0],
-        #[cfg(not(any(target_arch = "mips", target_arch = "arm",
-                      target_arch = "powerpc")))]
-        __align: [::c_longlong; 0],
-        size: [u8; __SIZEOF_PTHREAD_MUTEX_T],
-    }
-
-    pub struct pthread_rwlock_t { // Unverified
-        #[cfg(any(target_arch = "mips", target_arch = "arm",
-                  target_arch = "powerpc"))]
-        __align: [::c_long; 0],
-        #[cfg(not(any(target_arch = "mips", target_arch = "arm",
-                      target_arch = "powerpc")))]
-        __align: [::c_longlong; 0],
-        size: [u8; __SIZEOF_PTHREAD_RWLOCK_T],
-    }
-
-    pub struct pthread_mutexattr_t { // Unverified
-        #[cfg(any(target_arch = "x86_64", target_arch = "powerpc64",
-                  target_arch = "mips64", target_arch = "s390x",
-                  target_arch = "sparc64"))]
-        __align: [::c_int; 0],
-        #[cfg(not(any(target_arch = "x86_64", target_arch = "powerpc64",
-                      target_arch = "mips64", target_arch = "s390x",
-                      target_arch = "sparc64")))]
-        __align: [::c_long; 0],
-        size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T],
-    }
-
-    pub struct pthread_rwlockattr_t { // Unverified
-        __lockkind: ::c_int,
-        __pshared: ::c_int,
-    }
-
-    pub struct pthread_cond_t { // Unverified
-        __align: [::c_longlong; 0],
-        size: [u8; __SIZEOF_PTHREAD_COND_T],
-    }
-
-    pub struct pthread_condattr_t { // Unverified
-        __align: [::c_int; 0],
-        size: [u8; __SIZEOF_PTHREAD_CONDATTR_T],
-    }
-
-}
-
-// unverified constants
-pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
-    __align: [],
-    size: [0; __SIZEOF_PTHREAD_MUTEX_T],
-};
-pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
-    __align: [],
-    size: [0; __SIZEOF_PTHREAD_COND_T],
-};
-pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
-    __align: [],
-    size: [0; __SIZEOF_PTHREAD_RWLOCK_T],
-};
-pub const NCCS: usize = 32;
-pub const __SIZEOF_PTHREAD_ATTR_T: usize = 56;
-pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
-pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
-pub const __SIZEOF_PTHREAD_COND_T: usize = 48;
-pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
-pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
-pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
-pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32;
-pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4;
-pub const __PTHREAD_MUTEX_HAVE_PREV: usize = 1;
-pub const __PTHREAD_RWLOCK_INT_FLAGS_SHARED: usize = 1;
-pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
-pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
-pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
-pub const FD_SETSIZE: usize = 1024;
-// intentionally not public, only used for fd_set
-const ULONG_SIZE: usize = 32;
-
-// Other constants
-pub const EPERM: ::c_int = 1;
-pub const ENOENT: ::c_int = 2;
-pub const ESRCH: ::c_int = 3;
-pub const EINTR: ::c_int = 4;
-pub const EIO: ::c_int = 5;
-pub const ENXIO: ::c_int = 6;
-pub const E2BIG: ::c_int = 7;
-pub const ENOEXEC: ::c_int = 8;
-pub const EBADF: ::c_int = 9;
-pub const ECHILD: ::c_int = 10;
-pub const EAGAIN: ::c_int = 11;
-pub const ENOMEM: ::c_int = 12;
-pub const EACCES: ::c_int = 13;
-pub const EFAULT: ::c_int = 14;
-pub const EBUSY: ::c_int = 16;
-pub const EEXIST: ::c_int = 17;
-pub const EXDEV: ::c_int = 18;
-pub const ENODEV: ::c_int = 19;
-pub const ENOTDIR: ::c_int = 20;
-pub const EISDIR: ::c_int = 21;
-pub const EINVAL: ::c_int = 22;
-pub const ENFILE: ::c_int = 23;
-pub const EMFILE: ::c_int = 24;
-pub const ENOTTY: ::c_int = 25;
-pub const ETXTBSY: ::c_int = 26;
-pub const EFBIG: ::c_int = 27;
-pub const ENOSPC: ::c_int = 28;
-pub const ESPIPE: ::c_int = 29;
-pub const EROFS: ::c_int = 30;
-pub const EMLINK: ::c_int = 31;
-pub const EPIPE: ::c_int = 32;
-pub const EDOM: ::c_int = 33;
-pub const ERANGE: ::c_int = 34;
-pub const ENOMSG: ::c_int = 35;
-pub const EIDRM: ::c_int = 36;
-pub const EDEADLK: ::c_int = 45;
-pub const ENOLCK: ::c_int = 46;
-pub const ENOSTR: ::c_int = 60;
-pub const ENODATA: ::c_int = 61;
-pub const ETIME: ::c_int = 62;
-pub const ENOSR: ::c_int = 63;
-pub const ENOLINK: ::c_int = 67;
-pub const EPROTO: ::c_int = 71;
-pub const EMULTIHOP: ::c_int = 74;
-pub const EBADMSG: ::c_int = 77;
-pub const EFTYPE: ::c_int = 79;
-pub const ENOSYS: ::c_int = 88;
-pub const ENOTEMPTY: ::c_int = 90;
-pub const ENAMETOOLONG: ::c_int = 91;
-pub const ELOOP: ::c_int = 92;
-pub const EOPNOTSUPP: ::c_int = 95;
-pub const EPFNOSUPPORT: ::c_int = 96;
-pub const ECONNRESET: ::c_int = 104;
-pub const ENOBUFS: ::c_int = 105;
-pub const EAFNOSUPPORT: ::c_int = 106;
-pub const EPROTOTYPE: ::c_int = 107;
-pub const ENOTSOCK: ::c_int = 108;
-pub const ENOPROTOOPT: ::c_int = 109;
-pub const ECONNREFUSED: ::c_int = 111;
-pub const EADDRINUSE: ::c_int = 112;
-pub const ECONNABORTED: ::c_int = 113;
-pub const ENETUNREACH: ::c_int = 114;
-pub const ENETDOWN: ::c_int = 115;
-pub const ETIMEDOUT: ::c_int = 116;
-pub const EHOSTDOWN: ::c_int = 117;
-pub const EHOSTUNREACH: ::c_int = 118;
-pub const EINPROGRESS: ::c_int = 119;
-pub const EALREADY: ::c_int = 120;
-pub const EDESTADDRREQ: ::c_int = 121;
-pub const EMSGSIZE: ::c_int = 122;
-pub const EPROTONOSUPPORT: ::c_int = 123;
-pub const EADDRNOTAVAIL: ::c_int = 125;
-pub const ENETRESET: ::c_int = 126;
-pub const EISCONN: ::c_int = 127;
-pub const ENOTCONN: ::c_int = 128;
-pub const ETOOMANYREFS: ::c_int = 129;
-pub const EDQUOT: ::c_int = 132;
-pub const ESTALE: ::c_int = 133;
-pub const ENOTSUP: ::c_int = 134;
-pub const EILSEQ: ::c_int = 138;
-pub const EOVERFLOW: ::c_int = 139;
-pub const ECANCELED: ::c_int = 140;
-pub const ENOTRECOVERABLE: ::c_int = 141;
-pub const EOWNERDEAD: ::c_int = 142;
-pub const EWOULDBLOCK: ::c_int = 11;
-
-pub const F_DUPFD: ::c_int = 0;
-pub const F_GETFD: ::c_int = 1;
-pub const F_SETFD: ::c_int = 2;
-pub const F_GETFL: ::c_int = 3;
-pub const F_SETFL: ::c_int = 4;
-pub const F_GETOWN: ::c_int = 5;
-pub const F_SETOWN: ::c_int = 6;
-pub const F_GETLK: ::c_int = 7;
-pub const F_SETLK: ::c_int = 8;
-pub const F_SETLKW: ::c_int = 9;
-pub const F_RGETLK: ::c_int = 10;
-pub const F_RSETLK: ::c_int = 11;
-pub const F_CNVT: ::c_int = 12;
-pub const F_RSETLKW: ::c_int = 13;
-pub const F_DUPFD_CLOEXEC: ::c_int = 14;
-
-pub const O_RDONLY: ::c_int = 0;
-pub const O_WRONLY: ::c_int = 1;
-pub const O_RDWR: ::c_int = 2;
-pub const O_APPEND: ::c_int = 8;
-pub const O_CREAT: ::c_int = 512;
-pub const O_TRUNC: ::c_int = 1024;
-pub const O_EXCL: ::c_int = 2048;
-pub const O_SYNC: ::c_int = 8192;
-pub const O_NONBLOCK: ::c_int = 16384;
-
-pub const O_ACCMODE: ::c_int = 3;
-pub const O_CLOEXEC: ::c_int = 0x80000;
-
-pub const POLLIN: ::c_short = 0x1;
-pub const POLLPRI: ::c_short = 0x2;
-pub const POLLOUT: ::c_short = 0x4;
-pub const POLLERR: ::c_short = 0x8;
-pub const POLLHUP: ::c_short = 0x10;
-pub const POLLNVAL: ::c_short = 0x20;
-
-pub const RTLD_LAZY: ::c_int = 0x1;
-
-pub const STDIN_FILENO: ::c_int = 0;
-pub const STDOUT_FILENO: ::c_int = 1;
-pub const STDERR_FILENO: ::c_int = 2;
-
-pub const SEEK_SET: ::c_int = 0;
-pub const SEEK_CUR: ::c_int = 1;
-pub const SEEK_END: ::c_int = 2;
-
-pub const FIONBIO: ::c_int = 1;
-
-pub const S_BLKSIZE: ::mode_t = 1024;
-pub const S_IREAD: ::mode_t = 256;
-pub const S_IWRITE: ::mode_t = 128;
-pub const S_IEXEC: ::mode_t = 64;
-pub const S_ENFMT: ::mode_t = 1024;
-pub const S_IFMT: ::mode_t = 61440;
-pub const S_IFDIR: ::mode_t = 16384;
-pub const S_IFCHR: ::mode_t = 8192;
-pub const S_IFBLK: ::mode_t = 24576;
-pub const S_IFREG: ::mode_t = 32768;
-pub const S_IFLNK: ::mode_t = 40960;
-pub const S_IFSOCK: ::mode_t = 49152;
-pub const S_IFIFO: ::mode_t = 4096;
-pub const S_IRUSR: ::mode_t = 256;
-pub const S_IWUSR: ::mode_t = 128;
-pub const S_IXUSR: ::mode_t = 64;
-pub const S_IRGRP: ::mode_t = 32;
-pub const S_IWGRP: ::mode_t = 16;
-pub const S_IXGRP: ::mode_t = 8;
-pub const S_IROTH: ::mode_t = 4;
-pub const S_IWOTH: ::mode_t = 2;
-pub const S_IXOTH: ::mode_t = 1;
-
-pub const SOL_SOCKET: ::c_int = 65535;
-pub const SOL_TCP: ::c_int = 6;
-
-pub const PF_UNSPEC: ::c_int = 0;
-pub const PF_INET: ::c_int = 2;
-pub const PF_INET6: ::c_int = 23;
-
-pub const AF_UNSPEC: ::c_int = 0;
-pub const AF_INET: ::c_int = 2;
-pub const AF_INET6: ::c_int = 23;
-
-pub const SOCK_STREAM: ::c_int = 1;
-pub const SOCK_DGRAM: ::c_int = 2;
-
-pub const MSG_OOB: ::c_int = 1;
-pub const MSG_PEEK: ::c_int = 2;
-pub const MSG_DONTWAIT: ::c_int = 4;
-pub const MSG_DONTROUTE: ::c_int = 0;
-pub const MSG_WAITALL: ::c_int = 0;
-pub const MSG_MORE: ::c_int = 0;
-pub const MSG_NOSIGNAL: ::c_int = 0;
-
-pub const SHUT_RD: ::c_int = 0;
-pub const SHUT_WR: ::c_int = 1;
-pub const SHUT_RDWR: ::c_int = 2;
-
-pub const SO_REUSEADDR: ::c_int = 4;
-pub const SO_LINGER: ::c_int = 128;
-pub const SO_OOBINLINE: ::c_int = 256;
-pub const SO_SNDBUF: ::c_int = 4097;
-pub const SO_RCVBUF: ::c_int = 4098;
-pub const SO_SNDLOWAT: ::c_int = 4099;
-pub const SO_RCVLOWAT: ::c_int = 4100;
-pub const SO_TYPE: ::c_int = 4104;
-pub const SO_ERROR: ::c_int = 4105;
-
-pub const SOCK_CLOEXEC: ::c_int = O_CLOEXEC;
-
-pub const INET_ADDRSTRLEN: ::c_int = 16;
-
-pub const IPPROTO_IP: ::c_int = 0;
-pub const IPPROTO_UDP: ::c_int = 17;
-pub const IPPROTO_TCP: ::c_int = 6;
-
-pub const TCP_NODELAY: ::c_int = 8193;
-pub const TCP_MAXSEG: ::c_int = 8194;
-
-pub const IP_TOS: ::c_int = 7;
-pub const IP_TTL: ::c_int = 8;
-pub const IP_MULTICAST_LOOP: ::c_int = 9;
-pub const IP_MULTICAST_TTL: ::c_int = 10;
-pub const IP_ADD_MEMBERSHIP: ::c_int = 11;
-pub const IP_DROP_MEMBERSHIP: ::c_int = 12;
-
-pub const HOST_NOT_FOUND: ::c_int = 1;
-pub const NO_DATA: ::c_int = 2;
-pub const NO_ADDRESS: ::c_int = 2;
-pub const NO_RECOVERY: ::c_int = 3;
-pub const TRY_AGAIN: ::c_int = 4;
-
-pub const AI_PASSIVE: ::c_int = 1;
-pub const AI_CANONNAME: ::c_int = 2;
-pub const AI_NUMERICHOST: ::c_int = 4;
-pub const AI_NUMERICSERV: ::c_int = 0;
-pub const AI_ADDRCONFIG: ::c_int = 0;
-
-pub const NI_MAXHOST: ::c_int = 1025;
-pub const NI_MAXSERV: ::c_int = 32;
-pub const NI_NOFQDN: ::c_int = 1;
-pub const NI_NUMERICHOST: ::c_int = 2;
-pub const NI_NAMEREQD: ::c_int = 4;
-pub const NI_NUMERICSERV: ::c_int = 0;
-pub const NI_DGRAM: ::c_int = 0;
-
-pub const EAI_FAMILY: ::c_int = -303;
-pub const EAI_MEMORY: ::c_int = -304;
-pub const EAI_NONAME: ::c_int = -305;
-pub const EAI_SOCKTYPE: ::c_int = -307;
-
-f! {
-    pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
-        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
-        let fd = fd as usize;
-        (*set).fds_bits[fd / bits] &= !(1 << (fd % bits));
-        return
-    }
-
-    pub fn FD_ISSET(fd: ::c_int, set: *mut fd_set) -> bool {
-        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
-        let fd = fd as usize;
-        return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0
-    }
-
-    pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () {
-        let bits = mem::size_of_val(&(*set).fds_bits[0]) * 8;
-        let fd = fd as usize;
-        (*set).fds_bits[fd / bits] |= 1 << (fd % bits);
-        return
-    }
-
-    pub fn FD_ZERO(set: *mut fd_set) -> () {
-        for slot in (*set).fds_bits.iter_mut() {
-            *slot = 0;
-        }
-    }
-}
-
-extern {
-    pub fn bind(fd: ::c_int, addr: *const sockaddr, len: socklen_t) -> ::c_int;
-    pub fn closesocket(sockfd: ::c_int) -> ::c_int;
-    pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
-    pub fn recvfrom(fd: ::c_int, buf: *mut ::c_void, n: usize, flags: ::c_int,
-                    addr: *mut sockaddr, addr_len: *mut socklen_t) -> isize;
-    pub fn getnameinfo(sa: *const sockaddr, salen: socklen_t,
-                       host: *mut ::c_char, hostlen: socklen_t,
-                       serv: *mut ::c_char, servlen: socklen_t,
-                       flags: ::c_int) -> ::c_int;
-    pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
-    pub fn fexecve(fd: ::c_int, argv: *const *const ::c_char,
-                   envp: *const *const ::c_char)
-                   -> ::c_int;
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")]
-    pub fn getgrgid_r(uid: ::uid_t,
-                      grp: *mut ::group,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut ::group) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "sigaltstack$UNIX2003")]
-    #[cfg_attr(target_os = "netbsd", link_name = "__sigaltstack14")]
-    pub fn sigaltstack(ss: *const stack_t,
-                       oss: *mut stack_t) -> ::c_int;
-    pub fn sem_close(sem: *mut sem_t) -> ::c_int;
-    pub fn getdtablesize() -> ::c_int;
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrnam_r")]
-    pub fn getgrnam_r(name: *const ::c_char,
-                      grp: *mut ::group,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut ::group) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "pthread_sigmask$UNIX2003")]
-    pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t,
-                           oldset: *mut sigset_t) -> ::c_int;
-    pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t;
-    pub fn getgrnam(name: *const ::c_char) -> *mut ::group;
-    pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
-    pub fn sem_unlink(name: *const ::c_char) -> ::c_int;
-    pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__getpwnam_r50")]
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwnam_r")]
-    pub fn getpwnam_r(name: *const ::c_char,
-                      pwd: *mut passwd,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut passwd) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid_r50")]
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwuid_r")]
-    pub fn getpwuid_r(uid: ::uid_t,
-                      pwd: *mut passwd,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut passwd) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch ="x86"),
-               link_name = "sigwait$UNIX2003")]
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_sigwait")]
-    pub fn sigwait(set: *const sigset_t,
-                   sig: *mut ::c_int) -> ::c_int;
-    pub fn pthread_atfork(prepare: Option<unsafe extern fn()>,
-                          parent: Option<unsafe extern fn()>,
-                          child: Option<unsafe extern fn()>) -> ::c_int;
-    pub fn getgrgid(gid: ::gid_t) -> *mut ::group;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "popen$UNIX2003")]
-    pub fn popen(command: *const c_char,
-                 mode: *const c_char) -> *mut ::FILE;
-}
-
-cfg_if! {
-    if #[cfg(target_arch = "arm")] {
-        mod arm;
-        pub use self::arm::*;
-    } else {
-        // Only tested on ARM so far. Other platforms might have different
-        // definitions for types and constants.
-        pub use target_arch_not_implemented;
-    }
-}
--- a/third_party/rust/libc/src/unix/notbsd/android/b32/arm.rs
+++ b/third_party/rust/libc/src/unix/notbsd/android/b32/arm.rs
@@ -1,357 +1,6 @@
 pub type c_char = u8;
 pub type wchar_t = u32;
 
 pub const O_DIRECT: ::c_int = 0x10000;
 pub const O_DIRECTORY: ::c_int = 0x4000;
 pub const O_NOFOLLOW: ::c_int = 0x8000;
-pub const O_LARGEFILE: ::c_int = 0o400000;
-
-pub const SYS_restart_syscall: ::c_long = 0;
-pub const SYS_exit: ::c_long = 1;
-pub const SYS_fork: ::c_long = 2;
-pub const SYS_read: ::c_long = 3;
-pub const SYS_write: ::c_long = 4;
-pub const SYS_open: ::c_long = 5;
-pub const SYS_close: ::c_long = 6;
-pub const SYS_creat: ::c_long = 8;
-pub const SYS_link: ::c_long = 9;
-pub const SYS_unlink: ::c_long = 10;
-pub const SYS_execve: ::c_long = 11;
-pub const SYS_chdir: ::c_long = 12;
-pub const SYS_mknod: ::c_long = 14;
-pub const SYS_chmod: ::c_long = 15;
-pub const SYS_lchown: ::c_long = 16;
-pub const SYS_lseek: ::c_long = 19;
-pub const SYS_getpid: ::c_long = 20;
-pub const SYS_mount: ::c_long = 21;
-pub const SYS_setuid: ::c_long = 23;
-pub const SYS_getuid: ::c_long = 24;
-pub const SYS_ptrace: ::c_long = 26;
-pub const SYS_pause: ::c_long = 29;
-pub const SYS_access: ::c_long = 33;
-pub const SYS_nice: ::c_long = 34;
-pub const SYS_sync: ::c_long = 36;
-pub const SYS_kill: ::c_long = 37;
-pub const SYS_rename: ::c_long = 38;
-pub const SYS_mkdir: ::c_long = 39;
-pub const SYS_rmdir: ::c_long = 40;
-pub const SYS_dup: ::c_long = 41;
-pub const SYS_pipe: ::c_long = 42;
-pub const SYS_times: ::c_long = 43;
-pub const SYS_brk: ::c_long = 45;
-pub const SYS_setgid: ::c_long = 46;
-pub const SYS_getgid: ::c_long = 47;
-pub const SYS_geteuid: ::c_long = 49;
-pub const SYS_getegid: ::c_long = 50;
-pub const SYS_acct: ::c_long = 51;
-pub const SYS_umount2: ::c_long = 52;
-pub const SYS_ioctl: ::c_long = 54;
-pub const SYS_fcntl: ::c_long = 55;
-pub const SYS_setpgid: ::c_long = 57;
-pub const SYS_umask: ::c_long = 60;
-pub const SYS_chroot: ::c_long = 61;
-pub const SYS_ustat: ::c_long = 62;
-pub const SYS_dup2: ::c_long = 63;
-pub const SYS_getppid: ::c_long = 64;
-pub const SYS_getpgrp: ::c_long = 65;
-pub const SYS_setsid: ::c_long = 66;
-pub const SYS_sigaction: ::c_long = 67;
-pub const SYS_setreuid: ::c_long = 70;
-pub const SYS_setregid: ::c_long = 71;
-pub const SYS_sigsuspend: ::c_long = 72;
-pub const SYS_sigpending: ::c_long = 73;
-pub const SYS_sethostname: ::c_long = 74;
-pub const SYS_setrlimit: ::c_long = 75;
-pub const SYS_getrusage: ::c_long = 77;
-pub const SYS_gettimeofday: ::c_long = 78;
-pub const SYS_settimeofday: ::c_long = 79;
-pub const SYS_getgroups: ::c_long = 80;
-pub const SYS_setgroups: ::c_long = 81;
-pub const SYS_symlink: ::c_long = 83;
-pub const SYS_readlink: ::c_long = 85;
-pub const SYS_uselib: ::c_long = 86;
-pub const SYS_swapon: ::c_long = 87;
-pub const SYS_reboot: ::c_long = 88;
-pub const SYS_munmap: ::c_long = 91;
-pub const SYS_truncate: ::c_long = 92;
-pub const SYS_ftruncate: ::c_long = 93;
-pub const SYS_fchmod: ::c_long = 94;
-pub const SYS_fchown: ::c_long = 95;
-pub const SYS_getpriority: ::c_long = 96;
-pub const SYS_setpriority: ::c_long = 97;
-pub const SYS_statfs: ::c_long = 99;
-pub const SYS_fstatfs: ::c_long = 100;
-pub const SYS_syslog: ::c_long = 103;
-pub const SYS_setitimer: ::c_long = 104;
-pub const SYS_getitimer: ::c_long = 105;
-pub const SYS_stat: ::c_long = 106;
-pub const SYS_lstat: ::c_long = 107;
-pub const SYS_fstat: ::c_long = 108;
-pub const SYS_vhangup: ::c_long = 111;
-pub const SYS_wait4: ::c_long = 114;
-pub const SYS_swapoff: ::c_long = 115;
-pub const SYS_sysinfo: ::c_long = 116;
-pub const SYS_fsync: ::c_long = 118;
-pub const SYS_sigreturn: ::c_long = 119;
-pub const SYS_clone: ::c_long = 120;
-pub const SYS_setdomainname: ::c_long = 121;
-pub const SYS_uname: ::c_long = 122;
-pub const SYS_adjtimex: ::c_long = 124;
-pub const SYS_mprotect: ::c_long = 125;
-pub const SYS_sigprocmask: ::c_long = 126;
-pub const SYS_init_module: ::c_long = 128;
-pub const SYS_delete_module: ::c_long = 129;
-pub const SYS_quotactl: ::c_long = 131;
-pub const SYS_getpgid: ::c_long = 132;
-pub const SYS_fchdir: ::c_long = 133;
-pub const SYS_bdflush: ::c_long = 134;
-pub const SYS_sysfs: ::c_long = 135;
-pub const SYS_personality: ::c_long = 136;
-pub const SYS_setfsuid: ::c_long = 138;
-pub const SYS_setfsgid: ::c_long = 139;
-pub const SYS_getdents: ::c_long = 141;
-pub const SYS_flock: ::c_long = 143;
-pub const SYS_msync: ::c_long = 144;
-pub const SYS_readv: ::c_long = 145;
-pub const SYS_writev: ::c_long = 146;
-pub const SYS_getsid: ::c_long = 147;
-pub const SYS_fdatasync: ::c_long = 148;
-pub const SYS_mlock: ::c_long = 150;
-pub const SYS_munlock: ::c_long = 151;
-pub const SYS_mlockall: ::c_long = 152;
-pub const SYS_munlockall: ::c_long = 153;
-pub const SYS_sched_setparam: ::c_long = 154;
-pub const SYS_sched_getparam: ::c_long = 155;
-pub const SYS_sched_setscheduler: ::c_long = 156;
-pub const SYS_sched_getscheduler: ::c_long = 157;
-pub const SYS_sched_yield: ::c_long = 158;
-pub const SYS_sched_get_priority_max: ::c_long = 159;
-pub const SYS_sched_get_priority_min: ::c_long = 160;
-pub const SYS_sched_rr_get_interval: ::c_long = 161;
-pub const SYS_nanosleep: ::c_long = 162;
-pub const SYS_mremap: ::c_long = 163;
-pub const SYS_setresuid: ::c_long = 164;
-pub const SYS_getresuid: ::c_long = 165;
-pub const SYS_poll: ::c_long = 168;
-pub const SYS_nfsservctl: ::c_long = 169;
-pub const SYS_setresgid: ::c_long = 170;
-pub const SYS_getresgid: ::c_long = 171;
-pub const SYS_prctl: ::c_long = 172;
-pub const SYS_rt_sigreturn: ::c_long = 173;
-pub const SYS_rt_sigaction: ::c_long = 174;
-pub const SYS_rt_sigprocmask: ::c_long = 175;
-pub const SYS_rt_sigpending: ::c_long = 176;
-pub const SYS_rt_sigtimedwait: ::c_long = 177;
-pub const SYS_rt_sigqueueinfo: ::c_long = 178;
-pub const SYS_rt_sigsuspend: ::c_long = 179;
-pub const SYS_pread64: ::c_long = 180;
-pub const SYS_pwrite64: ::c_long = 181;
-pub const SYS_chown: ::c_long = 182;
-pub const SYS_getcwd: ::c_long = 183;
-pub const SYS_capget: ::c_long = 184;
-pub const SYS_capset: ::c_long = 185;
-pub const SYS_sigaltstack: ::c_long = 186;
-pub const SYS_sendfile: ::c_long = 187;
-pub const SYS_vfork: ::c_long = 190;
-pub const SYS_ugetrlimit: ::c_long = 191;
-pub const SYS_mmap2: ::c_long = 192;
-pub const SYS_truncate64: ::c_long = 193;
-pub const SYS_ftruncate64: ::c_long = 194;
-pub const SYS_stat64: ::c_long = 195;
-pub const SYS_lstat64: ::c_long = 196;
-pub const SYS_fstat64: ::c_long = 197;
-pub const SYS_lchown32: ::c_long = 198;
-pub const SYS_getuid32: ::c_long = 199;
-pub const SYS_getgid32: ::c_long = 200;
-pub const SYS_geteuid32: ::c_long = 201;
-pub const SYS_getegid32: ::c_long = 202;
-pub const SYS_setreuid32: ::c_long = 203;
-pub const SYS_setregid32: ::c_long = 204;
-pub const SYS_getgroups32: ::c_long = 205;
-pub const SYS_setgroups32: ::c_long = 206;
-pub const SYS_fchown32: ::c_long = 207;
-pub const SYS_setresuid32: ::c_long = 208;
-pub const SYS_getresuid32: ::c_long = 209;
-pub const SYS_setresgid32: ::c_long = 210;
-pub const SYS_getresgid32: ::c_long = 211;
-pub const SYS_chown32: ::c_long = 212;
-pub const SYS_setuid32: ::c_long = 213;
-pub const SYS_setgid32: ::c_long = 214;
-pub const SYS_setfsuid32: ::c_long = 215;
-pub const SYS_setfsgid32: ::c_long = 216;
-pub const SYS_getdents64: ::c_long = 217;
-pub const SYS_pivot_root: ::c_long = 218;
-pub const SYS_mincore: ::c_long = 219;
-pub const SYS_madvise: ::c_long = 220;
-pub const SYS_fcntl64: ::c_long = 221;
-pub const SYS_gettid: ::c_long = 224;
-pub const SYS_readahead: ::c_long = 225;
-pub const SYS_setxattr: ::c_long = 226;
-pub const SYS_lsetxattr: ::c_long = 227;
-pub const SYS_fsetxattr: ::c_long = 228;
-pub const SYS_getxattr: ::c_long = 229;
-pub const SYS_lgetxattr: ::c_long = 230;
-pub const SYS_fgetxattr: ::c_long = 231;
-pub const SYS_listxattr: ::c_long = 232;
-pub const SYS_llistxattr: ::c_long = 233;
-pub const SYS_flistxattr: ::c_long = 234;
-pub const SYS_removexattr: ::c_long = 235;
-pub const SYS_lremovexattr: ::c_long = 236;
-pub const SYS_fremovexattr: ::c_long = 237;
-pub const SYS_tkill: ::c_long = 238;
-pub const SYS_sendfile64: ::c_long = 239;
-pub const SYS_futex: ::c_long = 240;
-pub const SYS_sched_setaffinity: ::c_long = 241;
-pub const SYS_sched_getaffinity: ::c_long = 242;
-pub const SYS_io_setup: ::c_long = 243;
-pub const SYS_io_destroy: ::c_long = 244;
-pub const SYS_io_getevents: ::c_long = 245;
-pub const SYS_io_submit: ::c_long = 246;
-pub const SYS_io_cancel: ::c_long = 247;
-pub const SYS_exit_group: ::c_long = 248;
-pub const SYS_lookup_dcookie: ::c_long = 249;
-pub const SYS_epoll_create: ::c_long = 250;
-pub const SYS_epoll_ctl: ::c_long = 251;
-pub const SYS_epoll_wait: ::c_long = 252;
-pub const SYS_remap_file_pages: ::c_long = 253;
-pub const SYS_set_tid_address: ::c_long = 256;
-pub const SYS_timer_create: ::c_long = 257;
-pub const SYS_timer_settime: ::c_long = 258;
-pub const SYS_timer_gettime: ::c_long = 259;
-pub const SYS_timer_getoverrun: ::c_long = 260;
-pub const SYS_timer_delete: ::c_long = 261;
-pub const SYS_clock_settime: ::c_long = 262;
-pub const SYS_clock_gettime: ::c_long = 263;
-pub const SYS_clock_getres: ::c_long = 264;
-pub const SYS_clock_nanosleep: ::c_long = 265;
-pub const SYS_statfs64: ::c_long = 266;
-pub const SYS_fstatfs64: ::c_long = 267;
-pub const SYS_tgkill: ::c_long = 268;
-pub const SYS_utimes: ::c_long = 269;
-pub const SYS_arm_fadvise64_64: ::c_long = 270;
-pub const SYS_pciconfig_iobase: ::c_long = 271;
-pub const SYS_pciconfig_read: ::c_long = 272;
-pub const SYS_pciconfig_write: ::c_long = 273;
-pub const SYS_mq_open: ::c_long = 274;
-pub const SYS_mq_unlink: ::c_long = 275;
-pub const SYS_mq_timedsend: ::c_long = 276;
-pub const SYS_mq_timedreceive: ::c_long = 277;
-pub const SYS_mq_notify: ::c_long = 278;
-pub const SYS_mq_getsetattr: ::c_long = 279;
-pub const SYS_waitid: ::c_long = 280;
-pub const SYS_socket: ::c_long = 281;
-pub const SYS_bind: ::c_long = 282;
-pub const SYS_connect: ::c_long = 283;
-pub const SYS_listen: ::c_long = 284;
-pub const SYS_accept: ::c_long = 285;
-pub const SYS_getsockname: ::c_long = 286;
-pub const SYS_getpeername: ::c_long = 287;
-pub const SYS_socketpair: ::c_long = 288;
-pub const SYS_send: ::c_long = 289;
-pub const SYS_sendto: ::c_long = 290;
-pub const SYS_recv: ::c_long = 291;
-pub const SYS_recvfrom: ::c_long = 292;
-pub const SYS_shutdown: ::c_long = 293;
-pub const SYS_setsockopt: ::c_long = 294;
-pub const SYS_getsockopt: ::c_long = 295;
-pub const SYS_sendmsg: ::c_long = 296;
-pub const SYS_recvmsg: ::c_long = 297;
-pub const SYS_semop: ::c_long = 298;
-pub const SYS_semget: ::c_long = 299;
-pub const SYS_semctl: ::c_long = 300;
-pub const SYS_msgsnd: ::c_long = 301;
-pub const SYS_msgrcv: ::c_long = 302;
-pub const SYS_msgget: ::c_long = 303;
-pub const SYS_msgctl: ::c_long = 304;
-pub const SYS_shmat: ::c_long = 305;
-pub const SYS_shmdt: ::c_long = 306;
-pub const SYS_shmget: ::c_long = 307;
-pub const SYS_shmctl: ::c_long = 308;
-pub const SYS_add_key: ::c_long = 309;
-pub const SYS_request_key: ::c_long = 310;
-pub const SYS_keyctl: ::c_long = 311;
-pub const SYS_semtimedop: ::c_long = 312;
-pub const SYS_vserver: ::c_long = 313;
-pub const SYS_ioprio_set: ::c_long = 314;
-pub const SYS_ioprio_get: ::c_long = 315;
-pub const SYS_inotify_init: ::c_long = 316;
-pub const SYS_inotify_add_watch: ::c_long = 317;
-pub const SYS_inotify_rm_watch: ::c_long = 318;
-pub const SYS_mbind: ::c_long = 319;
-pub const SYS_get_mempolicy: ::c_long = 320;
-pub const SYS_set_mempolicy: ::c_long = 321;
-pub const SYS_openat: ::c_long = 322;
-pub const SYS_mkdirat: ::c_long = 323;
-pub const SYS_mknodat: ::c_long = 324;
-pub const SYS_fchownat: ::c_long = 325;
-pub const SYS_futimesat: ::c_long = 326;
-pub const SYS_fstatat64: ::c_long = 327;
-pub const SYS_unlinkat: ::c_long = 328;
-pub const SYS_renameat: ::c_long = 329;
-pub const SYS_linkat: ::c_long = 330;
-pub const SYS_symlinkat: ::c_long = 331;
-pub const SYS_readlinkat: ::c_long = 332;
-pub const SYS_fchmodat: ::c_long = 333;
-pub const SYS_faccessat: ::c_long = 334;
-pub const SYS_pselect6: ::c_long = 335;
-pub const SYS_ppoll: ::c_long = 336;
-pub const SYS_unshare: ::c_long = 337;
-pub const SYS_set_robust_list: ::c_long = 338;
-pub const SYS_get_robust_list: ::c_long = 339;
-pub const SYS_splice: ::c_long = 340;
-pub const SYS_arm_sync_file_range: ::c_long = 341;
-pub const SYS_tee: ::c_long = 342;
-pub const SYS_vmsplice: ::c_long = 343;
-pub const SYS_move_pages: ::c_long = 344;
-pub const SYS_getcpu: ::c_long = 345;
-pub const SYS_epoll_pwait: ::c_long = 346;
-pub const SYS_kexec_load: ::c_long = 347;
-pub const SYS_utimensat: ::c_long = 348;
-pub const SYS_signalfd: ::c_long = 349;
-pub const SYS_timerfd_create: ::c_long = 350;
-pub const SYS_eventfd: ::c_long = 351;
-pub const SYS_fallocate: ::c_long = 352;
-pub const SYS_timerfd_settime: ::c_long = 353;
-pub const SYS_timerfd_gettime: ::c_long = 354;
-pub const SYS_signalfd4: ::c_long = 355;
-pub const SYS_eventfd2: ::c_long = 356;
-pub const SYS_epoll_create1: ::c_long = 357;
-pub const SYS_dup3: ::c_long = 358;
-pub const SYS_pipe2: ::c_long = 359;
-pub const SYS_inotify_init1: ::c_long = 360;
-pub const SYS_preadv: ::c_long = 361;
-pub const SYS_pwritev: ::c_long = 362;
-pub const SYS_rt_tgsigqueueinfo: ::c_long = 363;
-pub const SYS_perf_event_open: ::c_long = 364;
-pub const SYS_recvmmsg: ::c_long = 365;
-pub const SYS_accept4: ::c_long = 366;
-pub const SYS_fanotify_init: ::c_long = 367;
-pub const SYS_fanotify_mark: ::c_long = 368;
-pub const SYS_prlimit64: ::c_long = 369;
-pub const SYS_name_to_handle_at: ::c_long = 370;
-pub const SYS_open_by_handle_at: ::c_long = 371;
-pub const SYS_clock_adjtime: ::c_long = 372;
-pub const SYS_syncfs: ::c_long = 373;
-pub const SYS_sendmmsg: ::c_long = 374;
-pub const SYS_setns: ::c_long = 375;
-pub const SYS_process_vm_readv: ::c_long = 376;
-pub const SYS_process_vm_writev: ::c_long = 377;
-pub const SYS_kcmp: ::c_long = 378;
-pub const SYS_finit_module: ::c_long = 379;
-pub const SYS_sched_setattr: ::c_long = 380;
-pub const SYS_sched_getattr: ::c_long = 381;
-pub const SYS_renameat2: ::c_long = 382;
-pub const SYS_seccomp: ::c_long = 383;
-pub const SYS_getrandom: ::c_long = 384;
-pub const SYS_memfd_create: ::c_long = 385;
-pub const SYS_bpf: ::c_long = 386;
-pub const SYS_execveat: ::c_long = 387;
-pub const SYS_userfaultfd: ::c_long = 388;
-pub const SYS_membarrier: ::c_long = 389;
-pub const SYS_mlock2: ::c_long = 390;
-pub const SYS_copy_file_range: ::c_long = 391;
-pub const SYS_preadv2: ::c_long = 392;
-pub const SYS_pwritev2: ::c_long = 393;
-pub const SYS_pkey_mprotect: ::c_long = 394;
-pub const SYS_pkey_alloc: ::c_long = 395;
-pub const SYS_pkey_free: ::c_long = 396;
--- a/third_party/rust/libc/src/unix/notbsd/android/b32/mod.rs
+++ b/third_party/rust/libc/src/unix/notbsd/android/b32/mod.rs
@@ -61,45 +61,16 @@ s! {
         pub st_atime_nsec: ::c_ulong,
         pub st_mtime: ::c_ulong,
         pub st_mtime_nsec: ::c_ulong,
         pub st_ctime: ::c_ulong,
         pub st_ctime_nsec: ::c_ulong,
         pub st_ino: ::c_ulonglong,
     }
 
-    pub struct statfs64 {
-        pub f_type: u32,
-        pub f_bsize: u32,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_bavail: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        f_fsid: [u32; 2],
-        pub f_namelen: u32,
-        pub f_frsize: u32,
-        pub f_flags: u32,
-        pub f_spare: [u32; 4],
-    }
-
-    pub struct statvfs64 {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: ::c_ulong,
-        pub f_bfree: ::c_ulong,
-        pub f_bavail: ::c_ulong,
-        pub f_files: ::c_ulong,
-        pub f_ffree: ::c_ulong,
-        pub f_favail: ::c_ulong,
-        pub f_fsid: ::c_ulong,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-    }
-
     pub struct pthread_attr_t {
         pub flags: ::uint32_t,
         pub stack_base: *mut ::c_void,
         pub stack_size: ::size_t,
         pub guard_size: ::size_t,
         pub sched_policy: ::int32_t,
         pub sched_priority: ::int32_t,
     }
@@ -165,16 +136,17 @@ pub const RTLD_GLOBAL: ::c_int = 2;
 pub const RTLD_NOW: ::c_int = 0;
 pub const RTLD_DEFAULT: *mut ::c_void = -1isize as *mut ::c_void;
 
 pub const PTRACE_GETFPREGS: ::c_int = 14;
 pub const PTRACE_SETFPREGS: ::c_int = 15;
 pub const PTRACE_GETREGS: ::c_int = 12;
 pub const PTRACE_SETREGS: ::c_int = 13;
 
+pub const SYS_gettid: ::c_long = 224;
 pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
     value: 0,
 };
 pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
     value: 0,
 };
 pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
     lock: PTHREAD_MUTEX_INITIALIZER,
@@ -189,19 +161,16 @@ pub const PTHREAD_RWLOCK_INITIALIZER: pt
 pub const PTHREAD_STACK_MIN: ::size_t = 4096 * 2;
 pub const CPU_SETSIZE: ::size_t = 32;
 pub const __CPU_BITS: ::size_t = 32;
 
 pub const UT_LINESIZE: usize = 8;
 pub const UT_NAMESIZE: usize = 8;
 pub const UT_HOSTSIZE: usize = 16;
 
-pub const SIGSTKSZ: ::size_t = 8192;
-pub const MINSIGSTKSZ: ::size_t = 2048;
-
 extern {
     pub fn bind(socket: ::c_int, address: *const ::sockaddr,
                 address_len: socklen_t) -> ::c_int;
 
     pub fn writev(fd: ::c_int,
                   iov: *const ::iovec,
                   iovcnt: ::c_int) -> ::ssize_t;
     pub fn readv(fd: ::c_int,
--- a/third_party/rust/libc/src/unix/notbsd/android/b32/x86.rs
+++ b/third_party/rust/libc/src/unix/notbsd/android/b32/x86.rs
@@ -1,415 +1,6 @@
 pub type c_char = i8;
 pub type wchar_t = i32;
 
 pub const O_DIRECT: ::c_int = 0x4000;
 pub const O_DIRECTORY: ::c_int = 0x10000;
 pub const O_NOFOLLOW: ::c_int = 0x20000;
-pub const O_LARGEFILE: ::c_int = 0o0100000;
-
-pub const MAP_32BIT: ::c_int = 0x40;
-
-// Syscall table
-pub const SYS_restart_syscall: ::c_long = 0;
-pub const SYS_exit: ::c_long = 1;
-pub const SYS_fork: ::c_long = 2;
-pub const SYS_read: ::c_long = 3;
-pub const SYS_write: ::c_long = 4;
-pub const SYS_open: ::c_long = 5;
-pub const SYS_close: ::c_long = 6;
-pub const SYS_waitpid: ::c_long = 7;
-pub const SYS_creat: ::c_long = 8;
-pub const SYS_link: ::c_long = 9;
-pub const SYS_unlink: ::c_long = 10;
-pub const SYS_execve: ::c_long = 11;
-pub const SYS_chdir: ::c_long = 12;
-pub const SYS_time: ::c_long = 13;
-pub const SYS_mknod: ::c_long = 14;
-pub const SYS_chmod: ::c_long = 15;
-pub const SYS_lchown: ::c_long = 16;
-pub const SYS_break: ::c_long = 17;
-pub const SYS_oldstat: ::c_long = 18;
-pub const SYS_lseek: ::c_long = 19;
-pub const SYS_getpid: ::c_long = 20;
-pub const SYS_mount: ::c_long = 21;
-pub const SYS_umount: ::c_long = 22;
-pub const SYS_setuid: ::c_long = 23;
-pub const SYS_getuid: ::c_long = 24;
-pub const SYS_stime: ::c_long = 25;
-pub const SYS_ptrace: ::c_long = 26;
-pub const SYS_alarm: ::c_long = 27;
-pub const SYS_oldfstat: ::c_long = 28;
-pub const SYS_pause: ::c_long = 29;
-pub const SYS_utime: ::c_long = 30;
-pub const SYS_stty: ::c_long = 31;
-pub const SYS_gtty: ::c_long = 32;
-pub const SYS_access: ::c_long = 33;
-pub const SYS_nice: ::c_long = 34;
-pub const SYS_ftime: ::c_long = 35;
-pub const SYS_sync: ::c_long = 36;
-pub const SYS_kill: ::c_long = 37;
-pub const SYS_rename: ::c_long = 38;
-pub const SYS_mkdir: ::c_long = 39;
-pub const SYS_rmdir: ::c_long = 40;
-pub const SYS_dup: ::c_long = 41;
-pub const SYS_pipe: ::c_long = 42;
-pub const SYS_times: ::c_long = 43;
-pub const SYS_prof: ::c_long = 44;
-pub const SYS_brk: ::c_long = 45;
-pub const SYS_setgid: ::c_long = 46;
-pub const SYS_getgid: ::c_long = 47;
-pub const SYS_signal: ::c_long = 48;
-pub const SYS_geteuid: ::c_long = 49;
-pub const SYS_getegid: ::c_long = 50;
-pub const SYS_acct: ::c_long = 51;
-pub const SYS_umount2: ::c_long = 52;
-pub const SYS_lock: ::c_long = 53;
-pub const SYS_ioctl: ::c_long = 54;
-pub const SYS_fcntl: ::c_long = 55;
-pub const SYS_mpx: ::c_long = 56;
-pub const SYS_setpgid: ::c_long = 57;
-pub const SYS_ulimit: ::c_long = 58;
-pub const SYS_oldolduname: ::c_long = 59;
-pub const SYS_umask: ::c_long = 60;
-pub const SYS_chroot: ::c_long = 61;
-pub const SYS_ustat: ::c_long = 62;
-pub const SYS_dup2: ::c_long = 63;
-pub const SYS_getppid: ::c_long = 64;
-pub const SYS_getpgrp: ::c_long = 65;
-pub const SYS_setsid: ::c_long = 66;
-pub const SYS_sigaction: ::c_long = 67;
-pub const SYS_sgetmask: ::c_long = 68;
-pub const SYS_ssetmask: ::c_long = 69;
-pub const SYS_setreuid: ::c_long = 70;
-pub const SYS_setregid: ::c_long = 71;
-pub const SYS_sigsuspend: ::c_long = 72;
-pub const SYS_sigpending: ::c_long = 73;
-pub const SYS_sethostname: ::c_long = 74;
-pub const SYS_setrlimit: ::c_long = 75;
-pub const SYS_getrlimit: ::c_long = 76;
-pub const SYS_getrusage: ::c_long = 77;
-pub const SYS_gettimeofday: ::c_long = 78;
-pub const SYS_settimeofday: ::c_long = 79;
-pub const SYS_getgroups: ::c_long = 80;
-pub const SYS_setgroups: ::c_long = 81;
-pub const SYS_select: ::c_long = 82;
-pub const SYS_symlink: ::c_long = 83;
-pub const SYS_oldlstat: ::c_long = 84;
-pub const SYS_readlink: ::c_long = 85;
-pub const SYS_uselib: ::c_long = 86;
-pub const SYS_swapon: ::c_long = 87;
-pub const SYS_reboot: ::c_long = 88;
-pub const SYS_readdir: ::c_long = 89;
-pub const SYS_mmap: ::c_long = 90;
-pub const SYS_munmap: ::c_long = 91;
-pub const SYS_truncate: ::c_long = 92;
-pub const SYS_ftruncate: ::c_long = 93;
-pub const SYS_fchmod: ::c_long = 94;
-pub const SYS_fchown: ::c_long = 95;
-pub const SYS_getpriority: ::c_long = 96;
-pub const SYS_setpriority: ::c_long = 97;
-pub const SYS_profil: ::c_long = 98;
-pub const SYS_statfs: ::c_long = 99;
-pub const SYS_fstatfs: ::c_long = 100;
-pub const SYS_ioperm: ::c_long = 101;
-pub const SYS_socketcall: ::c_long = 102;
-pub const SYS_syslog: ::c_long = 103;
-pub const SYS_setitimer: ::c_long = 104;
-pub const SYS_getitimer: ::c_long = 105;
-pub const SYS_stat: ::c_long = 106;
-pub const SYS_lstat: ::c_long = 107;
-pub const SYS_fstat: ::c_long = 108;
-pub const SYS_olduname: ::c_long = 109;
-pub const SYS_iopl: ::c_long = 110;
-pub const SYS_vhangup: ::c_long = 111;
-pub const SYS_idle: ::c_long = 112;
-pub const SYS_vm86old: ::c_long = 113;
-pub const SYS_wait4: ::c_long = 114;
-pub const SYS_swapoff: ::c_long = 115;
-pub const SYS_sysinfo: ::c_long = 116;
-pub const SYS_ipc: ::c_long = 117;
-pub const SYS_fsync: ::c_long = 118;
-pub const SYS_sigreturn: ::c_long = 119;
-pub const SYS_clone: ::c_long = 120;
-pub const SYS_setdomainname: ::c_long = 121;
-pub const SYS_uname: ::c_long = 122;
-pub const SYS_modify_ldt: ::c_long = 123;
-pub const SYS_adjtimex: ::c_long = 124;
-pub const SYS_mprotect: ::c_long = 125;
-pub const SYS_sigprocmask: ::c_long = 126;
-pub const SYS_create_module: ::c_long = 127;
-pub const SYS_init_module: ::c_long = 128;
-pub const SYS_delete_module: ::c_long = 129;
-pub const SYS_get_kernel_syms: ::c_long = 130;
-pub const SYS_quotactl: ::c_long = 131;
-pub const SYS_getpgid: ::c_long = 132;
-pub const SYS_fchdir: ::c_long = 133;
-pub const SYS_bdflush: ::c_long = 134;
-pub const SYS_sysfs: ::c_long = 135;
-pub const SYS_personality: ::c_long = 136;
-pub const SYS_afs_syscall: ::c_long = 137;
-pub const SYS_setfsuid: ::c_long = 138;
-pub const SYS_setfsgid: ::c_long = 139;
-// FIXME: SYS__llseek is in the NDK sources but for some reason is
-//        not available in the tests
-// pub const SYS__llseek: ::c_long = 140;
-pub const SYS_getdents: ::c_long = 141;
-// FIXME: SYS__newselect is in the NDK sources but for some reason is
-//        not available in the tests
-// pub const SYS__newselect: ::c_long = 142;
-pub const SYS_flock: ::c_long = 143;
-pub const SYS_msync: ::c_long = 144;
-pub const SYS_readv: ::c_long = 145;
-pub const SYS_writev: ::c_long = 146;
-pub const SYS_getsid: ::c_long = 147;
-pub const SYS_fdatasync: ::c_long = 148;
-// FIXME: SYS__llseek is in the NDK sources but for some reason is
-//        not available in the tests
-// pub const SYS__sysctl: ::c_long = 149;
-pub const SYS_mlock: ::c_long = 150;
-pub const SYS_munlock: ::c_long = 151;
-pub const SYS_mlockall: ::c_long = 152;
-pub const SYS_munlockall: ::c_long = 153;
-pub const SYS_sched_setparam: ::c_long = 154;
-pub const SYS_sched_getparam: ::c_long = 155;
-pub const SYS_sched_setscheduler: ::c_long = 156;
-pub const SYS_sched_getscheduler: ::c_long = 157;
-pub const SYS_sched_yield: ::c_long = 158;
-pub const SYS_sched_get_priority_max: ::c_long = 159;
-pub const SYS_sched_get_priority_min: ::c_long = 160;
-pub const SYS_sched_rr_get_interval: ::c_long = 161;
-pub const SYS_nanosleep: ::c_long = 162;
-pub const SYS_mremap: ::c_long = 163;
-pub const SYS_setresuid: ::c_long = 164;
-pub const SYS_getresuid: ::c_long = 165;
-pub const SYS_vm86: ::c_long = 166;
-pub const SYS_query_module: ::c_long = 167;
-pub const SYS_poll: ::c_long = 168;
-pub const SYS_nfsservctl: ::c_long = 169;
-pub const SYS_setresgid: ::c_long = 170;
-pub const SYS_getresgid: ::c_long = 171;
-pub const SYS_prctl: ::c_long = 172;
-pub const SYS_rt_sigreturn: ::c_long = 173;
-pub const SYS_rt_sigaction: ::c_long = 174;
-pub const SYS_rt_sigprocmask: ::c_long = 175;
-pub const SYS_rt_sigpending: ::c_long = 176;
-pub const SYS_rt_sigtimedwait: ::c_long = 177;
-pub const SYS_rt_sigqueueinfo: ::c_long = 178;
-pub const SYS_rt_sigsuspend: ::c_long = 179;
-pub const SYS_pread64: ::c_long = 180;
-pub const SYS_pwrite64: ::c_long = 181;
-pub const SYS_chown: ::c_long = 182;
-pub const SYS_getcwd: ::c_long = 183;
-pub const SYS_capget: ::c_long = 184;
-pub const SYS_capset: ::c_long = 185;
-pub const SYS_sigaltstack: ::c_long = 186;
-pub const SYS_sendfile: ::c_long = 187;
-pub const SYS_getpmsg: ::c_long = 188;
-pub const SYS_putpmsg: ::c_long = 189;
-pub const SYS_vfork: ::c_long = 190;
-pub const SYS_ugetrlimit: ::c_long = 191;
-pub const SYS_mmap2: ::c_long = 192;
-pub const SYS_truncate64: ::c_long = 193;
-pub const SYS_ftruncate64: ::c_long = 194;
-pub const SYS_stat64: ::c_long = 195;
-pub const SYS_lstat64: ::c_long = 196;
-pub const SYS_fstat64: ::c_long = 197;
-pub const SYS_lchown32: ::c_long = 198;
-pub const SYS_getuid32: ::c_long = 199;
-pub const SYS_getgid32: ::c_long = 200;
-pub const SYS_geteuid32: ::c_long = 201;
-pub const SYS_getegid32: ::c_long = 202;
-pub const SYS_setreuid32: ::c_long = 203;
-pub const SYS_setregid32: ::c_long = 204;
-pub const SYS_getgroups32: ::c_long = 205;
-pub const SYS_setgroups32: ::c_long = 206;
-pub const SYS_fchown32: ::c_long = 207;
-pub const SYS_setresuid32: ::c_long = 208;
-pub const SYS_getresuid32: ::c_long = 209;
-pub const SYS_setresgid32: ::c_long = 210;
-pub const SYS_getresgid32: ::c_long = 211;
-pub const SYS_chown32: ::c_long = 212;
-pub const SYS_setuid32: ::c_long = 213;
-pub const SYS_setgid32: ::c_long = 214;
-pub const SYS_setfsuid32: ::c_long = 215;
-pub const SYS_setfsgid32: ::c_long = 216;
-pub const SYS_pivot_root: ::c_long = 217;
-pub const SYS_mincore: ::c_long = 218;
-pub const SYS_madvise: ::c_long = 219;
-pub const SYS_getdents64: ::c_long = 220;
-pub const SYS_fcntl64: ::c_long = 221;
-pub const SYS_gettid: ::c_long = 224;
-pub const SYS_readahead: ::c_long = 225;
-pub const SYS_setxattr: ::c_long = 226;
-pub const SYS_lsetxattr: ::c_long = 227;
-pub const SYS_fsetxattr: ::c_long = 228;
-pub const SYS_getxattr: ::c_long = 229;
-pub const SYS_lgetxattr: ::c_long = 230;
-pub const SYS_fgetxattr: ::c_long = 231;
-pub const SYS_listxattr: ::c_long = 232;
-pub const SYS_llistxattr: ::c_long = 233;
-pub const SYS_flistxattr: ::c_long = 234;
-pub const SYS_removexattr: ::c_long = 235;
-pub const SYS_lremovexattr: ::c_long = 236;
-pub const SYS_fremovexattr: ::c_long = 237;
-pub const SYS_tkill: ::c_long = 238;
-pub const SYS_sendfile64: ::c_long = 239;
-pub const SYS_futex: ::c_long = 240;
-pub const SYS_sched_setaffinity: ::c_long = 241;
-pub const SYS_sched_getaffinity: ::c_long = 242;
-pub const SYS_set_thread_area: ::c_long = 243;
-pub const SYS_get_thread_area: ::c_long = 244;
-pub const SYS_io_setup: ::c_long = 245;
-pub const SYS_io_destroy: ::c_long = 246;
-pub const SYS_io_getevents: ::c_long = 247;
-pub const SYS_io_submit: ::c_long = 248;
-pub const SYS_io_cancel: ::c_long = 249;
-pub const SYS_fadvise64: ::c_long = 250;
-pub const SYS_exit_group: ::c_long = 252;
-pub const SYS_lookup_dcookie: ::c_long = 253;
-pub const SYS_epoll_create: ::c_long = 254;
-pub const SYS_epoll_ctl: ::c_long = 255;
-pub const SYS_epoll_wait: ::c_long = 256;
-pub const SYS_remap_file_pages: ::c_long = 257;
-pub const SYS_set_tid_address: ::c_long = 258;
-pub const SYS_timer_create: ::c_long = 259;
-pub const SYS_timer_settime: ::c_long = 260;
-pub const SYS_timer_gettime: ::c_long = 261;
-pub const SYS_timer_getoverrun: ::c_long = 262;
-pub const SYS_timer_delete: ::c_long = 263;
-pub const SYS_clock_settime: ::c_long = 264;
-pub const SYS_clock_gettime: ::c_long = 265;
-pub const SYS_clock_getres: ::c_long = 266;
-pub const SYS_clock_nanosleep: ::c_long = 267;
-pub const SYS_statfs64: ::c_long = 268;
-pub const SYS_fstatfs64: ::c_long = 269;
-pub const SYS_tgkill: ::c_long = 270;
-pub const SYS_utimes: ::c_long = 271;
-pub const SYS_fadvise64_64: ::c_long = 272;
-pub const SYS_vserver: ::c_long = 273;
-pub const SYS_mbind: ::c_long = 274;
-pub const SYS_get_mempolicy: ::c_long = 275;
-pub const SYS_set_mempolicy: ::c_long = 276;
-pub const SYS_mq_open: ::c_long = 277;
-pub const SYS_mq_unlink: ::c_long = 278;
-pub const SYS_mq_timedsend: ::c_long = 279;
-pub const SYS_mq_timedreceive: ::c_long = 280;
-pub const SYS_mq_notify: ::c_long = 281;
-pub const SYS_mq_getsetattr: ::c_long = 282;
-pub const SYS_kexec_load: ::c_long = 283;
-pub const SYS_waitid: ::c_long = 284;
-pub const SYS_add_key: ::c_long = 286;
-pub const SYS_request_key: ::c_long = 287;
-pub const SYS_keyctl: ::c_long = 288;
-pub const SYS_ioprio_set: ::c_long = 289;
-pub const SYS_ioprio_get: ::c_long = 290;
-pub const SYS_inotify_init: ::c_long = 291;
-pub const SYS_inotify_add_watch: ::c_long = 292;
-pub const SYS_inotify_rm_watch: ::c_long = 293;
-pub const SYS_migrate_pages: ::c_long = 294;
-pub const SYS_openat: ::c_long = 295;
-pub const SYS_mkdirat: ::c_long = 296;
-pub const SYS_mknodat: ::c_long = 297;
-pub const SYS_fchownat: ::c_long = 298;
-pub const SYS_futimesat: ::c_long = 299;
-pub const SYS_fstatat64: ::c_long = 300;
-pub const SYS_unlinkat: ::c_long = 301;
-pub const SYS_renameat: ::c_long = 302;
-pub const SYS_linkat: ::c_long = 303;
-pub const SYS_symlinkat: ::c_long = 304;
-pub const SYS_readlinkat: ::c_long = 305;
-pub const SYS_fchmodat: ::c_long = 306;
-pub const SYS_faccessat: ::c_long = 307;
-pub const SYS_pselect6: ::c_long = 308;
-pub const SYS_ppoll: ::c_long = 309;
-pub const SYS_unshare: ::c_long = 310;
-pub const SYS_set_robust_list: ::c_long = 311;
-pub const SYS_get_robust_list: ::c_long = 312;
-pub const SYS_splice: ::c_long = 313;
-pub const SYS_sync_file_range: ::c_long = 314;
-pub const SYS_tee: ::c_long = 315;
-pub const SYS_vmsplice: ::c_long = 316;
-pub const SYS_move_pages: ::c_long = 317;
-pub const SYS_getcpu: ::c_long = 318;
-pub const SYS_epoll_pwait: ::c_long = 319;
-pub const SYS_utimensat: ::c_long = 320;
-pub const SYS_signalfd: ::c_long = 321;
-pub const SYS_timerfd_create: ::c_long = 322;
-pub const SYS_eventfd: ::c_long = 323;
-pub const SYS_fallocate: ::c_long = 324;
-pub const SYS_timerfd_settime: ::c_long = 325;
-pub const SYS_timerfd_gettime: ::c_long = 326;
-pub const SYS_signalfd4: ::c_long = 327;
-pub const SYS_eventfd2: ::c_long = 328;
-pub const SYS_epoll_create1: ::c_long = 329;
-pub const SYS_dup3: ::c_long = 330;
-pub const SYS_pipe2: ::c_long = 331;
-pub const SYS_inotify_init1: ::c_long = 332;
-pub const SYS_preadv: ::c_long = 333;
-pub const SYS_pwritev: ::c_long = 334;
-pub const SYS_rt_tgsigqueueinfo: ::c_long = 335;
-pub const SYS_perf_event_open: ::c_long = 336;
-pub const SYS_recvmmsg: ::c_long = 337;
-pub const SYS_fanotify_init: ::c_long = 338;
-pub const SYS_fanotify_mark: ::c_long = 339;
-pub const SYS_prlimit64: ::c_long = 340;
-pub const SYS_name_to_handle_at: ::c_long = 341;
-pub const SYS_open_by_handle_at: ::c_long = 342;
-pub const SYS_clock_adjtime: ::c_long = 343;
-pub const SYS_syncfs: ::c_long = 344;
-pub const SYS_sendmmsg: ::c_long = 345;
-pub const SYS_setns: ::c_long = 346;
-pub const SYS_process_vm_readv: ::c_long = 347;
-pub const SYS_process_vm_writev: ::c_long = 348;
-pub const SYS_kcmp: ::c_long = 349;
-pub const SYS_finit_module: ::c_long = 350;
-pub const SYS_sched_setattr: ::c_long = 351;
-pub const SYS_sched_getattr: ::c_long = 352;
-pub const SYS_renameat2: ::c_long = 353;
-pub const SYS_seccomp: ::c_long = 354;
-pub const SYS_getrandom: ::c_long = 355;
-pub const SYS_memfd_create: ::c_long = 356;
-pub const SYS_bpf: ::c_long = 357;
-pub const SYS_execveat: ::c_long = 358;
-pub const SYS_socket: ::c_long = 359;
-pub const SYS_socketpair: ::c_long = 360;
-pub const SYS_bind: ::c_long = 361;
-pub const SYS_connect: ::c_long = 362;
-pub const SYS_listen: ::c_long = 363;
-pub const SYS_accept4: ::c_long = 364;
-pub const SYS_getsockopt: ::c_long = 365;
-pub const SYS_setsockopt: ::c_long = 366;
-pub const SYS_getsockname: ::c_long = 367;
-pub const SYS_getpeername: ::c_long = 368;
-pub const SYS_sendto: ::c_long = 369;
-pub const SYS_sendmsg: ::c_long = 370;
-pub const SYS_recvfrom: ::c_long = 371;
-pub const SYS_recvmsg: ::c_long = 372;
-pub const SYS_shutdown: ::c_long = 373;
-pub const SYS_userfaultfd: ::c_long = 374;
-pub const SYS_membarrier: ::c_long = 375;
-pub const SYS_mlock2: ::c_long = 376;
-pub const SYS_copy_file_range: ::c_long = 377;
-pub const SYS_preadv2: ::c_long = 378;
-pub const SYS_pwritev2: ::c_long = 379;
-pub const SYS_pkey_mprotect: ::c_long = 380;
-pub const SYS_pkey_alloc: ::c_long = 381;
-pub const SYS_pkey_free: ::c_long = 382;
-
-// offsets in user_regs_structs, from sys/reg.h
-pub const EBX: ::c_int = 0;
-pub const ECX: ::c_int = 1;
-pub const EDX: ::c_int = 2;
-pub const ESI: ::c_int = 3;
-pub const EDI: ::c_int = 4;
-pub const EBP: ::c_int = 5;
-pub const EAX: ::c_int = 6;
-pub const DS: ::c_int = 7;
-pub const ES: ::c_int = 8;
-pub const FS: ::c_int = 9;
-pub const GS: ::c_int = 10;
-pub const ORIG_EAX: ::c_int = 11;
-pub const EIP: ::c_int = 12;
-pub const CS: ::c_int = 13;
-pub const EFL: ::c_int = 14;
-pub const UESP: ::c_int = 15;
-pub const SS: ::c_int = 16;
--- a/third_party/rust/libc/src/unix/notbsd/android/b64/aarch64.rs
+++ b/third_party/rust/libc/src/unix/notbsd/android/b64/aarch64.rs
@@ -47,279 +47,10 @@ s! {
         __unused4: ::c_uint,
         __unused5: ::c_uint,
     }
 }
 
 pub const O_DIRECT: ::c_int = 0x10000;
 pub const O_DIRECTORY: ::c_int = 0x4000;
 pub const O_NOFOLLOW: ::c_int = 0x8000;
-pub const O_LARGEFILE: ::c_int = 0o400000;
 
-pub const SIGSTKSZ: ::size_t = 16384;
-pub const MINSIGSTKSZ: ::size_t = 5120;
-
-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_arch_specific_syscall: ::c_long = 244;
-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;
-pub const SYS_syscalls: ::c_long = 291;
--- a/third_party/rust/libc/src/unix/notbsd/android/b64/mod.rs
+++ b/third_party/rust/libc/src/unix/notbsd/android/b64/mod.rs
@@ -89,46 +89,16 @@ s! {
         pub freeswap: ::c_ulong,
         pub procs: ::c_ushort,
         pub pad: ::c_ushort,
         pub totalhigh: ::c_ulong,
         pub freehigh: ::c_ulong,
         pub mem_unit: ::c_uint,
         pub _f: [::c_char; 0],
     }
-
-    pub struct statfs64 {
-        pub f_type: u64,
-        pub f_bsize: u64,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_bavail: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        f_fsid: [u32; 2],
-        pub f_namelen: u64,
-        pub f_frsize: u64,
-        pub f_flags: u64,
-        pub f_spare: [u64; 4],
-    }
-
-    pub struct statvfs64 {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_bavail: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        pub f_favail: u64,
-        pub f_fsid: ::c_ulong,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-        __f_spare: [::c_int; 6],
-    }
 }
 
 pub const RTLD_GLOBAL: ::c_int = 0x00100;
 pub const RTLD_NOW: ::c_int = 2;
 pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void;
 
 pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
     value: 0,
--- a/third_party/rust/libc/src/unix/notbsd/android/b64/x86_64.rs
+++ b/third_party/rust/libc/src/unix/notbsd/android/b64/x86_64.rs
@@ -41,380 +41,10 @@ s! {
         pub st_ctime_nsec: ::c_ulong,
         __unused: [::c_long; 3],
     }
 }
 
 pub const O_DIRECT: ::c_int = 0x4000;
 pub const O_DIRECTORY: ::c_int = 0x10000;
 pub const O_NOFOLLOW: ::c_int = 0x20000;
-pub const O_LARGEFILE: ::c_int = 0o0100000;
 
-pub const SIGSTKSZ: ::size_t = 8192;
-pub const MINSIGSTKSZ: ::size_t = 2048;
-
-pub const MAP_32BIT: ::c_int = 0x40;
-
-// 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;
-// FIXME: SYS__sysctl is in the NDK sources but for some reason is
-//        not available in the tests
-// 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;
-pub const SYS_pkey_mprotect: ::c_long = 329;
-pub const SYS_pkey_alloc: ::c_long = 330;
-pub const SYS_pkey_free: ::c_long = 331;
-
-// 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;
--- a/third_party/rust/libc/src/unix/notbsd/android/mod.rs
+++ b/third_party/rust/libc/src/unix/notbsd/android/mod.rs
@@ -1,33 +1,31 @@
 //! Android-specific definitions for linux-like values
 
-use dox::{mem, Option};
+use dox::mem;
 
 pub type clock_t = ::c_long;
 pub type time_t = ::c_long;
 pub type suseconds_t = ::c_long;
 pub type off_t = ::c_long;
 pub type blkcnt_t = ::c_ulong;
 pub type blksize_t = ::c_ulong;
 pub type nlink_t = u32;
 pub type useconds_t = u32;
 pub type pthread_t = ::c_long;
 pub type pthread_mutexattr_t = ::c_long;
-pub type pthread_rwlockattr_t = ::c_long;
 pub type pthread_condattr_t = ::c_long;
 pub type fsfilcnt_t = ::c_ulong;
 pub type fsblkcnt_t = ::c_ulong;
 pub type nfds_t = ::c_uint;
 pub type rlim_t = ::c_ulong;
 pub type dev_t = ::c_ulong;
 pub type ino_t = ::c_ulong;
 pub type __CPU_BITTYPE = ::c_ulong;
 pub type idtype_t = ::c_int;
-pub type loff_t = ::c_longlong;
 
 s! {
     pub struct dirent {
         pub d_ino: u64,
         pub d_off: i64,
         pub d_reclen: ::c_ushort,
         pub d_type: ::c_uchar,
         pub d_name: [::c_char; 256],
@@ -79,27 +77,16 @@ s! {
         pub c_iflag: ::tcflag_t,
         pub c_oflag: ::tcflag_t,
         pub c_cflag: ::tcflag_t,
         pub c_lflag: ::tcflag_t,
         pub c_line: ::cc_t,
         pub c_cc: [::cc_t; ::NCCS],
     }
 
-    pub struct termios2 {
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_line: ::cc_t,
-        pub c_cc: [::cc_t; 19],
-        pub c_ispeed: ::speed_t,
-        pub c_ospeed: ::speed_t,
-    }
-
     pub struct flock {
         pub l_type: ::c_short,
         pub l_whence: ::c_short,
         pub l_start: ::off_t,
         pub l_len: ::off_t,
         pub l_pid: ::pid_t,
     }
 
@@ -153,49 +140,21 @@ s! {
         pub f_ffree: ::fsfilcnt_t,
         pub f_favail: ::fsfilcnt_t,
         pub f_fsid: ::c_ulong,
         pub f_flag: ::c_ulong,
         pub f_namemax: ::c_ulong,
         #[cfg(target_pointer_width = "64")]
         __f_reserved: [u32; 6],
     }
-
-    pub struct signalfd_siginfo {
-        pub ssi_signo: ::uint32_t,
-        pub ssi_errno: ::int32_t,
-        pub ssi_code: ::int32_t,
-        pub ssi_pid: ::uint32_t,
-        pub ssi_uid: ::uint32_t,
-        pub ssi_fd: ::int32_t,
-        pub ssi_tid: ::uint32_t,
-        pub ssi_band: ::uint32_t,
-        pub ssi_overrun: ::uint32_t,
-        pub ssi_trapno: ::uint32_t,
-        pub ssi_status: ::int32_t,
-        pub ssi_int: ::int32_t,
-        pub ssi_ptr: ::c_ulonglong,
-        pub ssi_utime: ::c_ulonglong,
-        pub ssi_stime: ::c_ulonglong,
-        pub ssi_addr: ::c_ulonglong,
-        pub ssi_addr_lsb: ::uint16_t,
-        _pad: [::uint8_t; 46],
-    }
-
-    pub struct ucred {
-        pub pid: ::pid_t,
-        pub uid: ::uid_t,
-        pub gid: ::gid_t,
-    }
 }
 
 pub const O_TRUNC: ::c_int = 512;
+
 pub const O_CLOEXEC: ::c_int = 0x80000;
-pub const O_PATH: ::c_int = 0o10000000;
-pub const O_NOATIME: ::c_int = 0o1000000;
 
 pub const EBFONT: ::c_int = 59;
 pub const ENOSTR: ::c_int = 60;
 pub const ENODATA: ::c_int = 61;
 pub const ETIME: ::c_int = 62;
 pub const ENOSR: ::c_int = 63;
 pub const ENONET: ::c_int = 64;
 pub const ENOPKG: ::c_int = 65;
@@ -209,18 +168,16 @@ pub const EDOTDOT: ::c_int = 73;
 
 pub const SA_NODEFER: ::c_int = 0x40000000;
 pub const SA_RESETHAND: ::c_int = 0x80000000;
 pub const SA_RESTART: ::c_int = 0x10000000;
 pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
 
 pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
 pub const EPOLLONESHOT: ::c_int = 0x40000000;
-pub const EPOLLRDHUP: ::c_int = 0x00002000;
-pub const EPOLLWAKEUP: ::c_int = 0x20000000;
 
 pub const EFD_CLOEXEC: ::c_int = 0x80000;
 
 pub const USER_PROCESS: ::c_short = 7;
 
 pub const BUFSIZ: ::c_uint = 1024;
 pub const FILENAME_MAX: ::c_uint = 1024;
 pub const FOPEN_MAX: ::c_uint = 20;
@@ -229,45 +186,34 @@ pub const POSIX_FADV_NOREUSE: ::c_int = 
 pub const L_tmpnam: ::c_uint = 1024;
 pub const TMP_MAX: ::c_uint = 308915776;
 pub const _PC_LINK_MAX: ::c_int = 1;
 pub const _PC_MAX_CANON: ::c_int = 2;
 pub const _PC_MAX_INPUT: ::c_int = 3;
 pub const _PC_NAME_MAX: ::c_int = 4;
 pub const _PC_PATH_MAX: ::c_int = 5;
 pub const _PC_PIPE_BUF: ::c_int = 6;
-pub const _PC_2_SYMLINKS: ::c_int = 7;
-pub const _PC_ALLOC_SIZE_MIN: ::c_int = 8;
-pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 9;
-pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 10;
-pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 11;
-pub const _PC_REC_XFER_ALIGN: ::c_int = 12;
-pub const _PC_SYMLINK_MAX: ::c_int = 13;
 pub const _PC_CHOWN_RESTRICTED: ::c_int = 14;
 pub const _PC_NO_TRUNC: ::c_int = 15;
 pub const _PC_VDISABLE: ::c_int = 16;
-pub const _PC_ASYNC_IO: ::c_int = 17;
-pub const _PC_PRIO_IO: ::c_int = 18;
-pub const _PC_SYNC_IO: ::c_int = 19;
 
 pub const FIONBIO: ::c_int = 0x5421;
 
 pub const _SC_ARG_MAX: ::c_int = 0;
 pub const _SC_BC_BASE_MAX: ::c_int = 1;
 pub const _SC_BC_DIM_MAX: ::c_int = 2;
 pub const _SC_BC_SCALE_MAX: ::c_int = 3;
 pub const _SC_BC_STRING_MAX: ::c_int = 4;
 pub const _SC_CHILD_MAX: ::c_int = 5;
 pub const _SC_CLK_TCK: ::c_int = 6;
 pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 7;
 pub const _SC_EXPR_NEST_MAX: ::c_int = 8;
 pub const _SC_LINE_MAX: ::c_int = 9;
 pub const _SC_NGROUPS_MAX: ::c_int = 10;
 pub const _SC_OPEN_MAX: ::c_int = 11;
-pub const _SC_PASS_MAX: ::c_int = 12;
 pub const _SC_2_C_BIND: ::c_int = 13;
 pub const _SC_2_C_DEV: ::c_int = 14;
 pub const _SC_2_C_VERSION: ::c_int = 15;
 pub const _SC_2_CHAR_TERM: ::c_int = 16;
 pub const _SC_2_FORT_DEV: ::c_int = 17;
 pub const _SC_2_FORT_RUN: ::c_int = 18;
 pub const _SC_2_LOCALEDEF: ::c_int = 19;
 pub const _SC_2_SW_DEV: ::c_int = 20;
@@ -287,65 +233,33 @@ pub const _SC_XOPEN_XCU_VERSION: ::c_int
 pub const _SC_XOPEN_REALTIME: ::c_int = 34;
 pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 35;
 pub const _SC_XOPEN_LEGACY: ::c_int = 36;
 pub const _SC_ATEXIT_MAX: ::c_int = 37;
 pub const _SC_IOV_MAX: ::c_int = 38;
 pub const _SC_PAGESIZE: ::c_int = 39;
 pub const _SC_PAGE_SIZE: ::c_int = 40;
 pub const _SC_XOPEN_UNIX: ::c_int = 41;
-pub const _SC_XBS5_ILP32_OFF32: ::c_int = 42;
-pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 43;
-pub const _SC_XBS5_LP64_OFF64: ::c_int = 44;
-pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 45;
-pub const _SC_AIO_LISTIO_MAX: ::c_int = 46;
-pub const _SC_AIO_MAX: ::c_int = 47;
-pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 48;
-pub const _SC_DELAYTIMER_MAX: ::c_int = 49;
-pub const _SC_MQ_OPEN_MAX: ::c_int = 50;
 pub const _SC_MQ_PRIO_MAX: ::c_int = 51;
-pub const _SC_RTSIG_MAX: ::c_int = 52;
-pub const _SC_SEM_NSEMS_MAX: ::c_int = 53;
-pub const _SC_SEM_VALUE_MAX: ::c_int = 54;
-pub const _SC_SIGQUEUE_MAX: ::c_int = 55;
-pub const _SC_TIMER_MAX: ::c_int = 56;
-pub const _SC_ASYNCHRONOUS_IO: ::c_int = 57;
-pub const _SC_FSYNC: ::c_int = 58;
-pub const _SC_MAPPED_FILES: ::c_int = 59;
-pub const _SC_MEMLOCK: ::c_int = 60;
-pub const _SC_MEMLOCK_RANGE: ::c_int = 61;
-pub const _SC_MEMORY_PROTECTION: ::c_int = 62;
-pub const _SC_MESSAGE_PASSING: ::c_int = 63;
-pub const _SC_PRIORITIZED_IO: ::c_int = 64;
-pub const _SC_PRIORITY_SCHEDULING: ::c_int = 65;
-pub const _SC_REALTIME_SIGNALS: ::c_int = 66;
-pub const _SC_SEMAPHORES: ::c_int = 67;
-pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 68;
-pub const _SC_SYNCHRONIZED_IO: ::c_int = 69;
-pub const _SC_TIMERS: ::c_int = 70;
 pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 71;
 pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 72;
 pub const _SC_LOGIN_NAME_MAX: ::c_int = 73;
 pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 74;
 pub const _SC_THREAD_KEYS_MAX: ::c_int = 75;
 pub const _SC_THREAD_STACK_MIN: ::c_int = 76;
 pub const _SC_THREAD_THREADS_MAX: ::c_int = 77;
 pub const _SC_TTY_NAME_MAX: ::c_int = 78;
 pub const _SC_THREADS: ::c_int = 79;
 pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 80;
 pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 81;
 pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 82;
 pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 83;
 pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 84;
 pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 85;
-pub const _SC_NPROCESSORS_CONF: ::c_int = 96;
 pub const _SC_NPROCESSORS_ONLN: ::c_int = 97;
-pub const _SC_PHYS_PAGES: ::c_int = 98;
-pub const _SC_AVPHYS_PAGES: ::c_int = 99;
-pub const _SC_MONOTONIC_CLOCK: ::c_int = 100;
 
 pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
 pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
 pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
 pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
 
 pub const FIOCLEX: ::c_int = 0x5451;
 
@@ -497,110 +411,72 @@ pub const EKEYEXPIRED: ::c_int = 127;
 pub const EKEYREVOKED: ::c_int = 128;
 pub const EKEYREJECTED: ::c_int = 129;
 pub const EOWNERDEAD: ::c_int = 130;
 pub const ENOTRECOVERABLE: ::c_int = 131;
 
 pub const SOCK_STREAM: ::c_int = 1;
 pub const SOCK_DGRAM: ::c_int = 2;
 pub const SOCK_SEQPACKET: ::c_int = 5;
-pub const SOCK_DCCP: ::c_int = 6;
-pub const SOCK_PACKET: ::c_int = 10;
 
 pub const SOL_SOCKET: ::c_int = 1;
+pub const SOL_UDP: ::c_int = 17;
 pub const SOL_SCTP: ::c_int = 132;
 pub const SOL_IPX: ::c_int = 256;
 pub const SOL_AX25: ::c_int = 257;
 pub const SOL_ATALK: ::c_int = 258;
 pub const SOL_NETROM: ::c_int = 259;
 pub const SOL_ROSE: ::c_int = 260;
 
 #[doc(hidden)]
-pub const AF_MAX: ::c_int = 43;
+pub const AF_MAX: ::c_int = 39;
 #[doc(hidden)]
 pub const PF_MAX: ::c_int = AF_MAX;
 
-/* DCCP socket options */
-pub const DCCP_SOCKOPT_PACKET_SIZE: ::c_int = 1;
-pub const DCCP_SOCKOPT_SERVICE: ::c_int = 2;
-pub const DCCP_SOCKOPT_CHANGE_L: ::c_int = 3;
-pub const DCCP_SOCKOPT_CHANGE_R: ::c_int = 4;
-pub const DCCP_SOCKOPT_GET_CUR_MPS: ::c_int = 5;
-pub const DCCP_SOCKOPT_SERVER_TIMEWAIT: ::c_int = 6;
-pub const DCCP_SOCKOPT_SEND_CSCOV: ::c_int = 10;
-pub const DCCP_SOCKOPT_RECV_CSCOV: ::c_int = 11;
-pub const DCCP_SOCKOPT_AVAILABLE_CCIDS: ::c_int = 12;
-pub const DCCP_SOCKOPT_CCID: ::c_int = 13;
-pub const DCCP_SOCKOPT_TX_CCID: ::c_int = 14;
-pub const DCCP_SOCKOPT_RX_CCID: ::c_int = 15;
-pub const DCCP_SOCKOPT_QPOLICY_ID: ::c_int = 16;
-pub const DCCP_SOCKOPT_QPOLICY_TXQLEN: ::c_int = 17;
-pub const DCCP_SOCKOPT_CCID_RX_INFO: ::c_int = 128;
-pub const DCCP_SOCKOPT_CCID_TX_INFO: ::c_int = 192;
-
-/// maximum number of services provided on the same listening port
-pub const DCCP_SERVICE_LIST_MAX_LEN: ::c_int = 32;
-
 pub const SO_REUSEADDR: ::c_int = 2;
 pub const SO_TYPE: ::c_int = 3;
 pub const SO_ERROR: ::c_int = 4;
 pub const SO_DONTROUTE: ::c_int = 5;
 pub const SO_BROADCAST: ::c_int = 6;
 pub const SO_SNDBUF: ::c_int = 7;
 pub const SO_RCVBUF: ::c_int = 8;
 pub const SO_KEEPALIVE: ::c_int = 9;
 pub const SO_OOBINLINE: ::c_int = 10;
-pub const SO_PRIORITY: ::c_int = 12;
 pub const SO_LINGER: ::c_int = 13;
-pub const SO_BSDCOMPAT: ::c_int = 14;
 pub const SO_REUSEPORT: ::c_int = 15;
-pub const SO_PASSCRED: ::c_int = 16;
-pub const SO_PEERCRED: ::c_int = 17;
 pub const SO_RCVLOWAT: ::c_int = 18;
 pub const SO_SNDLOWAT: ::c_int = 19;
 pub const SO_RCVTIMEO: ::c_int = 20;
 pub const SO_SNDTIMEO: ::c_int = 21;
-pub const SO_BINDTODEVICE: ::c_int = 25;
-pub const SO_TIMESTAMP: ::c_int = 29;
 pub const SO_ACCEPTCONN: ::c_int = 30;
-pub const SO_SNDBUFFORCE: ::c_int = 32;
-pub const SO_RCVBUFFORCE: ::c_int = 33;
-pub const SO_MARK: ::c_int = 36;
-pub const SO_PROTOCOL: ::c_int = 38;
-pub const SO_DOMAIN: ::c_int = 39;
-pub const SO_RXQ_OVFL: ::c_int = 40;
-pub const SO_PEEK_OFF: ::c_int = 42;
-pub const SO_BUSY_POLL: ::c_int = 46;
 
 pub const O_ACCMODE: ::c_int = 3;
 pub const O_APPEND: ::c_int = 1024;
 pub const O_CREAT: ::c_int = 64;
 pub const O_EXCL: ::c_int = 128;
 pub const O_NOCTTY: ::c_int = 256;
 pub const O_NONBLOCK: ::c_int = 2048;
 pub const O_SYNC: ::c_int = 0x101000;
 pub const O_ASYNC: ::c_int = 0x2000;
 pub const O_NDELAY: ::c_int = 0x800;
-pub const O_DSYNC: ::c_int = 4096;
 
 pub const NI_MAXHOST: ::size_t = 1025;
 
 pub const NCCS: usize = 19;
 pub const TCSBRKP: ::c_int = 0x5425;
 pub const TCSANOW: ::c_int = 0;
 pub const TCSADRAIN: ::c_int = 0x1;
 pub const TCSAFLUSH: ::c_int = 0x2;
 pub const VEOF: usize = 4;
 pub const VEOL: usize = 11;
 pub const VEOL2: usize = 16;
 pub const VMIN: usize = 6;
 pub const IEXTEN: ::tcflag_t = 0x00008000;
 pub const TOSTOP: ::tcflag_t = 0x00000100;
 pub const FLUSHO: ::tcflag_t = 0x00001000;
-pub const EXTPROC: ::tcflag_t = 0o200000;
 
 pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;
 pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff;
 pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245;
 pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45;
 pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53;
 pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53;
 pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53;
@@ -619,16 +495,18 @@ pub const NFS_SUPER_MAGIC: ::c_long = 0x
 pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1;
 pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0;
 pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f;
 pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973;
 pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b;
 pub const TMPFS_MAGIC: ::c_long = 0x01021994;
 pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2;
 
+pub const MADV_HUGEPAGE: ::c_int = 14;
+pub const MADV_NOHUGEPAGE: ::c_int = 15;
 pub const MAP_HUGETLB: ::c_int = 0x040000;
 
 pub const PTRACE_TRACEME: ::c_int = 0;
 pub const PTRACE_PEEKTEXT: ::c_int = 1;
 pub const PTRACE_PEEKDATA: ::c_int = 2;
 pub const PTRACE_PEEKUSER: ::c_int = 3;
 pub const PTRACE_POKETEXT: ::c_int = 4;
 pub const PTRACE_POKEDATA: ::c_int = 5;
@@ -701,16 +579,18 @@ pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_
 pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
 pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
 pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
 pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
 
 pub const MCL_CURRENT: ::c_int = 0x0001;
 pub const MCL_FUTURE: ::c_int = 0x0002;
 
+pub const SIGSTKSZ: ::size_t = 8192;
+pub const MINSIGSTKSZ: ::size_t = 2048;
 pub const CBAUD: ::tcflag_t = 0o0010017;
 pub const TAB1: ::c_int = 0x00000800;
 pub const TAB2: ::c_int = 0x00001000;
 pub const TAB3: ::c_int = 0x00001800;
 pub const CR1: ::c_int  = 0x00000200;
 pub const CR2: ::c_int  = 0x00000400;
 pub const CR3: ::c_int  = 0x00000600;
 pub const FF1: ::c_int  = 0x00008000;
@@ -741,25 +621,16 @@ pub const ECHOE: ::tcflag_t = 0x00000010
 pub const ECHOK: ::tcflag_t = 0x00000020;
 pub const ECHONL: ::tcflag_t = 0x00000040;
 pub const ECHOPRT: ::tcflag_t = 0x00000400;
 pub const ECHOCTL: ::tcflag_t = 0x00000200;
 pub const ISIG: ::tcflag_t = 0x00000001;
 pub const ICANON: ::tcflag_t = 0x00000002;
 pub const PENDIN: ::tcflag_t = 0x00004000;
 pub const NOFLSH: ::tcflag_t = 0x00000080;
-pub const VSWTC: usize = 7;
-pub const OLCUC:  ::tcflag_t = 0o000002;
-pub const NLDLY:  ::tcflag_t = 0o000400;
-pub const CRDLY:  ::tcflag_t = 0o003000;
-pub const TABDLY: ::tcflag_t = 0o014000;
-pub const BSDLY:  ::tcflag_t = 0o020000;
-pub const FFDLY:  ::tcflag_t = 0o100000;
-pub const VTDLY:  ::tcflag_t = 0o040000;
-pub const XTABS:  ::tcflag_t = 0o014000;
 
 pub const B0: ::speed_t = 0o000000;
 pub const B50: ::speed_t = 0o000001;
 pub const B75: ::speed_t = 0o000002;
 pub const B110: ::speed_t = 0o000003;
 pub const B134: ::speed_t = 0o000004;
 pub const B150: ::speed_t = 0o000005;
 pub const B200: ::speed_t = 0o000006;
@@ -769,17 +640,16 @@ pub const B1200: ::speed_t = 0o000011;
 pub const B1800: ::speed_t = 0o000012;
 pub const B2400: ::speed_t = 0o000013;
 pub const B4800: ::speed_t = 0o000014;
 pub const B9600: ::speed_t = 0o000015;
 pub const B19200: ::speed_t = 0o000016;
 pub const B38400: ::speed_t = 0o000017;
 pub const EXTA: ::speed_t = B19200;
 pub const EXTB: ::speed_t = B38400;
-pub const BOTHER: ::speed_t = 0o010000;
 pub const B57600: ::speed_t = 0o010001;
 pub const B115200: ::speed_t = 0o010002;
 pub const B230400: ::speed_t = 0o010003;
 pub const B460800: ::speed_t = 0o010004;
 pub const B500000: ::speed_t = 0o010005;
 pub const B576000: ::speed_t = 0o010006;
 pub const B921600: ::speed_t = 0o010007;
 pub const B1000000: ::speed_t = 0o010010;
@@ -849,44 +719,16 @@ pub const NETLINK_RX_RING: ::c_int = 6;
 pub const NETLINK_TX_RING: ::c_int = 7;
 
 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 SIGEV_THREAD_ID: ::c_int = 4;
 
-pub const CIBAUD: ::tcflag_t = 0o02003600000;
-pub const CBAUDEX: ::tcflag_t = 0o010000;
-
-pub const TIOCM_LE: ::c_int = 0x001;
-pub const TIOCM_DTR: ::c_int = 0x002;
-pub const TIOCM_RTS: ::c_int = 0x004;
-pub const TIOCM_ST: ::c_int = 0x008;
-pub const TIOCM_SR: ::c_int = 0x010;
-pub const TIOCM_CTS: ::c_int = 0x020;
-pub const TIOCM_CAR: ::c_int = 0x040;
-pub const TIOCM_RNG: ::c_int = 0x080;
-pub const TIOCM_DSR: ::c_int = 0x100;
-pub const TIOCM_CD: ::c_int = TIOCM_CAR;
-pub const TIOCM_RI: ::c_int = TIOCM_RNG;
-
-pub const POLLWRNORM: ::c_short = 0x100;
-pub const POLLWRBAND: ::c_short = 0x200;
-
-pub const SFD_CLOEXEC: ::c_int = O_CLOEXEC;
-pub const SFD_NONBLOCK: ::c_int = O_NONBLOCK;
-
-pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK;
-
-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;
-
 f! {
     pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
         for slot in cpuset.__bits.iter_mut() {
             *slot = 0;
         }
     }
 
     pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () {
@@ -956,176 +798,16 @@ extern {
     pub fn sched_getcpu() -> ::c_int;
 
     pub fn utmpname(name: *const ::c_char) -> ::c_int;
     pub fn setutent();
     pub fn getutent() -> *mut utmp;
 
     pub fn posix_fallocate(fd: ::c_int, offset: ::off_t,
                            len: ::off_t) -> ::c_int;
-    pub fn signalfd(fd: ::c_int, mask: *const ::sigset_t, flags: ::c_int)
-                    -> ::c_int;
-    pub fn syscall(num: ::c_long, ...) -> ::c_long;
-    pub fn sched_getaffinity(pid: ::pid_t,
-                             cpusetsize: ::size_t,
-                             cpuset: *mut cpu_set_t) -> ::c_int;
-    pub fn sched_setaffinity(pid: ::pid_t,
-                             cpusetsize: ::size_t,
-                             cpuset: *const cpu_set_t) -> ::c_int;
-    pub fn epoll_create(size: ::c_int) -> ::c_int;
-    pub fn epoll_create1(flags: ::c_int) -> ::c_int;
-    pub fn epoll_wait(epfd: ::c_int,
-                      events: *mut ::epoll_event,
-                      maxevents: ::c_int,
-                      timeout: ::c_int) -> ::c_int;
-    pub fn epoll_ctl(epfd: ::c_int,
-                     op: ::c_int,
-                     fd: ::c_int,
-                     event: *mut ::epoll_event) -> ::c_int;
-    pub fn pthread_getschedparam(native: ::pthread_t,
-                                 policy: *mut ::c_int,
-                                 param: *mut ::sched_param) -> ::c_int;
-    pub fn unshare(flags: ::c_int) -> ::c_int;
-    pub fn umount(target: *const ::c_char) -> ::c_int;
-    pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int;
-    pub fn tee(fd_in: ::c_int,
-               fd_out: ::c_int,
-               len: ::size_t,
-               flags: ::c_uint) -> ::ssize_t;
-    pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int;
-    pub fn splice(fd_in: ::c_int,
-                  off_in: *mut ::loff_t,
-                  fd_out: ::c_int,
-                  off_out: *mut ::loff_t,
-                  len: ::size_t,
-                  flags: ::c_uint) -> ::ssize_t;
-    pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int;
-    pub fn sched_rr_get_interval(pid: ::pid_t, tp: *mut ::timespec) -> ::c_int;
-    pub fn sem_timedwait(sem: *mut sem_t,
-                         abstime: *const ::timespec) -> ::c_int;
-    pub fn sched_setparam(pid: ::pid_t, param: *const ::sched_param) -> ::c_int;
-    pub fn setns(fd: ::c_int, nstype: ::c_int) -> ::c_int;
-    pub fn swapoff(puath: *const ::c_char) -> ::c_int;
-    pub fn vmsplice(fd: ::c_int,
-                    iov: *const ::iovec,
-                    nr_segs: ::size_t,
-                    flags: ::c_uint) -> ::ssize_t;
-    pub fn mount(src: *const ::c_char,
-                 target: *const ::c_char,
-                 fstype: *const ::c_char,
-                 flags: ::c_ulong,
-                 data: *const ::c_void) -> ::c_int;
-    pub fn personality(persona: ::c_ulong) -> ::c_int;
-    pub fn prctl(option: ::c_int, ...) -> ::c_int;
-    pub fn sched_getparam(pid: ::pid_t, param: *mut ::sched_param) -> ::c_int;
-    pub fn ppoll(fds: *mut ::pollfd,
-                 nfds: nfds_t,
-                 timeout: *const ::timespec,
-                 sigmask: *const sigset_t) -> ::c_int;
-    pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
-                                   abstime: *const ::timespec) -> ::c_int;
-    pub fn clone(cb: extern fn(*mut ::c_void) -> ::c_int,
-                 child_stack: *mut ::c_void,
-                 flags: ::c_int,
-                 arg: *mut ::c_void, ...) -> ::c_int;
-    pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int;
-    pub fn clock_nanosleep(clk_id: ::clockid_t,
-                           flags: ::c_int,
-                           rqtp: *const ::timespec,
-                           rmtp:  *mut ::timespec) -> ::c_int;
-    pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
-                                     guardsize: *mut ::size_t) -> ::c_int;
-    pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
-    pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int;
-    pub fn pthread_condattr_getpshared(attr: *const pthread_condattr_t,
-                                       pshared: *mut ::c_int) -> ::c_int;
-    pub fn sysinfo(info: *mut ::sysinfo) -> ::c_int;
-    pub fn umount2(target: *const ::c_char, flags: ::c_int) -> ::c_int;
-    pub fn pthread_setschedparam(native: ::pthread_t,
-                                 policy: ::c_int,
-                                 param: *const ::sched_param) -> ::c_int;
-    pub fn swapon(path: *const ::c_char, swapflags: ::c_int) -> ::c_int;
-    pub fn sched_setscheduler(pid: ::pid_t,
-                              policy: ::c_int,
-                              param: *const ::sched_param) -> ::c_int;
-    pub fn sendfile(out_fd: ::c_int,
-                    in_fd: ::c_int,
-                    offset: *mut off_t,
-                    count: ::size_t) -> ::ssize_t;
-    pub fn setfsgid(gid: ::gid_t) -> ::c_int;
-    pub fn setfsuid(uid: ::uid_t) -> ::c_int;
-    pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int;
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")]
-    pub fn getgrgid_r(uid: ::uid_t,
-                      grp: *mut ::group,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut ::group) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "sigaltstack$UNIX2003")]
-    #[cfg_attr(target_os = "netbsd", link_name = "__sigaltstack14")]
-    pub fn sigaltstack(ss: *const stack_t,
-                       oss: *mut stack_t) -> ::c_int;
-    pub fn sem_close(sem: *mut sem_t) -> ::c_int;
-    pub fn getdtablesize() -> ::c_int;
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrnam_r")]
-    pub fn getgrnam_r(name: *const ::c_char,
-                      grp: *mut ::group,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut ::group) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "pthread_sigmask$UNIX2003")]
-    pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t,
-                           oldset: *mut sigset_t) -> ::c_int;
-    pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t;
-    pub fn getgrnam(name: *const ::c_char) -> *mut ::group;
-    pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
-    pub fn sem_unlink(name: *const ::c_char) -> ::c_int;
-    pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__getpwnam_r50")]
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwnam_r")]
-    pub fn getpwnam_r(name: *const ::c_char,
-                      pwd: *mut passwd,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut passwd) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid_r50")]
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwuid_r")]
-    pub fn getpwuid_r(uid: ::uid_t,
-                      pwd: *mut passwd,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut passwd) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch ="x86"),
-               link_name = "sigwait$UNIX2003")]
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_sigwait")]
-    pub fn sigwait(set: *const sigset_t,
-                   sig: *mut ::c_int) -> ::c_int;
-    pub fn pthread_atfork(prepare: Option<unsafe extern fn()>,
-                          parent: Option<unsafe extern fn()>,
-                          child: Option<unsafe extern fn()>) -> ::c_int;
-    pub fn getgrgid(gid: ::gid_t) -> *mut ::group;
-    pub fn getgrouplist(user: *const ::c_char,
-                        group: ::gid_t,
-                        groups: *mut ::gid_t,
-                        ngroups: *mut ::c_int) -> ::c_int;
-    pub fn initgroups(user: *const ::c_char, group: ::gid_t) -> ::c_int;
-    pub fn pthread_mutexattr_getpshared(attr: *const pthread_mutexattr_t,
-                                        pshared: *mut ::c_int) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "popen$UNIX2003")]
-    pub fn popen(command: *const c_char,
-                 mode: *const c_char) -> *mut ::FILE;
-    pub fn faccessat(dirfd: ::c_int, pathname: *const ::c_char,
-                     mode: ::c_int, flags: ::c_int) -> ::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;
 }
 
 cfg_if! {
     if #[cfg(target_pointer_width = "32")] {
         mod b32;
         pub use self::b32::*;
     } else if #[cfg(target_pointer_width = "64")] {
         mod b64;
deleted file mode 100644
--- a/third_party/rust/libc/src/unix/notbsd/emscripten.rs
+++ /dev/null
@@ -1,1667 +0,0 @@
-use dox::{mem, Option};
-
-pub type c_char = i8;
-pub type wchar_t = i32;
-pub type useconds_t = u32;
-pub type dev_t = u32;
-pub type socklen_t = u32;
-pub type pthread_t = c_ulong;
-pub type mode_t = u32;
-pub type ino64_t = u32;
-pub type off64_t = i32;
-pub type blkcnt64_t = i32;
-pub type rlim64_t = u64;
-pub type shmatt_t = ::c_ulong;
-pub type mqd_t = ::c_int;
-pub type msgqnum_t = ::c_ulong;
-pub type msglen_t = ::c_ulong;
-pub type nfds_t = ::c_ulong;
-pub type nl_item = ::c_int;
-pub type idtype_t = ::c_uint;
-pub type loff_t = i32;
-
-pub type clock_t = c_long;
-pub type time_t = c_long;
-pub type suseconds_t = c_long;
-pub type ino_t = u32;
-pub type off_t = i32;
-pub type blkcnt_t = i32;
-
-pub type blksize_t = c_long;
-pub type fsblkcnt_t = u32;
-pub type fsfilcnt_t = u32;
-pub type rlim_t = ::c_ulonglong;
-pub type c_long = i32;
-pub type c_ulong = u32;
-pub type nlink_t = u32;
-
-pub enum fpos64_t {} // TODO: fill this out with a struct
-
-s! {
-    pub struct dirent {
-        pub d_ino: ::ino_t,
-        pub d_off: ::off_t,
-        pub d_reclen: ::c_ushort,
-        pub d_type: ::c_uchar,
-        pub d_name: [::c_char; 256],
-    }
-
-    pub struct dirent64 {
-        pub d_ino: ::ino64_t,
-        pub d_off: ::off64_t,
-        pub d_reclen: ::c_ushort,
-        pub d_type: ::c_uchar,
-        pub d_name: [::c_char; 256],
-    }
-
-    pub struct rlimit64 {
-        pub rlim_cur: rlim64_t,
-        pub rlim_max: rlim64_t,
-    }
-
-    pub struct glob_t {
-        pub gl_pathc: ::size_t,
-        pub gl_pathv: *mut *mut c_char,
-        pub gl_offs: ::size_t,
-        pub gl_flags: ::c_int,
-
-        __unused1: *mut ::c_void,
-        __unused2: *mut ::c_void,
-        __unused3: *mut ::c_void,
-        __unused4: *mut ::c_void,
-        __unused5: *mut ::c_void,
-    }
-
-    pub struct ifaddrs {
-        pub ifa_next: *mut ifaddrs,
-        pub ifa_name: *mut c_char,
-        pub ifa_flags: ::c_uint,
-        pub ifa_addr: *mut ::sockaddr,
-        pub ifa_netmask: *mut ::sockaddr,
-        pub ifa_ifu: *mut ::sockaddr, // FIXME This should be a union
-        pub ifa_data: *mut ::c_void
-    }
-
-    pub struct pthread_mutex_t {
-        __align: [::c_long; 0],
-        size: [u8; __SIZEOF_PTHREAD_MUTEX_T],
-    }
-
-    pub struct pthread_rwlock_t {
-        __align: [::c_long; 0],
-        size: [u8; __SIZEOF_PTHREAD_RWLOCK_T],
-    }
-
-    pub struct pthread_mutexattr_t {
-        __align: [::c_int; 0],
-        size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T],
-    }
-
-    pub struct pthread_rwlockattr_t {
-        __align: [::c_int; 0],
-        size: [u8; __SIZEOF_PTHREAD_RWLOCKATTR_T],
-    }
-
-    pub struct pthread_cond_t {
-        __align: [*const ::c_void; 0],
-        size: [u8; __SIZEOF_PTHREAD_COND_T],
-    }
-
-    pub struct pthread_condattr_t {
-        __align: [::c_int; 0],
-        size: [u8; __SIZEOF_PTHREAD_CONDATTR_T],
-    }
-
-    pub struct passwd {
-        pub pw_name: *mut ::c_char,
-        pub pw_passwd: *mut ::c_char,
-        pub pw_uid: ::uid_t,
-        pub pw_gid: ::gid_t,
-        pub pw_gecos: *mut ::c_char,
-        pub pw_dir: *mut ::c_char,
-        pub pw_shell: *mut ::c_char,
-    }
-
-    pub struct spwd {
-        pub sp_namp: *mut ::c_char,
-        pub sp_pwdp: *mut ::c_char,
-        pub sp_lstchg: ::c_long,
-        pub sp_min: ::c_long,
-        pub sp_max: ::c_long,
-        pub sp_warn: ::c_long,
-        pub sp_inact: ::c_long,
-        pub sp_expire: ::c_long,
-        pub sp_flag: ::c_ulong,
-    }
-
-    pub struct statvfs {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_files: ::fsfilcnt_t,
-        pub f_ffree: ::fsfilcnt_t,
-        pub f_favail: ::fsfilcnt_t,
-        pub f_fsid: ::c_ulong,
-        __f_unused: ::c_int,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-        __f_spare: [::c_int; 6],
-    }
-
-    pub struct dqblk {
-        pub dqb_bhardlimit: ::uint64_t,
-        pub dqb_bsoftlimit: ::uint64_t,
-        pub dqb_curspace: ::uint64_t,
-        pub dqb_ihardlimit: ::uint64_t,
-        pub dqb_isoftlimit: ::uint64_t,
-        pub dqb_curinodes: ::uint64_t,
-        pub dqb_btime: ::uint64_t,
-        pub dqb_itime: ::uint64_t,
-        pub dqb_valid: ::uint32_t,
-    }
-
-    pub struct signalfd_siginfo {
-        pub ssi_signo: ::uint32_t,
-        pub ssi_errno: ::int32_t,
-        pub ssi_code: ::int32_t,
-        pub ssi_pid: ::uint32_t,
-        pub ssi_uid: ::uint32_t,
-        pub ssi_fd: ::int32_t,
-        pub ssi_tid: ::uint32_t,
-        pub ssi_band: ::uint32_t,
-        pub ssi_overrun: ::uint32_t,
-        pub ssi_trapno: ::uint32_t,
-        pub ssi_status: ::int32_t,
-        pub ssi_int: ::int32_t,
-        pub ssi_ptr: ::uint64_t,
-        pub ssi_utime: ::uint64_t,
-        pub ssi_stime: ::uint64_t,
-        pub ssi_addr: ::uint64_t,
-        _pad: [::uint8_t; 48],
-    }
-
-    pub struct fsid_t {
-        __val: [::c_int; 2],
-    }
-
-    pub struct mq_attr {
-        pub mq_flags: ::c_long,
-        pub mq_maxmsg: ::c_long,
-        pub mq_msgsize: ::c_long,
-        pub mq_curmsgs: ::c_long,
-        pad: [::c_long; 4]
-    }
-
-    pub struct cpu_set_t {
-        bits: [u32; 32],
-    }
-
-    pub struct if_nameindex {
-        pub if_index: ::c_uint,
-        pub if_name: *mut ::c_char,
-    }
-
-    // System V IPC
-    pub struct msginfo {
-        pub msgpool: ::c_int,
-        pub msgmap: ::c_int,
-        pub msgmax: ::c_int,
-        pub msgmnb: ::c_int,
-        pub msgmni: ::c_int,
-        pub msgssz: ::c_int,
-        pub msgtql: ::c_int,
-        pub msgseg: ::c_ushort,
-    }
-
-    pub struct mmsghdr {
-        pub msg_hdr: ::msghdr,
-        pub msg_len: ::c_uint,
-    }
-
-    pub struct sembuf {
-        pub sem_num: ::c_ushort,
-        pub sem_op: ::c_short,
-        pub sem_flg: ::c_short,
-    }
-
-    pub struct aiocb {
-        pub aio_fildes: ::c_int,
-        pub aio_lio_opcode: ::c_int,
-        pub aio_reqprio: ::c_int,
-        pub aio_buf: *mut ::c_void,
-        pub aio_nbytes: ::size_t,
-        pub aio_sigevent: ::sigevent,
-        __td: *mut ::c_void,
-        __lock: [::c_int; 2],
-        __err: ::c_int,
-        __ret: ::ssize_t,
-        pub aio_offset: off_t,
-        __next: *mut ::c_void,
-        __prev: *mut ::c_void,
-        __dummy4: [::c_char; 24],
-    }
-
-    pub struct sigaction {
-        pub sa_sigaction: ::sighandler_t,
-        pub sa_mask: ::sigset_t,
-        pub sa_flags: ::c_int,
-        pub sa_restorer: ::dox::Option<extern fn()>,
-    }
-
-    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 struct termios {
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_line: ::cc_t,
-        pub c_cc: [::cc_t; ::NCCS],
-        pub __c_ispeed: ::speed_t,
-        pub __c_ospeed: ::speed_t,
-    }
-
-    pub struct flock {
-        pub l_type: ::c_short,
-        pub l_whence: ::c_short,
-        pub l_start: ::off_t,
-        pub l_len: ::off_t,
-        pub l_pid: ::pid_t,
-    }
-
-    pub struct sysinfo {
-        pub uptime: ::c_ulong,
-        pub loads: [::c_ulong; 3],
-        pub totalram: ::c_ulong,
-        pub freeram: ::c_ulong,
-        pub sharedram: ::c_ulong,
-        pub bufferram: ::c_ulong,
-        pub totalswap: ::c_ulong,
-        pub freeswap: ::c_ulong,
-        pub procs: ::c_ushort,
-        pub pad: ::c_ushort,
-        pub totalhigh: ::c_ulong,
-        pub freehigh: ::c_ulong,
-        pub mem_unit: ::c_uint,
-        pub __reserved: [::c_char; 256],
-    }
-
-    pub struct pthread_attr_t {
-        __size: [u32; 11]
-    }
-
-    pub struct sigset_t {
-        __val: [::c_ulong; 32],
-    }
-
-    pub struct msghdr {
-        pub msg_name: *mut ::c_void,
-        pub msg_namelen: ::socklen_t,
-        pub msg_iov: *mut ::iovec,
-        pub msg_iovlen: ::c_int,
-        pub msg_control: *mut ::c_void,
-        pub msg_controllen: ::socklen_t,
-        pub msg_flags: ::c_int,
-    }
-
-    pub struct cmsghdr {
-        pub cmsg_len: ::socklen_t,
-        pub cmsg_level: ::c_int,
-        pub cmsg_type: ::c_int,
-    }
-
-    pub struct sem_t {
-        __val: [::c_int; 4],
-    }
-    pub struct stat {
-        pub st_dev: ::dev_t,
-        __st_dev_padding: ::c_int,
-        __st_ino_truncated: ::c_long,
-        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,
-        __st_rdev_padding: ::c_int,
-        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,
-        pub st_ino: ::ino_t,
-    }
-
-    pub struct stat64 {
-        pub st_dev: ::dev_t,
-        __st_dev_padding: ::c_int,
-        __st_ino_truncated: ::c_long,
-        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,
-        __st_rdev_padding: ::c_int,
-        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,
-        pub st_ino: ::ino_t,
-    }
-
-    pub struct stack_t {
-        pub ss_sp: *mut ::c_void,
-        pub ss_flags: ::c_int,
-        pub ss_size: ::size_t
-    }
-
-    pub struct shmid_ds {
-        pub shm_perm: ::ipc_perm,
-        pub shm_segsz: ::size_t,
-        pub shm_atime: ::time_t,
-        __unused1: ::c_int,
-        pub shm_dtime: ::time_t,
-        __unused2: ::c_int,
-        pub shm_ctime: ::time_t,
-        __unused3: ::c_int,
-        pub shm_cpid: ::pid_t,
-        pub shm_lpid: ::pid_t,
-        pub shm_nattch: ::c_ulong,
-        __pad1: ::c_ulong,
-        __pad2: ::c_ulong,
-    }
-
-    pub struct msqid_ds {
-        pub msg_perm: ::ipc_perm,
-        pub msg_stime: ::time_t,
-        __unused1: ::c_int,
-        pub msg_rtime: ::time_t,
-        __unused2: ::c_int,
-        pub msg_ctime: ::time_t,
-        __unused3: ::c_int,
-        __msg_cbytes: ::c_ulong,
-        pub msg_qnum: ::msgqnum_t,
-        pub msg_qbytes: ::msglen_t,
-        pub msg_lspid: ::pid_t,
-        pub msg_lrpid: ::pid_t,
-        __pad1: ::c_ulong,
-        __pad2: ::c_ulong,
-    }
-
-    pub struct statfs {
-        pub f_type: ::c_ulong,
-        pub f_bsize: ::c_ulong,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_files: ::fsfilcnt_t,
-        pub f_ffree: ::fsfilcnt_t,
-        pub f_fsid: ::fsid_t,
-        pub f_namelen: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_flags: ::c_ulong,
-        pub f_spare: [::c_ulong; 4],
-    }
-
-    pub struct siginfo_t {
-        pub si_signo: ::c_int,
-        pub si_errno: ::c_int,
-        pub si_code: ::c_int,
-        pub _pad: [::c_int; 29],
-        _align: [usize; 0],
-    }
-
-    pub struct statfs64 {
-        pub f_type: ::c_ulong,
-        pub f_bsize: ::c_ulong,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_files: ::fsfilcnt_t,
-        pub f_ffree: ::fsfilcnt_t,
-        pub f_fsid: ::fsid_t,
-        pub f_namelen: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_flags: ::c_ulong,
-        pub f_spare: [::c_ulong; 4],
-    }
-
-    pub struct statvfs64 {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: u32,
-        pub f_bfree: u32,
-        pub f_bavail: u32,
-        pub f_files: u32,
-        pub f_ffree: u32,
-        pub f_favail: u32,
-        pub f_fsid: ::c_ulong,
-        __f_unused: ::c_int,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-        __f_spare: [::c_int; 6],
-    }
-}
-
-pub const ABDAY_1: ::nl_item = 0x20000;
-pub const ABDAY_2: ::nl_item = 0x20001;
-pub const ABDAY_3: ::nl_item = 0x20002;
-pub const ABDAY_4: ::nl_item = 0x20003;
-pub const ABDAY_5: ::nl_item = 0x20004;
-pub const ABDAY_6: ::nl_item = 0x20005;
-pub const ABDAY_7: ::nl_item = 0x20006;
-
-pub const DAY_1: ::nl_item = 0x20007;
-pub const DAY_2: ::nl_item = 0x20008;
-pub const DAY_3: ::nl_item = 0x20009;
-pub const DAY_4: ::nl_item = 0x2000A;
-pub const DAY_5: ::nl_item = 0x2000B;
-pub const DAY_6: ::nl_item = 0x2000C;
-pub const DAY_7: ::nl_item = 0x2000D;
-
-pub const ABMON_1: ::nl_item = 0x2000E;
-pub const ABMON_2: ::nl_item = 0x2000F;
-pub const ABMON_3: ::nl_item = 0x20010;
-pub const ABMON_4: ::nl_item = 0x20011;
-pub const ABMON_5: ::nl_item = 0x20012;
-pub const ABMON_6: ::nl_item = 0x20013;
-pub const ABMON_7: ::nl_item = 0x20014;
-pub const ABMON_8: ::nl_item = 0x20015;
-pub const ABMON_9: ::nl_item = 0x20016;
-pub const ABMON_10: ::nl_item = 0x20017;
-pub const ABMON_11: ::nl_item = 0x20018;
-pub const ABMON_12: ::nl_item = 0x20019;
-
-pub const MON_1: ::nl_item = 0x2001A;
-pub const MON_2: ::nl_item = 0x2001B;
-pub const MON_3: ::nl_item = 0x2001C;
-pub const MON_4: ::nl_item = 0x2001D;
-pub const MON_5: ::nl_item = 0x2001E;
-pub const MON_6: ::nl_item = 0x2001F;
-pub const MON_7: ::nl_item = 0x20020;
-pub const MON_8: ::nl_item = 0x20021;
-pub const MON_9: ::nl_item = 0x20022;
-pub const MON_10: ::nl_item = 0x20023;
-pub const MON_11: ::nl_item = 0x20024;
-pub const MON_12: ::nl_item = 0x20025;
-
-pub const AM_STR: ::nl_item = 0x20026;
-pub const PM_STR: ::nl_item = 0x20027;
-
-pub const D_T_FMT: ::nl_item = 0x20028;
-pub const D_FMT: ::nl_item = 0x20029;
-pub const T_FMT: ::nl_item = 0x2002A;
-pub const T_FMT_AMPM: ::nl_item = 0x2002B;
-
-pub const ERA: ::nl_item = 0x2002C;
-pub const ERA_D_FMT: ::nl_item = 0x2002E;
-pub const ALT_DIGITS: ::nl_item = 0x2002F;
-pub const ERA_D_T_FMT: ::nl_item = 0x20030;
-pub const ERA_T_FMT: ::nl_item = 0x20031;
-
-pub const CODESET: ::nl_item = 14;
-
-pub const CRNCYSTR: ::nl_item = 0x4000F;
-
-pub const RUSAGE_THREAD: ::c_int = 1;
-pub const RUSAGE_CHILDREN: ::c_int = -1;
-
-pub const RADIXCHAR: ::nl_item = 0x10000;
-pub const THOUSEP: ::nl_item = 0x10001;
-
-pub const YESEXPR: ::nl_item = 0x50000;
-pub const NOEXPR: ::nl_item = 0x50001;
-pub const YESSTR: ::nl_item = 0x50002;
-pub const NOSTR: ::nl_item = 0x50003;
-
-pub const FILENAME_MAX: ::c_uint = 4096;
-pub const L_tmpnam: ::c_uint = 20;
-pub const _PC_LINK_MAX: ::c_int = 0;
-pub const _PC_MAX_CANON: ::c_int = 1;
-pub const _PC_MAX_INPUT: ::c_int = 2;
-pub const _PC_NAME_MAX: ::c_int = 3;
-pub const _PC_PATH_MAX: ::c_int = 4;
-pub const _PC_PIPE_BUF: ::c_int = 5;
-pub const _PC_CHOWN_RESTRICTED: ::c_int = 6;
-pub const _PC_NO_TRUNC: ::c_int = 7;
-pub const _PC_VDISABLE: ::c_int = 8;
-pub const _PC_SYNC_IO: ::c_int = 9;
-pub const _PC_ASYNC_IO: ::c_int = 10;
-pub const _PC_PRIO_IO: ::c_int = 11;
-pub const _PC_SOCK_MAXBUF: ::c_int = 12;
-pub const _PC_FILESIZEBITS: ::c_int = 13;
-pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 14;
-pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 15;
-pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 16;
-pub const _PC_REC_XFER_ALIGN: ::c_int = 17;
-pub const _PC_ALLOC_SIZE_MIN: ::c_int = 18;
-pub const _PC_SYMLINK_MAX: ::c_int = 19;
-pub const _PC_2_SYMLINKS: ::c_int = 20;
-
-pub const _SC_ARG_MAX: ::c_int = 0;
-pub const _SC_CHILD_MAX: ::c_int = 1;
-pub const _SC_CLK_TCK: ::c_int = 2;
-pub const _SC_NGROUPS_MAX: ::c_int = 3;
-pub const _SC_OPEN_MAX: ::c_int = 4;
-pub const _SC_STREAM_MAX: ::c_int = 5;
-pub const _SC_TZNAME_MAX: ::c_int = 6;
-pub const _SC_JOB_CONTROL: ::c_int = 7;
-pub const _SC_SAVED_IDS: ::c_int = 8;
-pub const _SC_REALTIME_SIGNALS: ::c_int = 9;
-pub const _SC_PRIORITY_SCHEDULING: ::c_int = 10;
-pub const _SC_TIMERS: ::c_int = 11;
-pub const _SC_ASYNCHRONOUS_IO: ::c_int = 12;
-pub const _SC_PRIORITIZED_IO: ::c_int = 13;
-pub const _SC_SYNCHRONIZED_IO: ::c_int = 14;
-pub const _SC_FSYNC: ::c_int = 15;
-pub const _SC_MAPPED_FILES: ::c_int = 16;
-pub const _SC_MEMLOCK: ::c_int = 17;
-pub const _SC_MEMLOCK_RANGE: ::c_int = 18;
-pub const _SC_MEMORY_PROTECTION: ::c_int = 19;
-pub const _SC_MESSAGE_PASSING: ::c_int = 20;
-pub const _SC_SEMAPHORES: ::c_int = 21;
-pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 22;
-pub const _SC_AIO_LISTIO_MAX: ::c_int = 23;
-pub const _SC_AIO_MAX: ::c_int = 24;
-pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 25;
-pub const _SC_DELAYTIMER_MAX: ::c_int = 26;
-pub const _SC_MQ_OPEN_MAX: ::c_int = 27;
-pub const _SC_MQ_PRIO_MAX: ::c_int = 28;
-pub const _SC_VERSION: ::c_int = 29;
-pub const _SC_PAGESIZE: ::c_int = 30;
-pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
-pub const _SC_RTSIG_MAX: ::c_int = 31;
-pub const _SC_SEM_NSEMS_MAX: ::c_int = 32;
-pub const _SC_SEM_VALUE_MAX: ::c_int = 33;
-pub const _SC_SIGQUEUE_MAX: ::c_int = 34;
-pub const _SC_TIMER_MAX: ::c_int = 35;
-pub const _SC_BC_BASE_MAX: ::c_int = 36;
-pub const _SC_BC_DIM_MAX: ::c_int = 37;
-pub const _SC_BC_SCALE_MAX: ::c_int = 38;
-pub const _SC_BC_STRING_MAX: ::c_int = 39;
-pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 40;
-pub const _SC_EXPR_NEST_MAX: ::c_int = 42;
-pub const _SC_LINE_MAX: ::c_int = 43;
-pub const _SC_RE_DUP_MAX: ::c_int = 44;
-pub const _SC_2_VERSION: ::c_int = 46;
-pub const _SC_2_C_BIND: ::c_int = 47;
-pub const _SC_2_C_DEV: ::c_int = 48;
-pub const _SC_2_FORT_DEV: ::c_int = 49;
-pub const _SC_2_FORT_RUN: ::c_int = 50;
-pub const _SC_2_SW_DEV: ::c_int = 51;
-pub const _SC_2_LOCALEDEF: ::c_int = 52;
-pub const _SC_UIO_MAXIOV: ::c_int = 60;
-pub const _SC_IOV_MAX: ::c_int = 60;
-pub const _SC_THREADS: ::c_int = 67;
-pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 68;
-pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 69;
-pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 70;
-pub const _SC_LOGIN_NAME_MAX: ::c_int = 71;
-pub const _SC_TTY_NAME_MAX: ::c_int = 72;
-pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 73;
-pub const _SC_THREAD_KEYS_MAX: ::c_int = 74;
-pub const _SC_THREAD_STACK_MIN: ::c_int = 75;
-pub const _SC_THREAD_THREADS_MAX: ::c_int = 76;
-pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 77;
-pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 78;
-pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 79;
-pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 80;
-pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 81;
-pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 82;
-pub const _SC_NPROCESSORS_CONF: ::c_int = 83;
-pub const _SC_NPROCESSORS_ONLN: ::c_int = 84;
-pub const _SC_PHYS_PAGES: ::c_int = 85;
-pub const _SC_AVPHYS_PAGES: ::c_int = 86;
-pub const _SC_ATEXIT_MAX: ::c_int = 87;
-pub const _SC_PASS_MAX: ::c_int = 88;
-pub const _SC_XOPEN_VERSION: ::c_int = 89;
-pub const _SC_XOPEN_XCU_VERSION: ::c_int = 90;
-pub const _SC_XOPEN_UNIX: ::c_int = 91;
-pub const _SC_XOPEN_CRYPT: ::c_int = 92;
-pub const _SC_XOPEN_ENH_I18N: ::c_int = 93;
-pub const _SC_XOPEN_SHM: ::c_int = 94;
-pub const _SC_2_CHAR_TERM: ::c_int = 95;
-pub const _SC_2_UPE: ::c_int = 97;
-pub const _SC_XOPEN_XPG2: ::c_int = 98;
-pub const _SC_XOPEN_XPG3: ::c_int = 99;
-pub const _SC_XOPEN_XPG4: ::c_int = 100;
-pub const _SC_NZERO: ::c_int = 109;
-pub const _SC_XBS5_ILP32_OFF32: ::c_int = 125;
-pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 126;
-pub const _SC_XBS5_LP64_OFF64: ::c_int = 127;
-pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 128;
-pub const _SC_XOPEN_LEGACY: ::c_int = 129;
-pub const _SC_XOPEN_REALTIME: ::c_int = 130;
-pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 131;
-pub const _SC_ADVISORY_INFO: ::c_int = 132;
-pub const _SC_BARRIERS: ::c_int = 133;
-pub const _SC_CLOCK_SELECTION: ::c_int = 137;
-pub const _SC_CPUTIME: ::c_int = 138;
-pub const _SC_THREAD_CPUTIME: ::c_int = 139;
-pub const _SC_MONOTONIC_CLOCK: ::c_int = 149;
-pub const _SC_READER_WRITER_LOCKS: ::c_int = 153;
-pub const _SC_SPIN_LOCKS: ::c_int = 154;
-pub const _SC_REGEXP: ::c_int = 155;
-pub const _SC_SHELL: ::c_int = 157;
-pub const _SC_SPAWN: ::c_int = 159;
-pub const _SC_SPORADIC_SERVER: ::c_int = 160;
-pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 161;
-pub const _SC_TIMEOUTS: ::c_int = 164;
-pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 165;
-pub const _SC_2_PBS: ::c_int = 168;
-pub const _SC_2_PBS_ACCOUNTING: ::c_int = 169;
-pub const _SC_2_PBS_LOCATE: ::c_int = 170;
-pub const _SC_2_PBS_MESSAGE: ::c_int = 171;
-pub const _SC_2_PBS_TRACK: ::c_int = 172;
-pub const _SC_SYMLOOP_MAX: ::c_int = 173;
-pub const _SC_STREAMS: ::c_int = 174;
-pub const _SC_2_PBS_CHECKPOINT: ::c_int = 175;
-pub const _SC_V6_ILP32_OFF32: ::c_int = 176;
-pub const _SC_V6_ILP32_OFFBIG: ::c_int = 177;
-pub const _SC_V6_LP64_OFF64: ::c_int = 178;
-pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 179;
-pub const _SC_HOST_NAME_MAX: ::c_int = 180;
-pub const _SC_TRACE: ::c_int = 181;
-pub const _SC_TRACE_EVENT_FILTER: ::c_int = 182;
-pub const _SC_TRACE_INHERIT: ::c_int = 183;
-pub const _SC_TRACE_LOG: ::c_int = 184;
-pub const _SC_IPV6: ::c_int = 235;
-pub const _SC_RAW_SOCKETS: ::c_int = 236;
-pub const _SC_V7_ILP32_OFF32: ::c_int = 237;
-pub const _SC_V7_ILP32_OFFBIG: ::c_int = 238;
-pub const _SC_V7_LP64_OFF64: ::c_int = 239;
-pub const _SC_V7_LPBIG_OFFBIG: ::c_int = 240;
-pub const _SC_SS_REPL_MAX: ::c_int = 241;
-pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 242;
-pub const _SC_TRACE_NAME_MAX: ::c_int = 243;
-pub const _SC_TRACE_SYS_MAX: ::c_int = 244;
-pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 245;
-pub const _SC_XOPEN_STREAMS: ::c_int = 246;
-pub const _SC_THREAD_ROBUST_PRIO_INHERIT: ::c_int = 247;
-pub const _SC_THREAD_ROBUST_PRIO_PROTECT: ::c_int = 248;
-
-pub const RLIM_SAVED_MAX: ::rlim_t = RLIM_INFINITY;
-pub const RLIM_SAVED_CUR: ::rlim_t = RLIM_INFINITY;
-
-pub const GLOB_ERR: ::c_int = 1 << 0;
-pub const GLOB_MARK: ::c_int = 1 << 1;
-pub const GLOB_NOSORT: ::c_int = 1 << 2;
-pub const GLOB_DOOFFS: ::c_int = 1 << 3;
-pub const GLOB_NOCHECK: ::c_int = 1 << 4;
-pub const GLOB_APPEND: ::c_int = 1 << 5;
-pub const GLOB_NOESCAPE: ::c_int = 1 << 6;
-
-pub const GLOB_NOSPACE: ::c_int = 1;
-pub const GLOB_ABORTED: ::c_int = 2;
-pub const GLOB_NOMATCH: ::c_int = 3;
-
-pub const POSIX_MADV_NORMAL: ::c_int = 0;
-pub const POSIX_MADV_RANDOM: ::c_int = 1;
-pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2;
-pub const POSIX_MADV_WILLNEED: ::c_int = 3;
-
-pub const S_IEXEC: mode_t = 64;
-pub const S_IWRITE: mode_t = 128;
-pub const S_IREAD: mode_t = 256;
-
-pub const F_LOCK: ::c_int = 1;
-pub const F_TEST: ::c_int = 3;
-pub const F_TLOCK: ::c_int = 2;
-pub const F_ULOCK: ::c_int = 0;
-
-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_WRITE: ::c_ulong = 128;
-pub const ST_APPEND: ::c_ulong = 256;
-pub const ST_IMMUTABLE: ::c_ulong = 512;
-pub const ST_NOATIME: ::c_ulong = 1024;
-pub const ST_NODIRATIME: ::c_ulong = 2048;
-
-pub const RTLD_NEXT: *mut ::c_void = -1i64 as *mut ::c_void;
-pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void;
-pub const RTLD_NODELETE: ::c_int = 0x1000;
-pub const RTLD_NOW: ::c_int = 0x2;
-
-pub const TCP_MD5SIG: ::c_int = 14;
-
-pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t {
-    __align: [],
-    size: [0; __SIZEOF_PTHREAD_MUTEX_T],
-};
-pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
-    __align: [],
-    size: [0; __SIZEOF_PTHREAD_COND_T],
-};
-pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
-    __align: [],
-    size: [0; __SIZEOF_PTHREAD_RWLOCK_T],
-};
-pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
-pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
-pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
-pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
-pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 0;
-pub const PTHREAD_PROCESS_SHARED: ::c_int = 1;
-pub const __SIZEOF_PTHREAD_COND_T: usize = 48;
-
-pub const SCHED_OTHER: ::c_int = 0;
-pub const SCHED_FIFO: ::c_int = 1;
-pub const SCHED_RR: ::c_int = 2;
-pub const SCHED_BATCH: ::c_int = 3;
-pub const SCHED_IDLE: ::c_int = 5;
-
-pub const AF_IB: ::c_int = 27;
-pub const AF_MPLS: ::c_int = 28;
-pub const AF_NFC: ::c_int = 39;
-pub const AF_VSOCK: ::c_int = 40;
-#[doc(hidden)]
-pub const AF_MAX: ::c_int = 42;
-pub const PF_IB: ::c_int = AF_IB;
-pub const PF_MPLS: ::c_int = AF_MPLS;
-pub const PF_NFC: ::c_int = AF_NFC;
-pub const PF_VSOCK: ::c_int = AF_VSOCK;
-#[doc(hidden)]
-pub const PF_MAX: ::c_int = AF_MAX;
-
-// System V IPC
-pub const IPC_PRIVATE: ::key_t = 0;
-
-pub const IPC_CREAT: ::c_int = 0o1000;
-pub const IPC_EXCL: ::c_int = 0o2000;
-pub const IPC_NOWAIT: ::c_int = 0o4000;
-
-pub const IPC_RMID: ::c_int = 0;
-pub const IPC_SET: ::c_int = 1;
-pub const IPC_STAT: ::c_int = 2;
-pub const IPC_INFO: ::c_int = 3;
-pub const MSG_STAT: ::c_int = 11;
-pub const MSG_INFO: ::c_int = 12;
-
-pub const MSG_NOERROR: ::c_int = 0o10000;
-pub const MSG_EXCEPT: ::c_int = 0o20000;
-pub const MSG_COPY: ::c_int = 0o40000;
-
-pub const SHM_R: ::c_int = 0o400;
-pub const SHM_W: ::c_int = 0o200;
-
-pub const SHM_RDONLY: ::c_int = 0o10000;
-pub const SHM_RND: ::c_int = 0o20000;
-pub const SHM_REMAP: ::c_int = 0o40000;
-pub const SHM_EXEC: ::c_int = 0o100000;
-
-pub const SHM_LOCK: ::c_int = 11;
-pub const SHM_UNLOCK: ::c_int = 12;
-
-pub const SHM_HUGETLB: ::c_int = 0o4000;
-pub const SHM_NORESERVE: ::c_int = 0o10000;
-
-pub const EPOLLRDHUP: ::c_int = 0x2000;
-pub const EPOLLEXCLUSIVE: ::c_int = 0x10000000;
-pub const EPOLLONESHOT: ::c_int = 0x40000000;
-
-pub const QFMT_VFS_OLD: ::c_int = 1;
-pub const QFMT_VFS_V0: ::c_int = 2;
-
-pub const EFD_SEMAPHORE: ::c_int = 0x1;
-
-pub const LOG_NFACILITIES: ::c_int = 24;
-
-pub const SEM_FAILED: *mut ::sem_t = 0 as *mut sem_t;
-
-pub const RB_AUTOBOOT: ::c_int = 0x01234567u32 as i32;
-pub const RB_HALT_SYSTEM: ::c_int = 0xcdef0123u32 as i32;
-pub const RB_ENABLE_CAD: ::c_int = 0x89abcdefu32 as i32;
-pub const RB_DISABLE_CAD: ::c_int = 0x00000000u32 as i32;
-pub const RB_POWER_OFF: ::c_int = 0x4321fedcu32 as i32;
-pub const RB_SW_SUSPEND: ::c_int = 0xd000fce2u32 as i32;
-pub const RB_KEXEC: ::c_int = 0x45584543u32 as i32;
-
-pub const AI_PASSIVE: ::c_int = 0x0001;
-pub const AI_CANONNAME: ::c_int = 0x0002;
-pub const AI_NUMERICHOST: ::c_int = 0x0004;
-pub const AI_V4MAPPED: ::c_int = 0x0008;
-pub const AI_ALL: ::c_int = 0x0010;
-pub const AI_ADDRCONFIG: ::c_int = 0x0020;
-
-pub const AI_NUMERICSERV: ::c_int = 0x0400;
-
-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_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_OVERFLOW: ::c_int = -12;
-
-pub const NI_NUMERICHOST: ::c_int = 1;
-pub const NI_NUMERICSERV: ::c_int = 2;
-pub const NI_NOFQDN: ::c_int = 4;
-pub const NI_NAMEREQD: ::c_int = 8;
-pub const NI_DGRAM: ::c_int = 16;
-
-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;
-pub const LIO_READ: ::c_int = 0;
-pub const LIO_WRITE: ::c_int = 1;
-pub const LIO_NOP: ::c_int = 2;
-pub const LIO_WAIT: ::c_int = 0;
-pub const LIO_NOWAIT: ::c_int = 1;
-
-pub const MREMAP_MAYMOVE: ::c_int = 1;
-pub const MREMAP_FIXED: ::c_int = 2;
-
-pub const PR_SET_PDEATHSIG: ::c_int = 1;
-pub const PR_GET_PDEATHSIG: ::c_int = 2;
-
-pub const PR_GET_DUMPABLE: ::c_int = 3;
-pub const PR_SET_DUMPABLE: ::c_int = 4;
-
-pub const PR_GET_UNALIGN: ::c_int = 5;
-pub const PR_SET_UNALIGN: ::c_int = 6;
-pub const PR_UNALIGN_NOPRINT: ::c_int = 1;
-pub const PR_UNALIGN_SIGBUS: ::c_int = 2;
-
-pub const PR_GET_KEEPCAPS: ::c_int = 7;
-pub const PR_SET_KEEPCAPS: ::c_int = 8;
-
-pub const PR_GET_FPEMU: ::c_int = 9;
-pub const PR_SET_FPEMU: ::c_int = 10;
-pub const PR_FPEMU_NOPRINT: ::c_int = 1;
-pub const PR_FPEMU_SIGFPE: ::c_int = 2;
-
-pub const PR_GET_FPEXC: ::c_int = 11;
-pub const PR_SET_FPEXC: ::c_int = 12;
-pub const PR_FP_EXC_SW_ENABLE: ::c_int = 0x80;
-pub const PR_FP_EXC_DIV: ::c_int = 0x010000;
-pub const PR_FP_EXC_OVF: ::c_int = 0x020000;
-pub const PR_FP_EXC_UND: ::c_int = 0x040000;
-pub const PR_FP_EXC_RES: ::c_int = 0x080000;
-pub const PR_FP_EXC_INV: ::c_int = 0x100000;
-pub const PR_FP_EXC_DISABLED: ::c_int = 0;
-pub const PR_FP_EXC_NONRECOV: ::c_int = 1;
-pub const PR_FP_EXC_ASYNC: ::c_int = 2;
-pub const PR_FP_EXC_PRECISE: ::c_int = 3;
-
-pub const PR_GET_TIMING: ::c_int = 13;
-pub const PR_SET_TIMING: ::c_int = 14;
-pub const PR_TIMING_STATISTICAL: ::c_int = 0;
-pub const PR_TIMING_TIMESTAMP: ::c_int = 1;
-
-pub const PR_SET_NAME: ::c_int = 15;
-pub const PR_GET_NAME: ::c_int = 16;
-
-pub const PR_GET_ENDIAN: ::c_int = 19;
-pub const PR_SET_ENDIAN: ::c_int = 20;
-pub const PR_ENDIAN_BIG: ::c_int = 0;
-pub const PR_ENDIAN_LITTLE: ::c_int = 1;
-pub const PR_ENDIAN_PPC_LITTLE: ::c_int = 2;
-
-pub const PR_GET_SECCOMP: ::c_int = 21;
-pub const PR_SET_SECCOMP: ::c_int = 22;
-
-pub const PR_CAPBSET_READ: ::c_int = 23;
-pub const PR_CAPBSET_DROP: ::c_int = 24;
-
-pub const PR_GET_TSC: ::c_int = 25;
-pub const PR_SET_TSC: ::c_int = 26;
-pub const PR_TSC_ENABLE: ::c_int = 1;
-pub const PR_TSC_SIGSEGV: ::c_int = 2;
-
-pub const PR_GET_SECUREBITS: ::c_int = 27;
-pub const PR_SET_SECUREBITS: ::c_int = 28;
-
-pub const PR_SET_TIMERSLACK: ::c_int = 29;
-pub const PR_GET_TIMERSLACK: ::c_int = 30;
-
-pub const PR_TASK_PERF_EVENTS_DISABLE: ::c_int = 31;
-pub const PR_TASK_PERF_EVENTS_ENABLE: ::c_int = 32;
-
-pub const PR_MCE_KILL: ::c_int = 33;
-pub const PR_MCE_KILL_CLEAR: ::c_int = 0;
-pub const PR_MCE_KILL_SET: ::c_int = 1;
-
-pub const PR_MCE_KILL_LATE: ::c_int = 0;
-pub const PR_MCE_KILL_EARLY: ::c_int = 1;
-pub const PR_MCE_KILL_DEFAULT: ::c_int = 2;
-
-pub const PR_MCE_KILL_GET: ::c_int = 34;
-
-pub const PR_SET_MM: ::c_int = 35;
-pub const PR_SET_MM_START_CODE: ::c_int = 1;
-pub const PR_SET_MM_END_CODE: ::c_int = 2;
-pub const PR_SET_MM_START_DATA: ::c_int = 3;
-pub const PR_SET_MM_END_DATA: ::c_int = 4;
-pub const PR_SET_MM_START_STACK: ::c_int = 5;
-pub const PR_SET_MM_START_BRK: ::c_int = 6;
-pub const PR_SET_MM_BRK: ::c_int = 7;
-pub const PR_SET_MM_ARG_START: ::c_int = 8;
-pub const PR_SET_MM_ARG_END: ::c_int = 9;
-pub const PR_SET_MM_ENV_START: ::c_int = 10;
-pub const PR_SET_MM_ENV_END: ::c_int = 11;
-pub const PR_SET_MM_AUXV: ::c_int = 12;
-pub const PR_SET_MM_EXE_FILE: ::c_int = 13;
-pub const PR_SET_MM_MAP: ::c_int = 14;
-pub const PR_SET_MM_MAP_SIZE: ::c_int = 15;
-
-pub const PR_SET_PTRACER: ::c_int = 0x59616d61;
-
-pub const PR_SET_CHILD_SUBREAPER: ::c_int = 36;
-pub const PR_GET_CHILD_SUBREAPER: ::c_int = 37;
-
-pub const PR_SET_NO_NEW_PRIVS: ::c_int = 38;
-pub const PR_GET_NO_NEW_PRIVS: ::c_int = 39;
-
-pub const PR_GET_TID_ADDRESS: ::c_int = 40;
-
-pub const PR_SET_THP_DISABLE: ::c_int = 41;
-pub const PR_GET_THP_DISABLE: ::c_int = 42;
-
-pub const PR_MPX_ENABLE_MANAGEMENT: ::c_int = 43;
-pub const PR_MPX_DISABLE_MANAGEMENT: ::c_int = 44;
-
-pub const PR_SET_FP_MODE: ::c_int = 45;
-pub const PR_GET_FP_MODE: ::c_int = 46;
-pub const PR_FP_MODE_FR: ::c_int = 1 << 0;
-pub const PR_FP_MODE_FRE: ::c_int = 1 << 1;
-
-pub const PR_CAP_AMBIENT: ::c_int = 47;
-pub const PR_CAP_AMBIENT_IS_SET: ::c_int = 1;
-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 ITIMER_REAL: ::c_int = 0;
-pub const ITIMER_VIRTUAL: ::c_int = 1;
-pub const ITIMER_PROF: ::c_int = 2;
-
-pub const XATTR_CREATE: ::c_int = 0x1;
-pub const XATTR_REPLACE: ::c_int = 0x2;
-
-pub const _POSIX_VDISABLE: ::cc_t = 0;
-
-pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01;
-pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02;
-pub const FALLOC_FL_COLLAPSE_RANGE: ::c_int = 0x08;
-pub const FALLOC_FL_ZERO_RANGE: ::c_int = 0x10;
-pub const FALLOC_FL_INSERT_RANGE: ::c_int = 0x20;
-pub const FALLOC_FL_UNSHARE_RANGE: ::c_int = 0x40;
-
-// On Linux, libc doesn't define this constant, libattr does instead.
-// We still define it for Linux as it's defined by libc on other platforms,
-// and it's mentioned in the man pages for getxattr and setxattr.
-pub const SFD_CLOEXEC: ::c_int = 0x080000;
-
-pub const NCCS: usize = 32;
-
-pub const O_TRUNC: ::c_int = 512;
-pub const O_NOATIME: ::c_int = 0o1000000;
-pub const O_CLOEXEC: ::c_int = 0x80000;
-
-pub const EBFONT: ::c_int = 59;
-pub const ENOSTR: ::c_int = 60;
-pub const ENODATA: ::c_int = 61;
-pub const ETIME: ::c_int = 62;
-pub const ENOSR: ::c_int = 63;
-pub const ENONET: ::c_int = 64;
-pub const ENOPKG: ::c_int = 65;
-pub const EREMOTE: ::c_int = 66;
-pub const ENOLINK: ::c_int = 67;
-pub const EADV: ::c_int = 68;
-pub const ESRMNT: ::c_int = 69;
-pub const ECOMM: ::c_int = 70;
-pub const EPROTO: ::c_int = 71;
-pub const EDOTDOT: ::c_int = 73;
-
-pub const SA_NODEFER: ::c_int = 0x40000000;
-pub const SA_RESETHAND: ::c_int = 0x80000000;
-pub const SA_RESTART: ::c_int = 0x10000000;
-pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
-
-pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
-
-pub const EFD_CLOEXEC: ::c_int = 0x80000;
-
-pub const BUFSIZ: ::c_uint = 1024;
-pub const TMP_MAX: ::c_uint = 10000;
-pub const FOPEN_MAX: ::c_uint = 1000;
-pub const O_PATH: ::c_int = 0o10000000;
-pub const O_EXEC: ::c_int = 0o10000000;
-pub const O_SEARCH: ::c_int = 0o10000000;
-pub const O_ACCMODE: ::c_int = 0o10000003;
-pub const O_NDELAY: ::c_int = O_NONBLOCK;
-pub const NI_MAXHOST: ::socklen_t = 255;
-pub const PTHREAD_STACK_MIN: ::size_t = 2048;
-pub const POSIX_FADV_DONTNEED: ::c_int = 4;
-pub const POSIX_FADV_NOREUSE: ::c_int = 5;
-
-pub const POSIX_MADV_DONTNEED: ::c_int = 0;
-
-pub const RLIM_INFINITY: ::rlim_t = !0;
-pub const RLIMIT_RTTIME: ::c_int = 15;
-pub const RLIMIT_NLIMITS: ::c_int = 16;
-
-pub const MAP_ANONYMOUS: ::c_int = MAP_ANON;
-
-pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15;
-pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16;
-pub const TCP_THIN_DUPACK: ::c_int = 17;
-pub const TCP_USER_TIMEOUT: ::c_int = 18;
-pub const TCP_REPAIR: ::c_int = 19;
-pub const TCP_REPAIR_QUEUE: ::c_int = 20;
-pub const TCP_QUEUE_SEQ: ::c_int = 21;
-pub const TCP_REPAIR_OPTIONS: ::c_int = 22;
-pub const TCP_FASTOPEN: ::c_int = 23;
-pub const TCP_TIMESTAMP: ::c_int = 24;
-
-pub const SIGUNUSED: ::c_int = ::SIGSYS;
-
-pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
-pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
-pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
-
-pub const CPU_SETSIZE: ::c_int = 128;
-
-pub const QFMT_VFS_V1: ::c_int = 4;
-
-pub const PTRACE_TRACEME: ::c_int = 0;
-pub const PTRACE_PEEKTEXT: ::c_int = 1;
-pub const PTRACE_PEEKDATA: ::c_int = 2;
-pub const PTRACE_PEEKUSER: ::c_int = 3;
-pub const PTRACE_POKETEXT: ::c_int = 4;
-pub const PTRACE_POKEDATA: ::c_int = 5;
-pub const PTRACE_POKEUSER: ::c_int = 6;
-pub const PTRACE_CONT: ::c_int = 7;
-pub const PTRACE_KILL: ::c_int = 8;
-pub const PTRACE_SINGLESTEP: ::c_int = 9;
-pub const PTRACE_ATTACH: ::c_int = 16;
-pub const PTRACE_DETACH: ::c_int = 17;
-pub const PTRACE_SYSCALL: ::c_int = 24;
-pub const PTRACE_SETOPTIONS: ::c_int = 0x4200;
-pub const PTRACE_GETEVENTMSG: ::c_int = 0x4201;
-pub const PTRACE_GETSIGINFO: ::c_int = 0x4202;
-pub const PTRACE_SETSIGINFO: ::c_int = 0x4203;
-pub const PTRACE_GETREGSET: ::c_int = 0x4204;
-pub const PTRACE_SETREGSET: ::c_int = 0x4205;
-pub const PTRACE_SEIZE: ::c_int = 0x4206;
-pub const PTRACE_INTERRUPT: ::c_int = 0x4207;
-pub const PTRACE_LISTEN: ::c_int = 0x4208;
-pub const PTRACE_PEEKSIGINFO: ::c_int = 0x4209;
-
-pub const EPOLLWAKEUP: ::c_int = 0x20000000;
-
-pub const PTRACE_GETFPREGS: ::c_uint = 14;
-pub const PTRACE_SETFPREGS: ::c_uint = 15;
-pub const PTRACE_GETFPXREGS: ::c_uint = 18;
-pub const PTRACE_SETFPXREGS: ::c_uint = 19;
-pub const PTRACE_GETREGS: ::c_uint = 12;
-pub const PTRACE_SETREGS: ::c_uint = 13;
-
-pub const EFD_NONBLOCK: ::c_int = ::O_NONBLOCK;
-
-pub const SFD_NONBLOCK: ::c_int = ::O_NONBLOCK;
-
-pub const TCSANOW: ::c_int = 0;
-pub const TCSADRAIN: ::c_int = 1;
-pub const TCSAFLUSH: ::c_int = 2;
-
-pub const TIOCINQ: ::c_int = ::FIONREAD;
-
-pub const RTLD_GLOBAL: ::c_int = 0x100;
-pub const RTLD_NOLOAD: ::c_int = 0x4;
-
-// TODO(#247) Temporarily musl-specific (available since musl 0.9.12 / Linux
-// kernel 3.10).  See also notbsd/mod.rs
-pub const CLOCK_SGI_CYCLE: ::clockid_t = 10;
-pub const CLOCK_TAI: ::clockid_t = 11;
-
-pub const MCL_CURRENT: ::c_int = 0x0001;
-pub const MCL_FUTURE: ::c_int = 0x0002;
-
-pub const SIGSTKSZ: ::size_t = 8192;
-pub const MINSIGSTKSZ: ::size_t = 2048;
-pub const CBAUD: ::tcflag_t = 0o0010017;
-pub const TAB1: ::c_int = 0x00000800;
-pub const TAB2: ::c_int = 0x00001000;
-pub const TAB3: ::c_int = 0x00001800;
-pub const CR1: ::c_int  = 0x00000200;
-pub const CR2: ::c_int  = 0x00000400;
-pub const CR3: ::c_int  = 0x00000600;
-pub const FF1: ::c_int  = 0x00008000;
-pub const BS1: ::c_int  = 0x00002000;
-pub const VT1: ::c_int  = 0x00004000;
-pub const VWERASE: usize = 14;
-pub const VREPRINT: usize = 12;
-pub const VSUSP: usize = 10;
-pub const VSTART: usize = 8;
-pub const VSTOP: usize = 9;
-pub const VDISCARD: usize = 13;
-pub const VTIME: usize = 5;
-pub const IXON: ::tcflag_t = 0x00000400;
-pub const IXOFF: ::tcflag_t = 0x00001000;
-pub const ONLCR: ::tcflag_t = 0x4;
-pub const CSIZE: ::tcflag_t = 0x00000030;
-pub const CS6: ::tcflag_t = 0x00000010;
-pub const CS7: ::tcflag_t = 0x00000020;
-pub const CS8: ::tcflag_t = 0x00000030;
-pub const CSTOPB: ::tcflag_t = 0x00000040;
-pub const CREAD: ::tcflag_t = 0x00000080;
-pub const PARENB: ::tcflag_t = 0x00000100;
-pub const PARODD: ::tcflag_t = 0x00000200;
-pub const HUPCL: ::tcflag_t = 0x00000400;
-pub const CLOCAL: ::tcflag_t = 0x00000800;
-pub const ECHOKE: ::tcflag_t = 0x00000800;
-pub const ECHOE: ::tcflag_t = 0x00000010;
-pub const ECHOK: ::tcflag_t = 0x00000020;
-pub const ECHONL: ::tcflag_t = 0x00000040;
-pub const ECHOPRT: ::tcflag_t = 0x00000400;
-pub const ECHOCTL: ::tcflag_t = 0x00000200;
-pub const ISIG: ::tcflag_t = 0x00000001;
-pub const ICANON: ::tcflag_t = 0x00000002;
-pub const PENDIN: ::tcflag_t = 0x00004000;
-pub const NOFLSH: ::tcflag_t = 0x00000080;
-pub const CBAUDEX: ::tcflag_t = 0o010000;
-pub const VSWTC: usize = 7;
-pub const OLCUC:  ::tcflag_t = 0o000002;
-pub const NLDLY:  ::tcflag_t = 0o000400;
-pub const CRDLY:  ::tcflag_t = 0o003000;
-pub const TABDLY: ::tcflag_t = 0o014000;
-pub const BSDLY:  ::tcflag_t = 0o020000;
-pub const FFDLY:  ::tcflag_t = 0o100000;
-pub const VTDLY:  ::tcflag_t = 0o040000;
-pub const XTABS:  ::tcflag_t = 0o014000;
-
-pub const B0: ::speed_t = 0o000000;
-pub const B50: ::speed_t = 0o000001;
-pub const B75: ::speed_t = 0o000002;
-pub const B110: ::speed_t = 0o000003;
-pub const B134: ::speed_t = 0o000004;
-pub const B150: ::speed_t = 0o000005;
-pub const B200: ::speed_t = 0o000006;
-pub const B300: ::speed_t = 0o000007;
-pub const B600: ::speed_t = 0o000010;
-pub const B1200: ::speed_t = 0o000011;
-pub const B1800: ::speed_t = 0o000012;
-pub const B2400: ::speed_t = 0o000013;
-pub const B4800: ::speed_t = 0o000014;
-pub const B9600: ::speed_t = 0o000015;
-pub const B19200: ::speed_t = 0o000016;
-pub const B38400: ::speed_t = 0o000017;
-pub const B57600: ::speed_t = 0o010001;
-pub const B115200: ::speed_t = 0o010002;
-pub const B230400: ::speed_t = 0o010003;
-pub const B460800: ::speed_t = 0o010004;
-pub const B500000: ::speed_t = 0o010005;
-pub const B576000: ::speed_t = 0o010006;
-pub const B921600: ::speed_t = 0o010007;
-pub const B1000000: ::speed_t = 0o010010;
-pub const B1152000: ::speed_t = 0o010011;
-pub const B1500000: ::speed_t = 0o010012;
-pub const B2000000: ::speed_t = 0o010013;
-pub const B2500000: ::speed_t = 0o010014;
-pub const B3000000: ::speed_t = 0o010015;
-pub const B3500000: ::speed_t = 0o010016;
-pub const B4000000: ::speed_t = 0o010017;
-
-pub const SO_BINDTODEVICE: ::c_int = 25;
-pub const SO_TIMESTAMP: ::c_int = 29;
-pub const SO_MARK: ::c_int = 36;
-pub const SO_RXQ_OVFL: ::c_int = 40;
-pub const SO_PEEK_OFF: ::c_int = 42;
-pub const SO_BUSY_POLL: ::c_int = 46;
-
-pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
-pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 28;
-
-pub const O_DIRECT: ::c_int = 0x4000;
-pub const O_DIRECTORY: ::c_int = 0x10000;
-pub const O_NOFOLLOW: ::c_int = 0x20000;
-pub const O_ASYNC: ::c_int = 0x2000;
-
-pub const FIOCLEX: ::c_int = 0x5451;
-pub const FIONBIO: ::c_int = 0x5421;
-
-pub const RLIMIT_RSS: ::c_int = 5;
-pub const RLIMIT_NOFILE: ::c_int = 7;
-pub const RLIMIT_AS: ::c_int = 9;
-pub const RLIMIT_NPROC: ::c_int = 6;
-pub const RLIMIT_MEMLOCK: ::c_int = 8;
-
-pub const O_APPEND: ::c_int = 1024;
-pub const O_CREAT: ::c_int = 64;
-pub const O_EXCL: ::c_int = 128;
-pub const O_NOCTTY: ::c_int = 256;
-pub const O_NONBLOCK: ::c_int = 2048;
-pub const O_SYNC: ::c_int = 1052672;
-pub const O_RSYNC: ::c_int = 1052672;
-pub const O_DSYNC: ::c_int = 4096;
-
-pub const SOCK_NONBLOCK: ::c_int = 2048;
-
-pub const MAP_ANON: ::c_int = 0x0020;
-pub const MAP_GROWSDOWN: ::c_int = 0x0100;
-pub const MAP_DENYWRITE: ::c_int = 0x0800;
-pub const MAP_EXECUTABLE: ::c_int = 0x01000;
-pub const MAP_LOCKED: ::c_int = 0x02000;
-pub const MAP_NORESERVE: ::c_int = 0x04000;
-pub const MAP_POPULATE: ::c_int = 0x08000;
-pub const MAP_NONBLOCK: ::c_int = 0x010000;
-pub const MAP_STACK: ::c_int = 0x020000;
-
-pub const SOCK_STREAM: ::c_int = 1;
-pub const SOCK_DGRAM: ::c_int = 2;
-pub const SOCK_SEQPACKET: ::c_int = 5;
-
-pub const SOL_SOCKET: ::c_int = 1;
-
-pub const EDEADLK: ::c_int = 35;
-pub const ENAMETOOLONG: ::c_int = 36;
-pub const ENOLCK: ::c_int = 37;
-pub const ENOSYS: ::c_int = 38;
-pub const ENOTEMPTY: ::c_int = 39;
-pub const ELOOP: ::c_int = 40;
-pub const ENOMSG: ::c_int = 42;
-pub const EIDRM: ::c_int = 43;
-pub const ECHRNG: ::c_int = 44;
-pub const EL2NSYNC: ::c_int = 45;
-pub const EL3HLT: ::c_int = 46;
-pub const EL3RST: ::c_int = 47;
-pub const ELNRNG: ::c_int = 48;
-pub const EUNATCH: ::c_int = 49;
-pub const ENOCSI: ::c_int = 50;
-pub const EL2HLT: ::c_int = 51;
-pub const EBADE: ::c_int = 52;
-pub const EBADR: ::c_int = 53;
-pub const EXFULL: ::c_int = 54;
-pub const ENOANO: ::c_int = 55;
-pub const EBADRQC: ::c_int = 56;
-pub const EBADSLT: ::c_int = 57;
-pub const EDEADLOCK: ::c_int = EDEADLK;
-pub const EMULTIHOP: ::c_int = 72;
-pub const EBADMSG: ::c_int = 74;
-pub const EOVERFLOW: ::c_int = 75;
-pub const ENOTUNIQ: ::c_int = 76;
-pub const EBADFD: ::c_int = 77;
-pub const EREMCHG: ::c_int = 78;
-pub const ELIBACC: ::c_int = 79;
-pub const ELIBBAD: ::c_int = 80;
-pub const ELIBSCN: ::c_int = 81;
-pub const ELIBMAX: ::c_int = 82;
-pub const ELIBEXEC: ::c_int = 83;
-pub const EILSEQ: ::c_int = 84;
-pub const ERESTART: ::c_int = 85;
-pub const ESTRPIPE: ::c_int = 86;
-pub const EUSERS: ::c_int = 87;
-pub const ENOTSOCK: ::c_int = 88;
-pub const EDESTADDRREQ: ::c_int = 89;
-pub const EMSGSIZE: ::c_int = 90;
-pub const EPROTOTYPE: ::c_int = 91;
-pub const ENOPROTOOPT: ::c_int = 92;
-pub const EPROTONOSUPPORT: ::c_int = 93;
-pub const ESOCKTNOSUPPORT: ::c_int = 94;
-pub const EOPNOTSUPP: ::c_int = 95;
-pub const ENOTSUP: ::c_int = EOPNOTSUPP;
-pub const EPFNOSUPPORT: ::c_int = 96;
-pub const EAFNOSUPPORT: ::c_int = 97;
-pub const EADDRINUSE: ::c_int = 98;
-pub const EADDRNOTAVAIL: ::c_int = 99;
-pub const ENETDOWN: ::c_int = 100;
-pub const ENETUNREACH: ::c_int = 101;
-pub const ENETRESET: ::c_int = 102;
-pub const ECONNABORTED: ::c_int = 103;
-pub const ECONNRESET: ::c_int = 104;
-pub const ENOBUFS: ::c_int = 105;
-pub const EISCONN: ::c_int = 106;
-pub const ENOTCONN: ::c_int = 107;
-pub const ESHUTDOWN: ::c_int = 108;
-pub const ETOOMANYREFS: ::c_int = 109;
-pub const ETIMEDOUT: ::c_int = 110;
-pub const ECONNREFUSED: ::c_int = 111;
-pub const EHOSTDOWN: ::c_int = 112;
-pub const EHOSTUNREACH: ::c_int = 113;
-pub const EALREADY: ::c_int = 114;
-pub const EINPROGRESS: ::c_int = 115;
-pub const ESTALE: ::c_int = 116;
-pub const EUCLEAN: ::c_int = 117;
-pub const ENOTNAM: ::c_int = 118;
-pub const ENAVAIL: ::c_int = 119;
-pub const EISNAM: ::c_int = 120;
-pub const EREMOTEIO: ::c_int = 121;
-pub const EDQUOT: ::c_int = 122;
-pub const ENOMEDIUM: ::c_int = 123;
-pub const EMEDIUMTYPE: ::c_int = 124;
-pub const ECANCELED: ::c_int = 125;
-pub const ENOKEY: ::c_int = 126;
-pub const EKEYEXPIRED: ::c_int = 127;
-pub const EKEYREVOKED: ::c_int = 128;
-pub const EKEYREJECTED: ::c_int = 129;
-pub const EOWNERDEAD: ::c_int = 130;
-pub const ENOTRECOVERABLE: ::c_int = 131;
-pub const ERFKILL: ::c_int = 132;
-pub const EHWPOISON: ::c_int = 133;
-
-pub const SO_REUSEADDR: ::c_int = 2;
-pub const SO_TYPE: ::c_int = 3;
-pub const SO_ERROR: ::c_int = 4;
-pub const SO_DONTROUTE: ::c_int = 5;
-pub const SO_BROADCAST: ::c_int = 6;
-pub const SO_SNDBUF: ::c_int = 7;
-pub const SO_RCVBUF: ::c_int = 8;
-pub const SO_KEEPALIVE: ::c_int = 9;
-pub const SO_OOBINLINE: ::c_int = 10;
-pub const SO_LINGER: ::c_int = 13;
-pub const SO_REUSEPORT: ::c_int = 15;
-pub const SO_RCVLOWAT: ::c_int = 18;
-pub const SO_SNDLOWAT: ::c_int = 19;
-pub const SO_RCVTIMEO: ::c_int = 20;
-pub const SO_SNDTIMEO: ::c_int = 21;
-pub const SO_ACCEPTCONN: ::c_int = 30;
-
-pub const SA_ONSTACK: ::c_int = 0x08000000;
-pub const SA_SIGINFO: ::c_int = 0x00000004;
-pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
-
-pub const SIGCHLD: ::c_int = 17;
-pub const SIGBUS: ::c_int = 7;
-pub const SIGTTIN: ::c_int = 21;
-pub const SIGTTOU: ::c_int = 22;
-pub const SIGXCPU: ::c_int = 24;
-pub const SIGXFSZ: ::c_int = 25;
-pub const SIGVTALRM: ::c_int = 26;
-pub const SIGPROF: ::c_int = 27;
-pub const SIGWINCH: ::c_int = 28;
-pub const SIGUSR1: ::c_int = 10;
-pub const SIGUSR2: ::c_int = 12;
-pub const SIGCONT: ::c_int = 18;
-pub const SIGSTOP: ::c_int = 19;
-pub const SIGTSTP: ::c_int = 20;
-pub const SIGURG: ::c_int = 23;
-pub const SIGIO: ::c_int = 29;
-pub const SIGSYS: ::c_int = 31;
-pub const SIGSTKFLT: ::c_int = 16;
-pub const SIGPOLL: ::c_int = 29;
-pub const SIGPWR: ::c_int = 30;
-pub const SIG_SETMASK: ::c_int = 2;
-pub const SIG_BLOCK: ::c_int = 0x000000;
-pub const SIG_UNBLOCK: ::c_int = 0x01;
-
-pub const EXTPROC: ::tcflag_t = 0x00010000;
-
-pub const MAP_HUGETLB: ::c_int = 0x040000;
-
-pub const F_GETLK: ::c_int = 12;
-pub const F_GETOWN: ::c_int = 9;
-pub const F_SETLK: ::c_int = 13;
-pub const F_SETLKW: ::c_int = 14;
-pub const F_SETOWN: ::c_int = 8;
-
-pub const VEOF: usize = 4;
-pub const VEOL: usize = 11;
-pub const VEOL2: usize = 16;
-pub const VMIN: usize = 6;
-pub const IEXTEN: ::tcflag_t = 0x00008000;
-pub const TOSTOP: ::tcflag_t = 0x00000100;
-pub const FLUSHO: ::tcflag_t = 0x00001000;
-
-pub const TCGETS: ::c_int = 0x5401;
-pub const TCSETS: ::c_int = 0x5402;
-pub const TCSETSW: ::c_int = 0x5403;
-pub const TCSETSF: ::c_int = 0x5404;
-pub const TCGETA: ::c_int = 0x5405;
-pub const TCSETA: ::c_int = 0x5406;
-pub const TCSETAW: ::c_int = 0x5407;
-pub const TCSETAF: ::c_int = 0x5408;
-pub const TCSBRK: ::c_int = 0x5409;
-pub const TCXONC: ::c_int = 0x540A;
-pub const TCFLSH: ::c_int = 0x540B;
-pub const TIOCGSOFTCAR: ::c_int = 0x5419;
-pub const TIOCSSOFTCAR: ::c_int = 0x541A;
-pub const TIOCLINUX: ::c_int = 0x541C;
-pub const TIOCGSERIAL: ::c_int = 0x541E;
-pub const TIOCEXCL: ::c_int = 0x540C;
-pub const TIOCNXCL: ::c_int = 0x540D;
-pub const TIOCSCTTY: ::c_int = 0x540E;
-pub const TIOCGPGRP: ::c_int = 0x540F;
-pub const TIOCSPGRP: ::c_int = 0x5410;
-pub const TIOCOUTQ: ::c_int = 0x5411;
-pub const TIOCSTI: ::c_int = 0x5412;
-pub const TIOCGWINSZ: ::c_int = 0x5413;
-pub const TIOCSWINSZ: ::c_int = 0x5414;
-pub const TIOCMGET: ::c_int = 0x5415;
-pub const TIOCMBIS: ::c_int = 0x5416;
-pub const TIOCMBIC: ::c_int = 0x5417;
-pub const TIOCMSET: ::c_int = 0x5418;
-pub const FIONREAD: ::c_int = 0x541B;
-pub const TIOCCONS: ::c_int = 0x541D;
-
-pub const SYS_gettid: ::c_long = 224; // Valid for arm (32-bit) and x86 (32-bit)
-
-pub const POLLWRNORM: ::c_short = 0x100;
-pub const POLLWRBAND: ::c_short = 0x200;
-
-pub const TIOCM_LE: ::c_int = 0x001;
-pub const TIOCM_DTR: ::c_int = 0x002;
-pub const TIOCM_RTS: ::c_int = 0x004;
-pub const TIOCM_ST: ::c_int = 0x008;
-pub const TIOCM_SR: ::c_int = 0x010;
-pub const TIOCM_CTS: ::c_int = 0x020;
-pub const TIOCM_CAR: ::c_int = 0x040;
-pub const TIOCM_RNG: ::c_int = 0x080;
-pub const TIOCM_DSR: ::c_int = 0x100;
-pub const TIOCM_CD: ::c_int = TIOCM_CAR;
-pub const TIOCM_RI: ::c_int = TIOCM_RNG;
-pub const O_TMPFILE: ::c_int = 0x400000;
-
-f! {
-    pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
-        for slot in cpuset.bits.iter_mut() {
-            *slot = 0;
-        }
-    }
-
-    pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () {
-        let size_in_bits = 8 * mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc
-        let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
-        cpuset.bits[idx] |= 1 << offset;
-        ()
-    }
-
-    pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () {
-        let size_in_bits = 8 * mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc
-        let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
-        cpuset.bits[idx] &= !(1 << offset);
-        ()
-    }
-
-    pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool {
-        let size_in_bits = 8 * mem::size_of_val(&cpuset.bits[0]);
-        let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
-        0 != (cpuset.bits[idx] & (1 << offset))
-    }
-
-    pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool {
-        set1.bits == set2.bits
-    }
-
-    pub fn major(dev: ::dev_t) -> ::c_uint {
-        // see
-        // https://github.com/kripken/emscripten/blob/
-        // master/system/include/libc/sys/sysmacros.h
-        let mut major = 0;
-        major |= (dev & 0x00000fff) >> 8;
-        major |= (dev & 0xfffff000) >> 31 >> 1;
-        major as ::c_uint
-    }
-
-    pub fn minor(dev: ::dev_t) -> ::c_uint {
-        // see
-        // https://github.com/kripken/emscripten/blob/
-        // master/system/include/libc/sys/sysmacros.h
-        let mut minor = 0;
-        minor |= (dev & 0x000000ff) >> 0;
-        minor |= (dev & 0xffffff00) >> 12;
-        minor as ::c_uint
-    }
-
-    pub fn makedev(major: ::c_uint, minor: ::c_uint) -> ::dev_t {
-        let major = major as ::dev_t;
-        let minor = minor as ::dev_t;
-        let mut dev = 0;
-        dev |= (major & 0x00000fff) << 8;
-        dev |= (major & 0xfffff000) << 31 << 1;
-        dev |= (minor & 0x000000ff) << 0;
-        dev |= (minor & 0xffffff00) << 12;
-        dev
-    }
-}
-
-extern {
-    pub fn setpwent();
-    pub fn endpwent();
-    pub fn getpwent() -> *mut passwd;
-
-    pub fn shm_open(name: *const c_char, oflag: ::c_int,
-                    mode: mode_t) -> ::c_int;
-
-    pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
-                    -> ::c_int;
-    pub fn __errno_location() -> *mut ::c_int;
-
-    pub fn fopen64(filename: *const c_char,
-                   mode: *const c_char) -> *mut ::FILE;
-    pub fn freopen64(filename: *const c_char, mode: *const c_char,
-                     file: *mut ::FILE) -> *mut ::FILE;
-    pub fn tmpfile64() -> *mut ::FILE;
-    pub fn fgetpos64(stream: *mut ::FILE, ptr: *mut fpos64_t) -> ::c_int;
-    pub fn fsetpos64(stream: *mut ::FILE, ptr: *const fpos64_t) -> ::c_int;
-    pub fn fseeko64(stream: *mut ::FILE,
-                    offset: ::off64_t,
-                    whence: ::c_int) -> ::c_int;
-    pub fn ftello64(stream: *mut ::FILE) -> ::off64_t;
-    pub fn posix_fallocate(fd: ::c_int, offset: ::off_t,
-                           len: ::off_t) -> ::c_int;
-    pub fn pwritev(fd: ::c_int,
-                   iov: *const ::iovec,
-                   iovcnt: ::c_int,
-                   offset: ::off_t) -> ::ssize_t;
-    pub fn preadv(fd: ::c_int,
-                  iov: *const ::iovec,
-                  iovcnt: ::c_int,
-                  offset: ::off_t) -> ::ssize_t;
-    pub fn dup3(oldfd: ::c_int, newfd: ::c_int, flags: ::c_int) -> ::c_int;
-    pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int;
-    pub fn mkostemps(template: *mut ::c_char,
-                     suffixlen: ::c_int,
-                     flags: ::c_int) -> ::c_int;
-    pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char;
-    pub fn getnameinfo(sa: *const ::sockaddr,
-                       salen: ::socklen_t,
-                       host: *mut ::c_char,
-                       hostlen: ::socklen_t,
-                       serv: *mut ::c_char,
-                       sevlen: ::socklen_t,
-                       flags: ::c_int) -> ::c_int;
-    pub fn getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int;
-
-    // Not available now on Android
-    pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,
-                    mode: ::mode_t) -> ::c_int;
-    pub fn if_nameindex() -> *mut if_nameindex;
-    pub fn if_freenameindex(ptr: *mut if_nameindex);
-    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,
-                  flags: ::c_int,
-                  ...) -> *mut ::c_void;
-
-    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;
-    pub fn globfree(pglob: *mut ::glob_t);
-
-    pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
-                         -> ::c_int;
-
-    pub fn shm_unlink(name: *const ::c_char) -> ::c_int;
-
-    pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long);
-
-    pub fn telldir(dirp: *mut ::DIR) -> ::c_long;
-    pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
-                  -> ::c_int;
-
-    pub fn msync(addr: *mut ::c_void, len: ::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;
-    pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int;
-    pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char;
-
-    pub fn bind(socket: ::c_int, address: *const ::sockaddr,
-                address_len: ::socklen_t) -> ::c_int;
-
-    pub fn writev(fd: ::c_int,
-                  iov: *const ::iovec,
-                  iovcnt: ::c_int) -> ::ssize_t;
-    pub fn readv(fd: ::c_int,
-                 iov: *const ::iovec,
-                 iovcnt: ::c_int) -> ::ssize_t;
-
-    pub fn sendmsg(fd: ::c_int,
-                   msg: *const ::msghdr,
-                   flags: ::c_int) -> ::ssize_t;
-    pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
-                   -> ::ssize_t;
-    pub fn getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int;
-    pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int;
-    pub fn sendmmsg(sockfd: ::c_int, msgvec: *mut mmsghdr, vlen: ::c_uint,
-                    flags: ::c_int) -> ::c_int;
-    pub fn recvmmsg(sockfd: ::c_int, msgvec: *mut mmsghdr, vlen: ::c_uint,
-                    flags: ::c_int, timeout: *mut ::timespec) -> ::c_int;
-    pub fn sync();
-    pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
-    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 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;
-}
--- a/third_party/rust/libc/src/unix/notbsd/linux/mips/mips32.rs
+++ b/third_party/rust/libc/src/unix/notbsd/linux/mips/mips32.rs
@@ -5,17 +5,16 @@ pub type clock_t = i32;
 pub type time_t = i32;
 pub type suseconds_t = i32;
 pub type wchar_t = i32;
 pub type off_t = i32;
 pub type ino_t = u32;
 pub type blkcnt_t = i32;
 pub type blksize_t = i32;
 pub type nlink_t = u32;
-pub type __u64 = ::c_ulonglong;
 
 s! {
     pub struct aiocb {
         pub aio_fildes: ::c_int,
         pub aio_lio_opcode: ::c_int,
         pub aio_reqprio: ::c_int,
         pub aio_buf: *mut ::c_void,
         pub aio_nbytes: ::size_t,
@@ -71,50 +70,16 @@ s! {
         pub st_ctime: ::time_t,
         pub st_ctime_nsec: ::c_long,
         pub st_blksize: ::blksize_t,
         st_pad3: ::c_long,
         pub st_blocks: ::blkcnt64_t,
         st_pad5: [::c_long; 14],
     }
 
-    pub struct statfs64 {
-        pub f_type: ::c_long,
-        pub f_bsize: ::c_long,
-        pub f_frsize: ::c_long,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        pub f_bavail: u64,
-        pub f_fsid: ::fsid_t,
-        pub f_namelen: ::c_long,
-        pub f_flags: ::c_long,
-        pub f_spare: [::c_long; 5],
-    }
-
-    pub struct statvfs64 {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_bavail: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        pub f_favail: u64,
-        #[cfg(target_endian = "little")]
-        pub f_fsid: ::c_ulong,
-        __f_unused: ::c_int,
-        #[cfg(target_endian = "big")]
-        pub f_fsid: ::c_ulong,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-        __f_spare: [::c_int; 6],
-    }
-
     pub struct pthread_attr_t {
         __size: [u32; 9]
     }
 
     pub struct sigaction {
         pub sa_flags: ::c_int,
         pub sa_sigaction: ::sighandler_t,
         pub sa_mask: sigset_t,
@@ -258,380 +223,12 @@ s! {
         pub _f: [::c_char; 8],
     }
 }
 
 pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
 pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24;
 pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
 pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
-pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
-
-pub const O_LARGEFILE: ::c_int = 0x2000;
 
 pub const RLIM_INFINITY: ::rlim_t = 0x7fffffff;
 
-pub const SYS_syscall: ::c_long = 4000 + 0;
-pub const SYS_exit: ::c_long = 4000 + 1;
-pub const SYS_fork: ::c_long = 4000 + 2;
-pub const SYS_read: ::c_long = 4000 + 3;
-pub const SYS_write: ::c_long = 4000 + 4;
-pub const SYS_open: ::c_long = 4000 + 5;
-pub const SYS_close: ::c_long = 4000 + 6;
-pub const SYS_waitpid: ::c_long = 4000 + 7;
-pub const SYS_creat: ::c_long = 4000 + 8;
-pub const SYS_link: ::c_long = 4000 + 9;
-pub const SYS_unlink: ::c_long = 4000 +  10;
-pub const SYS_execve: ::c_long = 4000 +  11;
-pub const SYS_chdir: ::c_long = 4000 +  12;
-pub const SYS_time: ::c_long = 4000 +  13;
-pub const SYS_mknod: ::c_long = 4000 +  14;
-pub const SYS_chmod: ::c_long = 4000 +  15;
-pub const SYS_lchown: ::c_long = 4000 +  16;
-pub const SYS_break: ::c_long = 4000 +  17;
-pub const SYS_unused18: ::c_long = 4000 +  18;
-pub const SYS_lseek: ::c_long = 4000 +  19;
-pub const SYS_getpid: ::c_long = 4000 +  20;
-pub const SYS_mount: ::c_long = 4000 +  21;
-pub const SYS_umount: ::c_long = 4000 +  22;
-pub const SYS_setuid: ::c_long = 4000 +  23;
-pub const SYS_getuid: ::c_long = 4000 +  24;
-pub const SYS_stime: ::c_long = 4000 +  25;
-pub const SYS_ptrace: ::c_long = 4000 +  26;
-pub const SYS_alarm: ::c_long = 4000 +  27;
-pub const SYS_unused28: ::c_long = 4000 +  28;
-pub const SYS_pause: ::c_long = 4000 +  29;
-pub const SYS_utime: ::c_long = 4000 +  30;
-pub const SYS_stty: ::c_long = 4000 +  31;
-pub const SYS_gtty: ::c_long = 4000 +  32;
-pub const SYS_access: ::c_long = 4000 +  33;
-pub const SYS_nice: ::c_long = 4000 +  34;
-pub const SYS_ftime: ::c_long = 4000 +  35;
-pub const SYS_sync: ::c_long = 4000 +  36;
-pub const SYS_kill: ::c_long = 4000 +  37;
-pub const SYS_rename: ::c_long = 4000 +  38;
-pub const SYS_mkdir: ::c_long = 4000 +  39;
-pub const SYS_rmdir: ::c_long = 4000 +  40;
-pub const SYS_dup: ::c_long = 4000 +  41;
-pub const SYS_pipe: ::c_long = 4000 +  42;
-pub const SYS_times: ::c_long = 4000 +  43;
-pub const SYS_prof: ::c_long = 4000 +  44;
-pub const SYS_brk: ::c_long = 4000 +  45;
-pub const SYS_setgid: ::c_long = 4000 +  46;
-pub const SYS_getgid: ::c_long = 4000 +  47;
-pub const SYS_signal: ::c_long = 4000 +  48;
-pub const SYS_geteuid: ::c_long = 4000 +  49;
-pub const SYS_getegid: ::c_long = 4000 +  50;
-pub const SYS_acct: ::c_long = 4000 +  51;
-pub const SYS_umount2: ::c_long = 4000 +  52;
-pub const SYS_lock: ::c_long = 4000 +  53;
-pub const SYS_ioctl: ::c_long = 4000 +  54;
-pub const SYS_fcntl: ::c_long = 4000 +  55;
-pub const SYS_mpx: ::c_long = 4000 +  56;
-pub const SYS_setpgid: ::c_long = 4000 +  57;
-pub const SYS_ulimit: ::c_long = 4000 +  58;
-pub const SYS_unused59: ::c_long = 4000 +  59;
-pub const SYS_umask: ::c_long = 4000 +  60;
-pub const SYS_chroot: ::c_long = 4000 +  61;
-pub const SYS_ustat: ::c_long = 4000 +  62;
-pub const SYS_dup2: ::c_long = 4000 +  63;
-pub const SYS_getppid: ::c_long = 4000 +  64;
-pub const SYS_getpgrp: ::c_long = 4000 +  65;
-pub const SYS_setsid: ::c_long = 4000 +  66;
-pub const SYS_sigaction: ::c_long = 4000 +  67;
-pub const SYS_sgetmask: ::c_long = 4000 +  68;
-pub const SYS_ssetmask: ::c_long = 4000 +  69;
-pub const SYS_setreuid: ::c_long = 4000 +  70;
-pub const SYS_setregid: ::c_long = 4000 +  71;
-pub const SYS_sigsuspend: ::c_long = 4000 +  72;
-pub const SYS_sigpending: ::c_long = 4000 +  73;
-pub const SYS_sethostname: ::c_long = 4000 +  74;
-pub const SYS_setrlimit: ::c_long = 4000 +  75;
-pub const SYS_getrlimit: ::c_long = 4000 +  76;
-pub const SYS_getrusage: ::c_long = 4000 +  77;
-pub const SYS_gettimeofday: ::c_long = 4000 +  78;
-pub const SYS_settimeofday: ::c_long = 4000 +  79;
-pub const SYS_getgroups: ::c_long = 4000 +  80;
-pub const SYS_setgroups: ::c_long = 4000 +  81;
-pub const SYS_reserved82: ::c_long = 4000 +  82;
-pub const SYS_symlink: ::c_long = 4000 +  83;
-pub const SYS_unused84: ::c_long = 4000 +  84;
-pub const SYS_readlink: ::c_long = 4000 +  85;
-pub const SYS_uselib: ::c_long = 4000 +  86;
-pub const SYS_swapon: ::c_long = 4000 +  87;
-pub const SYS_reboot: ::c_long = 4000 +  88;
-pub const SYS_readdir: ::c_long = 4000 +  89;
-pub const SYS_mmap: ::c_long = 4000 +  90;
-pub const SYS_munmap: ::c_long = 4000 +  91;
-pub const SYS_truncate: ::c_long = 4000 +  92;
-pub const SYS_ftruncate: ::c_long = 4000 +  93;
-pub const SYS_fchmod: ::c_long = 4000 +  94;
-pub const SYS_fchown: ::c_long = 4000 +  95;
-pub const SYS_getpriority: ::c_long = 4000 +  96;
-pub const SYS_setpriority: ::c_long = 4000 +  97;
-pub const SYS_profil: ::c_long = 4000 +  98;
-pub const SYS_statfs: ::c_long = 4000 +  99;
-pub const SYS_fstatfs: ::c_long = 4000 + 100;
-pub const SYS_ioperm: ::c_long = 4000 + 101;
-pub const SYS_socketcall: ::c_long = 4000 + 102;
-pub const SYS_syslog: ::c_long = 4000 + 103;
-pub const SYS_setitimer: ::c_long = 4000 + 104;
-pub const SYS_getitimer: ::c_long = 4000 + 105;
-pub const SYS_stat: ::c_long = 4000 + 106;
-pub const SYS_lstat: ::c_long = 4000 + 107;
-pub const SYS_fstat: ::c_long = 4000 + 108;
-pub const SYS_unused109: ::c_long = 4000 + 109;
-pub const SYS_iopl: ::c_long = 4000 + 110;
-pub const SYS_vhangup: ::c_long = 4000 + 111;
-pub const SYS_idle: ::c_long = 4000 + 112;
-pub const SYS_vm86: ::c_long = 4000 + 113;
-pub const SYS_wait4: ::c_long = 4000 + 114;
-pub const SYS_swapoff: ::c_long = 4000 + 115;
-pub const SYS_sysinfo: ::c_long = 4000 + 116;
-pub const SYS_ipc: ::c_long = 4000 + 117;
-pub const SYS_fsync: ::c_long = 4000 + 118;
-pub const SYS_sigreturn: ::c_long = 4000 + 119;
-pub const SYS_clone: ::c_long = 4000 + 120;
-pub const SYS_setdomainname: ::c_long = 4000 + 121;
-pub const SYS_uname: ::c_long = 4000 + 122;
-pub const SYS_modify_ldt: ::c_long = 4000 + 123;
-pub const SYS_adjtimex: ::c_long = 4000 + 124;
-pub const SYS_mprotect: ::c_long = 4000 + 125;
-pub const SYS_sigprocmask: ::c_long = 4000 + 126;
-pub const SYS_create_module: ::c_long = 4000 + 127;
-pub const SYS_init_module: ::c_long = 4000 + 128;
-pub const SYS_delete_module: ::c_long = 4000 + 129;
-pub const SYS_get_kernel_syms: ::c_long = 4000 + 130;
-pub const SYS_quotactl: ::c_long = 4000 + 131;
-pub const SYS_getpgid: ::c_long = 4000 + 132;
-pub const SYS_fchdir: ::c_long = 4000 + 133;
-pub const SYS_bdflush: ::c_long = 4000 + 134;
-pub const SYS_sysfs: ::c_long = 4000 + 135;
-pub const SYS_personality: ::c_long = 4000 + 136;
-pub const SYS_afs_syscall: ::c_long = 4000 + 137;
-pub const SYS_setfsuid: ::c_long = 4000 + 138;
-pub const SYS_setfsgid: ::c_long = 4000 + 139;
-pub const SYS__llseek: ::c_long = 4000 + 140;
-pub const SYS_getdents: ::c_long = 4000 + 141;
-pub const SYS__newselect: ::c_long = 4000 + 142;
-pub const SYS_flock: ::c_long = 4000 + 143;
-pub const SYS_msync: ::c_long = 4000 + 144;
-pub const SYS_readv: ::c_long = 4000 + 145;
-pub const SYS_writev: ::c_long = 4000 + 146;
-pub const SYS_cacheflush: ::c_long = 4000 + 147;
-pub const SYS_cachectl: ::c_long = 4000 + 148;
-pub const SYS_sysmips: ::c_long = 4000 + 149;
-pub const SYS_unused150: ::c_long = 4000 + 150;
-pub const SYS_getsid: ::c_long = 4000 + 151;
-pub const SYS_fdatasync: ::c_long = 4000 + 152;
-pub const SYS__sysctl: ::c_long = 4000 + 153;
-pub const SYS_mlock: ::c_long = 4000 + 154;
-pub const SYS_munlock: ::c_long = 4000 + 155;
-pub const SYS_mlockall: ::c_long = 4000 + 156;
-pub const SYS_munlockall: ::c_long = 4000 + 157;
-pub const SYS_sched_setparam: ::c_long = 4000 + 158;
-pub const SYS_sched_getparam: ::c_long = 4000 + 159;
-pub const SYS_sched_setscheduler: ::c_long = 4000 + 160;
-pub const SYS_sched_getscheduler: ::c_long = 4000 + 161;
-pub const SYS_sched_yield: ::c_long = 4000 + 162;
-pub const SYS_sched_get_priority_max: ::c_long = 4000 + 163;
-pub const SYS_sched_get_priority_min: ::c_long = 4000 + 164;
-pub const SYS_sched_rr_get_interval: ::c_long = 4000 + 165;
-pub const SYS_nanosleep: ::c_long = 4000 + 166;
-pub const SYS_mremap: ::c_long = 4000 + 167;
-pub const SYS_accept: ::c_long = 4000 + 168;
-pub const SYS_bind: ::c_long = 4000 + 169;
-pub const SYS_connect: ::c_long = 4000 + 170;
-pub const SYS_getpeername: ::c_long = 4000 + 171;
-pub const SYS_getsockname: ::c_long = 4000 + 172;
-pub const SYS_getsockopt: ::c_long = 4000 + 173;
-pub const SYS_listen: ::c_long = 4000 + 174;
-pub const SYS_recv: ::c_long = 4000 + 175;
-pub const SYS_recvfrom: ::c_long = 4000 + 176;
-pub const SYS_recvmsg: ::c_long = 4000 + 177;
-pub const SYS_send: ::c_long = 4000 + 178;
-pub const SYS_sendmsg: ::c_long = 4000 + 179;
-pub const SYS_sendto: ::c_long = 4000 + 180;
-pub const SYS_setsockopt: ::c_long = 4000 + 181;
-pub const SYS_shutdown: ::c_long = 4000 + 182;
-pub const SYS_socket: ::c_long = 4000 + 183;
-pub const SYS_socketpair: ::c_long = 4000 + 184;
-pub const SYS_setresuid: ::c_long = 4000 + 185;
-pub const SYS_getresuid: ::c_long = 4000 + 186;
-pub const SYS_query_module: ::c_long = 4000 + 187;
-pub const SYS_poll: ::c_long = 4000 + 188;
-pub const SYS_nfsservctl: ::c_long = 4000 + 189;
-pub const SYS_setresgid: ::c_long = 4000 + 190;
-pub const SYS_getresgid: ::c_long = 4000 + 191;
-pub const SYS_prctl: ::c_long = 4000 + 192;
-pub const SYS_rt_sigreturn: ::c_long = 4000 + 193;
-pub const SYS_rt_sigaction: ::c_long = 4000 + 194;
-pub const SYS_rt_sigprocmask: ::c_long = 4000 + 195;
-pub const SYS_rt_sigpending: ::c_long = 4000 + 196;
-pub const SYS_rt_sigtimedwait: ::c_long = 4000 + 197;
-pub const SYS_rt_sigqueueinfo: ::c_long = 4000 + 198;
-pub const SYS_rt_sigsuspend: ::c_long = 4000 + 199;
-pub const SYS_pread64: ::c_long = 4000 + 200;
-pub const SYS_pwrite64: ::c_long = 4000 + 201;
-pub const SYS_chown: ::c_long = 4000 + 202;
-pub const SYS_getcwd: ::c_long = 4000 + 203;
-pub const SYS_capget: ::c_long = 4000 + 204;
-pub const SYS_capset: ::c_long = 4000 + 205;
-pub const SYS_sigaltstack: ::c_long = 4000 + 206;
-pub const SYS_sendfile: ::c_long = 4000 + 207;
-pub const SYS_getpmsg: ::c_long = 4000 + 208;
-pub const SYS_putpmsg: ::c_long = 4000 + 209;
-pub const SYS_mmap2: ::c_long = 4000 + 210;
-pub const SYS_truncate64: ::c_long = 4000 + 211;
-pub const SYS_ftruncate64: ::c_long = 4000 + 212;
-pub const SYS_stat64: ::c_long = 4000 + 213;
-pub const SYS_lstat64: ::c_long = 4000 + 214;
-pub const SYS_fstat64: ::c_long = 4000 + 215;
-pub const SYS_pivot_root: ::c_long = 4000 + 216;
-pub const SYS_mincore: ::c_long = 4000 + 217;
-pub const SYS_madvise: ::c_long = 4000 + 218;
-pub const SYS_getdents64: ::c_long = 4000 + 219;
-pub const SYS_fcntl64: ::c_long = 4000 + 220;
-pub const SYS_reserved221: ::c_long = 4000 + 221;
-pub const SYS_gettid: ::c_long = 4000 + 222;
-pub const SYS_readahead: ::c_long = 4000 + 223;
-pub const SYS_setxattr: ::c_long = 4000 + 224;
-pub const SYS_lsetxattr: ::c_long = 4000 + 225;
-pub const SYS_fsetxattr: ::c_long = 4000 + 226;
-pub const SYS_getxattr: ::c_long = 4000 + 227;
-pub const SYS_lgetxattr: ::c_long = 4000 + 228;
-pub const SYS_fgetxattr: ::c_long = 4000 + 229;
-pub const SYS_listxattr: ::c_long = 4000 + 230;
-pub const SYS_llistxattr: ::c_long = 4000 + 231;
-pub const SYS_flistxattr: ::c_long = 4000 + 232;
-pub const SYS_removexattr: ::c_long = 4000 + 233;
-pub const SYS_lremovexattr: ::c_long = 4000 + 234;
-pub const SYS_fremovexattr: ::c_long = 4000 + 235;
-pub const SYS_tkill: ::c_long = 4000 + 236;
-pub const SYS_sendfile64: ::c_long = 4000 + 237;
-pub const SYS_futex: ::c_long = 4000 + 238;
-pub const SYS_sched_setaffinity: ::c_long = 4000 + 239;
-pub const SYS_sched_getaffinity: ::c_long = 4000 + 240;
-pub const SYS_io_setup: ::c_long = 4000 + 241;
-pub const SYS_io_destroy: ::c_long = 4000 + 242;
-pub const SYS_io_getevents: ::c_long = 4000 + 243;
-pub const SYS_io_submit: ::c_long = 4000 + 244;
-pub const SYS_io_cancel: ::c_long = 4000 + 245;
-pub const SYS_exit_group: ::c_long = 4000 + 246;
-pub const SYS_lookup_dcookie: ::c_long = 4000 + 247;
-pub const SYS_epoll_create: ::c_long = 4000 + 248;
-pub const SYS_epoll_ctl: ::c_long = 4000 + 249;
-pub const SYS_epoll_wait: ::c_long = 4000 + 250;
-pub const SYS_remap_file_pages: ::c_long = 4000 + 251;
-pub const SYS_set_tid_address: ::c_long = 4000 + 252;
-pub const SYS_restart_syscall: ::c_long = 4000 + 253;
-pub const SYS_fadvise64: ::c_long = 4000 + 254;
-pub const SYS_statfs64: ::c_long = 4000 + 255;
-pub const SYS_fstatfs64: ::c_long = 4000 + 256;
-pub const SYS_timer_create: ::c_long = 4000 + 257;
-pub const SYS_timer_settime: ::c_long = 4000 + 258;
-pub const SYS_timer_gettime: ::c_long = 4000 + 259;
-pub const SYS_timer_getoverrun: ::c_long = 4000 + 260;
-pub const SYS_timer_delete: ::c_long = 4000 + 261;
-pub const SYS_clock_settime: ::c_long = 4000 + 262;
-pub const SYS_clock_gettime: ::c_long = 4000 + 263;
-pub const SYS_clock_getres: ::c_long = 4000 + 264;
-pub const SYS_clock_nanosleep: ::c_long = 4000 + 265;
-pub const SYS_tgkill: ::c_long = 4000 + 266;
-pub const SYS_utimes: ::c_long = 4000 + 267;
-pub const SYS_mbind: ::c_long = 4000 + 268;
-pub const SYS_get_mempolicy: ::c_long = 4000 + 269;
-pub const SYS_set_mempolicy: ::c_long = 4000 + 270;
-pub const SYS_mq_open: ::c_long = 4000 + 271;
-pub const SYS_mq_unlink: ::c_long = 4000 + 272;
-pub const SYS_mq_timedsend: ::c_long = 4000 + 273;
-pub const SYS_mq_timedreceive: ::c_long = 4000 + 274;
-pub const SYS_mq_notify: ::c_long = 4000 + 275;
-pub const SYS_mq_getsetattr: ::c_long = 4000 + 276;
-pub const SYS_vserver: ::c_long = 4000 + 277;
-pub const SYS_waitid: ::c_long = 4000 + 278;
-/* pub const SYS_sys_setaltroot: ::c_long = 4000 + 279; */
-pub const SYS_add_key: ::c_long = 4000 + 280;
-pub const SYS_request_key: ::c_long = 4000 + 281;
-pub const SYS_keyctl: ::c_long = 4000 + 282;
-pub const SYS_set_thread_area: ::c_long = 4000 + 283;
-pub const SYS_inotify_init: ::c_long = 4000 + 284;
-pub const SYS_inotify_add_watch: ::c_long = 4000 + 285;
-pub const SYS_inotify_rm_watch: ::c_long = 4000 + 286;
-pub const SYS_migrate_pages: ::c_long = 4000 + 287;
-pub const SYS_openat: ::c_long = 4000 + 288;
-pub const SYS_mkdirat: ::c_long = 4000 + 289;
-pub const SYS_mknodat: ::c_long = 4000 + 290;
-pub const SYS_fchownat: ::c_long = 4000 + 291;
-pub const SYS_futimesat: ::c_long = 4000 + 292;
-pub const SYS_fstatat64: ::c_long = 4000 + 293;
-pub const SYS_unlinkat: ::c_long = 4000 + 294;
-pub const SYS_renameat: ::c_long = 4000 + 295;
-pub const SYS_linkat: ::c_long = 4000 + 296;
-pub const SYS_symlinkat: ::c_long = 4000 + 297;
-pub const SYS_readlinkat: ::c_long = 4000 + 298;
-pub const SYS_fchmodat: ::c_long = 4000 + 299;
-pub const SYS_faccessat: ::c_long = 4000 + 300;
-pub const SYS_pselect6: ::c_long = 4000 + 301;
-pub const SYS_ppoll: ::c_long = 4000 + 302;
-pub const SYS_unshare: ::c_long = 4000 + 303;
-pub const SYS_splice: ::c_long = 4000 + 304;
-pub const SYS_sync_file_range: ::c_long = 4000 + 305;
-pub const SYS_tee: ::c_long = 4000 + 306;
-pub const SYS_vmsplice: ::c_long = 4000 + 307;
-pub const SYS_move_pages: ::c_long = 4000 + 308;
-pub const SYS_set_robust_list: ::c_long = 4000 + 309;
-pub const SYS_get_robust_list: ::c_long = 4000 + 310;
-pub const SYS_kexec_load: ::c_long = 4000 + 311;
-pub const SYS_getcpu: ::c_long = 4000 + 312;
-pub const SYS_epoll_pwait: ::c_long = 4000 + 313;
-pub const SYS_ioprio_set: ::c_long = 4000 + 314;
-pub const SYS_ioprio_get: ::c_long = 4000 + 315;
-pub const SYS_utimensat: ::c_long = 4000 + 316;
-pub const SYS_signalfd: ::c_long = 4000 + 317;
-pub const SYS_timerfd: ::c_long = 4000 + 318;
-pub const SYS_eventfd: ::c_long = 4000 + 319;
-pub const SYS_fallocate: ::c_long = 4000 + 320;
-pub const SYS_timerfd_create: ::c_long = 4000 + 321;
-pub const SYS_timerfd_gettime: ::c_long = 4000 + 322;
-pub const SYS_timerfd_settime: ::c_long = 4000 + 323;
-pub const SYS_signalfd4: ::c_long = 4000 + 324;
-pub const SYS_eventfd2: ::c_long = 4000 + 325;
-pub const SYS_epoll_create1: ::c_long = 4000 + 326;
-pub const SYS_dup3: ::c_long = 4000 + 327;
-pub const SYS_pipe2: ::c_long = 4000 + 328;
-pub const SYS_inotify_init1: ::c_long = 4000 + 329;
-pub const SYS_preadv: ::c_long = 4000 + 330;
-pub const SYS_pwritev: ::c_long = 4000 + 331;
-pub const SYS_rt_tgsigqueueinfo: ::c_long = 4000 + 332;
-pub const SYS_perf_event_open: ::c_long = 4000 + 333;
-pub const SYS_accept4: ::c_long = 4000 + 334;
-pub const SYS_recvmmsg: ::c_long = 4000 + 335;
-pub const SYS_fanotify_init: ::c_long = 4000 + 336;
-pub const SYS_fanotify_mark: ::c_long = 4000 + 337;
-pub const SYS_prlimit64: ::c_long = 4000 + 338;
-pub const SYS_name_to_handle_at: ::c_long = 4000 + 339;
-pub const SYS_open_by_handle_at: ::c_long = 4000 + 340;
-pub const SYS_clock_adjtime: ::c_long = 4000 + 341;
-pub const SYS_syncfs: ::c_long = 4000 + 342;
-pub const SYS_sendmmsg: ::c_long = 4000 + 343;
-pub const SYS_setns: ::c_long = 4000 + 344;
-pub const SYS_process_vm_readv: ::c_long = 4000 + 345;
-pub const SYS_process_vm_writev: ::c_long = 4000 + 346;
-pub const SYS_kcmp: ::c_long = 4000 + 347;
-pub const SYS_finit_module: ::c_long = 4000 + 348;
-pub const SYS_sched_setattr: ::c_long = 4000 + 349;
-pub const SYS_sched_getattr: ::c_long = 4000 + 350;
-pub const SYS_renameat2: ::c_long = 4000 + 351;
-pub const SYS_seccomp: ::c_long = 4000 + 352;
-pub const SYS_getrandom: ::c_long = 4000 + 353;
-pub const SYS_memfd_create: ::c_long = 4000 + 354;
-pub const SYS_bpf: ::c_long = 4000 + 355;
-pub const SYS_execveat: ::c_long = 4000 + 356;
-pub const SYS_userfaultfd: ::c_long = 4000 + 357;
-pub const SYS_membarrier: ::c_long = 4000 + 358;
-pub const SYS_mlock2: ::c_long = 4000 + 359;
-pub const SYS_copy_file_range: ::c_long = 4000 + 360;
-pub const SYS_preadv2: ::c_long = 4000 + 361;
-pub const SYS_pwritev2: ::c_long = 4000 + 362;
-pub const SYS_pkey_mprotect: ::c_long = 4000 + 363;
-pub const SYS_pkey_alloc: ::c_long = 4000 + 364;
-pub const SYS_pkey_free: ::c_long = 4000 + 365;
+pub const SYS_gettid: ::c_long = 4222;   // Valid for O32
--- a/third_party/rust/libc/src/unix/notbsd/linux/mips/mips64.rs
+++ b/third_party/rust/libc/src/unix/notbsd/linux/mips/mips64.rs
@@ -5,17 +5,16 @@ pub type c_long = i64;
 pub type c_ulong = u64;
 pub type ino_t = u64;
 pub type nlink_t = u64;
 pub type off_t = i64;
 pub type suseconds_t = i64;
 pub type time_t = i64;
 pub type wchar_t = i32;
 pub type clock_t = i64;
-pub type __u64 = ::c_ulong;
 
 s! {
     pub struct aiocb {
         pub aio_fildes: ::c_int,
         pub aio_lio_opcode: ::c_int,
         pub aio_reqprio: ::c_int,
         pub aio_buf: *mut ::c_void,
         pub aio_nbytes: ::size_t,
@@ -71,46 +70,16 @@ s! {
         pub st_ctime: ::time_t,
         pub st_ctime_nsec: ::c_long,
         pub st_blksize: ::blksize_t,
         st_pad3: ::c_long,
         pub st_blocks: ::blkcnt64_t,
         st_pad5: [::c_long; 7],
     }
 
-    pub struct statfs64 {
-        pub f_type: ::c_long,
-        pub f_bsize: ::c_long,
-        pub f_frsize: ::c_long,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        pub f_bavail: u64,
-        pub f_fsid: ::fsid_t,
-        pub f_namelen: ::c_long,
-        pub f_flags: ::c_long,
-        pub f_spare: [::c_long; 5],
-    }
-
-    pub struct statvfs64 {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_bavail: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        pub f_favail: u64,
-        pub f_fsid: ::c_ulong,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-        __f_spare: [::c_int; 6],
-    }
-
     pub struct pthread_attr_t {
         __size: [::c_ulong; 7]
     }
 
     pub struct sigaction {
         pub sa_flags: ::c_int,
         pub sa_sigaction: ::sighandler_t,
         pub sa_mask: sigset_t,
@@ -240,340 +209,12 @@ s! {
         pub _f: [::c_char; 0],
     }
 }
 
 pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
 pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
 pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
 pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
-pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
-
-pub const O_LARGEFILE: ::c_int = 0;
 
 pub const RLIM_INFINITY: ::rlim_t = 0xffff_ffff_ffff_ffff;
 
-pub const SYS_read: ::c_long = 5000 + 0;
-pub const SYS_write: ::c_long = 5000 + 1;
-pub const SYS_open: ::c_long = 5000 + 2;
-pub const SYS_close: ::c_long = 5000 + 3;
-pub const SYS_stat: ::c_long = 5000 + 4;
-pub const SYS_fstat: ::c_long = 5000 + 5;
-pub const SYS_lstat: ::c_long = 5000 + 6;
-pub const SYS_poll: ::c_long = 5000 + 7;
-pub const SYS_lseek: ::c_long = 5000 + 8;
-pub const SYS_mmap: ::c_long = 5000 + 9;
-pub const SYS_mprotect: ::c_long = 5000 +  10;
-pub const SYS_munmap: ::c_long = 5000 +  11;
-pub const SYS_brk: ::c_long = 5000 +  12;
-pub const SYS_rt_sigaction: ::c_long = 5000 +  13;
-pub const SYS_rt_sigprocmask: ::c_long = 5000 +  14;
-pub const SYS_ioctl: ::c_long = 5000 +  15;
-pub const SYS_pread64: ::c_long = 5000 +  16;
-pub const SYS_pwrite64: ::c_long = 5000 +  17;
-pub const SYS_readv: ::c_long = 5000 +  18;
-pub const SYS_writev: ::c_long = 5000 +  19;
-pub const SYS_access: ::c_long = 5000 +  20;
-pub const SYS_pipe: ::c_long = 5000 +  21;
-pub const SYS__newselect: ::c_long = 5000 +  22;
-pub const SYS_sched_yield: ::c_long = 5000 +  23;
-pub const SYS_mremap: ::c_long = 5000 +  24;
-pub const SYS_msync: ::c_long = 5000 +  25;
-pub const SYS_mincore: ::c_long = 5000 +  26;
-pub const SYS_madvise: ::c_long = 5000 +  27;
-pub const SYS_shmget: ::c_long = 5000 +  28;
-pub const SYS_shmat: ::c_long = 5000 +  29;
-pub const SYS_shmctl: ::c_long = 5000 +  30;
-pub const SYS_dup: ::c_long = 5000 +  31;
-pub const SYS_dup2: ::c_long = 5000 +  32;
-pub const SYS_pause: ::c_long = 5000 +  33;
-pub const SYS_nanosleep: ::c_long = 5000 +  34;
-pub const SYS_getitimer: ::c_long = 5000 +  35;
-pub const SYS_setitimer: ::c_long = 5000 +  36;
-pub const SYS_alarm: ::c_long = 5000 +  37;
-pub const SYS_getpid: ::c_long = 5000 +  38;
-pub const SYS_sendfile: ::c_long = 5000 +  39;
-pub const SYS_socket: ::c_long = 5000 +  40;
-pub const SYS_connect: ::c_long = 5000 +  41;
-pub const SYS_accept: ::c_long = 5000 +  42;
-pub const SYS_sendto: ::c_long = 5000 +  43;
-pub const SYS_recvfrom: ::c_long = 5000 +  44;
-pub const SYS_sendmsg: ::c_long = 5000 +  45;
-pub const SYS_recvmsg: ::c_long = 5000 +  46;
-pub const SYS_shutdown: ::c_long = 5000 +  47;
-pub const SYS_bind: ::c_long = 5000 +  48;
-pub const SYS_listen: ::c_long = 5000 +  49;
-pub const SYS_getsockname: ::c_long = 5000 +  50;
-pub const SYS_getpeername: ::c_long = 5000 +  51;
-pub const SYS_socketpair: ::c_long = 5000 +  52;
-pub const SYS_setsockopt: ::c_long = 5000 +  53;
-pub const SYS_getsockopt: ::c_long = 5000 +  54;
-pub const SYS_clone: ::c_long = 5000 +  55;
-pub const SYS_fork: ::c_long = 5000 +  56;
-pub const SYS_execve: ::c_long = 5000 +  57;
-pub const SYS_exit: ::c_long = 5000 +  58;
-pub const SYS_wait4: ::c_long = 5000 +  59;
-pub const SYS_kill: ::c_long = 5000 +  60;
-pub const SYS_uname: ::c_long = 5000 +  61;
-pub const SYS_semget: ::c_long = 5000 +  62;
-pub const SYS_semop: ::c_long = 5000 +  63;
-pub const SYS_semctl: ::c_long = 5000 +  64;
-pub const SYS_shmdt: ::c_long = 5000 +  65;
-pub const SYS_msgget: ::c_long = 5000 +  66;
-pub const SYS_msgsnd: ::c_long = 5000 +  67;
-pub const SYS_msgrcv: ::c_long = 5000 +  68;
-pub const SYS_msgctl: ::c_long = 5000 +  69;
-pub const SYS_fcntl: ::c_long = 5000 +  70;
-pub const SYS_flock: ::c_long = 5000 +  71;
-pub const SYS_fsync: ::c_long = 5000 +  72;
-pub const SYS_fdatasync: ::c_long = 5000 +  73;
-pub const SYS_truncate: ::c_long = 5000 +  74;
-pub const SYS_ftruncate: ::c_long = 5000 +  75;
-pub const SYS_getdents: ::c_long = 5000 +  76;
-pub const SYS_getcwd: ::c_long = 5000 +  77;
-pub const SYS_chdir: ::c_long = 5000 +  78;
-pub const SYS_fchdir: ::c_long = 5000 +  79;
-pub const SYS_rename: ::c_long = 5000 +  80;
-pub const SYS_mkdir: ::c_long = 5000 +  81;
-pub const SYS_rmdir: ::c_long = 5000 +  82;
-pub const SYS_creat: ::c_long = 5000 +  83;
-pub const SYS_link: ::c_long = 5000 +  84;
-pub const SYS_unlink: ::c_long = 5000 +  85;
-pub const SYS_symlink: ::c_long = 5000 +  86;
-pub const SYS_readlink: ::c_long = 5000 +  87;
-pub const SYS_chmod: ::c_long = 5000 +  88;
-pub const SYS_fchmod: ::c_long = 5000 +  89;
-pub const SYS_chown: ::c_long = 5000 +  90;
-pub const SYS_fchown: ::c_long = 5000 +  91;
-pub const SYS_lchown: ::c_long = 5000 +  92;
-pub const SYS_umask: ::c_long = 5000 +  93;
-pub const SYS_gettimeofday: ::c_long = 5000 +  94;
-pub const SYS_getrlimit: ::c_long = 5000 +  95;
-pub const SYS_getrusage: ::c_long = 5000 +  96;
-pub const SYS_sysinfo: ::c_long = 5000 +  97;
-pub const SYS_times: ::c_long = 5000 +  98;
-pub const SYS_ptrace: ::c_long = 5000 +  99;
-pub const SYS_getuid: ::c_long = 5000 + 100;
-pub const SYS_syslog: ::c_long = 5000 + 101;
-pub const SYS_getgid: ::c_long = 5000 + 102;
-pub const SYS_setuid: ::c_long = 5000 + 103;
-pub const SYS_setgid: ::c_long = 5000 + 104;
-pub const SYS_geteuid: ::c_long = 5000 + 105;
-pub const SYS_getegid: ::c_long = 5000 + 106;
-pub const SYS_setpgid: ::c_long = 5000 + 107;
-pub const SYS_getppid: ::c_long = 5000 + 108;
-pub const SYS_getpgrp: ::c_long = 5000 + 109;
-pub const SYS_setsid: ::c_long = 5000 + 110;
-pub const SYS_setreuid: ::c_long = 5000 + 111;
-pub const SYS_setregid: ::c_long = 5000 + 112;
-pub const SYS_getgroups: ::c_long = 5000 + 113;
-pub const SYS_setgroups: ::c_long = 5000 + 114;
-pub const SYS_setresuid: ::c_long = 5000 + 115;
-pub const SYS_getresuid: ::c_long = 5000 + 116;
-pub const SYS_setresgid: ::c_long = 5000 + 117;
-pub const SYS_getresgid: ::c_long = 5000 + 118;
-pub const SYS_getpgid: ::c_long = 5000 + 119;
-pub const SYS_setfsuid: ::c_long = 5000 + 120;
-pub const SYS_setfsgid: ::c_long = 5000 + 121;
-pub const SYS_getsid: ::c_long = 5000 + 122;
-pub const SYS_capget: ::c_long = 5000 + 123;
-pub const SYS_capset: ::c_long = 5000 + 124;
-pub const SYS_rt_sigpending: ::c_long = 5000 + 125;
-pub const SYS_rt_sigtimedwait: ::c_long = 5000 + 126;
-pub const SYS_rt_sigqueueinfo: ::c_long = 5000 + 127;
-pub const SYS_rt_sigsuspend: ::c_long = 5000 + 128;
-pub const SYS_sigaltstack: ::c_long = 5000 + 129;
-pub const SYS_utime: ::c_long = 5000 + 130;
-pub const SYS_mknod: ::c_long = 5000 + 131;
-pub const SYS_personality: ::c_long = 5000 + 132;
-pub const SYS_ustat: ::c_long = 5000 + 133;
-pub const SYS_statfs: ::c_long = 5000 + 134;
-pub const SYS_fstatfs: ::c_long = 5000 + 135;
-pub const SYS_sysfs: ::c_long = 5000 + 136;
-pub const SYS_getpriority: ::c_long = 5000 + 137;
-pub const SYS_setpriority: ::c_long = 5000 + 138;
-pub const SYS_sched_setparam: ::c_long = 5000 + 139;
-pub const SYS_sched_getparam: ::c_long = 5000 + 140;
-pub const SYS_sched_setscheduler: ::c_long = 5000 + 141;
-pub const SYS_sched_getscheduler: ::c_long = 5000 + 142;
-pub const SYS_sched_get_priority_max: ::c_long = 5000 + 143;
-pub const SYS_sched_get_priority_min: ::c_long = 5000 + 144;
-pub const SYS_sched_rr_get_interval: ::c_long = 5000 + 145;
-pub const SYS_mlock: ::c_long = 5000 + 146;
-pub const SYS_munlock: ::c_long = 5000 + 147;
-pub const SYS_mlockall: ::c_long = 5000 + 148;
-pub const SYS_munlockall: ::c_long = 5000 + 149;
-pub const SYS_vhangup: ::c_long = 5000 + 150;
-pub const SYS_pivot_root: ::c_long = 5000 + 151;
-pub const SYS__sysctl: ::c_long = 5000 + 152;
-pub const SYS_prctl: ::c_long = 5000 + 153;
-pub const SYS_adjtimex: ::c_long = 5000 + 154;
-pub const SYS_setrlimit: ::c_long = 5000 + 155;
-pub const SYS_chroot: ::c_long = 5000 + 156;
-pub const SYS_sync: ::c_long = 5000 + 157;
-pub const SYS_acct: ::c_long = 5000 + 158;
-pub const SYS_settimeofday: ::c_long = 5000 + 159;
-pub const SYS_mount: ::c_long = 5000 + 160;
-pub const SYS_umount2: ::c_long = 5000 + 161;
-pub const SYS_swapon: ::c_long = 5000 + 162;
-pub const SYS_swapoff: ::c_long = 5000 + 163;
-pub const SYS_reboot: ::c_long = 5000 + 164;
-pub const SYS_sethostname: ::c_long = 5000 + 165;
-pub const SYS_setdomainname: ::c_long = 5000 + 166;
-pub const SYS_create_module: ::c_long = 5000 + 167;
-pub const SYS_init_module: ::c_long = 5000 + 168;
-pub const SYS_delete_module: ::c_long = 5000 + 169;
-pub const SYS_get_kernel_syms: ::c_long = 5000 + 170;
-pub const SYS_query_module: ::c_long = 5000 + 171;
-pub const SYS_quotactl: ::c_long = 5000 + 172;
-pub const SYS_nfsservctl: ::c_long = 5000 + 173;
-pub const SYS_getpmsg: ::c_long = 5000 + 174;
-pub const SYS_putpmsg: ::c_long = 5000 + 175;
-pub const SYS_afs_syscall: ::c_long = 5000 + 176;
-pub const SYS_reserved177: ::c_long = 5000 + 177;
-pub const SYS_gettid: ::c_long = 5000 + 178;
-pub const SYS_readahead: ::c_long = 5000 + 179;
-pub const SYS_setxattr: ::c_long = 5000 + 180;
-pub const SYS_lsetxattr: ::c_long = 5000 + 181;
-pub const SYS_fsetxattr: ::c_long = 5000 + 182;
-pub const SYS_getxattr: ::c_long = 5000 + 183;
-pub const SYS_lgetxattr: ::c_long = 5000 + 184;
-pub const SYS_fgetxattr: ::c_long = 5000 + 185;
-pub const SYS_listxattr: ::c_long = 5000 + 186;
-pub const SYS_llistxattr: ::c_long = 5000 + 187;
-pub const SYS_flistxattr: ::c_long = 5000 + 188;
-pub const SYS_removexattr: ::c_long = 5000 + 189;
-pub const SYS_lremovexattr: ::c_long = 5000 + 190;
-pub const SYS_fremovexattr: ::c_long = 5000 + 191;
-pub const SYS_tkill: ::c_long = 5000 + 192;
-pub const SYS_reserved193: ::c_long = 5000 + 193;
-pub const SYS_futex: ::c_long = 5000 + 194;
-pub const SYS_sched_setaffinity: ::c_long = 5000 + 195;
-pub const SYS_sched_getaffinity: ::c_long = 5000 + 196;
-pub const SYS_cacheflush: ::c_long = 5000 + 197;
-pub const SYS_cachectl: ::c_long = 5000 + 198;
-pub const SYS_sysmips: ::c_long = 5000 + 199;
-pub const SYS_io_setup: ::c_long = 5000 + 200;
-pub const SYS_io_destroy: ::c_long = 5000 + 201;
-pub const SYS_io_getevents: ::c_long = 5000 + 202;
-pub const SYS_io_submit: ::c_long = 5000 + 203;
-pub const SYS_io_cancel: ::c_long = 5000 + 204;
-pub const SYS_exit_group: ::c_long = 5000 + 205;
-pub const SYS_lookup_dcookie: ::c_long = 5000 + 206;
-pub const SYS_epoll_create: ::c_long = 5000 + 207;
-pub const SYS_epoll_ctl: ::c_long = 5000 + 208;
-pub const SYS_epoll_wait: ::c_long = 5000 + 209;
-pub const SYS_remap_file_pages: ::c_long = 5000 + 210;
-pub const SYS_rt_sigreturn: ::c_long = 5000 + 211;
-pub const SYS_set_tid_address: ::c_long = 5000 + 212;
-pub const SYS_restart_syscall: ::c_long = 5000 + 213;
-pub const SYS_semtimedop: ::c_long = 5000 + 214;
-pub const SYS_fadvise64: ::c_long = 5000 + 215;
-pub const SYS_timer_create: ::c_long = 5000 + 216;
-pub const SYS_timer_settime: ::c_long = 5000 + 217;
-pub const SYS_timer_gettime: ::c_long = 5000 + 218;
-pub const SYS_timer_getoverrun: ::c_long = 5000 + 219;
-pub const SYS_timer_delete: ::c_long = 5000 + 220;
-pub const SYS_clock_settime: ::c_long = 5000 + 221;
-pub const SYS_clock_gettime: ::c_long = 5000 + 222;
-pub const SYS_clock_getres: ::c_long = 5000 + 223;
-pub const SYS_clock_nanosleep: ::c_long = 5000 + 224;
-pub const SYS_tgkill: ::c_long = 5000 + 225;
-pub const SYS_utimes: ::c_long = 5000 + 226;
-pub const SYS_mbind: ::c_long = 5000 + 227;
-pub const SYS_get_mempolicy: ::c_long = 5000 + 228;
-pub const SYS_set_mempolicy: ::c_long = 5000 + 229;
-pub const SYS_mq_open: ::c_long = 5000 + 230;
-pub const SYS_mq_unlink: ::c_long = 5000 + 231;
-pub const SYS_mq_timedsend: ::c_long = 5000 + 232;
-pub const SYS_mq_timedreceive: ::c_long = 5000 + 233;
-pub const SYS_mq_notify: ::c_long = 5000 + 234;
-pub const SYS_mq_getsetattr: ::c_long = 5000 + 235;
-pub const SYS_vserver: ::c_long = 5000 + 236;
-pub const SYS_waitid: ::c_long = 5000 + 237;
-/* pub const SYS_sys_setaltroot: ::c_long = 5000 + 238; */
-pub const SYS_add_key: ::c_long = 5000 + 239;
-pub const SYS_request_key: ::c_long = 5000 + 240;
-pub const SYS_keyctl: ::c_long = 5000 + 241;
-pub const SYS_set_thread_area: ::c_long = 5000 + 242;
-pub const SYS_inotify_init: ::c_long = 5000 + 243;
-pub const SYS_inotify_add_watch: ::c_long = 5000 + 244;
-pub const SYS_inotify_rm_watch: ::c_long = 5000 + 245;
-pub const SYS_migrate_pages: ::c_long = 5000 + 246;
-pub const SYS_openat: ::c_long = 5000 + 247;
-pub const SYS_mkdirat: ::c_long = 5000 + 248;
-pub const SYS_mknodat: ::c_long = 5000 + 249;
-pub const SYS_fchownat: ::c_long = 5000 + 250;
-pub const SYS_futimesat: ::c_long = 5000 + 251;
-pub const SYS_newfstatat: ::c_long = 5000 + 252;
-pub const SYS_unlinkat: ::c_long = 5000 + 253;
-pub const SYS_renameat: ::c_long = 5000 + 254;
-pub const SYS_linkat: ::c_long = 5000 + 255;
-pub const SYS_symlinkat: ::c_long = 5000 + 256;
-pub const SYS_readlinkat: ::c_long = 5000 + 257;
-pub const SYS_fchmodat: ::c_long = 5000 + 258;
-pub const SYS_faccessat: ::c_long = 5000 + 259;
-pub const SYS_pselect6: ::c_long = 5000 + 260;
-pub const SYS_ppoll: ::c_long = 5000 + 261;
-pub const SYS_unshare: ::c_long = 5000 + 262;
-pub const SYS_splice: ::c_long = 5000 + 263;
-pub const SYS_sync_file_range: ::c_long = 5000 + 264;
-pub const SYS_tee: ::c_long = 5000 + 265;
-pub const SYS_vmsplice: ::c_long = 5000 + 266;
-pub const SYS_move_pages: ::c_long = 5000 + 267;
-pub const SYS_set_robust_list: ::c_long = 5000 + 268;
-pub const SYS_get_robust_list: ::c_long = 5000 + 269;
-pub const SYS_kexec_load: ::c_long = 5000 + 270;
-pub const SYS_getcpu: ::c_long = 5000 + 271;
-pub const SYS_epoll_pwait: ::c_long = 5000 + 272;
-pub const SYS_ioprio_set: ::c_long = 5000 + 273;
-pub const SYS_ioprio_get: ::c_long = 5000 + 274;
-pub const SYS_utimensat: ::c_long = 5000 + 275;
-pub const SYS_signalfd: ::c_long = 5000 + 276;
-pub const SYS_timerfd: ::c_long = 5000 + 277;
-pub const SYS_eventfd: ::c_long = 5000 + 278;
-pub const SYS_fallocate: ::c_long = 5000 + 279;
-pub const SYS_timerfd_create: ::c_long = 5000 + 280;
-pub const SYS_timerfd_gettime: ::c_long = 5000 + 281;
-pub const SYS_timerfd_settime: ::c_long = 5000 + 282;
-pub const SYS_signalfd4: ::c_long = 5000 + 283;
-pub const SYS_eventfd2: ::c_long = 5000 + 284;
-pub const SYS_epoll_create1: ::c_long = 5000 + 285;
-pub const SYS_dup3: ::c_long = 5000 + 286;
-pub const SYS_pipe2: ::c_long = 5000 + 287;
-pub const SYS_inotify_init1: ::c_long = 5000 + 288;
-pub const SYS_preadv: ::c_long = 5000 + 289;
-pub const SYS_pwritev: ::c_long = 5000 + 290;
-pub const SYS_rt_tgsigqueueinfo: ::c_long = 5000 + 291;
-pub const SYS_perf_event_open: ::c_long = 5000 + 292;
-pub const SYS_accept4: ::c_long = 5000 + 293;
-pub const SYS_recvmmsg: ::c_long = 5000 + 294;
-pub const SYS_fanotify_init: ::c_long = 5000 + 295;
-pub const SYS_fanotify_mark: ::c_long = 5000 + 296;
-pub const SYS_prlimit64: ::c_long = 5000 + 297;
-pub const SYS_name_to_handle_at: ::c_long = 5000 + 298;
-pub const SYS_open_by_handle_at: ::c_long = 5000 + 299;
-pub const SYS_clock_adjtime: ::c_long = 5000 + 300;
-pub const SYS_syncfs: ::c_long = 5000 + 301;
-pub const SYS_sendmmsg: ::c_long = 5000 + 302;
-pub const SYS_setns: ::c_long = 5000 + 303;
-pub const SYS_process_vm_readv: ::c_long = 5000 + 304;
-pub const SYS_process_vm_writev: ::c_long = 5000 + 305;
-pub const SYS_kcmp: ::c_long = 5000 + 306;
-pub const SYS_finit_module: ::c_long = 5000 + 307;
-pub const SYS_getdents64: ::c_long = 5000 + 308;
-pub const SYS_sched_setattr: ::c_long = 5000 + 309;
-pub const SYS_sched_getattr: ::c_long = 5000 + 310;
-pub const SYS_renameat2: ::c_long = 5000 + 311;
-pub const SYS_seccomp: ::c_long = 5000 + 312;
-pub const SYS_getrandom: ::c_long = 5000 + 313;
-pub const SYS_memfd_create: ::c_long = 5000 + 314;
-pub const SYS_bpf: ::c_long = 5000 + 315;
-pub const SYS_execveat: ::c_long = 5000 + 316;
-pub const SYS_userfaultfd: ::c_long = 5000 + 317;
-pub const SYS_membarrier: ::c_long = 5000 + 318;
-pub const SYS_mlock2: ::c_long = 5000 + 319;
-pub const SYS_copy_file_range: ::c_long = 5000 + 320;
-pub const SYS_preadv2: ::c_long = 5000 + 321;
-pub const SYS_pwritev2: ::c_long = 5000 + 322;
-pub const SYS_pkey_mprotect: ::c_long = 5000 + 323;
-pub const SYS_pkey_alloc: ::c_long = 5000 + 324;
-pub const SYS_pkey_free: ::c_long = 5000 + 325;
+pub const SYS_gettid: ::c_long = 5178;   // Valid for n64
--- a/third_party/rust/libc/src/unix/notbsd/linux/mips/mod.rs
+++ b/third_party/rust/libc/src/unix/notbsd/linux/mips/mod.rs
@@ -1,11 +1,8 @@
-pub type shmatt_t = ::c_ulong;
-pub type msgqnum_t = ::c_ulong;
-pub type msglen_t = ::c_ulong;
 pub type fsblkcnt_t = ::c_ulong;
 pub type fsfilcnt_t = ::c_ulong;
 pub type rlim_t = c_ulong;
 pub type __priority_which_t = ::c_uint;
 
 s! {
     pub struct glob64_t {
         pub gl_pathc: ::size_t,
@@ -23,38 +20,27 @@ s! {
     // FIXME this is actually a union
     pub struct sem_t {
         #[cfg(target_pointer_width = "32")]
         __size: [::c_char; 16],
         #[cfg(target_pointer_width = "64")]
         __size: [::c_char; 32],
         __align: [::c_long; 0],
     }
+}
 
-    pub struct termios2 {
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_line: ::cc_t,
-        pub c_cc: [::cc_t; 23],
-        pub c_ispeed: ::speed_t,
-        pub c_ospeed: ::speed_t,
-    }
-}
+pub const CLONE_NEWCGROUP: ::c_int = 0x02000000;
 
 pub const SFD_CLOEXEC: ::c_int = 0x080000;
 
 pub const NCCS: usize = 32;
 
 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 EBFONT: ::c_int = 59;
 pub const ENOSTR: ::c_int = 60;
 pub const ENODATA: ::c_int = 61;
 pub const ETIME: ::c_int = 62;
 pub const ENOSR: ::c_int = 63;
 pub const ENONET: ::c_int = 64;
 pub const ENOPKG: ::c_int = 65;
@@ -76,91 +62,17 @@ pub const EPOLL_CLOEXEC: ::c_int = 0x800
 pub const EFD_CLOEXEC: ::c_int = 0x80000;
 
 pub const BUFSIZ: ::c_uint = 8192;
 pub const TMP_MAX: ::c_uint = 238328;
 pub const FOPEN_MAX: ::c_uint = 16;
 pub const POSIX_FADV_DONTNEED: ::c_int = 4;
 pub const POSIX_FADV_NOREUSE: ::c_int = 5;
 pub const POSIX_MADV_DONTNEED: ::c_int = 4;
-pub const _SC_EQUIV_CLASS_MAX: ::c_int = 41;
-pub const _SC_CHARCLASS_NAME_MAX: ::c_int = 45;
-pub const _SC_PII: ::c_int = 53;
-pub const _SC_PII_XTI: ::c_int = 54;
-pub const _SC_PII_SOCKET: ::c_int = 55;
-pub const _SC_PII_INTERNET: ::c_int = 56;
-pub const _SC_PII_OSI: ::c_int = 57;
-pub const _SC_POLL: ::c_int = 58;
-pub const _SC_SELECT: ::c_int = 59;
-pub const _SC_PII_INTERNET_STREAM: ::c_int = 61;
-pub const _SC_PII_INTERNET_DGRAM: ::c_int = 62;
-pub const _SC_PII_OSI_COTS: ::c_int = 63;
-pub const _SC_PII_OSI_CLTS: ::c_int = 64;
-pub const _SC_PII_OSI_M: ::c_int = 65;
-pub const _SC_T_IOV_MAX: ::c_int = 66;
 pub const _SC_2_C_VERSION: ::c_int = 96;
-pub const _SC_CHAR_BIT: ::c_int = 101;
-pub const _SC_CHAR_MAX: ::c_int = 102;
-pub const _SC_CHAR_MIN: ::c_int = 103;
-pub const _SC_INT_MAX: ::c_int = 104;
-pub const _SC_INT_MIN: ::c_int = 105;
-pub const _SC_LONG_BIT: ::c_int = 106;
-pub const _SC_WORD_BIT: ::c_int = 107;
-pub const _SC_MB_LEN_MAX: ::c_int = 108;
-pub const _SC_SSIZE_MAX: ::c_int = 110;
-pub const _SC_SCHAR_MAX: ::c_int = 111;
-pub const _SC_SCHAR_MIN: ::c_int = 112;
-pub const _SC_SHRT_MAX: ::c_int = 113;
-pub const _SC_SHRT_MIN: ::c_int = 114;
-pub const _SC_UCHAR_MAX: ::c_int = 115;
-pub const _SC_UINT_MAX: ::c_int = 116;
-pub const _SC_ULONG_MAX: ::c_int = 117;
-pub const _SC_USHRT_MAX: ::c_int = 118;
-pub const _SC_NL_ARGMAX: ::c_int = 119;
-pub const _SC_NL_LANGMAX: ::c_int = 120;
-pub const _SC_NL_MSGMAX: ::c_int = 121;
-pub const _SC_NL_NMAX: ::c_int = 122;
-pub const _SC_NL_SETMAX: ::c_int = 123;
-pub const _SC_NL_TEXTMAX: ::c_int = 124;
-pub const _SC_BASE: ::c_int = 134;
-pub const _SC_C_LANG_SUPPORT: ::c_int = 135;
-pub const _SC_C_LANG_SUPPORT_R: ::c_int = 136;
-pub const _SC_DEVICE_IO: ::c_int = 140;
-pub const _SC_DEVICE_SPECIFIC: ::c_int = 141;
-pub const _SC_DEVICE_SPECIFIC_R: ::c_int = 142;
-pub const _SC_FD_MGMT: ::c_int = 143;
-pub const _SC_FIFO: ::c_int = 144;
-pub const _SC_PIPE: ::c_int = 145;
-pub const _SC_FILE_ATTRIBUTES: ::c_int = 146;
-pub const _SC_FILE_LOCKING: ::c_int = 147;
-pub const _SC_FILE_SYSTEM: ::c_int = 148;
-pub const _SC_MULTI_PROCESS: ::c_int = 150;
-pub const _SC_SINGLE_PROCESS: ::c_int = 151;
-pub const _SC_NETWORKING: ::c_int = 152;
-pub const _SC_REGEX_VERSION: ::c_int = 156;
-pub const _SC_SIGNALS: ::c_int = 158;
-pub const _SC_SYSTEM_DATABASE: ::c_int = 162;
-pub const _SC_SYSTEM_DATABASE_R: ::c_int = 163;
-pub const _SC_USER_GROUPS: ::c_int = 166;
-pub const _SC_USER_GROUPS_R: ::c_int = 167;
-pub const _SC_LEVEL1_ICACHE_SIZE: ::c_int = 185;
-pub const _SC_LEVEL1_ICACHE_ASSOC: ::c_int = 186;
-pub const _SC_LEVEL1_ICACHE_LINESIZE: ::c_int = 187;
-pub const _SC_LEVEL1_DCACHE_SIZE: ::c_int = 188;
-pub const _SC_LEVEL1_DCACHE_ASSOC: ::c_int = 189;
-pub const _SC_LEVEL1_DCACHE_LINESIZE: ::c_int = 190;
-pub const _SC_LEVEL2_CACHE_SIZE: ::c_int = 191;
-pub const _SC_LEVEL2_CACHE_ASSOC: ::c_int = 192;
-pub const _SC_LEVEL2_CACHE_LINESIZE: ::c_int = 193;
-pub const _SC_LEVEL3_CACHE_SIZE: ::c_int = 194;
-pub const _SC_LEVEL3_CACHE_ASSOC: ::c_int = 195;
-pub const _SC_LEVEL3_CACHE_LINESIZE: ::c_int = 196;
-pub const _SC_LEVEL4_CACHE_SIZE: ::c_int = 197;
-pub const _SC_LEVEL4_CACHE_ASSOC: ::c_int = 198;
-pub const _SC_LEVEL4_CACHE_LINESIZE: ::c_int = 199;
 pub const O_ACCMODE: ::c_int = 3;
 pub const O_DIRECT: ::c_int = 0x8000;
 pub const O_DIRECTORY: ::c_int = 0x10000;
 pub const O_NOFOLLOW: ::c_int = 0x20000;
 pub const ST_RELATIME: ::c_ulong = 4096;
 pub const NI_MAXHOST: ::socklen_t = 1025;
 
 pub const RLIMIT_NOFILE: ::c_int = 5;
@@ -303,18 +215,16 @@ pub const MAP_EXECUTABLE: ::c_int = 0x40
 pub const MAP_LOCKED: ::c_int = 0x8000;
 pub const MAP_POPULATE: ::c_int = 0x10000;
 pub const MAP_NONBLOCK: ::c_int = 0x20000;
 pub const MAP_STACK: ::c_int = 0x40000;
 
 pub const SOCK_STREAM: ::c_int = 2;
 pub const SOCK_DGRAM: ::c_int = 1;
 pub const SOCK_SEQPACKET: ::c_int = 5;
-pub const SOCK_DCCP: ::c_int = 6;
-pub const SOCK_PACKET: ::c_int = 10;
 
 pub const SOL_SOCKET: ::c_int = 0xffff;
 
 pub const SO_REUSEADDR: ::c_int = 0x0004;
 pub const SO_KEEPALIVE: ::c_int = 0x0008;
 pub const SO_DONTROUTE: ::c_int = 0x0010;
 pub const SO_BROADCAST: ::c_int = 0x0020;
 pub const SO_LINGER: ::c_int = 0x0080;
@@ -341,16 +251,17 @@ pub const SO_SECURITY_AUTHENTICATION: ::
 pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23;
 pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24;
 pub const SO_BINDTODEVICE: ::c_int = 25;
 pub const SO_ATTACH_FILTER: ::c_int = 26;
 pub const SO_DETACH_FILTER: ::c_int = 27;
 pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
 pub const SO_PEERNAME: ::c_int = 28;
 pub const SO_TIMESTAMP: ::c_int = 29;
+pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP;
 pub const SO_PEERSEC: ::c_int = 30;
 pub const SO_SNDBUFFORCE: ::c_int = 31;
 pub const SO_RCVBUFFORCE: ::c_int = 33;
 pub const SO_PASSSEC: ::c_int = 34;
 pub const SO_TIMESTAMPNS: ::c_int = 35;
 pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
 pub const SO_MARK: ::c_int = 36;
 pub const SO_TIMESTAMPING: ::c_int = 37;
@@ -364,37 +275,16 @@ pub const SO_LOCK_FILTER: ::c_int = 44;
 pub const SO_SELECT_ERR_QUEUE: ::c_int = 45;
 pub const SO_BUSY_POLL: ::c_int = 46;
 pub const SO_MAX_PACING_RATE: ::c_int = 47;
 pub const SO_BPF_EXTENSIONS: ::c_int = 48;
 pub const SO_INCOMING_CPU: ::c_int = 49;
 pub const SO_ATTACH_BPF: ::c_int = 50;
 pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER;
 
-/* DCCP socket options */
-pub const DCCP_SOCKOPT_PACKET_SIZE: ::c_int = 1;
-pub const DCCP_SOCKOPT_SERVICE: ::c_int = 2;
-pub const DCCP_SOCKOPT_CHANGE_L: ::c_int = 3;
-pub const DCCP_SOCKOPT_CHANGE_R: ::c_int = 4;
-pub const DCCP_SOCKOPT_GET_CUR_MPS: ::c_int = 5;
-pub const DCCP_SOCKOPT_SERVER_TIMEWAIT: ::c_int = 6;
-pub const DCCP_SOCKOPT_SEND_CSCOV: ::c_int = 10;
-pub const DCCP_SOCKOPT_RECV_CSCOV: ::c_int = 11;
-pub const DCCP_SOCKOPT_AVAILABLE_CCIDS: ::c_int = 12;
-pub const DCCP_SOCKOPT_CCID: ::c_int = 13;
-pub const DCCP_SOCKOPT_TX_CCID: ::c_int = 14;
-pub const DCCP_SOCKOPT_RX_CCID: ::c_int = 15;
-pub const DCCP_SOCKOPT_QPOLICY_ID: ::c_int = 16;
-pub const DCCP_SOCKOPT_QPOLICY_TXQLEN: ::c_int = 17;
-pub const DCCP_SOCKOPT_CCID_RX_INFO: ::c_int = 128;
-pub const DCCP_SOCKOPT_CCID_TX_INFO: ::c_int = 192;
-
-/// maximum number of services provided on the same listening port
-pub const DCCP_SERVICE_LIST_MAX_LEN: ::c_int = 32;
-
 pub const FIOCLEX: ::c_ulong = 0x6601;
 pub const FIONBIO: ::c_ulong = 0x667e;
 
 pub const SA_ONSTACK: ::c_int = 0x08000000;
 pub const SA_SIGINFO: ::c_int = 0x00000008;
 pub const SA_NOCLDWAIT: ::c_int = 0x00010000;
 
 pub const SIGCHLD: ::c_int = 18;
@@ -415,17 +305,19 @@ pub const SIGURG: ::c_int = 21;
 pub const SIGIO: ::c_int = 22;
 pub const SIGSYS: ::c_int = 12;
 pub const SIGPOLL: ::c_int = 22;
 pub const SIGPWR: ::c_int = 19;
 pub const SIG_SETMASK: ::c_int = 3;
 pub const SIG_BLOCK: ::c_int = 0x1;
 pub const SIG_UNBLOCK: ::c_int = 0x2;
 
+pub const POLLRDNORM: ::c_short = 0x040;
 pub const POLLWRNORM: ::c_short = 0x004;
+pub const POLLRDBAND: ::c_short = 0x080;
 pub const POLLWRBAND: ::c_short = 0x100;
 
 pub const PTHREAD_STACK_MIN: ::size_t = 131072;
 
 pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;
 pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff;
 pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245;
 pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45;
@@ -593,27 +485,16 @@ pub const ECHOE: ::tcflag_t = 0x00000010
 pub const ECHOK: ::tcflag_t = 0x00000020;
 pub const ECHONL: ::tcflag_t = 0x00000040;
 pub const ECHOPRT: ::tcflag_t = 0x00000400;
 pub const ECHOCTL: ::tcflag_t = 0x00000200;
 pub const ISIG: ::tcflag_t = 0x00000001;
 pub const ICANON: ::tcflag_t = 0x00000002;
 pub const PENDIN: ::tcflag_t = 0x00004000;
 pub const NOFLSH: ::tcflag_t = 0x00000080;
-pub const CIBAUD: ::tcflag_t = 0o02003600000;
-pub const CBAUDEX: ::tcflag_t = 0o010000;
-pub const VSWTC: usize = 7;
-pub const OLCUC:  ::tcflag_t = 0o000002;
-pub const NLDLY:  ::tcflag_t = 0o000400;
-pub const CRDLY:  ::tcflag_t = 0o003000;
-pub const TABDLY: ::tcflag_t = 0o014000;
-pub const BSDLY:  ::tcflag_t = 0o020000;
-pub const FFDLY:  ::tcflag_t = 0o100000;
-pub const VTDLY:  ::tcflag_t = 0o040000;
-pub const XTABS:  ::tcflag_t = 0o014000;
 
 pub const B0: ::speed_t = 0o000000;
 pub const B50: ::speed_t = 0o000001;
 pub const B75: ::speed_t = 0o000002;
 pub const B110: ::speed_t = 0o000003;
 pub const B134: ::speed_t = 0o000004;
 pub const B150: ::speed_t = 0o000005;
 pub const B200: ::speed_t = 0o000006;
@@ -623,54 +504,32 @@ pub const B1200: ::speed_t = 0o000011;
 pub const B1800: ::speed_t = 0o000012;
 pub const B2400: ::speed_t = 0o000013;
 pub const B4800: ::speed_t = 0o000014;
 pub const B9600: ::speed_t = 0o000015;
 pub const B19200: ::speed_t = 0o000016;
 pub const B38400: ::speed_t = 0o000017;
 pub const EXTA: ::speed_t = B19200;
 pub const EXTB: ::speed_t = B38400;
-pub const BOTHER: ::speed_t = 0o010000;
 pub const B57600: ::speed_t = 0o010001;
 pub const B115200: ::speed_t = 0o010002;
 pub const B230400: ::speed_t = 0o010003;
 pub const B460800: ::speed_t = 0o010004;
 pub const B500000: ::speed_t = 0o010005;
 pub const B576000: ::speed_t = 0o010006;
 pub const B921600: ::speed_t = 0o010007;
 pub const B1000000: ::speed_t = 0o010010;
 pub const B1152000: ::speed_t = 0o010011;
 pub const B1500000: ::speed_t = 0o010012;
 pub const B2000000: ::speed_t = 0o010013;
 pub const B2500000: ::speed_t = 0o010014;
 pub const B3000000: ::speed_t = 0o010015;
 pub const B3500000: ::speed_t = 0o010016;
 pub const B4000000: ::speed_t = 0o010017;
 
-pub const TIOCM_LE: ::c_int = 0x001;
-pub const TIOCM_DTR: ::c_int = 0x002;
-pub const TIOCM_RTS: ::c_int = 0x004;
-pub const TIOCM_ST: ::c_int = 0x010;
-pub const TIOCM_SR: ::c_int = 0x020;
-pub const TIOCM_CTS: ::c_int = 0x040;
-pub const TIOCM_CAR: ::c_int = 0x100;
-pub const TIOCM_CD: ::c_int = TIOCM_CAR;
-pub const TIOCM_RNG: ::c_int = 0x200;
-pub const TIOCM_RI: ::c_int = TIOCM_RNG;
-pub const TIOCM_DSR: ::c_int = 0x400;
-
-pub const EHWPOISON: ::c_int = 168;
-pub const SIGEV_THREAD_ID: ::c_int = 4;
-pub const EPOLLWAKEUP: ::c_int = 0x20000000;
-
-#[doc(hidden)]
-pub const AF_MAX: ::c_int = 42;
-#[doc(hidden)]
-pub const PF_MAX: ::c_int = AF_MAX;
-
 #[link(name = "util")]
 extern {
     pub fn sysctl(name: *mut ::c_int,
                   namelen: ::c_int,
                   oldp: *mut ::c_void,
                   oldlenp: *mut ::size_t,
                   newp: *mut ::c_void,
                   newlen: ::size_t)
--- a/third_party/rust/libc/src/unix/notbsd/linux/mod.rs
+++ b/third_party/rust/libc/src/unix/notbsd/linux/mod.rs
@@ -6,27 +6,23 @@ pub type useconds_t = u32;
 pub type dev_t = u64;
 pub type socklen_t = u32;
 pub type pthread_t = c_ulong;
 pub type mode_t = u32;
 pub type ino64_t = u64;
 pub type off64_t = i64;
 pub type blkcnt64_t = i64;
 pub type rlim64_t = u64;
+pub type shmatt_t = ::c_ulong;
 pub type mqd_t = ::c_int;
+pub type msgqnum_t = ::c_ulong;
+pub type msglen_t = ::c_ulong;
 pub type nfds_t = ::c_ulong;
 pub type nl_item = ::c_int;
 pub type idtype_t = ::c_uint;
-pub type loff_t = ::c_longlong;
-
-pub type __u8 = ::c_uchar;
-pub type __u16 = ::c_ushort;
-pub type __s16 = ::c_short;
-pub type __u32 = ::c_uint;
-pub type __s32 = ::c_int;
 
 pub enum fpos64_t {} // TODO: fill this out with a struct
 
 s! {
     pub struct dirent {
         pub d_ino: ::ino_t,
         pub d_off: ::off_t,
         pub d_reclen: ::c_ushort,
@@ -66,71 +62,47 @@ s! {
         pub ifa_flags: ::c_uint,
         pub ifa_addr: *mut ::sockaddr,
         pub ifa_netmask: *mut ::sockaddr,
         pub ifa_ifu: *mut ::sockaddr, // FIXME This should be a union
         pub ifa_data: *mut ::c_void
     }
 
     pub struct pthread_mutex_t {
-        #[cfg(any(target_arch = "mips",
-                  target_arch = "arm",
-                  target_arch = "powerpc",
-                  all(target_arch = "x86_64",
-                      target_pointer_width = "32")))]
+        #[cfg(any(target_arch = "mips", target_arch = "arm",
+                  target_arch = "powerpc"))]
         __align: [::c_long; 0],
-        #[cfg(not(any(target_arch = "mips",
-                      target_arch = "arm",
-                      target_arch = "powerpc",
-                      all(target_arch = "x86_64",
-                          target_pointer_width = "32"))))]
+        #[cfg(not(any(target_arch = "mips", target_arch = "arm",
+                      target_arch = "powerpc")))]
         __align: [::c_longlong; 0],
         size: [u8; __SIZEOF_PTHREAD_MUTEX_T],
     }
 
     pub struct pthread_rwlock_t {
-        #[cfg(any(target_arch = "mips",
-                  target_arch = "arm",
-                  target_arch = "powerpc",
-                  all(target_arch = "x86_64",
-                      target_pointer_width = "32")))]
+        #[cfg(any(target_arch = "mips", target_arch = "arm",
+                  target_arch = "powerpc"))]
         __align: [::c_long; 0],
-        #[cfg(not(any(target_arch = "mips",
-                      target_arch = "arm",
-                      target_arch = "powerpc",
-                      all(target_arch = "x86_64",
-                          target_pointer_width = "32"))))]
+        #[cfg(not(any(target_arch = "mips", target_arch = "arm",
+                      target_arch = "powerpc")))]
         __align: [::c_longlong; 0],
         size: [u8; __SIZEOF_PTHREAD_RWLOCK_T],
     }
 
     pub struct pthread_mutexattr_t {
         #[cfg(any(target_arch = "x86_64", target_arch = "powerpc64",
                   target_arch = "mips64", target_arch = "s390x",
                   target_arch = "sparc64"))]
         __align: [::c_int; 0],
         #[cfg(not(any(target_arch = "x86_64", target_arch = "powerpc64",
                       target_arch = "mips64", target_arch = "s390x",
-                      target_arch = "sparc64", target_arch = "aarch64")))]
+                      target_arch = "sparc64")))]
         __align: [::c_long; 0],
-        #[cfg(all(target_arch = "aarch64", target_env = "gnu"))]
-        __align: [::c_long; 0],
-        #[cfg(all(target_arch = "aarch64", target_env = "musl"))]
-        __align: [::c_int; 0],
         size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T],
     }
 
-    pub struct pthread_rwlockattr_t {
-        #[cfg(any(target_env = "musl"))]
-        __align: [::c_int; 0],
-        #[cfg(not(any(target_env = "musl")))]
-        __align: [::c_long; 0],
-        size: [u8; __SIZEOF_PTHREAD_RWLOCKATTR_T],
-    }
-
     pub struct pthread_cond_t {
         #[cfg(any(target_env = "musl"))]
         __align: [*const ::c_void; 0],
         #[cfg(not(any(target_env = "musl")))]
         __align: [::c_longlong; 0],
         size: [u8; __SIZEOF_PTHREAD_COND_T],
     }
 
@@ -167,17 +139,17 @@ s! {
         pub f_blocks: ::fsblkcnt_t,
         pub f_bfree: ::fsblkcnt_t,
         pub f_bavail: ::fsblkcnt_t,
         pub f_files: ::fsfilcnt_t,
         pub f_ffree: ::fsfilcnt_t,
         pub f_favail: ::fsfilcnt_t,
         #[cfg(target_endian = "little")]
         pub f_fsid: ::c_ulong,
-        #[cfg(all(target_pointer_width = "32", not(target_arch = "x86_64")))]
+        #[cfg(target_pointer_width = "32")]
         __f_unused: ::c_int,
         #[cfg(target_endian = "big")]
         pub f_fsid: ::c_ulong,
         pub f_flag: ::c_ulong,
         pub f_namemax: ::c_ulong,
         __f_spare: [::c_int; 6],
     }
 
@@ -208,57 +180,32 @@ s! {
         pub ssi_int: ::int32_t,
         pub ssi_ptr: ::uint64_t,
         pub ssi_utime: ::uint64_t,
         pub ssi_stime: ::uint64_t,
         pub ssi_addr: ::uint64_t,
         _pad: [::uint8_t; 48],
     }
 
-    pub struct itimerspec {
-        pub it_interval: ::timespec,
-        pub it_value: ::timespec,
-    }
-
     pub struct fsid_t {
         __val: [::c_int; 2],
     }
 
-    // x32 compatibility
-    // See https://sourceware.org/bugzilla/show_bug.cgi?id=21279
     pub struct mq_attr {
-        #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
-        pub mq_flags: i64,
-        #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
-        pub mq_maxmsg: i64,
-        #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
-        pub mq_msgsize: i64,
-        #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
-        pub mq_curmsgs: i64,
-        #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
-        pad: [i64; 4],
-
-        #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
         pub mq_flags: ::c_long,
-        #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
         pub mq_maxmsg: ::c_long,
-        #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
         pub mq_msgsize: ::c_long,
-        #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
         pub mq_curmsgs: ::c_long,
-        #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
-        pad: [::c_long; 4],
+        pad: [::c_long; 4]
     }
 
     pub struct cpu_set_t {
-        #[cfg(all(target_pointer_width = "32",
-                  not(target_arch = "x86_64")))]
+        #[cfg(target_pointer_width = "32")]
         bits: [u32; 32],
-        #[cfg(not(all(target_pointer_width = "32",
-                      not(target_arch = "x86_64"))))]
+        #[cfg(target_pointer_width = "64")]
         bits: [u64; 16],
     }
 
     pub struct if_nameindex {
         pub if_index: ::c_uint,
         pub if_name: *mut ::c_char,
     }
 
@@ -279,123 +226,16 @@ s! {
         pub msg_len: ::c_uint,
     }
 
     pub struct sembuf {
         pub sem_num: ::c_ushort,
         pub sem_op: ::c_short,
         pub sem_flg: ::c_short,
     }
-
-    pub struct input_event {
-        pub time: ::timeval,
-        pub type_: ::__u16,
-        pub code: ::__u16,
-        pub value: ::__s32,
-    }
-
-    pub struct input_id {
-        pub bustype: ::__u16,
-        pub vendor: ::__u16,
-        pub product: ::__u16,
-        pub version: ::__u16,
-    }
-
-    pub struct input_absinfo {
-        pub value: ::__s32,
-        pub minimum: ::__s32,
-        pub maximum: ::__s32,
-        pub fuzz: ::__s32,
-        pub flat: ::__s32,
-        pub resolution: ::__s32,
-    }
-
-    pub struct input_keymap_entry {
-        pub flags: ::__u8,
-        pub len: ::__u8,
-        pub index: ::__u16,
-        pub keycode: ::__u32,
-        pub scancode: [::__u8; 32],
-    }
-
-    pub struct input_mask {
-        pub type_: ::__u32,
-        pub codes_size: ::__u32,
-        pub codes_ptr: ::__u64,
-    }
-
-    pub struct ff_replay {
-        pub length: ::__u16,
-        pub delay: ::__u16,
-    }
-
-    pub struct ff_trigger {
-        pub button: ::__u16,
-        pub interval: ::__u16,
-    }
-
-    pub struct ff_envelope {
-        pub attack_length: ::__u16,
-        pub attack_level: ::__u16,
-        pub fade_length: ::__u16,
-        pub fade_level: ::__u16,
-    }
-
-    pub struct ff_constant_effect {
-        pub level: ::__s16,
-        pub envelope: ff_envelope,
-    }
-
-    pub struct ff_ramp_effect {
-        pub start_level: ::__s16,
-        pub end_level: ::__s16,
-        pub envelope: ff_envelope,
-    }
-
-    pub struct ff_condition_effect {
-        pub right_saturation: ::__u16,
-        pub left_saturation: ::__u16,
-
-        pub right_coeff: ::__s16,
-        pub left_coeff: ::__s16,
-
-        pub deadband: ::__u16,
-        pub center: ::__s16,
-    }
-
-    pub struct ff_periodic_effect {
-        pub waveform: ::__u16,
-        pub period: ::__u16,
-        pub magnitude: ::__s16,
-        pub offset: ::__s16,
-        pub phase: ::__u16,
-
-        pub envelope: ff_envelope,
-
-        pub custom_len: ::__u32,
-        pub custom_data: *mut ::__s16,
-    }
-
-    pub struct ff_rumble_effect {
-        pub strong_magnitude: ::__u16,
-        pub weak_magnitude: ::__u16,
-    }
-
-    pub struct ff_effect {
-        pub type_: ::__u16,
-        pub id: ::__s16,
-        pub direction: ::__u16,
-        pub trigger: ff_trigger,
-        pub replay: ff_replay,
-        // FIXME this is actually a union
-        #[cfg(target_pointer_width = "64")]
-        pub u: [u64; 4],
-        #[cfg(target_pointer_width = "32")]
-        pub u: [u32; 7],
-    }
 }
 
 pub const ABDAY_1: ::nl_item = 0x20000;
 pub const ABDAY_2: ::nl_item = 0x20001;
 pub const ABDAY_3: ::nl_item = 0x20002;
 pub const ABDAY_4: ::nl_item = 0x20003;
 pub const ABDAY_5: ::nl_item = 0x20004;
 pub const ABDAY_6: ::nl_item = 0x20005;
@@ -470,28 +310,16 @@ pub const _PC_LINK_MAX: ::c_int = 0;
 pub const _PC_MAX_CANON: ::c_int = 1;
 pub const _PC_MAX_INPUT: ::c_int = 2;
 pub const _PC_NAME_MAX: ::c_int = 3;
 pub const _PC_PATH_MAX: ::c_int = 4;
 pub const _PC_PIPE_BUF: ::c_int = 5;
 pub const _PC_CHOWN_RESTRICTED: ::c_int = 6;
 pub const _PC_NO_TRUNC: ::c_int = 7;
 pub const _PC_VDISABLE: ::c_int = 8;
-pub const _PC_SYNC_IO: ::c_int = 9;
-pub const _PC_ASYNC_IO: ::c_int = 10;
-pub const _PC_PRIO_IO: ::c_int = 11;
-pub const _PC_SOCK_MAXBUF: ::c_int = 12;
-pub const _PC_FILESIZEBITS: ::c_int = 13;
-pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 14;
-pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 15;
-pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 16;
-pub const _PC_REC_XFER_ALIGN: ::c_int = 17;
-pub const _PC_ALLOC_SIZE_MIN: ::c_int = 18;
-pub const _PC_SYMLINK_MAX: ::c_int = 19;
-pub const _PC_2_SYMLINKS: ::c_int = 20;
 
 pub const _SC_ARG_MAX: ::c_int = 0;
 pub const _SC_CHILD_MAX: ::c_int = 1;
 pub const _SC_CLK_TCK: ::c_int = 2;
 pub const _SC_NGROUPS_MAX: ::c_int = 3;
 pub const _SC_OPEN_MAX: ::c_int = 4;
 pub const _SC_STREAM_MAX: ::c_int = 5;
 pub const _SC_TZNAME_MAX: ::c_int = 6;
@@ -535,105 +363,50 @@ pub const _SC_LINE_MAX: ::c_int = 43;
 pub const _SC_RE_DUP_MAX: ::c_int = 44;
 pub const _SC_2_VERSION: ::c_int = 46;
 pub const _SC_2_C_BIND: ::c_int = 47;
 pub const _SC_2_C_DEV: ::c_int = 48;
 pub const _SC_2_FORT_DEV: ::c_int = 49;
 pub const _SC_2_FORT_RUN: ::c_int = 50;
 pub const _SC_2_SW_DEV: ::c_int = 51;
 pub const _SC_2_LOCALEDEF: ::c_int = 52;
-pub const _SC_UIO_MAXIOV: ::c_int = 60;
 pub const _SC_IOV_MAX: ::c_int = 60;
 pub const _SC_THREADS: ::c_int = 67;
 pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 68;
 pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 69;
 pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 70;
 pub const _SC_LOGIN_NAME_MAX: ::c_int = 71;
 pub const _SC_TTY_NAME_MAX: ::c_int = 72;
 pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 73;
 pub const _SC_THREAD_KEYS_MAX: ::c_int = 74;
 pub const _SC_THREAD_STACK_MIN: ::c_int = 75;
 pub const _SC_THREAD_THREADS_MAX: ::c_int = 76;
 pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 77;
 pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 78;
 pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 79;
 pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 80;
 pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 81;
-pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 82;
 pub const _SC_NPROCESSORS_CONF: ::c_int = 83;
 pub const _SC_NPROCESSORS_ONLN: ::c_int = 84;
-pub const _SC_PHYS_PAGES: ::c_int = 85;
-pub const _SC_AVPHYS_PAGES: ::c_int = 86;
 pub const _SC_ATEXIT_MAX: ::c_int = 87;
-pub const _SC_PASS_MAX: ::c_int = 88;
 pub const _SC_XOPEN_VERSION: ::c_int = 89;
 pub const _SC_XOPEN_XCU_VERSION: ::c_int = 90;
 pub const _SC_XOPEN_UNIX: ::c_int = 91;
 pub const _SC_XOPEN_CRYPT: ::c_int = 92;
 pub const _SC_XOPEN_ENH_I18N: ::c_int = 93;
 pub const _SC_XOPEN_SHM: ::c_int = 94;
 pub const _SC_2_CHAR_TERM: ::c_int = 95;
 pub const _SC_2_UPE: ::c_int = 97;
-pub const _SC_XOPEN_XPG2: ::c_int = 98;
-pub const _SC_XOPEN_XPG3: ::c_int = 99;
-pub const _SC_XOPEN_XPG4: ::c_int = 100;
-pub const _SC_NZERO: ::c_int = 109;
 pub const _SC_XBS5_ILP32_OFF32: ::c_int = 125;
 pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 126;
-pub const _SC_XBS5_LP64_OFF64: ::c_int = 127;
 pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 128;
 pub const _SC_XOPEN_LEGACY: ::c_int = 129;
 pub const _SC_XOPEN_REALTIME: ::c_int = 130;
 pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 131;
-pub const _SC_ADVISORY_INFO: ::c_int = 132;
-pub const _SC_BARRIERS: ::c_int = 133;
-pub const _SC_CLOCK_SELECTION: ::c_int = 137;
-pub const _SC_CPUTIME: ::c_int = 138;
-pub const _SC_THREAD_CPUTIME: ::c_int = 139;
-pub const _SC_MONOTONIC_CLOCK: ::c_int = 149;
-pub const _SC_READER_WRITER_LOCKS: ::c_int = 153;
-pub const _SC_SPIN_LOCKS: ::c_int = 154;
-pub const _SC_REGEXP: ::c_int = 155;
-pub const _SC_SHELL: ::c_int = 157;
-pub const _SC_SPAWN: ::c_int = 159;
-pub const _SC_SPORADIC_SERVER: ::c_int = 160;
-pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 161;
-pub const _SC_TIMEOUTS: ::c_int = 164;
-pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 165;
-pub const _SC_2_PBS: ::c_int = 168;
-pub const _SC_2_PBS_ACCOUNTING: ::c_int = 169;
-pub const _SC_2_PBS_LOCATE: ::c_int = 170;
-pub const _SC_2_PBS_MESSAGE: ::c_int = 171;
-pub const _SC_2_PBS_TRACK: ::c_int = 172;
-pub const _SC_SYMLOOP_MAX: ::c_int = 173;
-pub const _SC_STREAMS: ::c_int = 174;
-pub const _SC_2_PBS_CHECKPOINT: ::c_int = 175;
-pub const _SC_V6_ILP32_OFF32: ::c_int = 176;
-pub const _SC_V6_ILP32_OFFBIG: ::c_int = 177;
-pub const _SC_V6_LP64_OFF64: ::c_int = 178;
-pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 179;
 pub const _SC_HOST_NAME_MAX: ::c_int = 180;
-pub const _SC_TRACE: ::c_int = 181;
-pub const _SC_TRACE_EVENT_FILTER: ::c_int = 182;
-pub const _SC_TRACE_INHERIT: ::c_int = 183;
-pub const _SC_TRACE_LOG: ::c_int = 184;
-pub const _SC_IPV6: ::c_int = 235;
-pub const _SC_RAW_SOCKETS: ::c_int = 236;
-pub const _SC_V7_ILP32_OFF32: ::c_int = 237;
-pub const _SC_V7_ILP32_OFFBIG: ::c_int = 238;
-pub const _SC_V7_LP64_OFF64: ::c_int = 239;
-pub const _SC_V7_LPBIG_OFFBIG: ::c_int = 240;
-pub const _SC_SS_REPL_MAX: ::c_int = 241;
-pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 242;
-pub const _SC_TRACE_NAME_MAX: ::c_int = 243;
-pub const _SC_TRACE_SYS_MAX: ::c_int = 244;
-pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 245;
-pub const _SC_XOPEN_STREAMS: ::c_int = 246;
-pub const _SC_THREAD_ROBUST_PRIO_INHERIT: ::c_int = 247;
-pub const _SC_THREAD_ROBUST_PRIO_PROTECT: ::c_int = 248;
 
 pub const RLIM_SAVED_MAX: ::rlim_t = RLIM_INFINITY;
 pub const RLIM_SAVED_CUR: ::rlim_t = RLIM_INFINITY;
 
 pub const GLOB_ERR: ::c_int = 1 << 0;
 pub const GLOB_MARK: ::c_int = 1 << 1;
 pub const GLOB_NOSORT: ::c_int = 1 << 2;
 pub const GLOB_DOOFFS: ::c_int = 1 << 3;
@@ -654,20 +427,16 @@ pub const S_IEXEC: mode_t = 64;
 pub const S_IWRITE: mode_t = 128;
 pub const S_IREAD: mode_t = 256;
 
 pub const F_LOCK: ::c_int = 1;
 pub const F_TEST: ::c_int = 3;
 pub const F_TLOCK: ::c_int = 2;
 pub const F_ULOCK: ::c_int = 0;
 
-pub const IFF_LOWER_UP: ::c_int = 0x10000;
-pub const IFF_DORMANT: ::c_int = 0x20000;
-pub const IFF_ECHO: ::c_int = 0x40000;
-
 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_WRITE: ::c_ulong = 128;
 pub const ST_APPEND: ::c_ulong = 256;
@@ -693,96 +462,36 @@ pub const PTHREAD_COND_INITIALIZER: pthr
 pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
     __align: [],
     size: [0; __SIZEOF_PTHREAD_RWLOCK_T],
 };
 pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
 pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
 pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
 pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
-pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 0;
-pub const PTHREAD_PROCESS_SHARED: ::c_int = 1;
 pub const __SIZEOF_PTHREAD_COND_T: usize = 48;
 
-pub const RENAME_NOREPLACE: ::c_int = 1;
-pub const RENAME_EXCHANGE: ::c_int = 2;
-pub const RENAME_WHITEOUT: ::c_int = 4;
-
 pub const SCHED_OTHER: ::c_int = 0;
 pub const SCHED_FIFO: ::c_int = 1;
 pub const SCHED_RR: ::c_int = 2;
 pub const SCHED_BATCH: ::c_int = 3;
 pub const SCHED_IDLE: ::c_int = 5;
 
-// netinet/in.h
-// NOTE: These are in addition to the constants defined in src/unix/mod.rs
-
-// IPPROTO_IP defined in src/unix/mod.rs
-/// Hop-by-hop option header
-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;
-/// for compatibility
-pub const IPPROTO_IPIP: ::c_int = 4;
-// IPPROTO_TCP defined in src/unix/mod.rs
-/// exterior gateway protocol
-pub const IPPROTO_EGP: ::c_int = 8;
-/// pup
-pub const IPPROTO_PUP: ::c_int = 12;
-// IPPROTO_UDP defined in src/unix/mod.rs
-/// xns idp
-pub const IPPROTO_IDP: ::c_int = 22;
-/// tp-4 w/ class negotiation
-pub const IPPROTO_TP: ::c_int = 29;
-/// DCCP
-pub const IPPROTO_DCCP: ::c_int = 33;
-// IPPROTO_IPV6 defined in src/unix/mod.rs
-/// IP6 routing header
-pub const IPPROTO_ROUTING: ::c_int = 43;
-/// IP6 fragmentation header
-pub const IPPROTO_FRAGMENT: ::c_int = 44;
-/// resource reservation
-pub const IPPROTO_RSVP: ::c_int = 46;
-/// General Routing Encap.
-pub const IPPROTO_GRE: ::c_int = 47;
-/// IP6 Encap Sec. Payload
-pub const IPPROTO_ESP: ::c_int = 50;
-/// IP6 Auth Header
-pub const IPPROTO_AH: ::c_int = 51;
-// IPPROTO_ICMPV6 defined in src/unix/mod.rs
-/// IP6 no next header
-pub const IPPROTO_NONE: ::c_int = 59;
-/// IP6 destination option
-pub const IPPROTO_DSTOPTS: ::c_int = 60;
-pub const IPPROTO_MTP: ::c_int = 92;
-pub const IPPROTO_BEETPH: ::c_int = 94;
-/// encapsulation header
-pub const IPPROTO_ENCAP: ::c_int = 98;
-/// Protocol indep. multicast
-pub const IPPROTO_PIM: ::c_int = 103;
-/// IP Payload Comp. Protocol
-pub const IPPROTO_COMP: ::c_int = 108;
-/// SCTP
-pub const IPPROTO_SCTP: ::c_int = 132;
-pub const IPPROTO_MH: ::c_int = 135;
-pub const IPPROTO_UDPLITE: ::c_int = 136;
-pub const IPPROTO_MPLS: ::c_int = 137;
-/// raw IP packet
-pub const IPPROTO_RAW: ::c_int = 255;
-pub const IPPROTO_MAX: ::c_int = 256;
-
 pub const AF_IB: ::c_int = 27;
 pub const AF_MPLS: ::c_int = 28;
 pub const AF_NFC: ::c_int = 39;
 pub const AF_VSOCK: ::c_int = 40;
+#[doc(hidden)]
+pub const AF_MAX: ::c_int = 42;
 pub const PF_IB: ::c_int = AF_IB;
 pub const PF_MPLS: ::c_int = AF_MPLS;
 pub const PF_NFC: ::c_int = AF_NFC;
 pub const PF_VSOCK: ::c_int = AF_VSOCK;
+#[doc(hidden)]
+pub const PF_MAX: ::c_int = AF_MAX;
 
 // System V IPC
 pub const IPC_PRIVATE: ::key_t = 0;
 
 pub const IPC_CREAT: ::c_int = 0o1000;
 pub const IPC_EXCL: ::c_int = 0o2000;
 pub const IPC_NOWAIT: ::c_int = 0o4000;
 
@@ -812,17 +521,16 @@ pub const SHM_HUGETLB: ::c_int = 0o4000;
 pub const SHM_NORESERVE: ::c_int = 0o10000;
 
 pub const EPOLLRDHUP: ::c_int = 0x2000;
 pub const EPOLLEXCLUSIVE: ::c_int = 0x10000000;
 pub const EPOLLONESHOT: ::c_int = 0x40000000;
 
 pub const QFMT_VFS_OLD: ::c_int = 1;
 pub const QFMT_VFS_V0: ::c_int = 2;
-pub const QFMT_VFS_V1: ::c_int = 4;
 
 pub const EFD_SEMAPHORE: ::c_int = 0x1;
 
 pub const LOG_NFACILITIES: ::c_int = 24;
 
 pub const SEM_FAILED: *mut ::sem_t = 0 as *mut sem_t;
 
 pub const RB_AUTOBOOT: ::c_int = 0x01234567u32 as i32;
@@ -995,42 +703,24 @@ pub const PR_CAP_AMBIENT_IS_SET: ::c_int
 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 ITIMER_REAL: ::c_int = 0;
 pub const ITIMER_VIRTUAL: ::c_int = 1;
 pub const ITIMER_PROF: ::c_int = 2;
 
-pub const TFD_CLOEXEC: ::c_int = O_CLOEXEC;
-pub const TFD_NONBLOCK: ::c_int = O_NONBLOCK;
-pub const TFD_TIMER_ABSTIME: ::c_int = 1;
-
 pub const XATTR_CREATE: ::c_int = 0x1;
 pub const XATTR_REPLACE: ::c_int = 0x2;
 
-pub const _POSIX_VDISABLE: ::cc_t = 0;
-
-pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01;
-pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02;
-pub const FALLOC_FL_COLLAPSE_RANGE: ::c_int = 0x08;
-pub const FALLOC_FL_ZERO_RANGE: ::c_int = 0x10;
-pub const FALLOC_FL_INSERT_RANGE: ::c_int = 0x20;
-pub const FALLOC_FL_UNSHARE_RANGE: ::c_int = 0x40;
-
 // On Linux, libc doesn't define this constant, libattr does instead.
 // We still define it for Linux as it's defined by libc on other platforms,
 // and it's mentioned in the man pages for getxattr and setxattr.
 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;
-
 f! {
     pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
         for slot in cpuset.bits.iter_mut() {
             *slot = 0;
         }
     }
 
     pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () {
@@ -1061,17 +751,17 @@ f! {
         let mut major = 0;
         major |= (dev & 0x00000000000fff00) >> 8;
         major |= (dev & 0xfffff00000000000) >> 32;
         major as ::c_uint
     }
 
     pub fn minor(dev: ::dev_t) -> ::c_uint {
         let mut minor = 0;
-        minor |= (dev & 0x00000000000000ff) >> 0;
+        minor |= (dev & 0xfffff00000000000) >> 0;
         minor |= (dev & 0x00000ffffff00000) >> 12;
         minor as ::c_uint
     }
 
     pub fn makedev(major: ::c_uint, minor: ::c_uint) -> ::dev_t {
         let major = major as ::dev_t;
         let minor = minor as ::dev_t;
         let mut dev = 0;
@@ -1093,17 +783,16 @@ extern {
                        timeout: *const ::timespec) -> ::c_int;
     pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
     pub fn lio_listio(mode: ::c_int, aiocb_list: *const *mut aiocb,
                       nitems: ::c_int, sevp: *mut ::sigevent) -> ::c_int;
 
     pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
 
     pub fn setpwent();
-    pub fn endpwent();
     pub fn getpwent() -> *mut passwd;
     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,
                     mode: mode_t) -> ::c_int;
@@ -1173,23 +862,16 @@ extern {
     pub fn flistxattr(filedes: ::c_int, list: *mut c_char,
                       size: ::size_t) -> ::ssize_t;
     pub fn removexattr(path: *const c_char, name: *const c_char) -> ::c_int;
     pub fn lremovexattr(path: *const c_char, name: *const c_char) -> ::c_int;
     pub fn fremovexattr(filedes: ::c_int, name: *const c_char) -> ::c_int;
     pub fn signalfd(fd: ::c_int,
                     mask: *const ::sigset_t,
                     flags: ::c_int) -> ::c_int;
-    pub fn timerfd_create(clockid: ::c_int, flags: ::c_int) -> ::c_int;
-    pub fn timerfd_gettime(fd: ::c_int,
-                           curr_value: *mut itimerspec) -> ::c_int;
-    pub fn timerfd_settime(fd: ::c_int,
-                           flags: ::c_int,
-                           new_value: *const itimerspec,
-                           old_value: *mut itimerspec) -> ::c_int;
     pub fn pwritev(fd: ::c_int,
                    iov: *const ::iovec,
                    iovcnt: ::c_int,
                    offset: ::off_t) -> ::ssize_t;
     pub fn preadv(fd: ::c_int,
                   iov: *const ::iovec,
                   iovcnt: ::c_int,
                   offset: ::off_t) -> ::ssize_t;
@@ -1213,25 +895,35 @@ extern {
                       newattr: *const ::mq_attr,
                       oldattr: *mut ::mq_attr) -> ::c_int;
     pub fn epoll_pwait(epfd: ::c_int,
                        events: *mut ::epoll_event,
                        maxevents: ::c_int,
                        timeout: ::c_int,
                        sigmask: *const ::sigset_t) -> ::c_int;
     pub fn dup3(oldfd: ::c_int, newfd: ::c_int, flags: ::c_int) -> ::c_int;
+    pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
     pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int;
     pub fn mkostemps(template: *mut ::c_char,
                      suffixlen: ::c_int,
                      flags: ::c_int) -> ::c_int;
     pub fn sigtimedwait(set: *const sigset_t,
                         info: *mut siginfo_t,
                         timeout: *const ::timespec) -> ::c_int;
     pub fn sigwaitinfo(set: *const sigset_t,
                        info: *mut siginfo_t) -> ::c_int;
+    pub fn openpty(amaster: *mut ::c_int,
+                   aslave: *mut ::c_int,
+                   name: *mut ::c_char,
+                   termp: *const termios,
+                   winp: *const ::winsize) -> ::c_int;
+    pub fn forkpty(amaster: *mut ::c_int,
+                   name: *mut ::c_char,
+                   termp: *const termios,
+                   winp: *const ::winsize) -> ::pid_t;
     pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char;
     pub fn getnameinfo(sa: *const ::sockaddr,
                        salen: ::socklen_t,
                        host: *mut ::c_char,
                        hostlen: ::socklen_t,
                        serv: *mut ::c_char,
                        sevlen: ::socklen_t,
                        flags: ::c_int) -> ::c_int;
@@ -1254,16 +946,18 @@ extern {
                              local_iov: *const ::iovec,
                              liovcnt: ::c_ulong,
                              remote_iov: *const ::iovec,
                              riovcnt: ::c_ulong,
                              flags: ::c_ulong) -> isize;
     pub fn reboot(how_to: ::c_int) -> ::c_int;
     pub fn setfsgid(gid: ::gid_t) -> ::c_int;
     pub fn setfsuid(uid: ::uid_t) -> ::c_int;
+    pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int;
+    pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int;
 
     // Not available now on Android
     pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,
                     mode: ::mode_t) -> ::c_int;
     pub fn if_nameindex() -> *mut if_nameindex;
     pub fn if_freenameindex(ptr: *mut if_nameindex);
     pub fn sync_file_range(fd: ::c_int, offset: ::off64_t,
                            nbytes: ::off64_t, flags: ::c_uint) -> ::c_int;
@@ -1316,182 +1010,30 @@ extern {
     pub fn sendmsg(fd: ::c_int,
                    msg: *const ::msghdr,
                    flags: ::c_int) -> ::ssize_t;
     pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
                    -> ::ssize_t;
     pub fn getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int;
     pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int;
     pub fn vhangup() -> ::c_int;
+}
+
+extern {
     pub fn sendmmsg(sockfd: ::c_int, msgvec: *mut mmsghdr, vlen: ::c_uint,
                     flags: ::c_int) -> ::c_int;
     pub fn recvmmsg(sockfd: ::c_int, msgvec: *mut mmsghdr, vlen: ::c_uint,
                     flags: ::c_int, timeout: *mut ::timespec) -> ::c_int;
     pub fn sync();
-    pub fn syscall(num: ::c_long, ...) -> ::c_long;
-    pub fn sched_getaffinity(pid: ::pid_t,
-                             cpusetsize: ::size_t,
-                             cpuset: *mut cpu_set_t) -> ::c_int;
-    pub fn sched_setaffinity(pid: ::pid_t,
-                             cpusetsize: ::size_t,
-                             cpuset: *const cpu_set_t) -> ::c_int;
-    pub fn epoll_create(size: ::c_int) -> ::c_int;
-    pub fn epoll_create1(flags: ::c_int) -> ::c_int;
-    pub fn epoll_wait(epfd: ::c_int,
-                      events: *mut ::epoll_event,
-                      maxevents: ::c_int,
-                      timeout: ::c_int) -> ::c_int;
-    pub fn epoll_ctl(epfd: ::c_int,
-                     op: ::c_int,
-                     fd: ::c_int,
-                     event: *mut ::epoll_event) -> ::c_int;
-    pub fn pthread_getschedparam(native: ::pthread_t,
-                                 policy: *mut ::c_int,
-                                 param: *mut ::sched_param) -> ::c_int;
-    pub fn unshare(flags: ::c_int) -> ::c_int;
-    pub fn umount(target: *const ::c_char) -> ::c_int;
-    pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int;
-    pub fn tee(fd_in: ::c_int,
-               fd_out: ::c_int,
-               len: ::size_t,
-               flags: ::c_uint) -> ::ssize_t;
-    pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int;
-    pub fn splice(fd_in: ::c_int,
-                  off_in: *mut ::loff_t,
-                  fd_out: ::c_int,
-                  off_out: *mut ::loff_t,
-                  len: ::size_t,
-                  flags: ::c_uint) -> ::ssize_t;
-    pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int;
-    pub fn sched_rr_get_interval(pid: ::pid_t, tp: *mut ::timespec) -> ::c_int;
-    pub fn sem_timedwait(sem: *mut sem_t,
-                         abstime: *const ::timespec) -> ::c_int;
-    pub fn sched_setparam(pid: ::pid_t, param: *const ::sched_param) -> ::c_int;
-    pub fn setns(fd: ::c_int, nstype: ::c_int) -> ::c_int;
-    pub fn swapoff(puath: *const ::c_char) -> ::c_int;
-    pub fn vmsplice(fd: ::c_int,
-                    iov: *const ::iovec,
-                    nr_segs: ::size_t,
-                    flags: ::c_uint) -> ::ssize_t;
-    pub fn mount(src: *const ::c_char,
-                 target: *const ::c_char,
-                 fstype: *const ::c_char,
-                 flags: ::c_ulong,
-                 data: *const ::c_void) -> ::c_int;
-    pub fn personality(persona: ::c_ulong) -> ::c_int;
-    pub fn prctl(option: ::c_int, ...) -> ::c_int;
-    pub fn sched_getparam(pid: ::pid_t, param: *mut ::sched_param) -> ::c_int;
-    pub fn ppoll(fds: *mut ::pollfd,
-                 nfds: nfds_t,
-                 timeout: *const ::timespec,
-                 sigmask: *const sigset_t) -> ::c_int;
-    pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
-                                   abstime: *const ::timespec) -> ::c_int;
-    pub fn clone(cb: extern fn(*mut ::c_void) -> ::c_int,
-                 child_stack: *mut ::c_void,
-                 flags: ::c_int,
-                 arg: *mut ::c_void, ...) -> ::c_int;
-    pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int;
-    pub fn clock_nanosleep(clk_id: ::clockid_t,
-                           flags: ::c_int,
-                           rqtp: *const ::timespec,
-                           rmtp:  *mut ::timespec) -> ::c_int;
-    pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
-                                     guardsize: *mut ::size_t) -> ::c_int;
-    pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
-    pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int;
-    pub fn pthread_condattr_getpshared(attr: *const pthread_condattr_t,
-                                       pshared: *mut ::c_int) -> ::c_int;
-    pub fn sysinfo(info: *mut ::sysinfo) -> ::c_int;
-    pub fn umount2(target: *const ::c_char, flags: ::c_int) -> ::c_int;
-    pub fn pthread_setschedparam(native: ::pthread_t,
-                                 policy: ::c_int,
-                                 param: *const ::sched_param) -> ::c_int;
-    pub fn swapon(path: *const ::c_char, swapflags: ::c_int) -> ::c_int;
-    pub fn sched_setscheduler(pid: ::pid_t,
-                              policy: ::c_int,
-                              param: *const ::sched_param) -> ::c_int;
-    pub fn sendfile(out_fd: ::c_int,
-                    in_fd: ::c_int,
-                    offset: *mut off_t,
-                    count: ::size_t) -> ::ssize_t;
-    pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int;
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")]
-    pub fn getgrgid_r(uid: ::uid_t,
-                      grp: *mut ::group,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut ::group) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "sigaltstack$UNIX2003")]
-    #[cfg_attr(target_os = "netbsd", link_name = "__sigaltstack14")]
-    pub fn sigaltstack(ss: *const stack_t,
-                       oss: *mut stack_t) -> ::c_int;
-    pub fn sem_close(sem: *mut sem_t) -> ::c_int;
-    pub fn getdtablesize() -> ::c_int;
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrnam_r")]
-    pub fn getgrnam_r(name: *const ::c_char,
-                      grp: *mut ::group,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut ::group) -> ::c_int;
-    pub fn initgroups(user: *const ::c_char, group: ::gid_t) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "pthread_sigmask$UNIX2003")]
-    pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t,
-                           oldset: *mut sigset_t) -> ::c_int;
-    pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t;
-    pub fn getgrnam(name: *const ::c_char) -> *mut ::group;
-    pub fn pthread_cancel(thread: ::pthread_t) -> ::c_int;
-    pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
-    pub fn sem_unlink(name: *const ::c_char) -> ::c_int;
-    pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__getpwnam_r50")]
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwnam_r")]
-    pub fn getpwnam_r(name: *const ::c_char,
-                      pwd: *mut passwd,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut passwd) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid_r50")]
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwuid_r")]
-    pub fn getpwuid_r(uid: ::uid_t,
-                      pwd: *mut passwd,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut passwd) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch ="x86"),
-               link_name = "sigwait$UNIX2003")]
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_sigwait")]
-    pub fn sigwait(set: *const sigset_t,
-                   sig: *mut ::c_int) -> ::c_int;
-    pub fn pthread_atfork(prepare: Option<unsafe extern fn()>,
-                          parent: Option<unsafe extern fn()>,
-                          child: Option<unsafe extern fn()>) -> ::c_int;
-    pub fn getgrgid(gid: ::gid_t) -> *mut ::group;
-    pub fn getgrouplist(user: *const ::c_char,
-                        group: ::gid_t,
-                        groups: *mut ::gid_t,
-                        ngroups: *mut ::c_int) -> ::c_int;
-    pub fn pthread_mutexattr_getpshared(attr: *const pthread_mutexattr_t,
-                                        pshared: *mut ::c_int) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "popen$UNIX2003")]
-    pub fn popen(command: *const c_char,
-                 mode: *const c_char) -> *mut ::FILE;
-    pub fn faccessat(dirfd: ::c_int, pathname: *const ::c_char,
-                     mode: ::c_int, flags: ::c_int) -> ::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;
 }
 
 cfg_if! {
-    if #[cfg(any(target_env = "musl", target_os = "fuchsia"))] {
+    if #[cfg(any(target_env = "musl",
+                 target_os = "fuchsia",
+                 target_os = "emscripten"))] {
         mod musl;
         pub use self::musl::*;
     } else if #[cfg(any(target_arch = "mips",
                         target_arch = "mips64"))] {
         mod mips;
         pub use self::mips::*;
     } else if #[cfg(any(target_arch = "s390x"))] {
         mod s390x;
--- a/third_party/rust/libc/src/unix/notbsd/linux/musl/b32/arm.rs
+++ b/third_party/rust/libc/src/unix/notbsd/linux/musl/b32/arm.rs
@@ -102,65 +102,22 @@ s! {
 
     pub struct siginfo_t {
         pub si_signo: ::c_int,
         pub si_errno: ::c_int,
         pub si_code: ::c_int,
         pub _pad: [::c_int; 29],
         _align: [usize; 0],
     }
-
-    pub struct statfs64 {
-        pub f_type: ::c_ulong,
-        pub f_bsize: ::c_ulong,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_files: ::fsfilcnt_t,
-        pub f_ffree: ::fsfilcnt_t,
-        pub f_fsid: ::fsid_t,
-        pub f_namelen: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_flags: ::c_ulong,
-        pub f_spare: [::c_ulong; 4],
-    }
-
-    pub struct statvfs64 {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_bavail: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        pub f_favail: u64,
-        pub f_fsid: ::c_ulong,
-        __f_unused: ::c_int,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-        __f_spare: [::c_int; 6],
-    }
-
-    pub struct termios2 {
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_line: ::cc_t,
-        pub c_cc: [::cc_t; 19],
-        pub c_ispeed: ::speed_t,
-        pub c_ospeed: ::speed_t,
-    }
 }
 
-pub const O_DIRECT: ::c_int = 0x10000;
-pub const O_DIRECTORY: ::c_int = 0x4000;
-pub const O_NOFOLLOW: ::c_int = 0x8000;
+pub const O_DIRECT: ::c_int = 0x4000;
+pub const O_DIRECTORY: ::c_int = 0x10000;
+pub const O_NOFOLLOW: ::c_int = 0x20000;
 pub const O_ASYNC: ::c_int = 0x2000;
-pub const O_LARGEFILE: ::c_int = 0o400000;
 
 pub const FIOCLEX: ::c_int = 0x5451;
 pub const FIONBIO: ::c_int = 0x5421;
 
 pub const RLIMIT_RSS: ::c_int = 5;
 pub const RLIMIT_NOFILE: ::c_int = 7;
 pub const RLIMIT_AS: ::c_int = 9;
 pub const RLIMIT_NPROC: ::c_int = 6;
@@ -377,379 +334,13 @@ pub const TIOCGWINSZ: ::c_int = 0x5413;
 pub const TIOCSWINSZ: ::c_int = 0x5414;
 pub const TIOCMGET: ::c_int = 0x5415;
 pub const TIOCMBIS: ::c_int = 0x5416;
 pub const TIOCMBIC: ::c_int = 0x5417;
 pub const TIOCMSET: ::c_int = 0x5418;
 pub const FIONREAD: ::c_int = 0x541B;
 pub const TIOCCONS: ::c_int = 0x541D;
 
+pub const SYS_gettid: ::c_long = 224;
+pub const SYS_perf_event_open: ::c_long = 364;
+
 pub const POLLWRNORM: ::c_short = 0x100;
 pub const POLLWRBAND: ::c_short = 0x200;
-
-pub const TIOCM_LE: ::c_int = 0x001;
-pub const TIOCM_DTR: ::c_int = 0x002;
-pub const TIOCM_RTS: ::c_int = 0x004;
-pub const TIOCM_ST: ::c_int = 0x008;
-pub const TIOCM_SR: ::c_int = 0x010;
-pub const TIOCM_CTS: ::c_int = 0x020;
-pub const TIOCM_CAR: ::c_int = 0x040;
-pub const TIOCM_RNG: ::c_int = 0x080;
-pub const TIOCM_DSR: ::c_int = 0x100;
-pub const TIOCM_CD: ::c_int = TIOCM_CAR;
-pub const TIOCM_RI: ::c_int = TIOCM_RNG;
-
-// Syscall table
-pub const SYS_restart_syscall: ::c_long = 0;
-pub const SYS_exit: ::c_long = 1;
-pub const SYS_fork: ::c_long = 2;
-pub const SYS_read: ::c_long = 3;
-pub const SYS_write: ::c_long = 4;
-pub const SYS_open: ::c_long = 5;
-pub const SYS_close: ::c_long = 6;
-pub const SYS_creat: ::c_long = 8;
-pub const SYS_link: ::c_long = 9;
-pub const SYS_unlink: ::c_long = 10;
-pub const SYS_execve: ::c_long = 11;
-pub const SYS_chdir: ::c_long = 12;
-pub const SYS_mknod: ::c_long = 14;
-pub const SYS_chmod: ::c_long = 15;
-pub const SYS_lchown: ::c_long = 16;
-pub const SYS_lseek: ::c_long = 19;
-pub const SYS_getpid: ::c_long = 20;
-pub const SYS_mount: ::c_long = 21;
-pub const SYS_setuid: ::c_long = 23;
-pub const SYS_getuid: ::c_long = 24;
-pub const SYS_ptrace: ::c_long = 26;
-pub const SYS_pause: ::c_long = 29;
-pub const SYS_access: ::c_long = 33;
-pub const SYS_nice: ::c_long = 34;
-pub const SYS_sync: ::c_long = 36;
-pub const SYS_kill: ::c_long = 37;
-pub const SYS_rename: ::c_long = 38;
-pub const SYS_mkdir: ::c_long = 39;
-pub const SYS_rmdir: ::c_long = 40;
-pub const SYS_dup: ::c_long = 41;
-pub const SYS_pipe: ::c_long = 42;
-pub const SYS_times: ::c_long = 43;
-pub const SYS_brk: ::c_long = 45;
-pub const SYS_setgid: ::c_long = 46;
-pub const SYS_getgid: ::c_long = 47;
-pub const SYS_geteuid: ::c_long = 49;
-pub const SYS_getegid: ::c_long = 50;
-pub const SYS_acct: ::c_long = 51;
-pub const SYS_umount2: ::c_long = 52;
-pub const SYS_ioctl: ::c_long = 54;
-pub const SYS_fcntl: ::c_long = 55;
-pub const SYS_setpgid: ::c_long = 57;
-pub const SYS_umask: ::c_long = 60;
-pub const SYS_chroot: ::c_long = 61;
-pub const SYS_ustat: ::c_long = 62;
-pub const SYS_dup2: ::c_long = 63;
-pub const SYS_getppid: ::c_long = 64;
-pub const SYS_getpgrp: ::c_long = 65;
-pub const SYS_setsid: ::c_long = 66;
-pub const SYS_sigaction: ::c_long = 67;
-pub const SYS_setreuid: ::c_long = 70;
-pub const SYS_setregid: ::c_long = 71;
-pub const SYS_sigsuspend: ::c_long = 72;
-pub const SYS_sigpending: ::c_long = 73;
-pub const SYS_sethostname: ::c_long = 74;
-pub const SYS_setrlimit: ::c_long = 75;
-pub const SYS_getrusage: ::c_long = 77;
-pub const SYS_gettimeofday: ::c_long = 78;
-pub const SYS_settimeofday: ::c_long = 79;
-pub const SYS_getgroups: ::c_long = 80;
-pub const SYS_setgroups: ::c_long = 81;
-pub const SYS_symlink: ::c_long = 83;
-pub const SYS_readlink: ::c_long = 85;
-pub const SYS_uselib: ::c_long = 86;
-pub const SYS_swapon: ::c_long = 87;
-pub const SYS_reboot: ::c_long = 88;
-pub const SYS_munmap: ::c_long = 91;
-pub const SYS_truncate: ::c_long = 92;
-pub const SYS_ftruncate: ::c_long = 93;
-pub const SYS_fchmod: ::c_long = 94;
-pub const SYS_fchown: ::c_long = 95;
-pub const SYS_getpriority: ::c_long = 96;
-pub const SYS_setpriority: ::c_long = 97;
-pub const SYS_statfs: ::c_long = 99;
-pub const SYS_fstatfs: ::c_long = 100;
-pub const SYS_syslog: ::c_long = 103;
-pub const SYS_setitimer: ::c_long = 104;
-pub const SYS_getitimer: ::c_long = 105;
-pub const SYS_stat: ::c_long = 106;
-pub const SYS_lstat: ::c_long = 107;
-pub const SYS_fstat: ::c_long = 108;
-pub const SYS_vhangup: ::c_long = 111;
-pub const SYS_wait4: ::c_long = 114;
-pub const SYS_swapoff: ::c_long = 115;
-pub const SYS_sysinfo: ::c_long = 116;
-pub const SYS_fsync: ::c_long = 118;
-pub const SYS_sigreturn: ::c_long = 119;
-pub const SYS_clone: ::c_long = 120;
-pub const SYS_setdomainname: ::c_long = 121;
-pub const SYS_uname: ::c_long = 122;
-pub const SYS_adjtimex: ::c_long = 124;
-pub const SYS_mprotect: ::c_long = 125;
-pub const SYS_sigprocmask: ::c_long = 126;
-pub const SYS_init_module: ::c_long = 128;
-pub const SYS_delete_module: ::c_long = 129;
-pub const SYS_quotactl: ::c_long = 131;
-pub const SYS_getpgid: ::c_long = 132;
-pub const SYS_fchdir: ::c_long = 133;
-pub const SYS_bdflush: ::c_long = 134;
-pub const SYS_sysfs: ::c_long = 135;
-pub const SYS_personality: ::c_long = 136;
-pub const SYS_setfsuid: ::c_long = 138;
-pub const SYS_setfsgid: ::c_long = 139;
-pub const SYS__llseek: ::c_long = 140;
-pub const SYS_getdents: ::c_long = 141;
-pub const SYS__newselect: ::c_long = 142;
-pub const SYS_flock: ::c_long = 143;
-pub const SYS_msync: ::c_long = 144;
-pub const SYS_readv: ::c_long = 145;
-pub const SYS_writev: ::c_long = 146;
-pub const SYS_getsid: ::c_long = 147;
-pub const SYS_fdatasync: ::c_long = 148;
-pub const SYS__sysctl: ::c_long = 149;
-pub const SYS_mlock: ::c_long = 150;
-pub const SYS_munlock: ::c_long = 151;
-pub const SYS_mlockall: ::c_long = 152;
-pub const SYS_munlockall: ::c_long = 153;
-pub const SYS_sched_setparam: ::c_long = 154;
-pub const SYS_sched_getparam: ::c_long = 155;
-pub const SYS_sched_setscheduler: ::c_long = 156;
-pub const SYS_sched_getscheduler: ::c_long = 157;
-pub const SYS_sched_yield: ::c_long = 158;
-pub const SYS_sched_get_priority_max: ::c_long = 159;
-pub const SYS_sched_get_priority_min: ::c_long = 160;
-pub const SYS_sched_rr_get_interval: ::c_long = 161;
-pub const SYS_nanosleep: ::c_long = 162;
-pub const SYS_mremap: ::c_long = 163;
-pub const SYS_setresuid: ::c_long = 164;
-pub const SYS_getresuid: ::c_long = 165;
-pub const SYS_poll: ::c_long = 168;
-pub const SYS_nfsservctl: ::c_long = 169;
-pub const SYS_setresgid: ::c_long = 170;
-pub const SYS_getresgid: ::c_long = 171;
-pub const SYS_prctl: ::c_long = 172;
-pub const SYS_rt_sigreturn: ::c_long = 173;
-pub const SYS_rt_sigaction: ::c_long = 174;
-pub const SYS_rt_sigprocmask: ::c_long = 175;
-pub const SYS_rt_sigpending: ::c_long = 176;
-pub const SYS_rt_sigtimedwait: ::c_long = 177;
-pub const SYS_rt_sigqueueinfo: ::c_long = 178;
-pub const SYS_rt_sigsuspend: ::c_long = 179;
-pub const SYS_pread64: ::c_long = 180;
-pub const SYS_pwrite64: ::c_long = 181;
-pub const SYS_chown: ::c_long = 182;
-pub const SYS_getcwd: ::c_long = 183;
-pub const SYS_capget: ::c_long = 184;
-pub const SYS_capset: ::c_long = 185;
-pub const SYS_sigaltstack: ::c_long = 186;
-pub const SYS_sendfile: ::c_long = 187;
-pub const SYS_vfork: ::c_long = 190;
-pub const SYS_ugetrlimit: ::c_long = 191;
-pub const SYS_mmap2: ::c_long = 192;
-pub const SYS_truncate64: ::c_long = 193;
-pub const SYS_ftruncate64: ::c_long = 194;
-pub const SYS_stat64: ::c_long = 195;
-pub const SYS_lstat64: ::c_long = 196;
-pub const SYS_fstat64: ::c_long = 197;
-pub const SYS_lchown32: ::c_long = 198;
-pub const SYS_getuid32: ::c_long = 199;
-pub const SYS_getgid32: ::c_long = 200;
-pub const SYS_geteuid32: ::c_long = 201;
-pub const SYS_getegid32: ::c_long = 202;
-pub const SYS_setreuid32: ::c_long = 203;
-pub const SYS_setregid32: ::c_long = 204;
-pub const SYS_getgroups32: ::c_long = 205;
-pub const SYS_setgroups32: ::c_long = 206;
-pub const SYS_fchown32: ::c_long = 207;
-pub const SYS_setresuid32: ::c_long = 208;
-pub const SYS_getresuid32: ::c_long = 209;
-pub const SYS_setresgid32: ::c_long = 210;
-pub const SYS_getresgid32: ::c_long = 211;
-pub const SYS_chown32: ::c_long = 212;
-pub const SYS_setuid32: ::c_long = 213;
-pub const SYS_setgid32: ::c_long = 214;
-pub const SYS_setfsuid32: ::c_long = 215;
-pub const SYS_setfsgid32: ::c_long = 216;
-pub const SYS_getdents64: ::c_long = 217;
-pub const SYS_pivot_root: ::c_long = 218;
-pub const SYS_mincore: ::c_long = 219;
-pub const SYS_madvise: ::c_long = 220;
-pub const SYS_fcntl64: ::c_long = 221;
-pub const SYS_gettid: ::c_long = 224;
-pub const SYS_readahead: ::c_long = 225;
-pub const SYS_setxattr: ::c_long = 226;
-pub const SYS_lsetxattr: ::c_long = 227;
-pub const SYS_fsetxattr: ::c_long = 228;
-pub const SYS_getxattr: ::c_long = 229;
-pub const SYS_lgetxattr: ::c_long = 230;
-pub const SYS_fgetxattr: ::c_long = 231;
-pub const SYS_listxattr: ::c_long = 232;
-pub const SYS_llistxattr: ::c_long = 233;
-pub const SYS_flistxattr: ::c_long = 234;
-pub const SYS_removexattr: ::c_long = 235;
-pub const SYS_lremovexattr: ::c_long = 236;
-pub const SYS_fremovexattr: ::c_long = 237;
-pub const SYS_tkill: ::c_long = 238;
-pub const SYS_sendfile64: ::c_long = 239;
-pub const SYS_futex: ::c_long = 240;
-pub const SYS_sched_setaffinity: ::c_long = 241;
-pub const SYS_sched_getaffinity: ::c_long = 242;
-pub const SYS_io_setup: ::c_long = 243;
-pub const SYS_io_destroy: ::c_long = 244;
-pub const SYS_io_getevents: ::c_long = 245;
-pub const SYS_io_submit: ::c_long = 246;
-pub const SYS_io_cancel: ::c_long = 247;
-pub const SYS_exit_group: ::c_long = 248;
-pub const SYS_lookup_dcookie: ::c_long = 249;
-pub const SYS_epoll_create: ::c_long = 250;
-pub const SYS_epoll_ctl: ::c_long = 251;
-pub const SYS_epoll_wait: ::c_long = 252;
-pub const SYS_remap_file_pages: ::c_long = 253;
-pub const SYS_set_tid_address: ::c_long = 256;
-pub const SYS_timer_create: ::c_long = 257;
-pub const SYS_timer_settime: ::c_long = 258;
-pub const SYS_timer_gettime: ::c_long = 259;
-pub const SYS_timer_getoverrun: ::c_long = 260;
-pub const SYS_timer_delete: ::c_long = 261;
-pub const SYS_clock_settime: ::c_long = 262;
-pub const SYS_clock_gettime: ::c_long = 263;
-pub const SYS_clock_getres: ::c_long = 264;
-pub const SYS_clock_nanosleep: ::c_long = 265;
-pub const SYS_statfs64: ::c_long = 266;
-pub const SYS_fstatfs64: ::c_long = 267;
-pub const SYS_tgkill: ::c_long = 268;
-pub const SYS_utimes: ::c_long = 269;
-pub const SYS_pciconfig_iobase: ::c_long = 271;
-pub const SYS_pciconfig_read: ::c_long = 272;
-pub const SYS_pciconfig_write: ::c_long = 273;
-pub const SYS_mq_open: ::c_long = 274;
-pub const SYS_mq_unlink: ::c_long = 275;
-pub const SYS_mq_timedsend: ::c_long = 276;
-pub const SYS_mq_timedreceive: ::c_long = 277;
-pub const SYS_mq_notify: ::c_long = 278;
-pub const SYS_mq_getsetattr: ::c_long = 279;
-pub const SYS_waitid: ::c_long = 280;
-pub const SYS_socket: ::c_long = 281;
-pub const SYS_bind: ::c_long = 282;
-pub const SYS_connect: ::c_long = 283;
-pub const SYS_listen: ::c_long = 284;
-pub const SYS_accept: ::c_long = 285;
-pub const SYS_getsockname: ::c_long = 286;
-pub const SYS_getpeername: ::c_long = 287;
-pub const SYS_socketpair: ::c_long = 288;
-pub const SYS_send: ::c_long = 289;
-pub const SYS_sendto: ::c_long = 290;
-pub const SYS_recv: ::c_long = 291;
-pub const SYS_recvfrom: ::c_long = 292;
-pub const SYS_shutdown: ::c_long = 293;
-pub const SYS_setsockopt: ::c_long = 294;
-pub const SYS_getsockopt: ::c_long = 295;
-pub const SYS_sendmsg: ::c_long = 296;
-pub const SYS_recvmsg: ::c_long = 297;
-pub const SYS_semop: ::c_long = 298;
-pub const SYS_semget: ::c_long = 299;
-pub const SYS_semctl: ::c_long = 300;
-pub const SYS_msgsnd: ::c_long = 301;
-pub const SYS_msgrcv: ::c_long = 302;
-pub const SYS_msgget: ::c_long = 303;
-pub const SYS_msgctl: ::c_long = 304;
-pub const SYS_shmat: ::c_long = 305;
-pub const SYS_shmdt: ::c_long = 306;
-pub const SYS_shmget: ::c_long = 307;
-pub const SYS_shmctl: ::c_long = 308;
-pub const SYS_add_key: ::c_long = 309;
-pub const SYS_request_key: ::c_long = 310;
-pub const SYS_keyctl: ::c_long = 311;
-pub const SYS_semtimedop: ::c_long = 312;
-pub const SYS_vserver: ::c_long = 313;
-pub const SYS_ioprio_set: ::c_long = 314;
-pub const SYS_ioprio_get: ::c_long = 315;
-pub const SYS_inotify_init: ::c_long = 316;
-pub const SYS_inotify_add_watch: ::c_long = 317;
-pub const SYS_inotify_rm_watch: ::c_long = 318;
-pub const SYS_mbind: ::c_long = 319;
-pub const SYS_get_mempolicy: ::c_long = 320;
-pub const SYS_set_mempolicy: ::c_long = 321;
-pub const SYS_openat: ::c_long = 322;
-pub const SYS_mkdirat: ::c_long = 323;
-pub const SYS_mknodat: ::c_long = 324;
-pub const SYS_fchownat: ::c_long = 325;
-pub const SYS_futimesat: ::c_long = 326;
-pub const SYS_fstatat64: ::c_long = 327;
-pub const SYS_unlinkat: ::c_long = 328;
-pub const SYS_renameat: ::c_long = 329;
-pub const SYS_linkat: ::c_long = 330;
-pub const SYS_symlinkat: ::c_long = 331;
-pub const SYS_readlinkat: ::c_long = 332;
-pub const SYS_fchmodat: ::c_long = 333;
-pub const SYS_faccessat: ::c_long = 334;
-pub const SYS_pselect6: ::c_long = 335;
-pub const SYS_ppoll: ::c_long = 336;
-pub const SYS_unshare: ::c_long = 337;
-pub const SYS_set_robust_list: ::c_long = 338;
-pub const SYS_get_robust_list: ::c_long = 339;
-pub const SYS_splice: ::c_long = 340;
-pub const SYS_tee: ::c_long = 342;
-pub const SYS_vmsplice: ::c_long = 343;
-pub const SYS_move_pages: ::c_long = 344;
-pub const SYS_getcpu: ::c_long = 345;
-pub const SYS_epoll_pwait: ::c_long = 346;
-pub const SYS_kexec_load: ::c_long = 347;
-pub const SYS_utimensat: ::c_long = 348;
-pub const SYS_signalfd: ::c_long = 349;
-pub const SYS_timerfd_create: ::c_long = 350;
-pub const SYS_eventfd: ::c_long = 351;
-pub const SYS_fallocate: ::c_long = 352;
-pub const SYS_timerfd_settime: ::c_long = 353;
-pub const SYS_timerfd_gettime: ::c_long = 354;
-pub const SYS_signalfd4: ::c_long = 355;
-pub const SYS_eventfd2: ::c_long = 356;
-pub const SYS_epoll_create1: ::c_long = 357;
-pub const SYS_dup3: ::c_long = 358;
-pub const SYS_pipe2: ::c_long = 359;
-pub const SYS_inotify_init1: ::c_long = 360;
-pub const SYS_preadv: ::c_long = 361;
-pub const SYS_pwritev: ::c_long = 362;
-pub const SYS_rt_tgsigqueueinfo: ::c_long = 363;
-pub const SYS_perf_event_open: ::c_long = 364;
-pub const SYS_recvmmsg: ::c_long = 365;
-pub const SYS_accept4: ::c_long = 366;
-pub const SYS_fanotify_init: ::c_long = 367;
-pub const SYS_fanotify_mark: ::c_long = 368;
-pub const SYS_prlimit64: ::c_long = 369;
-pub const SYS_name_to_handle_at: ::c_long = 370;
-pub const SYS_open_by_handle_at: ::c_long = 371;
-pub const SYS_clock_adjtime: ::c_long = 372;
-pub const SYS_syncfs: ::c_long = 373;
-pub const SYS_sendmmsg: ::c_long = 374;
-pub const SYS_setns: ::c_long = 375;
-pub const SYS_process_vm_readv: ::c_long = 376;
-pub const SYS_process_vm_writev: ::c_long = 377;
-pub const SYS_kcmp: ::c_long = 378;
-pub const SYS_finit_module: ::c_long = 379;
-pub const SYS_sched_setattr: ::c_long = 380;
-pub const SYS_sched_getattr: ::c_long = 381;
-pub const SYS_renameat2: ::c_long = 382;
-pub const SYS_seccomp: ::c_long = 383;
-pub const SYS_getrandom: ::c_long = 384;
-pub const SYS_memfd_create: ::c_long = 385;
-pub const SYS_bpf: ::c_long = 386;
-pub const SYS_execveat: ::c_long = 387;
-pub const SYS_userfaultfd: ::c_long = 388;
-pub const SYS_membarrier: ::c_long = 389;
-pub const SYS_mlock2: ::c_long = 390;
-pub const SYS_copy_file_range: ::c_long = 391;
-pub const SYS_preadv2: ::c_long = 392;
-pub const SYS_pwritev2: ::c_long = 393;
-pub const SYS_pkey_mprotect: ::c_long = 394;
-pub const SYS_pkey_alloc: ::c_long = 395;
-pub const SYS_pkey_free: ::c_long = 396;
-
-#[doc(hidden)]
-pub const AF_MAX: ::c_int = 43;
-#[doc(hidden)]
-pub const PF_MAX: ::c_int = AF_MAX;
rename from third_party/rust/libc-0.2.24/src/unix/notbsd/linux/musl/b32/asmjs.rs
rename to third_party/rust/libc/src/unix/notbsd/linux/musl/b32/asmjs.rs
--- a/third_party/rust/libc/src/unix/notbsd/linux/musl/b32/mips.rs
+++ b/third_party/rust/libc/src/unix/notbsd/linux/musl/b32/mips.rs
@@ -110,68 +110,22 @@ s! {
 
     pub struct siginfo_t {
         pub si_signo: ::c_int,
         pub si_code: ::c_int,
         pub si_errno: ::c_int,
         pub _pad: [::c_int; 29],
         _align: [usize; 0],
     }
-
-    pub struct statfs64 {
-        pub f_type: ::c_ulong,
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_files: ::fsfilcnt_t,
-        pub f_ffree: ::fsfilcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_fsid: ::fsid_t,
-        pub f_namelen: ::c_ulong,
-        pub f_flags: ::c_ulong,
-        pub f_spare: [::c_ulong; 5],
-    }
-
-    pub struct statvfs64 {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_bavail: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        pub f_favail: u64,
-        #[cfg(target_endian = "little")]
-        pub f_fsid: ::c_ulong,
-        __f_unused: ::c_int,
-        #[cfg(target_endian = "big")]
-        pub f_fsid: ::c_ulong,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-        __f_spare: [::c_int; 6],
-    }
-
-    pub struct termios2 {
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_line: ::cc_t,
-        pub c_cc: [::cc_t; 23],
-        pub c_ispeed: ::speed_t,
-        pub c_ospeed: ::speed_t,
-    }
 }
 
 pub const O_DIRECT: ::c_int = 0o100000;
 pub const O_DIRECTORY: ::c_int = 0o200000;
 pub const O_NOFOLLOW: ::c_int = 0o400000;
 pub const O_ASYNC: ::c_int = 0o10000;
-pub const O_LARGEFILE: ::c_int = 0x2000;
 
 pub const FIOCLEX: ::c_int = 0x6601;
 pub const FIONBIO: ::c_int = 0x667E;
 
 pub const RLIMIT_RSS: ::c_int = 7;
 pub const RLIMIT_NOFILE: ::c_int = 5;
 pub const RLIMIT_AS: ::c_int = 6;
 pub const RLIMIT_NPROC: ::c_int = 8;
@@ -388,386 +342,13 @@ pub const TIOCGWINSZ: ::c_int = 0x400874
 pub const TIOCSWINSZ: ::c_int = 0x80087467;
 pub const TIOCMGET: ::c_int = 0x741D;
 pub const TIOCMBIS: ::c_int = 0x741B;
 pub const TIOCMBIC: ::c_int = 0x741C;
 pub const TIOCMSET: ::c_int = 0x741A;
 pub const FIONREAD: ::c_int = 0x467F;
 pub const TIOCCONS: ::c_int = 0x80047478;
 
+pub const SYS_gettid: ::c_long = 4222;   // Valid for O32
+pub const SYS_perf_event_open: ::c_long = 4333;  // Valid for O32
+
 pub const POLLWRNORM: ::c_short = 0x4;
 pub const POLLWRBAND: ::c_short = 0x100;
-
-pub const TIOCM_LE: ::c_int = 0x001;
-pub const TIOCM_DTR: ::c_int = 0x002;
-pub const TIOCM_RTS: ::c_int = 0x004;
-pub const TIOCM_ST: ::c_int = 0x010;
-pub const TIOCM_SR: ::c_int = 0x020;
-pub const TIOCM_CTS: ::c_int = 0x040;
-pub const TIOCM_CAR: ::c_int = 0x100;
-pub const TIOCM_CD: ::c_int = TIOCM_CAR;
-pub const TIOCM_RNG: ::c_int = 0x200;
-pub const TIOCM_RI: ::c_int = TIOCM_RNG;
-pub const TIOCM_DSR: ::c_int = 0x400;
-
-pub const SYS_syscall: ::c_long = 4000 + 0;
-pub const SYS_exit: ::c_long = 4000 + 1;
-pub const SYS_fork: ::c_long = 4000 + 2;
-pub const SYS_read: ::c_long = 4000 + 3;
-pub const SYS_write: ::c_long = 4000 + 4;
-pub const SYS_open: ::c_long = 4000 + 5;
-pub const SYS_close: ::c_long = 4000 + 6;
-pub const SYS_waitpid: ::c_long = 4000 + 7;
-pub const SYS_creat: ::c_long = 4000 + 8;
-pub const SYS_link: ::c_long = 4000 + 9;
-pub const SYS_unlink: ::c_long = 4000 +  10;
-pub const SYS_execve: ::c_long = 4000 +  11;
-pub const SYS_chdir: ::c_long = 4000 +  12;
-pub const SYS_time: ::c_long = 4000 +  13;
-pub const SYS_mknod: ::c_long = 4000 +  14;
-pub const SYS_chmod: ::c_long = 4000 +  15;
-pub const SYS_lchown: ::c_long = 4000 +  16;
-pub const SYS_break: ::c_long = 4000 +  17;
-pub const SYS_unused18: ::c_long = 4000 +  18;
-pub const SYS_lseek: ::c_long = 4000 +  19;
-pub const SYS_getpid: ::c_long = 4000 +  20;
-pub const SYS_mount: ::c_long = 4000 +  21;
-pub const SYS_umount: ::c_long = 4000 +  22;
-pub const SYS_setuid: ::c_long = 4000 +  23;
-pub const SYS_getuid: ::c_long = 4000 +  24;
-pub const SYS_stime: ::c_long = 4000 +  25;
-pub const SYS_ptrace: ::c_long = 4000 +  26;
-pub const SYS_alarm: ::c_long = 4000 +  27;
-pub const SYS_unused28: ::c_long = 4000 +  28;
-pub const SYS_pause: ::c_long = 4000 +  29;
-pub const SYS_utime: ::c_long = 4000 +  30;
-pub const SYS_stty: ::c_long = 4000 +  31;
-pub const SYS_gtty: ::c_long = 4000 +  32;
-pub const SYS_access: ::c_long = 4000 +  33;
-pub const SYS_nice: ::c_long = 4000 +  34;
-pub const SYS_ftime: ::c_long = 4000 +  35;
-pub const SYS_sync: ::c_long = 4000 +  36;
-pub const SYS_kill: ::c_long = 4000 +  37;
-pub const SYS_rename: ::c_long = 4000 +  38;
-pub const SYS_mkdir: ::c_long = 4000 +  39;
-pub const SYS_rmdir: ::c_long = 4000 +  40;
-pub const SYS_dup: ::c_long = 4000 +  41;
-pub const SYS_pipe: ::c_long = 4000 +  42;
-pub const SYS_times: ::c_long = 4000 +  43;
-pub const SYS_prof: ::c_long = 4000 +  44;
-pub const SYS_brk: ::c_long = 4000 +  45;
-pub const SYS_setgid: ::c_long = 4000 +  46;
-pub const SYS_getgid: ::c_long = 4000 +  47;
-pub const SYS_signal: ::c_long = 4000 +  48;
-pub const SYS_geteuid: ::c_long = 4000 +  49;
-pub const SYS_getegid: ::c_long = 4000 +  50;
-pub const SYS_acct: ::c_long = 4000 +  51;
-pub const SYS_umount2: ::c_long = 4000 +  52;
-pub const SYS_lock: ::c_long = 4000 +  53;
-pub const SYS_ioctl: ::c_long = 4000 +  54;
-pub const SYS_fcntl: ::c_long = 4000 +  55;
-pub const SYS_mpx: ::c_long = 4000 +  56;
-pub const SYS_setpgid: ::c_long = 4000 +  57;
-pub const SYS_ulimit: ::c_long = 4000 +  58;
-pub const SYS_unused59: ::c_long = 4000 +  59;
-pub const SYS_umask: ::c_long = 4000 +  60;
-pub const SYS_chroot: ::c_long = 4000 +  61;
-pub const SYS_ustat: ::c_long = 4000 +  62;
-pub const SYS_dup2: ::c_long = 4000 +  63;
-pub const SYS_getppid: ::c_long = 4000 +  64;
-pub const SYS_getpgrp: ::c_long = 4000 +  65;
-pub const SYS_setsid: ::c_long = 4000 +  66;
-pub const SYS_sigaction: ::c_long = 4000 +  67;
-pub const SYS_sgetmask: ::c_long = 4000 +  68;
-pub const SYS_ssetmask: ::c_long = 4000 +  69;
-pub const SYS_setreuid: ::c_long = 4000 +  70;
-pub const SYS_setregid: ::c_long = 4000 +  71;
-pub const SYS_sigsuspend: ::c_long = 4000 +  72;
-pub const SYS_sigpending: ::c_long = 4000 +  73;
-pub const SYS_sethostname: ::c_long = 4000 +  74;
-pub const SYS_setrlimit: ::c_long = 4000 +  75;
-pub const SYS_getrlimit: ::c_long = 4000 +  76;
-pub const SYS_getrusage: ::c_long = 4000 +  77;
-pub const SYS_gettimeofday: ::c_long = 4000 +  78;
-pub const SYS_settimeofday: ::c_long = 4000 +  79;
-pub const SYS_getgroups: ::c_long = 4000 +  80;
-pub const SYS_setgroups: ::c_long = 4000 +  81;
-pub const SYS_reserved82: ::c_long = 4000 +  82;
-pub const SYS_symlink: ::c_long = 4000 +  83;
-pub const SYS_unused84: ::c_long = 4000 +  84;
-pub const SYS_readlink: ::c_long = 4000 +  85;
-pub const SYS_uselib: ::c_long = 4000 +  86;
-pub const SYS_swapon: ::c_long = 4000 +  87;
-pub const SYS_reboot: ::c_long = 4000 +  88;
-pub const SYS_readdir: ::c_long = 4000 +  89;
-pub const SYS_mmap: ::c_long = 4000 +  90;
-pub const SYS_munmap: ::c_long = 4000 +  91;
-pub const SYS_truncate: ::c_long = 4000 +  92;
-pub const SYS_ftruncate: ::c_long = 4000 +  93;
-pub const SYS_fchmod: ::c_long = 4000 +  94;
-pub const SYS_fchown: ::c_long = 4000 +  95;
-pub const SYS_getpriority: ::c_long = 4000 +  96;
-pub const SYS_setpriority: ::c_long = 4000 +  97;
-pub const SYS_profil: ::c_long = 4000 +  98;
-pub const SYS_statfs: ::c_long = 4000 +  99;
-pub const SYS_fstatfs: ::c_long = 4000 + 100;
-pub const SYS_ioperm: ::c_long = 4000 + 101;
-pub const SYS_socketcall: ::c_long = 4000 + 102;
-pub const SYS_syslog: ::c_long = 4000 + 103;
-pub const SYS_setitimer: ::c_long = 4000 + 104;
-pub const SYS_getitimer: ::c_long = 4000 + 105;
-pub const SYS_stat: ::c_long = 4000 + 106;
-pub const SYS_lstat: ::c_long = 4000 + 107;
-pub const SYS_fstat: ::c_long = 4000 + 108;
-pub const SYS_unused109: ::c_long = 4000 + 109;
-pub const SYS_iopl: ::c_long = 4000 + 110;
-pub const SYS_vhangup: ::c_long = 4000 + 111;
-pub const SYS_idle: ::c_long = 4000 + 112;
-pub const SYS_vm86: ::c_long = 4000 + 113;
-pub const SYS_wait4: ::c_long = 4000 + 114;
-pub const SYS_swapoff: ::c_long = 4000 + 115;
-pub const SYS_sysinfo: ::c_long = 4000 + 116;
-pub const SYS_ipc: ::c_long = 4000 + 117;
-pub const SYS_fsync: ::c_long = 4000 + 118;
-pub const SYS_sigreturn: ::c_long = 4000 + 119;
-pub const SYS_clone: ::c_long = 4000 + 120;
-pub const SYS_setdomainname: ::c_long = 4000 + 121;
-pub const SYS_uname: ::c_long = 4000 + 122;
-pub const SYS_modify_ldt: ::c_long = 4000 + 123;
-pub const SYS_adjtimex: ::c_long = 4000 + 124;
-pub const SYS_mprotect: ::c_long = 4000 + 125;
-pub const SYS_sigprocmask: ::c_long = 4000 + 126;
-pub const SYS_create_module: ::c_long = 4000 + 127;
-pub const SYS_init_module: ::c_long = 4000 + 128;
-pub const SYS_delete_module: ::c_long = 4000 + 129;
-pub const SYS_get_kernel_syms: ::c_long = 4000 + 130;
-pub const SYS_quotactl: ::c_long = 4000 + 131;
-pub const SYS_getpgid: ::c_long = 4000 + 132;
-pub const SYS_fchdir: ::c_long = 4000 + 133;
-pub const SYS_bdflush: ::c_long = 4000 + 134;
-pub const SYS_sysfs: ::c_long = 4000 + 135;
-pub const SYS_personality: ::c_long = 4000 + 136;
-pub const SYS_afs_syscall: ::c_long = 4000 + 137;
-pub const SYS_setfsuid: ::c_long = 4000 + 138;
-pub const SYS_setfsgid: ::c_long = 4000 + 139;
-pub const SYS__llseek: ::c_long = 4000 + 140;
-pub const SYS_getdents: ::c_long = 4000 + 141;
-pub const SYS_flock: ::c_long = 4000 + 143;
-pub const SYS_msync: ::c_long = 4000 + 144;
-pub const SYS_readv: ::c_long = 4000 + 145;
-pub const SYS_writev: ::c_long = 4000 + 146;
-pub const SYS_cacheflush: ::c_long = 4000 + 147;
-pub const SYS_cachectl: ::c_long = 4000 + 148;
-pub const SYS_sysmips: ::c_long = 4000 + 149;
-pub const SYS_unused150: ::c_long = 4000 + 150;
-pub const SYS_getsid: ::c_long = 4000 + 151;
-pub const SYS_fdatasync: ::c_long = 4000 + 152;
-pub const SYS__sysctl: ::c_long = 4000 + 153;
-pub const SYS_mlock: ::c_long = 4000 + 154;
-pub const SYS_munlock: ::c_long = 4000 + 155;
-pub const SYS_mlockall: ::c_long = 4000 + 156;
-pub const SYS_munlockall: ::c_long = 4000 + 157;
-pub const SYS_sched_setparam: ::c_long = 4000 + 158;
-pub const SYS_sched_getparam: ::c_long = 4000 + 159;
-pub const SYS_sched_setscheduler: ::c_long = 4000 + 160;
-pub const SYS_sched_getscheduler: ::c_long = 4000 + 161;
-pub const SYS_sched_yield: ::c_long = 4000 + 162;
-pub const SYS_sched_get_priority_max: ::c_long = 4000 + 163;
-pub const SYS_sched_get_priority_min: ::c_long = 4000 + 164;
-pub const SYS_sched_rr_get_interval: ::c_long = 4000 + 165;
-pub const SYS_nanosleep: ::c_long = 4000 + 166;
-pub const SYS_mremap: ::c_long = 4000 + 167;
-pub const SYS_accept: ::c_long = 4000 + 168;
-pub const SYS_bind: ::c_long = 4000 + 169;
-pub const SYS_connect: ::c_long = 4000 + 170;
-pub const SYS_getpeername: ::c_long = 4000 + 171;
-pub const SYS_getsockname: ::c_long = 4000 + 172;
-pub const SYS_getsockopt: ::c_long = 4000 + 173;
-pub const SYS_listen: ::c_long = 4000 + 174;
-pub const SYS_recv: ::c_long = 4000 + 175;
-pub const SYS_recvfrom: ::c_long = 4000 + 176;
-pub const SYS_recvmsg: ::c_long = 4000 + 177;
-pub const SYS_send: ::c_long = 4000 + 178;
-pub const SYS_sendmsg: ::c_long = 4000 + 179;
-pub const SYS_sendto: ::c_long = 4000 + 180;
-pub const SYS_setsockopt: ::c_long = 4000 + 181;
-pub const SYS_shutdown: ::c_long = 4000 + 182;
-pub const SYS_socket: ::c_long = 4000 + 183;
-pub const SYS_socketpair: ::c_long = 4000 + 184;
-pub const SYS_setresuid: ::c_long = 4000 + 185;
-pub const SYS_getresuid: ::c_long = 4000 + 186;
-pub const SYS_query_module: ::c_long = 4000 + 187;
-pub const SYS_poll: ::c_long = 4000 + 188;
-pub const SYS_nfsservctl: ::c_long = 4000 + 189;
-pub const SYS_setresgid: ::c_long = 4000 + 190;
-pub const SYS_getresgid: ::c_long = 4000 + 191;
-pub const SYS_prctl: ::c_long = 4000 + 192;
-pub const SYS_rt_sigreturn: ::c_long = 4000 + 193;
-pub const SYS_rt_sigaction: ::c_long = 4000 + 194;
-pub const SYS_rt_sigprocmask: ::c_long = 4000 + 195;
-pub const SYS_rt_sigpending: ::c_long = 4000 + 196;
-pub const SYS_rt_sigtimedwait: ::c_long = 4000 + 197;
-pub const SYS_rt_sigqueueinfo: ::c_long = 4000 + 198;
-pub const SYS_rt_sigsuspend: ::c_long = 4000 + 199;
-pub const SYS_chown: ::c_long = 4000 + 202;
-pub const SYS_getcwd: ::c_long = 4000 + 203;
-pub const SYS_capget: ::c_long = 4000 + 204;
-pub const SYS_capset: ::c_long = 4000 + 205;
-pub const SYS_sigaltstack: ::c_long = 4000 + 206;
-pub const SYS_sendfile: ::c_long = 4000 + 207;
-pub const SYS_getpmsg: ::c_long = 4000 + 208;
-pub const SYS_putpmsg: ::c_long = 4000 + 209;
-pub const SYS_mmap2: ::c_long = 4000 + 210;
-pub const SYS_truncate64: ::c_long = 4000 + 211;
-pub const SYS_ftruncate64: ::c_long = 4000 + 212;
-pub const SYS_stat64: ::c_long = 4000 + 213;
-pub const SYS_lstat64: ::c_long = 4000 + 214;
-pub const SYS_fstat64: ::c_long = 4000 + 215;
-pub const SYS_pivot_root: ::c_long = 4000 + 216;
-pub const SYS_mincore: ::c_long = 4000 + 217;
-pub const SYS_madvise: ::c_long = 4000 + 218;
-pub const SYS_getdents64: ::c_long = 4000 + 219;
-pub const SYS_fcntl64: ::c_long = 4000 + 220;
-pub const SYS_reserved221: ::c_long = 4000 + 221;
-pub const SYS_gettid: ::c_long = 4000 + 222;
-pub const SYS_readahead: ::c_long = 4000 + 223;
-pub const SYS_setxattr: ::c_long = 4000 + 224;
-pub const SYS_lsetxattr: ::c_long = 4000 + 225;
-pub const SYS_fsetxattr: ::c_long = 4000 + 226;
-pub const SYS_getxattr: ::c_long = 4000 + 227;
-pub const SYS_lgetxattr: ::c_long = 4000 + 228;
-pub const SYS_fgetxattr: ::c_long = 4000 + 229;
-pub const SYS_listxattr: ::c_long = 4000 + 230;
-pub const SYS_llistxattr: ::c_long = 4000 + 231;
-pub const SYS_flistxattr: ::c_long = 4000 + 232;
-pub const SYS_removexattr: ::c_long = 4000 + 233;
-pub const SYS_lremovexattr: ::c_long = 4000 + 234;
-pub const SYS_fremovexattr: ::c_long = 4000 + 235;
-pub const SYS_tkill: ::c_long = 4000 + 236;
-pub const SYS_sendfile64: ::c_long = 4000 + 237;
-pub const SYS_futex: ::c_long = 4000 + 238;
-pub const SYS_sched_setaffinity: ::c_long = 4000 + 239;
-pub const SYS_sched_getaffinity: ::c_long = 4000 + 240;
-pub const SYS_io_setup: ::c_long = 4000 + 241;
-pub const SYS_io_destroy: ::c_long = 4000 + 242;
-pub const SYS_io_getevents: ::c_long = 4000 + 243;
-pub const SYS_io_submit: ::c_long = 4000 + 244;
-pub const SYS_io_cancel: ::c_long = 4000 + 245;
-pub const SYS_exit_group: ::c_long = 4000 + 246;
-pub const SYS_lookup_dcookie: ::c_long = 4000 + 247;
-pub const SYS_epoll_create: ::c_long = 4000 + 248;
-pub const SYS_epoll_ctl: ::c_long = 4000 + 249;
-pub const SYS_epoll_wait: ::c_long = 4000 + 250;
-pub const SYS_remap_file_pages: ::c_long = 4000 + 251;
-pub const SYS_set_tid_address: ::c_long = 4000 + 252;
-pub const SYS_restart_syscall: ::c_long = 4000 + 253;
-pub const SYS_statfs64: ::c_long = 4000 + 255;
-pub const SYS_fstatfs64: ::c_long = 4000 + 256;
-pub const SYS_timer_create: ::c_long = 4000 + 257;
-pub const SYS_timer_settime: ::c_long = 4000 + 258;
-pub const SYS_timer_gettime: ::c_long = 4000 + 259;
-pub const SYS_timer_getoverrun: ::c_long = 4000 + 260;
-pub const SYS_timer_delete: ::c_long = 4000 + 261;
-pub const SYS_clock_settime: ::c_long = 4000 + 262;
-pub const SYS_clock_gettime: ::c_long = 4000 + 263;
-pub const SYS_clock_getres: ::c_long = 4000 + 264;
-pub const SYS_clock_nanosleep: ::c_long = 4000 + 265;
-pub const SYS_tgkill: ::c_long = 4000 + 266;
-pub const SYS_utimes: ::c_long = 4000 + 267;
-pub const SYS_mbind: ::c_long = 4000 + 268;
-pub const SYS_get_mempolicy: ::c_long = 4000 + 269;
-pub const SYS_set_mempolicy: ::c_long = 4000 + 270;
-pub const SYS_mq_open: ::c_long = 4000 + 271;
-pub const SYS_mq_unlink: ::c_long = 4000 + 272;
-pub const SYS_mq_timedsend: ::c_long = 4000 + 273;
-pub const SYS_mq_timedreceive: ::c_long = 4000 + 274;
-pub const SYS_mq_notify: ::c_long = 4000 + 275;
-pub const SYS_mq_getsetattr: ::c_long = 4000 + 276;
-pub const SYS_vserver: ::c_long = 4000 + 277;
-pub const SYS_waitid: ::c_long = 4000 + 278;
-/* pub const SYS_sys_setaltroot: ::c_long = 4000 + 279; */
-pub const SYS_add_key: ::c_long = 4000 + 280;
-pub const SYS_request_key: ::c_long = 4000 + 281;
-pub const SYS_keyctl: ::c_long = 4000 + 282;
-pub const SYS_set_thread_area: ::c_long = 4000 + 283;
-pub const SYS_inotify_init: ::c_long = 4000 + 284;
-pub const SYS_inotify_add_watch: ::c_long = 4000 + 285;
-pub const SYS_inotify_rm_watch: ::c_long = 4000 + 286;
-pub const SYS_migrate_pages: ::c_long = 4000 + 287;
-pub const SYS_openat: ::c_long = 4000 + 288;
-pub const SYS_mkdirat: ::c_long = 4000 + 289;
-pub const SYS_mknodat: ::c_long = 4000 + 290;
-pub const SYS_fchownat: ::c_long = 4000 + 291;
-pub const SYS_futimesat: ::c_long = 4000 + 292;
-pub const SYS_unlinkat: ::c_long = 4000 + 294;
-pub const SYS_renameat: ::c_long = 4000 + 295;
-pub const SYS_linkat: ::c_long = 4000 + 296;
-pub const SYS_symlinkat: ::c_long = 4000 + 297;
-pub const SYS_readlinkat: ::c_long = 4000 + 298;
-pub const SYS_fchmodat: ::c_long = 4000 + 299;
-pub const SYS_faccessat: ::c_long = 4000 + 300;
-pub const SYS_pselect6: ::c_long = 4000 + 301;
-pub const SYS_ppoll: ::c_long = 4000 + 302;
-pub const SYS_unshare: ::c_long = 4000 + 303;
-pub const SYS_splice: ::c_long = 4000 + 304;
-pub const SYS_sync_file_range: ::c_long = 4000 + 305;
-pub const SYS_tee: ::c_long = 4000 + 306;
-pub const SYS_vmsplice: ::c_long = 4000 + 307;
-pub const SYS_move_pages: ::c_long = 4000 + 308;
-pub const SYS_set_robust_list: ::c_long = 4000 + 309;
-pub const SYS_get_robust_list: ::c_long = 4000 + 310;
-pub const SYS_kexec_load: ::c_long = 4000 + 311;
-pub const SYS_getcpu: ::c_long = 4000 + 312;
-pub const SYS_epoll_pwait: ::c_long = 4000 + 313;
-pub const SYS_ioprio_set: ::c_long = 4000 + 314;
-pub const SYS_ioprio_get: ::c_long = 4000 + 315;
-pub const SYS_utimensat: ::c_long = 4000 + 316;
-pub const SYS_signalfd: ::c_long = 4000 + 317;
-pub const SYS_timerfd: ::c_long = 4000 + 318;
-pub const SYS_eventfd: ::c_long = 4000 + 319;
-pub const SYS_fallocate: ::c_long = 4000 + 320;
-pub const SYS_timerfd_create: ::c_long = 4000 + 321;
-pub const SYS_timerfd_gettime: ::c_long = 4000 + 322;
-pub const SYS_timerfd_settime: ::c_long = 4000 + 323;
-pub const SYS_signalfd4: ::c_long = 4000 + 324;
-pub const SYS_eventfd2: ::c_long = 4000 + 325;
-pub const SYS_epoll_create1: ::c_long = 4000 + 326;
-pub const SYS_dup3: ::c_long = 4000 + 327;
-pub const SYS_pipe2: ::c_long = 4000 + 328;
-pub const SYS_inotify_init1: ::c_long = 4000 + 329;
-pub const SYS_preadv: ::c_long = 4000 + 330;
-pub const SYS_pwritev: ::c_long = 4000 + 331;
-pub const SYS_rt_tgsigqueueinfo: ::c_long = 4000 + 332;
-pub const SYS_perf_event_open: ::c_long = 4000 + 333;
-pub const SYS_accept4: ::c_long = 4000 + 334;
-pub const SYS_recvmmsg: ::c_long = 4000 + 335;
-pub const SYS_fanotify_init: ::c_long = 4000 + 336;
-pub const SYS_fanotify_mark: ::c_long = 4000 + 337;
-pub const SYS_prlimit64: ::c_long = 4000 + 338;
-pub const SYS_name_to_handle_at: ::c_long = 4000 + 339;
-pub const SYS_open_by_handle_at: ::c_long = 4000 + 340;
-pub const SYS_clock_adjtime: ::c_long = 4000 + 341;
-pub const SYS_syncfs: ::c_long = 4000 + 342;
-pub const SYS_sendmmsg: ::c_long = 4000 + 343;
-pub const SYS_setns: ::c_long = 4000 + 344;
-pub const SYS_process_vm_readv: ::c_long = 4000 + 345;
-pub const SYS_process_vm_writev: ::c_long = 4000 + 346;
-pub const SYS_kcmp: ::c_long = 4000 + 347;
-pub const SYS_finit_module: ::c_long = 4000 + 348;
-pub const SYS_sched_setattr: ::c_long = 4000 + 349;
-pub const SYS_sched_getattr: ::c_long = 4000 + 350;
-pub const SYS_renameat2: ::c_long = 4000 + 351;
-pub const SYS_seccomp: ::c_long = 4000 + 352;
-pub const SYS_getrandom: ::c_long = 4000 + 353;
-pub const SYS_memfd_create: ::c_long = 4000 + 354;
-pub const SYS_bpf: ::c_long = 4000 + 355;
-pub const SYS_execveat: ::c_long = 4000 + 356;
-pub const SYS_userfaultfd: ::c_long = 4000 + 357;
-pub const SYS_membarrier: ::c_long = 4000 + 358;
-pub const SYS_mlock2: ::c_long = 4000 + 359;
-pub const SYS_copy_file_range: ::c_long = 4000 + 360;
-pub const SYS_preadv2: ::c_long = 4000 + 361;
-pub const SYS_pwritev2: ::c_long = 4000 + 362;
-
-#[doc(hidden)]
-pub const AF_MAX: ::c_int = 42;
-#[doc(hidden)]
-pub const PF_MAX: ::c_int = AF_MAX;
--- a/third_party/rust/libc/src/unix/notbsd/linux/musl/b32/mod.rs
+++ b/third_party/rust/libc/src/unix/notbsd/linux/musl/b32/mod.rs
@@ -1,13 +1,11 @@
 pub type c_long = i32;
 pub type c_ulong = u32;
 pub type nlink_t = u32;
-pub type blksize_t = ::c_long;
-pub type __u64 = ::c_ulonglong;
 
 s! {
     pub struct pthread_attr_t {
         __size: [u32; 9]
     }
 
     pub struct sigset_t {
         __val: [::c_ulong; 32],
@@ -27,42 +25,32 @@ s! {
         pub cmsg_len: ::socklen_t,
         pub cmsg_level: ::c_int,
         pub cmsg_type: ::c_int,
     }
 
     pub struct sem_t {
         __val: [::c_int; 4],
     }
-
-    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 SIGSTKSZ: ::size_t = 8192;
-pub const MINSIGSTKSZ: ::size_t = 2048;
-
 pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
 pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24;
 
 cfg_if! {
     if #[cfg(any(target_arch = "x86"))] {
         mod x86;
         pub use self::x86::*;
     } else if #[cfg(any(target_arch = "mips"))] {
         mod mips;
         pub use self::mips::*;
     } else if #[cfg(any(target_arch = "arm"))] {
         mod arm;
         pub use self::arm::*;
+    } else if #[cfg(any(target_arch = "asmjs", target_arch = "wasm32"))] {
+        // For the time being asmjs and wasm32 are the same, and both
+        // backed by identical emscripten runtimes
+        mod asmjs;
+        pub use self::asmjs::*;
     } else {
         // Unknown target_arch
     }
 }
--- a/third_party/rust/libc/src/unix/notbsd/linux/musl/b32/x86.rs
+++ b/third_party/rust/libc/src/unix/notbsd/linux/musl/b32/x86.rs
@@ -115,65 +115,22 @@ s! {
 
     pub struct siginfo_t {
         pub si_signo: ::c_int,
         pub si_errno: ::c_int,
         pub si_code: ::c_int,
         pub _pad: [::c_int; 29],
         _align: [usize; 0],
     }
-
-    pub struct statfs64 {
-        pub f_type: ::c_ulong,
-        pub f_bsize: ::c_ulong,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_files: ::fsfilcnt_t,
-        pub f_ffree: ::fsfilcnt_t,
-        pub f_fsid: ::fsid_t,
-        pub f_namelen: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_flags: ::c_ulong,
-        pub f_spare: [::c_ulong; 4],
-    }
-
-    pub struct statvfs64 {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_bavail: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        pub f_favail: u64,
-        pub f_fsid: ::c_ulong,
-        __f_unused: ::c_int,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-        __f_spare: [::c_int; 6],
-    }
-
-    pub struct termios2 {
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_line: ::cc_t,
-        pub c_cc: [::cc_t; 19],
-        pub c_ispeed: ::speed_t,
-        pub c_ospeed: ::speed_t,
-    }
 }
 
 pub const O_DIRECT: ::c_int = 0x4000;
 pub const O_DIRECTORY: ::c_int = 0x10000;
 pub const O_NOFOLLOW: ::c_int = 0x20000;
 pub const O_ASYNC: ::c_int = 0x2000;
-pub const O_LARGEFILE: ::c_int = 0o0100000;
 
 pub const FIOCLEX: ::c_int = 0x5451;
 pub const FIONBIO: ::c_int = 0x5421;
 
 pub const RLIMIT_RSS: ::c_int = 5;
 pub const RLIMIT_NOFILE: ::c_int = 7;
 pub const RLIMIT_AS: ::c_int = 9;
 pub const RLIMIT_NPROC: ::c_int = 6;
@@ -391,426 +348,13 @@ pub const TIOCGWINSZ: ::c_int = 0x5413;
 pub const TIOCSWINSZ: ::c_int = 0x5414;
 pub const TIOCMGET: ::c_int = 0x5415;
 pub const TIOCMBIS: ::c_int = 0x5416;
 pub const TIOCMBIC: ::c_int = 0x5417;
 pub const TIOCMSET: ::c_int = 0x5418;
 pub const FIONREAD: ::c_int = 0x541B;
 pub const TIOCCONS: ::c_int = 0x541D;
 
+pub const SYS_gettid: ::c_long = 224;
+pub const SYS_perf_event_open: ::c_long = 336;
+
 pub const POLLWRNORM: ::c_short = 0x100;
 pub const POLLWRBAND: ::c_short = 0x200;
-
-pub const TIOCM_LE: ::c_int = 0x001;
-pub const TIOCM_DTR: ::c_int = 0x002;
-pub const TIOCM_RTS: ::c_int = 0x004;
-pub const TIOCM_ST: ::c_int = 0x008;
-pub const TIOCM_SR: ::c_int = 0x010;
-pub const TIOCM_CTS: ::c_int = 0x020;
-pub const TIOCM_CAR: ::c_int = 0x040;
-pub const TIOCM_RNG: ::c_int = 0x080;
-pub const TIOCM_DSR: ::c_int = 0x100;
-pub const TIOCM_CD: ::c_int = TIOCM_CAR;
-pub const TIOCM_RI: ::c_int = TIOCM_RNG;
-
-// Syscall table
-pub const SYS_restart_syscall: ::c_long = 0;
-pub const SYS_exit: ::c_long = 1;
-pub const SYS_fork: ::c_long = 2;
-pub const SYS_read: ::c_long = 3;
-pub const SYS_write: ::c_long = 4;
-pub const SYS_open: ::c_long = 5;
-pub const SYS_close: ::c_long = 6;
-pub const SYS_waitpid: ::c_long = 7;
-pub const SYS_creat: ::c_long = 8;
-pub const SYS_link: ::c_long = 9;
-pub const SYS_unlink: ::c_long = 10;
-pub const SYS_execve: ::c_long = 11;
-pub const SYS_chdir: ::c_long = 12;
-pub const SYS_time: ::c_long = 13;
-pub const SYS_mknod: ::c_long = 14;
-pub const SYS_chmod: ::c_long = 15;
-pub const SYS_lchown: ::c_long = 16;
-pub const SYS_break: ::c_long = 17;
-pub const SYS_oldstat: ::c_long = 18;
-pub const SYS_lseek: ::c_long = 19;
-pub const SYS_getpid: ::c_long = 20;
-pub const SYS_mount: ::c_long = 21;
-pub const SYS_umount: ::c_long = 22;
-pub const SYS_setuid: ::c_long = 23;
-pub const SYS_getuid: ::c_long = 24;
-pub const SYS_stime: ::c_long = 25;
-pub const SYS_ptrace: ::c_long = 26;
-pub const SYS_alarm: ::c_long = 27;
-pub const SYS_oldfstat: ::c_long = 28;
-pub const SYS_pause: ::c_long = 29;
-pub const SYS_utime: ::c_long = 30;
-pub const SYS_stty: ::c_long = 31;
-pub const SYS_gtty: ::c_long = 32;
-pub const SYS_access: ::c_long = 33;
-pub const SYS_nice: ::c_long = 34;
-pub const SYS_ftime: ::c_long = 35;
-pub const SYS_sync: ::c_long = 36;
-pub const SYS_kill: ::c_long = 37;
-pub const SYS_rename: ::c_long = 38;
-pub const SYS_mkdir: ::c_long = 39;
-pub const SYS_rmdir: ::c_long = 40;
-pub const SYS_dup: ::c_long = 41;
-pub const SYS_pipe: ::c_long = 42;
-pub const SYS_times: ::c_long = 43;
-pub const SYS_prof: ::c_long = 44;
-pub const SYS_brk: ::c_long = 45;
-pub const SYS_setgid: ::c_long = 46;
-pub const SYS_getgid: ::c_long = 47;
-pub const SYS_signal: ::c_long = 48;
-pub const SYS_geteuid: ::c_long = 49;
-pub const SYS_getegid: ::c_long = 50;
-pub const SYS_acct: ::c_long = 51;
-pub const SYS_umount2: ::c_long = 52;
-pub const SYS_lock: ::c_long = 53;
-pub const SYS_ioctl: ::c_long = 54;
-pub const SYS_fcntl: ::c_long = 55;
-pub const SYS_mpx: ::c_long = 56;
-pub const SYS_setpgid: ::c_long = 57;
-pub const SYS_ulimit: ::c_long = 58;
-pub const SYS_oldolduname: ::c_long = 59;
-pub const SYS_umask: ::c_long = 60;
-pub const SYS_chroot: ::c_long = 61;
-pub const SYS_ustat: ::c_long = 62;
-pub const SYS_dup2: ::c_long = 63;
-pub const SYS_getppid: ::c_long = 64;
-pub const SYS_getpgrp: ::c_long = 65;
-pub const SYS_setsid: ::c_long = 66;
-pub const SYS_sigaction: ::c_long = 67;
-pub const SYS_sgetmask: ::c_long = 68;
-pub const SYS_ssetmask: ::c_long = 69;
-pub const SYS_setreuid: ::c_long = 70;
-pub const SYS_setregid: ::c_long = 71;
-pub const SYS_sigsuspend: ::c_long = 72;
-pub const SYS_sigpending: ::c_long = 73;
-pub const SYS_sethostname: ::c_long = 74;
-pub const SYS_setrlimit: ::c_long = 75;
-pub const SYS_getrlimit: ::c_long = 76;
-pub const SYS_getrusage: ::c_long = 77;
-pub const SYS_gettimeofday: ::c_long = 78;
-pub const SYS_settimeofday: ::c_long = 79;
-pub const SYS_getgroups: ::c_long = 80;
-pub const SYS_setgroups: ::c_long = 81;
-pub const SYS_select: ::c_long = 82;
-pub const SYS_symlink: ::c_long = 83;
-pub const SYS_oldlstat: ::c_long = 84;
-pub const SYS_readlink: ::c_long = 85;
-pub const SYS_uselib: ::c_long = 86;
-pub const SYS_swapon: ::c_long = 87;
-pub const SYS_reboot: ::c_long = 88;
-pub const SYS_readdir: ::c_long = 89;
-pub const SYS_mmap: ::c_long = 90;
-pub const SYS_munmap: ::c_long = 91;
-pub const SYS_truncate: ::c_long = 92;
-pub const SYS_ftruncate: ::c_long = 93;
-pub const SYS_fchmod: ::c_long = 94;
-pub const SYS_fchown: ::c_long = 95;
-pub const SYS_getpriority: ::c_long = 96;
-pub const SYS_setpriority: ::c_long = 97;
-pub const SYS_profil: ::c_long = 98;
-pub const SYS_statfs: ::c_long = 99;
-pub const SYS_fstatfs: ::c_long = 100;
-pub const SYS_ioperm: ::c_long = 101;
-pub const SYS_socketcall: ::c_long = 102;
-pub const SYS_syslog: ::c_long = 103;
-pub const SYS_setitimer: ::c_long = 104;
-pub const SYS_getitimer: ::c_long = 105;
-pub const SYS_stat: ::c_long = 106;
-pub const SYS_lstat: ::c_long = 107;
-pub const SYS_fstat: ::c_long = 108;
-pub const SYS_olduname: ::c_long = 109;
-pub const SYS_iopl: ::c_long = 110;
-pub const SYS_vhangup: ::c_long = 111;
-pub const SYS_idle: ::c_long = 112;
-pub const SYS_vm86old: ::c_long = 113;
-pub const SYS_wait4: ::c_long = 114;
-pub const SYS_swapoff: ::c_long = 115;
-pub const SYS_sysinfo: ::c_long = 116;
-pub const SYS_ipc: ::c_long = 117;
-pub const SYS_fsync: ::c_long = 118;
-pub const SYS_sigreturn: ::c_long = 119;
-pub const SYS_clone: ::c_long = 120;
-pub const SYS_setdomainname: ::c_long = 121;
-pub const SYS_uname: ::c_long = 122;
-pub const SYS_modify_ldt: ::c_long = 123;
-pub const SYS_adjtimex: ::c_long = 124;
-pub const SYS_mprotect: ::c_long = 125;
-pub const SYS_sigprocmask: ::c_long = 126;
-pub const SYS_create_module: ::c_long = 127;
-pub const SYS_init_module: ::c_long = 128;
-pub const SYS_delete_module: ::c_long = 129;
-pub const SYS_get_kernel_syms: ::c_long = 130;
-pub const SYS_quotactl: ::c_long = 131;
-pub const SYS_getpgid: ::c_long = 132;
-pub const SYS_fchdir: ::c_long = 133;
-pub const SYS_bdflush: ::c_long = 134;
-pub const SYS_sysfs: ::c_long = 135;
-pub const SYS_personality: ::c_long = 136;
-pub const SYS_afs_syscall: ::c_long = 137;
-pub const SYS_setfsuid: ::c_long = 138;
-pub const SYS_setfsgid: ::c_long = 139;
-pub const SYS__llseek: ::c_long = 140;
-pub const SYS_getdents: ::c_long = 141;
-pub const SYS__newselect: ::c_long = 142;
-pub const SYS_flock: ::c_long = 143;
-pub const SYS_msync: ::c_long = 144;
-pub const SYS_readv: ::c_long = 145;
-pub const SYS_writev: ::c_long = 146;
-pub const SYS_getsid: ::c_long = 147;
-pub const SYS_fdatasync: ::c_long = 148;
-pub const SYS__sysctl: ::c_long = 149;
-pub const SYS_mlock: ::c_long = 150;
-pub const SYS_munlock: ::c_long = 151;
-pub const SYS_mlockall: ::c_long = 152;
-pub const SYS_munlockall: ::c_long = 153;
-pub const SYS_sched_setparam: ::c_long = 154;
-pub const SYS_sched_getparam: ::c_long = 155;
-pub const SYS_sched_setscheduler: ::c_long = 156;
-pub const SYS_sched_getscheduler: ::c_long = 157;
-pub const SYS_sched_yield: ::c_long = 158;
-pub const SYS_sched_get_priority_max: ::c_long = 159;
-pub const SYS_sched_get_priority_min: ::c_long = 160;
-pub const SYS_sched_rr_get_interval: ::c_long = 161;
-pub const SYS_nanosleep: ::c_long = 162;
-pub const SYS_mremap: ::c_long = 163;
-pub const SYS_setresuid: ::c_long = 164;
-pub const SYS_getresuid: ::c_long = 165;
-pub const SYS_vm86: ::c_long = 166;
-pub const SYS_query_module: ::c_long = 167;
-pub const SYS_poll: ::c_long = 168;
-pub const SYS_nfsservctl: ::c_long = 169;
-pub const SYS_setresgid: ::c_long = 170;
-pub const SYS_getresgid: ::c_long = 171;
-pub const SYS_prctl: ::c_long = 172;
-pub const SYS_rt_sigreturn: ::c_long = 173;
-pub const SYS_rt_sigaction: ::c_long = 174;
-pub const SYS_rt_sigprocmask: ::c_long = 175;
-pub const SYS_rt_sigpending: ::c_long = 176;
-pub const SYS_rt_sigtimedwait: ::c_long = 177;
-pub const SYS_rt_sigqueueinfo: ::c_long = 178;
-pub const SYS_rt_sigsuspend: ::c_long = 179;
-pub const SYS_pread64: ::c_long = 180;
-pub const SYS_pwrite64: ::c_long = 181;
-pub const SYS_chown: ::c_long = 182;
-pub const SYS_getcwd: ::c_long = 183;
-pub const SYS_capget: ::c_long = 184;
-pub const SYS_capset: ::c_long = 185;
-pub const SYS_sigaltstack: ::c_long = 186;
-pub const SYS_sendfile: ::c_long = 187;
-pub const SYS_getpmsg: ::c_long = 188;
-pub const SYS_putpmsg: ::c_long = 189;
-pub const SYS_vfork: ::c_long = 190;
-pub const SYS_ugetrlimit: ::c_long = 191;
-pub const SYS_mmap2: ::c_long = 192;
-pub const SYS_truncate64: ::c_long = 193;
-pub const SYS_ftruncate64: ::c_long = 194;
-pub const SYS_stat64: ::c_long = 195;
-pub const SYS_lstat64: ::c_long = 196;
-pub const SYS_fstat64: ::c_long = 197;
-pub const SYS_lchown32: ::c_long = 198;
-pub const SYS_getuid32: ::c_long = 199;
-pub const SYS_getgid32: ::c_long = 200;
-pub const SYS_geteuid32: ::c_long = 201;
-pub const SYS_getegid32: ::c_long = 202;
-pub const SYS_setreuid32: ::c_long = 203;
-pub const SYS_setregid32: ::c_long = 204;
-pub const SYS_getgroups32: ::c_long = 205;
-pub const SYS_setgroups32: ::c_long = 206;
-pub const SYS_fchown32: ::c_long = 207;
-pub const SYS_setresuid32: ::c_long = 208;
-pub const SYS_getresuid32: ::c_long = 209;
-pub const SYS_setresgid32: ::c_long = 210;
-pub const SYS_getresgid32: ::c_long = 211;
-pub const SYS_chown32: ::c_long = 212;
-pub const SYS_setuid32: ::c_long = 213;
-pub const SYS_setgid32: ::c_long = 214;
-pub const SYS_setfsuid32: ::c_long = 215;
-pub const SYS_setfsgid32: ::c_long = 216;
-pub const SYS_pivot_root: ::c_long = 217;
-pub const SYS_mincore: ::c_long = 218;
-pub const SYS_madvise: ::c_long = 219;
-pub const SYS_getdents64: ::c_long = 220;
-pub const SYS_fcntl64: ::c_long = 221;
-pub const SYS_gettid: ::c_long = 224;
-pub const SYS_readahead: ::c_long = 225;
-pub const SYS_setxattr: ::c_long = 226;
-pub const SYS_lsetxattr: ::c_long = 227;
-pub const SYS_fsetxattr: ::c_long = 228;
-pub const SYS_getxattr: ::c_long = 229;
-pub const SYS_lgetxattr: ::c_long = 230;
-pub const SYS_fgetxattr: ::c_long = 231;
-pub const SYS_listxattr: ::c_long = 232;
-pub const SYS_llistxattr: ::c_long = 233;
-pub const SYS_flistxattr: ::c_long = 234;
-pub const SYS_removexattr: ::c_long = 235;
-pub const SYS_lremovexattr: ::c_long = 236;
-pub const SYS_fremovexattr: ::c_long = 237;
-pub const SYS_tkill: ::c_long = 238;
-pub const SYS_sendfile64: ::c_long = 239;
-pub const SYS_futex: ::c_long = 240;
-pub const SYS_sched_setaffinity: ::c_long = 241;
-pub const SYS_sched_getaffinity: ::c_long = 242;
-pub const SYS_set_thread_area: ::c_long = 243;
-pub const SYS_get_thread_area: ::c_long = 244;
-pub const SYS_io_setup: ::c_long = 245;
-pub const SYS_io_destroy: ::c_long = 246;
-pub const SYS_io_getevents: ::c_long = 247;
-pub const SYS_io_submit: ::c_long = 248;
-pub const SYS_io_cancel: ::c_long = 249;
-pub const SYS_fadvise64: ::c_long = 250;
-pub const SYS_exit_group: ::c_long = 252;
-pub const SYS_lookup_dcookie: ::c_long = 253;
-pub const SYS_epoll_create: ::c_long = 254;
-pub const SYS_epoll_ctl: ::c_long = 255;
-pub const SYS_epoll_wait: ::c_long = 256;
-pub const SYS_remap_file_pages: ::c_long = 257;
-pub const SYS_set_tid_address: ::c_long = 258;
-pub const SYS_timer_create: ::c_long = 259;
-pub const SYS_timer_settime: ::c_long = 260;
-pub const SYS_timer_gettime: ::c_long = 261;
-pub const SYS_timer_getoverrun: ::c_long = 262;
-pub const SYS_timer_delete: ::c_long = 263;
-pub const SYS_clock_settime: ::c_long = 264;
-pub const SYS_clock_gettime: ::c_long = 265;
-pub const SYS_clock_getres: ::c_long = 266;
-pub const SYS_clock_nanosleep: ::c_long = 267;
-pub const SYS_statfs64: ::c_long = 268;
-pub const SYS_fstatfs64: ::c_long = 269;
-pub const SYS_tgkill: ::c_long = 270;
-pub const SYS_utimes: ::c_long = 271;
-pub const SYS_fadvise64_64: ::c_long = 272;
-pub const SYS_vserver: ::c_long = 273;
-pub const SYS_mbind: ::c_long = 274;
-pub const SYS_get_mempolicy: ::c_long = 275;
-pub const SYS_set_mempolicy: ::c_long = 276;
-pub const SYS_mq_open: ::c_long = 277;
-pub const SYS_mq_unlink: ::c_long = 278;
-pub const SYS_mq_timedsend: ::c_long = 279;
-pub const SYS_mq_timedreceive: ::c_long = 280;
-pub const SYS_mq_notify: ::c_long = 281;
-pub const SYS_mq_getsetattr: ::c_long = 282;
-pub const SYS_kexec_load: ::c_long = 283;
-pub const SYS_waitid: ::c_long = 284;
-pub const SYS_add_key: ::c_long = 286;
-pub const SYS_request_key: ::c_long = 287;
-pub const SYS_keyctl: ::c_long = 288;
-pub const SYS_ioprio_set: ::c_long = 289;
-pub const SYS_ioprio_get: ::c_long = 290;
-pub const SYS_inotify_init: ::c_long = 291;
-pub const SYS_inotify_add_watch: ::c_long = 292;
-pub const SYS_inotify_rm_watch: ::c_long = 293;
-pub const SYS_migrate_pages: ::c_long = 294;
-pub const SYS_openat: ::c_long = 295;
-pub const SYS_mkdirat: ::c_long = 296;
-pub const SYS_mknodat: ::c_long = 297;
-pub const SYS_fchownat: ::c_long = 298;
-pub const SYS_futimesat: ::c_long = 299;
-pub const SYS_fstatat64: ::c_long = 300;
-pub const SYS_unlinkat: ::c_long = 301;
-pub const SYS_renameat: ::c_long = 302;
-pub const SYS_linkat: ::c_long = 303;
-pub const SYS_symlinkat: ::c_long = 304;
-pub const SYS_readlinkat: ::c_long = 305;
-pub const SYS_fchmodat: ::c_long = 306;
-pub const SYS_faccessat: ::c_long = 307;
-pub const SYS_pselect6: ::c_long = 308;
-pub const SYS_ppoll: ::c_long = 309;
-pub const SYS_unshare: ::c_long = 310;
-pub const SYS_set_robust_list: ::c_long = 311;
-pub const SYS_get_robust_list: ::c_long = 312;
-pub const SYS_splice: ::c_long = 313;
-pub const SYS_sync_file_range: ::c_long = 314;
-pub const SYS_tee: ::c_long = 315;
-pub const SYS_vmsplice: ::c_long = 316;
-pub const SYS_move_pages: ::c_long = 317;
-pub const SYS_getcpu: ::c_long = 318;
-pub const SYS_epoll_pwait: ::c_long = 319;
-pub const SYS_utimensat: ::c_long = 320;
-pub const SYS_signalfd: ::c_long = 321;
-pub const SYS_timerfd_create: ::c_long = 322;
-pub const SYS_eventfd: ::c_long = 323;
-pub const SYS_fallocate: ::c_long = 324;
-pub const SYS_timerfd_settime: ::c_long = 325;
-pub const SYS_timerfd_gettime: ::c_long = 326;
-pub const SYS_signalfd4: ::c_long = 327;
-pub const SYS_eventfd2: ::c_long = 328;
-pub const SYS_epoll_create1: ::c_long = 329;
-pub const SYS_dup3: ::c_long = 330;
-pub const SYS_pipe2: ::c_long = 331;
-pub const SYS_inotify_init1: ::c_long = 332;
-pub const SYS_preadv: ::c_long = 333;
-pub const SYS_pwritev: ::c_long = 334;
-pub const SYS_rt_tgsigqueueinfo: ::c_long = 335;
-pub const SYS_perf_event_open: ::c_long = 336;
-pub const SYS_recvmmsg: ::c_long = 337;
-pub const SYS_fanotify_init: ::c_long = 338;
-pub const SYS_fanotify_mark: ::c_long = 339;
-pub const SYS_prlimit64: ::c_long = 340;
-pub const SYS_name_to_handle_at: ::c_long = 341;
-pub const SYS_open_by_handle_at: ::c_long = 342;
-pub const SYS_clock_adjtime: ::c_long = 343;
-pub const SYS_syncfs: ::c_long = 344;
-pub const SYS_sendmmsg: ::c_long = 345;
-pub const SYS_setns: ::c_long = 346;
-pub const SYS_process_vm_readv: ::c_long = 347;
-pub const SYS_process_vm_writev: ::c_long = 348;
-pub const SYS_kcmp: ::c_long = 349;
-pub const SYS_finit_module: ::c_long = 350;
-pub const SYS_sched_setattr: ::c_long = 351;
-pub const SYS_sched_getattr: ::c_long = 352;
-pub const SYS_renameat2: ::c_long = 353;
-pub const SYS_seccomp: ::c_long = 354;
-pub const SYS_getrandom: ::c_long = 355;
-pub const SYS_memfd_create: ::c_long = 356;
-pub const SYS_bpf: ::c_long = 357;
-pub const SYS_execveat: ::c_long = 358;
-pub const SYS_socket: ::c_long = 359;
-pub const SYS_socketpair: ::c_long = 360;
-pub const SYS_bind: ::c_long = 361;
-pub const SYS_connect: ::c_long = 362;
-pub const SYS_listen: ::c_long = 363;
-pub const SYS_accept4: ::c_long = 364;
-pub const SYS_getsockopt: ::c_long = 365;
-pub const SYS_setsockopt: ::c_long = 366;
-pub const SYS_getsockname: ::c_long = 367;
-pub const SYS_getpeername: ::c_long = 368;
-pub const SYS_sendto: ::c_long = 369;
-pub const SYS_sendmsg: ::c_long = 370;
-pub const SYS_recvfrom: ::c_long = 371;
-pub const SYS_recvmsg: ::c_long = 372;
-pub const SYS_shutdown: ::c_long = 373;
-pub const SYS_userfaultfd: ::c_long = 374;
-pub const SYS_membarrier: ::c_long = 375;
-pub const SYS_mlock2: ::c_long = 376;
-pub const SYS_copy_file_range: ::c_long = 377;
-pub const SYS_preadv2: ::c_long = 378;
-pub const SYS_pwritev2: ::c_long = 379;
-// FIXME syscalls 380-382 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 EBX: ::c_int = 0;
-pub const ECX: ::c_int = 1;
-pub const EDX: ::c_int = 2;
-pub const ESI: ::c_int = 3;
-pub const EDI: ::c_int = 4;
-pub const EBP: ::c_int = 5;
-pub const EAX: ::c_int = 6;
-pub const DS: ::c_int = 7;
-pub const ES: ::c_int = 8;
-pub const FS: ::c_int = 9;
-pub const GS: ::c_int = 10;
-pub const ORIG_EAX: ::c_int = 11;
-pub const EIP: ::c_int = 12;
-pub const CS: ::c_int = 13;
-pub const EFL: ::c_int = 14;
-pub const UESP: ::c_int = 15;
-pub const SS: ::c_int = 16;
-
-#[doc(hidden)]
-pub const AF_MAX: ::c_int = 42;
-#[doc(hidden)]
-pub const PF_MAX: ::c_int = AF_MAX;
--- a/third_party/rust/libc/src/unix/notbsd/linux/musl/b64/aarch64.rs
+++ b/third_party/rust/libc/src/unix/notbsd/linux/musl/b64/aarch64.rs
@@ -1,341 +1,3 @@
 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 O_DIRECT: ::c_int = 0x10000;
-pub const O_DIRECTORY: ::c_int = 0x4000;
-pub const O_LARGEFILE: ::c_int = 0x20000;
-pub const O_NOFOLLOW: ::c_int = 0x8000;
-
-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;
--- a/third_party/rust/libc/src/unix/notbsd/linux/musl/b64/mod.rs
+++ b/third_party/rust/libc/src/unix/notbsd/linux/musl/b64/mod.rs
@@ -1,40 +1,54 @@
+pub type wchar_t = i32;
 pub type c_long = i64;
 pub type c_ulong = u64;
+pub type nlink_t = u64;
 
 s! {
-    pub struct statfs64 {
-        pub f_type: ::c_ulong,
-        pub f_bsize: ::c_ulong,
-        pub f_blocks: ::fsblkcnt_t,
-        pub f_bfree: ::fsblkcnt_t,
-        pub f_bavail: ::fsblkcnt_t,
-        pub f_files: ::fsfilcnt_t,
-        pub f_ffree: ::fsfilcnt_t,
-        pub f_fsid: ::fsid_t,
-        pub f_namelen: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_flags: ::c_ulong,
-        pub f_spare: [::c_ulong; 4],
+    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 statvfs64 {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_bavail: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        pub f_favail: u64,
-        pub f_fsid: ::c_ulong,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-        __f_spare: [::c_int; 6],
+    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 stack_t {
         pub ss_sp: *mut ::c_void,
         pub ss_flags: ::c_int,
         pub ss_size: ::size_t
     }
 
@@ -113,32 +127,24 @@ s! {
 
     pub struct siginfo_t {
         pub si_signo: ::c_int,
         pub si_errno: ::c_int,
         pub si_code: ::c_int,
         pub _pad: [::c_int; 29],
         _align: [usize; 0],
     }
-
-    pub struct termios2 {
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_line: ::cc_t,
-        pub c_cc: [::cc_t; 19],
-        pub c_ispeed: ::speed_t,
-        pub c_ospeed: ::speed_t,
-    }
 }
 
 pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
 pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
 
+pub const O_DIRECT: ::c_int = 0x4000;
+pub const O_DIRECTORY: ::c_int = 0x10000;
+pub const O_NOFOLLOW: ::c_int = 0x20000;
 pub const O_ASYNC: ::c_int = 0x2000;
 
 pub const FIOCLEX: ::c_int = 0x5451;
 pub const FIONBIO: ::c_int = 0x5421;
 
 pub const RLIMIT_RSS: ::c_int = 5;
 pub const RLIMIT_NOFILE: ::c_int = 7;
 pub const RLIMIT_AS: ::c_int = 9;
@@ -160,16 +166,17 @@ pub const MAP_ANON: ::c_int = 0x0020;
 pub const MAP_GROWSDOWN: ::c_int = 0x0100;
 pub const MAP_DENYWRITE: ::c_int = 0x0800;
 pub const MAP_EXECUTABLE: ::c_int = 0x01000;
 pub const MAP_LOCKED: ::c_int = 0x02000;
 pub const MAP_NORESERVE: ::c_int = 0x04000;
 pub const MAP_POPULATE: ::c_int = 0x08000;
 pub const MAP_NONBLOCK: ::c_int = 0x010000;
 pub const MAP_STACK: ::c_int = 0x020000;
+pub const MAP_32BIT: ::c_int = 0x0040;
 
 pub const SOCK_STREAM: ::c_int = 1;
 pub const SOCK_DGRAM: ::c_int = 2;
 pub const SOCK_SEQPACKET: ::c_int = 5;
 
 pub const SOL_SOCKET: ::c_int = 1;
 
 pub const EDEADLK: ::c_int = 35;
@@ -359,28 +366,16 @@ pub const TIOCMBIS: ::c_int = 0x5416;
 pub const TIOCMBIC: ::c_int = 0x5417;
 pub const TIOCMSET: ::c_int = 0x5418;
 pub const FIONREAD: ::c_int = 0x541B;
 pub const TIOCCONS: ::c_int = 0x541D;
 
 pub const POLLWRNORM: ::c_short = 0x100;
 pub const POLLWRBAND: ::c_short = 0x200;
 
-pub const TIOCM_LE: ::c_int = 0x001;
-pub const TIOCM_DTR: ::c_int = 0x002;
-pub const TIOCM_RTS: ::c_int = 0x004;
-pub const TIOCM_ST: ::c_int = 0x008;
-pub const TIOCM_SR: ::c_int = 0x010;
-pub const TIOCM_CTS: ::c_int = 0x020;
-pub const TIOCM_CAR: ::c_int = 0x040;
-pub const TIOCM_RNG: ::c_int = 0x080;
-pub const TIOCM_DSR: ::c_int = 0x100;
-pub const TIOCM_CD: ::c_int = TIOCM_CAR;
-pub const TIOCM_RI: ::c_int = TIOCM_RNG;
-
 cfg_if! {
     if #[cfg(target_arch = "aarch64")] {
         mod aarch64;
         pub use self::aarch64::*;
     } else if #[cfg(any(target_arch = "powerpc64"))] {
         mod powerpc64;
         pub use self::powerpc64::*;
     } else if #[cfg(any(target_arch = "x86_64"))] {
--- a/third_party/rust/libc/src/unix/notbsd/linux/musl/b64/powerpc64.rs
+++ b/third_party/rust/libc/src/unix/notbsd/linux/musl/b64/powerpc64.rs
@@ -1,83 +1,3 @@
 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 O_DIRECT: ::c_int = 0x4000;
-pub const O_DIRECTORY: ::c_int = 0x10000;
-pub const O_LARGEFILE: ::c_int = 0;
-pub const O_NOFOLLOW: ::c_int = 0x20000;
-
-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;
--- a/third_party/rust/libc/src/unix/notbsd/linux/musl/b64/x86_64.rs
+++ b/third_party/rust/libc/src/unix/notbsd/linux/musl/b64/x86_64.rs
@@ -1,451 +1,20 @@
 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_gettid: ::c_long = 186;
 
-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 O_DIRECT: ::c_int = 0x4000;
-pub const O_DIRECTORY: ::c_int = 0x10000;
-pub const O_LARGEFILE: ::c_int = 0;
-pub const O_NOFOLLOW: ::c_int = 0x20000;
-
-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;
--- a/third_party/rust/libc/src/unix/notbsd/linux/musl/mod.rs
+++ b/third_party/rust/libc/src/unix/notbsd/linux/musl/mod.rs
@@ -1,18 +1,16 @@
 pub type clock_t = c_long;
 pub type time_t = c_long;
 pub type suseconds_t = c_long;
 pub type ino_t = u64;
 pub type off_t = i64;
 pub type blkcnt_t = i64;
 
-pub type shmatt_t = ::c_ulong;
-pub type msgqnum_t = ::c_ulong;
-pub type msglen_t = ::c_ulong;
+pub type blksize_t = c_long;
 pub type fsblkcnt_t = ::c_ulonglong;
 pub type fsfilcnt_t = ::c_ulonglong;
 pub type rlim_t = ::c_ulonglong;
 
 s! {
     pub struct aiocb {
         pub aio_fildes: ::c_int,
         pub aio_lio_opcode: ::c_int,
@@ -35,16 +33,28 @@ s! {
 
     pub struct sigaction {
         pub sa_sigaction: ::sighandler_t,
         pub sa_mask: ::sigset_t,
         pub sa_flags: ::c_int,
         pub sa_restorer: ::dox::Option<extern fn()>,
     }
 
+    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 struct termios {
         pub c_iflag: ::tcflag_t,
         pub c_oflag: ::tcflag_t,
         pub c_cflag: ::tcflag_t,
         pub c_lflag: ::tcflag_t,
         pub c_line: ::cc_t,
         pub c_cc: [::cc_t; ::NCCS],
         pub __c_ispeed: ::speed_t,
@@ -70,30 +80,26 @@ s! {
         pub freeswap: ::c_ulong,
         pub procs: ::c_ushort,
         pub pad: ::c_ushort,
         pub totalhigh: ::c_ulong,
         pub freehigh: ::c_ulong,
         pub mem_unit: ::c_uint,
         pub __reserved: [::c_char; 256],
     }
+}
 
-    pub struct ucred {
-        pub pid: ::pid_t,
-        pub uid: ::uid_t,
-        pub gid: ::gid_t,
-    }
-}
+pub const CLONE_NEWCGROUP: ::c_int = 0x02000000;
 
 pub const SFD_CLOEXEC: ::c_int = 0x080000;
 
 pub const NCCS: usize = 32;
 
 pub const O_TRUNC: ::c_int = 512;
-pub const O_NOATIME: ::c_int = 0o1000000;
+
 pub const O_CLOEXEC: ::c_int = 0x80000;
 
 pub const EBFONT: ::c_int = 59;
 pub const ENOSTR: ::c_int = 60;
 pub const ENODATA: ::c_int = 61;
 pub const ETIME: ::c_int = 62;
 pub const ENOSR: ::c_int = 63;
 pub const ENONET: ::c_int = 64;
@@ -131,70 +137,91 @@ pub const POSIX_FADV_NOREUSE: ::c_int = 
 pub const POSIX_MADV_DONTNEED: ::c_int = 4;
 
 pub const RLIM_INFINITY: ::rlim_t = !0;
 pub const RLIMIT_RTTIME: ::c_int = 15;
 pub const RLIMIT_NLIMITS: ::c_int = 16;
 
 pub const MAP_ANONYMOUS: ::c_int = MAP_ANON;
 
-pub const SOCK_DCCP: ::c_int = 6;
-pub const SOCK_PACKET: ::c_int = 10;
-
 pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15;
 pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16;
 pub const TCP_THIN_DUPACK: ::c_int = 17;
 pub const TCP_USER_TIMEOUT: ::c_int = 18;
 pub const TCP_REPAIR: ::c_int = 19;
 pub const TCP_REPAIR_QUEUE: ::c_int = 20;
 pub const TCP_QUEUE_SEQ: ::c_int = 21;
 pub const TCP_REPAIR_OPTIONS: ::c_int = 22;
 pub const TCP_FASTOPEN: ::c_int = 23;
 pub const TCP_TIMESTAMP: ::c_int = 24;
 
 pub const SIGUNUSED: ::c_int = ::SIGSYS;
 
+pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01;
+pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02;
+
 pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
 pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
-pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
 
 pub const CPU_SETSIZE: ::c_int = 128;
 
+pub const QFMT_VFS_V1: ::c_int = 4;
+
 pub const PTRACE_TRACEME: ::c_int = 0;
 pub const PTRACE_PEEKTEXT: ::c_int = 1;
 pub const PTRACE_PEEKDATA: ::c_int = 2;
 pub const PTRACE_PEEKUSER: ::c_int = 3;
 pub const PTRACE_POKETEXT: ::c_int = 4;
 pub const PTRACE_POKEDATA: ::c_int = 5;
 pub const PTRACE_POKEUSER: ::c_int = 6;
 pub const PTRACE_CONT: ::c_int = 7;
 pub const PTRACE_KILL: ::c_int = 8;
 pub const PTRACE_SINGLESTEP: ::c_int = 9;
-pub const PTRACE_GETREGS: ::c_int = 12;
-pub const PTRACE_SETREGS: ::c_int = 13;
-pub const PTRACE_GETFPREGS: ::c_int = 14;
-pub const PTRACE_SETFPREGS: ::c_int = 15;
 pub const PTRACE_ATTACH: ::c_int = 16;
 pub const PTRACE_DETACH: ::c_int = 17;
-pub const PTRACE_GETFPXREGS: ::c_int = 18;
-pub const PTRACE_SETFPXREGS: ::c_int = 19;
 pub const PTRACE_SYSCALL: ::c_int = 24;
 pub const PTRACE_SETOPTIONS: ::c_int = 0x4200;
 pub const PTRACE_GETEVENTMSG: ::c_int = 0x4201;
 pub const PTRACE_GETSIGINFO: ::c_int = 0x4202;
 pub const PTRACE_SETSIGINFO: ::c_int = 0x4203;
 pub const PTRACE_GETREGSET: ::c_int = 0x4204;
 pub const PTRACE_SETREGSET: ::c_int = 0x4205;
 pub const PTRACE_SEIZE: ::c_int = 0x4206;
 pub const PTRACE_INTERRUPT: ::c_int = 0x4207;
 pub const PTRACE_LISTEN: ::c_int = 0x4208;
 pub const PTRACE_PEEKSIGINFO: ::c_int = 0x4209;
 
+pub const PTRACE_O_EXITKILL: ::c_int = 1048576;
+pub const PTRACE_O_TRACECLONE: ::c_int = 8;
+pub const PTRACE_O_TRACEEXEC: ::c_int = 16;
+pub const PTRACE_O_TRACEEXIT: ::c_int = 64;
+pub const PTRACE_O_TRACEFORK: ::c_int = 2;
+pub const PTRACE_O_TRACESYSGOOD: ::c_int = 1;
+pub const PTRACE_O_TRACEVFORK: ::c_int = 4;
+pub const PTRACE_O_TRACEVFORKDONE: ::c_int = 32;
+pub const PTRACE_O_SUSPEND_SECCOMP: ::c_int = 2097152;
+
+pub const MADV_DODUMP: ::c_int = 17;
+pub const MADV_DONTDUMP: ::c_int = 16;
+
 pub const EPOLLWAKEUP: ::c_int = 0x20000000;
 
+pub const POLLRDNORM: ::c_short = 0x040;
+pub const POLLRDBAND: ::c_short = 0x080;
+
+pub const MADV_HUGEPAGE: ::c_int = 14;
+pub const MADV_NOHUGEPAGE: ::c_int = 15;
+
+pub const PTRACE_GETFPREGS: ::c_uint = 14;
+pub const PTRACE_SETFPREGS: ::c_uint = 15;
+pub const PTRACE_GETFPXREGS: ::c_uint = 18;
+pub const PTRACE_SETFPXREGS: ::c_uint = 19;
+pub const PTRACE_GETREGS: ::c_uint = 12;
+pub const PTRACE_SETREGS: ::c_uint = 13;
+
 pub const EFD_NONBLOCK: ::c_int = ::O_NONBLOCK;
 
 pub const SFD_NONBLOCK: ::c_int = ::O_NONBLOCK;
 
 pub const TCSANOW: ::c_int = 0;
 pub const TCSADRAIN: ::c_int = 1;
 pub const TCSAFLUSH: ::c_int = 2;
 
@@ -206,16 +233,18 @@ pub const RTLD_NOLOAD: ::c_int = 0x4;
 // TODO(#247) Temporarily musl-specific (available since musl 0.9.12 / Linux
 // kernel 3.10).  See also notbsd/mod.rs
 pub const CLOCK_SGI_CYCLE: ::clockid_t = 10;
 pub const CLOCK_TAI: ::clockid_t = 11;
 
 pub const MCL_CURRENT: ::c_int = 0x0001;
 pub const MCL_FUTURE: ::c_int = 0x0002;
 
+pub const SIGSTKSZ: ::size_t = 8192;
+pub const MINSIGSTKSZ: ::size_t = 2048;
 pub const CBAUD: ::tcflag_t = 0o0010017;
 pub const TAB1: ::c_int = 0x00000800;
 pub const TAB2: ::c_int = 0x00001000;
 pub const TAB3: ::c_int = 0x00001800;
 pub const CR1: ::c_int  = 0x00000200;
 pub const CR2: ::c_int  = 0x00000400;
 pub const CR3: ::c_int  = 0x00000600;
 pub const FF1: ::c_int  = 0x00008000;
@@ -246,27 +275,16 @@ pub const ECHOE: ::tcflag_t = 0x00000010
 pub const ECHOK: ::tcflag_t = 0x00000020;
 pub const ECHONL: ::tcflag_t = 0x00000040;
 pub const ECHOPRT: ::tcflag_t = 0x00000400;
 pub const ECHOCTL: ::tcflag_t = 0x00000200;
 pub const ISIG: ::tcflag_t = 0x00000001;
 pub const ICANON: ::tcflag_t = 0x00000002;
 pub const PENDIN: ::tcflag_t = 0x00004000;
 pub const NOFLSH: ::tcflag_t = 0x00000080;
-pub const CIBAUD: ::tcflag_t = 0o02003600000;
-pub const CBAUDEX: ::tcflag_t = 0o010000;
-pub const VSWTC: usize = 7;
-pub const OLCUC:  ::tcflag_t = 0o000002;
-pub const NLDLY:  ::tcflag_t = 0o000400;
-pub const CRDLY:  ::tcflag_t = 0o003000;
-pub const TABDLY: ::tcflag_t = 0o014000;
-pub const BSDLY:  ::tcflag_t = 0o020000;
-pub const FFDLY:  ::tcflag_t = 0o100000;
-pub const VTDLY:  ::tcflag_t = 0o040000;
-pub const XTABS:  ::tcflag_t = 0o014000;
 
 pub const B0: ::speed_t = 0o000000;
 pub const B50: ::speed_t = 0o000001;
 pub const B75: ::speed_t = 0o000002;
 pub const B110: ::speed_t = 0o000003;
 pub const B134: ::speed_t = 0o000004;
 pub const B150: ::speed_t = 0o000005;
 pub const B200: ::speed_t = 0o000006;
@@ -292,35 +310,28 @@ pub const B1000000: ::speed_t = 0o010010
 pub const B1152000: ::speed_t = 0o010011;
 pub const B1500000: ::speed_t = 0o010012;
 pub const B2000000: ::speed_t = 0o010013;
 pub const B2500000: ::speed_t = 0o010014;
 pub const B3000000: ::speed_t = 0o010015;
 pub const B3500000: ::speed_t = 0o010016;
 pub const B4000000: ::speed_t = 0o010017;
 
-pub const SO_BINDTODEVICE: ::c_int = 25;
-pub const SO_TIMESTAMP: ::c_int = 29;
-pub const SO_MARK: ::c_int = 36;
-pub const SO_RXQ_OVFL: ::c_int = 40;
-pub const SO_PEEK_OFF: ::c_int = 42;
-pub const SO_BUSY_POLL: ::c_int = 46;
-
 extern {
     pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
     pub fn ptrace(request: ::c_int, ...) -> ::c_long;
     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;
 }
 
 cfg_if! {
-    if #[cfg(any(target_arch = "x86_64",
-                 target_arch = "aarch64",
-                 target_arch = "powerpc64"))] {
+    if #[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))] {
         mod b64;
         pub use self::b64::*;
     } else if #[cfg(any(target_arch = "x86",
                         target_arch = "mips",
-                        target_arch = "arm"))] {
+                        target_arch = "arm",
+                        target_arch = "asmjs",
+                        target_arch = "wasm32"))] {
         mod b32;
         pub use self::b32::*;
     } else { }
 }
--- a/third_party/rust/libc/src/unix/notbsd/linux/other/b32/arm.rs
+++ b/third_party/rust/libc/src/unix/notbsd/linux/other/b32/arm.rs
@@ -33,47 +33,16 @@ s! {
         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,
         pub st_ino: ::ino64_t,
     }
 
-    pub struct statfs64 {
-        pub f_type: ::__fsword_t,
-        pub f_bsize: ::__fsword_t,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_bavail: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        pub f_fsid: ::fsid_t,
-        pub f_namelen: ::__fsword_t,
-        pub f_frsize: ::__fsword_t,
-        pub f_flags: ::__fsword_t,
-        pub f_spare: [::__fsword_t; 4],
-    }
-
-    pub struct statvfs64 {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_bavail: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        pub f_favail: u64,
-        pub f_fsid: ::c_ulong,
-        __f_unused: ::c_int,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-        __f_spare: [::c_int; 6],
-    }
-
     pub struct shmid_ds {
         pub shm_perm: ::ipc_perm,
         pub shm_segsz: ::size_t,
         pub shm_atime: ::time_t,
         __unused1: ::c_ulong,
         pub shm_dtime: ::time_t,
         __unused2: ::c_ulong,
         pub shm_ctime: ::time_t,
@@ -96,51 +65,39 @@ s! {
         __msg_cbytes: ::c_ulong,
         pub msg_qnum: ::msgqnum_t,
         pub msg_qbytes: ::msglen_t,
         pub msg_lspid: ::pid_t,
         pub msg_lrpid: ::pid_t,
         __glibc_reserved4: ::c_ulong,
         __glibc_reserved5: ::c_ulong,
     }
-
-    pub struct termios2 {
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_line: ::cc_t,
-        pub c_cc: [::cc_t; 19],
-        pub c_ispeed: ::speed_t,
-        pub c_ospeed: ::speed_t,
-    }
 }
 
 pub const O_DIRECT: ::c_int = 0x10000;
 pub const O_DIRECTORY: ::c_int = 0x4000;
 pub const O_NOFOLLOW: ::c_int = 0x8000;
-pub const O_LARGEFILE: ::c_int = 0o400000;
 
 pub const MAP_LOCKED: ::c_int = 0x02000;
 pub const MAP_NORESERVE: ::c_int = 0x04000;
 
 pub const EDEADLOCK: ::c_int = 35;
 
-pub const SO_PASSCRED: ::c_int = 16;
 pub const SO_PEERCRED: ::c_int = 17;
 pub const SO_RCVLOWAT: ::c_int = 18;
 pub const SO_SNDLOWAT: ::c_int = 19;
 pub const SO_RCVTIMEO: ::c_int = 20;
 pub const SO_SNDTIMEO: ::c_int = 21;
-pub const SO_SNDBUFFORCE: ::c_int = 32;
-pub const SO_RCVBUFFORCE: ::c_int = 33;
 
 pub const FIOCLEX: ::c_ulong = 0x5451;
 pub const FIONBIO: ::c_ulong = 0x5421;
 
+pub const SYS_gettid: ::c_long = 224;
+pub const SYS_perf_event_open: ::c_long = 364;
+
 pub const PTRACE_GETFPXREGS: ::c_uint = 18;
 pub const PTRACE_SETFPXREGS: ::c_uint = 19;
 
 pub const MCL_CURRENT: ::c_int = 0x0001;
 pub const MCL_FUTURE: ::c_int = 0x0002;
 
 pub const SIGSTKSZ: ::size_t = 8192;
 pub const MINSIGSTKSZ: ::size_t = 2048;
@@ -179,27 +136,16 @@ pub const ECHOE: ::tcflag_t = 0x00000010
 pub const ECHOK: ::tcflag_t = 0x00000020;
 pub const ECHONL: ::tcflag_t = 0x00000040;
 pub const ECHOPRT: ::tcflag_t = 0x00000400;
 pub const ECHOCTL: ::tcflag_t = 0x00000200;
 pub const ISIG: ::tcflag_t = 0x00000001;
 pub const ICANON: ::tcflag_t = 0x00000002;
 pub const PENDIN: ::tcflag_t = 0x00004000;
 pub const NOFLSH: ::tcflag_t = 0x00000080;
-pub const CIBAUD: ::tcflag_t = 0o02003600000;
-pub const CBAUDEX: ::tcflag_t = 0o010000;
-pub const VSWTC: usize = 7;
-pub const OLCUC:  ::tcflag_t = 0o000002;
-pub const NLDLY:  ::tcflag_t = 0o000400;
-pub const CRDLY:  ::tcflag_t = 0o003000;
-pub const TABDLY: ::tcflag_t = 0o014000;
-pub const BSDLY:  ::tcflag_t = 0o020000;
-pub const FFDLY:  ::tcflag_t = 0o100000;
-pub const VTDLY:  ::tcflag_t = 0o040000;
-pub const XTABS:  ::tcflag_t = 0o014000;
 
 pub const B0: ::speed_t = 0o000000;
 pub const B50: ::speed_t = 0o000001;
 pub const B75: ::speed_t = 0o000002;
 pub const B110: ::speed_t = 0o000003;
 pub const B134: ::speed_t = 0o000004;
 pub const B150: ::speed_t = 0o000005;
 pub const B200: ::speed_t = 0o000006;
@@ -209,17 +155,16 @@ pub const B1200: ::speed_t = 0o000011;
 pub const B1800: ::speed_t = 0o000012;
 pub const B2400: ::speed_t = 0o000013;
 pub const B4800: ::speed_t = 0o000014;
 pub const B9600: ::speed_t = 0o000015;
 pub const B19200: ::speed_t = 0o000016;
 pub const B38400: ::speed_t = 0o000017;
 pub const EXTA: ::speed_t = B19200;
 pub const EXTB: ::speed_t = B38400;
-pub const BOTHER: ::speed_t = 0o010000;
 pub const B57600: ::speed_t = 0o010001;
 pub const B115200: ::speed_t = 0o010002;
 pub const B230400: ::speed_t = 0o010003;
 pub const B460800: ::speed_t = 0o010004;
 pub const B500000: ::speed_t = 0o010005;
 pub const B576000: ::speed_t = 0o010006;
 pub const B921600: ::speed_t = 0o010007;
 pub const B1000000: ::speed_t = 0o010010;
@@ -251,362 +196,8 @@ pub const TCXONC: ::c_ulong = 0x540A;
 pub const TCFLSH: ::c_ulong = 0x540B;
 pub const TIOCINQ: ::c_ulong = 0x541B;
 pub const TIOCGPGRP: ::c_ulong = 0x540F;
 pub const TIOCSPGRP: ::c_ulong = 0x5410;
 pub const TIOCOUTQ: ::c_ulong = 0x5411;
 pub const TIOCGWINSZ: ::c_ulong = 0x5413;
 pub const TIOCSWINSZ: ::c_ulong = 0x5414;
 pub const FIONREAD: ::c_ulong = 0x541B;
-
-// Syscall table
-pub const SYS_restart_syscall: ::c_long = 0;
-pub const SYS_exit: ::c_long = 1;
-pub const SYS_fork: ::c_long = 2;
-pub const SYS_read: ::c_long = 3;
-pub const SYS_write: ::c_long = 4;
-pub const SYS_open: ::c_long = 5;
-pub const SYS_close: ::c_long = 6;
-pub const SYS_creat: ::c_long = 8;
-pub const SYS_link: ::c_long = 9;
-pub const SYS_unlink: ::c_long = 10;
-pub const SYS_execve: ::c_long = 11;
-pub const SYS_chdir: ::c_long = 12;
-pub const SYS_mknod: ::c_long = 14;
-pub const SYS_chmod: ::c_long = 15;
-pub const SYS_lchown: ::c_long = 16;
-pub const SYS_lseek: ::c_long = 19;
-pub const SYS_getpid: ::c_long = 20;
-pub const SYS_mount: ::c_long = 21;
-pub const SYS_setuid: ::c_long = 23;
-pub const SYS_getuid: ::c_long = 24;
-pub const SYS_ptrace: ::c_long = 26;
-pub const SYS_pause: ::c_long = 29;
-pub const SYS_access: ::c_long = 33;
-pub const SYS_nice: ::c_long = 34;
-pub const SYS_sync: ::c_long = 36;
-pub const SYS_kill: ::c_long = 37;
-pub const SYS_rename: ::c_long = 38;
-pub const SYS_mkdir: ::c_long = 39;
-pub const SYS_rmdir: ::c_long = 40;
-pub const SYS_dup: ::c_long = 41;
-pub const SYS_pipe: ::c_long = 42;
-pub const SYS_times: ::c_long = 43;
-pub const SYS_brk: ::c_long = 45;
-pub const SYS_setgid: ::c_long = 46;
-pub const SYS_getgid: ::c_long = 47;
-pub const SYS_geteuid: ::c_long = 49;
-pub const SYS_getegid: ::c_long = 50;
-pub const SYS_acct: ::c_long = 51;
-pub const SYS_umount2: ::c_long = 52;
-pub const SYS_ioctl: ::c_long = 54;
-pub const SYS_fcntl: ::c_long = 55;
-pub const SYS_setpgid: ::c_long = 57;
-pub const SYS_umask: ::c_long = 60;
-pub const SYS_chroot: ::c_long = 61;
-pub const SYS_ustat: ::c_long = 62;
-pub const SYS_dup2: ::c_long = 63;
-pub const SYS_getppid: ::c_long = 64;
-pub const SYS_getpgrp: ::c_long = 65;
-pub const SYS_setsid: ::c_long = 66;
-pub const SYS_sigaction: ::c_long = 67;
-pub const SYS_setreuid: ::c_long = 70;
-pub const SYS_setregid: ::c_long = 71;
-pub const SYS_sigsuspend: ::c_long = 72;
-pub const SYS_sigpending: ::c_long = 73;
-pub const SYS_sethostname: ::c_long = 74;
-pub const SYS_setrlimit: ::c_long = 75;
-pub const SYS_getrusage: ::c_long = 77;
-pub const SYS_gettimeofday: ::c_long = 78;
-pub const SYS_settimeofday: ::c_long = 79;
-pub const SYS_getgroups: ::c_long = 80;
-pub const SYS_setgroups: ::c_long = 81;
-pub const SYS_symlink: ::c_long = 83;
-pub const SYS_readlink: ::c_long = 85;
-pub const SYS_uselib: ::c_long = 86;
-pub const SYS_swapon: ::c_long = 87;
-pub const SYS_reboot: ::c_long = 88;
-pub const SYS_munmap: ::c_long = 91;
-pub const SYS_truncate: ::c_long = 92;
-pub const SYS_ftruncate: ::c_long = 93;
-pub const SYS_fchmod: ::c_long = 94;
-pub const SYS_fchown: ::c_long = 95;
-pub const SYS_getpriority: ::c_long = 96;
-pub const SYS_setpriority: ::c_long = 97;
-pub const SYS_statfs: ::c_long = 99;
-pub const SYS_fstatfs: ::c_long = 100;
-pub const SYS_syslog: ::c_long = 103;
-pub const SYS_setitimer: ::c_long = 104;
-pub const SYS_getitimer: ::c_long = 105;
-pub const SYS_stat: ::c_long = 106;
-pub const SYS_lstat: ::c_long = 107;
-pub const SYS_fstat: ::c_long = 108;
-pub const SYS_vhangup: ::c_long = 111;
-pub const SYS_wait4: ::c_long = 114;
-pub const SYS_swapoff: ::c_long = 115;
-pub const SYS_sysinfo: ::c_long = 116;
-pub const SYS_fsync: ::c_long = 118;
-pub const SYS_sigreturn: ::c_long = 119;
-pub const SYS_clone: ::c_long = 120;
-pub const SYS_setdomainname: ::c_long = 121;
-pub const SYS_uname: ::c_long = 122;
-pub const SYS_adjtimex: ::c_long = 124;
-pub const SYS_mprotect: ::c_long = 125;
-pub const SYS_sigprocmask: ::c_long = 126;
-pub const SYS_init_module: ::c_long = 128;
-pub const SYS_delete_module: ::c_long = 129;
-pub const SYS_quotactl: ::c_long = 131;
-pub const SYS_getpgid: ::c_long = 132;
-pub const SYS_fchdir: ::c_long = 133;
-pub const SYS_bdflush: ::c_long = 134;
-pub const SYS_sysfs: ::c_long = 135;
-pub const SYS_personality: ::c_long = 136;
-pub const SYS_setfsuid: ::c_long = 138;
-pub const SYS_setfsgid: ::c_long = 139;
-pub const SYS__llseek: ::c_long = 140;
-pub const SYS_getdents: ::c_long = 141;
-pub const SYS__newselect: ::c_long = 142;
-pub const SYS_flock: ::c_long = 143;
-pub const SYS_msync: ::c_long = 144;
-pub const SYS_readv: ::c_long = 145;
-pub const SYS_writev: ::c_long = 146;
-pub const SYS_getsid: ::c_long = 147;
-pub const SYS_fdatasync: ::c_long = 148;
-pub const SYS__sysctl: ::c_long = 149;
-pub const SYS_mlock: ::c_long = 150;
-pub const SYS_munlock: ::c_long = 151;
-pub const SYS_mlockall: ::c_long = 152;
-pub const SYS_munlockall: ::c_long = 153;
-pub const SYS_sched_setparam: ::c_long = 154;
-pub const SYS_sched_getparam: ::c_long = 155;
-pub const SYS_sched_setscheduler: ::c_long = 156;
-pub const SYS_sched_getscheduler: ::c_long = 157;
-pub const SYS_sched_yield: ::c_long = 158;
-pub const SYS_sched_get_priority_max: ::c_long = 159;
-pub const SYS_sched_get_priority_min: ::c_long = 160;
-pub const SYS_sched_rr_get_interval: ::c_long = 161;
-pub const SYS_nanosleep: ::c_long = 162;
-pub const SYS_mremap: ::c_long = 163;
-pub const SYS_setresuid: ::c_long = 164;
-pub const SYS_getresuid: ::c_long = 165;
-pub const SYS_poll: ::c_long = 168;
-pub const SYS_nfsservctl: ::c_long = 169;
-pub const SYS_setresgid: ::c_long = 170;
-pub const SYS_getresgid: ::c_long = 171;
-pub const SYS_prctl: ::c_long = 172;
-pub const SYS_rt_sigreturn: ::c_long = 173;
-pub const SYS_rt_sigaction: ::c_long = 174;
-pub const SYS_rt_sigprocmask: ::c_long = 175;
-pub const SYS_rt_sigpending: ::c_long = 176;
-pub const SYS_rt_sigtimedwait: ::c_long = 177;
-pub const SYS_rt_sigqueueinfo: ::c_long = 178;
-pub const SYS_rt_sigsuspend: ::c_long = 179;
-pub const SYS_pread64: ::c_long = 180;
-pub const SYS_pwrite64: ::c_long = 181;
-pub const SYS_chown: ::c_long = 182;
-pub const SYS_getcwd: ::c_long = 183;
-pub const SYS_capget: ::c_long = 184;
-pub const SYS_capset: ::c_long = 185;
-pub const SYS_sigaltstack: ::c_long = 186;
-pub const SYS_sendfile: ::c_long = 187;
-pub const SYS_vfork: ::c_long = 190;
-pub const SYS_ugetrlimit: ::c_long = 191;
-pub const SYS_mmap2: ::c_long = 192;
-pub const SYS_truncate64: ::c_long = 193;
-pub const SYS_ftruncate64: ::c_long = 194;
-pub const SYS_stat64: ::c_long = 195;
-pub const SYS_lstat64: ::c_long = 196;
-pub const SYS_fstat64: ::c_long = 197;
-pub const SYS_lchown32: ::c_long = 198;
-pub const SYS_getuid32: ::c_long = 199;
-pub const SYS_getgid32: ::c_long = 200;
-pub const SYS_geteuid32: ::c_long = 201;
-pub const SYS_getegid32: ::c_long = 202;
-pub const SYS_setreuid32: ::c_long = 203;
-pub const SYS_setregid32: ::c_long = 204;
-pub const SYS_getgroups32: ::c_long = 205;
-pub const SYS_setgroups32: ::c_long = 206;
-pub const SYS_fchown32: ::c_long = 207;
-pub const SYS_setresuid32: ::c_long = 208;
-pub const SYS_getresuid32: ::c_long = 209;
-pub const SYS_setresgid32: ::c_long = 210;
-pub const SYS_getresgid32: ::c_long = 211;
-pub const SYS_chown32: ::c_long = 212;
-pub const SYS_setuid32: ::c_long = 213;
-pub const SYS_setgid32: ::c_long = 214;
-pub const SYS_setfsuid32: ::c_long = 215;
-pub const SYS_setfsgid32: ::c_long = 216;
-pub const SYS_getdents64: ::c_long = 217;
-pub const SYS_pivot_root: ::c_long = 218;
-pub const SYS_mincore: ::c_long = 219;
-pub const SYS_madvise: ::c_long = 220;
-pub const SYS_fcntl64: ::c_long = 221;
-pub const SYS_gettid: ::c_long = 224;
-pub const SYS_readahead: ::c_long = 225;
-pub const SYS_setxattr: ::c_long = 226;
-pub const SYS_lsetxattr: ::c_long = 227;
-pub const SYS_fsetxattr: ::c_long = 228;
-pub const SYS_getxattr: ::c_long = 229;
-pub const SYS_lgetxattr: ::c_long = 230;
-pub const SYS_fgetxattr: ::c_long = 231;
-pub const SYS_listxattr: ::c_long = 232;
-pub const SYS_llistxattr: ::c_long = 233;
-pub const SYS_flistxattr: ::c_long = 234;
-pub const SYS_removexattr: ::c_long = 235;
-pub const SYS_lremovexattr: ::c_long = 236;
-pub const SYS_fremovexattr: ::c_long = 237;
-pub const SYS_tkill: ::c_long = 238;
-pub const SYS_sendfile64: ::c_long = 239;
-pub const SYS_futex: ::c_long = 240;
-pub const SYS_sched_setaffinity: ::c_long = 241;
-pub const SYS_sched_getaffinity: ::c_long = 242;
-pub const SYS_io_setup: ::c_long = 243;
-pub const SYS_io_destroy: ::c_long = 244;
-pub const SYS_io_getevents: ::c_long = 245;
-pub const SYS_io_submit: ::c_long = 246;
-pub const SYS_io_cancel: ::c_long = 247;
-pub const SYS_exit_group: ::c_long = 248;
-pub const SYS_lookup_dcookie: ::c_long = 249;
-pub const SYS_epoll_create: ::c_long = 250;
-pub const SYS_epoll_ctl: ::c_long = 251;
-pub const SYS_epoll_wait: ::c_long = 252;
-pub const SYS_remap_file_pages: ::c_long = 253;
-pub const SYS_set_tid_address: ::c_long = 256;
-pub const SYS_timer_create: ::c_long = 257;
-pub const SYS_timer_settime: ::c_long = 258;
-pub const SYS_timer_gettime: ::c_long = 259;
-pub const SYS_timer_getoverrun: ::c_long = 260;
-pub const SYS_timer_delete: ::c_long = 261;
-pub const SYS_clock_settime: ::c_long = 262;
-pub const SYS_clock_gettime: ::c_long = 263;
-pub const SYS_clock_getres: ::c_long = 264;
-pub const SYS_clock_nanosleep: ::c_long = 265;
-pub const SYS_statfs64: ::c_long = 266;
-pub const SYS_fstatfs64: ::c_long = 267;
-pub const SYS_tgkill: ::c_long = 268;
-pub const SYS_utimes: ::c_long = 269;
-pub const SYS_arm_fadvise64_64: ::c_long = 270;
-pub const SYS_pciconfig_iobase: ::c_long = 271;
-pub const SYS_pciconfig_read: ::c_long = 272;
-pub const SYS_pciconfig_write: ::c_long = 273;
-pub const SYS_mq_open: ::c_long = 274;
-pub const SYS_mq_unlink: ::c_long = 275;
-pub const SYS_mq_timedsend: ::c_long = 276;
-pub const SYS_mq_timedreceive: ::c_long = 277;
-pub const SYS_mq_notify: ::c_long = 278;
-pub const SYS_mq_getsetattr: ::c_long = 279;
-pub const SYS_waitid: ::c_long = 280;
-pub const SYS_socket: ::c_long = 281;
-pub const SYS_bind: ::c_long = 282;
-pub const SYS_connect: ::c_long = 283;
-pub const SYS_listen: ::c_long = 284;
-pub const SYS_accept: ::c_long = 285;
-pub const SYS_getsockname: ::c_long = 286;
-pub const SYS_getpeername: ::c_long = 287;
-pub const SYS_socketpair: ::c_long = 288;
-pub const SYS_send: ::c_long = 289;
-pub const SYS_sendto: ::c_long = 290;
-pub const SYS_recv: ::c_long = 291;
-pub const SYS_recvfrom: ::c_long = 292;
-pub const SYS_shutdown: ::c_long = 293;
-pub const SYS_setsockopt: ::c_long = 294;
-pub const SYS_getsockopt: ::c_long = 295;
-pub const SYS_sendmsg: ::c_long = 296;
-pub const SYS_recvmsg: ::c_long = 297;
-pub const SYS_semop: ::c_long = 298;
-pub const SYS_semget: ::c_long = 299;
-pub const SYS_semctl: ::c_long = 300;
-pub const SYS_msgsnd: ::c_long = 301;
-pub const SYS_msgrcv: ::c_long = 302;
-pub const SYS_msgget: ::c_long = 303;
-pub const SYS_msgctl: ::c_long = 304;
-pub const SYS_shmat: ::c_long = 305;
-pub const SYS_shmdt: ::c_long = 306;
-pub const SYS_shmget: ::c_long = 307;
-pub const SYS_shmctl: ::c_long = 308;
-pub const SYS_add_key: ::c_long = 309;
-pub const SYS_request_key: ::c_long = 310;
-pub const SYS_keyctl: ::c_long = 311;
-pub const SYS_semtimedop: ::c_long = 312;
-pub const SYS_vserver: ::c_long = 313;
-pub const SYS_ioprio_set: ::c_long = 314;
-pub const SYS_ioprio_get: ::c_long = 315;
-pub const SYS_inotify_init: ::c_long = 316;
-pub const SYS_inotify_add_watch: ::c_long = 317;
-pub const SYS_inotify_rm_watch: ::c_long = 318;
-pub const SYS_mbind: ::c_long = 319;
-pub const SYS_get_mempolicy: ::c_long = 320;
-pub const SYS_set_mempolicy: ::c_long = 321;
-pub const SYS_openat: ::c_long = 322;
-pub const SYS_mkdirat: ::c_long = 323;
-pub const SYS_mknodat: ::c_long = 324;
-pub const SYS_fchownat: ::c_long = 325;
-pub const SYS_futimesat: ::c_long = 326;
-pub const SYS_fstatat64: ::c_long = 327;
-pub const SYS_unlinkat: ::c_long = 328;
-pub const SYS_renameat: ::c_long = 329;
-pub const SYS_linkat: ::c_long = 330;
-pub const SYS_symlinkat: ::c_long = 331;
-pub const SYS_readlinkat: ::c_long = 332;
-pub const SYS_fchmodat: ::c_long = 333;
-pub const SYS_faccessat: ::c_long = 334;
-pub const SYS_pselect6: ::c_long = 335;
-pub const SYS_ppoll: ::c_long = 336;
-pub const SYS_unshare: ::c_long = 337;
-pub const SYS_set_robust_list: ::c_long = 338;
-pub const SYS_get_robust_list: ::c_long = 339;
-pub const SYS_splice: ::c_long = 340;
-pub const SYS_arm_sync_file_range: ::c_long = 341;
-pub const SYS_tee: ::c_long = 342;
-pub const SYS_vmsplice: ::c_long = 343;
-pub const SYS_move_pages: ::c_long = 344;
-pub const SYS_getcpu: ::c_long = 345;
-pub const SYS_epoll_pwait: ::c_long = 346;
-pub const SYS_kexec_load: ::c_long = 347;
-pub const SYS_utimensat: ::c_long = 348;
-pub const SYS_signalfd: ::c_long = 349;
-pub const SYS_timerfd_create: ::c_long = 350;
-pub const SYS_eventfd: ::c_long = 351;
-pub const SYS_fallocate: ::c_long = 352;
-pub const SYS_timerfd_settime: ::c_long = 353;
-pub const SYS_timerfd_gettime: ::c_long = 354;
-pub const SYS_signalfd4: ::c_long = 355;
-pub const SYS_eventfd2: ::c_long = 356;
-pub const SYS_epoll_create1: ::c_long = 357;
-pub const SYS_dup3: ::c_long = 358;
-pub const SYS_pipe2: ::c_long = 359;
-pub const SYS_inotify_init1: ::c_long = 360;
-pub const SYS_preadv: ::c_long = 361;
-pub const SYS_pwritev: ::c_long = 362;
-pub const SYS_rt_tgsigqueueinfo: ::c_long = 363;
-pub const SYS_perf_event_open: ::c_long = 364;
-pub const SYS_recvmmsg: ::c_long = 365;
-pub const SYS_accept4: ::c_long = 366;
-pub const SYS_fanotify_init: ::c_long = 367;
-pub const SYS_fanotify_mark: ::c_long = 368;
-pub const SYS_prlimit64: ::c_long = 369;
-pub const SYS_name_to_handle_at: ::c_long = 370;
-pub const SYS_open_by_handle_at: ::c_long = 371;
-pub const SYS_clock_adjtime: ::c_long = 372;
-pub const SYS_syncfs: ::c_long = 373;
-pub const SYS_sendmmsg: ::c_long = 374;
-pub const SYS_setns: ::c_long = 375;
-pub const SYS_process_vm_readv: ::c_long = 376;
-pub const SYS_process_vm_writev: ::c_long = 377;
-pub const SYS_kcmp: ::c_long = 378;
-pub const SYS_finit_module: ::c_long = 379;
-pub const SYS_sched_setattr: ::c_long = 380;
-pub const SYS_sched_getattr: ::c_long = 381;
-pub const SYS_renameat2: ::c_long = 382;
-pub const SYS_seccomp: ::c_long = 383;
-pub const SYS_getrandom: ::c_long = 384;
-pub const SYS_memfd_create: ::c_long = 385;
-pub const SYS_bpf: ::c_long = 386;
-pub const SYS_execveat: ::c_long = 387;
-pub const SYS_userfaultfd: ::c_long = 388;
-pub const SYS_membarrier: ::c_long = 389;
-pub const SYS_mlock2: ::c_long = 390;
-pub const SYS_copy_file_range: ::c_long = 391;
-pub const SYS_preadv2: ::c_long = 392;
-pub const SYS_pwritev2: ::c_long = 393;
-pub const SYS_pkey_mprotect: ::c_long = 394;
-pub const SYS_pkey_alloc: ::c_long = 395;
-pub const SYS_pkey_free: ::c_long = 396;
--- a/third_party/rust/libc/src/unix/notbsd/linux/other/b32/mod.rs
+++ b/third_party/rust/libc/src/unix/notbsd/linux/other/b32/mod.rs
@@ -5,25 +5,18 @@ pub type c_ulong = u32;
 pub type clock_t = i32;
 pub type time_t = i32;
 pub type suseconds_t = i32;
 pub type ino_t = u32;
 pub type off_t = i32;
 pub type blkcnt_t = i32;
 pub type __fsword_t = i32;
 
-pub type fsblkcnt_t = ::c_ulong;
-pub type fsfilcnt_t = ::c_ulong;
-pub type rlim_t = c_ulong;
-pub type shmatt_t = ::c_ulong;
-pub type msgqnum_t = ::c_ulong;
-pub type msglen_t = ::c_ulong;
 pub type blksize_t = i32;
 pub type nlink_t = u32;
-pub type __u64 = ::c_ulonglong;
 
 s! {
     pub struct stat {
         pub st_dev: ::dev_t,
         __pad1: ::c_short,
         pub st_ino: ::ino_t,
         pub st_mode: ::mode_t,
         pub st_nlink: ::nlink_t,
@@ -80,18 +73,16 @@ pub const O_APPEND: ::c_int = 1024;
 pub const O_CREAT: ::c_int = 64;
 pub const O_EXCL: ::c_int = 128;
 pub const O_NOCTTY: ::c_int = 256;
 pub const O_NONBLOCK: ::c_int = 2048;
 pub const O_SYNC: ::c_int = 1052672;
 pub const O_RSYNC: ::c_int = 1052672;
 pub const O_DSYNC: ::c_int = 4096;
 pub const O_FSYNC: ::c_int = 0x101000;
-pub const O_NOATIME: ::c_int = 0o1000000;
-pub const O_PATH: ::c_int = 0o10000000;
 
 pub const MAP_GROWSDOWN: ::c_int = 0x0100;
 
 pub const EDEADLK: ::c_int = 35;
 pub const ENAMETOOLONG: ::c_int = 36;
 pub const ENOLCK: ::c_int = 37;
 pub const ENOSYS: ::c_int = 38;
 pub const ENOTEMPTY: ::c_int = 39;
@@ -175,29 +166,19 @@ pub const SO_REUSEADDR: ::c_int = 2;
 pub const SO_TYPE: ::c_int = 3;
 pub const SO_ERROR: ::c_int = 4;
 pub const SO_DONTROUTE: ::c_int = 5;
 pub const SO_BROADCAST: ::c_int = 6;
 pub const SO_SNDBUF: ::c_int = 7;
 pub const SO_RCVBUF: ::c_int = 8;
 pub const SO_KEEPALIVE: ::c_int = 9;
 pub const SO_OOBINLINE: ::c_int = 10;
-pub const SO_PRIORITY: ::c_int = 12;
 pub const SO_LINGER: ::c_int = 13;
-pub const SO_BSDCOMPAT: ::c_int = 14;
 pub const SO_REUSEPORT: ::c_int = 15;
-pub const SO_BINDTODEVICE: ::c_int = 25;
-pub const SO_TIMESTAMP: ::c_int = 29;
 pub const SO_ACCEPTCONN: ::c_int = 30;
-pub const SO_MARK: ::c_int = 36;
-pub const SO_PROTOCOL: ::c_int = 38;
-pub const SO_DOMAIN: ::c_int = 39;
-pub const SO_RXQ_OVFL: ::c_int = 40;
-pub const SO_PEEK_OFF: ::c_int = 42;
-pub const SO_BUSY_POLL: ::c_int = 46;
 
 pub const SA_ONSTACK: ::c_int = 0x08000000;
 pub const SA_SIGINFO: ::c_int = 0x00000004;
 pub const SA_NOCLDWAIT: ::c_int = 0x00000002;
 
 pub const SIGCHLD: ::c_int = 17;
 pub const SIGBUS: ::c_int = 7;
 pub const SIGUSR1: ::c_int = 10;
@@ -238,16 +219,17 @@ pub const TIOCEXCL: ::c_ulong = 0x540C;
 pub const TIOCNXCL: ::c_ulong = 0x540D;
 pub const TIOCSCTTY: ::c_ulong = 0x540E;
 pub const TIOCSTI: ::c_ulong = 0x5412;
 pub const TIOCMGET: ::c_ulong = 0x5415;
 pub const TIOCMBIS: ::c_ulong = 0x5416;
 pub const TIOCMBIC: ::c_ulong = 0x5417;
 pub const TIOCMSET: ::c_ulong = 0x5418;
 pub const TIOCCONS: ::c_ulong = 0x541D;
+pub const CLONE_NEWCGROUP: ::c_int = 0x02000000;
 
 pub const SFD_CLOEXEC: ::c_int = 0x080000;
 
 pub const NCCS: usize = 32;
 
 pub const O_TRUNC: ::c_int = 512;
 
 pub const O_CLOEXEC: ::c_int = 0x80000;
@@ -275,34 +257,22 @@ pub const SA_NOCLDSTOP: ::c_int = 0x0000
 pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
 
 pub const EFD_CLOEXEC: ::c_int = 0x80000;
 
 pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
 pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24;
 pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
 pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
-pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
 
 pub const PTRACE_GETFPREGS: ::c_uint = 14;
 pub const PTRACE_SETFPREGS: ::c_uint = 15;
 pub const PTRACE_GETREGS: ::c_uint = 12;
 pub const PTRACE_SETREGS: ::c_uint = 13;
 
-#[link(name = "util")]
-extern {
-    pub fn sysctl(name: *mut ::c_int,
-                  namelen: ::c_int,
-                  oldp: *mut ::c_void,
-                  oldlenp: *mut ::size_t,
-                  newp: *mut ::c_void,
-                  newlen: ::size_t)
-                  -> ::c_int;
-}
-
 cfg_if! {
     if #[cfg(target_arch = "x86")] {
         mod x86;
         pub use self::x86::*;
     } else if #[cfg(target_arch = "arm")] {
         mod arm;
         pub use self::arm::*;
     } else if #[cfg(target_arch = "powerpc")] {
--- a/third_party/rust/libc/src/unix/notbsd/linux/other/b32/powerpc.rs
+++ b/third_party/rust/libc/src/unix/notbsd/linux/other/b32/powerpc.rs
@@ -32,47 +32,16 @@ s! {
         pub st_mtime: ::time_t,
         pub st_mtime_nsec: ::c_long,
         pub st_ctime: ::time_t,
         pub st_ctime_nsec: ::c_long,
         __glibc_reserved4: ::c_ulong,
         __glibc_reserved5: ::c_ulong,
     }
 
-    pub struct statfs64 {
-        pub f_type: ::__fsword_t,
-        pub f_bsize: ::__fsword_t,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_bavail: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        pub f_fsid: ::fsid_t,
-        pub f_namelen: ::__fsword_t,
-        pub f_frsize: ::__fsword_t,
-        pub f_flags: ::__fsword_t,
-        pub f_spare: [::__fsword_t; 4],
-    }
-
-    pub struct statvfs64 {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_bavail: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        pub f_favail: u64,
-        pub f_fsid: ::c_ulong,
-        __f_unused: ::c_int,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-        __f_spare: [::c_int; 6],
-    }
-
     pub struct shmid_ds {
         pub shm_perm: ::ipc_perm,
         __glibc_reserved1: ::c_uint,
         pub shm_atime: ::time_t,
         __glibc_reserved2: ::c_uint,
         pub shm_dtime: ::time_t,
         __glibc_reserved3: ::c_uint,
         pub shm_ctime: ::time_t,
@@ -101,36 +70,40 @@ s! {
         __glibc_reserved4: ::c_ulong,
         __glibc_reserved5: ::c_ulong,
     }
 }
 
 pub const O_DIRECT: ::c_int = 0x20000;
 pub const O_DIRECTORY: ::c_int = 0x4000;
 pub const O_NOFOLLOW: ::c_int = 0x8000;
-pub const O_LARGEFILE: ::c_int = 0o200000;
 
 pub const MAP_LOCKED: ::c_int = 0x00080;
 pub const MAP_NORESERVE: ::c_int = 0x00040;
 
 pub const EDEADLOCK: ::c_int = 58;
 
 pub const SO_SNDBUFFORCE: ::c_int = 32;
 pub const SO_RCVBUFFORCE: ::c_int = 33;
 pub const SO_NO_CHECK: ::c_int = 11;
+pub const SO_PRIORITY: ::c_int = 12;
+pub const SO_BSDCOMPAT: ::c_int = 14;
 pub const SO_RCVLOWAT: ::c_int = 16;
 pub const SO_SNDLOWAT: ::c_int = 17;
 pub const SO_RCVTIMEO: ::c_int = 18;
 pub const SO_SNDTIMEO: ::c_int = 19;
 pub const SO_PASSCRED: ::c_int = 20;
 pub const SO_PEERCRED: ::c_int = 21;
 
 pub const FIOCLEX: ::c_ulong = 0x20006601;
 pub const FIONBIO: ::c_ulong = 0x8004667e;
 
+pub const SYS_gettid: ::c_long = 207;
+pub const SYS_perf_event_open: ::c_long = 319;
+
 pub const MCL_CURRENT: ::c_int = 0x2000;
 pub const MCL_FUTURE: ::c_int = 0x4000;
 
 pub const SIGSTKSZ: ::size_t = 0x4000;
 pub const MINSIGSTKSZ: ::size_t = 4096;
 pub const CBAUD: ::tcflag_t = 0xff;
 pub const TAB1: ::c_int = 0x400;
 pub const TAB2: ::c_int = 0x800;
@@ -166,25 +139,16 @@ pub const ECHOE: ::tcflag_t = 0x2;
 pub const ECHOK: ::tcflag_t = 0x4;
 pub const ECHONL: ::tcflag_t = 0x10;
 pub const ECHOPRT: ::tcflag_t = 0x20;
 pub const ECHOCTL: ::tcflag_t = 0x40;
 pub const ISIG: ::tcflag_t = 0x80;
 pub const ICANON: ::tcflag_t = 0x100;
 pub const PENDIN: ::tcflag_t = 0x20000000;
 pub const NOFLSH: ::tcflag_t = 0x80000000;
-pub const VSWTC: usize = 9;
-pub const OLCUC:  ::tcflag_t = 0o000004;
-pub const NLDLY:  ::tcflag_t = 0o001400;
-pub const CRDLY:  ::tcflag_t = 0o030000;
-pub const TABDLY: ::tcflag_t = 0o006000;
-pub const BSDLY:  ::tcflag_t = 0o100000;
-pub const FFDLY:  ::tcflag_t = 0o040000;
-pub const VTDLY:  ::tcflag_t = 0o200000;
-pub const XTABS:  ::tcflag_t = 0o006000;
 
 pub const B0: ::speed_t = 0o000000;
 pub const B50: ::speed_t = 0o000001;
 pub const B75: ::speed_t = 0o000002;
 pub const B110: ::speed_t = 0o000003;
 pub const B134: ::speed_t = 0o000004;
 pub const B150: ::speed_t = 0o000005;
 pub const B200: ::speed_t = 0o000006;
@@ -210,17 +174,16 @@ pub const B921600: ::speed_t = 0o0026;
 pub const B1000000: ::speed_t = 0o0027;
 pub const B1152000: ::speed_t = 0o0030;
 pub const B1500000: ::speed_t = 0o0031;
 pub const B2000000: ::speed_t = 0o0032;
 pub const B2500000: ::speed_t = 0o0033;
 pub const B3000000: ::speed_t = 0o0034;
 pub const B3500000: ::speed_t = 0o0035;
 pub const B4000000: ::speed_t = 0o0036;
-pub const BOTHER: ::speed_t = 0o0037;
 
 pub const VEOL: usize = 6;
 pub const VEOL2: usize = 8;
 pub const VMIN: usize = 5;
 pub const IEXTEN: ::tcflag_t = 0x400;
 pub const TOSTOP: ::tcflag_t = 0x400000;
 pub const FLUSHO: ::tcflag_t = 0x800000;
 pub const EXTPROC: ::tcflag_t = 0x10000000;
@@ -237,378 +200,8 @@ pub const TCXONC: ::c_ulong = 0x2000741e
 pub const TCFLSH: ::c_ulong = 0x2000741f;
 pub const TIOCINQ: ::c_ulong = 0x4004667f;
 pub const TIOCGPGRP: ::c_ulong = 0x40047477;
 pub const TIOCSPGRP: ::c_ulong = 0x80047476;
 pub const TIOCOUTQ: ::c_ulong = 0x40047473;
 pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
 pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
 pub const FIONREAD: ::c_ulong = 0x4004667f;
-
-pub const SYS_restart_syscall: ::c_long = 0;
-pub const SYS_exit: ::c_long = 1;
-pub const SYS_fork: ::c_long = 2;
-pub const SYS_read: ::c_long = 3;
-pub const SYS_write: ::c_long = 4;
-pub const SYS_open: ::c_long = 5;
-pub const SYS_close: ::c_long = 6;
-pub const SYS_waitpid: ::c_long = 7;
-pub const SYS_creat: ::c_long = 8;
-pub const SYS_link: ::c_long = 9;
-pub const SYS_unlink: ::c_long = 10;
-pub const SYS_execve: ::c_long = 11;
-pub const SYS_chdir: ::c_long = 12;
-pub const SYS_time: ::c_long = 13;
-pub const SYS_mknod: ::c_long = 14;
-pub const SYS_chmod: ::c_long = 15;
-pub const SYS_lchown: ::c_long = 16;
-pub const SYS_break: ::c_long = 17;
-pub const SYS_oldstat: ::c_long = 18;
-pub const SYS_lseek: ::c_long = 19;
-pub const SYS_getpid: ::c_long = 20;
-pub const SYS_mount: ::c_long = 21;
-pub const SYS_umount: ::c_long = 22;
-pub const SYS_setuid: ::c_long = 23;
-pub const SYS_getuid: ::c_long = 24;
-pub const SYS_stime: ::c_long = 25;
-pub const SYS_ptrace: ::c_long = 26;
-pub const SYS_alarm: ::c_long = 27;
-pub const SYS_oldfstat: ::c_long = 28;
-pub const SYS_pause: ::c_long = 29;
-pub const SYS_utime: ::c_long = 30;
-pub const SYS_stty: ::c_long = 31;
-pub const SYS_gtty: ::c_long = 32;
-pub const SYS_access: ::c_long = 33;
-pub const SYS_nice: ::c_long = 34;
-pub const SYS_ftime: ::c_long = 35;
-pub const SYS_sync: ::c_long = 36;
-pub const SYS_kill: ::c_long = 37;
-pub const SYS_rename: ::c_long = 38;
-pub const SYS_mkdir: ::c_long = 39;
-pub const SYS_rmdir: ::c_long = 40;
-pub const SYS_dup: ::c_long = 41;
-pub const SYS_pipe: ::c_long = 42;
-pub const SYS_times: ::c_long = 43;
-pub const SYS_prof: ::c_long = 44;
-pub const SYS_brk: ::c_long = 45;
-pub const SYS_setgid: ::c_long = 46;
-pub const SYS_getgid: ::c_long = 47;
-pub const SYS_signal: ::c_long = 48;
-pub const SYS_geteuid: ::c_long = 49;
-pub const SYS_getegid: ::c_long = 50;
-pub const SYS_acct: ::c_long = 51;
-pub const SYS_umount2: ::c_long = 52;
-pub const SYS_lock: ::c_long = 53;
-pub const SYS_ioctl: ::c_long = 54;
-pub const SYS_fcntl: ::c_long = 55;
-pub const SYS_mpx: ::c_long = 56;
-pub const SYS_setpgid: ::c_long = 57;
-pub const SYS_ulimit: ::c_long = 58;
-pub const SYS_oldolduname: ::c_long = 59;
-pub const SYS_umask: ::c_long = 60;
-pub const SYS_chroot: ::c_long = 61;
-pub const SYS_ustat: ::c_long = 62;
-pub const SYS_dup2: ::c_long = 63;
-pub const SYS_getppid: ::c_long = 64;
-pub const SYS_getpgrp: ::c_long = 65;
-pub const SYS_setsid: ::c_long = 66;
-pub const SYS_sigaction: ::c_long = 67;
-pub const SYS_sgetmask: ::c_long = 68;
-pub const SYS_ssetmask: ::c_long = 69;
-pub const SYS_setreuid: ::c_long = 70;
-pub const SYS_setregid: ::c_long = 71;
-pub const SYS_sigsuspend: ::c_long = 72;
-pub const SYS_sigpending: ::c_long = 73;
-pub const SYS_sethostname: ::c_long = 74;
-pub const SYS_setrlimit: ::c_long = 75;
-pub const SYS_getrlimit: ::c_long = 76;
-pub const SYS_getrusage: ::c_long = 77;
-pub const SYS_gettimeofday: ::c_long = 78;
-pub const SYS_settimeofday: ::c_long = 79;
-pub const SYS_getgroups: ::c_long = 80;
-pub const SYS_setgroups: ::c_long = 81;
-pub const SYS_select: ::c_long = 82;
-pub const SYS_symlink: ::c_long = 83;
-pub const SYS_oldlstat: ::c_long = 84;
-pub const SYS_readlink: ::c_long = 85;
-pub const SYS_uselib: ::c_long = 86;
-pub const SYS_swapon: ::c_long = 87;
-pub const SYS_reboot: ::c_long = 88;
-pub const SYS_readdir: ::c_long = 89;
-pub const SYS_mmap: ::c_long = 90;
-pub const SYS_munmap: ::c_long = 91;
-pub const SYS_truncate: ::c_long = 92;
-pub const SYS_ftruncate: ::c_long = 93;
-pub const SYS_fchmod: ::c_long = 94;
-pub const SYS_fchown: ::c_long = 95;
-pub const SYS_getpriority: ::c_long = 96;
-pub const SYS_setpriority: ::c_long = 97;
-pub const SYS_profil: ::c_long = 98;
-pub const SYS_statfs: ::c_long = 99;
-pub const SYS_fstatfs: ::c_long = 100;
-pub const SYS_ioperm: ::c_long = 101;
-pub const SYS_socketcall: ::c_long = 102;
-pub const SYS_syslog: ::c_long = 103;
-pub const SYS_setitimer: ::c_long = 104;
-pub const SYS_getitimer: ::c_long = 105;
-pub const SYS_stat: ::c_long = 106;
-pub const SYS_lstat: ::c_long = 107;
-pub const SYS_fstat: ::c_long = 108;
-pub const SYS_olduname: ::c_long = 109;
-pub const SYS_iopl: ::c_long = 110;
-pub const SYS_vhangup: ::c_long = 111;
-pub const SYS_idle: ::c_long = 112;
-pub const SYS_vm86: ::c_long = 113;
-pub const SYS_wait4: ::c_long = 114;
-pub const SYS_swapoff: ::c_long = 115;
-pub const SYS_sysinfo: ::c_long = 116;
-pub const SYS_ipc: ::c_long = 117;
-pub const SYS_fsync: ::c_long = 118;
-pub const SYS_sigreturn: ::c_long = 119;
-pub const SYS_clone: ::c_long = 120;
-pub const SYS_setdomainname: ::c_long = 121;
-pub const SYS_uname: ::c_long = 122;
-pub const SYS_modify_ldt: ::c_long = 123;
-pub const SYS_adjtimex: ::c_long = 124;
-pub const SYS_mprotect: ::c_long = 125;
-pub const SYS_sigprocmask: ::c_long = 126;
-pub const SYS_create_module: ::c_long = 127;
-pub const SYS_init_module: ::c_long = 128;
-pub const SYS_delete_module: ::c_long = 129;
-pub const SYS_get_kernel_syms: ::c_long = 130;
-pub const SYS_quotactl: ::c_long = 131;
-pub const SYS_getpgid: ::c_long = 132;
-pub const SYS_fchdir: ::c_long = 133;
-pub const SYS_bdflush: ::c_long = 134;
-pub const SYS_sysfs: ::c_long = 135;
-pub const SYS_personality: ::c_long = 136;
-pub const SYS_afs_syscall: ::c_long = 137; /* Syscall for Andrew File System */
-pub const SYS_setfsuid: ::c_long = 138;
-pub const SYS_setfsgid: ::c_long = 139;
-pub const SYS__llseek: ::c_long = 140;
-pub const SYS_getdents: ::c_long = 141;
-pub const SYS__newselect: ::c_long = 142;
-pub const SYS_flock: ::c_long = 143;
-pub const SYS_msync: ::c_long = 144;
-pub const SYS_readv: ::c_long = 145;
-pub const SYS_writev: ::c_long = 146;
-pub const SYS_getsid: ::c_long = 147;
-pub const SYS_fdatasync: ::c_long = 148;
-pub const SYS__sysctl: ::c_long = 149;
-pub const SYS_mlock: ::c_long = 150;
-pub const SYS_munlock: ::c_long = 151;
-pub const SYS_mlockall: ::c_long = 152;
-pub const SYS_munlockall: ::c_long = 153;
-pub const SYS_sched_setparam: ::c_long = 154;
-pub const SYS_sched_getparam: ::c_long = 155;
-pub const SYS_sched_setscheduler: ::c_long = 156;
-pub const SYS_sched_getscheduler: ::c_long = 157;
-pub const SYS_sched_yield: ::c_long = 158;
-pub const SYS_sched_get_priority_max: ::c_long = 159;
-pub const SYS_sched_get_priority_min: ::c_long = 160;
-pub const SYS_sched_rr_get_interval: ::c_long = 161;
-pub const SYS_nanosleep: ::c_long = 162;
-pub const SYS_mremap: ::c_long = 163;
-pub const SYS_setresuid: ::c_long = 164;
-pub const SYS_getresuid: ::c_long = 165;
-pub const SYS_query_module: ::c_long = 166;
-pub const SYS_poll: ::c_long = 167;
-pub const SYS_nfsservctl: ::c_long = 168;
-pub const SYS_setresgid: ::c_long = 169;
-pub const SYS_getresgid: ::c_long = 170;
-pub const SYS_prctl: ::c_long = 171;
-pub const SYS_rt_sigreturn: ::c_long = 172;
-pub const SYS_rt_sigaction: ::c_long = 173;
-pub const SYS_rt_sigprocmask: ::c_long = 174;
-pub const SYS_rt_sigpending: ::c_long = 175;
-pub const SYS_rt_sigtimedwait: ::c_long = 176;
-pub const SYS_rt_sigqueueinfo: ::c_long = 177;
-pub const SYS_rt_sigsuspend: ::c_long = 178;
-pub const SYS_pread64: ::c_long = 179;
-pub const SYS_pwrite64: ::c_long = 180;
-pub const SYS_chown: ::c_long = 181;
-pub const SYS_getcwd: ::c_long = 182;
-pub const SYS_capget: ::c_long = 183;
-pub const SYS_capset: ::c_long = 184;
-pub const SYS_sigaltstack: ::c_long = 185;
-pub const SYS_sendfile: ::c_long = 186;
-pub const SYS_getpmsg: ::c_long = 187; /* some people actually want streams */
-pub const SYS_putpmsg: ::c_long = 188; /* some people actually want streams */
-pub const SYS_vfork: ::c_long = 189;
-pub const SYS_ugetrlimit: ::c_long = 190; /* SuS compliant getrlimit */
-pub const SYS_readahead: ::c_long = 191;
-pub const SYS_mmap2: ::c_long = 192;
-pub const SYS_truncate64: ::c_long = 193;
-pub const SYS_ftruncate64: ::c_long = 194;
-pub const SYS_stat64: ::c_long = 195;
-pub const SYS_lstat64: ::c_long = 196;
-pub const SYS_fstat64: ::c_long = 197;
-pub const SYS_pciconfig_read: ::c_long = 198;
-pub const SYS_pciconfig_write: ::c_long = 199;
-pub const SYS_pciconfig_iobase: ::c_long = 200;
-pub const SYS_multiplexer: ::c_long = 201;
-pub const SYS_getdents64: ::c_long = 202;
-pub const SYS_pivot_root: ::c_long = 203;
-pub const SYS_fcntl64: ::c_long = 204;
-pub const SYS_madvise: ::c_long = 205;
-pub const SYS_mincore: ::c_long = 206;
-pub const SYS_gettid: ::c_long = 207;
-pub const SYS_tkill: ::c_long = 208;
-pub const SYS_setxattr: ::c_long = 209;
-pub const SYS_lsetxattr: ::c_long = 210;
-pub const SYS_fsetxattr: ::c_long = 211;
-pub const SYS_getxattr: ::c_long = 212;
-pub const SYS_lgetxattr: ::c_long = 213;
-pub const SYS_fgetxattr: ::c_long = 214;
-pub const SYS_listxattr: ::c_long = 215;
-pub const SYS_llistxattr: ::c_long = 216;
-pub const SYS_flistxattr: ::c_long = 217;
-pub const SYS_removexattr: ::c_long = 218;
-pub const SYS_lremovexattr: ::c_long = 219;
-pub const SYS_fremovexattr: ::c_long = 220;
-pub const SYS_futex: ::c_long = 221;
-pub const SYS_sched_setaffinity: ::c_long = 222;
-pub const SYS_sched_getaffinity: ::c_long = 223;
-pub const SYS_tuxcall: ::c_long = 225;
-pub const SYS_sendfile64: ::c_long = 226;
-pub const SYS_io_setup: ::c_long = 227;
-pub const SYS_io_destroy: ::c_long = 228;
-pub const SYS_io_getevents: ::c_long = 229;
-pub const SYS_io_submit: ::c_long = 230;
-pub const SYS_io_cancel: ::c_long = 231;
-pub const SYS_set_tid_address: ::c_long = 232;
-pub const SYS_fadvise64: ::c_long = 233;
-pub const SYS_exit_group: ::c_long = 234;
-pub const SYS_lookup_dcookie: ::c_long = 235;
-pub const SYS_epoll_create: ::c_long = 236;
-pub const SYS_epoll_ctl: ::c_long = 237;
-pub const SYS_epoll_wait: ::c_long = 238;
-pub const SYS_remap_file_pages: ::c_long = 239;
-pub const SYS_timer_create: ::c_long = 240;
-pub const SYS_timer_settime: ::c_long = 241;
-pub const SYS_timer_gettime: ::c_long = 242;
-pub const SYS_timer_getoverrun: ::c_long = 243;
-pub const SYS_timer_delete: ::c_long = 244;
-pub const SYS_clock_settime: ::c_long = 245;
-pub const SYS_clock_gettime: ::c_long = 246;
-pub const SYS_clock_getres: ::c_long = 247;
-pub const SYS_clock_nanosleep: ::c_long = 248;
-pub const SYS_swapcontext: ::c_long = 249;
-pub const SYS_tgkill: ::c_long = 250;
-pub const SYS_utimes: ::c_long = 251;
-pub const SYS_statfs64: ::c_long = 252;
-pub const SYS_fstatfs64: ::c_long = 253;
-pub const SYS_fadvise64_64: ::c_long = 254;
-pub const SYS_rtas: ::c_long = 255;
-pub const SYS_sys_debug_setcontext: ::c_long = 256;
-pub const SYS_migrate_pages: ::c_long = 258;
-pub const SYS_mbind: ::c_long = 259;
-pub const SYS_get_mempolicy: ::c_long = 260;
-pub const SYS_set_mempolicy: ::c_long = 261;
-pub const SYS_mq_open: ::c_long = 262;
-pub const SYS_mq_unlink: ::c_long = 263;
-pub const SYS_mq_timedsend: ::c_long = 264;
-pub const SYS_mq_timedreceive: ::c_long = 265;
-pub const SYS_mq_notify: ::c_long = 266;
-pub const SYS_mq_getsetattr: ::c_long = 267;
-pub const SYS_kexec_load: ::c_long = 268;
-pub const SYS_add_key: ::c_long = 269;
-pub const SYS_request_key: ::c_long = 270;
-pub const SYS_keyctl: ::c_long = 271;
-pub const SYS_waitid: ::c_long = 272;
-pub const SYS_ioprio_set: ::c_long = 273;
-pub const SYS_ioprio_get: ::c_long = 274;
-pub const SYS_inotify_init: ::c_long = 275;
-pub const SYS_inotify_add_watch: ::c_long = 276;
-pub const SYS_inotify_rm_watch: ::c_long = 277;
-pub const SYS_spu_run: ::c_long = 278;
-pub const SYS_spu_create: ::c_long = 279;
-pub const SYS_pselect6: ::c_long = 280;
-pub const SYS_ppoll: ::c_long = 281;
-pub const SYS_unshare: ::c_long = 282;
-pub const SYS_splice: ::c_long = 283;
-pub const SYS_tee: ::c_long = 284;
-pub const SYS_vmsplice: ::c_long = 285;
-pub const SYS_openat: ::c_long = 286;
-pub const SYS_mkdirat: ::c_long = 287;
-pub const SYS_mknodat: ::c_long = 288;
-pub const SYS_fchownat: ::c_long = 289;
-pub const SYS_futimesat: ::c_long = 290;
-pub const SYS_fstatat64: ::c_long = 291;
-pub const SYS_unlinkat: ::c_long = 292;
-pub const SYS_renameat: ::c_long = 293;
-pub const SYS_linkat: ::c_long = 294;
-pub const SYS_symlinkat: ::c_long = 295;
-pub const SYS_readlinkat: ::c_long = 296;
-pub const SYS_fchmodat: ::c_long = 297;
-pub const SYS_faccessat: ::c_long = 298;
-pub const SYS_get_robust_list: ::c_long = 299;
-pub const SYS_set_robust_list: ::c_long = 300;
-pub const SYS_move_pages: ::c_long = 301;
-pub const SYS_getcpu: ::c_long = 302;
-pub const SYS_epoll_pwait: ::c_long = 303;
-pub const SYS_utimensat: ::c_long = 304;
-pub const SYS_signalfd: ::c_long = 305;
-pub const SYS_timerfd_create: ::c_long = 306;
-pub const SYS_eventfd: ::c_long = 307;
-pub const SYS_sync_file_range2: ::c_long = 308;
-pub const SYS_fallocate: ::c_long = 309;
-pub const SYS_subpage_prot: ::c_long = 310;
-pub const SYS_timerfd_settime: ::c_long = 311;
-pub const SYS_timerfd_gettime: ::c_long = 312;
-pub const SYS_signalfd4: ::c_long = 313;
-pub const SYS_eventfd2: ::c_long = 314;
-pub const SYS_epoll_create1: ::c_long = 315;
-pub const SYS_dup3: ::c_long = 316;
-pub const SYS_pipe2: ::c_long = 317;
-pub const SYS_inotify_init1: ::c_long = 318;
-pub const SYS_perf_event_open: ::c_long = 319;
-pub const SYS_preadv: ::c_long = 320;
-pub const SYS_pwritev: ::c_long = 321;
-pub const SYS_rt_tgsigqueueinfo: ::c_long = 322;
-pub const SYS_fanotify_init: ::c_long = 323;
-pub const SYS_fanotify_mark: ::c_long = 324;
-pub const SYS_prlimit64: ::c_long = 325;
-pub const SYS_socket: ::c_long = 326;
-pub const SYS_bind: ::c_long = 327;
-pub const SYS_connect: ::c_long = 328;
-pub const SYS_listen: ::c_long = 329;
-pub const SYS_accept: ::c_long = 330;
-pub const SYS_getsockname: ::c_long = 331;
-pub const SYS_getpeername: ::c_long = 332;
-pub const SYS_socketpair: ::c_long = 333;
-pub const SYS_send: ::c_long = 334;
-pub const SYS_sendto: ::c_long = 335;
-pub const SYS_recv: ::c_long = 336;
-pub const SYS_recvfrom: ::c_long = 337;
-pub const SYS_shutdown: ::c_long = 338;
-pub const SYS_setsockopt: ::c_long = 339;
-pub const SYS_getsockopt: ::c_long = 340;
-pub const SYS_sendmsg: ::c_long = 341;
-pub const SYS_recvmsg: ::c_long = 342;
-pub const SYS_recvmmsg: ::c_long = 343;
-pub const SYS_accept4: ::c_long = 344;
-pub const SYS_name_to_handle_at: ::c_long = 345;
-pub const SYS_open_by_handle_at: ::c_long = 346;
-pub const SYS_clock_adjtime: ::c_long = 347;
-pub const SYS_syncfs: ::c_long = 348;
-pub const SYS_sendmmsg: ::c_long = 349;
-pub const SYS_setns: ::c_long = 350;
-pub const SYS_process_vm_readv: ::c_long = 351;
-pub const SYS_process_vm_writev: ::c_long = 352;
-pub const SYS_finit_module: ::c_long = 353;
-pub const SYS_kcmp: ::c_long = 354;
-pub const SYS_sched_setattr: ::c_long = 355;
-pub const SYS_sched_getattr: ::c_long = 356;
-pub const SYS_renameat2: ::c_long = 357;
-pub const SYS_seccomp: ::c_long = 358;
-pub const SYS_getrandom: ::c_long = 359;
-pub const SYS_memfd_create: ::c_long = 360;
-pub const SYS_bpf: ::c_long = 361;
-pub const SYS_execveat: ::c_long = 362;
-pub const SYS_switch_endian: ::c_long = 363;
-pub const SYS_userfaultfd: ::c_long = 364;
-pub const SYS_membarrier: ::c_long = 365;
-pub const SYS_mlock2: ::c_long = 378;
-pub const SYS_copy_file_range: ::c_long = 379;
-pub const SYS_preadv2: ::c_long = 380;
-pub const SYS_pwritev2: ::c_long = 381;
-pub const SYS_kexec_file_load: ::c_long = 382;
--- a/third_party/rust/libc/src/unix/notbsd/linux/other/b32/x86.rs
+++ b/third_party/rust/libc/src/unix/notbsd/linux/other/b32/x86.rs
@@ -132,47 +132,16 @@ s! {
         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,
         pub st_ino: ::ino64_t,
     }
 
-    pub struct statfs64 {
-        pub f_type: ::__fsword_t,
-        pub f_bsize: ::__fsword_t,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_bavail: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        pub f_fsid: ::fsid_t,
-        pub f_namelen: ::__fsword_t,
-        pub f_frsize: ::__fsword_t,
-        pub f_flags: ::__fsword_t,
-        pub f_spare: [::__fsword_t; 4],
-    }
-
-    pub struct statvfs64 {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_bavail: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        pub f_favail: u64,
-        pub f_fsid: ::c_ulong,
-        __f_unused: ::c_int,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-        __f_spare: [::c_int; 6],
-    }
-
     pub struct shmid_ds {
         pub shm_perm: ::ipc_perm,
         pub shm_segsz: ::size_t,
         pub shm_atime: ::time_t,
         __unused1: ::c_ulong,
         pub shm_dtime: ::time_t,
         __unused2: ::c_ulong,
         pub shm_ctime: ::time_t,
@@ -195,53 +164,46 @@ s! {
         __msg_cbytes: ::c_ulong,
         pub msg_qnum: ::msgqnum_t,
         pub msg_qbytes: ::msglen_t,
         pub msg_lspid: ::pid_t,
         pub msg_lrpid: ::pid_t,
         __glibc_reserved4: ::c_ulong,
         __glibc_reserved5: ::c_ulong,
     }
-
-    pub struct termios2 {
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_line: ::cc_t,
-        pub c_cc: [::cc_t; 19],
-        pub c_ispeed: ::speed_t,
-        pub c_ospeed: ::speed_t,
-    }
 }
 
 pub const O_DIRECT: ::c_int = 0x4000;
 pub const O_DIRECTORY: ::c_int = 0x10000;
 pub const O_NOFOLLOW: ::c_int = 0x20000;
-pub const O_LARGEFILE: ::c_int = 0o0100000;
 
 pub const MAP_LOCKED: ::c_int = 0x02000;
 pub const MAP_NORESERVE: ::c_int = 0x04000;
 pub const MAP_32BIT: ::c_int = 0x0040;
 
 pub const EDEADLOCK: ::c_int = 35;
 
 pub const SO_SNDBUFFORCE: ::c_int = 32;
 pub const SO_RCVBUFFORCE: ::c_int = 33;
 pub const SO_NO_CHECK: ::c_int = 11;
+pub const SO_PRIORITY: ::c_int = 12;
+pub const SO_BSDCOMPAT: ::c_int = 14;
 pub const SO_PASSCRED: ::c_int = 16;
 pub const SO_PEERCRED: ::c_int = 17;
 pub const SO_RCVLOWAT: ::c_int = 18;
 pub const SO_SNDLOWAT: ::c_int = 19;
 pub const SO_RCVTIMEO: ::c_int = 20;
 pub const SO_SNDTIMEO: ::c_int = 21;
 
 pub const FIOCLEX: ::c_ulong = 0x5451;
 pub const FIONBIO: ::c_ulong = 0x5421;
 
+pub const SYS_gettid: ::c_long = 224;
+pub const SYS_perf_event_open: ::c_long = 336;
+
 pub const PTRACE_GETFPXREGS: ::c_uint = 18;
 pub const PTRACE_SETFPXREGS: ::c_uint = 19;
 
 pub const MCL_CURRENT: ::c_int = 0x0001;
 pub const MCL_FUTURE: ::c_int = 0x0002;
 
 pub const SIGSTKSZ: ::size_t = 8192;
 pub const MINSIGSTKSZ: ::size_t = 2048;
@@ -280,27 +242,16 @@ pub const ECHOE: ::tcflag_t = 0x00000010
 pub const ECHOK: ::tcflag_t = 0x00000020;
 pub const ECHONL: ::tcflag_t = 0x00000040;
 pub const ECHOPRT: ::tcflag_t = 0x00000400;
 pub const ECHOCTL: ::tcflag_t = 0x00000200;
 pub const ISIG: ::tcflag_t = 0x00000001;
 pub const ICANON: ::tcflag_t = 0x00000002;
 pub const PENDIN: ::tcflag_t = 0x00004000;
 pub const NOFLSH: ::tcflag_t = 0x00000080;
-pub const CIBAUD: ::tcflag_t = 0o02003600000;
-pub const CBAUDEX: ::tcflag_t = 0o010000;
-pub const VSWTC: usize = 7;
-pub const OLCUC:  ::tcflag_t = 0o000002;
-pub const NLDLY:  ::tcflag_t = 0o000400;
-pub const CRDLY:  ::tcflag_t = 0o003000;
-pub const TABDLY: ::tcflag_t = 0o014000;
-pub const BSDLY:  ::tcflag_t = 0o020000;
-pub const FFDLY:  ::tcflag_t = 0o100000;
-pub const VTDLY:  ::tcflag_t = 0o040000;
-pub const XTABS:  ::tcflag_t = 0o014000;
 
 pub const B0: ::speed_t = 0o000000;
 pub const B50: ::speed_t = 0o000001;
 pub const B75: ::speed_t = 0o000002;
 pub const B110: ::speed_t = 0o000003;
 pub const B134: ::speed_t = 0o000004;
 pub const B150: ::speed_t = 0o000005;
 pub const B200: ::speed_t = 0o000006;
@@ -310,17 +261,16 @@ pub const B1200: ::speed_t = 0o000011;
 pub const B1800: ::speed_t = 0o000012;
 pub const B2400: ::speed_t = 0o000013;
 pub const B4800: ::speed_t = 0o000014;
 pub const B9600: ::speed_t = 0o000015;
 pub const B19200: ::speed_t = 0o000016;
 pub const B38400: ::speed_t = 0o000017;
 pub const EXTA: ::speed_t = B19200;
 pub const EXTB: ::speed_t = B38400;
-pub const BOTHER: ::speed_t = 0o010000;
 pub const B57600: ::speed_t = 0o010001;
 pub const B115200: ::speed_t = 0o010002;
 pub const B230400: ::speed_t = 0o010003;
 pub const B460800: ::speed_t = 0o010004;
 pub const B500000: ::speed_t = 0o010005;
 pub const B576000: ::speed_t = 0o010006;
 pub const B921600: ::speed_t = 0o010007;
 pub const B1000000: ::speed_t = 0o010010;
@@ -353,416 +303,16 @@ pub const TCFLSH: ::c_ulong = 0x540B;
 pub const TIOCINQ: ::c_ulong = 0x541B;
 pub const TIOCGPGRP: ::c_ulong = 0x540F;
 pub const TIOCSPGRP: ::c_ulong = 0x5410;
 pub const TIOCOUTQ: ::c_ulong = 0x5411;
 pub const TIOCGWINSZ: ::c_ulong = 0x5413;
 pub const TIOCSWINSZ: ::c_ulong = 0x5414;
 pub const FIONREAD: ::c_ulong = 0x541B;
 
-// Syscall table
-pub const SYS_restart_syscall: ::c_long = 0;
-pub const SYS_exit: ::c_long = 1;
-pub const SYS_fork: ::c_long = 2;
-pub const SYS_read: ::c_long = 3;
-pub const SYS_write: ::c_long = 4;
-pub const SYS_open: ::c_long = 5;
-pub const SYS_close: ::c_long = 6;
-pub const SYS_waitpid: ::c_long = 7;
-pub const SYS_creat: ::c_long = 8;
-pub const SYS_link: ::c_long = 9;
-pub const SYS_unlink: ::c_long = 10;
-pub const SYS_execve: ::c_long = 11;
-pub const SYS_chdir: ::c_long = 12;
-pub const SYS_time: ::c_long = 13;
-pub const SYS_mknod: ::c_long = 14;
-pub const SYS_chmod: ::c_long = 15;
-pub const SYS_lchown: ::c_long = 16;
-pub const SYS_break: ::c_long = 17;
-pub const SYS_oldstat: ::c_long = 18;
-pub const SYS_lseek: ::c_long = 19;
-pub const SYS_getpid: ::c_long = 20;
-pub const SYS_mount: ::c_long = 21;
-pub const SYS_umount: ::c_long = 22;
-pub const SYS_setuid: ::c_long = 23;
-pub const SYS_getuid: ::c_long = 24;
-pub const SYS_stime: ::c_long = 25;
-pub const SYS_ptrace: ::c_long = 26;
-pub const SYS_alarm: ::c_long = 27;
-pub const SYS_oldfstat: ::c_long = 28;
-pub const SYS_pause: ::c_long = 29;
-pub const SYS_utime: ::c_long = 30;
-pub const SYS_stty: ::c_long = 31;
-pub const SYS_gtty: ::c_long = 32;
-pub const SYS_access: ::c_long = 33;
-pub const SYS_nice: ::c_long = 34;
-pub const SYS_ftime: ::c_long = 35;
-pub const SYS_sync: ::c_long = 36;
-pub const SYS_kill: ::c_long = 37;
-pub const SYS_rename: ::c_long = 38;
-pub const SYS_mkdir: ::c_long = 39;
-pub const SYS_rmdir: ::c_long = 40;
-pub const SYS_dup: ::c_long = 41;
-pub const SYS_pipe: ::c_long = 42;
-pub const SYS_times: ::c_long = 43;
-pub const SYS_prof: ::c_long = 44;
-pub const SYS_brk: ::c_long = 45;
-pub const SYS_setgid: ::c_long = 46;
-pub const SYS_getgid: ::c_long = 47;
-pub const SYS_signal: ::c_long = 48;
-pub const SYS_geteuid: ::c_long = 49;
-pub const SYS_getegid: ::c_long = 50;
-pub const SYS_acct: ::c_long = 51;
-pub const SYS_umount2: ::c_long = 52;
-pub const SYS_lock: ::c_long = 53;
-pub const SYS_ioctl: ::c_long = 54;
-pub const SYS_fcntl: ::c_long = 55;
-pub const SYS_mpx: ::c_long = 56;
-pub const SYS_setpgid: ::c_long = 57;
-pub const SYS_ulimit: ::c_long = 58;
-pub const SYS_oldolduname: ::c_long = 59;
-pub const SYS_umask: ::c_long = 60;
-pub const SYS_chroot: ::c_long = 61;
-pub const SYS_ustat: ::c_long = 62;
-pub const SYS_dup2: ::c_long = 63;
-pub const SYS_getppid: ::c_long = 64;
-pub const SYS_getpgrp: ::c_long = 65;
-pub const SYS_setsid: ::c_long = 66;
-pub const SYS_sigaction: ::c_long = 67;
-pub const SYS_sgetmask: ::c_long = 68;
-pub const SYS_ssetmask: ::c_long = 69;
-pub const SYS_setreuid: ::c_long = 70;
-pub const SYS_setregid: ::c_long = 71;
-pub const SYS_sigsuspend: ::c_long = 72;
-pub const SYS_sigpending: ::c_long = 73;
-pub const SYS_sethostname: ::c_long = 74;
-pub const SYS_setrlimit: ::c_long = 75;
-pub const SYS_getrlimit: ::c_long = 76;
-pub const SYS_getrusage: ::c_long = 77;
-pub const SYS_gettimeofday: ::c_long = 78;
-pub const SYS_settimeofday: ::c_long = 79;
-pub const SYS_getgroups: ::c_long = 80;
-pub const SYS_setgroups: ::c_long = 81;
-pub const SYS_select: ::c_long = 82;
-pub const SYS_symlink: ::c_long = 83;
-pub const SYS_oldlstat: ::c_long = 84;
-pub const SYS_readlink: ::c_long = 85;
-pub const SYS_uselib: ::c_long = 86;
-pub const SYS_swapon: ::c_long = 87;
-pub const SYS_reboot: ::c_long = 88;
-pub const SYS_readdir: ::c_long = 89;
-pub const SYS_mmap: ::c_long = 90;
-pub const SYS_munmap: ::c_long = 91;
-pub const SYS_truncate: ::c_long = 92;
-pub const SYS_ftruncate: ::c_long = 93;
-pub const SYS_fchmod: ::c_long = 94;
-pub const SYS_fchown: ::c_long = 95;
-pub const SYS_getpriority: ::c_long = 96;
-pub const SYS_setpriority: ::c_long = 97;
-pub const SYS_profil: ::c_long = 98;
-pub const SYS_statfs: ::c_long = 99;
-pub const SYS_fstatfs: ::c_long = 100;
-pub const SYS_ioperm: ::c_long = 101;
-pub const SYS_socketcall: ::c_long = 102;
-pub const SYS_syslog: ::c_long = 103;
-pub const SYS_setitimer: ::c_long = 104;
-pub const SYS_getitimer: ::c_long = 105;
-pub const SYS_stat: ::c_long = 106;
-pub const SYS_lstat: ::c_long = 107;
-pub const SYS_fstat: ::c_long = 108;
-pub const SYS_olduname: ::c_long = 109;
-pub const SYS_iopl: ::c_long = 110;
-pub const SYS_vhangup: ::c_long = 111;
-pub const SYS_idle: ::c_long = 112;
-pub const SYS_vm86old: ::c_long = 113;
-pub const SYS_wait4: ::c_long = 114;
-pub const SYS_swapoff: ::c_long = 115;
-pub const SYS_sysinfo: ::c_long = 116;
-pub const SYS_ipc: ::c_long = 117;
-pub const SYS_fsync: ::c_long = 118;
-pub const SYS_sigreturn: ::c_long = 119;
-pub const SYS_clone: ::c_long = 120;
-pub const SYS_setdomainname: ::c_long = 121;
-pub const SYS_uname: ::c_long = 122;
-pub const SYS_modify_ldt: ::c_long = 123;
-pub const SYS_adjtimex: ::c_long = 124;
-pub const SYS_mprotect: ::c_long = 125;
-pub const SYS_sigprocmask: ::c_long = 126;
-pub const SYS_create_module: ::c_long = 127;
-pub const SYS_init_module: ::c_long = 128;
-pub const SYS_delete_module: ::c_long = 129;
-pub const SYS_get_kernel_syms: ::c_long = 130;
-pub const SYS_quotactl: ::c_long = 131;
-pub const SYS_getpgid: ::c_long = 132;
-pub const SYS_fchdir: ::c_long = 133;
-pub const SYS_bdflush: ::c_long = 134;
-pub const SYS_sysfs: ::c_long = 135;
-pub const SYS_personality: ::c_long = 136;
-pub const SYS_afs_syscall: ::c_long = 137;
-pub const SYS_setfsuid: ::c_long = 138;
-pub const SYS_setfsgid: ::c_long = 139;
-pub const SYS__llseek: ::c_long = 140;
-pub const SYS_getdents: ::c_long = 141;
-pub const SYS__newselect: ::c_long = 142;
-pub const SYS_flock: ::c_long = 143;
-pub const SYS_msync: ::c_long = 144;
-pub const SYS_readv: ::c_long = 145;
-pub const SYS_writev: ::c_long = 146;
-pub const SYS_getsid: ::c_long = 147;
-pub const SYS_fdatasync: ::c_long = 148;
-pub const SYS__sysctl: ::c_long = 149;
-pub const SYS_mlock: ::c_long = 150;
-pub const SYS_munlock: ::c_long = 151;
-pub const SYS_mlockall: ::c_long = 152;
-pub const SYS_munlockall: ::c_long = 153;
-pub const SYS_sched_setparam: ::c_long = 154;
-pub const SYS_sched_getparam: ::c_long = 155;
-pub const SYS_sched_setscheduler: ::c_long = 156;
-pub const SYS_sched_getscheduler: ::c_long = 157;
-pub const SYS_sched_yield: ::c_long = 158;
-pub const SYS_sched_get_priority_max: ::c_long = 159;
-pub const SYS_sched_get_priority_min: ::c_long = 160;
-pub const SYS_sched_rr_get_interval: ::c_long = 161;
-pub const SYS_nanosleep: ::c_long = 162;
-pub const SYS_mremap: ::c_long = 163;
-pub const SYS_setresuid: ::c_long = 164;
-pub const SYS_getresuid: ::c_long = 165;
-pub const SYS_vm86: ::c_long = 166;
-pub const SYS_query_module: ::c_long = 167;
-pub const SYS_poll: ::c_long = 168;
-pub const SYS_nfsservctl: ::c_long = 169;
-pub const SYS_setresgid: ::c_long = 170;
-pub const SYS_getresgid: ::c_long = 171;
-pub const SYS_prctl: ::c_long = 172;
-pub const SYS_rt_sigreturn: ::c_long = 173;
-pub const SYS_rt_sigaction: ::c_long = 174;
-pub const SYS_rt_sigprocmask: ::c_long = 175;
-pub const SYS_rt_sigpending: ::c_long = 176;
-pub const SYS_rt_sigtimedwait: ::c_long = 177;
-pub const SYS_rt_sigqueueinfo: ::c_long = 178;
-pub const SYS_rt_sigsuspend: ::c_long = 179;
-pub const SYS_pread64: ::c_long = 180;
-pub const SYS_pwrite64: ::c_long = 181;
-pub const SYS_chown: ::c_long = 182;
-pub const SYS_getcwd: ::c_long = 183;
-pub const SYS_capget: ::c_long = 184;
-pub const SYS_capset: ::c_long = 185;
-pub const SYS_sigaltstack: ::c_long = 186;
-pub const SYS_sendfile: ::c_long = 187;
-pub const SYS_getpmsg: ::c_long = 188;
-pub const SYS_putpmsg: ::c_long = 189;
-pub const SYS_vfork: ::c_long = 190;
-pub const SYS_ugetrlimit: ::c_long = 191;
-pub const SYS_mmap2: ::c_long = 192;
-pub const SYS_truncate64: ::c_long = 193;
-pub const SYS_ftruncate64: ::c_long = 194;
-pub const SYS_stat64: ::c_long = 195;
-pub const SYS_lstat64: ::c_long = 196;
-pub const SYS_fstat64: ::c_long = 197;
-pub const SYS_lchown32: ::c_long = 198;
-pub const SYS_getuid32: ::c_long = 199;
-pub const SYS_getgid32: ::c_long = 200;
-pub const SYS_geteuid32: ::c_long = 201;
-pub const SYS_getegid32: ::c_long = 202;
-pub const SYS_setreuid32: ::c_long = 203;
-pub const SYS_setregid32: ::c_long = 204;
-pub const SYS_getgroups32: ::c_long = 205;
-pub const SYS_setgroups32: ::c_long = 206;
-pub const SYS_fchown32: ::c_long = 207;
-pub const SYS_setresuid32: ::c_long = 208;
-pub const SYS_getresuid32: ::c_long = 209;
-pub const SYS_setresgid32: ::c_long = 210;
-pub const SYS_getresgid32: ::c_long = 211;
-pub const SYS_chown32: ::c_long = 212;
-pub const SYS_setuid32: ::c_long = 213;
-pub const SYS_setgid32: ::c_long = 214;
-pub const SYS_setfsuid32: ::c_long = 215;
-pub const SYS_setfsgid32: ::c_long = 216;
-pub const SYS_pivot_root: ::c_long = 217;
-pub const SYS_mincore: ::c_long = 218;
-pub const SYS_madvise: ::c_long = 219;
-pub const SYS_getdents64: ::c_long = 220;
-pub const SYS_fcntl64: ::c_long = 221;
-pub const SYS_gettid: ::c_long = 224;
-pub const SYS_readahead: ::c_long = 225;
-pub const SYS_setxattr: ::c_long = 226;
-pub const SYS_lsetxattr: ::c_long = 227;
-pub const SYS_fsetxattr: ::c_long = 228;
-pub const SYS_getxattr: ::c_long = 229;
-pub const SYS_lgetxattr: ::c_long = 230;
-pub const SYS_fgetxattr: ::c_long = 231;
-pub const SYS_listxattr: ::c_long = 232;
-pub const SYS_llistxattr: ::c_long = 233;
-pub const SYS_flistxattr: ::c_long = 234;
-pub const SYS_removexattr: ::c_long = 235;
-pub const SYS_lremovexattr: ::c_long = 236;
-pub const SYS_fremovexattr: ::c_long = 237;
-pub const SYS_tkill: ::c_long = 238;
-pub const SYS_sendfile64: ::c_long = 239;
-pub const SYS_futex: ::c_long = 240;
-pub const SYS_sched_setaffinity: ::c_long = 241;
-pub const SYS_sched_getaffinity: ::c_long = 242;
-pub const SYS_set_thread_area: ::c_long = 243;
-pub const SYS_get_thread_area: ::c_long = 244;
-pub const SYS_io_setup: ::c_long = 245;
-pub const SYS_io_destroy: ::c_long = 246;
-pub const SYS_io_getevents: ::c_long = 247;
-pub const SYS_io_submit: ::c_long = 248;
-pub const SYS_io_cancel: ::c_long = 249;
-pub const SYS_fadvise64: ::c_long = 250;
-pub const SYS_exit_group: ::c_long = 252;
-pub const SYS_lookup_dcookie: ::c_long = 253;
-pub const SYS_epoll_create: ::c_long = 254;
-pub const SYS_epoll_ctl: ::c_long = 255;
-pub const SYS_epoll_wait: ::c_long = 256;
-pub const SYS_remap_file_pages: ::c_long = 257;
-pub const SYS_set_tid_address: ::c_long = 258;
-pub const SYS_timer_create: ::c_long = 259;
-pub const SYS_timer_settime: ::c_long = 260;
-pub const SYS_timer_gettime: ::c_long = 261;
-pub const SYS_timer_getoverrun: ::c_long = 262;
-pub const SYS_timer_delete: ::c_long = 263;
-pub const SYS_clock_settime: ::c_long = 264;
-pub const SYS_clock_gettime: ::c_long = 265;
-pub const SYS_clock_getres: ::c_long = 266;
-pub const SYS_clock_nanosleep: ::c_long = 267;
-pub const SYS_statfs64: ::c_long = 268;
-pub const SYS_fstatfs64: ::c_long = 269;
-pub const SYS_tgkill: ::c_long = 270;
-pub const SYS_utimes: ::c_long = 271;
-pub const SYS_fadvise64_64: ::c_long = 272;
-pub const SYS_vserver: ::c_long = 273;
-pub const SYS_mbind: ::c_long = 274;
-pub const SYS_get_mempolicy: ::c_long = 275;
-pub const SYS_set_mempolicy: ::c_long = 276;
-pub const SYS_mq_open: ::c_long = 277;
-pub const SYS_mq_unlink: ::c_long = 278;
-pub const SYS_mq_timedsend: ::c_long = 279;
-pub const SYS_mq_timedreceive: ::c_long = 280;
-pub const SYS_mq_notify: ::c_long = 281;
-pub const SYS_mq_getsetattr: ::c_long = 282;
-pub const SYS_kexec_load: ::c_long = 283;
-pub const SYS_waitid: ::c_long = 284;
-pub const SYS_add_key: ::c_long = 286;
-pub const SYS_request_key: ::c_long = 287;
-pub const SYS_keyctl: ::c_long = 288;
-pub const SYS_ioprio_set: ::c_long = 289;
-pub const SYS_ioprio_get: ::c_long = 290;
-pub const SYS_inotify_init: ::c_long = 291;
-pub const SYS_inotify_add_watch: ::c_long = 292;
-pub const SYS_inotify_rm_watch: ::c_long = 293;
-pub const SYS_migrate_pages: ::c_long = 294;
-pub const SYS_openat: ::c_long = 295;
-pub const SYS_mkdirat: ::c_long = 296;
-pub const SYS_mknodat: ::c_long = 297;
-pub const SYS_fchownat: ::c_long = 298;
-pub const SYS_futimesat: ::c_long = 299;
-pub const SYS_fstatat64: ::c_long = 300;
-pub const SYS_unlinkat: ::c_long = 301;
-pub const SYS_renameat: ::c_long = 302;
-pub const SYS_linkat: ::c_long = 303;
-pub const SYS_symlinkat: ::c_long = 304;
-pub const SYS_readlinkat: ::c_long = 305;
-pub const SYS_fchmodat: ::c_long = 306;
-pub const SYS_faccessat: ::c_long = 307;
-pub const SYS_pselect6: ::c_long = 308;
-pub const SYS_ppoll: ::c_long = 309;
-pub const SYS_unshare: ::c_long = 310;
-pub const SYS_set_robust_list: ::c_long = 311;
-pub const SYS_get_robust_list: ::c_long = 312;
-pub const SYS_splice: ::c_long = 313;
-pub const SYS_sync_file_range: ::c_long = 314;
-pub const SYS_tee: ::c_long = 315;
-pub const SYS_vmsplice: ::c_long = 316;
-pub const SYS_move_pages: ::c_long = 317;
-pub const SYS_getcpu: ::c_long = 318;
-pub const SYS_epoll_pwait: ::c_long = 319;
-pub const SYS_utimensat: ::c_long = 320;
-pub const SYS_signalfd: ::c_long = 321;
-pub const SYS_timerfd_create: ::c_long = 322;
-pub const SYS_eventfd: ::c_long = 323;
-pub const SYS_fallocate: ::c_long = 324;
-pub const SYS_timerfd_settime: ::c_long = 325;
-pub const SYS_timerfd_gettime: ::c_long = 326;
-pub const SYS_signalfd4: ::c_long = 327;
-pub const SYS_eventfd2: ::c_long = 328;
-pub const SYS_epoll_create1: ::c_long = 329;
-pub const SYS_dup3: ::c_long = 330;
-pub const SYS_pipe2: ::c_long = 331;
-pub const SYS_inotify_init1: ::c_long = 332;
-pub const SYS_preadv: ::c_long = 333;
-pub const SYS_pwritev: ::c_long = 334;
-pub const SYS_rt_tgsigqueueinfo: ::c_long = 335;
-pub const SYS_perf_event_open: ::c_long = 336;
-pub const SYS_recvmmsg: ::c_long = 337;
-pub const SYS_fanotify_init: ::c_long = 338;
-pub const SYS_fanotify_mark: ::c_long = 339;
-pub const SYS_prlimit64: ::c_long = 340;
-pub const SYS_name_to_handle_at: ::c_long = 341;
-pub const SYS_open_by_handle_at: ::c_long = 342;
-pub const SYS_clock_adjtime: ::c_long = 343;
-pub const SYS_syncfs: ::c_long = 344;
-pub const SYS_sendmmsg: ::c_long = 345;
-pub const SYS_setns: ::c_long = 346;
-pub const SYS_process_vm_readv: ::c_long = 347;
-pub const SYS_process_vm_writev: ::c_long = 348;
-pub const SYS_kcmp: ::c_long = 349;
-pub const SYS_finit_module: ::c_long = 350;
-pub const SYS_sched_setattr: ::c_long = 351;
-pub const SYS_sched_getattr: ::c_long = 352;
-pub const SYS_renameat2: ::c_long = 353;
-pub const SYS_seccomp: ::c_long = 354;
-pub const SYS_getrandom: ::c_long = 355;
-pub const SYS_memfd_create: ::c_long = 356;
-pub const SYS_bpf: ::c_long = 357;
-pub const SYS_execveat: ::c_long = 358;
-pub const SYS_socket: ::c_long = 359;
-pub const SYS_socketpair: ::c_long = 360;
-pub const SYS_bind: ::c_long = 361;
-pub const SYS_connect: ::c_long = 362;
-pub const SYS_listen: ::c_long = 363;
-pub const SYS_accept4: ::c_long = 364;
-pub const SYS_getsockopt: ::c_long = 365;
-pub const SYS_setsockopt: ::c_long = 366;
-pub const SYS_getsockname: ::c_long = 367;
-pub const SYS_getpeername: ::c_long = 368;
-pub const SYS_sendto: ::c_long = 369;
-pub const SYS_sendmsg: ::c_long = 370;
-pub const SYS_recvfrom: ::c_long = 371;
-pub const SYS_recvmsg: ::c_long = 372;
-pub const SYS_shutdown: ::c_long = 373;
-pub const SYS_userfaultfd: ::c_long = 374;
-pub const SYS_membarrier: ::c_long = 375;
-pub const SYS_mlock2: ::c_long = 376;
-pub const SYS_copy_file_range: ::c_long = 377;
-pub const SYS_preadv2: ::c_long = 378;
-pub const SYS_pwritev2: ::c_long = 379;
-pub const SYS_pkey_mprotect: ::c_long = 380;
-pub const SYS_pkey_alloc: ::c_long = 381;
-pub const SYS_pkey_free: ::c_long = 382;
-
-// offsets in user_regs_structs, from sys/reg.h
-pub const EBX: ::c_int = 0;
-pub const ECX: ::c_int = 1;
-pub const EDX: ::c_int = 2;
-pub const ESI: ::c_int = 3;
-pub const EDI: ::c_int = 4;
-pub const EBP: ::c_int = 5;
-pub const EAX: ::c_int = 6;
-pub const DS: ::c_int = 7;
-pub const ES: ::c_int = 8;
-pub const FS: ::c_int = 9;
-pub const GS: ::c_int = 10;
-pub const ORIG_EAX: ::c_int = 11;
-pub const EIP: ::c_int = 12;
-pub const CS: ::c_int = 13;
-pub const EFL: ::c_int = 14;
-pub const UESP: ::c_int = 15;
-pub const SS: ::c_int = 16;
-
 extern {
     pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int;
     pub fn setcontext(ucp: *const ucontext_t) -> ::c_int;
     pub fn makecontext(ucp: *mut ucontext_t,
                        func:  extern fn (),
                        argc: ::c_int, ...);
     pub fn swapcontext(uocp: *mut ucontext_t,
                        ucp: *const ucontext_t) -> ::c_int;
--- a/third_party/rust/libc/src/unix/notbsd/linux/other/b64/aarch64.rs
+++ b/third_party/rust/libc/src/unix/notbsd/linux/other/b64/aarch64.rs
@@ -1,18 +1,15 @@
 //! AArch64-specific definitions for 64-bit linux-like values
 
-pub type c_long = i64;
-pub type c_ulong = u64;
 pub type c_char = u8;
 pub type wchar_t = u32;
 pub type nlink_t = u32;
 pub type blksize_t = i32;
 pub type suseconds_t = i64;
-pub type __u64 = ::c_ulonglong;
 
 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,
@@ -49,46 +46,16 @@ s! {
         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_int; 2],
     }
 
-    pub struct statfs64 {
-        pub f_type: ::__fsword_t,
-        pub f_bsize: ::__fsword_t,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_bavail: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        pub f_fsid: ::fsid_t,
-        pub f_namelen: ::__fsword_t,
-        pub f_frsize: ::__fsword_t,
-        pub f_flags: ::__fsword_t,
-        pub f_spare: [::__fsword_t; 4],
-    }
-
-    pub struct statvfs64 {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_bavail: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        pub f_favail: u64,
-        pub f_fsid: ::c_ulong,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-        __f_spare: [::c_int; 6],
-    }
-
     pub struct pthread_attr_t {
         __size: [u64; 8]
     }
 
     pub struct ipc_perm {
         pub __key: ::key_t,
         pub uid: ::uid_t,
         pub gid: ::gid_t,
@@ -108,48 +75,33 @@ s! {
         pub shm_dtime: ::time_t,
         pub shm_ctime: ::time_t,
         pub shm_cpid: ::pid_t,
         pub shm_lpid: ::pid_t,
         pub shm_nattch: ::shmatt_t,
         __unused4: ::c_ulong,
         __unused5: ::c_ulong
     }
-
-    pub struct termios2 {
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_line: ::cc_t,
-        pub c_cc: [::cc_t; 19],
-        pub c_ispeed: ::speed_t,
-        pub c_ospeed: ::speed_t,
-    }
 }
 
-pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
-
 pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
 pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
 
 pub const RLIMIT_NOFILE: ::c_int = 7;
 pub const RLIMIT_NPROC: ::c_int = 6;
 
 pub const O_APPEND: ::c_int = 1024;
 pub const O_CREAT: ::c_int = 64;
 pub const O_EXCL: ::c_int = 128;
 pub const O_NOCTTY: ::c_int = 256;
 pub const O_NONBLOCK: ::c_int = 2048;
 pub const O_SYNC: ::c_int = 1052672;
 pub const O_RSYNC: ::c_int = 1052672;
 pub const O_DSYNC: ::c_int = 4096;
 pub const O_FSYNC: ::c_int = 0x101000;
-pub const O_NOATIME: ::c_int = 0o1000000;
-pub const O_PATH: ::c_int = 0o10000000;
 
 pub const MAP_GROWSDOWN: ::c_int = 0x0100;
 
 pub const EDEADLK: ::c_int = 35;
 pub const ENAMETOOLONG: ::c_int = 36;
 pub const ENOLCK: ::c_int = 37;
 pub const ENOSYS: ::c_int = 38;
 pub const ENOTEMPTY: ::c_int = 39;
@@ -255,16 +207,17 @@ pub const SO_SECURITY_AUTHENTICATION: ::
 pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23;
 pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24;
 pub const SO_BINDTODEVICE: ::c_int = 25;
 pub const SO_ATTACH_FILTER: ::c_int = 26;
 pub const SO_DETACH_FILTER: ::c_int = 27;
 pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
 pub const SO_PEERNAME: ::c_int = 28;
 pub const SO_TIMESTAMP: ::c_int = 29;
+pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP;
 pub const SO_ACCEPTCONN: ::c_int = 30;
 pub const SO_PEERSEC: ::c_int = 31;
 pub const SO_PASSSEC: ::c_int = 34;
 pub const SO_TIMESTAMPNS: ::c_int = 35;
 pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
 pub const SO_MARK: ::c_int = 36;
 pub const SO_TIMESTAMPING: ::c_int = 37;
 pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING;
@@ -329,16 +282,18 @@ pub const TIOCNXCL: ::c_ulong = 0x540D;
 pub const TIOCSCTTY: ::c_ulong = 0x540E;
 pub const TIOCSTI: ::c_ulong = 0x5412;
 pub const TIOCMGET: ::c_ulong = 0x5415;
 pub const TIOCMBIS: ::c_ulong = 0x5416;
 pub const TIOCMBIC: ::c_ulong = 0x5417;
 pub const TIOCMSET: ::c_ulong = 0x5418;
 pub const TIOCCONS: ::c_ulong = 0x541D;
 
+pub const CLONE_NEWCGROUP: ::c_int = 0x02000000;
+
 pub const SFD_CLOEXEC: ::c_int = 0x080000;
 
 pub const NCCS: usize = 32;
 
 pub const O_TRUNC: ::c_int = 512;
 
 pub const O_CLOEXEC: ::c_int = 0x80000;
 
@@ -377,16 +332,19 @@ pub const O_NOFOLLOW: ::c_int = 0x8000;
 pub const MAP_LOCKED: ::c_int = 0x02000;
 pub const MAP_NORESERVE: ::c_int = 0x04000;
 
 pub const EDEADLOCK: ::c_int = 35;
 
 pub const FIOCLEX: ::c_ulong = 0x5451;
 pub const FIONBIO: ::c_ulong = 0x5421;
 
+pub const SYS_gettid: ::c_long = 178;
+pub const SYS_perf_event_open: ::c_long = 241;
+
 pub const MCL_CURRENT: ::c_int = 0x0001;
 pub const MCL_FUTURE: ::c_int = 0x0002;
 
 pub const SIGSTKSZ: ::size_t = 16384;
 pub const MINSIGSTKSZ: ::size_t = 5120;
 pub const CBAUD: ::tcflag_t = 0o0010017;
 pub const TAB1: ::c_int = 0x00000800;
 pub const TAB2: ::c_int = 0x00001000;
@@ -422,27 +380,16 @@ pub const ECHOE: ::tcflag_t = 0x00000010
 pub const ECHOK: ::tcflag_t = 0x00000020;
 pub const ECHONL: ::tcflag_t = 0x00000040;
 pub const ECHOPRT: ::tcflag_t = 0x00000400;
 pub const ECHOCTL: ::tcflag_t = 0x00000200;
 pub const ISIG: ::tcflag_t = 0x00000001;
 pub const ICANON: ::tcflag_t = 0x00000002;
 pub const PENDIN: ::tcflag_t = 0x00004000;
 pub const NOFLSH: ::tcflag_t = 0x00000080;
-pub const CIBAUD: ::tcflag_t = 0o02003600000;
-pub const CBAUDEX: ::tcflag_t = 0o010000;
-pub const VSWTC: usize = 7;
-pub const OLCUC:  ::tcflag_t = 0o000002;
-pub const NLDLY:  ::tcflag_t = 0o000400;
-pub const CRDLY:  ::tcflag_t = 0o003000;
-pub const TABDLY: ::tcflag_t = 0o014000;
-pub const BSDLY:  ::tcflag_t = 0o020000;
-pub const FFDLY:  ::tcflag_t = 0o100000;
-pub const VTDLY:  ::tcflag_t = 0o040000;
-pub const XTABS:  ::tcflag_t = 0o014000;
 
 pub const B0: ::speed_t = 0o000000;
 pub const B50: ::speed_t = 0o000001;
 pub const B75: ::speed_t = 0o000002;
 pub const B110: ::speed_t = 0o000003;
 pub const B134: ::speed_t = 0o000004;
 pub const B150: ::speed_t = 0o000005;
 pub const B200: ::speed_t = 0o000006;
@@ -452,17 +399,16 @@ pub const B1200: ::speed_t = 0o000011;
 pub const B1800: ::speed_t = 0o000012;
 pub const B2400: ::speed_t = 0o000013;
 pub const B4800: ::speed_t = 0o000014;
 pub const B9600: ::speed_t = 0o000015;
 pub const B19200: ::speed_t = 0o000016;
 pub const B38400: ::speed_t = 0o000017;
 pub const EXTA: ::speed_t = B19200;
 pub const EXTB: ::speed_t = B38400;
-pub const BOTHER: ::speed_t = 0o010000;
 pub const B57600: ::speed_t = 0o010001;
 pub const B115200: ::speed_t = 0o010002;
 pub const B230400: ::speed_t = 0o010003;
 pub const B460800: ::speed_t = 0o010004;
 pub const B500000: ::speed_t = 0o010005;
 pub const B576000: ::speed_t = 0o010006;
 pub const B921600: ::speed_t = 0o010007;
 pub const B1000000: ::speed_t = 0o010010;
@@ -494,287 +440,8 @@ pub const TCXONC: ::c_ulong = 0x540A;
 pub const TCFLSH: ::c_ulong = 0x540B;
 pub const TIOCINQ: ::c_ulong = 0x541B;
 pub const TIOCGPGRP: ::c_ulong = 0x540F;
 pub const TIOCSPGRP: ::c_ulong = 0x5410;
 pub const TIOCOUTQ: ::c_ulong = 0x5411;
 pub const TIOCGWINSZ: ::c_ulong = 0x5413;
 pub const TIOCSWINSZ: ::c_ulong = 0x5414;
 pub const FIONREAD: ::c_ulong = 0x541B;
-
-// Syscall table
-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_arch_specific_syscall: ::c_long = 244;
-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;
-pub const SYS_syscalls: ::c_long = 291;
-
-#[link(name = "util")]
-extern {
-    pub fn sysctl(name: *mut ::c_int,
-                  namelen: ::c_int,
-                  oldp: *mut ::c_void,
-                  oldlenp: *mut ::size_t,
-                  newp: *mut ::c_void,
-                  newlen: ::size_t)
-                  -> ::c_int;
-}
--- a/third_party/rust/libc/src/unix/notbsd/linux/other/b64/mod.rs
+++ b/third_party/rust/libc/src/unix/notbsd/linux/other/b64/mod.rs
@@ -1,85 +1,67 @@
 //! 64-bit specific definitions for linux-like values
 
+pub type c_long = i64;
+pub type c_ulong = u64;
 pub type clock_t = i64;
 pub type time_t = i64;
 pub type ino_t = u64;
 pub type off_t = i64;
 pub type blkcnt_t = i64;
-pub type __fsword_t = i64;
-pub type shmatt_t = u64;
-pub type msgqnum_t = u64;
-pub type msglen_t = u64;
-pub type fsblkcnt_t = u64;
-pub type fsfilcnt_t = u64;
-pub type rlim_t = u64;
+pub type __fsword_t = ::c_long;
 
 s! {
     pub struct sigset_t {
-        #[cfg(target_pointer_width = "32")]
-        __val: [u32; 32],
-        #[cfg(target_pointer_width = "64")]
-        __val: [u64; 16],
+        __val: [::c_ulong; 16],
     }
 
     pub struct sysinfo {
-        pub uptime: i64,
-        pub loads: [u64; 3],
-        pub totalram: u64,
-        pub freeram: u64,
-        pub sharedram: u64,
-        pub bufferram: u64,
-        pub totalswap: u64,
-        pub freeswap: u64,
+        pub uptime: ::c_long,
+        pub loads: [::c_ulong; 3],
+        pub totalram: ::c_ulong,
+        pub freeram: ::c_ulong,
+        pub sharedram: ::c_ulong,
+        pub bufferram: ::c_ulong,
+        pub totalswap: ::c_ulong,
+        pub freeswap: ::c_ulong,
         pub procs: ::c_ushort,
         pub pad: ::c_ushort,
-        pub totalhigh: u64,
-        pub freehigh: u64,
+        pub totalhigh: ::c_ulong,
+        pub freehigh: ::c_ulong,
         pub mem_unit: ::c_uint,
         pub _f: [::c_char; 0],
     }
 
     pub struct msqid_ds {
         pub msg_perm: ::ipc_perm,
         pub msg_stime: ::time_t,
         pub msg_rtime: ::time_t,
         pub msg_ctime: ::time_t,
-        __msg_cbytes: u64,
+        __msg_cbytes: ::c_ulong,
         pub msg_qnum: ::msgqnum_t,
         pub msg_qbytes: ::msglen_t,
         pub msg_lspid: ::pid_t,
         pub msg_lrpid: ::pid_t,
-        __glibc_reserved4: u64,
-        __glibc_reserved5: u64,
+        __glibc_reserved4: ::c_ulong,
+        __glibc_reserved5: ::c_ulong,
     }
 }
 
-pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
-
-pub const O_LARGEFILE: ::c_int = 0;
+pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
 
 cfg_if! {
     if #[cfg(target_arch = "aarch64")] {
         mod aarch64;
         pub use self::aarch64::*;
     } else if #[cfg(any(target_arch = "powerpc64"))] {
         mod powerpc64;
         pub use self::powerpc64::*;
     } else if #[cfg(any(target_arch = "sparc64"))] {
         mod sparc64;
         pub use self::sparc64::*;
     } else if #[cfg(any(target_arch = "x86_64"))] {
         mod x86_64;
         pub use self::x86_64::*;
-        cfg_if! {
-            if #[cfg(target_pointer_width = "32")] {
-                mod x32;
-                pub use self::x32::*;
-            } else {
-                mod not_x32;
-                pub use self::not_x32::*;
-            }
-        }
     } else {
         // Unknown target_arch
     }
 }
deleted file mode 100644
--- a/third_party/rust/libc/src/unix/notbsd/linux/other/b64/not_x32.rs
+++ /dev/null
@@ -1,351 +0,0 @@
-pub type c_long = i64;
-pub type c_ulong = u64;
-
-pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
-pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
-
-// 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;
-pub const SYS_pkey_mprotect: ::c_long = 329;
-pub const SYS_pkey_alloc: ::c_long = 330;
-pub const SYS_pkey_free: ::c_long = 331;
-
-#[link(name = "util")]
-extern {
-    pub fn sysctl(name: *mut ::c_int,
-                  namelen: ::c_int,
-                  oldp: *mut ::c_void,
-                  oldlenp: *mut ::size_t,
-                  newp: *mut ::c_void,
-                  newlen: ::size_t)
-                  -> ::c_int;
-}
--- a/third_party/rust/libc/src/unix/notbsd/linux/other/b64/powerpc64.rs
+++ b/third_party/rust/libc/src/unix/notbsd/linux/other/b64/powerpc64.rs
@@ -1,18 +1,15 @@
 //! PowerPC64-specific definitions for 64-bit linux-like values
 
-pub type c_long = i64;
-pub type c_ulong = u64;
 pub type c_char = u8;
 pub type wchar_t = i32;
 pub type nlink_t = u64;
 pub type blksize_t = i64;
 pub type suseconds_t = i64;
-pub type __u64 = ::c_ulong;
 
 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,
@@ -47,46 +44,16 @@ s! {
         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 statfs64 {
-        pub f_type: ::__fsword_t,
-        pub f_bsize: ::__fsword_t,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_bavail: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        pub f_fsid: ::fsid_t,
-        pub f_namelen: ::__fsword_t,
-        pub f_frsize: ::__fsword_t,
-        pub f_flags: ::__fsword_t,
-        pub f_spare: [::__fsword_t; 4],
-    }
-
-    pub struct statvfs64 {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_bavail: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        pub f_favail: u64,
-        pub f_fsid: ::c_ulong,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-        __f_spare: [::c_int; 6],
-    }
-
     pub struct pthread_attr_t {
         __size: [u64; 7]
     }
 
     pub struct ipc_perm {
         pub __key: ::key_t,
         pub uid: ::uid_t,
         pub gid: ::gid_t,
@@ -108,35 +75,31 @@ s! {
         pub shm_cpid: ::pid_t,
         pub shm_lpid: ::pid_t,
         pub shm_nattch: ::shmatt_t,
         __unused4: ::c_ulong,
         __unused5: ::c_ulong
     }
 }
 
-pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
-
 pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
 pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
 
 pub const RLIMIT_NOFILE: ::c_int = 7;
 pub const RLIMIT_NPROC: ::c_int = 6;
 
 pub const O_APPEND: ::c_int = 1024;
 pub const O_CREAT: ::c_int = 64;
 pub const O_EXCL: ::c_int = 128;
 pub const O_NOCTTY: ::c_int = 256;
 pub const O_NONBLOCK: ::c_int = 2048;
 pub const O_SYNC: ::c_int = 1052672;
 pub const O_RSYNC: ::c_int = 1052672;
 pub const O_DSYNC: ::c_int = 4096;
 pub const O_FSYNC: ::c_int = 0x101000;
-pub const O_NOATIME: ::c_int = 0o1000000;
-pub const O_PATH: ::c_int = 0o10000000;
 
 pub const MAP_GROWSDOWN: ::c_int = 0x0100;
 
 pub const EDEADLK: ::c_int = 35;
 pub const ENAMETOOLONG: ::c_int = 36;
 pub const ENOLCK: ::c_int = 37;
 pub const ENOSYS: ::c_int = 38;
 pub const ENOTEMPTY: ::c_int = 39;
@@ -242,16 +205,17 @@ pub const SO_SECURITY_AUTHENTICATION: ::
 pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23;
 pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24;
 pub const SO_BINDTODEVICE: ::c_int = 25;
 pub const SO_ATTACH_FILTER: ::c_int = 26;
 pub const SO_DETACH_FILTER: ::c_int = 27;
 pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
 pub const SO_PEERNAME: ::c_int = 28;
 pub const SO_TIMESTAMP: ::c_int = 29;
+pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP;
 pub const SO_ACCEPTCONN: ::c_int = 30;
 pub const SO_PEERSEC: ::c_int = 31;
 pub const SO_PASSSEC: ::c_int = 34;
 pub const SO_TIMESTAMPNS: ::c_int = 35;
 pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
 pub const SO_MARK: ::c_int = 36;
 pub const SO_TIMESTAMPING: ::c_int = 37;
 pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING;
@@ -316,16 +280,18 @@ pub const TIOCNXCL: ::c_ulong = 0x540D;
 pub const TIOCSCTTY: ::c_ulong = 0x540E;
 pub const TIOCSTI: ::c_ulong = 0x5412;
 pub const TIOCMGET: ::c_ulong = 0x5415;
 pub const TIOCMBIS: ::c_ulong = 0x5416;
 pub const TIOCMBIC: ::c_ulong = 0x5417;
 pub const TIOCMSET: ::c_ulong = 0x5418;
 pub const TIOCCONS: ::c_ulong = 0x541D;
 
+pub const CLONE_NEWCGROUP: ::c_int = 0x02000000;
+
 pub const SFD_CLOEXEC: ::c_int = 0x080000;
 
 pub const NCCS: usize = 32;
 
 pub const O_TRUNC: ::c_int = 512;
 
 pub const O_CLOEXEC: ::c_int = 0x80000;
 
@@ -364,16 +330,19 @@ pub const O_DIRECT: ::c_int = 0x20000;
 pub const MAP_LOCKED: ::c_int = 0x00080;
 pub const MAP_NORESERVE: ::c_int = 0x00040;
 
 pub const EDEADLOCK: ::c_int = 58;
 
 pub const FIOCLEX: ::c_ulong = 0x20006601;
 pub const FIONBIO: ::c_ulong = 0x8004667e;
 
+pub const SYS_gettid: ::c_long = 207;
+pub const SYS_perf_event_open: ::c_long = 319;
+
 pub const MCL_CURRENT: ::c_int = 0x2000;
 pub const MCL_FUTURE: ::c_int = 0x4000;
 
 pub const SIGSTKSZ: ::size_t = 0x4000;
 pub const MINSIGSTKSZ: ::size_t = 4096;
 pub const CBAUD: ::tcflag_t = 0xff;
 pub const TAB1: ::c_int = 0x400;
 pub const TAB2: ::c_int = 0x800;
@@ -409,25 +378,16 @@ pub const ECHOE: ::tcflag_t = 0x2;
 pub const ECHOK: ::tcflag_t = 0x4;
 pub const ECHONL: ::tcflag_t = 0x10;
 pub const ECHOPRT: ::tcflag_t = 0x20;
 pub const ECHOCTL: ::tcflag_t = 0x40;
 pub const ISIG: ::tcflag_t = 0x80;
 pub const ICANON: ::tcflag_t = 0x100;
 pub const PENDIN: ::tcflag_t = 0x20000000;
 pub const NOFLSH: ::tcflag_t = 0x80000000;
-pub const VSWTC: usize = 9;
-pub const OLCUC:  ::tcflag_t = 0o000004;
-pub const NLDLY:  ::tcflag_t = 0o001400;
-pub const CRDLY:  ::tcflag_t = 0o030000;
-pub const TABDLY: ::tcflag_t = 0o006000;
-pub const BSDLY:  ::tcflag_t = 0o100000;
-pub const FFDLY:  ::tcflag_t = 0o040000;
-pub const VTDLY:  ::tcflag_t = 0o200000;
-pub const XTABS:  ::tcflag_t = 0o006000;
 
 pub const B0: ::speed_t = 0o000000;
 pub const B50: ::speed_t = 0o000001;
 pub const B75: ::speed_t = 0o000002;
 pub const B110: ::speed_t = 0o000003;
 pub const B134: ::speed_t = 0o000004;
 pub const B150: ::speed_t = 0o000005;
 pub const B200: ::speed_t = 0o000006;
@@ -453,17 +413,16 @@ pub const B921600: ::speed_t = 0o0026;
 pub const B1000000: ::speed_t = 0o0027;
 pub const B1152000: ::speed_t = 0o0030;
 pub const B1500000: ::speed_t = 0o0031;
 pub const B2000000: ::speed_t = 0o0032;
 pub const B2500000: ::speed_t = 0o0033;
 pub const B3000000: ::speed_t = 0o0034;
 pub const B3500000: ::speed_t = 0o0035;
 pub const B4000000: ::speed_t = 0o0036;
-pub const BOTHER: ::speed_t = 0o0037;
 
 pub const VEOL: usize = 6;
 pub const VEOL2: usize = 8;
 pub const VMIN: usize = 5;
 pub const IEXTEN: ::tcflag_t = 0x400;
 pub const TOSTOP: ::tcflag_t = 0x400000;
 pub const FLUSHO: ::tcflag_t = 0x800000;
 pub const EXTPROC: ::tcflag_t = 0x10000000;
@@ -480,380 +439,8 @@ pub const TCXONC: ::c_ulong = 0x2000741e
 pub const TCFLSH: ::c_ulong = 0x2000741f;
 pub const TIOCINQ: ::c_ulong = 0x4004667f;
 pub const TIOCGPGRP: ::c_ulong = 0x40047477;
 pub const TIOCSPGRP: ::c_ulong = 0x80047476;
 pub const TIOCOUTQ: ::c_ulong = 0x40047473;
 pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
 pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
 pub const FIONREAD: ::c_ulong = 0x4004667f;
-
-// Syscall table
-pub const SYS_restart_syscall: ::c_long = 0;
-pub const SYS_exit: ::c_long = 1;
-pub const SYS_fork: ::c_long = 2;
-pub const SYS_read: ::c_long = 3;
-pub const SYS_write: ::c_long = 4;
-pub const SYS_open: ::c_long = 5;
-pub const SYS_close: ::c_long = 6;
-pub const SYS_waitpid: ::c_long = 7;
-pub const SYS_creat: ::c_long = 8;
-pub const SYS_link: ::c_long = 9;
-pub const SYS_unlink: ::c_long = 10;
-pub const SYS_execve: ::c_long = 11;
-pub const SYS_chdir: ::c_long = 12;
-pub const SYS_time: ::c_long = 13;
-pub const SYS_mknod: ::c_long = 14;
-pub const SYS_chmod: ::c_long = 15;
-pub const SYS_lchown: ::c_long = 16;
-pub const SYS_break: ::c_long = 17;
-pub const SYS_oldstat: ::c_long = 18;
-pub const SYS_lseek: ::c_long = 19;
-pub const SYS_getpid: ::c_long = 20;
-pub const SYS_mount: ::c_long = 21;
-pub const SYS_umount: ::c_long = 22;
-pub const SYS_setuid: ::c_long = 23;
-pub const SYS_getuid: ::c_long = 24;
-pub const SYS_stime: ::c_long = 25;
-pub const SYS_ptrace: ::c_long = 26;
-pub const SYS_alarm: ::c_long = 27;
-pub const SYS_oldfstat: ::c_long = 28;
-pub const SYS_pause: ::c_long = 29;
-pub const SYS_utime: ::c_long = 30;
-pub const SYS_stty: ::c_long = 31;
-pub const SYS_gtty: ::c_long = 32;
-pub const SYS_access: ::c_long = 33;
-pub const SYS_nice: ::c_long = 34;
-pub const SYS_ftime: ::c_long = 35;
-pub const SYS_sync: ::c_long = 36;
-pub const SYS_kill: ::c_long = 37;
-pub const SYS_rename: ::c_long = 38;
-pub const SYS_mkdir: ::c_long = 39;
-pub const SYS_rmdir: ::c_long = 40;
-pub const SYS_dup: ::c_long = 41;
-pub const SYS_pipe: ::c_long = 42;
-pub const SYS_times: ::c_long = 43;
-pub const SYS_prof: ::c_long = 44;
-pub const SYS_brk: ::c_long = 45;
-pub const SYS_setgid: ::c_long = 46;
-pub const SYS_getgid: ::c_long = 47;
-pub const SYS_signal: ::c_long = 48;
-pub const SYS_geteuid: ::c_long = 49;
-pub const SYS_getegid: ::c_long = 50;
-pub const SYS_acct: ::c_long = 51;
-pub const SYS_umount2: ::c_long = 52;
-pub const SYS_lock: ::c_long = 53;
-pub const SYS_ioctl: ::c_long = 54;
-pub const SYS_fcntl: ::c_long = 55;
-pub const SYS_mpx: ::c_long = 56;
-pub const SYS_setpgid: ::c_long = 57;
-pub const SYS_ulimit: ::c_long = 58;
-pub const SYS_oldolduname: ::c_long = 59;
-pub const SYS_umask: ::c_long = 60;
-pub const SYS_chroot: ::c_long = 61;
-pub const SYS_ustat: ::c_long = 62;
-pub const SYS_dup2: ::c_long = 63;
-pub const SYS_getppid: ::c_long = 64;
-pub const SYS_getpgrp: ::c_long = 65;
-pub const SYS_setsid: ::c_long = 66;
-pub const SYS_sigaction: ::c_long = 67;
-pub const SYS_sgetmask: ::c_long = 68;
-pub const SYS_ssetmask: ::c_long = 69;
-pub const SYS_setreuid: ::c_long = 70;
-pub const SYS_setregid: ::c_long = 71;
-pub const SYS_sigsuspend: ::c_long = 72;
-pub const SYS_sigpending: ::c_long = 73;
-pub const SYS_sethostname: ::c_long = 74;
-pub const SYS_setrlimit: ::c_long = 75;
-pub const SYS_getrlimit: ::c_long = 76;
-pub const SYS_getrusage: ::c_long = 77;
-pub const SYS_gettimeofday: ::c_long = 78;
-pub const SYS_settimeofday: ::c_long = 79;
-pub const SYS_getgroups: ::c_long = 80;
-pub const SYS_setgroups: ::c_long = 81;
-pub const SYS_select: ::c_long = 82;
-pub const SYS_symlink: ::c_long = 83;
-pub const SYS_oldlstat: ::c_long = 84;
-pub const SYS_readlink: ::c_long = 85;
-pub const SYS_uselib: ::c_long = 86;
-pub const SYS_swapon: ::c_long = 87;
-pub const SYS_reboot: ::c_long = 88;
-pub const SYS_readdir: ::c_long = 89;
-pub const SYS_mmap: ::c_long = 90;
-pub const SYS_munmap: ::c_long = 91;
-pub const SYS_truncate: ::c_long = 92;
-pub const SYS_ftruncate: ::c_long = 93;
-pub const SYS_fchmod: ::c_long = 94;
-pub const SYS_fchown: ::c_long = 95;
-pub const SYS_getpriority: ::c_long = 96;
-pub const SYS_setpriority: ::c_long = 97;
-pub const SYS_profil: ::c_long = 98;
-pub const SYS_statfs: ::c_long = 99;
-pub const SYS_fstatfs: ::c_long = 100;
-pub const SYS_ioperm: ::c_long = 101;
-pub const SYS_socketcall: ::c_long = 102;
-pub const SYS_syslog: ::c_long = 103;
-pub const SYS_setitimer: ::c_long = 104;
-pub const SYS_getitimer: ::c_long = 105;
-pub const SYS_stat: ::c_long = 106;
-pub const SYS_lstat: ::c_long = 107;
-pub const SYS_fstat: ::c_long = 108;
-pub const SYS_olduname: ::c_long = 109;
-pub const SYS_iopl: ::c_long = 110;
-pub const SYS_vhangup: ::c_long = 111;
-pub const SYS_idle: ::c_long = 112;
-pub const SYS_vm86: ::c_long = 113;
-pub const SYS_wait4: ::c_long = 114;
-pub const SYS_swapoff: ::c_long = 115;
-pub const SYS_sysinfo: ::c_long = 116;
-pub const SYS_ipc: ::c_long = 117;
-pub const SYS_fsync: ::c_long = 118;
-pub const SYS_sigreturn: ::c_long = 119;
-pub const SYS_clone: ::c_long = 120;
-pub const SYS_setdomainname: ::c_long = 121;
-pub const SYS_uname: ::c_long = 122;
-pub const SYS_modify_ldt: ::c_long = 123;
-pub const SYS_adjtimex: ::c_long = 124;
-pub const SYS_mprotect: ::c_long = 125;
-pub const SYS_sigprocmask: ::c_long = 126;
-pub const SYS_create_module: ::c_long = 127;
-pub const SYS_init_module: ::c_long = 128;
-pub const SYS_delete_module: ::c_long = 129;
-pub const SYS_get_kernel_syms: ::c_long = 130;
-pub const SYS_quotactl: ::c_long = 131;
-pub const SYS_getpgid: ::c_long = 132;
-pub const SYS_fchdir: ::c_long = 133;
-pub const SYS_bdflush: ::c_long = 134;
-pub const SYS_sysfs: ::c_long = 135;
-pub const SYS_personality: ::c_long = 136;
-pub const SYS_afs_syscall: ::c_long = 137; /* Syscall for Andrew File System */
-pub const SYS_setfsuid: ::c_long = 138;
-pub const SYS_setfsgid: ::c_long = 139;
-pub const SYS__llseek: ::c_long = 140;
-pub const SYS_getdents: ::c_long = 141;
-pub const SYS__newselect: ::c_long = 142;
-pub const SYS_flock: ::c_long = 143;
-pub const SYS_msync: ::c_long = 144;
-pub const SYS_readv: ::c_long = 145;
-pub const SYS_writev: ::c_long = 146;
-pub const SYS_getsid: ::c_long = 147;
-pub const SYS_fdatasync: ::c_long = 148;
-pub const SYS__sysctl: ::c_long = 149;
-pub const SYS_mlock: ::c_long = 150;
-pub const SYS_munlock: ::c_long = 151;
-pub const SYS_mlockall: ::c_long = 152;
-pub const SYS_munlockall: ::c_long = 153;
-pub const SYS_sched_setparam: ::c_long = 154;
-pub const SYS_sched_getparam: ::c_long = 155;
-pub const SYS_sched_setscheduler: ::c_long = 156;
-pub const SYS_sched_getscheduler: ::c_long = 157;
-pub const SYS_sched_yield: ::c_long = 158;
-pub const SYS_sched_get_priority_max: ::c_long = 159;
-pub const SYS_sched_get_priority_min: ::c_long = 160;
-pub const SYS_sched_rr_get_interval: ::c_long = 161;
-pub const SYS_nanosleep: ::c_long = 162;
-pub const SYS_mremap: ::c_long = 163;
-pub const SYS_setresuid: ::c_long = 164;
-pub const SYS_getresuid: ::c_long = 165;
-pub const SYS_query_module: ::c_long = 166;
-pub const SYS_poll: ::c_long = 167;
-pub const SYS_nfsservctl: ::c_long = 168;
-pub const SYS_setresgid: ::c_long = 169;
-pub const SYS_getresgid: ::c_long = 170;
-pub const SYS_prctl: ::c_long = 171;
-pub const SYS_rt_sigreturn: ::c_long = 172;
-pub const SYS_rt_sigaction: ::c_long = 173;
-pub const SYS_rt_sigprocmask: ::c_long = 174;
-pub const SYS_rt_sigpending: ::c_long = 175;
-pub const SYS_rt_sigtimedwait: ::c_long = 176;
-pub const SYS_rt_sigqueueinfo: ::c_long = 177;
-pub const SYS_rt_sigsuspend: ::c_long = 178;
-pub const SYS_pread64: ::c_long = 179;
-pub const SYS_pwrite64: ::c_long = 180;
-pub const SYS_chown: ::c_long = 181;
-pub const SYS_getcwd: ::c_long = 182;
-pub const SYS_capget: ::c_long = 183;
-pub const SYS_capset: ::c_long = 184;
-pub const SYS_sigaltstack: ::c_long = 185;
-pub const SYS_sendfile: ::c_long = 186;
-pub const SYS_getpmsg: ::c_long = 187; /* some people actually want streams */
-pub const SYS_putpmsg: ::c_long = 188; /* some people actually want streams */
-pub const SYS_vfork: ::c_long = 189;
-pub const SYS_ugetrlimit: ::c_long = 190; /* SuS compliant getrlimit */
-pub const SYS_readahead: ::c_long = 191;
-pub const SYS_pciconfig_read: ::c_long = 198;
-pub const SYS_pciconfig_write: ::c_long = 199;
-pub const SYS_pciconfig_iobase: ::c_long = 200;
-pub const SYS_multiplexer: ::c_long = 201;
-pub const SYS_getdents64: ::c_long = 202;
-pub const SYS_pivot_root: ::c_long = 203;
-pub const SYS_madvise: ::c_long = 205;
-pub const SYS_mincore: ::c_long = 206;
-pub const SYS_gettid: ::c_long = 207;
-pub const SYS_tkill: ::c_long = 208;
-pub const SYS_setxattr: ::c_long = 209;
-pub const SYS_lsetxattr: ::c_long = 210;
-pub const SYS_fsetxattr: ::c_long = 211;
-pub const SYS_getxattr: ::c_long = 212;
-pub const SYS_lgetxattr: ::c_long = 213;
-pub const SYS_fgetxattr: ::c_long = 214;
-pub const SYS_listxattr: ::c_long = 215;
-pub const SYS_llistxattr: ::c_long = 216;
-pub const SYS_flistxattr: ::c_long = 217;
-pub const SYS_removexattr: ::c_long = 218;
-pub const SYS_lremovexattr: ::c_long = 219;
-pub const SYS_fremovexattr: ::c_long = 220;
-pub const SYS_futex: ::c_long = 221;
-pub const SYS_sched_setaffinity: ::c_long = 222;
-pub const SYS_sched_getaffinity: ::c_long = 223;
-pub const SYS_tuxcall: ::c_long = 225;
-pub const SYS_io_setup: ::c_long = 227;
-pub const SYS_io_destroy: ::c_long = 228;
-pub const SYS_io_getevents: ::c_long = 229;
-pub const SYS_io_submit: ::c_long = 230;
-pub const SYS_io_cancel: ::c_long = 231;
-pub const SYS_set_tid_address: ::c_long = 232;
-pub const SYS_exit_group: ::c_long = 234;
-pub const SYS_lookup_dcookie: ::c_long = 235;
-pub const SYS_epoll_create: ::c_long = 236;
-pub const SYS_epoll_ctl: ::c_long = 237;
-pub const SYS_epoll_wait: ::c_long = 238;
-pub const SYS_remap_file_pages: ::c_long = 239;
-pub const SYS_timer_create: ::c_long = 240;
-pub const SYS_timer_settime: ::c_long = 241;
-pub const SYS_timer_gettime: ::c_long = 242;
-pub const SYS_timer_getoverrun: ::c_long = 243;
-pub const SYS_timer_delete: ::c_long = 244;
-pub const SYS_clock_settime: ::c_long = 245;
-pub const SYS_clock_gettime: ::c_long = 246;
-pub const SYS_clock_getres: ::c_long = 247;
-pub const SYS_clock_nanosleep: ::c_long = 248;
-pub const SYS_swapcontext: ::c_long = 249;
-pub const SYS_tgkill: ::c_long = 250;
-pub const SYS_utimes: ::c_long = 251;
-pub const SYS_statfs64: ::c_long = 252;
-pub const SYS_fstatfs64: ::c_long = 253;
-pub const SYS_rtas: ::c_long = 255;
-pub const SYS_sys_debug_setcontext: ::c_long = 256;
-pub const SYS_migrate_pages: ::c_long = 258;
-pub const SYS_mbind: ::c_long = 259;
-pub const SYS_get_mempolicy: ::c_long = 260;
-pub const SYS_set_mempolicy: ::c_long = 261;
-pub const SYS_mq_open: ::c_long = 262;
-pub const SYS_mq_unlink: ::c_long = 263;
-pub const SYS_mq_timedsend: ::c_long = 264;
-pub const SYS_mq_timedreceive: ::c_long = 265;
-pub const SYS_mq_notify: ::c_long = 266;
-pub const SYS_mq_getsetattr: ::c_long = 267;
-pub const SYS_kexec_load: ::c_long = 268;
-pub const SYS_add_key: ::c_long = 269;
-pub const SYS_request_key: ::c_long = 270;
-pub const SYS_keyctl: ::c_long = 271;
-pub const SYS_waitid: ::c_long = 272;
-pub const SYS_ioprio_set: ::c_long = 273;
-pub const SYS_ioprio_get: ::c_long = 274;
-pub const SYS_inotify_init: ::c_long = 275;
-pub const SYS_inotify_add_watch: ::c_long = 276;
-pub const SYS_inotify_rm_watch: ::c_long = 277;
-pub const SYS_spu_run: ::c_long = 278;
-pub const SYS_spu_create: ::c_long = 279;
-pub const SYS_pselect6: ::c_long = 280;
-pub const SYS_ppoll: ::c_long = 281;
-pub const SYS_unshare: ::c_long = 282;
-pub const SYS_splice: ::c_long = 283;
-pub const SYS_tee: ::c_long = 284;
-pub const SYS_vmsplice: ::c_long = 285;
-pub const SYS_openat: ::c_long = 286;
-pub const SYS_mkdirat: ::c_long = 287;
-pub const SYS_mknodat: ::c_long = 288;
-pub const SYS_fchownat: ::c_long = 289;
-pub const SYS_futimesat: ::c_long = 290;
-pub const SYS_newfstatat: ::c_long = 291;
-pub const SYS_unlinkat: ::c_long = 292;
-pub const SYS_renameat: ::c_long = 293;
-pub const SYS_linkat: ::c_long = 294;
-pub const SYS_symlinkat: ::c_long = 295;
-pub const SYS_readlinkat: ::c_long = 296;
-pub const SYS_fchmodat: ::c_long = 297;
-pub const SYS_faccessat: ::c_long = 298;
-pub const SYS_get_robust_list: ::c_long = 299;
-pub const SYS_set_robust_list: ::c_long = 300;
-pub const SYS_move_pages: ::c_long = 301;
-pub const SYS_getcpu: ::c_long = 302;
-pub const SYS_epoll_pwait: ::c_long = 303;
-pub const SYS_utimensat: ::c_long = 304;
-pub const SYS_signalfd: ::c_long = 305;
-pub const SYS_timerfd_create: ::c_long = 306;
-pub const SYS_eventfd: ::c_long = 307;
-pub const SYS_sync_file_range2: ::c_long = 308;
-pub const SYS_fallocate: ::c_long = 309;
-pub const SYS_subpage_prot: ::c_long = 310;
-pub const SYS_timerfd_settime: ::c_long = 311;
-pub const SYS_timerfd_gettime: ::c_long = 312;
-pub const SYS_signalfd4: ::c_long = 313;
-pub const SYS_eventfd2: ::c_long = 314;
-pub const SYS_epoll_create1: ::c_long = 315;
-pub const SYS_dup3: ::c_long = 316;
-pub const SYS_pipe2: ::c_long = 317;
-pub const SYS_inotify_init1: ::c_long = 318;
-pub const SYS_perf_event_open: ::c_long = 319;
-pub const SYS_preadv: ::c_long = 320;
-pub const SYS_pwritev: ::c_long = 321;
-pub const SYS_rt_tgsigqueueinfo: ::c_long = 322;
-pub const SYS_fanotify_init: ::c_long = 323;
-pub const SYS_fanotify_mark: ::c_long = 324;
-pub const SYS_prlimit64: ::c_long = 325;
-pub const SYS_socket: ::c_long = 326;
-pub const SYS_bind: ::c_long = 327;
-pub const SYS_connect: ::c_long = 328;
-pub const SYS_listen: ::c_long = 329;
-pub const SYS_accept: ::c_long = 330;
-pub const SYS_getsockname: ::c_long = 331;
-pub const SYS_getpeername: ::c_long = 332;
-pub const SYS_socketpair: ::c_long = 333;
-pub const SYS_send: ::c_long = 334;
-pub const SYS_sendto: ::c_long = 335;
-pub const SYS_recv: ::c_long = 336;
-pub const SYS_recvfrom: ::c_long = 337;
-pub const SYS_shutdown: ::c_long = 338;
-pub const SYS_setsockopt: ::c_long = 339;
-pub const SYS_getsockopt: ::c_long = 340;
-pub const SYS_sendmsg: ::c_long = 341;
-pub const SYS_recvmsg: ::c_long = 342;
-pub const SYS_recvmmsg: ::c_long = 343;
-pub const SYS_accept4: ::c_long = 344;
-pub const SYS_name_to_handle_at: ::c_long = 345;
-pub const SYS_open_by_handle_at: ::c_long = 346;
-pub const SYS_clock_adjtime: ::c_long = 347;
-pub const SYS_syncfs: ::c_long = 348;
-pub const SYS_sendmmsg: ::c_long = 349;
-pub const SYS_setns: ::c_long = 350;
-pub const SYS_process_vm_readv: ::c_long = 351;
-pub const SYS_process_vm_writev: ::c_long = 352;
-pub const SYS_finit_module: ::c_long = 353;
-pub const SYS_kcmp: ::c_long = 354;
-pub const SYS_sched_setattr: ::c_long = 355;
-pub const SYS_sched_getattr: ::c_long = 356;
-pub const SYS_renameat2: ::c_long = 357;
-pub const SYS_seccomp: ::c_long = 358;
-pub const SYS_getrandom: ::c_long = 359;
-pub const SYS_memfd_create: ::c_long = 360;
-pub const SYS_bpf: ::c_long = 361;
-pub const SYS_execveat: ::c_long = 362;
-pub const SYS_switch_endian: ::c_long = 363;
-pub const SYS_userfaultfd: ::c_long = 364;
-pub const SYS_membarrier: ::c_long = 365;
-pub const SYS_mlock2: ::c_long = 378;
-pub const SYS_copy_file_range: ::c_long = 379;
-pub const SYS_preadv2: ::c_long = 380;
-pub const SYS_pwritev2: ::c_long = 381;
-pub const SYS_kexec_file_load: ::c_long = 382;
-
-#[link(name = "util")]
-extern {
-    pub fn sysctl(name: *mut ::c_int,
-                  namelen: ::c_int,
-                  oldp: *mut ::c_void,
-                  oldlenp: *mut ::size_t,
-                  newp: *mut ::c_void,
-                  newlen: ::size_t)
-                  -> ::c_int;
-}
--- a/third_party/rust/libc/src/unix/notbsd/linux/other/b64/sparc64.rs
+++ b/third_party/rust/libc/src/unix/notbsd/linux/other/b64/sparc64.rs
@@ -1,18 +1,15 @@
 //! SPARC64-specific definitions for 64-bit linux-like values
 
-pub type c_long = i64;
-pub type c_ulong = u64;
 pub type c_char = i8;
 pub type wchar_t = i32;
 pub type nlink_t = u32;
 pub type blksize_t = i64;
 pub type suseconds_t = i32;
-pub type __u64 = ::c_ulonglong;
 
 s! {
     pub struct stat {
         pub st_dev: ::dev_t,
         __pad0: u64,
         pub st_ino: ::ino_t,
         pub st_mode: ::mode_t,
         pub st_nlink: ::nlink_t,
@@ -49,46 +46,16 @@ s! {
         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; 2],
     }
 
-    pub struct statfs64 {
-        pub f_type: ::__fsword_t,
-        pub f_bsize: ::__fsword_t,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_bavail: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        pub f_fsid: ::fsid_t,
-        pub f_namelen: ::__fsword_t,
-        pub f_frsize: ::__fsword_t,
-        pub f_flags: ::__fsword_t,
-        pub f_spare: [::__fsword_t; 4],
-    }
-
-    pub struct statvfs64 {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_bavail: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        pub f_favail: u64,
-        pub f_fsid: ::c_ulong,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-        __f_spare: [::c_int; 6],
-    }
-
     pub struct pthread_attr_t {
         __size: [u64; 7]
     }
 
     pub struct ipc_perm {
         pub __key: ::key_t,
         pub uid: ::uid_t,
         pub gid: ::gid_t,
@@ -108,48 +75,33 @@ s! {
         pub shm_ctime: ::time_t,
         pub shm_segsz: ::size_t,
         pub shm_cpid: ::pid_t,
         pub shm_lpid: ::pid_t,
         pub shm_nattch: ::shmatt_t,
         __reserved1: ::c_ulong,
         __reserved2: ::c_ulong
     }
-
-    pub struct termios2 {
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_line: ::cc_t,
-        pub c_cc: [::cc_t; 19],
-        pub c_ispeed: ::speed_t,
-        pub c_ospeed: ::speed_t,
-    }
 }
 
-pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
-
 pub const TIOCGSOFTCAR: ::c_ulong = 0x40047464;
 pub const TIOCSSOFTCAR: ::c_ulong = 0x80047465;
 
 pub const RLIMIT_NOFILE: ::c_int = 6;
 pub const RLIMIT_NPROC: ::c_int = 7;
 
 pub const O_APPEND: ::c_int = 0x8;
 pub const O_CREAT: ::c_int = 0x200;
 pub const O_EXCL: ::c_int = 0x800;
 pub const O_NOCTTY: ::c_int = 0x8000;
 pub const O_NONBLOCK: ::c_int = 0x4000;
 pub const O_SYNC: ::c_int = 0x802000;
 pub const O_RSYNC: ::c_int = 0x802000;
 pub const O_DSYNC: ::c_int = 0x2000;
 pub const O_FSYNC: ::c_int = 0x802000;
-pub const O_NOATIME: ::c_int = 0x200000;
-pub const O_PATH: ::c_int = 0x1000000;
 
 pub const MAP_GROWSDOWN: ::c_int = 0x0200;
 
 pub const EDEADLK: ::c_int = 78;
 pub const ENAMETOOLONG: ::c_int = 63;
 pub const ENOLCK: ::c_int = 79;
 pub const ENOSYS: ::c_int = 90;
 pub const ENOTEMPTY: ::c_int = 66;
@@ -225,29 +177,22 @@ pub const EKEYREJECTED: ::c_int = 131;
 pub const EOWNERDEAD: ::c_int = 132;
 pub const ENOTRECOVERABLE: ::c_int = 133;
 pub const EHWPOISON: ::c_int = 135;
 pub const ERFKILL: ::c_int = 134;
 
 pub const SOL_SOCKET: ::c_int = 0xffff;
 
 pub const SO_REUSEADDR: ::c_int = 4;
-pub const SO_BINDTODEVICE: ::c_int = 0x000d;
-pub const SO_TIMESTAMP: ::c_int = 0x001d;
-pub const SO_MARK: ::c_int = 0x0022;
-pub const SO_RXQ_OVFL: ::c_int = 0x0024;
-pub const SO_PEEK_OFF: ::c_int = 0x0026;
-pub const SO_BUSY_POLL: ::c_int = 0x0030;
 pub const SO_TYPE: ::c_int = 0x1008;
 pub const SO_ERROR: ::c_int = 0x1007;
 pub const SO_DONTROUTE: ::c_int = 16;
 pub const SO_BROADCAST: ::c_int = 32;
 pub const SO_SNDBUF: ::c_int = 0x1001;
 pub const SO_RCVBUF: ::c_int = 0x1002;
-pub const SO_DOMAIN: ::c_int = 0x1029;
 pub const SO_KEEPALIVE: ::c_int = 8;
 pub const SO_OOBINLINE: ::c_int = 0x100;
 pub const SO_LINGER: ::c_int = 128;
 pub const SO_REUSEPORT: ::c_int = 0x200;
 pub const SO_ACCEPTCONN: ::c_int = 0x8000;
 
 pub const SA_ONSTACK: ::c_int = 1;
 pub const SA_SIGINFO: ::c_int = 0x200;
@@ -392,27 +337,16 @@ pub const ECHOE: ::tcflag_t = 0x10;
 pub const ECHOK: ::tcflag_t = 0x20;
 pub const ECHONL: ::tcflag_t = 0x40;
 pub const ECHOPRT: ::tcflag_t = 0x400;
 pub const ECHOCTL: ::tcflag_t = 0x200;
 pub const ISIG: ::tcflag_t = 0x1;
 pub const ICANON: ::tcflag_t = 0x2;
 pub const PENDIN: ::tcflag_t = 0x4000;
 pub const NOFLSH: ::tcflag_t = 0x80;
-pub const CIBAUD: ::tcflag_t = 0o02003600000;
-pub const CBAUDEX: ::tcflag_t = 0x00001000;
-pub const VSWTC: usize = 7;
-pub const OLCUC:  ::tcflag_t = 0o000002;
-pub const NLDLY:  ::tcflag_t = 0o000400;
-pub const CRDLY:  ::tcflag_t = 0o003000;
-pub const TABDLY: ::tcflag_t = 0o014000;
-pub const BSDLY:  ::tcflag_t = 0o020000;
-pub const FFDLY:  ::tcflag_t = 0o100000;
-pub const VTDLY:  ::tcflag_t = 0o040000;
-pub const XTABS:  ::tcflag_t = 0o014000;
 
 pub const VEOL: usize = 5;
 pub const VEOL2: usize = 6;
 pub const VMIN: usize = 4;
 pub const IEXTEN: ::tcflag_t = 0x8000;
 pub const TOSTOP: ::tcflag_t = 0x100;
 pub const FLUSHO: ::tcflag_t = 0x2000;
 pub const EXTPROC: ::tcflag_t = 0x10000;
@@ -429,19 +363,8 @@ pub const TCXONC: ::c_ulong = 0x20005406
 pub const TCFLSH: ::c_ulong = 0x20005407;
 pub const TIOCINQ: ::c_ulong = 0x4004667f;
 pub const TIOCGPGRP: ::c_ulong = 0x40047483;
 pub const TIOCSPGRP: ::c_ulong = 0x80047482;
 pub const TIOCOUTQ: ::c_ulong = 0x40047473;
 pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
 pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
 pub const FIONREAD: ::c_ulong = 0x4004667f;
-
-#[link(name = "util")]
-extern {
-    pub fn sysctl(name: *mut ::c_int,
-                  namelen: ::c_int,
-                  oldp: *mut ::c_void,
-                  oldlenp: *mut ::size_t,
-                  newp: *mut ::c_void,
-                  newlen: ::size_t)
-                  -> ::c_int;
-}
deleted file mode 100644
--- a/third_party/rust/libc/src/unix/notbsd/linux/other/b64/x32.rs
+++ /dev/null
@@ -1,331 +0,0 @@
-pub type c_long = i32;
-pub type c_ulong = u32;
-
-pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 32;
-pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 44;
-
-// Syscall table
-
-pub const __X32_SYSCALL_BIT: ::c_long = 0x40000000;
-
-pub const SYS_read: ::c_long = __X32_SYSCALL_BIT + 0;
-pub const SYS_write: ::c_long = __X32_SYSCALL_BIT + 1;
-pub const SYS_open: ::c_long = __X32_SYSCALL_BIT + 2;
-pub const SYS_close: ::c_long = __X32_SYSCALL_BIT + 3;
-pub const SYS_stat: ::c_long = __X32_SYSCALL_BIT + 4;
-pub const SYS_fstat: ::c_long = __X32_SYSCALL_BIT + 5;
-pub const SYS_lstat: ::c_long = __X32_SYSCALL_BIT + 6;
-pub const SYS_poll: ::c_long = __X32_SYSCALL_BIT + 7;
-pub const SYS_lseek: ::c_long = __X32_SYSCALL_BIT + 8;
-pub const SYS_mmap: ::c_long = __X32_SYSCALL_BIT + 9;
-pub const SYS_mprotect: ::c_long = __X32_SYSCALL_BIT + 10;
-pub const SYS_munmap: ::c_long = __X32_SYSCALL_BIT + 11;
-pub const SYS_brk: ::c_long = __X32_SYSCALL_BIT + 12;
-pub const SYS_rt_sigprocmask: ::c_long = __X32_SYSCALL_BIT + 14;
-pub const SYS_pread64: ::c_long = __X32_SYSCALL_BIT + 17;
-pub const SYS_pwrite64: ::c_long = __X32_SYSCALL_BIT + 18;
-pub const SYS_access: ::c_long = __X32_SYSCALL_BIT + 21;
-pub const SYS_pipe: ::c_long = __X32_SYSCALL_BIT + 22;
-pub const SYS_select: ::c_long = __X32_SYSCALL_BIT + 23;
-pub const SYS_sched_yield: ::c_long = __X32_SYSCALL_BIT + 24;
-pub const SYS_mremap: ::c_long = __X32_SYSCALL_BIT + 25;
-pub const SYS_msync: ::c_long = __X32_SYSCALL_BIT + 26;
-pub const SYS_mincore: ::c_long = __X32_SYSCALL_BIT + 27;
-pub const SYS_madvise: ::c_long = __X32_SYSCALL_BIT + 28;
-pub const SYS_shmget: ::c_long = __X32_SYSCALL_BIT + 29;
-pub const SYS_shmat: ::c_long = __X32_SYSCALL_BIT + 30;
-pub const SYS_shmctl: ::c_long = __X32_SYSCALL_BIT + 31;
-pub const SYS_dup: ::c_long = __X32_SYSCALL_BIT + 32;
-pub const SYS_dup2: ::c_long = __X32_SYSCALL_BIT + 33;
-pub const SYS_pause: ::c_long = __X32_SYSCALL_BIT + 34;
-pub const SYS_nanosleep: ::c_long = __X32_SYSCALL_BIT + 35;
-pub const SYS_getitimer: ::c_long = __X32_SYSCALL_BIT + 36;
-pub const SYS_alarm: ::c_long = __X32_SYSCALL_BIT + 37;
-pub const SYS_setitimer: ::c_long = __X32_SYSCALL_BIT + 38;
-pub const SYS_getpid: ::c_long = __X32_SYSCALL_BIT + 39;
-pub const SYS_sendfile: ::c_long = __X32_SYSCALL_BIT + 40;
-pub const SYS_socket: ::c_long = __X32_SYSCALL_BIT + 41;
-pub const SYS_connect: ::c_long = __X32_SYSCALL_BIT + 42;
-pub const SYS_accept: ::c_long = __X32_SYSCALL_BIT + 43;
-pub const SYS_sendto: ::c_long = __X32_SYSCALL_BIT + 44;
-pub const SYS_shutdown: ::c_long = __X32_SYSCALL_BIT + 48;
-pub const SYS_bind: ::c_long = __X32_SYSCALL_BIT + 49;
-pub const SYS_listen: ::c_long = __X32_SYSCALL_BIT + 50;
-pub const SYS_getsockname: ::c_long = __X32_SYSCALL_BIT + 51;
-pub const SYS_getpeername: ::c_long = __X32_SYSCALL_BIT + 52;
-pub const SYS_socketpair: ::c_long = __X32_SYSCALL_BIT + 53;
-pub const SYS_clone: ::c_long = __X32_SYSCALL_BIT + 56;
-pub const SYS_fork: ::c_long = __X32_SYSCALL_BIT + 57;
-pub const SYS_vfork: ::c_long = __X32_SYSCALL_BIT + 58;
-pub const SYS_exit: ::c_long = __X32_SYSCALL_BIT + 60;
-pub const SYS_wait4: ::c_long = __X32_SYSCALL_BIT + 61;
-pub const SYS_kill: ::c_long = __X32_SYSCALL_BIT + 62;
-pub const SYS_uname: ::c_long = __X32_SYSCALL_BIT + 63;
-pub const SYS_semget: ::c_long = __X32_SYSCALL_BIT + 64;
-pub const SYS_semop: ::c_long = __X32_SYSCALL_BIT + 65;
-pub const SYS_semctl: ::c_long = __X32_SYSCALL_BIT + 66;
-pub const SYS_shmdt: ::c_long = __X32_SYSCALL_BIT + 67;
-pub const SYS_msgget: ::c_long = __X32_SYSCALL_BIT + 68;
-pub const SYS_msgsnd: ::c_long = __X32_SYSCALL_BIT + 69;
-pub const SYS_msgrcv: ::c_long = __X32_SYSCALL_BIT + 70;
-pub const SYS_msgctl: ::c_long = __X32_SYSCALL_BIT + 71;
-pub const SYS_fcntl: ::c_long = __X32_SYSCALL_BIT + 72;
-pub const SYS_flock: ::c_long = __X32_SYSCALL_BIT + 73;
-pub const SYS_fsync: ::c_long = __X32_SYSCALL_BIT + 74;
-pub const SYS_fdatasync: ::c_long = __X32_SYSCALL_BIT + 75;
-pub const SYS_truncate: ::c_long = __X32_SYSCALL_BIT + 76;
-pub const SYS_ftruncate: ::c_long = __X32_SYSCALL_BIT + 77;
-pub const SYS_getdents: ::c_long = __X32_SYSCALL_BIT + 78;
-pub const SYS_getcwd: ::c_long = __X32_SYSCALL_BIT + 79;
-pub const SYS_chdir: ::c_long = __X32_SYSCALL_BIT + 80;
-pub const SYS_fchdir: ::c_long = __X32_SYSCALL_BIT + 81;
-pub const SYS_rename: ::c_long = __X32_SYSCALL_BIT + 82;
-pub const SYS_mkdir: ::c_long = __X32_SYSCALL_BIT + 83;
-pub const SYS_rmdir: ::c_long = __X32_SYSCALL_BIT + 84;
-pub const SYS_creat: ::c_long = __X32_SYSCALL_BIT + 85;
-pub const SYS_link: ::c_long = __X32_SYSCALL_BIT + 86;
-pub const SYS_unlink: ::c_long = __X32_SYSCALL_BIT + 87;
-pub const SYS_symlink: ::c_long = __X32_SYSCALL_BIT + 88;
-pub const SYS_readlink: ::c_long = __X32_SYSCALL_BIT + 89;
-pub const SYS_chmod: ::c_long = __X32_SYSCALL_BIT + 90;
-pub const SYS_fchmod: ::c_long = __X32_SYSCALL_BIT + 91;
-pub const SYS_chown: ::c_long = __X32_SYSCALL_BIT + 92;
-pub const SYS_fchown: ::c_long = __X32_SYSCALL_BIT + 93;
-pub const SYS_lchown: ::c_long = __X32_SYSCALL_BIT + 94;
-pub const SYS_umask: ::c_long = __X32_SYSCALL_BIT + 95;
-pub const SYS_gettimeofday: ::c_long = __X32_SYSCALL_BIT + 96;
-pub const SYS_getrlimit: ::c_long = __X32_SYSCALL_BIT + 97;
-pub const SYS_getrusage: ::c_long = __X32_SYSCALL_BIT + 98;
-pub const SYS_sysinfo: ::c_long = __X32_SYSCALL_BIT + 99;
-pub const SYS_times: ::c_long = __X32_SYSCALL_BIT + 100;
-pub const SYS_getuid: ::c_long = __X32_SYSCALL_BIT + 102;
-pub const SYS_syslog: ::c_long = __X32_SYSCALL_BIT + 103;
-pub const SYS_getgid: ::c_long = __X32_SYSCALL_BIT + 104;
-pub const SYS_setuid: ::c_long = __X32_SYSCALL_BIT + 105;
-pub const SYS_setgid: ::c_long = __X32_SYSCALL_BIT + 106;
-pub const SYS_geteuid: ::c_long = __X32_SYSCALL_BIT + 107;
-pub const SYS_getegid: ::c_long = __X32_SYSCALL_BIT + 108;
-pub const SYS_setpgid: ::c_long = __X32_SYSCALL_BIT + 109;
-pub const SYS_getppid: ::c_long = __X32_SYSCALL_BIT + 110;
-pub const SYS_getpgrp: ::c_long = __X32_SYSCALL_BIT + 111;
-pub const SYS_setsid: ::c_long = __X32_SYSCALL_BIT + 112;
-pub const SYS_setreuid: ::c_long = __X32_SYSCALL_BIT + 113;
-pub const SYS_setregid: ::c_long = __X32_SYSCALL_BIT + 114;
-pub const SYS_getgroups: ::c_long = __X32_SYSCALL_BIT + 115;
-pub const SYS_setgroups: ::c_long = __X32_SYSCALL_BIT + 116;
-pub const SYS_setresuid: ::c_long = __X32_SYSCALL_BIT + 117;
-pub const SYS_getresuid: ::c_long = __X32_SYSCALL_BIT + 118;
-pub const SYS_setresgid: ::c_long = __X32_SYSCALL_BIT + 119;
-pub const SYS_getresgid: ::c_long = __X32_SYSCALL_BIT + 120;
-pub const SYS_getpgid: ::c_long = __X32_SYSCALL_BIT + 121;
-pub const SYS_setfsuid: ::c_long = __X32_SYSCALL_BIT + 122;
-pub const SYS_setfsgid: ::c_long = __X32_SYSCALL_BIT + 123;
-pub const SYS_getsid: ::c_long = __X32_SYSCALL_BIT + 124;
-pub const SYS_capget: ::c_long = __X32_SYSCALL_BIT + 125;
-pub const SYS_capset: ::c_long = __X32_SYSCALL_BIT + 126;
-pub const SYS_rt_sigsuspend: ::c_long = __X32_SYSCALL_BIT + 130;
-pub const SYS_utime: ::c_long = __X32_SYSCALL_BIT + 132;
-pub const SYS_mknod: ::c_long = __X32_SYSCALL_BIT + 133;
-pub const SYS_personality: ::c_long = __X32_SYSCALL_BIT + 135;
-pub const SYS_ustat: ::c_long = __X32_SYSCALL_BIT + 136;
-pub const SYS_statfs: ::c_long = __X32_SYSCALL_BIT + 137;
-pub const SYS_fstatfs: ::c_long = __X32_SYSCALL_BIT + 138;
-pub const SYS_sysfs: ::c_long = __X32_SYSCALL_BIT + 139;
-pub const SYS_getpriority: ::c_long = __X32_SYSCALL_BIT + 140;
-pub const SYS_setpriority: ::c_long = __X32_SYSCALL_BIT + 141;
-pub const SYS_sched_setparam: ::c_long = __X32_SYSCALL_BIT + 142;
-pub const SYS_sched_getparam: ::c_long = __X32_SYSCALL_BIT + 143;
-pub const SYS_sched_setscheduler: ::c_long = __X32_SYSCALL_BIT + 144;
-pub const SYS_sched_getscheduler: ::c_long = __X32_SYSCALL_BIT + 145;
-pub const SYS_sched_get_priority_max: ::c_long = __X32_SYSCALL_BIT + 146;
-pub const SYS_sched_get_priority_min: ::c_long = __X32_SYSCALL_BIT + 147;
-pub const SYS_sched_rr_get_interval: ::c_long = __X32_SYSCALL_BIT + 148;
-pub const SYS_mlock: ::c_long = __X32_SYSCALL_BIT + 149;
-pub const SYS_munlock: ::c_long = __X32_SYSCALL_BIT + 150;
-pub const SYS_mlockall: ::c_long = __X32_SYSCALL_BIT + 151;
-pub const SYS_munlockall: ::c_long = __X32_SYSCALL_BIT + 152;
-pub const SYS_vhangup: ::c_long = __X32_SYSCALL_BIT + 153;
-pub const SYS_modify_ldt: ::c_long = __X32_SYSCALL_BIT + 154;
-pub const SYS_pivot_root: ::c_long = __X32_SYSCALL_BIT + 155;
-pub const SYS_prctl: ::c_long = __X32_SYSCALL_BIT + 157;
-pub const SYS_arch_prctl: ::c_long = __X32_SYSCALL_BIT + 158;
-pub const SYS_adjtimex: ::c_long = __X32_SYSCALL_BIT + 159;
-pub const SYS_setrlimit: ::c_long = __X32_SYSCALL_BIT + 160;
-pub const SYS_chroot: ::c_long = __X32_SYSCALL_BIT + 161;
-pub const SYS_sync: ::c_long = __X32_SYSCALL_BIT + 162;
-pub const SYS_acct: ::c_long = __X32_SYSCALL_BIT + 163;
-pub const SYS_settimeofday: ::c_long = __X32_SYSCALL_BIT + 164;
-pub const SYS_mount: ::c_long = __X32_SYSCALL_BIT + 165;
-pub const SYS_umount2: ::c_long = __X32_SYSCALL_BIT + 166;
-pub const SYS_swapon: ::c_long = __X32_SYSCALL_BIT + 167;
-pub const SYS_swapoff: ::c_long = __X32_SYSCALL_BIT + 168;
-pub const SYS_reboot: ::c_long = __X32_SYSCALL_BIT + 169;
-pub const SYS_sethostname: ::c_long = __X32_SYSCALL_BIT + 170;
-pub const SYS_setdomainname: ::c_long = __X32_SYSCALL_BIT + 171;
-pub const SYS_iopl: ::c_long = __X32_SYSCALL_BIT + 172;
-pub const SYS_ioperm: ::c_long = __X32_SYSCALL_BIT + 173;
-pub const SYS_init_module: ::c_long = __X32_SYSCALL_BIT + 175;
-pub const SYS_delete_module: ::c_long = __X32_SYSCALL_BIT + 176;
-pub const SYS_quotactl: ::c_long = __X32_SYSCALL_BIT + 179;
-pub const SYS_getpmsg: ::c_long = __X32_SYSCALL_BIT + 181;
-pub const SYS_putpmsg: ::c_long = __X32_SYSCALL_BIT + 182;
-pub const SYS_afs_syscall: ::c_long = __X32_SYSCALL_BIT + 183;
-pub const SYS_tuxcall: ::c_long = __X32_SYSCALL_BIT + 184;
-pub const SYS_security: ::c_long = __X32_SYSCALL_BIT + 185;
-pub const SYS_gettid: ::c_long = __X32_SYSCALL_BIT + 186;
-pub const SYS_readahead: ::c_long = __X32_SYSCALL_BIT + 187;
-pub const SYS_setxattr: ::c_long = __X32_SYSCALL_BIT + 188;
-pub const SYS_lsetxattr: ::c_long = __X32_SYSCALL_BIT + 189;
-pub const SYS_fsetxattr: ::c_long = __X32_SYSCALL_BIT + 190;
-pub const SYS_getxattr: ::c_long = __X32_SYSCALL_BIT + 191;
-pub const SYS_lgetxattr: ::c_long = __X32_SYSCALL_BIT + 192;
-pub const SYS_fgetxattr: ::c_long = __X32_SYSCALL_BIT + 193;
-pub const SYS_listxattr: ::c_long = __X32_SYSCALL_BIT + 194;
-pub const SYS_llistxattr: ::c_long = __X32_SYSCALL_BIT + 195;
-pub const SYS_flistxattr: ::c_long = __X32_SYSCALL_BIT + 196;
-pub const SYS_removexattr: ::c_long = __X32_SYSCALL_BIT + 197;
-pub const SYS_lremovexattr: ::c_long = __X32_SYSCALL_BIT + 198;
-pub const SYS_fremovexattr: ::c_long = __X32_SYSCALL_BIT + 199;
-pub const SYS_tkill: ::c_long = __X32_SYSCALL_BIT + 200;
-pub const SYS_time: ::c_long = __X32_SYSCALL_BIT + 201;
-pub const SYS_futex: ::c_long = __X32_SYSCALL_BIT + 202;
-pub const SYS_sched_setaffinity: ::c_long = __X32_SYSCALL_BIT + 203;
-pub const SYS_sched_getaffinity: ::c_long = __X32_SYSCALL_BIT + 204;
-pub const SYS_io_destroy: ::c_long = __X32_SYSCALL_BIT + 207;
-pub const SYS_io_getevents: ::c_long = __X32_SYSCALL_BIT + 208;
-pub const SYS_io_cancel: ::c_long = __X32_SYSCALL_BIT + 210;
-pub const SYS_lookup_dcookie: ::c_long = __X32_SYSCALL_BIT + 212;
-pub const SYS_epoll_create: ::c_long = __X32_SYSCALL_BIT + 213;
-pub const SYS_remap_file_pages: ::c_long = __X32_SYSCALL_BIT + 216;
-pub const SYS_getdents64: ::c_long = __X32_SYSCALL_BIT + 217;
-pub const SYS_set_tid_address: ::c_long = __X32_SYSCALL_BIT + 218;
-pub const SYS_restart_syscall: ::c_long = __X32_SYSCALL_BIT + 219;
-pub const SYS_semtimedop: ::c_long = __X32_SYSCALL_BIT + 220;
-pub const SYS_fadvise64: ::c_long = __X32_SYSCALL_BIT + 221;
-pub const SYS_timer_settime: ::c_long = __X32_SYSCALL_BIT + 223;
-pub const SYS_timer_gettime: ::c_long = __X32_SYSCALL_BIT + 224;
-pub const SYS_timer_getoverrun: ::c_long = __X32_SYSCALL_BIT + 225;
-pub const SYS_timer_delete: ::c_long = __X32_SYSCALL_BIT + 226;
-pub const SYS_clock_settime: ::c_long = __X32_SYSCALL_BIT + 227;
-pub const SYS_clock_gettime: ::c_long = __X32_SYSCALL_BIT + 228;
-pub const SYS_clock_getres: ::c_long = __X32_SYSCALL_BIT + 229;
-pub const SYS_clock_nanosleep: ::c_long = __X32_SYSCALL_BIT + 230;
-pub const SYS_exit_group: ::c_long = __X32_SYSCALL_BIT + 231;
-pub const SYS_epoll_wait: ::c_long = __X32_SYSCALL_BIT + 232;
-pub const SYS_epoll_ctl: ::c_long = __X32_SYSCALL_BIT + 233;
-pub const SYS_tgkill: ::c_long = __X32_SYSCALL_BIT + 234;
-pub const SYS_utimes: ::c_long = __X32_SYSCALL_BIT + 235;
-pub const SYS_mbind: ::c_long = __X32_SYSCALL_BIT + 237;
-pub const SYS_set_mempolicy: ::c_long = __X32_SYSCALL_BIT + 238;
-pub const SYS_get_mempolicy: ::c_long = __X32_SYSCALL_BIT + 239;
-pub const SYS_mq_open: ::c_long = __X32_SYSCALL_BIT + 240;
-pub const SYS_mq_unlink: ::c_long = __X32_SYSCALL_BIT + 241;
-pub const SYS_mq_timedsend: ::c_long = __X32_SYSCALL_BIT + 242;
-pub const SYS_mq_timedreceive: ::c_long = __X32_SYSCALL_BIT + 243;
-pub const SYS_mq_getsetattr: ::c_long = __X32_SYSCALL_BIT + 245;
-pub const SYS_add_key: ::c_long = __X32_SYSCALL_BIT + 248;
-pub const SYS_request_key: ::c_long = __X32_SYSCALL_BIT + 249;
-pub const SYS_keyctl: ::c_long = __X32_SYSCALL_BIT + 250;
-pub const SYS_ioprio_set: ::c_long = __X32_SYSCALL_BIT + 251;
-pub const SYS_ioprio_get: ::c_long = __X32_SYSCALL_BIT + 252;
-pub const SYS_inotify_init: ::c_long = __X32_SYSCALL_BIT + 253;
-pub const SYS_inotify_add_watch: ::c_long = __X32_SYSCALL_BIT + 254;
-pub const SYS_inotify_rm_watch: ::c_long = __X32_SYSCALL_BIT + 255;
-pub const SYS_migrate_pages: ::c_long = __X32_SYSCALL_BIT + 256;
-pub const SYS_openat: ::c_long = __X32_SYSCALL_BIT + 257;
-pub const SYS_mkdirat: ::c_long = __X32_SYSCALL_BIT + 258;
-pub const SYS_mknodat: ::c_long = __X32_SYSCALL_BIT + 259;
-pub const SYS_fchownat: ::c_long = __X32_SYSCALL_BIT + 260;
-pub const SYS_futimesat: ::c_long = __X32_SYSCALL_BIT + 261;
-pub const SYS_newfstatat: ::c_long = __X32_SYSCALL_BIT + 262;
-pub const SYS_unlinkat: ::c_long = __X32_SYSCALL_BIT + 263;
-pub const SYS_renameat: ::c_long = __X32_SYSCALL_BIT + 264;
-pub const SYS_linkat: ::c_long = __X32_SYSCALL_BIT + 265;
-pub const SYS_symlinkat: ::c_long = __X32_SYSCALL_BIT + 266;
-pub const SYS_readlinkat: ::c_long = __X32_SYSCALL_BIT + 267;
-pub const SYS_fchmodat: ::c_long = __X32_SYSCALL_BIT + 268;
-pub const SYS_faccessat: ::c_long = __X32_SYSCALL_BIT + 269;
-pub const SYS_pselect6: ::c_long = __X32_SYSCALL_BIT + 270;
-pub const SYS_ppoll: ::c_long = __X32_SYSCALL_BIT + 271;
-pub const SYS_unshare: ::c_long = __X32_SYSCALL_BIT + 272;
-pub const SYS_splice: ::c_long = __X32_SYSCALL_BIT + 275;
-pub const SYS_tee: ::c_long = __X32_SYSCALL_BIT + 276;
-pub const SYS_sync_file_range: ::c_long = __X32_SYSCALL_BIT + 277;
-pub const SYS_utimensat: ::c_long = __X32_SYSCALL_BIT + 280;
-pub const SYS_epoll_pwait: ::c_long = __X32_SYSCALL_BIT + 281;
-pub const SYS_signalfd: ::c_long = __X32_SYSCALL_BIT + 282;
-pub const SYS_timerfd_create: ::c_long = __X32_SYSCALL_BIT + 283;
-pub const SYS_eventfd: ::c_long = __X32_SYSCALL_BIT + 284;
-pub const SYS_fallocate: ::c_long = __X32_SYSCALL_BIT + 285;
-pub const SYS_timerfd_settime: ::c_long = __X32_SYSCALL_BIT + 286;
-pub const SYS_timerfd_gettime: ::c_long = __X32_SYSCALL_BIT + 287;
-pub const SYS_accept4: ::c_long = __X32_SYSCALL_BIT + 288;
-pub const SYS_signalfd4: ::c_long = __X32_SYSCALL_BIT + 289;
-pub const SYS_eventfd2: ::c_long = __X32_SYSCALL_BIT + 290;
-pub const SYS_epoll_create1: ::c_long = __X32_SYSCALL_BIT + 291;
-pub const SYS_dup3: ::c_long = __X32_SYSCALL_BIT + 292;
-pub const SYS_pipe2: ::c_long = __X32_SYSCALL_BIT + 293;
-pub const SYS_inotify_init1: ::c_long = __X32_SYSCALL_BIT + 294;
-pub const SYS_perf_event_open: ::c_long = __X32_SYSCALL_BIT + 298;
-pub const SYS_fanotify_init: ::c_long = __X32_SYSCALL_BIT + 300;
-pub const SYS_fanotify_mark: ::c_long = __X32_SYSCALL_BIT + 301;
-pub const SYS_prlimit64: ::c_long = __X32_SYSCALL_BIT + 302;
-pub const SYS_name_to_handle_at: ::c_long = __X32_SYSCALL_BIT + 303;
-pub const SYS_open_by_handle_at: ::c_long = __X32_SYSCALL_BIT + 304;
-pub const SYS_clock_adjtime: ::c_long = __X32_SYSCALL_BIT + 305;
-pub const SYS_syncfs: ::c_long = __X32_SYSCALL_BIT + 306;
-pub const SYS_setns: ::c_long = __X32_SYSCALL_BIT + 308;
-pub const SYS_getcpu: ::c_long = __X32_SYSCALL_BIT + 309;
-pub const SYS_kcmp: ::c_long = __X32_SYSCALL_BIT + 312;
-pub const SYS_finit_module: ::c_long = __X32_SYSCALL_BIT + 313;
-pub const SYS_sched_setattr: ::c_long = __X32_SYSCALL_BIT + 314;
-pub const SYS_sched_getattr: ::c_long = __X32_SYSCALL_BIT + 315;
-pub const SYS_renameat2: ::c_long = __X32_SYSCALL_BIT + 316;
-pub const SYS_seccomp: ::c_long = __X32_SYSCALL_BIT + 317;
-pub const SYS_getrandom: ::c_long = __X32_SYSCALL_BIT + 318;
-pub const SYS_memfd_create: ::c_long = __X32_SYSCALL_BIT + 319;
-pub const SYS_kexec_file_load: ::c_long = __X32_SYSCALL_BIT + 320;
-pub const SYS_bpf: ::c_long = __X32_SYSCALL_BIT + 321;
-pub const SYS_userfaultfd: ::c_long = __X32_SYSCALL_BIT + 323;
-pub const SYS_membarrier: ::c_long = __X32_SYSCALL_BIT + 324;
-pub const SYS_mlock2: ::c_long = __X32_SYSCALL_BIT + 325;
-pub const SYS_copy_file_range: ::c_long = __X32_SYSCALL_BIT + 326;
-pub const SYS_pkey_mprotect: ::c_long = __X32_SYSCALL_BIT + 329;
-pub const SYS_pkey_alloc: ::c_long = __X32_SYSCALL_BIT + 330;
-pub const SYS_pkey_free: ::c_long = __X32_SYSCALL_BIT + 331;
-pub const SYS_rt_sigaction: ::c_long = __X32_SYSCALL_BIT + 512;
-pub const SYS_rt_sigreturn: ::c_long = __X32_SYSCALL_BIT + 513;
-pub const SYS_ioctl: ::c_long = __X32_SYSCALL_BIT + 514;
-pub const SYS_readv: ::c_long = __X32_SYSCALL_BIT + 515;
-pub const SYS_writev: ::c_long = __X32_SYSCALL_BIT + 516;
-pub const SYS_recvfrom: ::c_long = __X32_SYSCALL_BIT + 517;
-pub const SYS_sendmsg: ::c_long = __X32_SYSCALL_BIT + 518;
-pub const SYS_recvmsg: ::c_long = __X32_SYSCALL_BIT + 519;
-pub const SYS_execve: ::c_long = __X32_SYSCALL_BIT + 520;
-pub const SYS_ptrace: ::c_long = __X32_SYSCALL_BIT + 521;
-pub const SYS_rt_sigpending: ::c_long = __X32_SYSCALL_BIT + 522;
-pub const SYS_rt_sigtimedwait: ::c_long = __X32_SYSCALL_BIT + 523;
-pub const SYS_rt_sigqueueinfo: ::c_long = __X32_SYSCALL_BIT + 524;
-pub const SYS_sigaltstack: ::c_long = __X32_SYSCALL_BIT + 525;
-pub const SYS_timer_create: ::c_long = __X32_SYSCALL_BIT + 526;
-pub const SYS_mq_notify: ::c_long = __X32_SYSCALL_BIT + 527;
-pub const SYS_kexec_load: ::c_long = __X32_SYSCALL_BIT + 528;
-pub const SYS_waitid: ::c_long = __X32_SYSCALL_BIT + 529;
-pub const SYS_set_robust_list: ::c_long = __X32_SYSCALL_BIT + 530;
-pub const SYS_get_robust_list: ::c_long = __X32_SYSCALL_BIT + 531;
-pub const SYS_vmsplice: ::c_long = __X32_SYSCALL_BIT + 532;
-pub const SYS_move_pages: ::c_long = __X32_SYSCALL_BIT + 533;
-pub const SYS_preadv: ::c_long = __X32_SYSCALL_BIT + 534;
-pub const SYS_pwritev: ::c_long = __X32_SYSCALL_BIT + 535;
-pub const SYS_rt_tgsigqueueinfo: ::c_long = __X32_SYSCALL_BIT + 536;
-pub const SYS_recvmmsg: ::c_long = __X32_SYSCALL_BIT + 537;
-pub const SYS_sendmmsg: ::c_long = __X32_SYSCALL_BIT + 538;
-pub const SYS_process_vm_readv: ::c_long = __X32_SYSCALL_BIT + 539;
-pub const SYS_process_vm_writev: ::c_long = __X32_SYSCALL_BIT + 540;
-pub const SYS_setsockopt: ::c_long = __X32_SYSCALL_BIT + 541;
-pub const SYS_getsockopt: ::c_long = __X32_SYSCALL_BIT + 542;
-pub const SYS_io_setup: ::c_long = __X32_SYSCALL_BIT + 543;
-pub const SYS_io_submit: ::c_long = __X32_SYSCALL_BIT + 544;
-pub const SYS_execveat: ::c_long = __X32_SYSCALL_BIT + 545;
-pub const SYS_preadv2: ::c_long = __X32_SYSCALL_BIT + 546;
-pub const SYS_pwritev2: ::c_long = __X32_SYSCALL_BIT + 547;
--- a/third_party/rust/libc/src/unix/notbsd/linux/other/b64/x86_64.rs
+++ b/third_party/rust/libc/src/unix/notbsd/linux/other/b64/x86_64.rs
@@ -1,95 +1,61 @@
 //! x86_64-specific definitions for 64-bit linux-like values
 
 pub type c_char = i8;
 pub type wchar_t = i32;
 pub type nlink_t = u64;
 pub type blksize_t = i64;
 pub type greg_t = i64;
 pub type suseconds_t = i64;
-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: i64,
+        pub st_atime_nsec: ::c_long,
         pub st_mtime: ::time_t,
-        pub st_mtime_nsec: i64,
+        pub st_mtime_nsec: ::c_long,
         pub st_ctime: ::time_t,
-        pub st_ctime_nsec: i64,
-        __unused: [i64; 3],
+        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: i64,
+        pub st_atime_nsec: ::c_long,
         pub st_mtime: ::time_t,
-        pub st_mtime_nsec: i64,
+        pub st_mtime_nsec: ::c_long,
         pub st_ctime: ::time_t,
-        pub st_ctime_nsec: i64,
-        __reserved: [i64; 3],
-    }
-
-    pub struct statfs64 {
-        pub f_type: ::__fsword_t,
-        pub f_bsize: ::__fsword_t,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_bavail: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        pub f_fsid: ::fsid_t,
-        pub f_namelen: ::__fsword_t,
-        pub f_frsize: ::__fsword_t,
-        pub f_flags: ::__fsword_t,
-        pub f_spare: [::__fsword_t; 4],
-    }
-
-    pub struct statvfs64 {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_bavail: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        pub f_favail: u64,
-        pub f_fsid: ::c_ulong,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-        __f_spare: [::c_int; 6],
+        pub st_ctime_nsec: ::c_long,
+        __reserved: [::c_long; 3],
     }
 
     pub struct pthread_attr_t {
-        #[cfg(target_pointer_width = "32")]
-        __size: [u32; 8],
-        #[cfg(target_pointer_width = "64")]
         __size: [u64; 7]
     }
 
     pub struct _libc_fpxreg {
         pub significand: [u16; 4],
         pub exponent: u16,
         __private: [u16; 3],
     }
@@ -162,21 +128,17 @@ s! {
         pub i387: user_fpregs_struct,
         pub u_tsize: ::c_ulonglong,
         pub u_dsize: ::c_ulonglong,
         pub u_ssize: ::c_ulonglong,
         pub start_code: ::c_ulonglong,
         pub start_stack: ::c_ulonglong,
         pub signal: ::c_longlong,
         __reserved: ::c_int,
-        #[cfg(target_pointer_width = "32")]
-        __pad1: u32,
         pub u_ar0: *mut user_regs_struct,
-        #[cfg(target_pointer_width = "32")]
-        __pad2: u32,
         pub u_fpstate: *mut user_fpregs_struct,
         pub magic: ::c_ulonglong,
         pub u_comm: [::c_char; 32],
         pub u_debugreg: [::c_ulonglong; 8],
     }
 
     pub struct mcontext_t {
         pub gregs: [greg_t; 23],
@@ -198,42 +160,31 @@ s! {
         pub uid: ::uid_t,
         pub gid: ::gid_t,
         pub cuid: ::uid_t,
         pub cgid: ::gid_t,
         pub mode: ::c_ushort,
         __pad1: ::c_ushort,
         pub __seq: ::c_ushort,
         __pad2: ::c_ushort,
-        __unused1: u64,
-        __unused2: u64
+        __unused1: ::c_ulong,
+        __unused2: ::c_ulong
     }
 
     pub struct shmid_ds {
         pub shm_perm: ::ipc_perm,
         pub shm_segsz: ::size_t,
         pub shm_atime: ::time_t,
         pub shm_dtime: ::time_t,
         pub shm_ctime: ::time_t,
         pub shm_cpid: ::pid_t,
         pub shm_lpid: ::pid_t,
         pub shm_nattch: ::shmatt_t,
-        __unused4: u64,
-        __unused5: u64
-    }
-
-    pub struct termios2 {
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_line: ::cc_t,
-        pub c_cc: [::cc_t; 19],
-        pub c_ispeed: ::speed_t,
-        pub c_ospeed: ::speed_t,
+        __unused4: ::c_ulong,
+        __unused5: ::c_ulong
     }
 }
 
 pub const TIOCGSOFTCAR: ::c_ulong = 0x5419;
 pub const TIOCSSOFTCAR: ::c_ulong = 0x541A;
 
 pub const RLIMIT_NOFILE: ::c_int = 7;
 pub const RLIMIT_NPROC: ::c_int = 6;
@@ -242,18 +193,16 @@ pub const O_APPEND: ::c_int = 1024;
 pub const O_CREAT: ::c_int = 64;
 pub const O_EXCL: ::c_int = 128;
 pub const O_NOCTTY: ::c_int = 256;
 pub const O_NONBLOCK: ::c_int = 2048;
 pub const O_SYNC: ::c_int = 1052672;
 pub const O_RSYNC: ::c_int = 1052672;
 pub const O_DSYNC: ::c_int = 4096;
 pub const O_FSYNC: ::c_int = 0x101000;
-pub const O_NOATIME: ::c_int = 0o1000000;
-pub const O_PATH: ::c_int = 0o10000000;
 
 pub const MAP_GROWSDOWN: ::c_int = 0x0100;
 
 pub const EDEADLK: ::c_int = 35;
 pub const ENAMETOOLONG: ::c_int = 36;
 pub const ENOLCK: ::c_int = 37;
 pub const ENOSYS: ::c_int = 38;
 pub const ENOTEMPTY: ::c_int = 39;
@@ -359,16 +308,17 @@ pub const SO_SECURITY_AUTHENTICATION: ::
 pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23;
 pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24;
 pub const SO_BINDTODEVICE: ::c_int = 25;
 pub const SO_ATTACH_FILTER: ::c_int = 26;
 pub const SO_DETACH_FILTER: ::c_int = 27;
 pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
 pub const SO_PEERNAME: ::c_int = 28;
 pub const SO_TIMESTAMP: ::c_int = 29;
+pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP;
 pub const SO_ACCEPTCONN: ::c_int = 30;
 pub const SO_PEERSEC: ::c_int = 31;
 pub const SO_PASSSEC: ::c_int = 34;
 pub const SO_TIMESTAMPNS: ::c_int = 35;
 pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
 pub const SO_MARK: ::c_int = 36;
 pub const SO_TIMESTAMPING: ::c_int = 37;
 pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING;
@@ -433,16 +383,18 @@ pub const TIOCNXCL: ::c_ulong = 0x540D;
 pub const TIOCSCTTY: ::c_ulong = 0x540E;
 pub const TIOCSTI: ::c_ulong = 0x5412;
 pub const TIOCMGET: ::c_ulong = 0x5415;
 pub const TIOCMBIS: ::c_ulong = 0x5416;
 pub const TIOCMBIC: ::c_ulong = 0x5417;
 pub const TIOCMSET: ::c_ulong = 0x5418;
 pub const TIOCCONS: ::c_ulong = 0x541D;
 
+pub const CLONE_NEWCGROUP: ::c_int = 0x02000000;
+
 pub const SFD_CLOEXEC: ::c_int = 0x080000;
 
 pub const NCCS: usize = 32;
 
 pub const O_TRUNC: ::c_int = 512;
 
 pub const O_CLOEXEC: ::c_int = 0x80000;
 
@@ -466,16 +418,17 @@ pub const SA_RESETHAND: ::c_int = 0x8000
 pub const SA_RESTART: ::c_int = 0x10000000;
 pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
 
 pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
 
 pub const EFD_CLOEXEC: ::c_int = 0x80000;
 
 pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
+pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
 pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
 
 pub const O_DIRECT: ::c_int = 0x4000;
 pub const O_DIRECTORY: ::c_int = 0x10000;
 pub const O_NOFOLLOW: ::c_int = 0x20000;
 
 pub const MAP_LOCKED: ::c_int = 0x02000;
 pub const MAP_NORESERVE: ::c_int = 0x04000;
@@ -487,18 +440,31 @@ pub const FIOCLEX: ::c_ulong = 0x5451;
 pub const FIONBIO: ::c_ulong = 0x5421;
 
 pub const PTRACE_GETFPREGS: ::c_uint = 14;
 pub const PTRACE_SETFPREGS: ::c_uint = 15;
 pub const PTRACE_GETFPXREGS: ::c_uint = 18;
 pub const PTRACE_SETFPXREGS: ::c_uint = 19;
 pub const PTRACE_GETREGS: ::c_uint = 12;
 pub const PTRACE_SETREGS: ::c_uint = 13;
+pub const PTRACE_O_EXITKILL: ::c_uint = 1048576;
+pub const PTRACE_O_TRACECLONE: ::c_uint = 8;
+pub const PTRACE_O_TRACEEXEC: ::c_uint = 16;
+pub const PTRACE_O_TRACEEXIT: ::c_uint = 64;
+pub const PTRACE_O_TRACEFORK: ::c_uint = 2;
+pub const PTRACE_O_TRACESYSGOOD: ::c_uint = 1;
+pub const PTRACE_O_TRACEVFORK: ::c_uint = 4;
+pub const PTRACE_O_TRACEVFORKDONE: ::c_uint = 32;
+pub const PTRACE_O_TRACESECCOMP: ::c_uint = 128;
+pub const PTRACE_O_SUSPEND_SECCOMP: ::c_uint = 2097152;
 pub const PTRACE_PEEKSIGINFO_SHARED: ::c_uint = 1;
 
+pub const SYS_gettid: ::c_long = 186;
+pub const SYS_perf_event_open: ::c_long = 298;
+
 pub const MCL_CURRENT: ::c_int = 0x0001;
 pub const MCL_FUTURE: ::c_int = 0x0002;
 
 pub const SIGSTKSZ: ::size_t = 8192;
 pub const MINSIGSTKSZ: ::size_t = 2048;
 pub const CBAUD: ::tcflag_t = 0o0010017;
 pub const TAB1: ::c_int = 0x00000800;
 pub const TAB2: ::c_int = 0x00001000;
@@ -534,27 +500,16 @@ pub const ECHOE: ::tcflag_t = 0x00000010
 pub const ECHOK: ::tcflag_t = 0x00000020;
 pub const ECHONL: ::tcflag_t = 0x00000040;
 pub const ECHOPRT: ::tcflag_t = 0x00000400;
 pub const ECHOCTL: ::tcflag_t = 0x00000200;
 pub const ISIG: ::tcflag_t = 0x00000001;
 pub const ICANON: ::tcflag_t = 0x00000002;
 pub const PENDIN: ::tcflag_t = 0x00004000;
 pub const NOFLSH: ::tcflag_t = 0x00000080;
-pub const CIBAUD: ::tcflag_t = 0o02003600000;
-pub const CBAUDEX: ::tcflag_t = 0o010000;
-pub const VSWTC: usize = 7;
-pub const OLCUC:  ::tcflag_t = 0o000002;
-pub const NLDLY:  ::tcflag_t = 0o000400;
-pub const CRDLY:  ::tcflag_t = 0o003000;
-pub const TABDLY: ::tcflag_t = 0o014000;
-pub const BSDLY:  ::tcflag_t = 0o020000;
-pub const FFDLY:  ::tcflag_t = 0o100000;
-pub const VTDLY:  ::tcflag_t = 0o040000;
-pub const XTABS:  ::tcflag_t = 0o014000;
 
 pub const B0: ::speed_t = 0o000000;
 pub const B50: ::speed_t = 0o000001;
 pub const B75: ::speed_t = 0o000002;
 pub const B110: ::speed_t = 0o000003;
 pub const B134: ::speed_t = 0o000004;
 pub const B150: ::speed_t = 0o000005;
 pub const B200: ::speed_t = 0o000006;
@@ -564,17 +519,16 @@ pub const B1200: ::speed_t = 0o000011;
 pub const B1800: ::speed_t = 0o000012;
 pub const B2400: ::speed_t = 0o000013;
 pub const B4800: ::speed_t = 0o000014;
 pub const B9600: ::speed_t = 0o000015;
 pub const B19200: ::speed_t = 0o000016;
 pub const B38400: ::speed_t = 0o000017;
 pub const EXTA: ::speed_t = B19200;
 pub const EXTB: ::speed_t = B38400;
-pub const BOTHER: ::speed_t = 0o010000;
 pub const B57600: ::speed_t = 0o010001;
 pub const B115200: ::speed_t = 0o010002;
 pub const B230400: ::speed_t = 0o010003;
 pub const B460800: ::speed_t = 0o010004;
 pub const B500000: ::speed_t = 0o010005;
 pub const B576000: ::speed_t = 0o010006;
 pub const B921600: ::speed_t = 0o010007;
 pub const B1000000: ::speed_t = 0o010010;
@@ -607,45 +561,16 @@ pub const TCFLSH: ::c_ulong = 0x540B;
 pub const TIOCINQ: ::c_ulong = 0x541B;
 pub const TIOCGPGRP: ::c_ulong = 0x540F;
 pub const TIOCSPGRP: ::c_ulong = 0x5410;
 pub const TIOCOUTQ: ::c_ulong = 0x5411;
 pub const TIOCGWINSZ: ::c_ulong = 0x5413;
 pub const TIOCSWINSZ: ::c_ulong = 0x5414;
 pub const FIONREAD: ::c_ulong = 0x541B;
 
-// 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;
-
 extern {
     pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int;
     pub fn setcontext(ucp: *const ucontext_t) -> ::c_int;
     pub fn makecontext(ucp: *mut ucontext_t,
                        func:  extern fn (),
                        argc: ::c_int, ...);
     pub fn swapcontext(uocp: *mut ucontext_t,
                        ucp: *const ucontext_t) -> ::c_int;
--- a/third_party/rust/libc/src/unix/notbsd/linux/other/mod.rs
+++ b/third_party/rust/libc/src/unix/notbsd/linux/other/mod.rs
@@ -1,25 +1,28 @@
+pub type fsblkcnt_t = ::c_ulong;
+pub type fsfilcnt_t = ::c_ulong;
+pub type rlim_t = c_ulong;
 pub type __priority_which_t = ::c_uint;
 
 s! {
     pub struct aiocb {
         pub aio_fildes: ::c_int,
         pub aio_lio_opcode: ::c_int,
         pub aio_reqprio: ::c_int,
         pub aio_buf: *mut ::c_void,
         pub aio_nbytes: ::size_t,
         pub aio_sigevent: ::sigevent,
         __next_prio: *mut aiocb,
         __abs_prio: ::c_int,
         __policy: ::c_int,
         __error_code: ::c_int,
         __return_value: ::ssize_t,
         pub aio_offset: off_t,
-        #[cfg(all(not(target_arch = "x86_64"), target_pointer_width = "32"))]
+        #[cfg(target_pointer_width = "32")]
         __unused1: [::c_char; 4],
         __glibc_reserved: [::c_char; 32]
     }
 
     pub struct __exit_status {
         pub e_termination: ::c_short,
         pub e_exit: ::c_short,
     }
@@ -36,34 +39,30 @@ s! {
         pub ut_id: [::c_char; 4],
 
         pub ut_user: [::c_char; __UT_NAMESIZE],
         pub ut_host: [::c_char; __UT_HOSTSIZE],
         pub ut_exit: __exit_status,
 
         #[cfg(any(target_arch = "aarch64",
                   target_arch = "sparc64",
-                  all(target_pointer_width = "32",
-                      not(target_arch = "x86_64"))))]
+                  target_pointer_width = "32"))]
         pub ut_session: ::c_long,
         #[cfg(any(target_arch = "aarch64",
                   target_arch = "sparc64",
-                  all(target_pointer_width = "32",
-                      not(target_arch = "x86_64"))))]
+                  target_pointer_width = "32"))]
         pub ut_tv: ::timeval,
 
         #[cfg(not(any(target_arch = "aarch64",
                       target_arch = "sparc64",
-                      all(target_pointer_width = "32",
-                          not(target_arch = "x86_64")))))]
+                      target_pointer_width = "32")))]
         pub ut_session: ::int32_t,
         #[cfg(not(any(target_arch = "aarch64",
                       target_arch = "sparc64",
-                      all(target_pointer_width = "32",
-                          not(target_arch = "x86_64")))))]
+                      target_pointer_width = "32")))]
         pub ut_tv: __timeval,
 
         pub ut_addr_v6: [::int32_t; 4],
         __glibc_reserved: [::c_char; 20],
     }
 
     pub struct sigaction {
         pub sa_sigaction: ::sighandler_t,
@@ -80,19 +79,16 @@ s! {
         pub ss_size: ::size_t
     }
 
     pub struct siginfo_t {
         pub si_signo: ::c_int,
         pub si_errno: ::c_int,
         pub si_code: ::c_int,
         pub _pad: [::c_int; 29],
-        #[cfg(target_arch = "x86_64")]
-        _align: [u64; 0],
-        #[cfg(not(target_arch = "x86_64"))]
         _align: [usize; 0],
     }
 
     pub struct glob64_t {
         pub gl_pathc: ::size_t,
         pub gl_pathv: *mut *mut ::c_char,
         pub gl_offs: ::size_t,
         pub gl_flags: ::c_int,
@@ -246,142 +242,51 @@ pub const EUCLEAN: ::c_int = 117;
 pub const ENOTNAM: ::c_int = 118;
 pub const ENAVAIL: ::c_int = 119;
 pub const EISNAM: ::c_int = 120;
 pub const EREMOTEIO: ::c_int = 121;
 
 pub const SOCK_STREAM: ::c_int = 1;
 pub const SOCK_DGRAM: ::c_int = 2;
 pub const SOCK_SEQPACKET: ::c_int = 5;
-pub const SOCK_DCCP: ::c_int = 6;
-pub const SOCK_PACKET: ::c_int = 10;
 
 pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15;
 pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16;
 pub const TCP_THIN_DUPACK: ::c_int = 17;
 pub const TCP_USER_TIMEOUT: ::c_int = 18;
 pub const TCP_REPAIR: ::c_int = 19;
 pub const TCP_REPAIR_QUEUE: ::c_int = 20;
 pub const TCP_QUEUE_SEQ: ::c_int = 21;
 pub const TCP_REPAIR_OPTIONS: ::c_int = 22;
 pub const TCP_FASTOPEN: ::c_int = 23;
 pub const TCP_TIMESTAMP: ::c_int = 24;
 
-/* DCCP socket options */
-pub const DCCP_SOCKOPT_PACKET_SIZE: ::c_int = 1;
-pub const DCCP_SOCKOPT_SERVICE: ::c_int = 2;
-pub const DCCP_SOCKOPT_CHANGE_L: ::c_int = 3;
-pub const DCCP_SOCKOPT_CHANGE_R: ::c_int = 4;
-pub const DCCP_SOCKOPT_GET_CUR_MPS: ::c_int = 5;
-pub const DCCP_SOCKOPT_SERVER_TIMEWAIT: ::c_int = 6;
-pub const DCCP_SOCKOPT_SEND_CSCOV: ::c_int = 10;
-pub const DCCP_SOCKOPT_RECV_CSCOV: ::c_int = 11;
-pub const DCCP_SOCKOPT_AVAILABLE_CCIDS: ::c_int = 12;
-pub const DCCP_SOCKOPT_CCID: ::c_int = 13;
-pub const DCCP_SOCKOPT_TX_CCID: ::c_int = 14;
-pub const DCCP_SOCKOPT_RX_CCID: ::c_int = 15;
-pub const DCCP_SOCKOPT_QPOLICY_ID: ::c_int = 16;
-pub const DCCP_SOCKOPT_QPOLICY_TXQLEN: ::c_int = 17;
-pub const DCCP_SOCKOPT_CCID_RX_INFO: ::c_int = 128;
-pub const DCCP_SOCKOPT_CCID_TX_INFO: ::c_int = 192;
-
-/// maximum number of services provided on the same listening port
-pub const DCCP_SERVICE_LIST_MAX_LEN: ::c_int = 32;
-
 pub const SIGTTIN: ::c_int = 21;
 pub const SIGTTOU: ::c_int = 22;
 pub const SIGXCPU: ::c_int = 24;
 pub const SIGXFSZ: ::c_int = 25;
 pub const SIGVTALRM: ::c_int = 26;
 pub const SIGPROF: ::c_int = 27;
 pub const SIGWINCH: ::c_int = 28;
 
 pub const SIGEV_THREAD_ID: ::c_int = 4;
 
+pub const POLLRDNORM: ::c_short = 0x040;
+pub const POLLRDBAND: ::c_short = 0x080;
+
+pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01;
+pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02;
+
 pub const BUFSIZ: ::c_uint = 8192;
 pub const TMP_MAX: ::c_uint = 238328;
 pub const FOPEN_MAX: ::c_uint = 16;
 pub const POSIX_FADV_DONTNEED: ::c_int = 4;
 pub const POSIX_FADV_NOREUSE: ::c_int = 5;
 pub const POSIX_MADV_DONTNEED: ::c_int = 4;
-pub const _SC_EQUIV_CLASS_MAX: ::c_int = 41;
-pub const _SC_CHARCLASS_NAME_MAX: ::c_int = 45;
-pub const _SC_PII: ::c_int = 53;
-pub const _SC_PII_XTI: ::c_int = 54;
-pub const _SC_PII_SOCKET: ::c_int = 55;
-pub const _SC_PII_INTERNET: ::c_int = 56;
-pub const _SC_PII_OSI: ::c_int = 57;
-pub const _SC_POLL: ::c_int = 58;
-pub const _SC_SELECT: ::c_int = 59;
-pub const _SC_PII_INTERNET_STREAM: ::c_int = 61;
-pub const _SC_PII_INTERNET_DGRAM: ::c_int = 62;
-pub const _SC_PII_OSI_COTS: ::c_int = 63;
-pub const _SC_PII_OSI_CLTS: ::c_int = 64;
-pub const _SC_PII_OSI_M: ::c_int = 65;
-pub const _SC_T_IOV_MAX: ::c_int = 66;
 pub const _SC_2_C_VERSION: ::c_int = 96;
-pub const _SC_CHAR_BIT: ::c_int = 101;
-pub const _SC_CHAR_MAX: ::c_int = 102;
-pub const _SC_CHAR_MIN: ::c_int = 103;
-pub const _SC_INT_MAX: ::c_int = 104;
-pub const _SC_INT_MIN: ::c_int = 105;
-pub const _SC_LONG_BIT: ::c_int = 106;
-pub const _SC_WORD_BIT: ::c_int = 107;
-pub const _SC_MB_LEN_MAX: ::c_int = 108;
-pub const _SC_SSIZE_MAX: ::c_int = 110;
-pub const _SC_SCHAR_MAX: ::c_int = 111;
-pub const _SC_SCHAR_MIN: ::c_int = 112;
-pub const _SC_SHRT_MAX: ::c_int = 113;
-pub const _SC_SHRT_MIN: ::c_int = 114;
-pub const _SC_UCHAR_MAX: ::c_int = 115;
-pub const _SC_UINT_MAX: ::c_int = 116;
-pub const _SC_ULONG_MAX: ::c_int = 117;
-pub const _SC_USHRT_MAX: ::c_int = 118;
-pub const _SC_NL_ARGMAX: ::c_int = 119;
-pub const _SC_NL_LANGMAX: ::c_int = 120;
-pub const _SC_NL_MSGMAX: ::c_int = 121;
-pub const _SC_NL_NMAX: ::c_int = 122;
-pub const _SC_NL_SETMAX: ::c_int = 123;
-pub const _SC_NL_TEXTMAX: ::c_int = 124;
-pub const _SC_BASE: ::c_int = 134;
-pub const _SC_C_LANG_SUPPORT: ::c_int = 135;
-pub const _SC_C_LANG_SUPPORT_R: ::c_int = 136;
-pub const _SC_DEVICE_IO: ::c_int = 140;
-pub const _SC_DEVICE_SPECIFIC: ::c_int = 141;
-pub const _SC_DEVICE_SPECIFIC_R: ::c_int = 142;
-pub const _SC_FD_MGMT: ::c_int = 143;
-pub const _SC_FIFO: ::c_int = 144;
-pub const _SC_PIPE: ::c_int = 145;
-pub const _SC_FILE_ATTRIBUTES: ::c_int = 146;
-pub const _SC_FILE_LOCKING: ::c_int = 147;
-pub const _SC_FILE_SYSTEM: ::c_int = 148;
-pub const _SC_MULTI_PROCESS: ::c_int = 150;
-pub const _SC_SINGLE_PROCESS: ::c_int = 151;
-pub const _SC_NETWORKING: ::c_int = 152;
-pub const _SC_REGEX_VERSION: ::c_int = 156;
-pub const _SC_SIGNALS: ::c_int = 158;
-pub const _SC_SYSTEM_DATABASE: ::c_int = 162;
-pub const _SC_SYSTEM_DATABASE_R: ::c_int = 163;
-pub const _SC_USER_GROUPS: ::c_int = 166;
-pub const _SC_USER_GROUPS_R: ::c_int = 167;
-pub const _SC_LEVEL1_ICACHE_SIZE: ::c_int = 185;
-pub const _SC_LEVEL1_ICACHE_ASSOC: ::c_int = 186;
-pub const _SC_LEVEL1_ICACHE_LINESIZE: ::c_int = 187;
-pub const _SC_LEVEL1_DCACHE_SIZE: ::c_int = 188;
-pub const _SC_LEVEL1_DCACHE_ASSOC: ::c_int = 189;
-pub const _SC_LEVEL1_DCACHE_LINESIZE: ::c_int = 190;
-pub const _SC_LEVEL2_CACHE_SIZE: ::c_int = 191;
-pub const _SC_LEVEL2_CACHE_ASSOC: ::c_int = 192;
-pub const _SC_LEVEL2_CACHE_LINESIZE: ::c_int = 193;
-pub const _SC_LEVEL3_CACHE_SIZE: ::c_int = 194;
-pub const _SC_LEVEL3_CACHE_ASSOC: ::c_int = 195;
-pub const _SC_LEVEL3_CACHE_LINESIZE: ::c_int = 196;
-pub const _SC_LEVEL4_CACHE_SIZE: ::c_int = 197;
-pub const _SC_LEVEL4_CACHE_ASSOC: ::c_int = 198;
-pub const _SC_LEVEL4_CACHE_LINESIZE: ::c_int = 199;
 pub const O_ACCMODE: ::c_int = 3;
 pub const ST_RELATIME: ::c_ulong = 4096;
 pub const NI_MAXHOST: ::socklen_t = 1025;
 
 pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;
 pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff;
 pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245;
 pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45;
@@ -407,16 +312,18 @@ pub const REISERFS_SUPER_MAGIC: ::c_long
 pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b;
 pub const TMPFS_MAGIC: ::c_long = 0x01021994;
 pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2;
 
 pub const VEOF: usize = 4;
 
 pub const CPU_SETSIZE: ::c_int = 0x400;
 
+pub const QFMT_VFS_V1: ::c_int = 4;
+
 pub const PTRACE_TRACEME: ::c_uint = 0;
 pub const PTRACE_PEEKTEXT: ::c_uint = 1;
 pub const PTRACE_PEEKDATA: ::c_uint = 2;
 pub const PTRACE_PEEKUSER: ::c_uint = 3;
 pub const PTRACE_POKETEXT: ::c_uint = 4;
 pub const PTRACE_POKEDATA: ::c_uint = 5;
 pub const PTRACE_POKEUSER: ::c_uint = 6;
 pub const PTRACE_CONT: ::c_uint = 7;
@@ -430,18 +337,23 @@ pub const PTRACE_GETSIGINFO: ::c_uint = 
 pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203;
 pub const PTRACE_GETREGSET: ::c_uint = 0x4204;
 pub const PTRACE_SETREGSET: ::c_uint = 0x4205;
 pub const PTRACE_SEIZE: ::c_uint = 0x4206;
 pub const PTRACE_INTERRUPT: ::c_uint = 0x4207;
 pub const PTRACE_LISTEN: ::c_uint = 0x4208;
 pub const PTRACE_PEEKSIGINFO: ::c_uint = 0x4209;
 
+pub const MADV_DODUMP: ::c_int = 17;
+pub const MADV_DONTDUMP: ::c_int = 16;
+
 pub const EPOLLWAKEUP: ::c_int = 0x20000000;
 
+pub const MADV_HUGEPAGE: ::c_int = 14;
+pub const MADV_NOHUGEPAGE: ::c_int = 15;
 pub const MAP_HUGETLB: ::c_int = 0x040000;
 
 pub const SEEK_DATA: ::c_int = 3;
 pub const SEEK_HOLE: ::c_int = 4;
 
 pub const TCSANOW: ::c_int = 0;
 pub const TCSADRAIN: ::c_int = 1;
 pub const TCSAFLUSH: ::c_int = 2;
@@ -526,33 +438,16 @@ pub const NETLINK_TX_RING: ::c_int = 7;
 pub const NETLINK_LISTEN_ALL_NSID: ::c_int = 8;
 pub const NETLINK_LIST_MEMBERSHIPS: ::c_int = 9;
 pub const NETLINK_CAP_ACK: ::c_int = 10;
 
 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 TIOCM_LE: ::c_int = 0x001;
-pub const TIOCM_DTR: ::c_int = 0x002;
-pub const TIOCM_RTS: ::c_int = 0x004;
-pub const TIOCM_ST: ::c_int = 0x008;
-pub const TIOCM_SR: ::c_int = 0x010;
-pub const TIOCM_CTS: ::c_int = 0x020;
-pub const TIOCM_CAR: ::c_int = 0x040;
-pub const TIOCM_RNG: ::c_int = 0x080;
-pub const TIOCM_DSR: ::c_int = 0x100;
-pub const TIOCM_CD: ::c_int = TIOCM_CAR;
-pub const TIOCM_RI: ::c_int = TIOCM_RNG;
-
-#[doc(hidden)]
-pub const AF_MAX: ::c_int = 42;
-#[doc(hidden)]
-pub const PF_MAX: ::c_int = AF_MAX;
-
 cfg_if! {
     if #[cfg(any(target_arch = "arm", target_arch = "x86",
                  target_arch = "x86_64"))] {
         pub const PTHREAD_STACK_MIN: ::size_t = 16384;
     } else if #[cfg(target_arch = "sparc64")] {
         pub const PTHREAD_STACK_MIN: ::size_t = 0x6000;
     } else {
         pub const PTHREAD_STACK_MIN: ::size_t = 131072;
@@ -567,16 +462,23 @@ extern {
     pub fn pututxline(ut: *const utmpx) -> *mut utmpx;
     pub fn setutxent();
     pub fn endutxent();
     pub fn getpt() -> ::c_int;
 }
 
 #[link(name = "util")]
 extern {
+    pub fn sysctl(name: *mut ::c_int,
+                  namelen: ::c_int,
+                  oldp: *mut ::c_void,
+                  oldlenp: *mut ::size_t,
+                  newp: *mut ::c_void,
+                  newlen: ::size_t)
+                  -> ::c_int;
     pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
     pub fn backtrace(buf: *mut *mut ::c_void,
                      sz: ::c_int) -> ::c_int;
     pub fn glob64(pattern: *const ::c_char,
                   flags: ::c_int,
                   errfunc: ::dox::Option<extern fn(epath: *const ::c_char,
                                                    errno: ::c_int)
                                                    -> ::c_int>,
@@ -593,20 +495,16 @@ extern {
     pub fn setpriority(which: ::__priority_which_t, who: ::id_t,
                                        prio: ::c_int) -> ::c_int;
     pub fn pthread_getaffinity_np(thread: ::pthread_t,
                                   cpusetsize: ::size_t,
                                   cpuset: *mut ::cpu_set_t) -> ::c_int;
     pub fn pthread_setaffinity_np(thread: ::pthread_t,
                                   cpusetsize: ::size_t,
                                   cpuset: *const ::cpu_set_t) -> ::c_int;
-    pub fn pthread_rwlockattr_getkind_np(attr: *const ::pthread_rwlockattr_t,
-                                         val: *mut ::c_int) -> ::c_int;
-    pub fn pthread_rwlockattr_setkind_np(attr: *mut ::pthread_rwlockattr_t,
-                                         val: ::c_int) -> ::c_int;
     pub fn sched_getcpu() -> ::c_int;
 }
 
 cfg_if! {
     if #[cfg(any(target_arch = "x86",
                  target_arch = "arm",
                  target_arch = "powerpc"))] {
         mod b32;
--- a/third_party/rust/libc/src/unix/notbsd/linux/s390x.rs
+++ b/third_party/rust/libc/src/unix/notbsd/linux/s390x.rs
@@ -9,22 +9,18 @@ pub type ino_t = u64;
 pub type nlink_t = u64;
 pub type off_t = i64;
 pub type rlim_t = u64;
 pub type suseconds_t = i64;
 pub type time_t = i64;
 pub type wchar_t = i32;
 pub type greg_t = u64;
 pub type clock_t = i64;
-pub type shmatt_t = ::c_ulong;
-pub type msgqnum_t = ::c_ulong;
-pub type msglen_t = ::c_ulong;
 pub type __fsword_t = ::c_long;
 pub type __priority_which_t = ::c_uint;
-pub type __u64 = u64;
 
 s! {
     pub struct aiocb {
         pub aio_fildes: ::c_int,
         pub aio_lio_opcode: ::c_int,
         pub aio_reqprio: ::c_int,
         pub aio_buf: *mut ::c_void,
         pub aio_nbytes: ::size_t,
@@ -175,27 +171,16 @@ s! {
         pub c_cflag: ::tcflag_t,
         pub c_lflag: ::tcflag_t,
         pub c_line: ::cc_t,
         pub c_cc: [::cc_t; ::NCCS],
         pub c_ispeed: ::speed_t,
         pub c_ospeed: ::speed_t,
     }
 
-    pub struct termios2 {
-        pub c_iflag: ::tcflag_t,
-        pub c_oflag: ::tcflag_t,
-        pub c_cflag: ::tcflag_t,
-        pub c_lflag: ::tcflag_t,
-        pub c_line: ::cc_t,
-        pub c_cc: [::cc_t; 19],
-        pub c_ispeed: ::speed_t,
-        pub c_ospeed: ::speed_t,
-    }
-
     pub struct sysinfo {
         pub uptime: ::c_long,
         pub loads: [::c_ulong; 3],
         pub totalram: ::c_ulong,
         pub freeram: ::c_ulong,
         pub sharedram: ::c_ulong,
         pub bufferram: ::c_ulong,
         pub totalswap: ::c_ulong,
@@ -281,57 +266,27 @@ s! {
         __msg_cbytes: ::c_ulong,
         pub msg_qnum: ::msgqnum_t,
         pub msg_qbytes: ::msglen_t,
         pub msg_lspid: ::pid_t,
         pub msg_lrpid: ::pid_t,
         __glibc_reserved4: ::c_ulong,
         __glibc_reserved5: ::c_ulong,
     }
-
-    pub struct statfs64 {
-        pub f_type: ::c_uint,
-        pub f_bsize: ::c_uint,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_bavail: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        pub f_fsid: ::fsid_t,
-        pub f_namelen: ::c_uint,
-        pub f_frsize: ::c_uint,
-        pub f_flags: ::c_uint,
-        pub f_spare: [::c_uint; 4],
-    }
+}
 
-    pub struct statvfs64 {
-        pub f_bsize: ::c_ulong,
-        pub f_frsize: ::c_ulong,
-        pub f_blocks: u64,
-        pub f_bfree: u64,
-        pub f_bavail: u64,
-        pub f_files: u64,
-        pub f_ffree: u64,
-        pub f_favail: u64,
-        pub f_fsid: ::c_ulong,
-        pub f_flag: ::c_ulong,
-        pub f_namemax: ::c_ulong,
-        __f_spare: [::c_int; 6],
-    }
-}
+pub const CLONE_NEWCGROUP: ::c_int = 0x02000000;
 
 pub const SFD_CLOEXEC: ::c_int = 0x080000;
 
 pub const NCCS: usize = 32;
 
 pub const O_TRUNC: ::c_int = 512;
-pub const O_LARGEFILE: ::c_int = 0o0100000;
-pub const O_NOATIME: ::c_int = 0o1000000;
+
 pub const O_CLOEXEC: ::c_int = 0x80000;
-pub const O_PATH: ::c_int = 0o10000000;
 
 pub const EBFONT: ::c_int = 59;
 pub const ENOSTR: ::c_int = 60;
 pub const ENODATA: ::c_int = 61;
 pub const ETIME: ::c_int = 62;
 pub const ENOSR: ::c_int = 63;
 pub const ENONET: ::c_int = 64;
 pub const ENOPKG: ::c_int = 65;
@@ -354,17 +309,16 @@ pub const EFD_CLOEXEC: ::c_int = 0x80000
 
 pub const POSIX_FADV_DONTNEED: ::c_int = 6;
 pub const POSIX_FADV_NOREUSE: ::c_int = 7;
 
 pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
 pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
 pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
 pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
-pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
 
 pub const EADDRINUSE: ::c_int = 98;
 pub const EADDRNOTAVAIL: ::c_int = 99;
 pub const ECONNABORTED: ::c_int = 103;
 pub const ECONNREFUSED: ::c_int = 111;
 pub const ECONNRESET: ::c_int = 104;
 pub const EDEADLK: ::c_int = 35;
 pub const ENOSYS: ::c_int = 38;
@@ -390,24 +344,16 @@ pub const SIG_SETMASK: ::c_int = 2;
 pub const SOCK_DGRAM: ::c_int = 2;
 pub const SOCK_STREAM: ::c_int = 1;
 pub const SOL_SOCKET: ::c_int = 1;
 pub const SO_BROADCAST: ::c_int = 6;
 pub const SO_ERROR: ::c_int = 4;
 pub const SO_RCVTIMEO: ::c_int = 20;
 pub const SO_REUSEADDR: ::c_int = 2;
 pub const SO_SNDTIMEO: ::c_int = 21;
-pub const SO_BINDTODEVICE: ::c_int = 25;
-pub const SO_TIMESTAMP: ::c_int = 29;
-pub const SO_MARK: ::c_int = 36;
-pub const SO_PROTOCOL: ::c_int = 38;
-pub const SO_DOMAIN: ::c_int = 39;
-pub const SO_RXQ_OVFL: ::c_int = 40;
-pub const SO_PEEK_OFF: ::c_int = 42;
-pub const SO_BUSY_POLL: ::c_int = 46;
 
 pub const RLIMIT_RSS: ::c_int = 5;
 pub const RLIMIT_NOFILE: ::c_int = 7;
 pub const RLIMIT_AS: ::c_int = 9;
 pub const RLIMIT_NPROC: ::c_int = 6;
 pub const RLIMIT_MEMLOCK: ::c_int = 8;
 pub const RLIMIT_RTTIME: ::c_int = 15;
 pub const RLIMIT_NLIMITS: ::c_int = 16;
@@ -538,27 +484,22 @@ pub const ERFKILL: ::c_int = 132;
 pub const SOCK_SEQPACKET: ::c_int = 5;
 
 pub const SO_TYPE: ::c_int = 3;
 pub const SO_DONTROUTE: ::c_int = 5;
 pub const SO_SNDBUF: ::c_int = 7;
 pub const SO_RCVBUF: ::c_int = 8;
 pub const SO_KEEPALIVE: ::c_int = 9;
 pub const SO_OOBINLINE: ::c_int = 10;
-pub const SO_PRIORITY: ::c_int = 12;
 pub const SO_LINGER: ::c_int = 13;
-pub const SO_BSDCOMPAT: ::c_int = 14;
 pub const SO_REUSEPORT: ::c_int = 15;
-pub const SO_PASSCRED: ::c_int = 16;
 pub const SO_PEERCRED: ::c_int = 17;
 pub const SO_RCVLOWAT: ::c_int = 18;
 pub const SO_SNDLOWAT: ::c_int = 19;
 pub const SO_ACCEPTCONN: ::c_int = 30;
-pub const SO_SNDBUFFORCE: ::c_int = 32;
-pub const SO_RCVBUFFORCE: ::c_int = 33;
 
 pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15;
 pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16;
 pub const TCP_THIN_DUPACK: ::c_int = 17;
 pub const TCP_USER_TIMEOUT: ::c_int = 18;
 pub const TCP_REPAIR: ::c_int = 19;
 pub const TCP_REPAIR_QUEUE: ::c_int = 20;
 pub const TCP_QUEUE_SEQ: ::c_int = 21;
@@ -584,95 +525,24 @@ pub const SIGXFSZ: ::c_int = 25;
 pub const SIGVTALRM: ::c_int = 26;
 pub const SIGPROF: ::c_int = 27;
 pub const SIGWINCH: ::c_int = 28;
 pub const SIGPOLL: ::c_int = 29;
 pub const SIGPWR: ::c_int = 30;
 pub const SIG_BLOCK: ::c_int = 0x000000;
 pub const SIG_UNBLOCK: ::c_int = 0x01;
 
+pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01;
+pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02;
+
 pub const BUFSIZ: ::c_uint = 8192;
 pub const TMP_MAX: ::c_uint = 238328;
 pub const FOPEN_MAX: ::c_uint = 16;
 pub const POSIX_MADV_DONTNEED: ::c_int = 4;
-pub const _SC_EQUIV_CLASS_MAX: ::c_int = 41;
-pub const _SC_CHARCLASS_NAME_MAX: ::c_int = 45;
-pub const _SC_PII: ::c_int = 53;
-pub const _SC_PII_XTI: ::c_int = 54;
-pub const _SC_PII_SOCKET: ::c_int = 55;
-pub const _SC_PII_INTERNET: ::c_int = 56;
-pub const _SC_PII_OSI: ::c_int = 57;
-pub const _SC_POLL: ::c_int = 58;
-pub const _SC_SELECT: ::c_int = 59;
-pub const _SC_PII_INTERNET_STREAM: ::c_int = 61;
-pub const _SC_PII_INTERNET_DGRAM: ::c_int = 62;
-pub const _SC_PII_OSI_COTS: ::c_int = 63;
-pub const _SC_PII_OSI_CLTS: ::c_int = 64;
-pub const _SC_PII_OSI_M: ::c_int = 65;
-pub const _SC_T_IOV_MAX: ::c_int = 66;
 pub const _SC_2_C_VERSION: ::c_int = 96;
-pub const _SC_CHAR_BIT: ::c_int = 101;
-pub const _SC_CHAR_MAX: ::c_int = 102;
-pub const _SC_CHAR_MIN: ::c_int = 103;
-pub const _SC_INT_MAX: ::c_int = 104;
-pub const _SC_INT_MIN: ::c_int = 105;
-pub const _SC_LONG_BIT: ::c_int = 106;
-pub const _SC_WORD_BIT: ::c_int = 107;
-pub const _SC_MB_LEN_MAX: ::c_int = 108;
-pub const _SC_SSIZE_MAX: ::c_int = 110;
-pub const _SC_SCHAR_MAX: ::c_int = 111;
-pub const _SC_SCHAR_MIN: ::c_int = 112;
-pub const _SC_SHRT_MAX: ::c_int = 113;
-pub const _SC_SHRT_MIN: ::c_int = 114;
-pub const _SC_UCHAR_MAX: ::c_int = 115;
-pub const _SC_UINT_MAX: ::c_int = 116;
-pub const _SC_ULONG_MAX: ::c_int = 117;
-pub const _SC_USHRT_MAX: ::c_int = 118;
-pub const _SC_NL_ARGMAX: ::c_int = 119;
-pub const _SC_NL_LANGMAX: ::c_int = 120;
-pub const _SC_NL_MSGMAX: ::c_int = 121;
-pub const _SC_NL_NMAX: ::c_int = 122;
-pub const _SC_NL_SETMAX: ::c_int = 123;
-pub const _SC_NL_TEXTMAX: ::c_int = 124;
-pub const _SC_BASE: ::c_int = 134;
-pub const _SC_C_LANG_SUPPORT: ::c_int = 135;
-pub const _SC_C_LANG_SUPPORT_R: ::c_int = 136;
-pub const _SC_DEVICE_IO: ::c_int = 140;
-pub const _SC_DEVICE_SPECIFIC: ::c_int = 141;
-pub const _SC_DEVICE_SPECIFIC_R: ::c_int = 142;
-pub const _SC_FD_MGMT: ::c_int = 143;
-pub const _SC_FIFO: ::c_int = 144;
-pub const _SC_PIPE: ::c_int = 145;
-pub const _SC_FILE_ATTRIBUTES: ::c_int = 146;
-pub const _SC_FILE_LOCKING: ::c_int = 147;
-pub const _SC_FILE_SYSTEM: ::c_int = 148;
-pub const _SC_MULTI_PROCESS: ::c_int = 150;
-pub const _SC_SINGLE_PROCESS: ::c_int = 151;
-pub const _SC_NETWORKING: ::c_int = 152;
-pub const _SC_REGEX_VERSION: ::c_int = 156;
-pub const _SC_SIGNALS: ::c_int = 158;
-pub const _SC_SYSTEM_DATABASE: ::c_int = 162;
-pub const _SC_SYSTEM_DATABASE_R: ::c_int = 163;
-pub const _SC_USER_GROUPS: ::c_int = 166;
-pub const _SC_USER_GROUPS_R: ::c_int = 167;
-pub const _SC_LEVEL1_ICACHE_SIZE: ::c_int = 185;
-pub const _SC_LEVEL1_ICACHE_ASSOC: ::c_int = 186;
-pub const _SC_LEVEL1_ICACHE_LINESIZE: ::c_int = 187;
-pub const _SC_LEVEL1_DCACHE_SIZE: ::c_int = 188;
-pub const _SC_LEVEL1_DCACHE_ASSOC: ::c_int = 189;
-pub const _SC_LEVEL1_DCACHE_LINESIZE: ::c_int = 190;
-pub const _SC_LEVEL2_CACHE_SIZE: ::c_int = 191;
-pub const _SC_LEVEL2_CACHE_ASSOC: ::c_int = 192;
-pub const _SC_LEVEL2_CACHE_LINESIZE: ::c_int = 193;
-pub const _SC_LEVEL3_CACHE_SIZE: ::c_int = 194;
-pub const _SC_LEVEL3_CACHE_ASSOC: ::c_int = 195;
-pub const _SC_LEVEL3_CACHE_LINESIZE: ::c_int = 196;
-pub const _SC_LEVEL4_CACHE_SIZE: ::c_int = 197;
-pub const _SC_LEVEL4_CACHE_ASSOC: ::c_int = 198;
-pub const _SC_LEVEL4_CACHE_LINESIZE: ::c_int = 199;
 pub const O_ASYNC: ::c_int = 0x2000;
 pub const O_NDELAY: ::c_int = 0x800;
 pub const ST_RELATIME: ::c_ulong = 4096;
 pub const NI_MAXHOST: ::socklen_t = 1025;
 
 pub const ADFS_SUPER_MAGIC: ::c_int = 0x0000adf5;
 pub const AFFS_SUPER_MAGIC: ::c_int = 0x0000adff;
 pub const CODA_SUPER_MAGIC: ::c_int = 0x73757245;
@@ -707,16 +577,18 @@ pub const VMIN: usize = 6;
 pub const IEXTEN: ::tcflag_t = 0x00008000;
 pub const TOSTOP: ::tcflag_t = 0x00000100;
 pub const FLUSHO: ::tcflag_t = 0x00001000;
 
 pub const CPU_SETSIZE: ::c_int = 0x400;
 
 pub const EXTPROC: ::tcflag_t = 0x00010000;
 
+pub const QFMT_VFS_V1: ::c_int = 4;
+
 pub const PTRACE_TRACEME: ::c_uint = 0;
 pub const PTRACE_PEEKTEXT: ::c_uint = 1;
 pub const PTRACE_PEEKDATA: ::c_uint = 2;
 pub const PTRACE_PEEKUSER: ::c_uint = 3;
 pub const PTRACE_POKETEXT: ::c_uint = 4;
 pub const PTRACE_POKEDATA: ::c_uint = 5;
 pub const PTRACE_POKEUSER: ::c_uint = 6;
 pub const PTRACE_CONT: ::c_uint = 7;
@@ -735,18 +607,23 @@ pub const PTRACE_GETSIGINFO: ::c_uint = 
 pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203;
 pub const PTRACE_GETREGSET: ::c_uint = 0x4204;
 pub const PTRACE_SETREGSET: ::c_uint = 0x4205;
 pub const PTRACE_SEIZE: ::c_uint = 0x4206;
 pub const PTRACE_INTERRUPT: ::c_uint = 0x4207;
 pub const PTRACE_LISTEN: ::c_uint = 0x4208;
 pub const PTRACE_PEEKSIGINFO: ::c_uint = 0x4209;
 
+pub const MADV_DODUMP: ::c_int = 17;
+pub const MADV_DONTDUMP: ::c_int = 16;
+
 pub const EPOLLWAKEUP: ::c_int = 0x20000000;
 
+pub const MADV_HUGEPAGE: ::c_int = 14;
+pub const MADV_NOHUGEPAGE: ::c_int = 15;
 pub const MAP_HUGETLB: ::c_int = 0x040000;
 
 pub const EFD_NONBLOCK: ::c_int = 0x800;
 
 pub const F_GETLK: ::c_int = 5;
 pub const F_GETOWN: ::c_int = 9;
 pub const F_SETOWN: ::c_int = 8;
 pub const F_SETLK: ::c_int = 6;
@@ -807,445 +684,18 @@ pub const LINUX_REBOOT_CMD_RESTART: ::c_
 pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
 pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
 pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
 pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
 pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
 pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
 pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
 
-pub const VTIME: usize = 5;
-pub const VSWTC: usize = 7;
-pub const VSTART: usize = 8;
-pub const VSTOP: usize = 9;
-pub const VSUSP: usize = 10;
-pub const VREPRINT: usize = 12;
-pub const VDISCARD: usize = 13;
-pub const VWERASE: usize = 14;
-pub const OLCUC: ::tcflag_t = 0o000002;
-pub const ONLCR: ::tcflag_t = 0o000004;
-pub const NLDLY: ::tcflag_t = 0o000400;
-pub const CRDLY: ::tcflag_t = 0o003000;
-pub const CR1: ::tcflag_t  = 0x00000200;
-pub const CR2: ::tcflag_t  = 0x00000400;
-pub const CR3: ::tcflag_t  = 0x00000600;
-pub const TABDLY: ::tcflag_t = 0o014000;
-pub const TAB1: ::tcflag_t = 0x00000800;
-pub const TAB2: ::tcflag_t = 0x00001000;
-pub const TAB3: ::tcflag_t = 0x00001800;
-pub const BSDLY:  ::tcflag_t = 0o020000;
-pub const BS1: ::tcflag_t  = 0x00002000;
-pub const FFDLY:  ::tcflag_t = 0o100000;
-pub const FF1: ::tcflag_t  = 0x00008000;
-pub const VTDLY:  ::tcflag_t = 0o040000;
-pub const VT1: ::tcflag_t  = 0x00004000;
-pub const XTABS:  ::tcflag_t = 0o014000;
-
-pub const TIOCM_LE: ::c_int = 0x001;
-pub const TIOCM_DTR: ::c_int = 0x002;
-pub const TIOCM_RTS: ::c_int = 0x004;
-pub const TIOCM_ST: ::c_int = 0x008;
-pub const TIOCM_SR: ::c_int = 0x010;
-pub const TIOCM_CTS: ::c_int = 0x020;
-pub const TIOCM_CAR: ::c_int = 0x040;
-pub const TIOCM_RNG: ::c_int = 0x080;
-pub const TIOCM_DSR: ::c_int = 0x100;
-pub const TIOCM_CD: ::c_int = TIOCM_CAR;
-pub const TIOCM_RI: ::c_int = TIOCM_RNG;
-
-pub const SIGEV_THREAD_ID: ::c_int = 4;
-
-pub const CBAUD: ::speed_t = 0o010017;
-pub const B0: ::speed_t = 0o000000;
-pub const B50: ::speed_t = 0o000001;
-pub const B75: ::speed_t = 0o000002;
-pub const B110: ::speed_t = 0o000003;
-pub const B134: ::speed_t = 0o000004;
-pub const B150: ::speed_t = 0o000005;
-pub const B200: ::speed_t = 0o000006;
-pub const B300: ::speed_t = 0o000007;
-pub const B600: ::speed_t = 0o000010;
-pub const B1200: ::speed_t = 0o000011;
-pub const B1800: ::speed_t = 0o000012;
-pub const B2400: ::speed_t = 0o000013;
-pub const B4800: ::speed_t = 0o000014;
-pub const B9600: ::speed_t = 0o000015;
-pub const B19200: ::speed_t = 0o000016;
-pub const B38400: ::speed_t = 0o000017;
-pub const EXTA: ::speed_t = B19200;
-pub const EXTB: ::speed_t = B38400;
-pub const CSIZE: ::tcflag_t = 0o000060;
-pub const CS6: ::tcflag_t = 0o000020;
-pub const CS7: ::tcflag_t = 0o000040;
-pub const CS8: ::tcflag_t = 0o000060;
-pub const CSTOPB: ::tcflag_t = 0o000100;
-pub const CREAD: ::tcflag_t = 0o000200;
-pub const PARENB: ::tcflag_t = 0o000400;
-pub const PARODD: ::tcflag_t = 0o001000;
-pub const HUPCL: ::tcflag_t = 0o002000;
-pub const CLOCAL: ::tcflag_t = 0o004000;
-pub const CBAUDEX: ::tcflag_t = 0o010000;
-pub const BOTHER: ::speed_t = 0o010000;
-pub const B57600: ::speed_t = 0o010001;
-pub const B115200: ::speed_t = 0o010002;
-pub const B230400: ::speed_t = 0o010003;
-pub const B460800: ::speed_t = 0o010004;
-pub const B500000: ::speed_t = 0o010005;
-pub const B576000: ::speed_t = 0o010006;
-pub const B921600: ::speed_t = 0o010007;
-pub const B1000000: ::speed_t = 0o010010;
-pub const B1152000: ::speed_t = 0o010011;
-pub const B1500000: ::speed_t = 0o010012;
-pub const B2000000: ::speed_t = 0o010013;
-pub const B2500000: ::speed_t = 0o010014;
-pub const B3000000: ::speed_t = 0o010015;
-pub const B3500000: ::speed_t = 0o010016;
-pub const B4000000: ::speed_t = 0o010017;
-pub const CIBAUD: ::tcflag_t = 0o02003600000;
-
-pub const ISIG: ::tcflag_t = 0o000001;
-pub const ICANON: ::tcflag_t = 0o000002;
-pub const XCASE: ::tcflag_t = 0o000004;
-pub const ECHOE: ::tcflag_t = 0o000020;
-pub const ECHOK: ::tcflag_t = 0o000040;
-pub const ECHONL: ::tcflag_t = 0o000100;
-pub const NOFLSH: ::tcflag_t = 0o000200;
-pub const ECHOCTL: ::tcflag_t = 0o001000;
-pub const ECHOPRT: ::tcflag_t = 0o002000;
-pub const ECHOKE: ::tcflag_t = 0o004000;
-pub const PENDIN: ::tcflag_t = 0o040000;
-
-pub const POLLWRNORM: ::c_short = 0x004;
-pub const POLLWRBAND: ::c_short = 0x100;
-
-pub const IXON: ::tcflag_t = 0o002000;
-pub const IXOFF: ::tcflag_t = 0o010000;
-
-pub const SYS_exit: ::c_long = 1;
-pub const SYS_fork: ::c_long = 2;
-pub const SYS_read: ::c_long = 3;
-pub const SYS_write: ::c_long = 4;
-pub const SYS_open: ::c_long = 5;
-pub const SYS_close: ::c_long = 6;
-pub const SYS_restart_syscall: ::c_long = 7;
-pub const SYS_creat: ::c_long = 8;
-pub const SYS_link: ::c_long = 9;
-pub const SYS_unlink: ::c_long = 10;
-pub const SYS_execve: ::c_long = 11;
-pub const SYS_chdir: ::c_long = 12;
-pub const SYS_mknod: ::c_long = 14;
-pub const SYS_chmod: ::c_long = 15;
-pub const SYS_lseek: ::c_long = 19;
-pub const SYS_getpid: ::c_long = 20;
-pub const SYS_mount: ::c_long = 21;
-pub const SYS_umount: ::c_long = 22;
-pub const SYS_ptrace: ::c_long = 26;
-pub const SYS_alarm: ::c_long = 27;
-pub const SYS_pause: ::c_long = 29;
-pub const SYS_utime: ::c_long = 30;
-pub const SYS_access: ::c_long = 33;
-pub const SYS_nice: ::c_long = 34;
-pub const SYS_sync: ::c_long = 36;
-pub const SYS_kill: ::c_long = 37;
-pub const SYS_rename: ::c_long = 38;
-pub const SYS_mkdir: ::c_long = 39;
-pub const SYS_rmdir: ::c_long = 40;
-pub const SYS_dup: ::c_long = 41;
-pub const SYS_pipe: ::c_long = 42;
-pub const SYS_times: ::c_long = 43;
-pub const SYS_brk: ::c_long = 45;
-pub const SYS_signal: ::c_long = 48;
-pub const SYS_acct: ::c_long = 51;
-pub const SYS_umount2: ::c_long = 52;
-pub const SYS_ioctl: ::c_long = 54;
-pub const SYS_fcntl: ::c_long = 55;
-pub const SYS_setpgid: ::c_long = 57;
-pub const SYS_umask: ::c_long = 60;
-pub const SYS_chroot: ::c_long = 61;
-pub const SYS_ustat: ::c_long = 62;
-pub const SYS_dup2: ::c_long = 63;
-pub const SYS_getppid: ::c_long = 64;
-pub const SYS_getpgrp: ::c_long = 65;
-pub const SYS_setsid: ::c_long = 66;
-pub const SYS_sigaction: ::c_long = 67;
-pub const SYS_sigsuspend: ::c_long = 72;
-pub const SYS_sigpending: ::c_long = 73;
-pub const SYS_sethostname: ::c_long = 74;
-pub const SYS_setrlimit: ::c_long = 75;
-pub const SYS_getrusage: ::c_long = 77;
-pub const SYS_gettimeofday: ::c_long = 78;
-pub const SYS_settimeofday: ::c_long = 79;
-pub const SYS_symlink: ::c_long = 83;
-pub const SYS_readlink: ::c_long = 85;
-pub const SYS_uselib: ::c_long = 86;
-pub const SYS_swapon: ::c_long = 87;
-pub const SYS_reboot: ::c_long = 88;
-pub const SYS_readdir: ::c_long = 89;
-pub const SYS_mmap: ::c_long = 90;
-pub const SYS_munmap: ::c_long = 91;
-pub const SYS_truncate: ::c_long = 92;
-pub const SYS_ftruncate: ::c_long = 93;
-pub const SYS_fchmod: ::c_long = 94;
-pub const SYS_getpriority: ::c_long = 96;
-pub const SYS_setpriority: ::c_long = 97;
-pub const SYS_statfs: ::c_long = 99;
-pub const SYS_fstatfs: ::c_long = 100;
-pub const SYS_socketcall: ::c_long = 102;
-pub const SYS_syslog: ::c_long = 103;
-pub const SYS_setitimer: ::c_long = 104;
-pub const SYS_getitimer: ::c_long = 105;
-pub const SYS_stat: ::c_long = 106;
-pub const SYS_lstat: ::c_long = 107;
-pub const SYS_fstat: ::c_long = 108;
-pub const SYS_lookup_dcookie: ::c_long = 110;
-pub const SYS_vhangup: ::c_long = 111;
-pub const SYS_idle: ::c_long = 112;
-pub const SYS_wait4: ::c_long = 114;
-pub const SYS_swapoff: ::c_long = 115;
-pub const SYS_sysinfo: ::c_long = 116;
-pub const SYS_ipc: ::c_long = 117;
-pub const SYS_fsync: ::c_long = 118;
-pub const SYS_sigreturn: ::c_long = 119;
-pub const SYS_clone: ::c_long = 120;
-pub const SYS_setdomainname: ::c_long = 121;
-pub const SYS_uname: ::c_long = 122;
-pub const SYS_adjtimex: ::c_long = 124;
-pub const SYS_mprotect: ::c_long = 125;
-pub const SYS_sigprocmask: ::c_long = 126;
-pub const SYS_create_module: ::c_long = 127;
-pub const SYS_init_module: ::c_long = 128;
-pub const SYS_delete_module: ::c_long = 129;
-pub const SYS_get_kernel_syms: ::c_long = 130;
-pub const SYS_quotactl: ::c_long = 131;
-pub const SYS_getpgid: ::c_long = 132;
-pub const SYS_fchdir: ::c_long = 133;
-pub const SYS_bdflush: ::c_long = 134;
-pub const SYS_sysfs: ::c_long = 135;
-pub const SYS_personality: ::c_long = 136;
-pub const SYS_afs_syscall: ::c_long = 137; /* Syscall for Andrew File System */
-pub const SYS_getdents: ::c_long = 141;
-pub const SYS_flock: ::c_long = 143;
-pub const SYS_msync: ::c_long = 144;
-pub const SYS_readv: ::c_long = 145;
-pub const SYS_writev: ::c_long = 146;
-pub const SYS_getsid: ::c_long = 147;
-pub const SYS_fdatasync: ::c_long = 148;
-pub const SYS__sysctl: ::c_long = 149;
-pub const SYS_mlock: ::c_long = 150;
-pub const SYS_munlock: ::c_long = 151;
-pub const SYS_mlockall: ::c_long = 152;
-pub const SYS_munlockall: ::c_long = 153;
-pub const SYS_sched_setparam: ::c_long = 154;
-pub const SYS_sched_getparam: ::c_long = 155;
-pub const SYS_sched_setscheduler: ::c_long = 156;
-pub const SYS_sched_getscheduler: ::c_long = 157;
-pub const SYS_sched_yield: ::c_long = 158;
-pub const SYS_sched_get_priority_max: ::c_long = 159;
-pub const SYS_sched_get_priority_min: ::c_long = 160;
-pub const SYS_sched_rr_get_interval: ::c_long = 161;
-pub const SYS_nanosleep: ::c_long = 162;
-pub const SYS_mremap: ::c_long = 163;
-pub const SYS_query_module: ::c_long = 167;
-pub const SYS_poll: ::c_long = 168;
-pub const SYS_nfsservctl: ::c_long = 169;
-pub const SYS_prctl: ::c_long = 172;
-pub const SYS_rt_sigreturn: ::c_long = 173;
-pub const SYS_rt_sigaction: ::c_long = 174;
-pub const SYS_rt_sigprocmask: ::c_long = 175;
-pub const SYS_rt_sigpending: ::c_long = 176;
-pub const SYS_rt_sigtimedwait: ::c_long = 177;
-pub const SYS_rt_sigqueueinfo: ::c_long = 178;
-pub const SYS_rt_sigsuspend: ::c_long = 179;
-pub const SYS_pread64: ::c_long = 180;
-pub const SYS_pwrite64: ::c_long = 181;
-pub const SYS_getcwd: ::c_long = 183;
-pub const SYS_capget: ::c_long = 184;
-pub const SYS_capset: ::c_long = 185;
-pub const SYS_sigaltstack: ::c_long = 186;
-pub const SYS_sendfile: ::c_long = 187;
-pub const SYS_getpmsg: ::c_long = 188;
-pub const SYS_putpmsg: ::c_long = 189;
-pub const SYS_vfork: ::c_long = 190;
-pub const SYS_pivot_root: ::c_long = 217;
-pub const SYS_mincore: ::c_long = 218;
-pub const SYS_madvise: ::c_long = 219;
-pub const SYS_getdents64: ::c_long = 220;
-pub const SYS_readahead: ::c_long = 222;
-pub const SYS_setxattr: ::c_long = 224;
-pub const SYS_lsetxattr: ::c_long = 225;
-pub const SYS_fsetxattr: ::c_long = 226;
-pub const SYS_getxattr: ::c_long = 227;
-pub const SYS_lgetxattr: ::c_long = 228;
-pub const SYS_fgetxattr: ::c_long = 229;
-pub const SYS_listxattr: ::c_long = 230;
-pub const SYS_llistxattr: ::c_long = 231;
-pub const SYS_flistxattr: ::c_long = 232;
-pub const SYS_removexattr: ::c_long = 233;
-pub const SYS_lremovexattr: ::c_long = 234;
-pub const SYS_fremovexattr: ::c_long = 235;
 pub const SYS_gettid: ::c_long = 236;
-pub const SYS_tkill: ::c_long = 237;
-pub const SYS_futex: ::c_long = 238;
-pub const SYS_sched_setaffinity: ::c_long = 239;
-pub const SYS_sched_getaffinity: ::c_long = 240;
-pub const SYS_tgkill: ::c_long = 241;
-pub const SYS_io_setup: ::c_long = 243;
-pub const SYS_io_destroy: ::c_long = 244;
-pub const SYS_io_getevents: ::c_long = 245;
-pub const SYS_io_submit: ::c_long = 246;
-pub const SYS_io_cancel: ::c_long = 247;
-pub const SYS_exit_group: ::c_long = 248;
-pub const SYS_epoll_create: ::c_long = 249;
-pub const SYS_epoll_ctl: ::c_long = 250;
-pub const SYS_epoll_wait: ::c_long = 251;
-pub const SYS_set_tid_address: ::c_long = 252;
-pub const SYS_fadvise64: ::c_long = 253;
-pub const SYS_timer_create: ::c_long = 254;
-pub const SYS_timer_settime: ::c_long = 255;
-pub const SYS_timer_gettime: ::c_long = 256;
-pub const SYS_timer_getoverrun: ::c_long = 257;
-pub const SYS_timer_delete: ::c_long = 258;
-pub const SYS_clock_settime: ::c_long = 259;
-pub const SYS_clock_gettime: ::c_long = 260;
-pub const SYS_clock_getres: ::c_long = 261;
-pub const SYS_clock_nanosleep: ::c_long = 262;
-pub const SYS_statfs64: ::c_long = 265;
-pub const SYS_fstatfs64: ::c_long = 266;
-pub const SYS_remap_file_pages: ::c_long = 267;
-pub const SYS_mbind: ::c_long = 268;
-pub const SYS_get_mempolicy: ::c_long = 269;
-pub const SYS_set_mempolicy: ::c_long = 270;
-pub const SYS_mq_open: ::c_long = 271;
-pub const SYS_mq_unlink: ::c_long = 272;
-pub const SYS_mq_timedsend: ::c_long = 273;
-pub const SYS_mq_timedreceive: ::c_long = 274;
-pub const SYS_mq_notify: ::c_long = 275;
-pub const SYS_mq_getsetattr: ::c_long = 276;
-pub const SYS_kexec_load: ::c_long = 277;
-pub const SYS_add_key: ::c_long = 278;
-pub const SYS_request_key: ::c_long = 279;
-pub const SYS_keyctl: ::c_long = 280;
-pub const SYS_waitid: ::c_long = 281;
-pub const SYS_ioprio_set: ::c_long = 282;
-pub const SYS_ioprio_get: ::c_long = 283;
-pub const SYS_inotify_init: ::c_long = 284;
-pub const SYS_inotify_add_watch: ::c_long = 285;
-pub const SYS_inotify_rm_watch: ::c_long = 286;
-pub const SYS_migrate_pages: ::c_long = 287;
-pub const SYS_openat: ::c_long = 288;
-pub const SYS_mkdirat: ::c_long = 289;
-pub const SYS_mknodat: ::c_long = 290;
-pub const SYS_fchownat: ::c_long = 291;
-pub const SYS_futimesat: ::c_long = 292;
-pub const SYS_unlinkat: ::c_long = 294;
-pub const SYS_renameat: ::c_long = 295;
-pub const SYS_linkat: ::c_long = 296;
-pub const SYS_symlinkat: ::c_long = 297;
-pub const SYS_readlinkat: ::c_long = 298;
-pub const SYS_fchmodat: ::c_long = 299;
-pub const SYS_faccessat: ::c_long = 300;
-pub const SYS_pselect6: ::c_long = 301;
-pub const SYS_ppoll: ::c_long = 302;
-pub const SYS_unshare: ::c_long = 303;
-pub const SYS_set_robust_list: ::c_long = 304;
-pub const SYS_get_robust_list: ::c_long = 305;
-pub const SYS_splice: ::c_long = 306;
-pub const SYS_sync_file_range: ::c_long = 307;
-pub const SYS_tee: ::c_long = 308;
-pub const SYS_vmsplice: ::c_long = 309;
-pub const SYS_move_pages: ::c_long = 310;
-pub const SYS_getcpu: ::c_long = 311;
-pub const SYS_epoll_pwait: ::c_long = 312;
-pub const SYS_utimes: ::c_long = 313;
-pub const SYS_fallocate: ::c_long = 314;
-pub const SYS_utimensat: ::c_long = 315;
-pub const SYS_signalfd: ::c_long = 316;
-pub const SYS_timerfd: ::c_long = 317;
-pub const SYS_eventfd: ::c_long = 318;
-pub const SYS_timerfd_create: ::c_long = 319;
-pub const SYS_timerfd_settime: ::c_long = 320;
-pub const SYS_timerfd_gettime: ::c_long = 321;
-pub const SYS_signalfd4: ::c_long = 322;
-pub const SYS_eventfd2: ::c_long = 323;
-pub const SYS_inotify_init1: ::c_long = 324;
-pub const SYS_pipe2: ::c_long = 325;
-pub const SYS_dup3: ::c_long = 326;
-pub const SYS_epoll_create1: ::c_long = 327;
-pub const SYS_preadv: ::c_long = 328;
-pub const SYS_pwritev: ::c_long = 329;
-pub const SYS_rt_tgsigqueueinfo: ::c_long = 330;
 pub const SYS_perf_event_open: ::c_long = 331;
-pub const SYS_fanotify_init: ::c_long = 332;
-pub const SYS_fanotify_mark: ::c_long = 333;
-pub const SYS_prlimit64: ::c_long = 334;
-pub const SYS_name_to_handle_at: ::c_long = 335;
-pub const SYS_open_by_handle_at: ::c_long = 336;
-pub const SYS_clock_adjtime: ::c_long = 337;
-pub const SYS_syncfs: ::c_long = 338;
-pub const SYS_setns: ::c_long = 339;
-pub const SYS_process_vm_readv: ::c_long = 340;
-pub const SYS_process_vm_writev: ::c_long = 341;
-pub const SYS_s390_runtime_instr: ::c_long = 342;
-pub const SYS_kcmp: ::c_long = 343;
-pub const SYS_finit_module: ::c_long = 344;
-pub const SYS_sched_setattr: ::c_long = 345;
-pub const SYS_sched_getattr: ::c_long = 346;
-pub const SYS_renameat2: ::c_long = 347;
-pub const SYS_seccomp: ::c_long = 348;
-pub const SYS_getrandom: ::c_long = 349;
-pub const SYS_memfd_create: ::c_long = 350;
-pub const SYS_bpf: ::c_long = 351;
-pub const SYS_s390_pci_mmio_write: ::c_long = 352;
-pub const SYS_s390_pci_mmio_read: ::c_long = 353;
-pub const SYS_execveat: ::c_long = 354;
-pub const SYS_userfaultfd: ::c_long = 355;
-pub const SYS_membarrier: ::c_long = 356;
-pub const SYS_recvmmsg: ::c_long = 357;
-pub const SYS_sendmmsg: ::c_long = 358;
-pub const SYS_socket: ::c_long = 359;
-pub const SYS_socketpair: ::c_long = 360;
-pub const SYS_bind: ::c_long = 361;
-pub const SYS_connect: ::c_long = 362;
-pub const SYS_listen: ::c_long = 363;
-pub const SYS_accept4: ::c_long = 364;
-pub const SYS_getsockopt: ::c_long = 365;
-pub const SYS_setsockopt: ::c_long = 366;
-pub const SYS_getsockname: ::c_long = 367;
-pub const SYS_getpeername: ::c_long = 368;
-pub const SYS_sendto: ::c_long = 369;
-pub const SYS_sendmsg: ::c_long = 370;
-pub const SYS_recvfrom: ::c_long = 371;
-pub const SYS_recvmsg: ::c_long = 372;
-pub const SYS_shutdown: ::c_long = 373;
-pub const SYS_mlock2: ::c_long = 374;
-pub const SYS_copy_file_range: ::c_long = 375;
-pub const SYS_preadv2: ::c_long = 376;
-pub const SYS_pwritev2: ::c_long = 377;
-pub const SYS_lchown: ::c_long = 16;
-pub const SYS_setuid: ::c_long = 23;
-pub const SYS_getuid: ::c_long = 24;
-pub const SYS_setgid: ::c_long = 46;
-pub const SYS_getgid: ::c_long = 47;
-pub const SYS_geteuid: ::c_long = 49;
-pub const SYS_setreuid: ::c_long = 70;
-pub const SYS_setregid: ::c_long = 71;
-pub const SYS_getrlimit: ::c_long = 76;
-pub const SYS_getgroups: ::c_long = 80;
-pub const SYS_fchown: ::c_long = 95;
-pub const SYS_setresuid: ::c_long = 164;
-pub const SYS_setresgid: ::c_long = 170;
-pub const SYS_getresgid: ::c_long = 171;
-pub const SYS_select: ::c_long = 142;
-pub const SYS_getegid: ::c_long = 202;
-pub const SYS_setgroups: ::c_long = 206;
-pub const SYS_getresuid: ::c_long = 209;
-pub const SYS_chown: ::c_long = 212;
-pub const SYS_setfsuid: ::c_long = 215;
-pub const SYS_setfsgid: ::c_long = 216;
-pub const SYS_newfstatat: ::c_long = 293;
 
 #[link(name = "util")]
 extern {
     pub fn sysctl(name: *mut ::c_int,
                   namelen: ::c_int,
                   oldp: *mut ::c_void,
                   oldlenp: *mut ::size_t,
                   newp: *mut ::c_void,
--- a/third_party/rust/libc/src/unix/notbsd/mod.rs
+++ b/third_party/rust/libc/src/unix/notbsd/mod.rs
@@ -1,14 +1,15 @@
 use dox::mem;
 
 pub type sa_family_t = u16;
 pub type pthread_key_t = ::c_uint;
 pub type speed_t = ::c_uint;
 pub type tcflag_t = ::c_uint;
+pub type loff_t = ::c_longlong;
 pub type clockid_t = ::c_int;
 pub type key_t = ::c_int;
 pub type id_t = ::c_uint;
 
 pub enum timezone {}
 
 s! {
     pub struct sockaddr {
@@ -97,23 +98,23 @@ s! {
         pub tm_yday: ::c_int,
         pub tm_isdst: ::c_int,
         pub tm_gmtoff: ::c_long,
         pub tm_zone: *const ::c_char,
     }
 
     pub struct sched_param {
         pub sched_priority: ::c_int,
-        #[cfg(any(target_env = "musl", target_os = "emscripten"))]
+        #[cfg(any(target_env = "musl"))]
         pub sched_ss_low_priority: ::c_int,
-        #[cfg(any(target_env = "musl", target_os = "emscripten"))]
+        #[cfg(any(target_env = "musl"))]
         pub sched_ss_repl_period: ::timespec,
-        #[cfg(any(target_env = "musl", target_os = "emscripten"))]
+        #[cfg(any(target_env = "musl"))]
         pub sched_ss_init_budget: ::timespec,
-        #[cfg(any(target_env = "musl", target_os = "emscripten"))]
+        #[cfg(any(target_env = "musl"))]
         pub sched_ss_max_repl: ::c_int,
     }
 
     pub struct Dl_info {
         pub dli_fname: *const ::c_char,
         pub dli_fbase: *mut ::c_void,
         pub dli_sname: *const ::c_char,
         pub dli_saddr: *mut ::c_void,
@@ -206,49 +207,41 @@ pub const F_GETFD: ::c_int = 1;
 pub const F_SETFD: ::c_int = 2;
 pub const F_GETFL: ::c_int = 3;
 pub const F_SETFL: ::c_int = 4;
 
 // Linux-specific fcntls
 pub const F_SETLEASE: ::c_int = 1024;
 pub const F_GETLEASE: ::c_int = 1025;
 pub const F_NOTIFY: ::c_int = 1026;
-pub const F_CANCELLK: ::c_int = 1029;
 pub const F_DUPFD_CLOEXEC: ::c_int = 1030;
 pub const F_SETPIPE_SZ: ::c_int = 1031;
 pub const F_GETPIPE_SZ: ::c_int = 1032;
-pub const F_ADD_SEALS: ::c_int = 1033;
-pub const F_GET_SEALS: ::c_int = 1034;
-
-pub const F_SEAL_SEAL: ::c_int = 0x0001;
-pub const F_SEAL_SHRINK: ::c_int = 0x0002;
-pub const F_SEAL_GROW: ::c_int = 0x0004;
-pub const F_SEAL_WRITE: ::c_int = 0x0008;
 
 // TODO(#235): Include file sealing fcntls once we have a way to verify them.
 
 pub const SIGTRAP: ::c_int = 5;
 
 pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0;
 pub const PTHREAD_CREATE_DETACHED: ::c_int = 1;
 
-pub const CLOCK_REALTIME: ::clockid_t = 0;
-pub const CLOCK_MONOTONIC: ::clockid_t = 1;
-pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 2;
-pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 3;
-pub const CLOCK_MONOTONIC_RAW: ::clockid_t = 4;
-pub const CLOCK_REALTIME_COARSE: ::clockid_t = 5;
-pub const CLOCK_MONOTONIC_COARSE: ::clockid_t = 6;
-pub const CLOCK_BOOTTIME: ::clockid_t = 7;
-pub const CLOCK_REALTIME_ALARM: ::clockid_t = 8;
-pub const CLOCK_BOOTTIME_ALARM: ::clockid_t = 9;
+pub const CLOCK_REALTIME: clockid_t = 0;
+pub const CLOCK_MONOTONIC: clockid_t = 1;
+pub const CLOCK_PROCESS_CPUTIME_ID: clockid_t = 2;
+pub const CLOCK_THREAD_CPUTIME_ID: clockid_t = 3;
+pub const CLOCK_MONOTONIC_RAW: clockid_t = 4;
+pub const CLOCK_REALTIME_COARSE: clockid_t = 5;
+pub const CLOCK_MONOTONIC_COARSE: clockid_t = 6;
+pub const CLOCK_BOOTTIME: clockid_t = 7;
+pub const CLOCK_REALTIME_ALARM: clockid_t = 8;
+pub const CLOCK_BOOTTIME_ALARM: clockid_t = 9;
 // TODO(#247) Someday our Travis shall have glibc 2.21 (released in Sep
 // 2014.) See also musl/mod.rs
-// pub const CLOCK_SGI_CYCLE: ::clockid_t = 10;
-// pub const CLOCK_TAI: ::clockid_t = 11;
+// pub const CLOCK_SGI_CYCLE: clockid_t = 10;
+// pub const CLOCK_TAI: clockid_t = 11;
 pub const TIMER_ABSTIME: ::c_int = 1;
 
 pub const RLIMIT_CPU: ::c_int = 0;
 pub const RLIMIT_FSIZE: ::c_int = 1;
 pub const RLIMIT_DATA: ::c_int = 2;
 pub const RLIMIT_STACK: ::c_int = 3;
 pub const RLIMIT_CORE: ::c_int = 4;
 pub const RLIMIT_LOCKS: ::c_int = 10;
@@ -257,16 +250,17 @@ pub const RLIMIT_MSGQUEUE: ::c_int = 12;
 pub const RLIMIT_NICE: ::c_int = 13;
 pub const RLIMIT_RTPRIO: ::c_int = 14;
 
 pub const RUSAGE_SELF: ::c_int = 0;
 
 pub const O_RDONLY: ::c_int = 0;
 pub const O_WRONLY: ::c_int = 1;
 pub const O_RDWR: ::c_int = 2;
+pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY;
 
 pub const SOCK_CLOEXEC: ::c_int = O_CLOEXEC;
 
 pub const S_IFIFO: ::mode_t = 4096;
 pub const S_IFCHR: ::mode_t = 8192;
 pub const S_IFBLK: ::mode_t = 24576;
 pub const S_IFDIR: ::mode_t = 16384;
 pub const S_IFREG: ::mode_t = 32768;
@@ -400,38 +394,34 @@ pub const EMLINK: ::c_int = 31;
 pub const EPIPE: ::c_int = 32;
 pub const EDOM: ::c_int = 33;
 pub const ERANGE: ::c_int = 34;
 pub const EWOULDBLOCK: ::c_int = EAGAIN;
 
 pub const SCM_RIGHTS: ::c_int = 0x01;
 pub const SCM_CREDENTIALS: ::c_int = 0x02;
 
+pub const IPPROTO_RAW: ::c_int = 255;
+
 pub const PROT_GROWSDOWN: ::c_int = 0x1000000;
 pub const PROT_GROWSUP: ::c_int = 0x2000000;
 
 pub const MAP_TYPE: ::c_int = 0x000f;
 
 pub const MADV_NORMAL: ::c_int = 0;
 pub const MADV_RANDOM: ::c_int = 1;
 pub const MADV_SEQUENTIAL: ::c_int = 2;
 pub const MADV_WILLNEED: ::c_int = 3;
 pub const MADV_DONTNEED: ::c_int = 4;
-pub const MADV_FREE: ::c_int = 8;
 pub const MADV_REMOVE: ::c_int = 9;
 pub const MADV_DONTFORK: ::c_int = 10;
 pub const MADV_DOFORK: ::c_int = 11;
 pub const MADV_MERGEABLE: ::c_int = 12;
 pub const MADV_UNMERGEABLE: ::c_int = 13;
-pub const MADV_HUGEPAGE: ::c_int = 14;
-pub const MADV_NOHUGEPAGE: ::c_int = 15;
-pub const MADV_DONTDUMP: ::c_int = 16;
-pub const MADV_DODUMP: ::c_int = 17;
 pub const MADV_HWPOISON: ::c_int = 100;
-pub const MADV_SOFT_OFFLINE: ::c_int = 101;
 
 pub const IFF_UP: ::c_int = 0x1;
 pub const IFF_BROADCAST: ::c_int = 0x2;
 pub const IFF_DEBUG: ::c_int = 0x4;
 pub const IFF_LOOPBACK: ::c_int = 0x8;
 pub const IFF_POINTOPOINT: ::c_int = 0x10;
 pub const IFF_NOTRAILERS: ::c_int = 0x20;
 pub const IFF_RUNNING: ::c_int = 0x40;
@@ -442,17 +432,16 @@ pub const IFF_MASTER: ::c_int = 0x400;
 pub const IFF_SLAVE: ::c_int = 0x800;
 pub const IFF_MULTICAST: ::c_int = 0x1000;
 pub const IFF_PORTSEL: ::c_int = 0x2000;
 pub const IFF_AUTOMEDIA: ::c_int = 0x4000;
 pub const IFF_DYNAMIC: ::c_int = 0x8000;
 
 pub const SOL_IP: ::c_int = 0;
 pub const SOL_TCP: ::c_int = 6;
-pub const SOL_UDP: ::c_int = 17;
 pub const SOL_IPV6: ::c_int = 41;
 pub const SOL_ICMPV6: ::c_int = 58;
 pub const SOL_RAW: ::c_int = 255;
 pub const SOL_DECNET: ::c_int = 261;
 pub const SOL_X25: ::c_int = 262;
 pub const SOL_PACKET: ::c_int = 263;
 pub const SOL_ATM: ::c_int = 264;
 pub const SOL_AAL: ::c_int = 265;
@@ -559,21 +548,22 @@ pub const MSG_CONFIRM: ::c_int = 0x800;
 pub const MSG_RST: ::c_int = 0x1000;
 pub const MSG_ERRQUEUE: ::c_int = 0x2000;
 pub const MSG_NOSIGNAL: ::c_int = 0x4000;
 pub const MSG_MORE: ::c_int = 0x8000;
 pub const MSG_WAITFORONE: ::c_int = 0x10000;
 pub const MSG_FASTOPEN: ::c_int = 0x20000000;
 pub const MSG_CMSG_CLOEXEC: ::c_int = 0x40000000;
 
-pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP;
-
 pub const SOCK_RAW: ::c_int = 3;
-pub const SOCK_RDM: ::c_int = 4;
-pub const IP_MULTICAST_IF: ::c_int = 32;
+pub const IPPROTO_ICMP: ::c_int = 1;
+pub const IPPROTO_ICMPV6: ::c_int = 58;
+pub const IPPROTO_TCP: ::c_int = 6;
+pub const IPPROTO_IP: ::c_int = 0;
+pub const IPPROTO_IPV6: ::c_int = 41;
 pub const IP_MULTICAST_TTL: ::c_int = 33;
 pub const IP_MULTICAST_LOOP: ::c_int = 34;
 pub const IP_TTL: ::c_int = 2;
 pub const IP_HDRINCL: ::c_int = 3;
 pub const IP_ADD_MEMBERSHIP: ::c_int = 35;
 pub const IP_DROP_MEMBERSHIP: ::c_int = 36;
 pub const IP_TRANSPARENT: ::c_int = 19;
 pub const IPV6_ADD_MEMBERSHIP: ::c_int = 20;
@@ -680,25 +670,21 @@ pub const IGNPAR: ::tcflag_t = 0x0000000
 pub const PARMRK: ::tcflag_t = 0x00000008;
 pub const INPCK: ::tcflag_t = 0x00000010;
 pub const ISTRIP: ::tcflag_t = 0x00000020;
 pub const INLCR: ::tcflag_t = 0x00000040;
 pub const IGNCR: ::tcflag_t = 0x00000080;
 pub const ICRNL: ::tcflag_t = 0x00000100;
 pub const IXANY: ::tcflag_t = 0x00000800;
 pub const IMAXBEL: ::tcflag_t = 0x00002000;
+pub const IUTF8: ::tcflag_t = 0x00004000;
 pub const OPOST: ::tcflag_t = 0x1;
 pub const CS5: ::tcflag_t = 0x00000000;
 pub const CRTSCTS: ::tcflag_t = 0x80000000;
 pub const ECHO: ::tcflag_t = 0x00000008;
-pub const OCRNL:  ::tcflag_t = 0o000010;
-pub const ONOCR:  ::tcflag_t = 0o000020;
-pub const ONLRET: ::tcflag_t = 0o000040;
-pub const OFILL:  ::tcflag_t = 0o000100;
-pub const OFDEL:  ::tcflag_t = 0o000200;
 
 pub const CLONE_VM: ::c_int = 0x100;
 pub const CLONE_FS: ::c_int = 0x200;
 pub const CLONE_FILES: ::c_int = 0x400;
 pub const CLONE_SIGHAND: ::c_int = 0x800;
 pub const CLONE_PTRACE: ::c_int = 0x2000;
 pub const CLONE_VFORK: ::c_int = 0x4000;
 pub const CLONE_PARENT: ::c_int = 0x8000;
@@ -712,60 +698,34 @@ pub const CLONE_DETACHED: ::c_int = 0x40
 pub const CLONE_UNTRACED: ::c_int = 0x800000;
 pub const CLONE_CHILD_SETTID: ::c_int = 0x01000000;
 pub const CLONE_NEWUTS: ::c_int = 0x04000000;
 pub const CLONE_NEWIPC: ::c_int = 0x08000000;
 pub const CLONE_NEWUSER: ::c_int = 0x10000000;
 pub const CLONE_NEWPID: ::c_int = 0x20000000;
 pub const CLONE_NEWNET: ::c_int = 0x40000000;
 pub const CLONE_IO: ::c_int = 0x80000000;
-pub const CLONE_NEWCGROUP: ::c_int = 0x02000000;
 
 pub const WNOHANG: ::c_int = 0x00000001;
 pub const WUNTRACED: ::c_int = 0x00000002;
 pub const WSTOPPED: ::c_int = WUNTRACED;
 pub const WEXITED: ::c_int = 0x00000004;
 pub const WCONTINUED: ::c_int = 0x00000008;
 pub const WNOWAIT: ::c_int = 0x01000000;
 
-// Options set using PTRACE_SETOPTIONS.
-pub const PTRACE_O_TRACESYSGOOD: ::c_int = 0x00000001;
-pub const PTRACE_O_TRACEFORK: ::c_int = 0x00000002;
-pub const PTRACE_O_TRACEVFORK: ::c_int = 0x00000004;
-pub const PTRACE_O_TRACECLONE: ::c_int = 0x00000008;
-pub const PTRACE_O_TRACEEXEC: ::c_int = 0x00000010;
-pub const PTRACE_O_TRACEVFORKDONE: ::c_int = 0x00000020;
-pub const PTRACE_O_TRACEEXIT: ::c_int = 0x00000040;
-pub const PTRACE_O_TRACESECCOMP: ::c_int = 0x00000080;
-pub const PTRACE_O_EXITKILL: ::c_int = 0x00100000;
-pub const PTRACE_O_SUSPEND_SECCOMP: ::c_int = 0x00200000;
-pub const PTRACE_O_MASK: ::c_int = 0x003000ff;
-
-// Wait extended result codes for the above trace options.
-pub const PTRACE_EVENT_FORK: ::c_int = 1;
-pub const PTRACE_EVENT_VFORK: ::c_int = 2;
-pub const PTRACE_EVENT_CLONE: ::c_int = 3;
-pub const PTRACE_EVENT_EXEC: ::c_int = 4;
-pub const PTRACE_EVENT_VFORK_DONE: ::c_int = 5;
-pub const PTRACE_EVENT_EXIT: ::c_int = 6;
-pub const PTRACE_EVENT_SECCOMP: ::c_int = 7;
-// PTRACE_EVENT_STOP was added to glibc in 2.26
-// pub const PTRACE_EVENT_STOP: ::c_int = 128;
-
 pub const __WNOTHREAD: ::c_int = 0x20000000;
 pub const __WALL: ::c_int = 0x40000000;
 pub const __WCLONE: ::c_int = 0x80000000;
 
 pub const SPLICE_F_MOVE: ::c_uint = 0x01;
 pub const SPLICE_F_NONBLOCK: ::c_uint = 0x02;
 pub const SPLICE_F_MORE: ::c_uint = 0x04;
 pub const SPLICE_F_GIFT: ::c_uint = 0x08;
 
 pub const RTLD_LOCAL: ::c_int = 0;
-pub const RTLD_LAZY: ::c_int = 1;
 
 pub const POSIX_FADV_NORMAL: ::c_int = 0;
 pub const POSIX_FADV_RANDOM: ::c_int = 1;
 pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2;
 pub const POSIX_FADV_WILLNEED: ::c_int = 3;
 
 pub const AT_FDCWD: ::c_int = -100;
 pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x100;
@@ -789,25 +749,16 @@ pub const SIGEV_THREAD: ::c_int = 2;
 
 pub const P_ALL: idtype_t = 0;
 pub const P_PID: idtype_t = 1;
 pub const P_PGID: idtype_t = 2;
 
 pub const UTIME_OMIT: c_long = 1073741822;
 pub const UTIME_NOW: c_long = 1073741823;
 
-pub const POLLIN: ::c_short = 0x1;
-pub const POLLPRI: ::c_short = 0x2;
-pub const POLLOUT: ::c_short = 0x4;
-pub const POLLERR: ::c_short = 0x8;
-pub const POLLHUP: ::c_short = 0x10;
-pub const POLLNVAL: ::c_short = 0x20;
-pub const POLLRDNORM: ::c_short = 0x040;
-pub const POLLRDBAND: ::c_short = 0x080;
-
 f! {
     pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () {
         let fd = fd as usize;
         let size = mem::size_of_val(&(*set).fds_bits[0]) * 8;
         (*set).fds_bits[fd / size] &= !(1 << (fd % size));
         return
     }
 
@@ -856,65 +807,123 @@ f! {
 
     pub fn WEXITSTATUS(status: ::c_int) -> ::c_int {
         (status >> 8) & 0xff
     }
 
     pub fn WCOREDUMP(status: ::c_int) -> bool {
         (status & 0x80) != 0
     }
-
-    pub fn QCMD(cmd: ::c_int, type_: ::c_int) -> ::c_int {
-        (cmd << 8) | (type_ & 0x00ff)
-    }
 }
 
 extern {
+    pub fn getpwnam_r(name: *const ::c_char,
+                      pwd: *mut passwd,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut passwd) -> ::c_int;
+    pub fn getpwuid_r(uid: ::uid_t,
+                      pwd: *mut passwd,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut passwd) -> ::c_int;
     pub fn fdatasync(fd: ::c_int) -> ::c_int;
     pub fn mincore(addr: *mut ::c_void, len: ::size_t,
                    vec: *mut ::c_uchar) -> ::c_int;
-    pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
-    pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
-    pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int;
+    pub fn clock_getres(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
+    pub fn clock_gettime(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
+    pub fn clock_nanosleep(clk_id: clockid_t,
+                           flags: ::c_int,
+                           rqtp: *const ::timespec,
+                           rmtp:  *mut ::timespec) -> ::c_int;
+    pub fn clock_settime(clk_id: clockid_t, tp: *const ::timespec) -> ::c_int;
     pub fn dirfd(dirp: *mut ::DIR) -> ::c_int;
+    pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int;
 
+    pub fn prctl(option: ::c_int, ...) -> ::c_int;
     pub fn pthread_getattr_np(native: ::pthread_t,
                               attr: *mut ::pthread_attr_t) -> ::c_int;
+    pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
+                                     guardsize: *mut ::size_t) -> ::c_int;
     pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,
                                  stackaddr: *mut *mut ::c_void,
                                  stacksize: *mut ::size_t) -> ::c_int;
     pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
     pub fn setgroups(ngroups: ::size_t,
                      ptr: *const ::gid_t) -> ::c_int;
+    pub fn initgroups(user: *const ::c_char, group: ::gid_t) -> ::c_int;
+    pub fn sched_setscheduler(pid: ::pid_t,
+                              policy: ::c_int,
+                              param: *const sched_param) -> ::c_int;
+    pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int;
+    pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int;
+    pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int;
+    pub fn sched_setparam(pid: ::pid_t, param: *const sched_param) -> ::c_int;
+    pub fn sched_getparam(pid: ::pid_t, param: *mut sched_param) -> ::c_int;
+    pub fn sched_rr_get_interval(pid: ::pid_t, tp: *mut ::timespec) -> ::c_int;
+    pub fn epoll_create(size: ::c_int) -> ::c_int;
+    pub fn epoll_create1(flags: ::c_int) -> ::c_int;
+    pub fn epoll_ctl(epfd: ::c_int,
+                     op: ::c_int,
+                     fd: ::c_int,
+                     event: *mut epoll_event) -> ::c_int;
+    pub fn epoll_wait(epfd: ::c_int,
+                      events: *mut epoll_event,
+                      maxevents: ::c_int,
+                      timeout: ::c_int) -> ::c_int;
     pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int;
+    pub fn mount(src: *const ::c_char,
+                 target: *const ::c_char,
+                 fstype: *const ::c_char,
+                 flags: ::c_ulong,
+                 data: *const ::c_void) -> ::c_int;
+    pub fn umount(target: *const ::c_char) -> ::c_int;
+    pub fn umount2(target: *const ::c_char, flags: ::c_int) -> ::c_int;
+    pub fn clone(cb: extern fn(*mut ::c_void) -> ::c_int,
+                 child_stack: *mut ::c_void,
+                 flags: ::c_int,
+                 arg: *mut ::c_void, ...) -> ::c_int;
     pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int;
-    pub fn statfs64(path: *const ::c_char, buf: *mut statfs64) -> ::c_int;
     pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int;
-    pub fn fstatfs64(fd: ::c_int, buf: *mut statfs64) -> ::c_int;
-    pub fn statvfs64(path: *const ::c_char, buf: *mut statvfs64) -> ::c_int;
-    pub fn fstatvfs64(fd: ::c_int, buf: *mut statvfs64) -> ::c_int;
     pub fn memrchr(cx: *const ::c_void,
                    c: ::c_int,
                    n: ::size_t) -> *mut ::c_void;
+    pub fn syscall(num: ::c_long, ...) -> ::c_long;
+    pub fn sendfile(out_fd: ::c_int,
+                    in_fd: ::c_int,
+                    offset: *mut off_t,
+                    count: ::size_t) -> ::ssize_t;
+    pub fn splice(fd_in: ::c_int,
+                  off_in: *mut ::loff_t,
+                  fd_out: ::c_int,
+                  off_out: *mut ::loff_t,
+                  len: ::size_t,
+                  flags: ::c_uint) -> ::ssize_t;
+    pub fn tee(fd_in: ::c_int,
+               fd_out: ::c_int,
+               len: ::size_t,
+               flags: ::c_uint) -> ::ssize_t;
+    pub fn vmsplice(fd: ::c_int,
+                    iov: *const ::iovec,
+                    nr_segs: ::size_t,
+                    flags: ::c_uint) -> ::ssize_t;
 
     pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t,
                          advise: ::c_int) -> ::c_int;
     pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int;
     pub fn utimensat(dirfd: ::c_int, path: *const ::c_char,
                      times: *const ::timespec, flag: ::c_int) -> ::c_int;
     pub fn duplocale(base: ::locale_t) -> ::locale_t;
     pub fn freelocale(loc: ::locale_t);
     pub fn newlocale(mask: ::c_int,
                      locale: *const ::c_char,
                      base: ::locale_t) -> ::locale_t;
     pub fn uselocale(loc: ::locale_t) -> ::locale_t;
     pub fn creat64(path: *const c_char, mode: mode_t) -> ::c_int;
     pub fn fstat64(fildes: ::c_int, buf: *mut stat64) -> ::c_int;
-    pub fn fstatat64(dirfd: ::c_int, pathname: *const c_char,
-                     buf: *mut stat64, flags: ::c_int) -> ::c_int;
     pub fn ftruncate64(fd: ::c_int, length: off64_t) -> ::c_int;
     pub fn getrlimit64(resource: ::c_int, rlim: *mut rlimit64) -> ::c_int;
     pub fn lseek64(fd: ::c_int, offset: off64_t, whence: ::c_int) -> off64_t;
     pub fn lstat64(path: *const c_char, buf: *mut stat64) -> ::c_int;
     pub fn mmap64(addr: *mut ::c_void,
                   len: ::size_t,
                   prot: ::c_int,
                   flags: ::c_int,
@@ -922,93 +931,96 @@ extern {
                   offset: off64_t)
                   -> *mut ::c_void;
     pub fn open64(path: *const c_char, oflag: ::c_int, ...) -> ::c_int;
     pub fn openat64(fd: ::c_int,
                     path: *const c_char,
                     oflag: ::c_int, ...) -> ::c_int;
     pub fn pread64(fd: ::c_int, buf: *mut ::c_void, count: ::size_t,
                    offset: off64_t) -> ::ssize_t;
-    pub fn preadv64(fd: ::c_int,
-                    iov: *const ::iovec,
-                    iovcnt: ::c_int,
-                    offset: ::off64_t) -> ::ssize_t;
     pub fn pwrite64(fd: ::c_int, buf: *const ::c_void, count: ::size_t,
                     offset: off64_t) -> ::ssize_t;
-    pub fn pwritev64(fd: ::c_int,
-                     iov: *const ::iovec,
-                     iovcnt: ::c_int,
-                     offset: ::off64_t) -> ::ssize_t;
     pub fn readdir64(dirp: *mut ::DIR) -> *mut ::dirent64;
     pub fn readdir64_r(dirp: *mut ::DIR, entry: *mut ::dirent64,
                        result: *mut *mut ::dirent64) -> ::c_int;
     pub fn setrlimit64(resource: ::c_int, rlim: *const rlimit64) -> ::c_int;
     pub fn stat64(path: *const c_char, buf: *mut stat64) -> ::c_int;
     pub fn truncate64(path: *const c_char, length: off64_t) -> ::c_int;
+    pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int;
+    pub fn sysinfo (info: *mut ::sysinfo) -> ::c_int;
 
     pub fn fdopendir(fd: ::c_int) -> *mut ::DIR;
 
     pub fn mknodat(dirfd: ::c_int, pathname: *const ::c_char,
                    mode: ::mode_t, dev: dev_t) -> ::c_int;
+    pub fn ppoll(fds: *mut ::pollfd,
+                 nfds: nfds_t,
+                 timeout: *const ::timespec,
+                 sigmask: *const sigset_t) -> ::c_int;
     pub fn pthread_condattr_getclock(attr: *const pthread_condattr_t,
                                      clock_id: *mut clockid_t) -> ::c_int;
     pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
-                                     clock_id: ::clockid_t) -> ::c_int;
+                                     clock_id: clockid_t) -> ::c_int;
     pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t,
                                        pshared: ::c_int) -> ::c_int;
+    pub fn pthread_condattr_getpshared(attr: *const pthread_condattr_t,
+                                       pshared: *mut ::c_int) -> ::c_int;
+    pub fn pthread_getschedparam(native: ::pthread_t,
+                                 policy: *mut ::c_int,
+                                 param: *mut ::sched_param) -> ::c_int;
+    pub fn pthread_setschedparam(native: ::pthread_t,
+                                 policy: ::c_int,
+                                 param: *const ::sched_param) -> ::c_int;
+    pub fn sched_getaffinity(pid: ::pid_t,
+                             cpusetsize: ::size_t,
+                             cpuset: *mut cpu_set_t) -> ::c_int;
+    pub fn sched_setaffinity(pid: ::pid_t,
+                             cpusetsize: ::size_t,
+                             cpuset: *const cpu_set_t) -> ::c_int;
+    pub fn unshare(flags: ::c_int) -> ::c_int;
+    pub fn setns(fd: ::c_int, nstype: ::c_int) -> ::c_int;
+    pub fn sem_timedwait(sem: *mut sem_t,
+                         abstime: *const ::timespec) -> ::c_int;
     pub fn accept4(fd: ::c_int, addr: *mut ::sockaddr, len: *mut ::socklen_t,
                    flg: ::c_int) -> ::c_int;
+    pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
+                                   abstime: *const ::timespec) -> ::c_int;
     pub fn pthread_mutexattr_setpshared(attr: *mut pthread_mutexattr_t,
                                         pshared: ::c_int) -> ::c_int;
-    pub fn pthread_rwlockattr_getpshared(attr: *const pthread_rwlockattr_t,
-                                         val: *mut ::c_int) -> ::c_int;
-    pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t,
-                                         val: ::c_int) -> ::c_int;
+    pub fn pthread_mutexattr_getpshared(attr: *const pthread_mutexattr_t,
+                                        pshared: *mut ::c_int) -> ::c_int;
     pub fn ptsname_r(fd: ::c_int,
                      buf: *mut ::c_char,
                      buflen: ::size_t) -> ::c_int;
     pub fn clearenv() -> ::c_int;
     pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t,
                   options: ::c_int) -> ::c_int;
+    pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int;
     pub fn setreuid(ruid: ::uid_t, euid: ::uid_t) -> ::c_int;
     pub fn setregid(rgid: ::gid_t, egid: ::gid_t) -> ::c_int;
     pub fn getresuid(ruid: *mut ::uid_t, euid: *mut ::uid_t,
                      suid: *mut ::uid_t) -> ::c_int;
     pub fn getresgid(rgid: *mut ::gid_t, egid: *mut ::gid_t,
                      sgid: *mut ::gid_t) -> ::c_int;
+    pub fn personality(persona: ::c_ulong) -> ::c_int;
+    pub fn swapon(path: *const ::c_char, swapflags: ::c_int) -> ::c_int;
+    pub fn swapoff(puath: *const ::c_char) -> ::c_int;
     pub fn acct(filename: *const ::c_char) -> ::c_int;
     pub fn brk(addr: *mut ::c_void) -> ::c_int;
     pub fn sbrk(increment: ::intptr_t) -> *mut ::c_void;
     pub fn vfork() -> ::pid_t;
-    pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int;
-    pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int;
     pub fn wait4(pid: ::pid_t, status: *mut ::c_int, options: ::c_int,
                  rusage: *mut ::rusage) -> ::pid_t;
-    pub fn openpty(amaster: *mut ::c_int,
-                aslave: *mut ::c_int,
-                name: *mut ::c_char,
-                termp: *const termios,
-                winp: *const ::winsize) -> ::c_int;
-    pub fn execvpe(file: *const ::c_char, argv: *const *const ::c_char,
-                   envp: *const *const ::c_char) -> ::c_int;
-    pub fn fexecve(fd: ::c_int, argv: *const *const ::c_char,
-                   envp: *const *const ::c_char)
-                   -> ::c_int;
 }
 
 cfg_if! {
-    if #[cfg(target_os = "emscripten")] {
-        mod emscripten;
-        pub use self::emscripten::*;
-    } else if #[cfg(any(target_os = "linux", target_os = "fuchsia"))] {
+    if #[cfg(any(target_os = "linux",
+                 target_os = "emscripten",
+                 target_os = "fuchsia"))] {
         mod linux;
         pub use self::linux::*;
     } else if #[cfg(target_os = "android")] {
         mod android;
         pub use self::android::*;
     } else {
         // Unknown target_os
     }
 }
-    // pub fn forkpty(amaster: *mut ::c_int,
-    //             name: *mut ::c_char,
-    //             termp: *const termios,
-    //             winp: *const ::winsize) -> ::pid_t;
--- a/third_party/rust/libc/src/unix/solaris/mod.rs
+++ b/third_party/rust/libc/src/unix/solaris/mod.rs
@@ -164,20 +164,16 @@ s! {
         __pthread_rwlock_readers: i32,
         __pthread_rwlock_type: u16,
         __pthread_rwlock_magic: u16,
         __pthread_rwlock_mutex: ::pthread_mutex_t,
         __pthread_rwlock_readercv: ::pthread_cond_t,
         __pthread_rwlock_writercv: ::pthread_cond_t
     }
 
-    pub struct pthread_rwlockattr_t {
-        __pthread_rwlockattrp: *mut ::c_void,
-    }
-
     pub struct dirent {
         pub d_ino: ::ino_t,
         pub d_off: ::off_t,
         pub d_reclen: u16,
         pub d_name: [::c_char; 1]
     }
 
     pub struct glob_t {
@@ -203,18 +199,16 @@ s! {
         __ss_pad2: [u8; 240],
     }
 
     pub struct addrinfo {
         pub ai_flags: ::c_int,
         pub ai_family: ::c_int,
         pub ai_socktype: ::c_int,
         pub ai_protocol: ::c_int,
-        #[cfg(target_arch = "sparc64")]
-        __sparcv9_pad: ::c_int,
         pub ai_addrlen: ::socklen_t,
         pub ai_canonname: *mut ::c_char,
         pub ai_addr: *mut ::sockaddr,
         pub ai_next: *mut addrinfo,
     }
 
     pub struct sigset_t {
         bits: [u32; 4],
@@ -586,19 +580,16 @@ pub const WNOHANG: ::c_int = 0x40;
 pub const WUNTRACED: ::c_int = 0x04;
 
 pub const WEXITED: ::c_int = 0x01;
 pub const WTRAPPED: ::c_int = 0x02;
 pub const WSTOPPED: ::c_int = WUNTRACED;
 pub const WCONTINUED: ::c_int = 0x08;
 pub const WNOWAIT: ::c_int = 0x80;
 
-pub const AT_FDCWD: ::c_int = 0xffd19553;
-pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x1000;
-
 // Solaris defines a great many more of these; we only expose the
 // standardized ones.
 pub const P_PID: idtype_t = 0;
 pub const P_PGID: idtype_t = 2;
 pub const P_ALL: idtype_t = 7;
 
 pub const PROT_NONE: ::c_int = 0;
 pub const PROT_READ: ::c_int = 1;
@@ -764,49 +755,71 @@ pub const GLOB_MARK    : ::c_int = 2;
 pub const GLOB_NOCHECK : ::c_int = 8;
 pub const GLOB_NOSORT  : ::c_int = 4;
 pub const GLOB_NOESCAPE: ::c_int = 64;
 
 pub const GLOB_NOSPACE : ::c_int = -2;
 pub const GLOB_ABORTED : ::c_int = -1;
 pub const GLOB_NOMATCH : ::c_int = -3;
 
-pub const POLLIN: ::c_short = 0x1;
-pub const POLLPRI: ::c_short = 0x2;
-pub const POLLOUT: ::c_short = 0x4;
-pub const POLLERR: ::c_short = 0x8;
-pub const POLLHUP: ::c_short = 0x10;
-pub const POLLNVAL: ::c_short = 0x20;
-
 pub const POSIX_MADV_NORMAL: ::c_int = 0;
 pub const POSIX_MADV_RANDOM: ::c_int = 1;
 pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2;
 pub const POSIX_MADV_WILLNEED: ::c_int = 3;
 pub const POSIX_MADV_DONTNEED: ::c_int = 4;
 
+pub const _SC_IOV_MAX: ::c_int = 77;
+pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 569;
+pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 570;
+pub const _SC_LOGIN_NAME_MAX: ::c_int = 571;
+pub const _SC_MQ_PRIO_MAX: ::c_int = 30;
+pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 577;
+pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 578;
+pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 568;
+pub const _SC_THREAD_KEYS_MAX: ::c_int = 572;
+pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 580;
+pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 581;
+pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 579;
+pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 582;
+pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 583;
+pub const _SC_THREAD_STACK_MIN: ::c_int = 573;
+pub const _SC_THREAD_THREADS_MAX: ::c_int = 574;
+pub const _SC_THREADS: ::c_int = 576;
+pub const _SC_TTY_NAME_MAX: ::c_int = 575;
+pub const _SC_ATEXIT_MAX: ::c_int = 76;
+pub const _SC_XOPEN_CRYPT: ::c_int = 62;
+pub const _SC_XOPEN_ENH_I18N: ::c_int = 63;
+pub const _SC_XOPEN_LEGACY: ::c_int = 717;
+pub const _SC_XOPEN_REALTIME: ::c_int = 718;
+pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 719;
+pub const _SC_XOPEN_SHM: ::c_int = 64;
+pub const _SC_XOPEN_UNIX: ::c_int = 78;
+pub const _SC_XOPEN_VERSION: ::c_int = 12;
+pub const _SC_XOPEN_XCU_VERSION: ::c_int = 67;
+
 pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0;
 pub const PTHREAD_CREATE_DETACHED: ::c_int = 0x40;
 pub const PTHREAD_PROCESS_SHARED: ::c_int = 1;
-pub const PTHREAD_PROCESS_PRIVATE: ::c_ushort = 0;
+pub const PTHREAD_PROCESS_PRIVATE: u16 = 0;
 pub const PTHREAD_STACK_MIN: ::size_t = 4096;
 
 pub const SIGSTKSZ: ::size_t = 8192;
 
 // https://illumos.org/man/3c/clock_gettime
 // https://github.com/illumos/illumos-gate/
 //   blob/HEAD/usr/src/lib/libc/amd64/sys/__clock_gettime.s
 // clock_gettime(3c) doesn't seem to accept anything other than CLOCK_REALTIME
 // or __CLOCK_REALTIME0
 //
 // https://github.com/illumos/illumos-gate/
 //   blob/HEAD/usr/src/uts/common/sys/time_impl.h
 // Confusing! CLOCK_HIGHRES==CLOCK_MONOTONIC==4
 // __CLOCK_REALTIME0==0 is an obsoleted version of CLOCK_REALTIME==3
-pub const CLOCK_REALTIME: ::clockid_t = 3;
-pub const CLOCK_MONOTONIC: ::clockid_t = 4;
+pub const CLOCK_REALTIME: clockid_t = 3;
+pub const CLOCK_MONOTONIC: clockid_t = 4;
 pub const TIMER_RELTIME: ::c_int = 0;
 pub const TIMER_ABSTIME: ::c_int = 1;
 
 pub const RLIMIT_CPU: ::c_int = 0;
 pub const RLIMIT_FSIZE: ::c_int = 1;
 pub const RLIMIT_DATA: ::c_int = 2;
 pub const RLIMIT_STACK: ::c_int = 3;
 pub const RLIMIT_CORE: ::c_int = 4;
@@ -830,16 +843,21 @@ pub const MADV_FREE: ::c_int = 5;
 pub const AF_INET: ::c_int = 2;
 pub const AF_INET6: ::c_int = 26;
 pub const AF_UNIX: ::c_int = 1;
 pub const SOCK_DGRAM: ::c_int = 1;
 pub const SOCK_STREAM: ::c_int = 2;
 pub const SOCK_RAW: ::c_int = 4;
 pub const SOCK_RDM: ::c_int = 5;
 pub const SOCK_SEQPACKET: ::c_int = 6;
+pub const IPPROTO_ICMP: ::c_int = 1;
+pub const IPPROTO_ICMPV6: ::c_int = 58;
+pub const IPPROTO_TCP: ::c_int = 6;
+pub const IPPROTO_IP: ::c_int = 0;
+pub const IPPROTO_IPV6: ::c_int = 41;
 pub const IP_MULTICAST_TTL: ::c_int = 17;
 pub const IP_MULTICAST_LOOP: ::c_int = 18;
 pub const IP_TTL: ::c_int = 4;
 pub const IP_HDRINCL: ::c_int = 2;
 pub const IP_ADD_MEMBERSHIP: ::c_int = 19;
 pub const IP_DROP_MEMBERSHIP: ::c_int = 20;
 pub const IPV6_JOIN_GROUP: ::c_int = 9;
 pub const IPV6_LEAVE_GROUP: ::c_int = 10;
@@ -882,197 +900,70 @@ pub const F_RDLCK: ::c_short = 1;
 pub const F_WRLCK: ::c_short = 2;
 pub const F_UNLCK: ::c_short = 3;
 
 pub const O_SYNC: ::c_int = 16;
 pub const O_NONBLOCK: ::c_int = 128;
 
 pub const IPPROTO_RAW: ::c_int = 255;
 
-pub const _PC_LINK_MAX: ::c_int = 1;
-pub const _PC_MAX_CANON: ::c_int = 2;
-pub const _PC_MAX_INPUT: ::c_int = 3;
-pub const _PC_NAME_MAX: ::c_int = 4;
-pub const _PC_PATH_MAX: ::c_int = 5;
-pub const _PC_PIPE_BUF: ::c_int = 6;
-pub const _PC_NO_TRUNC: ::c_int = 7;
-pub const _PC_VDISABLE: ::c_int = 8;
-pub const _PC_CHOWN_RESTRICTED: ::c_int = 9;
-pub const _PC_ASYNC_IO: ::c_int = 10;
-pub const _PC_PRIO_IO: ::c_int = 11;
-pub const _PC_SYNC_IO: ::c_int = 12;
-pub const _PC_ALLOC_SIZE_MIN: ::c_int = 13;
-pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 14;
-pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 15;
-pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 16;
-pub const _PC_REC_XFER_ALIGN: ::c_int = 17;
-pub const _PC_SYMLINK_MAX: ::c_int = 18;
-pub const _PC_2_SYMLINKS: ::c_int = 19;
-pub const _PC_ACL_ENABLED: ::c_int = 20;
-pub const _PC_MIN_HOLE_SIZE: ::c_int = 21;
-pub const _PC_CASE_BEHAVIOR: ::c_int = 22;
-pub const _PC_SATTR_ENABLED: ::c_int = 23;
-pub const _PC_SATTR_EXISTS: ::c_int = 24;
-pub const _PC_ACCESS_FILTERING: ::c_int = 25;
-pub const _PC_TIMESTAMP_RESOLUTION: ::c_int = 26;
-pub const _PC_FILESIZEBITS: ::c_int = 67;
-pub const _PC_XATTR_ENABLED: ::c_int = 100;
-pub const _PC_LAST: ::c_int = 101;
-pub const _PC_XATTR_EXISTS: ::c_int = 101;
-
 pub const _SC_ARG_MAX: ::c_int = 1;
 pub const _SC_CHILD_MAX: ::c_int = 2;
 pub const _SC_CLK_TCK: ::c_int = 3;
 pub const _SC_NGROUPS_MAX: ::c_int = 4;
 pub const _SC_OPEN_MAX: ::c_int = 5;
 pub const _SC_JOB_CONTROL: ::c_int = 6;
 pub const _SC_SAVED_IDS: ::c_int = 7;
 pub const _SC_VERSION: ::c_int = 8;
-pub const _SC_PASS_MAX: ::c_int = 9;
-pub const _SC_LOGNAME_MAX: ::c_int = 10;
 pub const _SC_PAGESIZE: ::c_int = 11;
 pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE;
-pub const _SC_XOPEN_VERSION: ::c_int = 12;
-pub const _SC_NPROCESSORS_CONF: ::c_int = 14;
 pub const _SC_NPROCESSORS_ONLN: ::c_int = 15;
 pub const _SC_STREAM_MAX: ::c_int = 16;
 pub const _SC_TZNAME_MAX: ::c_int = 17;
 pub const _SC_AIO_LISTIO_MAX: ::c_int = 18;
 pub const _SC_AIO_MAX: ::c_int = 19;
-pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 20;
-pub const _SC_ASYNCHRONOUS_IO: ::c_int = 21;
-pub const _SC_DELAYTIMER_MAX: ::c_int = 22;
-pub const _SC_FSYNC: ::c_int = 23;
-pub const _SC_MAPPED_FILES: ::c_int = 24;
-pub const _SC_MEMLOCK: ::c_int = 25;
-pub const _SC_MEMLOCK_RANGE: ::c_int = 26;
-pub const _SC_MEMORY_PROTECTION: ::c_int = 27;
-pub const _SC_MESSAGE_PASSING: ::c_int = 28;
-pub const _SC_MQ_OPEN_MAX: ::c_int = 29;
-pub const _SC_MQ_PRIO_MAX: ::c_int = 30;
-pub const _SC_PRIORITIZED_IO: ::c_int = 31;
-pub const _SC_PRIORITY_SCHEDULING: ::c_int = 32;
-pub const _SC_REALTIME_SIGNALS: ::c_int = 33;
-pub const _SC_RTSIG_MAX: ::c_int = 34;
-pub const _SC_SEMAPHORES: ::c_int = 35;
-pub const _SC_SEM_NSEMS_MAX: ::c_int = 36;
-pub const _SC_SEM_VALUE_MAX: ::c_int = 37;
-pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 38;
-pub const _SC_SIGQUEUE_MAX: ::c_int = 39;
-pub const _SC_SIGRT_MIN: ::c_int = 40;
-pub const _SC_SIGRT_MAX: ::c_int = 41;
-pub const _SC_SYNCHRONIZED_IO: ::c_int = 42;
-pub const _SC_TIMERS: ::c_int = 43;
-pub const _SC_TIMER_MAX: ::c_int = 44;
-pub const _SC_2_C_BIND: ::c_int = 45;
-pub const _SC_2_C_DEV: ::c_int = 46;
-pub const _SC_2_C_VERSION: ::c_int = 47;
-pub const _SC_2_FORT_DEV: ::c_int = 48;
-pub const _SC_2_FORT_RUN: ::c_int = 49;
-pub const _SC_2_LOCALEDEF: ::c_int = 50;
-pub const _SC_2_SW_DEV: ::c_int = 51;
-pub const _SC_2_UPE: ::c_int = 52;
-pub const _SC_2_VERSION: ::c_int = 53;
 pub const _SC_BC_BASE_MAX: ::c_int = 54;
 pub const _SC_BC_DIM_MAX: ::c_int = 55;
 pub const _SC_BC_SCALE_MAX: ::c_int = 56;
 pub const _SC_BC_STRING_MAX: ::c_int = 57;
 pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 58;
 pub const _SC_EXPR_NEST_MAX: ::c_int = 59;
 pub const _SC_LINE_MAX: ::c_int = 60;
 pub const _SC_RE_DUP_MAX: ::c_int = 61;
-pub const _SC_XOPEN_CRYPT: ::c_int = 62;
-pub const _SC_XOPEN_ENH_I18N: ::c_int = 63;
-pub const _SC_XOPEN_SHM: ::c_int = 64;
+pub const _SC_2_VERSION: ::c_int = 53;
+pub const _SC_2_C_BIND: ::c_int = 45;
+pub const _SC_2_C_DEV: ::c_int = 46;
 pub const _SC_2_CHAR_TERM: ::c_int = 66;
-pub const _SC_XOPEN_XCU_VERSION: ::c_int = 67;
-pub const _SC_ATEXIT_MAX: ::c_int = 76;
-pub const _SC_IOV_MAX: ::c_int = 77;
-pub const _SC_XOPEN_UNIX: ::c_int = 78;
-pub const _SC_T_IOV_MAX: ::c_int = 79;
-pub const _SC_PHYS_PAGES: ::c_int = 500;
-pub const _SC_AVPHYS_PAGES: ::c_int = 501;
-pub const _SC_COHER_BLKSZ: ::c_int = 503;
-pub const _SC_SPLIT_CACHE: ::c_int = 504;
-pub const _SC_ICACHE_SZ: ::c_int = 505;
-pub const _SC_DCACHE_SZ: ::c_int = 506;
-pub const _SC_ICACHE_LINESZ: ::c_int = 507;
-pub const _SC_DCACHE_LINESZ: ::c_int = 508;
-pub const _SC_ICACHE_BLKSZ: ::c_int = 509;
-pub const _SC_DCACHE_BLKSZ: ::c_int = 510;
-pub const _SC_DCACHE_TBLKSZ: ::c_int = 511;
-pub const _SC_ICACHE_ASSOC: ::c_int = 512;
-pub const _SC_DCACHE_ASSOC: ::c_int = 513;
-pub const _SC_MAXPID: ::c_int = 514;
-pub const _SC_STACK_PROT: ::c_int = 515;
-pub const _SC_NPROCESSORS_MAX: ::c_int = 516;
-pub const _SC_CPUID_MAX: ::c_int = 517;
-pub const _SC_EPHID_MAX: ::c_int = 518;
-pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 568;
-pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 569;
-pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 570;
-pub const _SC_LOGIN_NAME_MAX: ::c_int = 571;
-pub const _SC_THREAD_KEYS_MAX: ::c_int = 572;
-pub const _SC_THREAD_STACK_MIN: ::c_int = 573;
-pub const _SC_THREAD_THREADS_MAX: ::c_int = 574;
-pub const _SC_TTY_NAME_MAX: ::c_int = 575;
-pub const _SC_THREADS: ::c_int = 576;
-pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 577;
-pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 578;
-pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 579;
-pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 580;
-pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 581;
-pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 582;
-pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 583;
-pub const _SC_XOPEN_LEGACY: ::c_int = 717;
-pub const _SC_XOPEN_REALTIME: ::c_int = 718;
-pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 719;
-pub const _SC_XBS5_ILP32_OFF32: ::c_int = 720;
-pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 721;
-pub const _SC_XBS5_LP64_OFF64: ::c_int = 722;
-pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 723;
-pub const _SC_2_PBS: ::c_int = 724;
-pub const _SC_2_PBS_ACCOUNTING: ::c_int = 725;
-pub const _SC_2_PBS_CHECKPOINT: ::c_int = 726;
-pub const _SC_2_PBS_LOCATE: ::c_int = 728;
-pub const _SC_2_PBS_MESSAGE: ::c_int = 729;
-pub const _SC_2_PBS_TRACK: ::c_int = 730;
-pub const _SC_ADVISORY_INFO: ::c_int = 731;
-pub const _SC_BARRIERS: ::c_int = 732;
-pub const _SC_CLOCK_SELECTION: ::c_int = 733;
-pub const _SC_CPUTIME: ::c_int = 734;
-pub const _SC_HOST_NAME_MAX: ::c_int = 735;
-pub const _SC_MONOTONIC_CLOCK: ::c_int = 736;
-pub const _SC_READER_WRITER_LOCKS: ::c_int = 737;
-pub const _SC_REGEXP: ::c_int = 738;
-pub const _SC_SHELL: ::c_int = 739;
-pub const _SC_SPAWN: ::c_int = 740;
-pub const _SC_SPIN_LOCKS: ::c_int = 741;
-pub const _SC_SPORADIC_SERVER: ::c_int = 742;
-pub const _SC_SS_REPL_MAX: ::c_int = 743;
-pub const _SC_SYMLOOP_MAX: ::c_int = 744;
-pub const _SC_THREAD_CPUTIME: ::c_int = 745;
-pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 746;
-pub const _SC_TIMEOUTS: ::c_int = 747;
-pub const _SC_TRACE: ::c_int = 748;
-pub const _SC_TRACE_EVENT_FILTER: ::c_int = 749;
-pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 750;
-pub const _SC_TRACE_INHERIT: ::c_int = 751;
-pub const _SC_TRACE_LOG: ::c_int = 752;
-pub const _SC_TRACE_NAME_MAX: ::c_int = 753;
-pub const _SC_TRACE_SYS_MAX: ::c_int = 754;
-pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 755;
-pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 756;
-pub const _SC_V6_ILP32_OFF32: ::c_int = 757;
-pub const _SC_V6_ILP32_OFFBIG: ::c_int = 758;
-pub const _SC_V6_LP64_OFF64: ::c_int = 759;
-pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 760;
-pub const _SC_XOPEN_STREAMS: ::c_int = 761;
-pub const _SC_IPV6: ::c_int = 762;
-pub const _SC_RAW_SOCKETS: ::c_int = 763;
+pub const _SC_2_FORT_DEV: ::c_int = 48;
+pub const _SC_2_FORT_RUN: ::c_int = 49;
+pub const _SC_2_LOCALEDEF: ::c_int = 50;
+pub const _SC_2_SW_DEV: ::c_int = 51;
+pub const _SC_2_UPE: ::c_int = 52;
+pub const _SC_ASYNCHRONOUS_IO: ::c_int = 21;
+pub const _SC_MAPPED_FILES: ::c_int = 24;
+pub const _SC_MEMLOCK: ::c_int = 25;
+pub const _SC_MEMLOCK_RANGE: ::c_int = 26;
+pub const _SC_MEMORY_PROTECTION: ::c_int = 27;
+pub const _SC_MESSAGE_PASSING: ::c_int = 28;
+pub const _SC_PRIORITIZED_IO: ::c_int = 31;
+pub const _SC_PRIORITY_SCHEDULING: ::c_int = 32;
+pub const _SC_REALTIME_SIGNALS: ::c_int = 33;
+pub const _SC_SEMAPHORES: ::c_int = 35;
+pub const _SC_FSYNC: ::c_int = 23;
+pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 38;
+pub const _SC_SYNCHRONIZED_IO: ::c_int = 42;
+pub const _SC_TIMERS: ::c_int = 43;
+pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 20;
+pub const _SC_DELAYTIMER_MAX: ::c_int = 22;
+pub const _SC_MQ_OPEN_MAX: ::c_int = 29;
+pub const _SC_RTSIG_MAX: ::c_int = 34;
+pub const _SC_SEM_NSEMS_MAX: ::c_int = 36;
+pub const _SC_SEM_VALUE_MAX: ::c_int = 37;
+pub const _SC_SIGQUEUE_MAX: ::c_int = 39;
+pub const _SC_TIMER_MAX: ::c_int = 44;
 
 pub const _MUTEX_MAGIC: u16 = 0x4d58; // MX
 pub const _COND_MAGIC: u16 = 0x4356;  // CV
 pub const _RWL_MAGIC: u16 = 0x5257;   // RW
 
 pub const NCCS: usize = 19;
 
 pub const LOG_CRON: ::c_int = 15 << 3;
@@ -1105,17 +996,16 @@ pub const PTHREAD_MUTEX_ERRORCHECK: ::c_
 pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 4;
 pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
 
 pub const RTLD_NEXT: *mut ::c_void = -1isize as *mut ::c_void;
 pub const RTLD_DEFAULT: *mut ::c_void = -2isize as *mut ::c_void;
 pub const RTLD_SELF: *mut ::c_void = -3isize as *mut ::c_void;
 pub const RTLD_PROBE: *mut ::c_void = -4isize as *mut ::c_void;
 
-pub const RTLD_LAZY: ::c_int = 0x1;
 pub const RTLD_NOW: ::c_int = 0x2;
 pub const RTLD_NOLOAD: ::c_int = 0x4;
 pub const RTLD_GLOBAL: ::c_int = 0x100;
 pub const RTLD_LOCAL: ::c_int = 0x0;
 pub const RTLD_PARENT: ::c_int = 0x200;
 pub const RTLD_GROUP: ::c_int = 0x400;
 pub const RTLD_WORLD: ::c_int = 0x800;
 pub const RTLD_NODELETE: ::c_int = 0x1000;
@@ -1179,32 +1069,44 @@ extern {
     pub fn stack_getbounds(sp: *mut ::stack_t) -> ::c_int;
     pub fn mincore(addr: *const ::c_void, len: ::size_t,
                    vec: *mut c_char) -> ::c_int;
     pub fn setgroups(ngroups: ::c_int,
                      ptr: *const ::gid_t) -> ::c_int;
     pub fn ioctl(fildes: ::c_int, request: ::c_int, ...) -> ::c_int;
     pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int)
                     -> ::c_int;
-    pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
-    pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
-    pub fn clock_nanosleep(clk_id: ::clockid_t,
+    pub fn clock_getres(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
+    pub fn clock_gettime(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
+    pub fn clock_nanosleep(clk_id: clockid_t,
                            flags: ::c_int,
                            rqtp: *const ::timespec,
                            rmtp:  *mut ::timespec) -> ::c_int;
-    pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int;
+    pub fn clock_settime(clk_id: clockid_t, tp: *const ::timespec) -> ::c_int;
     pub fn getnameinfo(sa: *const ::sockaddr,
                        salen: ::socklen_t,
                        host: *mut ::c_char,
                        hostlen: ::socklen_t,
                        serv: *mut ::c_char,
                        sevlen: ::socklen_t,
                        flags: ::c_int) -> ::c_int;
+    #[link_name = "__posix_getpwnam_r"]
+    pub fn getpwnam_r(name: *const ::c_char,
+                      pwd: *mut passwd,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut passwd) -> ::c_int;
+
+    #[link_name = "__posix_getpwuid_r"]
+    pub fn getpwuid_r(uid: ::uid_t,
+                      pwd: *mut passwd,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut passwd) -> ::c_int;
     pub fn setpwent();
-    pub fn endpwent();
     pub fn getpwent() -> *mut passwd;
     pub fn fdatasync(fd: ::c_int) -> ::c_int;
     pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char;
     pub fn duplocale(base: ::locale_t) -> ::locale_t;
     pub fn freelocale(loc: ::locale_t);
     pub fn newlocale(mask: ::c_int,
                      locale: *const ::c_char,
                      base: ::locale_t) -> ::locale_t;
@@ -1219,24 +1121,20 @@ extern {
 
     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,
                     mode: ::mode_t) -> ::c_int;
     pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
     pub fn if_nameindex() -> *mut if_nameindex;
     pub fn if_freenameindex(ptr: *mut if_nameindex);
-    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_condattr_getclock(attr: *const pthread_condattr_t,
                                      clock_id: *mut clockid_t) -> ::c_int;
     pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
-                                     clock_id: ::clockid_t) -> ::c_int;
+                                     clock_id: clockid_t) -> ::c_int;
     pub fn sem_timedwait(sem: *mut sem_t,
                          abstime: *const ::timespec) -> ::c_int;
     pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
                                    abstime: *const ::timespec) -> ::c_int;
     pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t,
                   options: ::c_int) -> ::c_int;
 
     pub fn glob(pattern: *const ::c_char,
@@ -1255,25 +1153,21 @@ extern {
     pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long);
 
     pub fn telldir(dirp: *mut ::DIR) -> ::c_long;
     pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int)
                   -> ::c_int;
 
     pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int;
 
-    pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
-
     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;
     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 utimensat(dirfd: ::c_int, path: *const ::c_char,
-                     times: *const ::timespec, flag: ::c_int) -> ::c_int;
     pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char;
 
     pub fn bind(socket: ::c_int, address: *const ::sockaddr,
                 address_len: ::socklen_t) -> ::c_int;
 
     pub fn writev(fd: ::c_int,
                   iov: *const ::iovec,
                   iovcnt: ::c_int) -> ::ssize_t;
@@ -1292,67 +1186,9 @@ extern {
                           events: ::c_int, user: ::uintptr_t) -> ::c_int;
     pub fn port_dissociate(port: ::c_int, source: ::c_int, object: ::uintptr_t)
                            -> ::c_int;
     pub fn port_get(port: ::c_int, pe: *mut port_event,
                     timeout: *const ::timespec) -> ::c_int;
     pub fn port_getn(port: ::c_int, pe_list: *mut port_event, max: ::c_uint,
                      nget: *mut ::c_uint, timeout: *const ::timespec)
                      -> ::c_int;
-    pub fn fexecve(fd: ::c_int, argv: *const *const ::c_char,
-                   envp: *const *const ::c_char)
-                   -> ::c_int;
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")]
-    pub fn getgrgid_r(uid: ::uid_t,
-                      grp: *mut ::group,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut ::group) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "sigaltstack$UNIX2003")]
-    #[cfg_attr(target_os = "netbsd", link_name = "__sigaltstack14")]
-    pub fn sigaltstack(ss: *const stack_t,
-                       oss: *mut stack_t) -> ::c_int;
-    pub fn sem_close(sem: *mut sem_t) -> ::c_int;
-    pub fn getdtablesize() -> ::c_int;
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrnam_r")]
-    pub fn getgrnam_r(name: *const ::c_char,
-                      grp: *mut ::group,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut ::group) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "pthread_sigmask$UNIX2003")]
-    pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t,
-                           oldset: *mut sigset_t) -> ::c_int;
-    pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t;
-    pub fn getgrnam(name: *const ::c_char) -> *mut ::group;
-    pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
-    pub fn sem_unlink(name: *const ::c_char) -> ::c_int;
-    pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__getpwnam_r50")]
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwnam_r")]
-    pub fn getpwnam_r(name: *const ::c_char,
-                      pwd: *mut passwd,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut passwd) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid_r50")]
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwuid_r")]
-    pub fn getpwuid_r(uid: ::uid_t,
-                      pwd: *mut passwd,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut passwd) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch ="x86"),
-               link_name = "sigwait$UNIX2003")]
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_sigwait")]
-    pub fn sigwait(set: *const sigset_t,
-                   sig: *mut ::c_int) -> ::c_int;
-    pub fn pthread_atfork(prepare: Option<unsafe extern fn()>,
-                          parent: Option<unsafe extern fn()>,
-                          child: Option<unsafe extern fn()>) -> ::c_int;
-    pub fn getgrgid(gid: ::gid_t) -> *mut ::group;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "popen$UNIX2003")]
-    pub fn popen(command: *const c_char,
-                 mode: *const c_char) -> *mut ::FILE;
 }
--- a/third_party/rust/libc/src/unix/uclibc/mod.rs
+++ b/third_party/rust/libc/src/unix/uclibc/mod.rs
@@ -252,21 +252,16 @@ s! {
         __align: [::c_int; 0],
         #[cfg(not(any(target_arch = "x86_64", target_arch = "powerpc64",
                       target_arch = "mips64", target_arch = "s390x",
                       target_arch = "sparc64")))]
         __align: [::c_long; 0],
         size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T],
     }
 
-    pub struct pthread_rwlockattr_t {
-        __lockkind: ::c_int,
-        __pshared: ::c_int,
-    }
-
     pub struct pthread_cond_t {
         __align: [::c_longlong; 0],
         size: [u8; __SIZEOF_PTHREAD_COND_T],
     }
 
     pub struct pthread_condattr_t {
         __align: [::c_int; 0],
         size: [u8; __SIZEOF_PTHREAD_CONDATTR_T],
@@ -418,24 +413,24 @@ pub const F_DUPFD_CLOEXEC: ::c_int = 103
 
 // TODO(#235): Include file sealing fcntls once we have a way to verify them.
 
 pub const SIGTRAP: ::c_int = 5;
 
 pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0;
 pub const PTHREAD_CREATE_DETACHED: ::c_int = 1;
 
-pub const CLOCK_REALTIME: ::clockid_t = 0;
-pub const CLOCK_MONOTONIC: ::clockid_t = 1;
-pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 2;
-pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 3;
+pub const CLOCK_REALTIME: clockid_t = 0;
+pub const CLOCK_MONOTONIC: clockid_t = 1;
+pub const CLOCK_PROCESS_CPUTIME_ID: clockid_t = 2;
+pub const CLOCK_THREAD_CPUTIME_ID: clockid_t = 3;
 // TODO(#247) Someday our Travis shall have glibc 2.21 (released in Sep
 // 2014.) See also musl/mod.rs
-// pub const CLOCK_SGI_CYCLE: ::clockid_t = 10;
-// pub const CLOCK_TAI: ::clockid_t = 11;
+// pub const CLOCK_SGI_CYCLE: clockid_t = 10;
+// pub const CLOCK_TAI: clockid_t = 11;
 pub const TIMER_ABSTIME: ::c_int = 1;
 
 pub const RLIMIT_CPU: ::c_int = 0;
 pub const RLIMIT_FSIZE: ::c_int = 1;
 pub const RLIMIT_DATA: ::c_int = 2;
 pub const RLIMIT_STACK: ::c_int = 3;
 pub const RLIMIT_CORE: ::c_int = 4;
 pub const RLIMIT_LOCKS: ::c_int = 10;
@@ -573,73 +568,17 @@ pub const EMLINK: ::c_int = 31;
 pub const EPIPE: ::c_int = 32;
 pub const EDOM: ::c_int = 33;
 pub const ERANGE: ::c_int = 34;
 pub const EWOULDBLOCK: ::c_int = EAGAIN;
 
 pub const SCM_RIGHTS: ::c_int = 0x01;
 pub const SCM_CREDENTIALS: ::c_int = 0x02;
 
-// netinet/in.h
-// NOTE: These are in addition to the constants defined in src/unix/mod.rs
-
-// IPPROTO_IP defined in src/unix/mod.rs
-/// Hop-by-hop option header
-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;
-/// for compatibility
-pub const IPPROTO_IPIP: ::c_int = 4;
-// IPPROTO_TCP defined in src/unix/mod.rs
-/// exterior gateway protocol
-pub const IPPROTO_EGP: ::c_int = 8;
-/// pup
-pub const IPPROTO_PUP: ::c_int = 12;
-// IPPROTO_UDP defined in src/unix/mod.rs
-/// xns idp
-pub const IPPROTO_IDP: ::c_int = 22;
-/// tp-4 w/ class negotiation
-pub const IPPROTO_TP: ::c_int = 29;
-/// DCCP
-pub const IPPROTO_DCCP: ::c_int = 33;
-// IPPROTO_IPV6 defined in src/unix/mod.rs
-/// IP6 routing header
-pub const IPPROTO_ROUTING: ::c_int = 43;
-/// IP6 fragmentation header
-pub const IPPROTO_FRAGMENT: ::c_int = 44;
-/// resource reservation
-pub const IPPROTO_RSVP: ::c_int = 46;
-/// General Routing Encap.
-pub const IPPROTO_GRE: ::c_int = 47;
-/// IP6 Encap Sec. Payload
-pub const IPPROTO_ESP: ::c_int = 50;
-/// IP6 Auth Header
-pub const IPPROTO_AH: ::c_int = 51;
-// IPPROTO_ICMPV6 defined in src/unix/mod.rs
-/// IP6 no next header
-pub const IPPROTO_NONE: ::c_int = 59;
-/// IP6 destination option
-pub const IPPROTO_DSTOPTS: ::c_int = 60;
-pub const IPPROTO_MTP: ::c_int = 92;
-pub const IPPROTO_BEETPH: ::c_int = 94;
-/// encapsulation header
-pub const IPPROTO_ENCAP: ::c_int = 98;
-/// Protocol indep. multicast
-pub const IPPROTO_PIM: ::c_int = 103;
-/// IP Payload Comp. Protocol
-pub const IPPROTO_COMP: ::c_int = 108;
-/// SCTP
-pub const IPPROTO_SCTP: ::c_int = 132;
-pub const IPPROTO_MH: ::c_int = 135;
-pub const IPPROTO_UDPLITE: ::c_int = 136;
-pub const IPPROTO_MPLS: ::c_int = 137;
-/// raw IP packet
 pub const IPPROTO_RAW: ::c_int = 255;
-pub const IPPROTO_MAX: ::c_int = 256;
 
 pub const PROT_GROWSDOWN: ::c_int = 0x1000000;
 pub const PROT_GROWSUP: ::c_int = 0x2000000;
 
 pub const MAP_TYPE: ::c_int = 0x000f;
 
 pub const MADV_NORMAL: ::c_int = 0;
 pub const MADV_RANDOM: ::c_int = 1;
@@ -776,26 +715,28 @@ pub const MSG_CONFIRM: ::c_int = 0x800;
 pub const MSG_RST: ::c_int = 0x1000;
 pub const MSG_ERRQUEUE: ::c_int = 0x2000;
 pub const MSG_NOSIGNAL: ::c_int = 0x4000;
 pub const MSG_MORE: ::c_int = 0x8000;
 pub const MSG_WAITFORONE: ::c_int = 0x10000;
 pub const MSG_CMSG_CLOEXEC: ::c_int = 0x40000000;
 
 pub const SOCK_RAW: ::c_int = 3;
+pub const IPPROTO_ICMP: ::c_int = 1;
+pub const IPPROTO_ICMPV6: ::c_int = 58;
+pub const IPPROTO_TCP: ::c_int = 6;
+pub const IPPROTO_IP: ::c_int = 0;
+pub const IPPROTO_IPV6: ::c_int = 41;
 pub const IP_MULTICAST_TTL: ::c_int = 33;
 pub const IP_MULTICAST_LOOP: ::c_int = 34;
 pub const IP_TTL: ::c_int = 2;
 pub const IP_HDRINCL: ::c_int = 3;
 pub const IP_ADD_MEMBERSHIP: ::c_int = 35;
 pub const IP_DROP_MEMBERSHIP: ::c_int = 36;
 
-pub const IPV6_JOIN_GROUP: ::c_int = 20;
-pub const IPV6_LEAVE_GROUP: ::c_int = 21;
-
 pub const TCP_NODELAY: ::c_int = 1;
 pub const TCP_MAXSEG: ::c_int = 2;
 pub const TCP_CORK: ::c_int = 3;
 pub const TCP_KEEPIDLE: ::c_int = 4;
 pub const TCP_KEEPINTVL: ::c_int = 5;
 pub const TCP_KEEPCNT: ::c_int = 6;
 pub const TCP_SYNCNT: ::c_int = 7;
 pub const TCP_LINGER2: ::c_int = 8;
@@ -923,40 +864,32 @@ pub const __WALL: ::c_int = 0x40000000;
 pub const __WCLONE: ::c_int = 0x80000000;
 
 pub const SPLICE_F_MOVE: ::c_uint = 0x01;
 pub const SPLICE_F_NONBLOCK: ::c_uint = 0x02;
 pub const SPLICE_F_MORE: ::c_uint = 0x04;
 pub const SPLICE_F_GIFT: ::c_uint = 0x08;
 
 pub const RTLD_LOCAL: ::c_int = 0;
-pub const RTLD_LAZY: ::c_int = 1;
 
 pub const POSIX_FADV_NORMAL: ::c_int = 0;
 pub const POSIX_FADV_RANDOM: ::c_int = 1;
 pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2;
 pub const POSIX_FADV_WILLNEED: ::c_int = 3;
 
 pub const AT_FDCWD: ::c_int = -100;
 pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x100;
 pub const AT_REMOVEDIR: ::c_int = 0x200;
 pub const AT_SYMLINK_FOLLOW: ::c_int = 0x400;
 
 pub const LOG_CRON: ::c_int = 9 << 3;
 pub const LOG_AUTHPRIV: ::c_int = 10 << 3;
 pub const LOG_FTP: ::c_int = 11 << 3;
 pub const LOG_PERROR: ::c_int = 0x20;
 
-pub const POLLIN: ::c_short = 0x1;
-pub const POLLPRI: ::c_short = 0x2;
-pub const POLLOUT: ::c_short = 0x4;
-pub const POLLERR: ::c_short = 0x8;
-pub const POLLHUP: ::c_short = 0x10;
-pub const POLLNVAL: ::c_short = 0x20;
-
 pub const PIPE_BUF: usize = 4096;
 
 pub const SI_LOAD_SHIFT: ::c_uint = 16;
 
 pub const SIGEV_SIGNAL: ::c_int = 0;
 pub const SIGEV_NONE: ::c_int = 1;
 pub const SIGEV_THREAD: ::c_int = 2;
 
@@ -1478,59 +1411,65 @@ f! {
         let size_in_bits = 8 * mem::size_of_val(&cpuset.bits[0]);
         let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits);
         0 != (cpuset.bits[idx] & (1 << offset))
     }
 
     pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool {
         set1.bits == set2.bits
     }
-
-    pub fn QCMD(cmd: ::c_int, type_: ::c_int) -> ::c_int {
-        (cmd << 8) | (type_ & 0x00ff)
-    }
 }
 
 extern {
+    pub fn getpwnam_r(name: *const ::c_char,
+                      pwd: *mut passwd,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut passwd) -> ::c_int;
+    pub fn getpwuid_r(uid: ::uid_t,
+                      pwd: *mut passwd,
+                      buf: *mut ::c_char,
+                      buflen: ::size_t,
+                      result: *mut *mut passwd) -> ::c_int;
     pub fn fdatasync(fd: ::c_int) -> ::c_int;
     pub fn mincore(addr: *mut ::c_void, len: ::size_t,
                    vec: *mut ::c_uchar) -> ::c_int;
-    pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
-    pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
-    pub fn clock_nanosleep(clk_id: ::clockid_t,
+    pub fn clock_getres(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
+    pub fn clock_gettime(clk_id: clockid_t, tp: *mut ::timespec) -> ::c_int;
+    pub fn clock_nanosleep(clk_id: clockid_t,
                            flags: ::c_int,
                            rqtp: *const ::timespec,
                            rmtp:  *mut ::timespec) -> ::c_int;
-    pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int;
+    pub fn clock_settime(clk_id: clockid_t, tp: *const ::timespec) -> ::c_int;
     pub fn prctl(option: ::c_int, ...) -> ::c_int;
     pub fn pthread_getattr_np(native: ::pthread_t,
                               attr: *mut ::pthread_attr_t) -> ::c_int;
     pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
                                      guardsize: *mut ::size_t) -> ::c_int;
     pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,
                                  stackaddr: *mut *mut ::c_void,
                                  stacksize: *mut ::size_t) -> ::c_int;
     pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
     pub fn setgroups(ngroups: ::size_t,
                      ptr: *const ::gid_t) -> ::c_int;
     pub fn initgroups(user: *const ::c_char, group: ::gid_t) -> ::c_int;
     pub fn sched_setscheduler(pid: ::pid_t,
                               policy: ::c_int,
-                              param: *const ::sched_param) -> ::c_int;
+                              param: *const sched_param) -> ::c_int;
     pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int;
     pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int;
     pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int;
     pub fn epoll_create(size: ::c_int) -> ::c_int;
     pub fn epoll_create1(flags: ::c_int) -> ::c_int;
     pub fn epoll_ctl(epfd: ::c_int,
                      op: ::c_int,
                      fd: ::c_int,
-                     event: *mut ::epoll_event) -> ::c_int;
+                     event: *mut epoll_event) -> ::c_int;
     pub fn epoll_wait(epfd: ::c_int,
-                      events: *mut ::epoll_event,
+                      events: *mut epoll_event,
                       maxevents: ::c_int,
                       timeout: ::c_int) -> ::c_int;
     pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int;
     pub fn mount(src: *const ::c_char,
                  target: *const ::c_char,
                  fstype: *const ::c_char,
                  flags: ::c_ulong,
                  data: *const ::c_void) -> ::c_int;
@@ -1611,17 +1550,17 @@ extern {
                    mode: ::mode_t, dev: dev_t) -> ::c_int;
     pub fn ppoll(fds: *mut ::pollfd,
                  nfds: nfds_t,
                  timeout: *const ::timespec,
                  sigmask: *const sigset_t) -> ::c_int;
     pub fn pthread_condattr_getclock(attr: *const pthread_condattr_t,
                                      clock_id: *mut clockid_t) -> ::c_int;
     pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t,
-                                     clock_id: ::clockid_t) -> ::c_int;
+                                     clock_id: clockid_t) -> ::c_int;
     pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t,
                                        pshared: ::c_int) -> ::c_int;
     pub fn pthread_condattr_getpshared(attr: *const pthread_condattr_t,
                                        pshared: *mut ::c_int) -> ::c_int;
     pub fn sched_getaffinity(pid: ::pid_t,
                              cpusetsize: ::size_t,
                              cpuset: *mut cpu_set_t) -> ::c_int;
     pub fn sched_setaffinity(pid: ::pid_t,
@@ -1633,35 +1572,26 @@ extern {
     pub fn accept4(fd: ::c_int, addr: *mut ::sockaddr, len: *mut ::socklen_t,
                    flg: ::c_int) -> ::c_int;
     pub fn pthread_mutex_timedlock(lock: *mut pthread_mutex_t,
                                    abstime: *const ::timespec) -> ::c_int;
     pub fn pthread_mutexattr_setpshared(attr: *mut pthread_mutexattr_t,
                                         pshared: ::c_int) -> ::c_int;
     pub fn pthread_mutexattr_getpshared(attr: *const pthread_mutexattr_t,
                                         pshared: *mut ::c_int) -> ::c_int;
-    pub fn pthread_rwlockattr_getkind_np(attr: *const pthread_rwlockattr_t,
-                                         val: *mut ::c_int) -> ::c_int;
-    pub fn pthread_rwlockattr_setkind_np(attr: *mut pthread_rwlockattr_t,
-                                         val: ::c_int) -> ::c_int;
-    pub fn pthread_rwlockattr_getpshared(attr: *const pthread_rwlockattr_t,
-                                         val: *mut ::c_int) -> ::c_int;
-    pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t,
-                                         val: ::c_int) -> ::c_int;
     pub fn ptsname_r(fd: ::c_int,
                      buf: *mut ::c_char,
                      buflen: ::size_t) -> ::c_int;
     pub fn clearenv() -> ::c_int;
     pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t,
                   options: ::c_int) -> ::c_int;
 
     pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
 
     pub fn setpwent();
-    pub fn endpwent();
     pub fn getpwent() -> *mut passwd;
     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,
                     mode: mode_t) -> ::c_int;
@@ -1818,75 +1748,16 @@ extern {
                  iov: *const ::iovec,
                  iovcnt: ::c_int) -> ::ssize_t;
 
     pub fn sendmsg(fd: ::c_int,
                    msg: *const ::msghdr,
                    flags: ::c_int) -> ::ssize_t;
     pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int)
                    -> ::ssize_t;
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")]
-    pub fn getgrgid_r(uid: ::uid_t,
-                      grp: *mut ::group,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut ::group) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "sigaltstack$UNIX2003")]
-    #[cfg_attr(target_os = "netbsd", link_name = "__sigaltstack14")]
-    pub fn sigaltstack(ss: *const stack_t,
-                       oss: *mut stack_t) -> ::c_int;
-    pub fn sem_close(sem: *mut sem_t) -> ::c_int;
-    pub fn getdtablesize() -> ::c_int;
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrnam_r")]
-    pub fn getgrnam_r(name: *const ::c_char,
-                      grp: *mut ::group,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut ::group) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "pthread_sigmask$UNIX2003")]
-    pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t,
-                           oldset: *mut sigset_t) -> ::c_int;
-    pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t;
-    pub fn getgrnam(name: *const ::c_char) -> *mut ::group;
-    pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
-    pub fn sem_unlink(name: *const ::c_char) -> ::c_int;
-    pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__getpwnam_r50")]
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwnam_r")]
-    pub fn getpwnam_r(name: *const ::c_char,
-                      pwd: *mut passwd,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut passwd) -> ::c_int;
-    #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid_r50")]
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwuid_r")]
-    pub fn getpwuid_r(uid: ::uid_t,
-                      pwd: *mut passwd,
-                      buf: *mut ::c_char,
-                      buflen: ::size_t,
-                      result: *mut *mut passwd) -> ::c_int;
-    #[cfg_attr(all(target_os = "macos", target_arch ="x86"),
-               link_name = "sigwait$UNIX2003")]
-    #[cfg_attr(target_os = "solaris", link_name = "__posix_sigwait")]
-    pub fn sigwait(set: *const sigset_t,
-                   sig: *mut ::c_int) -> ::c_int;
-    pub fn pthread_atfork(prepare: Option<unsafe extern fn()>,
-                          parent: Option<unsafe extern fn()>,
-                          child: Option<unsafe extern fn()>) -> ::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 getgrgid(gid: ::gid_t) -> *mut ::group;
-    #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
-               link_name = "popen$UNIX2003")]
-    pub fn popen(command: *const c_char,
-                 mode: *const c_char) -> *mut ::FILE;
 }
 
 cfg_if! {
     if #[cfg(target_arch = "mips")] {
         mod mips;
         pub use self::mips::*;
     } else if #[cfg(target_arch = "x86_64")] {
         mod x86_64;
deleted file mode 100644
--- a/third_party/rust/libc/src/unix/uclibc/x86_64/l4re.rs
+++ /dev/null
@@ -1,46 +0,0 @@
-/// L4Re specifics
-/// This module contains definitions required by various L4Re libc backends.
-/// Some of them are formally not part of the libc, but are a dependency of the
-/// libc and hence we should provide them here.
-
-pub type l4_umword_t = ::c_ulong; // Unsigned machine word.
-
-s! {
-    /// CPU sets.
-    pub struct l4_sched_cpu_set_t {
-        // from the L4Re docs
-        /// Combination of granularity and offset.
-        ///
-        /// The granularity defines how many CPUs each bit in map describes.
-        /// The offset is the numer of the first CPU described by the first
-        /// bit in the bitmap.
-        /// offset must be a multiple of 2^graularity.
-        ///
-        /// | MSB              |                 LSB |
-        /// | ---------------- | ------------------- |
-        /// | 8bit granularity | 24bit offset ..     |
-        gran_offset: l4_umword_t ,
-        /// Bitmap of CPUs.
-        map: l4_umword_t ,
-    }
-}
-
-#[cfg(target_os = "l4re")]
-pub struct pthread_attr_t {
-    pub __detachstate: ::c_int,
-    pub __schedpolicy: ::c_int,
-    pub __schedparam: super::__sched_param,
-    pub __inheritsched: ::c_int,
-    pub __scope: ::c_int,
-    pub __guardsize: ::size_t,
-    pub __stackaddr_set: ::c_int,
-    pub __stackaddr: *mut ::c_void, // better don't use it
-    pub __stacksize: ::size_t,
-    // L4Re specifics
-    pub affinity: l4_sched_cpu_set_t,
-    pub create_flags: ::c_uint,
-}
-
-// L4Re requires a min stack size of 64k; that isn't defined in uClibc, but
-// somewhere in the core libraries. uClibc wants 16k, but that's not enough.
-pub const PTHREAD_STACK_MIN: usize = 65536;
--- a/third_party/rust/libc/src/unix/uclibc/x86_64/mod.rs
+++ b/third_party/rust/libc/src/unix/uclibc/x86_64/mod.rs
@@ -1,173 +1,136 @@
-//! Definitions for uclibc on 64bit systems
-//!
+//! Definitions for l4re-uclibc on 64bit systems
+
 pub type blkcnt_t = i64;
 pub type blksize_t = i64;
-pub type clock_t = i64;
 pub type c_char = u8;
 pub type c_long = i64;
 pub type c_ulong = u64;
 pub type fsblkcnt_t = ::c_ulong;
 pub type fsfilcnt_t = ::c_ulong;
 pub type fsword_t = ::c_long;
 pub type ino_t = ::c_ulong;
 pub type nlink_t = ::c_uint;
 pub type off_t = ::c_long;
 pub type rlim_t = c_ulong;
 pub type rlim64_t = u64;
-// [uClibc docs] Note stat64 has the same shape as stat for x86-64.
-pub type stat64 = stat;
 pub type suseconds_t = ::c_long;
 pub type time_t = ::c_int;
 pub type wchar_t = ::c_int;
 
+// ToDo, used?
+//pub type d_ino = ::c_ulong;
 pub type nfds_t = ::c_ulong;
 
 s! {
-    pub struct dirent {
-        pub d_ino: ::ino64_t,
-        pub d_off: ::off64_t,
-        pub d_reclen: u16,
-        pub d_type: u8,
-        pub d_name: [::c_char; 256],
-    }
-
-    pub struct dirent64 {
-        pub d_ino: ::ino64_t,
-        pub d_off: ::off64_t,
-        pub d_reclen: u16,
-        pub d_type: u8,
-        pub d_name: [::c_char; 256],
-    }
-
-    pub struct ipc_perm {
-        pub __key: ::key_t,
-        pub uid: ::uid_t,
-        pub gid: ::gid_t,
-        pub cuid: ::uid_t,
-        pub cgid: ::gid_t,
-        pub mode: ::c_ushort, // read / write
-        __pad1: ::c_ushort,
-        pub __seq: ::c_ushort,
-        __pad2: ::c_ushort,
-        __unused1: ::c_ulong,
-        __unused2: ::c_ulong
+    // ------------------------------------------------------------
+    // networking
+    pub struct in_addr {
+        pub s_addr: in_addr_t,
     }
 
-    #[cfg(not(target_os = "l4re"))]
-    pub struct pthread_attr_t {
-        __detachstate: ::c_int,
-        __schedpolicy: ::c_int,
-        __schedparam: __sched_param,
-        __inheritsched: ::c_int,
-        __scope: ::c_int,
-        __guardsize: ::size_t,
-        __stackaddr_set: ::c_int,
-        __stackaddr: *mut ::c_void, // better don't use it
-        __stacksize: ::size_t,
-    }
-
-    pub struct __sched_param {
-        __sched_priority: ::c_int,
-    }
-
-    pub struct siginfo_t {
-        si_signo: ::c_int, // signal number
-        si_errno: ::c_int, // if not zero: error value of signal, see errno.h
-        si_code: ::c_int,  // signal code
-        pub _pad: [::c_int; 28], // unported union
-        _align: [usize; 0],
-    }
-
-    pub struct shmid_ds {
-        pub shm_perm: ::ipc_perm,
-        pub shm_segsz: ::size_t, // segment size in bytes
-        pub shm_atime: ::time_t, // time of last shmat()
-        pub shm_dtime: ::time_t,
-        pub shm_ctime: ::time_t,
-        pub shm_cpid: ::pid_t,
-        pub shm_lpid: ::pid_t,
-        pub shm_nattch: ::shmatt_t,
-        __unused1: ::c_ulong,
-        __unused2: ::c_ulong
-    }
-
-    pub struct msqid_ds {
-        pub msg_perm: ::ipc_perm,
-        pub msg_stime: ::time_t,
-        pub msg_rtime: ::time_t,
-        pub msg_ctime: ::time_t,
-        __msg_cbytes: ::c_ulong,
-        pub msg_qnum: ::msgqnum_t,
-        pub msg_qbytes: ::msglen_t,
-        pub msg_lspid: ::pid_t,
-        pub msg_lrpid: ::pid_t,
-        __ignored1: ::c_ulong,
-        __ignored2: ::c_ulong,
+    pub struct in6_addr {
+        pub s6_addr: [u8; 16],
+        __align: [u32; 0],
     }
 
     pub struct sockaddr {
-        pub sa_family: ::sa_family_t,
+        pub sa_family: sa_family_t,
         pub sa_data: [::c_char; 14],
     }
 
     pub struct sockaddr_in {
-        pub sin_family: ::sa_family_t,
+        pub sin_family: sa_family_t,
         pub sin_port: ::in_port_t,
         pub sin_addr: ::in_addr,
         pub sin_zero: [u8; 8],
     }
 
     pub struct sockaddr_in6 {
-        pub sin6_family: ::sa_family_t,
-        pub sin6_port: ::in_port_t,
+        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,
     }
 
     // ------------------------------------------------------------
     // definitions below are *unverified* and might **break** the software
-//    pub struct in_addr {
-//        pub s_addr: in_addr_t,
-//    }
-//
-//    pub struct in6_addr {
-//        pub s6_addr: [u8; 16],
-//        __align: [u32; 0],
-//    }
-
-    pub struct stat {
+    pub struct stat { // ToDo
         pub st_dev: ::c_ulong,
+        st_pad1: [::c_long; 2],
         pub st_ino: ::ino_t,
-        // According to uclibc/libc/sysdeps/linux/x86_64/bits/stat.h, order of
-        // nlink and mode are swapped on 64 bit systems.
+        pub st_mode: ::mode_t,
         pub st_nlink: ::nlink_t,
-        pub st_mode: ::mode_t,
         pub st_uid: ::uid_t,
         pub st_gid: ::gid_t,
-        pub st_rdev: ::c_ulong, // dev_t
-        pub st_size: off_t, // file size
-        pub st_blksize: ::blksize_t,
-        pub st_blocks: ::blkcnt_t,
+        pub st_rdev: u64,
+        pub st_pad2: [u64; 1],
+        pub st_size: off_t,
+        st_pad3: ::c_long,
         pub st_atime: ::time_t,
-        pub st_atime_nsec: ::c_ulong,
+        pub st_atime_nsec: ::c_long,
         pub st_mtime: ::time_t,
-        pub st_mtime_nsec: ::c_ulong,
+        pub st_mtime_nsec: ::c_long,
         pub st_ctime: ::time_t,
-        pub st_ctime_nsec: ::c_ulong,
-        st_pad4: [::c_long; 3]
+        pub st_ctime_nsec: ::c_long,
+        pub st_blksize: ::blksize_t,
+        st_pad4: ::c_long,
+        pub st_blocks: ::blkcnt_t,
+        st_pad5: [::c_long; 7],
     }
 
-    pub struct sigaction {
-        pub sa_handler: ::sighandler_t,
-        pub sa_flags: ::c_ulong,
-        pub sa_restorer: *mut ::c_void,
+    pub struct statvfs { // ToDo: broken
+        pub f_bsize: ::c_ulong,
+        pub f_frsize: ::c_ulong,
+        pub f_blocks: ::fsblkcnt_t,
+        pub f_bfree: ::fsblkcnt_t,
+        pub f_bavail: ::fsblkcnt_t,
+        pub f_files: ::fsfilcnt_t,
+        pub f_ffree: ::fsfilcnt_t,
+        pub f_favail: ::fsfilcnt_t,
+        #[cfg(target_endian = "little")]
+        pub f_fsid: ::c_ulong,
+        #[cfg(target_pointer_width = "32")]
+        __f_unused: ::c_int,
+        #[cfg(target_endian = "big")]
+        pub f_fsid: ::c_ulong,
+        pub f_flag: ::c_ulong,
+        pub f_namemax: ::c_ulong,
+        __f_spare: [::c_int; 6],
+    }
+
+    pub struct dirent { // Todo
+        pub d_ino: ino_64_t,
+        pub d_off: off64_t,
+        d_reclen: u16,
+        pub d_type: u8,
+        pub d_name: [i8; 256],
+    }
+
+    pub struct dirent64 { //
+        pub d_ino: ino64_t,
+        pub d_off: off64_t,
+        pub d_reclen: u16,
+        pub d_type: u8,
+        pub d_name: [i8; 256],
+    }
+
+    pub struct pthread_attr_t { // ToDo
+        __size: [u64; 7]
+    }
+
+    pub struct sigaction { // TODO!!
+        pub sa_sigaction: ::sighandler_t,
         pub sa_mask: ::sigset_t,
+        #[cfg(target_arch = "sparc64")]
+        __reserved0: ::c_int,
+        pub sa_flags: ::c_int,
+        _restorer: *mut ::c_void,
     }
 
     pub struct stack_t { // ToDo
         pub ss_sp: *mut ::c_void,
         pub ss_flags: ::c_int,
         pub ss_size: ::size_t
     }
 
@@ -282,76 +245,68 @@ s! {
         pub gl_flags: ::c_int,
         __unused1: *mut ::c_void,
         __unused2: *mut ::c_void,
         __unused3: *mut ::c_void,
         __unused4: *mut ::c_void,
         __unused5: *mut ::c_void,
     }
 
+    pub struct stat64 { // ToDo
+        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 rlimit64 { // ToDo
         pub rlim_cur: rlim64_t,
         pub rlim_max: rlim64_t,
     }
 
     pub struct cpu_set_t { // ToDo
         #[cfg(target_pointer_width = "32")]
         bits: [u32; 32],
         #[cfg(target_pointer_width = "64")]
         bits: [u64; 16],
     }
 
+    pub struct timespec { // ToDo
+        tv_sec: time_t, // seconds
+        tv_nsec: ::c_ulong, // nanoseconds
+    }
+
     pub struct fsid_t { // ToDo
         __val: [::c_int; 2],
     }
 }
 
 // constants
-pub const EADDRINUSE: ::c_int = 98; // Address already in use
-pub const EADDRNOTAVAIL: ::c_int = 99; // Cannot assign requested address
-pub const ECONNABORTED: ::c_int = 103; // Software caused connection abort
-pub const ECONNREFUSED: ::c_int = 111; // Connection refused
-pub const ECONNRESET: ::c_int = 104; // Connection reset by peer
-pub const EDEADLK: ::c_int = 35; // Resource deadlock would occur
-pub const ENOSYS: ::c_int = 38; // Function not implemented
-pub const ENOTCONN: ::c_int = 107; // Transport endpoint is not connected
-pub const ETIMEDOUT: ::c_int = 110; // connection timed out
-pub const O_APPEND: ::c_int = 02000;
-pub const O_ACCMODE: ::c_int = 0003;
 pub const O_CLOEXEC: ::c_int = 0x80000;
-pub const O_CREAT: ::c_int = 0100;
 pub const O_DIRECTORY: ::c_int = 0200000;
-pub const O_EXCL: ::c_int = 0200;
-pub const O_NONBLOCK: ::c_int = 04000;
-pub const O_TRUNC: ::c_int = 01000;
 pub const NCCS: usize = 32;
-pub const SIG_SETMASK: ::c_int = 2; // Set the set of blocked signals
-pub const PTHREAD_STACK_MIN: usize = 16384;
 pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
 pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
-pub const SO_BROADCAST: ::c_int = 6;
-pub const SOCK_DGRAM: ::c_int = 2; // connectionless, unreliable datagrams
-pub const SOCK_STREAM: ::c_int = 1; // …/common/bits/socket_type.h
-pub const SO_ERROR: ::c_int = 4;
-pub const SOL_SOCKET: ::c_int = 1;
-pub const SO_RCVTIMEO: ::c_int = 20;
-pub const SO_REUSEADDR: ::c_int = 2;
-pub const SO_SNDTIMEO: ::c_int = 21;
 pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
 pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
 pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
 pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
-pub const RLIM_INFINITY: u64 = 0xffffffffffffffff;
 pub const __SIZEOF_PTHREAD_COND_T: usize = 48;
 pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
 pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
 
 extern {
     pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
 }
-
-cfg_if! {
-    if #[cfg(target_os = "l4re")] {
-        mod l4re;
-        pub use self::l4re::*;
-    } else { }
-}
-
--- a/third_party/rust/libc/src/windows.rs
+++ b/third_party/rust/libc/src/windows.rs
@@ -38,28 +38,16 @@ s! {
     }
 
     // note that this is called utimbuf64 in Windows
     pub struct utimbuf {
         pub actime: time64_t,
         pub modtime: time64_t,
     }
 
-    pub struct tm {
-        tm_sec: ::c_int,
-        tm_min: ::c_int,
-        tm_hour: ::c_int,
-        tm_mday: ::c_int,
-        tm_mon: ::c_int,
-        tm_year: ::c_int,
-        tm_wday: ::c_int,
-        tm_yday: ::c_int,
-        tm_isdst: ::c_int,
-    }
-
     pub struct timeval {
         pub tv_sec: c_long,
         pub tv_usec: c_long,
     }
 
     pub struct timespec {
         pub tv_sec: time_t,
         pub tv_nsec: c_long,
@@ -153,18 +141,17 @@ pub const EDEADLK: ::c_int = 36;
 pub const EDEADLOCK: ::c_int = 36;
 pub const ENAMETOOLONG: ::c_int = 38;
 pub const ENOLCK: ::c_int = 39;
 pub const ENOSYS: ::c_int = 40;
 pub const ENOTEMPTY: ::c_int = 41;
 pub const EILSEQ: ::c_int = 42;
 pub const STRUNCATE: ::c_int = 80;
 
-// inline comment below appeases style checker
-#[cfg(all(target_env = "msvc", feature = "stdbuild"))] // " if "
+#[cfg(all(target_env = "msvc", stdbuild))] // " if " -- appease style checker
 #[link(name = "msvcrt", cfg(not(target_feature = "crt-static")))]
 #[link(name = "libcmt", cfg(target_feature = "crt-static"))]
 extern {}
 
 extern {
     #[link_name = "_chmod"]
     pub fn chmod(path: *const c_char, mode: ::c_int) -> ::c_int;
     #[link_name = "_wchmod"]
deleted file mode 100644
--- a/third_party/rust/matches-0.1.4/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{"Cargo.toml":"8bbbe858562332a57f5f5551b427e79874ae3c3df52766df61860871288e827a","LICENSE":"d7b49708075b5f43f8e108464f1970c8c66fa8b6afce4f9c944da3af77cc1460","lib.rs":"d927e99fc4fd88b0e30b44580384b411e63bc504e9953ac7cc85029437372266"},"package":"efd7622e3022e1a6eaa602c4cea8912254e5582c9c692e9167714182244801b1"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/matches-0.1.4/Cargo.toml
+++ /dev/null
@@ -1,12 +0,0 @@
-[package]
-name = "matches"
-version = "0.1.4"
-authors = ["Simon Sapin <simon.sapin@exyr.org>"]
-license = "MIT"
-repository = "https://github.com/SimonSapin/rust-std-candidates"
-description = "A macro to evaluate, as a boolean, whether an expression matches a pattern."
-
-[lib]
-name = "matches"
-path = "lib.rs"
-doctest = false
deleted file mode 100644
--- a/third_party/rust/matches-0.1.4/LICENSE
+++ /dev/null
@@ -1,25 +0,0 @@
-Copyright (c) 2014-2016 Simon Sapin
-
-Permission is hereby granted, free of charge, to any
-person obtaining a copy of this software and associated
-documentation files (the "Software"), to deal in the
-Software without restriction, including without
-limitation the rights to use, copy, modify, merge,
-publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software
-is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice
-shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
-ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
-TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
deleted file mode 100644
--- a/third_party/rust/matches-0.1.4/lib.rs
+++ /dev/null
@@ -1,62 +0,0 @@
-#[macro_export]
-macro_rules! matches {
-    ($expression:expr, $($pattern:tt)+) => {
-        _matches_tt_as_expr_hack! {
-            match $expression {
-                $($pattern)+ => true,
-                _ => false
-            }
-        }
-    }
-}
-
-/// Work around "error: unexpected token: `an interpolated tt`", whatever that means.
-#[macro_export]
-macro_rules! _matches_tt_as_expr_hack {
-    ($value:expr) => ($value)
-}
-
-#[macro_export]
-macro_rules! assert_matches {
-    ($expression:expr, $($pattern:tt)+) => {
-        _matches_tt_as_expr_hack! {
-            match $expression {
-                $($pattern)+ => (),
-                ref e => panic!("assertion failed: `{:?}` does not match `{}`", e, stringify!($($pattern)+)),
-            }
-        }
-    }
-}
-
-#[macro_export]
-macro_rules! debug_assert_matches {
-    ($($arg:tt)*) => (if cfg!(debug_assertions) { assert_matches!($($arg)*); })
-}
-
-#[test]
-fn matches_works() {
-    let foo = Some("-12");
-    assert!(matches!(foo, Some(bar) if
-        matches!(bar.as_bytes()[0], b'+' | b'-') &&
-        matches!(bar.as_bytes()[1], b'0'...b'9')
-    ));
-}
-
-#[test]
-fn assert_matches_works() {
-    let foo = Some("-12");
-    assert_matches!(foo, Some(bar) if
-        matches!(bar.as_bytes()[0], b'+' | b'-') &&
-        matches!(bar.as_bytes()[1], b'0'...b'9')
-    );
-}
-
-#[test]
-#[should_panic(expected = "assertion failed: `Some(\"-AB\")` does not match ")]
-fn assert_matches_panics() {
-    let foo = Some("-AB");
-    assert_matches!(foo, Some(bar) if
-        matches!(bar.as_bytes()[0], b'+' | b'-') &&
-        matches!(bar.as_bytes()[1], b'0'...b'9')
-    );
-}
--- a/third_party/rust/matches/.cargo-checksum.json
+++ b/third_party/rust/matches/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"99f3240f188218fe7890b29ee50df780298ea63ecd5861b88cd68844a3f4b8c9","LICENSE":"d7b49708075b5f43f8e108464f1970c8c66fa8b6afce4f9c944da3af77cc1460","lib.rs":"e5af1e84cfb67b1466d75c586efe31cae68b1ddf6015df2589ce18c23bd09bdc"},"package":"100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376"}
\ No newline at end of file
+{"files":{"Cargo.toml":"8bbbe858562332a57f5f5551b427e79874ae3c3df52766df61860871288e827a","LICENSE":"d7b49708075b5f43f8e108464f1970c8c66fa8b6afce4f9c944da3af77cc1460","lib.rs":"d927e99fc4fd88b0e30b44580384b411e63bc504e9953ac7cc85029437372266"},"package":"efd7622e3022e1a6eaa602c4cea8912254e5582c9c692e9167714182244801b1"}
\ No newline at end of file
--- a/third_party/rust/matches/Cargo.toml
+++ b/third_party/rust/matches/Cargo.toml
@@ -1,12 +1,12 @@
 [package]
 name = "matches"
-version = "0.1.6"
+version = "0.1.4"
 authors = ["Simon Sapin <simon.sapin@exyr.org>"]
 license = "MIT"
 repository = "https://github.com/SimonSapin/rust-std-candidates"
 description = "A macro to evaluate, as a boolean, whether an expression matches a pattern."
-documentation = "https://docs.rs/matches/"
 
 [lib]
 name = "matches"
 path = "lib.rs"
+doctest = false
--- a/third_party/rust/matches/lib.rs
+++ b/third_party/rust/matches/lib.rs
@@ -1,106 +1,38 @@
-/// Check if an expression matches a refutable pattern.
-///
-/// Syntax: `matches!(` *expression* `,` *pattern* `)`
-///
-/// Return a boolean, true if the expression matches the pattern, false otherwise.
-///
-/// # Examples
-///
-/// ```
-/// #[macro_use]
-/// extern crate matches;
-///
-/// pub enum Foo<T> {
-///     A,
-///     B(T),
-/// }
-///
-/// impl<T> Foo<T> {
-///     pub fn is_a(&self) -> bool {
-///         matches!(*self, Foo::A)
-///     }
-///
-///     pub fn is_b(&self) -> bool {
-///         matches!(*self, Foo::B(_))
-///     }
-/// }
-///
-/// # fn main() { }
-/// ```
 #[macro_export]
 macro_rules! matches {
     ($expression:expr, $($pattern:tt)+) => {
         _matches_tt_as_expr_hack! {
             match $expression {
                 $($pattern)+ => true,
                 _ => false
             }
         }
     }
 }
 
 /// Work around "error: unexpected token: `an interpolated tt`", whatever that means.
-#[doc(hidden)]
 #[macro_export]
 macro_rules! _matches_tt_as_expr_hack {
     ($value:expr) => ($value)
 }
 
-/// Assert that an expression matches a refutable pattern.
-///
-/// Syntax: `assert_matches!(` *expression* `,` *pattern* `)`
-///
-/// Panic with a message that shows the expression if it does not match the
-/// pattern.
-///
-/// # Examples
-///
-/// ```
-/// #[macro_use]
-/// extern crate matches;
-///
-/// fn main() {
-///     let data = [1, 2, 3];
-///     assert_matches!(data.get(1), Some(_));
-/// }
-/// ```
 #[macro_export]
 macro_rules! assert_matches {
     ($expression:expr, $($pattern:tt)+) => {
         _matches_tt_as_expr_hack! {
             match $expression {
                 $($pattern)+ => (),
                 ref e => panic!("assertion failed: `{:?}` does not match `{}`", e, stringify!($($pattern)+)),
             }
         }
     }
 }
 
-/// Assert that an expression matches a refutable pattern using debug assertions.
-///
-/// Syntax: `debug_assert_matches!(` *expression* `,` *pattern* `)`
-///
-/// If debug assertions are enabled, panic with a message that shows the
-/// expression if it does not match the pattern.
-///
-/// When debug assertions are not enabled, this macro does nothing.
-///
-/// # Examples
-///
-/// ```
-/// #[macro_use]
-/// extern crate matches;
-///
-/// fn main() {
-///     let data = [1, 2, 3];
-///     debug_assert_matches!(data.get(1), Some(_));
-/// }
-/// ```
 #[macro_export]
 macro_rules! debug_assert_matches {
     ($($arg:tt)*) => (if cfg!(debug_assertions) { assert_matches!($($arg)*); })
 }
 
 #[test]
 fn matches_works() {
     let foo = Some("-12");
deleted file mode 100644
--- a/third_party/rust/memchr-1.0.1/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".travis.yml":"7c44542bc6662b5af4f15a98b2bcf052a57190922eb280bce93688785c31e323","COPYING":"01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f","Cargo.toml":"5413b7fd49541b0fd15a0719f9b1f052c5c965ae3cdee53258a87557ad981e8b","LICENSE-MIT":"0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f","Makefile":"a45a128685a2ae7d4fa39d310786674417ee113055ef290a11f88002285865fc","README.md":"74e385c51a2402527a61a500d66e509fea97961f15bfffab85040064e576fe31","UNLICENSE":"7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c","appveyor.yml":"b5c1a28f805854370f24e530df912764a9520f4581b33da090f44cec0eef181c","benches/bench.rs":"87cfb76154c3c322691201c6f5649b37665ed8bf1cf303bca971309a4eef6b61","ctags.rust":"3d128d3cc59f702e68953ba2fe6c3f46bc6991fc575308db060482d5da0c79f3","session.vim":"95cb1d7caf0ff7fbe76ec911988d908ddd883381c925ba64b537695bc9f021c4","src/lib.rs":"4c0d116ddfdb0fd4130b4c5690671760401937d4108b1d913a17c3a6fde776b1"},"package":"1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/memchr-1.0.1/.travis.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-language: rust
-rust:
-  - 1.12.0
-  - stable
-  - beta
-  - nightly
-script:
-  - cargo build --verbose --no-default-features
-  - cargo build --verbose
-  - cargo test --verbose
-  - cargo doc
-  - if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
-      cargo bench --verbose;
-    fi
deleted file mode 100644
--- a/third_party/rust/memchr-1.0.1/COPYING
+++ /dev/null
@@ -1,3 +0,0 @@
-This project is dual-licensed under the Unlicense and MIT licenses.
-
-You may use this code under the terms of either license.
deleted file mode 100644
--- a/third_party/rust/memchr-1.0.1/Cargo.toml
+++ /dev/null
@@ -1,28 +0,0 @@
-[package]
-name = "memchr"
-version = "1.0.1"  #:version
-authors = ["Andrew Gallant <jamslam@gmail.com>", "bluss"]
-description = "Safe interface to memchr."
-documentation = "https://docs.rs/memchr/"
-homepage = "https://github.com/BurntSushi/rust-memchr"
-repository = "https://github.com/BurntSushi/rust-memchr"
-readme = "README.md"
-keywords = ["memchr", "char", "scan", "strchr", "string"]
-license = "Unlicense/MIT"
-
-[lib]
-name = "memchr"
-bench = false
-
-[features]
-default = ["use_std"]
-use_std = ["libc/use_std"]
-
-[dependencies]
-libc = { version = "0.2.18", default-features = false }
-
-[dev-dependencies]
-quickcheck = "0.4.1"
-
-[profile.test]
-opt-level = 3
deleted file mode 100644
--- a/third_party/rust/memchr-1.0.1/LICENSE-MIT
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Andrew Gallant
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
deleted file mode 100644
--- a/third_party/rust/memchr-1.0.1/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-all:
-	echo Nothing to do...
-
-ctags:
-	ctags --recurse --options=ctags.rust --languages=Rust
-
-docs:
-	cargo doc
-	in-dir ./target/doc fix-perms
-	rscp ./target/doc/* gopher:~/www/burntsushi.net/rustdoc/
-
-push:
-	git push origin master
-	git push github master
deleted file mode 100644
--- a/third_party/rust/memchr-1.0.1/README.md
+++ /dev/null
@@ -1,36 +0,0 @@
-This crate provides a safe interface `libc`'s `memchr` and `memrchr`.
-This crate also provides fallback implementations when either function is
-unavailable.
-
-[![Build status](https://api.travis-ci.org/BurntSushi/rust-memchr.png)](https://travis-ci.org/BurntSushi/rust-memchr)
-[![Build status](https://ci.appveyor.com/api/projects/status/8i9484t8l4w7uql0/branch/master?svg=true)](https://ci.appveyor.com/project/BurntSushi/rust-memchr/branch/master)
-[![](http://meritbadge.herokuapp.com/memchr)](https://crates.io/crates/memchr)
-
-Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org).
-
-
-### Documentation
-
-[https://docs.rs/memchr](https://docs.rs/memchr)
-
-### no_std
-
-memchr links to the standard library by default, but you can disable the
-`use_std` feature if you want to use it in a `#![no_std]` crate:
-
-```toml
-[dependencies]
-memchr = { version = "1.0", default-features = false }
-```
-
-### Performance
-
-On my system (Linux/amd64), `memchr` is about an order of magnitude faster than
-the more idiomatic `haystack.iter().position(|&b| b == needle)`:
-
-```
-test iterator          ... bench:       5,280 ns/iter (+/- 13) = 1893 MB/s
-test iterator_reversed ... bench:       5,271 ns/iter (+/- 7) = 1897 MB/s
-test libc_memchr       ... bench:         202 ns/iter (+/- 0) = 49504 MB/s
-test libc_memrchr      ... bench:         197 ns/iter (+/- 1) = 50761 MB/s
-```
deleted file mode 100644
--- a/third_party/rust/memchr-1.0.1/UNLICENSE
+++ /dev/null
@@ -1,24 +0,0 @@
-This is free and unencumbered software released into the public domain.
-
-Anyone is free to copy, modify, publish, use, compile, sell, or
-distribute this software, either in source code form or as a compiled
-binary, for any purpose, commercial or non-commercial, and by any
-means.
-
-In jurisdictions that recognize copyright laws, the author or authors
-of this software dedicate any and all copyright interest in the
-software to the public domain. We make this dedication for the benefit
-of the public at large and to the detriment of our heirs and
-successors. We intend this dedication to be an overt act of
-relinquishment in perpetuity of all present and future rights to this
-software under copyright law.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-For more information, please refer to <http://unlicense.org/>
deleted file mode 100644
--- a/third_party/rust/memchr-1.0.1/appveyor.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-environment:
-  matrix:
-  - TARGET: x86_64-pc-windows-msvc
-  - TARGET: i686-pc-windows-msvc
-  - TARGET: i686-pc-windows-gnu
-install:
-  - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe"
-  - rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
-  - SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin
-  - SET PATH=%PATH%;C:\MinGW\bin
-  - rustc -V
-  - cargo -V
-
-build: false
-
-test_script:
-  - cargo build --verbose
-  - cargo test --verbose
-  - cargo bench --verbose
deleted file mode 100644
--- a/third_party/rust/memchr-1.0.1/benches/bench.rs
+++ /dev/null
@@ -1,117 +0,0 @@
-#![feature(test)]
-
-extern crate memchr;
-extern crate test;
-
-use std::iter;
-
-fn bench_data() -> Vec<u8> { iter::repeat(b'z').take(10000).collect() }
-
-#[bench]
-fn iterator_memchr(b: &mut test::Bencher) {
-    let haystack = bench_data();
-    let needle = b'a';
-    b.iter(|| {
-        assert!(haystack.iter().position(|&b| b == needle).is_none());
-    });
-    b.bytes = haystack.len() as u64;
-}
-
-#[bench]
-fn optimized_memchr(b: &mut test::Bencher) {
-    let haystack = bench_data();
-    let needle = b'a';
-    b.iter(|| {
-        assert!(memchr::memchr(needle, &haystack).is_none());
-    });
-    b.bytes = haystack.len() as u64;
-}
-
-#[bench]
-fn iterator_memrchr(b: &mut test::Bencher) {
-    let haystack = bench_data();
-    let needle = b'a';
-    b.iter(|| {
-        assert!(haystack.iter().rposition(|&b| b == needle).is_none());
-    });
-    b.bytes = haystack.len() as u64;
-}
-
-#[bench]
-fn optimized_memrchr(b: &mut test::Bencher) {
-    let haystack = bench_data();
-    let needle = b'a';
-    b.iter(|| {
-        assert!(memchr::memrchr(needle, &haystack).is_none());
-    });
-    b.bytes = haystack.len() as u64;
-}
-
-#[bench]
-fn iterator_memchr2(b: &mut test::Bencher) {
-    let haystack = bench_data();
-    let (needle1, needle2) = (b'a', b'b');
-    b.iter(|| {
-        assert!(haystack.iter().position(|&b| {
-            b == needle1 || b == needle2
-        }).is_none());
-    });
-    b.bytes = haystack.len() as u64;
-}
-
-#[bench]
-fn manual_memchr2(b: &mut test::Bencher) {
-    fn find_singles(
-        sparse: &[bool],
-        text: &[u8],
-    ) -> Option<(usize, usize)> {
-        for (hi, &b) in text.iter().enumerate() {
-            if sparse[b as usize] {
-                return Some((hi, hi+1));
-            }
-        }
-        None
-    }
-
-    let haystack = bench_data();
-    let mut sparse = vec![false; 256];
-    sparse[b'a' as usize] = true;
-    sparse[b'b' as usize] = true;
-    b.iter(|| {
-        assert!(find_singles(&sparse, &haystack).is_none());
-    });
-    b.bytes = haystack.len() as u64;
-}
-
-#[bench]
-fn optimized_memchr2(b: &mut test::Bencher) {
-    let haystack = bench_data();
-    let (needle1, needle2) = (b'a', b'b');
-    b.iter(|| {
-        assert!(memchr::memchr2(needle1, needle2, &haystack).is_none());
-    });
-    b.bytes = haystack.len() as u64;
-}
-
-#[bench]
-fn iterator_memchr3(b: &mut test::Bencher) {
-    let haystack = bench_data();
-    let (needle1, needle2, needle3) = (b'a', b'b', b'c');
-    b.iter(|| {
-        assert!(haystack.iter().position(|&b| {
-            b == needle1 || b == needle2 || b == needle3
-        }).is_none());
-    });
-    b.bytes = haystack.len() as u64;
-}
-
-#[bench]
-fn optimized_memchr3(b: &mut test::Bencher) {
-    let haystack = bench_data();
-    let (needle1, needle2, needle3) = (b'a', b'b', b'c');
-    b.iter(|| {
-        assert!(memchr::memchr3(
-            needle1, needle2, needle3, &haystack).is_none());
-    });
-    b.bytes = haystack.len() as u64;
-}
deleted file mode 100644
--- a/third_party/rust/memchr-1.0.1/ctags.rust
+++ /dev/null
@@ -1,11 +0,0 @@
---langdef=Rust
---langmap=Rust:.rs
---regex-Rust=/^[ \t]*(#\[[^\]]\][ \t]*)*(pub[ \t]+)?(extern[ \t]+)?("[^"]+"[ \t]+)?(unsafe[ \t]+)?fn[ \t]+([a-zA-Z0-9_]+)/\6/f,functions,function definitions/
---regex-Rust=/^[ \t]*(pub[ \t]+)?type[ \t]+([a-zA-Z0-9_]+)/\2/T,types,type definitions/
---regex-Rust=/^[ \t]*(pub[ \t]+)?enum[ \t]+([a-zA-Z0-9_]+)/\2/g,enum,enumeration names/
---regex-Rust=/^[ \t]*(pub[ \t]+)?struct[ \t]+([a-zA-Z0-9_]+)/\2/s,structure names/
---regex-Rust=/^[ \t]*(pub[ \t]+)?mod[ \t]+([a-zA-Z0-9_]+)/\2/m,modules,module names/
---regex-Rust=/^[ \t]*(pub[ \t]+)?static[ \t]+([a-zA-Z0-9_]+)/\2/c,consts,static constants/
---regex-Rust=/^[ \t]*(pub[ \t]+)?trait[ \t]+([a-zA-Z0-9_]+)/\2/t,traits,traits/
---regex-Rust=/^[ \t]*(pub[ \t]+)?impl([ \t\n]+<.*>)?[ \t]+([a-zA-Z0-9_]+)/\3/i,impls,trait implementations/
---regex-Rust=/^[ \t]*macro_rules![ \t]+([a-zA-Z0-9_]+)/\1/d,macros,macro definitions/
deleted file mode 100644
--- a/third_party/rust/memchr-1.0.1/session.vim
+++ /dev/null
@@ -1,1 +0,0 @@
-au BufWritePost *.rs silent!make ctags > /dev/null 2>&1
deleted file mode 100644
--- a/third_party/rust/memchr-1.0.1/src/lib.rs
+++ /dev/null
@@ -1,877 +0,0 @@
-/*!
-This crate defines two functions, `memchr` and `memrchr`, which expose a safe interface
-to the corresponding functions in `libc`.
-*/
-
-#![deny(missing_docs)]
-#![allow(unused_imports)]
-
-#![cfg_attr(not(feature = "use_std"), no_std)]
-
-#[cfg(all(test, not(feature = "use_std")))]
-#[macro_use]
-extern crate std;
-
-extern crate libc;
-
-use libc::c_void;
-use libc::{c_int, size_t};
-
-#[cfg(feature = "use_std")]
-use std::cmp;
-#[cfg(not(feature = "use_std"))]
-use core::cmp;
-
-const LO_U64: u64 = 0x0101010101010101;
-const HI_U64: u64 = 0x8080808080808080;
-
-// use truncation
-const LO_USIZE: usize = LO_U64 as usize;
-const HI_USIZE: usize = HI_U64 as usize;
-
-#[cfg(target_pointer_width = "32")]
-const USIZE_BYTES: usize = 4;
-#[cfg(target_pointer_width = "64")]
-const USIZE_BYTES: usize = 8;
-
-/// Return `true` if `x` contains any zero byte.
-///
-/// From *Matters Computational*, J. Arndt
-///
-/// "The idea is to subtract one from each of the bytes and then look for
-/// bytes where the borrow propagated all the way to the most significant
-/// bit."
-#[inline]
-fn contains_zero_byte(x: usize) -> bool {
-    x.wrapping_sub(LO_USIZE) & !x & HI_USIZE != 0
-}
-
-#[cfg(target_pointer_width = "32")]
-#[inline]
-fn repeat_byte(b: u8) -> usize {
-    let mut rep = (b as usize) << 8 | b as usize;
-    rep = rep << 16 | rep;
-    rep
-}
-
-#[cfg(target_pointer_width = "64")]
-#[inline]
-fn repeat_byte(b: u8) -> usize {
-    let mut rep = (b as usize) << 8 | b as usize;
-    rep = rep << 16 | rep;
-    rep = rep << 32 | rep;
-    rep
-}
-
-/// An iterator for memchr
-pub struct Memchr<'a> {
-    needle: u8,
-    // The haystack to iterate over
-    haystack: &'a [u8],
-    // The index
-    position: usize,
-    rposition: usize,
-}
-
-impl<'a> Memchr<'a> {
-    /// Creates a new iterator that yields all positions of needle in haystack.
-    pub fn new(needle: u8, haystack: &[u8]) -> Memchr {
-        Memchr {
-            needle: needle,
-            haystack: haystack,
-            position: 0,
-            rposition: 0,
-        }
-    }
-}
-
-impl<'a> Iterator for Memchr<'a> {
-    type Item = usize;
-
-    fn next(&mut self) -> Option<usize> {
-        let search_result = memchr(self.needle, &self.haystack);
-        match search_result {
-            Some(index) => {
-                // Move our internal position
-                self.haystack = self.haystack.split_at(index + 1).1;
-                self.position = self.position + index + 1;
-                Some(self.position)
-            }
-            None => None,
-        }
-    }
-}
-
-impl<'a> DoubleEndedIterator for Memchr<'a> {
-    fn next_back(&mut self) -> Option<Self::Item> {
-        let search_result = memrchr(self.needle, &self.haystack);
-        match search_result {
-            Some(index) => {
-                // Move our internal position
-                self.haystack = self.haystack.split_at(index).0;
-                if self.rposition > 0{
-                    //memrchr has been used once already.
-                    self.rposition = self.rposition - index;
-                    return Some(self.rposition);
-                }else{
-                    return Some(self.position + index+1);
-                }
-            }
-            None => None,
-        }
-    }
-}
-
-/// A safe interface to `memchr`.
-///
-/// Returns the index corresponding to the first occurrence of `needle` in
-/// `haystack`, or `None` if one is not found.
-///
-/// memchr reduces to super-optimized machine code at around an order of
-/// magnitude faster than `haystack.iter().position(|&b| b == needle)`.
-/// (See benchmarks.)
-///
-/// # Example
-///
-/// This shows how to find the first position of a byte in a byte string.
-///
-/// ```rust
-/// use memchr::memchr;
-///
-/// let haystack = b"the quick brown fox";
-/// assert_eq!(memchr(b'k', haystack), Some(8));
-/// ```
-#[inline(always)] // reduces constant overhead
-pub fn memchr(needle: u8, haystack: &[u8]) -> Option<usize> {
-    // libc memchr
-    #[cfg(any(not(target_os = "windows"),
-              not(any(target_pointer_width = "32",
-                      target_pointer_width = "64"))))]
-    #[inline(always)] // reduces constant overhead
-    fn memchr_specific(needle: u8, haystack: &[u8]) -> Option<usize> {
-        use libc::memchr as libc_memchr;
-
-        let p = unsafe {
-            libc_memchr(haystack.as_ptr() as *const c_void,
-                        needle as c_int,
-                        haystack.len() as size_t)
-        };
-        if p.is_null() {
-            None
-        } else {
-            Some(p as usize - (haystack.as_ptr() as usize))
-        }
-    }
-
-    // use fallback on windows, since it's faster
-    #[cfg(all(target_os = "windows",
-              any(target_pointer_width = "32",
-                  target_pointer_width = "64")))]
-    fn memchr_specific(needle: u8, haystack: &[u8]) -> Option<usize> {
-        fallback::memchr(needle, haystack)
-    }
-
-    memchr_specific(needle, haystack)
-}
-
-/// A safe interface to `memrchr`.
-///
-/// Returns the index corresponding to the last occurrence of `needle` in
-/// `haystack`, or `None` if one is not found.
-///
-/// # Example
-///
-/// This shows how to find the last position of a byte in a byte string.
-///
-/// ```rust
-/// use memchr::memrchr;
-///
-/// let haystack = b"the quick brown fox";
-/// assert_eq!(memrchr(b'o', haystack), Some(17));
-/// ```
-#[inline(always)] // reduces constant overhead
-pub fn memrchr(needle: u8, haystack: &[u8]) -> Option<usize> {
-
-    #[cfg(target_os = "linux")]
-    #[inline(always)] // reduces constant overhead
-    fn memrchr_specific(needle: u8, haystack: &[u8]) -> Option<usize> {
-        // GNU's memrchr() will - unlike memchr() - error if haystack is empty.
-        if haystack.is_empty() {
-            return None;
-        }
-        let p = unsafe {
-            libc::memrchr(haystack.as_ptr() as *const c_void,
-                          needle as c_int,
-                          haystack.len() as size_t)
-        };
-        if p.is_null() {
-            None
-        } else {
-            Some(p as usize - (haystack.as_ptr() as usize))
-        }
-    }
-
-    #[cfg(all(not(target_os = "linux"),
-              any(target_pointer_width = "32", target_pointer_width = "64")))]
-    fn memrchr_specific(needle: u8, haystack: &[u8]) -> Option<usize> {
-        fallback::memrchr(needle, haystack)
-    }
-
-    // For the rare case of neither 32 bit nor 64-bit platform.
-    #[cfg(all(not(target_os = "linux"),
-              not(target_pointer_width = "32"),
-              not(target_pointer_width = "64")))]
-    fn memrchr_specific(needle: u8, haystack: &[u8]) -> Option<usize> {
-        haystack.iter().rposition(|&b| b == needle)
-    }
-
-    memrchr_specific(needle, haystack)
-}
-
-/// An iterator for Memchr2
-pub struct Memchr2<'a> {
-    needle1: u8,
-    needle2: u8,
-    // The haystack to iterate over
-    haystack: &'a [u8],
-    // The index
-    position: usize,
-}
-
-impl<'a> Memchr2<'a> {
-    /// Creates a new iterator that yields all positions of needle in haystack.
-    pub fn new(needle1: u8, needle2: u8, haystack: &[u8]) -> Memchr2 {
-        Memchr2 {
-            needle1: needle1,
-            needle2: needle2,
-            haystack: haystack,
-            position: 0,
-        }
-    }
-}
-
-impl<'a> Iterator for Memchr2<'a> {
-    type Item = usize;
-
-    fn next(&mut self) -> Option<usize> {
-        let search_result = memchr2(self.needle1, self.needle2, &self.haystack);
-        match search_result {
-            Some(index) => {
-                // Move our internal position
-                self.haystack = self.haystack.split_at(index + 1).1;
-                self.position = self.position + index + 1;
-                Some(self.position)
-            }
-            None => None,
-        }
-    }
-}
-
-
-/// Like `memchr`, but searches for two bytes instead of one.
-pub fn memchr2(needle1: u8, needle2: u8, haystack: &[u8]) -> Option<usize> {
-    fn slow(b1: u8, b2: u8, haystack: &[u8]) -> Option<usize> {
-        haystack.iter().position(|&b| b == b1 || b == b2)
-    }
-
-    let len = haystack.len();
-    let ptr = haystack.as_ptr();
-    let align = (ptr as usize) & (USIZE_BYTES - 1);
-    let mut i = 0;
-    if align > 0 {
-        i = cmp::min(USIZE_BYTES - align, len);
-        if let Some(found) = slow(needle1, needle2, &haystack[..i]) {
-            return Some(found);
-        }
-    }
-    let repeated_b1 = repeat_byte(needle1);
-    let repeated_b2 = repeat_byte(needle2);
-    if len >= USIZE_BYTES {
-        while i <= len - USIZE_BYTES {
-            unsafe {
-                let u = *(ptr.offset(i as isize) as *const usize);
-                let found_ub1 = contains_zero_byte(u ^ repeated_b1);
-                let found_ub2 = contains_zero_byte(u ^ repeated_b2);
-                if found_ub1 || found_ub2 {
-                    break;
-                }
-            }
-            i += USIZE_BYTES;
-        }
-    }
-    slow(needle1, needle2, &haystack[i..]).map(|pos| i + pos)
-}
-
-/// An iterator for Memchr3
-pub struct Memchr3<'a> {
-    needle1: u8,
-    needle2: u8,
-    needle3: u8,
-    // The haystack to iterate over
-    haystack: &'a [u8],
-    // The index
-    position: usize,
-}
-
-impl<'a> Memchr3<'a> {
-    /// Create a new Memchr2 that's initalized to zero with a haystack
-    pub fn new(needle1: u8, needle2: u8, needle3: u8, haystack: &[u8]) -> Memchr3 {
-        Memchr3 {
-            needle1: needle1,
-            needle2: needle2,
-            needle3: needle3,
-            haystack: haystack,
-            position: 0,
-        }
-    }
-}
-
-impl<'a> Iterator for Memchr3<'a> {
-    type Item = usize;
-
-    fn next(&mut self) -> Option<usize> {
-        let search_result = memchr3(self.needle1, self.needle2, self.needle3, &self.haystack);
-        match search_result {
-            Some(index) => {
-                // Move our internal position
-                self.haystack = self.haystack.split_at(index + 1).1;
-                self.position = self.position + index + 1;
-                Some(self.position)
-            }
-            None => None,
-        }
-    }
-}
-
-/// Like `memchr`, but searches for three bytes instead of one.
-pub fn memchr3(needle1: u8, needle2: u8, needle3: u8, haystack: &[u8]) -> Option<usize> {
-    fn slow(b1: u8, b2: u8, b3: u8, haystack: &[u8]) -> Option<usize> {
-        haystack.iter().position(|&b| b == b1 || b == b2 || b == b3)
-    }
-
-    let len = haystack.len();
-    let ptr = haystack.as_ptr();
-    let align = (ptr as usize) & (USIZE_BYTES - 1);
-    let mut i = 0;
-    if align > 0 {
-        i = cmp::min(USIZE_BYTES - align, len);
-        if let Some(found) = slow(needle1, needle2, needle3, &haystack[..i]) {
-            return Some(found);
-        }
-    }
-    let repeated_b1 = repeat_byte(needle1);
-    let repeated_b2 = repeat_byte(needle2);
-    let repeated_b3 = repeat_byte(needle3);
-    if len >= USIZE_BYTES {
-        while i <= len - USIZE_BYTES {
-            unsafe {
-                let u = *(ptr.offset(i as isize) as *const usize);
-                let found_ub1 = contains_zero_byte(u ^ repeated_b1);
-                let found_ub2 = contains_zero_byte(u ^ repeated_b2);
-                let found_ub3 = contains_zero_byte(u ^ repeated_b3);
-                if found_ub1 || found_ub2 || found_ub3 {
-                    break;
-                }
-            }
-            i += USIZE_BYTES;
-        }
-    }
-    slow(needle1, needle2, needle3, &haystack[i..]).map(|pos| i + pos)
-}
-
-#[allow(dead_code)]
-#[cfg(any(test, all(not(target_os = "linux"),
-          any(target_pointer_width = "32", target_pointer_width = "64"))))]
-mod fallback {
-    #[cfg(feature = "use_std")]
-    use std::cmp;
-    #[cfg(not(feature = "use_std"))]
-    use core::cmp;
-
-    use super::{LO_U64, HI_U64, LO_USIZE, HI_USIZE, USIZE_BYTES, contains_zero_byte, repeat_byte};
-
-    /// Return the first index matching the byte `a` in `text`.
-    pub fn memchr(x: u8, text: &[u8]) -> Option<usize> {
-        // Scan for a single byte value by reading two `usize` words at a time.
-        //
-        // Split `text` in three parts
-        // - unaligned inital part, before the first word aligned address in text
-        // - body, scan by 2 words at a time
-        // - the last remaining part, < 2 word size
-        let len = text.len();
-        let ptr = text.as_ptr();
-
-        // search up to an aligned boundary
-        let align = (ptr as usize) & (USIZE_BYTES - 1);
-        let mut offset;
-        if align > 0 {
-            offset = cmp::min(USIZE_BYTES - align, len);
-            if let Some(index) = text[..offset].iter().position(|elt| *elt == x) {
-                return Some(index);
-            }
-        } else {
-            offset = 0;
-        }
-
-        // search the body of the text
-        let repeated_x = repeat_byte(x);
-
-        if len >= 2 * USIZE_BYTES {
-            while offset <= len - 2 * USIZE_BYTES {
-                debug_assert_eq!((ptr as usize + offset) % USIZE_BYTES, 0);
-                unsafe {
-                    let u = *(ptr.offset(offset as isize) as *const usize);
-                    let v = *(ptr.offset((offset + USIZE_BYTES) as isize) as *const usize);
-
-                    // break if there is a matching byte
-                    let zu = contains_zero_byte(u ^ repeated_x);
-                    let zv = contains_zero_byte(v ^ repeated_x);
-                    if zu || zv {
-                        break;
-                    }
-                }
-                offset += USIZE_BYTES * 2;
-            }
-        }
-
-        // find the byte after the point the body loop stopped
-        text[offset..].iter().position(|elt| *elt == x).map(|i| offset + i)
-    }
-
-    /// Return the last index matching the byte `a` in `text`.
-    pub fn memrchr(x: u8, text: &[u8]) -> Option<usize> {
-        // Scan for a single byte value by reading two `usize` words at a time.
-        //
-        // Split `text` in three parts
-        // - unaligned tail, after the last word aligned address in text
-        // - body, scan by 2 words at a time
-        // - the first remaining bytes, < 2 word size
-        let len = text.len();
-        let ptr = text.as_ptr();
-
-        // search to an aligned boundary
-        let end_align = (ptr as usize + len) & (USIZE_BYTES - 1);
-        let mut offset;
-        if end_align > 0 {
-            offset = if end_align >= len { 0 } else { len - end_align };
-            if let Some(index) = text[offset..].iter().rposition(|elt| *elt == x) {
-                return Some(offset + index);
-            }
-        } else {
-            offset = len;
-        }
-
-        // search the body of the text
-        let repeated_x = repeat_byte(x);
-
-        while offset >= 2 * USIZE_BYTES {
-            debug_assert_eq!((ptr as usize + offset) % USIZE_BYTES, 0);
-            unsafe {
-                let u = *(ptr.offset(offset as isize - 2 * USIZE_BYTES as isize) as *const usize);
-                let v = *(ptr.offset(offset as isize - USIZE_BYTES as isize) as *const usize);
-
-                // break if there is a matching byte
-                let zu = contains_zero_byte(u ^ repeated_x);
-                let zv = contains_zero_byte(v ^ repeated_x);
-                if zu || zv {
-                    break;
-                }
-            }
-            offset -= 2 * USIZE_BYTES;
-        }
-
-        // find the byte before the point the body loop stopped
-        text[..offset].iter().rposition(|elt| *elt == x)
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    extern crate quickcheck;
-    use std::prelude::v1::*;
-
-    use super::{memchr, memrchr, memchr2, memchr3, Memchr, Memchr2, Memchr3};
-    // Use a macro to test both native and fallback impls on all configurations
-    macro_rules! memchr_tests {
-        ($mod_name:ident, $memchr:path, $memrchr:path) => {
-            mod $mod_name {
-            use std::prelude::v1::*;
-            use super::quickcheck;
-            #[test]
-            fn matches_one() {
-                assert_eq!(Some(0), $memchr(b'a', b"a"));
-            }
-
-            #[test]
-            fn matches_begin() {
-                assert_eq!(Some(0), $memchr(b'a', b"aaaa"));
-            }
-
-            #[test]
-            fn matches_end() {
-                assert_eq!(Some(4), $memchr(b'z', b"aaaaz"));
-            }
-
-            #[test]
-            fn matches_nul() {
-                assert_eq!(Some(4), $memchr(b'\x00', b"aaaa\x00"));
-            }
-
-            #[test]
-            fn matches_past_nul() {
-                assert_eq!(Some(5), $memchr(b'z', b"aaaa\x00z"));
-            }
-
-            #[test]
-            fn no_match_empty() {
-                assert_eq!(None, $memchr(b'a', b""));
-            }
-
-            #[test]
-            fn no_match() {
-                assert_eq!(None, $memchr(b'a', b"xyz"));
-            }
-
-            #[test]
-            fn qc_never_fail() {
-                fn prop(needle: u8, haystack: Vec<u8>) -> bool {
-                    $memchr(needle, &haystack); true
-                }
-                quickcheck::quickcheck(prop as fn(u8, Vec<u8>) -> bool);
-            }
-
-            #[test]
-            fn matches_one_reversed() {
-                assert_eq!(Some(0), $memrchr(b'a', b"a"));
-            }
-
-            #[test]
-            fn matches_begin_reversed() {
-                assert_eq!(Some(3), $memrchr(b'a', b"aaaa"));
-            }
-
-            #[test]
-            fn matches_end_reversed() {
-                assert_eq!(Some(0), $memrchr(b'z', b"zaaaa"));
-            }
-
-            #[test]
-            fn matches_nul_reversed() {
-                assert_eq!(Some(4), $memrchr(b'\x00', b"aaaa\x00"));
-            }
-
-            #[test]
-            fn matches_past_nul_reversed() {
-                assert_eq!(Some(0), $memrchr(b'z', b"z\x00aaaa"));
-            }
-
-            #[test]
-            fn no_match_empty_reversed() {
-                assert_eq!(None, $memrchr(b'a', b""));
-            }
-
-            #[test]
-            fn no_match_reversed() {
-                assert_eq!(None, $memrchr(b'a', b"xyz"));
-            }
-
-            #[test]
-            fn qc_never_fail_reversed() {
-                fn prop(needle: u8, haystack: Vec<u8>) -> bool {
-                    $memrchr(needle, &haystack); true
-                }
-                quickcheck::quickcheck(prop as fn(u8, Vec<u8>) -> bool);
-            }
-
-            #[test]
-            fn qc_correct_memchr() {
-                fn prop(v: Vec<u8>, offset: u8) -> bool {
-                    // test all pointer alignments
-                    let uoffset = (offset & 0xF) as usize;
-                    let data = if uoffset <= v.len() {
-                        &v[uoffset..]
-                    } else {
-                        &v[..]
-                    };
-                    for byte in 0..256u32 {
-                        let byte = byte as u8;
-                        if $memchr(byte, &data) != data.iter().position(|elt| *elt == byte) {
-                            return false;
-                        }
-                    }
-                    true
-                }
-                quickcheck::quickcheck(prop as fn(Vec<u8>, u8) -> bool);
-            }
-
-            #[test]
-            fn qc_correct_memrchr() {
-                fn prop(v: Vec<u8>, offset: u8) -> bool {
-                    // test all pointer alignments
-                    let uoffset = (offset & 0xF) as usize;
-                    let data = if uoffset <= v.len() {
-                        &v[uoffset..]
-                    } else {
-                        &v[..]
-                    };
-                    for byte in 0..256u32 {
-                        let byte = byte as u8;
-                        if $memrchr(byte, &data) != data.iter().rposition(|elt| *elt == byte) {
-                            return false;
-                        }
-                    }
-                    true
-                }
-                quickcheck::quickcheck(prop as fn(Vec<u8>, u8) -> bool);
-            }
-            }
-        }
-    }
-
-    memchr_tests! { native, ::memchr, ::memrchr }
-    memchr_tests! { fallback, ::fallback::memchr, ::fallback::memrchr }
-
-    #[test]
-    fn memchr2_matches_one() {
-        assert_eq!(Some(0), memchr2(b'a', b'b', b"a"));
-        assert_eq!(Some(0), memchr2(b'a', b'b', b"b"));
-        assert_eq!(Some(0), memchr2(b'b', b'a', b"a"));
-        assert_eq!(Some(0), memchr2(b'b', b'a', b"b"));
-    }
-
-    #[test]
-    fn memchr2_matches_begin() {
-        assert_eq!(Some(0), memchr2(b'a', b'b', b"aaaa"));
-        assert_eq!(Some(0), memchr2(b'a', b'b', b"bbbb"));
-    }
-
-    #[test]
-    fn memchr2_matches_end() {
-        assert_eq!(Some(4), memchr2(b'z', b'y', b"aaaaz"));
-        assert_eq!(Some(4), memchr2(b'z', b'y', b"aaaay"));
-    }
-
-    #[test]
-    fn memchr2_matches_nul() {
-        assert_eq!(Some(4), memchr2(b'\x00', b'z', b"aaaa\x00"));
-        assert_eq!(Some(4), memchr2(b'z', b'\x00', b"aaaa\x00"));
-    }
-
-    #[test]
-    fn memchr2_matches_past_nul() {
-        assert_eq!(Some(5), memchr2(b'z', b'y', b"aaaa\x00z"));
-        assert_eq!(Some(5), memchr2(b'y', b'z', b"aaaa\x00z"));
-    }
-
-    #[test]
-    fn memchr2_no_match_empty() {
-        assert_eq!(None, memchr2(b'a', b'b', b""));
-        assert_eq!(None, memchr2(b'b', b'a', b""));
-    }
-
-    #[test]
-    fn memchr2_no_match() {
-        assert_eq!(None, memchr2(b'a', b'b', b"xyz"));
-    }
-
-    #[test]
-    fn qc_never_fail_memchr2() {
-        fn prop(needle1: u8, needle2: u8, haystack: Vec<u8>) -> bool {
-            memchr2(needle1, needle2, &haystack);
-            true
-        }
-        quickcheck::quickcheck(prop as fn(u8, u8, Vec<u8>) -> bool);
-    }
-
-    #[test]
-    fn memchr3_matches_one() {
-        assert_eq!(Some(0), memchr3(b'a', b'b', b'c', b"a"));
-        assert_eq!(Some(0), memchr3(b'a', b'b', b'c', b"b"));
-        assert_eq!(Some(0), memchr3(b'a', b'b', b'c', b"c"));
-    }
-
-    #[test]
-    fn memchr3_matches_begin() {
-        assert_eq!(Some(0), memchr3(b'a', b'b', b'c', b"aaaa"));
-        assert_eq!(Some(0), memchr3(b'a', b'b', b'c', b"bbbb"));
-        assert_eq!(Some(0), memchr3(b'a', b'b', b'c', b"cccc"));
-    }
-
-    #[test]
-    fn memchr3_matches_end() {
-        assert_eq!(Some(4), memchr3(b'z', b'y', b'x', b"aaaaz"));
-        assert_eq!(Some(4), memchr3(b'z', b'y', b'x', b"aaaay"));
-        assert_eq!(Some(4), memchr3(b'z', b'y', b'x', b"aaaax"));
-    }
-
-    #[test]
-    fn memchr3_matches_nul() {
-        assert_eq!(Some(4), memchr3(b'\x00', b'z', b'y', b"aaaa\x00"));
-        assert_eq!(Some(4), memchr3(b'z', b'\x00', b'y', b"aaaa\x00"));
-        assert_eq!(Some(4), memchr3(b'z', b'y', b'\x00', b"aaaa\x00"));
-    }
-
-    #[test]
-    fn memchr3_matches_past_nul() {
-        assert_eq!(Some(5), memchr3(b'z', b'y', b'x', b"aaaa\x00z"));
-        assert_eq!(Some(5), memchr3(b'y', b'z', b'x', b"aaaa\x00z"));
-        assert_eq!(Some(5), memchr3(b'y', b'x', b'z', b"aaaa\x00z"));
-    }
-
-    #[test]
-    fn memchr3_no_match_empty() {
-        assert_eq!(None, memchr3(b'a', b'b', b'c', b""));
-        assert_eq!(None, memchr3(b'b', b'a', b'c', b""));
-        assert_eq!(None, memchr3(b'c', b'b', b'a', b""));
-    }
-
-    #[test]
-    fn memchr3_no_match() {
-        assert_eq!(None, memchr3(b'a', b'b', b'c', b"xyz"));
-    }
-
-    #[test]
-    fn memchr_iter() {
-        let haystack = b"aaaabaaaab";
-        let mut memchr_iter = Memchr::new(b'b', haystack);
-        let first = memchr_iter.next();
-        let second = memchr_iter.next();
-        let third = memchr_iter.next();
-        assert_eq!(Some(5), first);
-        assert_eq!(Some(10), second);
-        assert_eq!(None, third);
-    }
-
-    #[test]
-    fn memchr2_iter() {
-        let haystack = b"ab";
-        let mut memchr_iter = Memchr2::new(b'a', b'b', haystack);
-        let first = memchr_iter.next();
-        let second = memchr_iter.next();
-        let third = memchr_iter.next();
-        assert_eq!(Some(1), first);
-        assert_eq!(Some(2), second);
-        assert_eq!(None, third);
-    }
-
-    #[test]
-    fn memchr3_iter() {
-        let haystack = b"abc";
-        let mut memchr_iter = Memchr3::new(b'a', b'b', b'c', haystack);
-        let first = memchr_iter.next();
-        let second = memchr_iter.next();
-        let third = memchr_iter.next();
-        let fourth = memchr_iter.next();
-        assert_eq!(Some(1), first);
-        assert_eq!(Some(2), second);
-        assert_eq!(Some(3), third);
-        assert_eq!(None, fourth);
-    }
-
-    #[test]
-    fn memchr_reverse_iter() {
-        let haystack = b"aaaabaaaabaaaab";
-        let mut memchr_iter = Memchr::new(b'b', haystack);
-        let first = memchr_iter.next();
-        let second = memchr_iter.next_back();
-        let third = memchr_iter.next();
-        let fourth = memchr_iter.next_back();
-
-        assert_eq!(Some(5), first);
-        assert_eq!(Some(15), second);
-        assert_eq!(Some(10), third);
-        assert_eq!(None, fourth);
-    }
-
-    #[test]
-    fn memrchr_iter(){
-        let haystack = b"aaaabaaaabaaaab";
-        let mut memchr_iter = Memchr::new(b'b', haystack);
-        let first = memchr_iter.next_back();
-        let second = memchr_iter.next_back();
-        let third = memchr_iter.next_back();
-        let fourth = memchr_iter.next_back();
-
-        assert_eq!(Some(15), first);
-        assert_eq!(Some(10), second);
-        assert_eq!(Some(5), third);
-        assert_eq!(None, fourth);
-
-    }
-
-    #[test]
-    fn qc_never_fail_memchr3() {
-        fn prop(needle1: u8, needle2: u8, needle3: u8, haystack: Vec<u8>) -> bool {
-            memchr3(needle1, needle2, needle3, &haystack);
-            true
-        }
-        quickcheck::quickcheck(prop as fn(u8, u8, u8, Vec<u8>) -> bool);
-    }
-
-    #[test]
-    fn qc_correct_memchr() {
-        fn prop(v: Vec<u8>, offset: u8) -> bool {
-            // test all pointer alignments
-            let uoffset = (offset & 0xF) as usize;
-            let data = if uoffset <= v.len() {
-                &v[uoffset..]
-            } else {
-                &v[..]
-            };
-            for byte in 0..256u32 {
-                let byte = byte as u8;
-                if memchr(byte, &data) != data.iter().position(|elt| *elt == byte) {
-                    return false;
-                }
-            }
-            true
-        }
-        quickcheck::quickcheck(prop as fn(Vec<u8>, u8) -> bool);
-    }
-
-    #[test]
-    fn qc_correct_memrchr() {
-        fn prop(v: Vec<u8>, offset: u8) -> bool {
-            // test all pointer alignments
-            let uoffset = (offset & 0xF) as usize;
-            let data = if uoffset <= v.len() {
-                &v[uoffset..]
-            } else {
-                &v[..]
-            };
-            for byte in 0..256u32 {
-                let byte = byte as u8;
-                if memrchr(byte, &data) != data.iter().rposition(|elt| *elt == byte) {
-                    return false;
-                }
-            }
-            true
-        }
-        quickcheck::quickcheck(prop as fn(Vec<u8>, u8) -> bool);
-    }
-
-    #[test]
-    fn qc_correct_memchr2() {
-        fn prop(v: Vec<u8>, offset: u8) -> bool {
-            // test all pointer alignments
-            let uoffset = (offset & 0xF) as usize;
-            let data = if uoffset <= v.len() {
-                &v[uoffset..]
-            } else {
-                &v[..]
-            };
-            for b1 in 0..256u32 {
-                for b2 in 0..256u32 {
-                    let (b1, b2) = (b1 as u8, b2 as u8);
-                    let expected = data.iter().position(|&b| b == b1 || b == b2);
-                    let got = memchr2(b1, b2, &data);
-                    if expected != got {
-                        return false;
-                    }
-                }
-            }
-            true
-        }
-        quickcheck::quickcheck(prop as fn(Vec<u8>, u8) -> bool);
-    }
-}
--- a/third_party/rust/memchr/.cargo-checksum.json
+++ b/third_party/rust/memchr/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".travis.yml":"7c44542bc6662b5af4f15a98b2bcf052a57190922eb280bce93688785c31e323","COPYING":"01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f","Cargo.toml":"38694643a2d98dc66c1ea8583b9ee49210e8d92205835e43d9a8cc3216e680fe","LICENSE-MIT":"0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f","Makefile":"a45a128685a2ae7d4fa39d310786674417ee113055ef290a11f88002285865fc","README.md":"74e385c51a2402527a61a500d66e509fea97961f15bfffab85040064e576fe31","UNLICENSE":"7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c","appveyor.yml":"b5c1a28f805854370f24e530df912764a9520f4581b33da090f44cec0eef181c","benches/bench.rs":"87cfb76154c3c322691201c6f5649b37665ed8bf1cf303bca971309a4eef6b61","ctags.rust":"3d128d3cc59f702e68953ba2fe6c3f46bc6991fc575308db060482d5da0c79f3","session.vim":"95cb1d7caf0ff7fbe76ec911988d908ddd883381c925ba64b537695bc9f021c4","src/lib.rs":"98c86c86fd996455d7ec94bdfdcedd3ded3b2a7016480d3474808cfe36d00a63"},"package":"148fab2e51b4f1cfc66da2a7c32981d1d3c083a803978268bb11fe4b86925e7a"}
\ No newline at end of file
+{"files":{".travis.yml":"7c44542bc6662b5af4f15a98b2bcf052a57190922eb280bce93688785c31e323","COPYING":"01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f","Cargo.toml":"5413b7fd49541b0fd15a0719f9b1f052c5c965ae3cdee53258a87557ad981e8b","LICENSE-MIT":"0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f","Makefile":"a45a128685a2ae7d4fa39d310786674417ee113055ef290a11f88002285865fc","README.md":"74e385c51a2402527a61a500d66e509fea97961f15bfffab85040064e576fe31","UNLICENSE":"7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c","appveyor.yml":"b5c1a28f805854370f24e530df912764a9520f4581b33da090f44cec0eef181c","benches/bench.rs":"87cfb76154c3c322691201c6f5649b37665ed8bf1cf303bca971309a4eef6b61","ctags.rust":"3d128d3cc59f702e68953ba2fe6c3f46bc6991fc575308db060482d5da0c79f3","session.vim":"95cb1d7caf0ff7fbe76ec911988d908ddd883381c925ba64b537695bc9f021c4","src/lib.rs":"4c0d116ddfdb0fd4130b4c5690671760401937d4108b1d913a17c3a6fde776b1"},"package":"1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4"}
\ No newline at end of file
--- a/third_party/rust/memchr/Cargo.toml
+++ b/third_party/rust/memchr/Cargo.toml
@@ -1,44 +1,28 @@
-# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
-#
-# When uploading crates to the registry Cargo will automatically
-# "normalize" Cargo.toml files for maximal compatibility
-# with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g. crates.io) dependencies
-#
-# If you believe there's an error in this file please file an
-# issue against the rust-lang/cargo repository. If you're
-# editing this file be aware that the upstream Cargo.toml
-# will likely look very different (and much more reasonable)
-
 [package]
 name = "memchr"
-version = "1.0.2"
+version = "1.0.1"  #:version
 authors = ["Andrew Gallant <jamslam@gmail.com>", "bluss"]
 description = "Safe interface to memchr."
+documentation = "https://docs.rs/memchr/"
 homepage = "https://github.com/BurntSushi/rust-memchr"
-documentation = "https://docs.rs/memchr/"
+repository = "https://github.com/BurntSushi/rust-memchr"
 readme = "README.md"
 keywords = ["memchr", "char", "scan", "strchr", "string"]
 license = "Unlicense/MIT"
-repository = "https://github.com/BurntSushi/rust-memchr"
-[profile.test]
-opt-level = 3
 
 [lib]
 name = "memchr"
 bench = false
-[dependencies.libc]
-version = "0.2.18"
-optional = true
-default-features = false
-[dev-dependencies.quickcheck]
-version = "0.4.1"
 
 [features]
-default = ["use_std", "libc"]
-use_std = ["libc", "libc/use_std"]
-[badges.appveyor]
-repository = "BurntSushi/rust-memchr"
+default = ["use_std"]
+use_std = ["libc/use_std"]
+
+[dependencies]
+libc = { version = "0.2.18", default-features = false }
 
-[badges.travis-ci]
-repository = "BurntSushi/rust-memchr"
+[dev-dependencies]
+quickcheck = "0.4.1"
+
+[profile.test]
+opt-level = 3
--- a/third_party/rust/memchr/src/lib.rs
+++ b/third_party/rust/memchr/src/lib.rs
@@ -7,22 +7,19 @@ to the corresponding functions in `libc`
 #![allow(unused_imports)]
 
 #![cfg_attr(not(feature = "use_std"), no_std)]
 
 #[cfg(all(test, not(feature = "use_std")))]
 #[macro_use]
 extern crate std;
 
-#[cfg(feature = "libc")]
 extern crate libc;
 
-#[cfg(feature = "libc")]
 use libc::c_void;
-#[cfg(feature = "libc")]
 use libc::{c_int, size_t};
 
 #[cfg(feature = "use_std")]
 use std::cmp;
 #[cfg(not(feature = "use_std"))]
 use core::cmp;
 
 const LO_U64: u64 = 0x0101010101010101;
@@ -68,25 +65,27 @@ fn repeat_byte(b: u8) -> usize {
 
 /// An iterator for memchr
 pub struct Memchr<'a> {
     needle: u8,
     // The haystack to iterate over
     haystack: &'a [u8],
     // The index
     position: usize,
+    rposition: usize,
 }
 
 impl<'a> Memchr<'a> {
     /// Creates a new iterator that yields all positions of needle in haystack.
     pub fn new(needle: u8, haystack: &[u8]) -> Memchr {
         Memchr {
             needle: needle,
             haystack: haystack,
             position: 0,
+            rposition: 0,
         }
     }
 }
 
 impl<'a> Iterator for Memchr<'a> {
     type Item = usize;
 
     fn next(&mut self) -> Option<usize> {
@@ -105,17 +104,23 @@ impl<'a> Iterator for Memchr<'a> {
 
 impl<'a> DoubleEndedIterator for Memchr<'a> {
     fn next_back(&mut self) -> Option<Self::Item> {
         let search_result = memrchr(self.needle, &self.haystack);
         match search_result {
             Some(index) => {
                 // Move our internal position
                 self.haystack = self.haystack.split_at(index).0;
-                Some(self.position + index + 1)
+                if self.rposition > 0{
+                    //memrchr has been used once already.
+                    self.rposition = self.rposition - index;
+                    return Some(self.rposition);
+                }else{
+                    return Some(self.position + index+1);
+                }
             }
             None => None,
         }
     }
 }
 
 /// A safe interface to `memchr`.
 ///
@@ -134,20 +139,19 @@ impl<'a> DoubleEndedIterator for Memchr<
 /// use memchr::memchr;
 ///
 /// let haystack = b"the quick brown fox";
 /// assert_eq!(memchr(b'k', haystack), Some(8));
 /// ```
 #[inline(always)] // reduces constant overhead
 pub fn memchr(needle: u8, haystack: &[u8]) -> Option<usize> {
     // libc memchr
-    #[cfg(all(feature = "libc",
-              any(not(target_os = "windows"),
-                  not(any(target_pointer_width = "32",
-                          target_pointer_width = "64")))))]
+    #[cfg(any(not(target_os = "windows"),
+              not(any(target_pointer_width = "32",
+                      target_pointer_width = "64"))))]
     #[inline(always)] // reduces constant overhead
     fn memchr_specific(needle: u8, haystack: &[u8]) -> Option<usize> {
         use libc::memchr as libc_memchr;
 
         let p = unsafe {
             libc_memchr(haystack.as_ptr() as *const c_void,
                         needle as c_int,
                         haystack.len() as size_t)
@@ -155,31 +159,23 @@ pub fn memchr(needle: u8, haystack: &[u8
         if p.is_null() {
             None
         } else {
             Some(p as usize - (haystack.as_ptr() as usize))
         }
     }
 
     // use fallback on windows, since it's faster
-    #[cfg(all(any(not(feature = "libc"), target_os = "windows"),
+    #[cfg(all(target_os = "windows",
               any(target_pointer_width = "32",
                   target_pointer_width = "64")))]
     fn memchr_specific(needle: u8, haystack: &[u8]) -> Option<usize> {
         fallback::memchr(needle, haystack)
     }
 
-    // For the rare case of neither 32 bit nor 64-bit platform.
-    #[cfg(all(any(not(feature = "libc"), target_os = "windows"),
-              not(target_pointer_width = "32"),
-              not(target_pointer_width = "64")))]
-    fn memchr_specific(needle: u8, haystack: &[u8]) -> Option<usize> {
-        haystack.iter().position(|&b| b == needle)
-    }
-
     memchr_specific(needle, haystack)
 }
 
 /// A safe interface to `memrchr`.
 ///
 /// Returns the index corresponding to the last occurrence of `needle` in
 /// `haystack`, or `None` if one is not found.
 ///
@@ -191,17 +187,17 @@ pub fn memchr(needle: u8, haystack: &[u8
 /// use memchr::memrchr;
 ///
 /// let haystack = b"the quick brown fox";
 /// assert_eq!(memrchr(b'o', haystack), Some(17));
 /// ```
 #[inline(always)] // reduces constant overhead
 pub fn memrchr(needle: u8, haystack: &[u8]) -> Option<usize> {
 
-    #[cfg(all(feature = "libc", target_os = "linux"))]
+    #[cfg(target_os = "linux")]
     #[inline(always)] // reduces constant overhead
     fn memrchr_specific(needle: u8, haystack: &[u8]) -> Option<usize> {
         // GNU's memrchr() will - unlike memchr() - error if haystack is empty.
         if haystack.is_empty() {
             return None;
         }
         let p = unsafe {
             libc::memrchr(haystack.as_ptr() as *const c_void,
@@ -210,24 +206,24 @@ pub fn memrchr(needle: u8, haystack: &[u
         };
         if p.is_null() {
             None
         } else {
             Some(p as usize - (haystack.as_ptr() as usize))
         }
     }
 
-    #[cfg(all(not(all(feature = "libc", target_os = "linux")),
+    #[cfg(all(not(target_os = "linux"),
               any(target_pointer_width = "32", target_pointer_width = "64")))]
     fn memrchr_specific(needle: u8, haystack: &[u8]) -> Option<usize> {
         fallback::memrchr(needle, haystack)
     }
 
     // For the rare case of neither 32 bit nor 64-bit platform.
-    #[cfg(all(not(all(feature = "libc", target_os = "linux")),
+    #[cfg(all(not(target_os = "linux"),
               not(target_pointer_width = "32"),
               not(target_pointer_width = "64")))]
     fn memrchr_specific(needle: u8, haystack: &[u8]) -> Option<usize> {
         haystack.iter().rposition(|&b| b == needle)
     }
 
     memrchr_specific(needle, haystack)
 }
@@ -379,17 +375,17 @@ pub fn memchr3(needle1: u8, needle2: u8,
             }
             i += USIZE_BYTES;
         }
     }
     slow(needle1, needle2, needle3, &haystack[i..]).map(|pos| i + pos)
 }
 
 #[allow(dead_code)]
-#[cfg(any(test, not(feature = "libc"), all(not(target_os = "linux"),
+#[cfg(any(test, all(not(target_os = "linux"),
           any(target_pointer_width = "32", target_pointer_width = "64"))))]
 mod fallback {
     #[cfg(feature = "use_std")]
     use std::cmp;
     #[cfg(not(feature = "use_std"))]
     use core::cmp;
 
     use super::{LO_U64, HI_U64, LO_USIZE, HI_USIZE, USIZE_BYTES, contains_zero_byte, repeat_byte};
deleted file mode 100644
--- a/third_party/rust/mime-0.2.4/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".travis.yml":"713aa1cac091a99e295194ca0dfd6d74028edbb02a0f5f627f3d3dfdf6437ee0","Cargo.toml":"cf9de6a21aa19f3f8c5e074625629f93f3f38cff8d57598e4287a554f10b1549","LICENSE":"df9cfd06d8a44d9a671eadd39ffd97f166481da015a30f45dfd27886209c5922","README.md":"706ee5777dbfea1255359f2dd3f905f7bb89282a528c9c14e38751e5e874fd5e","src/lib.rs":"9635770a9af281e355a538a5f629b9b338b9350c71cc2ec5f7c101794a3289f7"},"package":"9d69889cdc6336ed56b174514ce876c4c3dc564cc23dd872e7bca589bb2a36c8"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/mime-0.2.4/.travis.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-language: rust
-rust: beta
-
deleted file mode 100644
--- a/third_party/rust/mime-0.2.4/Cargo.toml
+++ /dev/null
@@ -1,25 +0,0 @@
-[package]
-
-name = "mime"
-version = "0.2.4"
-authors = ["Sean McArthur <sean.monstar@gmail.com>"]
-license = "MIT"
-description = "Strongly Typed Mimes"
-documentation = "http://hyperium.github.io/mime.rs"
-repository = "https://github.com/hyperium/mime.rs"
-keywords = ["mime", "media-extensions", "media-types"]
-
-[dependencies]
-log = "0.3"
-serde = { version = ">=0.7, <0.9", optional = true }
-
-[dev-dependencies]
-serde_json = ">=0.7, <0.9"
-
-[dependencies.heapsize]
-version = ">=0.2.0, <0.4"
-optional = true
-
-[features]
-heap_size = ["heapsize"]
-nightly = []
deleted file mode 100644
--- a/third_party/rust/mime-0.2.4/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2014 Sean McArthur
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
deleted file mode 100644
--- a/third_party/rust/mime-0.2.4/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# mime.rs
-
-[![Build Status](https://travis-ci.org/hyperium/mime.rs.svg?branch=master)](https://travis-ci.org/hyperium/mime.rs)
-
-Support MIME (Media Types) as strong types in Rust.
-
-[Documentation](http://hyperium.github.io/mime.rs)
-
-## License
-
-[MIT](./LICENSE)
deleted file mode 100644
--- a/third_party/rust/mime-0.2.4/src/lib.rs
+++ /dev/null
@@ -1,632 +0,0 @@
-//! # Mime
-//!
-//! Mime is now Media Type, technically, but `Mime` is more immediately
-//! understandable, so the main type here is `Mime`.
-//!
-//! ## What is Mime?
-//!
-//! Example mime string: `text/plain;charset=utf-8`
-//!
-//! ```rust
-//! # #[macro_use] extern crate mime;
-//! # fn main() {
-//! let plain_text: mime::Mime = "text/plain;charset=utf-8".parse().unwrap();
-//! assert_eq!(plain_text, mime!(Text/Plain; Charset=Utf8));
-//! # }
-//! ```
-
-#![doc(html_root_url = "https://hyperium.github.io/mime.rs")]
-#![cfg_attr(test, deny(warnings))]
-#![cfg_attr(all(feature = "nightly", test), feature(test))]
-
-#[macro_use]
-extern crate log;
-
-#[cfg(feature = "nightly")]
-#[cfg(test)]
-extern crate test;
-
-#[cfg(feature = "serde")]
-extern crate serde;
-
-#[cfg(feature = "serde")]
-#[cfg(test)]
-extern crate serde_json;
-
-#[cfg(feature = "heapsize")]
-extern crate heapsize;
-
-use std::ascii::AsciiExt;
-use std::fmt;
-use std::iter::Enumerate;
-use std::str::{FromStr, Chars};
-
-macro_rules! inspect(
-    ($s:expr, $t:expr) => ({
-        let t = $t;
-        trace!("inspect {}: {:?}", $s, t);
-        t
-    })
-);
-
-/// Mime, or Media Type. Encapsulates common registers types.
-///
-/// Consider that a traditional mime type contains a "top level type",
-/// a "sub level type", and 0-N "parameters". And they're all strings.
-/// Strings everywhere. Strings mean typos. Rust has type safety. We should
-/// use types!
-///
-/// So, Mime bundles together this data into types so the compiler can catch
-/// your typos.
-///
-/// This improves things so you use match without Strings:
-///
-/// ```rust
-/// use mime::{Mime, TopLevel, SubLevel};
-///
-/// let mime: Mime = "application/json".parse().unwrap();
-///
-/// match mime {
-///     Mime(TopLevel::Application, SubLevel::Json, _) => println!("matched json!"),
-///     _ => ()
-/// }
-/// ```
-#[derive(Clone, Debug, Eq, Hash, Ord, PartialOrd)]
-pub struct Mime<T: AsRef<[Param]> = Vec<Param>>(pub TopLevel, pub SubLevel, pub T);
-
-#[cfg(feature = "heapsize")]
-impl<T: AsRef<[Param]> + heapsize::HeapSizeOf> heapsize::HeapSizeOf for Mime<T> {
-    fn heap_size_of_children(&self) -> usize {
-        self.0.heap_size_of_children() +
-        self.1.heap_size_of_children() +
-        self.2.heap_size_of_children()
-    }
-}
-
-impl<LHS: AsRef<[Param]>, RHS: AsRef<[Param]>> PartialEq<Mime<RHS>> for Mime<LHS> {
-    fn eq(&self, other: &Mime<RHS>) -> bool {
-        self.0 == other.0 && self.1 == other.1 && self.2.as_ref() == other.2.as_ref()
-    }
-}
-
-/// Easily create a Mime without having to import so many enums.
-///
-/// # Example
-///
-/// ```
-/// # #[macro_use] extern crate mime;
-///
-/// # fn main() {
-/// let json = mime!(Application/Json);
-/// let plain = mime!(Text/Plain; Charset=Utf8);
-/// let text = mime!(Text/Html; Charset=("bar"), ("baz")=("quux"));
-/// let img = mime!(Image/_);
-/// # }
-/// ```
-#[macro_export]
-macro_rules! mime {
-    ($top:tt / $sub:tt) => (
-        mime!($top / $sub;)
-    );
-
-    ($top:tt / $sub:tt ; $($attr:tt = $val:tt),*) => (
-        $crate::Mime(
-            __mime__ident_or_ext!(TopLevel::$top),
-            __mime__ident_or_ext!(SubLevel::$sub),
-            vec![ $((__mime__ident_or_ext!(Attr::$attr), __mime__ident_or_ext!(Value::$val))),* ]
-        )
-    );
-}
-
-#[doc(hidden)]
-#[macro_export]
-macro_rules! __mime__ident_or_ext {
-    ($enoom:ident::_) => (
-        $crate::$enoom::Star
-    );
-    ($enoom:ident::($inner:expr)) => (
-        $crate::$enoom::Ext($inner.to_string())
-    );
-    ($enoom:ident::$var:ident) => (
-        $crate::$enoom::$var
-    )
-}
-
-macro_rules! enoom {
-    (pub enum $en:ident; $ext:ident; $($ty:ident, $text:expr;)*) => (
-
-        #[derive(Clone, Debug, Eq, Hash, Ord, PartialOrd)]
-        pub enum $en {
-            $($ty),*,
-            $ext(String)
-        }
-
-        impl $en {
-            pub fn as_str(&self) -> &str {
-                match *self {
-                    $($en::$ty => $text),*,
-                    $en::$ext(ref s) => &s
-                }
-            }
-        }
-
-        impl ::std::ops::Deref for $en {
-            type Target = str;
-            fn deref(&self) -> &str {
-                self.as_str()
-            }
-        }
-
-        impl PartialEq for $en {
-            fn eq(&self, other: &$en) -> bool {
-                match (self, other) {
-                    $( (&$en::$ty, &$en::$ty) => true ),*,
-                    (&$en::$ext(ref a), &$en::$ext(ref b)) => a == b,
-                    _ => self.as_str() == other.as_str()
-                }
-            }
-        }
-
-        impl PartialEq<String> for $en {
-            fn eq(&self, other: &String) -> bool {
-                self.as_str() == other
-            }
-        }
-
-        impl PartialEq<str> for $en {
-            fn eq(&self, other: &str) -> bool {
-                self.as_str() == other
-            }
-        }
-
-        impl<'a> PartialEq<&'a str> for $en {
-            fn eq(&self, other: &&'a str) -> bool {
-                self.as_str() == *other
-            }
-        }
-
-        impl PartialEq<$en> for String {
-            fn eq(&self, other: &$en) -> bool {
-                self == other.as_str()
-            }
-        }
-
-        impl PartialEq<$en> for str {
-            fn eq(&self, other: &$en) -> bool {
-                self == other.as_str()
-            }
-        }
-
-        impl<'a> PartialEq<$en> for &'a str {
-            fn eq(&self, other: &$en) -> bool {
-                *self == other.as_str()
-            }
-        }
-
-        impl fmt::Display for $en {
-            #[inline]
-            fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-                fmt.write_str(match *self {
-                    $($en::$ty => $text),*,
-                    $en::$ext(ref s) => s
-                })
-            }
-        }
-
-        impl FromStr for $en {
-            type Err = ();
-            fn from_str(s: &str) -> Result<$en, ()> {
-                Ok(match s {
-                    $(_s if _s == $text => $en::$ty),*,
-                    s => $en::$ext(inspect!(stringify!($ext), s).to_string())
-                })
-            }
-        }
-
-        #[cfg(feature = "heapsize")]
-        impl heapsize::HeapSizeOf for $en {
-            fn heap_size_of_children(&self) -> usize {
-                match *self {
-                    $en::$ext(ref ext) => ext.heap_size_of_children(),
-                    _ => 0,
-                }
-            }
-        }
-    )
-}
-
-enoom! {
-    pub enum TopLevel;
-    Ext;
-    Star, "*";
-    Text, "text";
-    Image, "image";
-    Audio, "audio";
-    Video, "video";
-    Application, "application";
-    Multipart, "multipart";
-    Message, "message";
-    Model, "model";
-}
-
-enoom! {
-    pub enum SubLevel;
-    Ext;
-    Star, "*";
-
-    // common text/*
-    Plain, "plain";
-    Html, "html";
-    Xml, "xml";
-    Javascript, "javascript";
-    Css, "css";
-    EventStream, "event-stream";
-
-    // common application/*
-    Json, "json";
-    WwwFormUrlEncoded, "x-www-form-urlencoded";
-    Msgpack, "msgpack";
-    OctetStream, "octet-stream";
-
-    // multipart/*
-    FormData, "form-data";
-
-    // common image/*
-    Png, "png";
-    Gif, "gif";
-    Bmp, "bmp";
-    Jpeg, "jpeg";
-
-    // audio/*
-    Mpeg, "mpeg";
-    Mp4, "mp4";
-    Ogg, "ogg";
-}
-
-enoom! {
-    pub enum Attr;
-    Ext;
-    Charset, "charset";
-    Boundary, "boundary";
-    Q, "q";
-}
-
-enoom! {
-    pub enum Value;
-    Ext;
-    Utf8, "utf-8";
-}
-
-pub type Param = (Attr, Value);
-
-impl<T: AsRef<[Param]>> fmt::Display for Mime<T> {
-    #[inline]
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(fmt::Display::fmt(&self.0, f));
-        try!(f.write_str("/"));
-        try!(fmt::Display::fmt(&self.1, f));
-        for param in self.2.as_ref() {
-            try!(f.write_str("; "));
-            try!(fmt::Display::fmt(&param.0, f));
-            try!(f.write_str("="));
-            try!(fmt::Display::fmt(&param.1, f));
-        }
-        Ok(())
-    }
-}
-
-impl<P: AsRef<[Param]>> Mime<P> {
-    pub fn get_param<A: PartialEq<Attr>>(&self, attr: A) -> Option<&Value> {
-        self.2.as_ref().iter().find(|&&(ref name, _)| attr == *name).map(|&(_, ref value)| value)
-    }
-}
-
-impl FromStr for Mime {
-    type Err = ();
-    fn from_str(raw: &str) -> Result<Mime, ()> {
-        if raw == "*/*" {
-            return Ok(mime!(Star/Star));
-        }
-
-        let ascii = raw.to_ascii_lowercase(); // lifetimes :(
-        let len = ascii.len();
-        let mut iter = ascii.chars().enumerate();
-        let mut params = vec![];
-        // toplevel
-        let mut start;
-        let top;
-        loop {
-            match inspect!("top iter", iter.next()) {
-                Some((0, c)) if is_restricted_name_first_char(c) => (),
-                Some((i, c)) if i > 0 && is_restricted_name_char(c) => (),
-                Some((i, '/')) if i > 0 => match FromStr::from_str(&ascii[..i]) {
-                    Ok(t) => {
-                        top = t;
-                        start = i + 1;
-                        break;
-                    }
-                    Err(_) => return Err(())
-                },
-                _ => return Err(()) // EOF and no toplevel is no Mime
-            };
-
-        }
-
-        // sublevel
-        let sub;
-        let mut sub_star = false;
-        loop {
-            match inspect!("sub iter", iter.next()) {
-                Some((i, '*')) if i == start => {
-                    sub_star = true;
-                },
-                Some((i, c)) if i == start && is_restricted_name_first_char(c) => (),
-                Some((i, c)) if !sub_star && i > start && is_restricted_name_char(c) => (),
-                Some((i, ';')) if i > start => match FromStr::from_str(&ascii[start..i]) {
-                    Ok(s) => {
-                        sub = s;
-                        start = i + 1;
-                        break;
-                    }
-                    Err(_) => return Err(())
-                },
-                None => match FromStr::from_str(&ascii[start..]) {
-                    Ok(s) => return Ok(Mime(top, s, params)),
-                    Err(_) => return Err(())
-                },
-                _ => return Err(())
-            };
-        }
-
-        // params
-        debug!("starting params, len={}", len);
-        loop {
-            match inspect!("param", param_from_str(raw, &ascii, &mut iter, start)) {
-                Some((p, end)) => {
-                    params.push(p);
-                    start = end;
-                    if start >= len {
-                        break;
-                    }
-                }
-                None => break
-            }
-        }
-
-        Ok(Mime(top, sub, params))
-    }
-}
-
-#[cfg(feature = "serde")]
-impl serde::ser::Serialize for Mime {
-    fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error>
-        where S: serde::ser::Serializer
-    {
-        serializer.serialize_str(&*format!("{}",self))
-    }
-}
-
-#[cfg(feature = "serde")]
-impl serde::de::Deserialize for Mime {
-    fn deserialize<D>(deserializer: &mut D) -> Result<Self, D::Error>
-        where D: serde::de::Deserializer
-    {
-        let string: String = try!(serde::Deserialize::deserialize(deserializer));
-        let mime: Mime = match FromStr::from_str(&*string) {
-            Ok(mime) => mime,
-            Err(_) => return Err(serde::de::Error::custom("Invalid serialized mime")),
-        };
-        Ok(mime)
-    }
-}
-
-fn param_from_str(raw: &str, ascii: &str, iter: &mut Enumerate<Chars>, mut start: usize) -> Option<(Param, usize)> {
-    let attr;
-    debug!("param_from_str, start={}", start);
-    loop {
-        match inspect!("attr iter", iter.next()) {
-            Some((i, ' ')) if i == start => start = i + 1,
-            Some((i, c)) if i == start && is_restricted_name_first_char(c) => (),
-            Some((i, c)) if i > start && is_restricted_name_char(c) => (),
-            Some((i, '=')) if i > start => match FromStr::from_str(&ascii[start..i]) {
-                Ok(a) => {
-                    attr = inspect!("attr", a);
-                    start = i + 1;
-                    break;
-                },
-                Err(_) => return None
-            },
-            _ => return None
-        }
-    }
-
-    let value;
-    // values must be restrict-name-char or "anything goes"
-    let mut is_quoted = false;
-
-    {
-        let substr = |a,b| { if attr==Attr::Charset { &ascii[a..b] } else { &raw[a..b] } };
-        let endstr = |a| { if attr==Attr::Charset { &ascii[a..] } else { &raw[a..] } };
-        loop {
-            match inspect!("value iter", iter.next()) {
-                Some((i, '"')) if i == start => {
-                    debug!("quoted");
-                    is_quoted = true;
-                    start = i + 1;
-                },
-                Some((i, c)) if i == start && is_restricted_name_first_char(c) => (),
-                Some((i, '"')) if i > start && is_quoted => match FromStr::from_str(substr(start,i)) {
-                    Ok(v) => {
-                        value = v;
-                        start = i + 1;
-                        break;
-                    },
-                    Err(_) => return None
-                },
-                Some((i, c)) if i > start && is_quoted || is_restricted_name_char(c) => (),
-                Some((i, ';')) if i > start => match FromStr::from_str(substr(start,i)) {
-                    Ok(v) => {
-                        value = v;
-                        start = i + 1;
-                        break;
-                    },
-                    Err(_) => return None
-                },
-                None => match FromStr::from_str(endstr(start)) {
-                    Ok(v) => {
-                        value = v;
-                        start = raw.len();
-                        break;
-                    },
-                    Err(_) => return None
-                },
-
-                _ => return None
-            }
-        }
-    }
-
-    Some(((attr, value), start))
-}
-
-// From [RFC6838](http://tools.ietf.org/html/rfc6838#section-4.2):
-//
-// > All registered media types MUST be assigned top-level type and
-// > subtype names.  The combination of these names serves to uniquely
-// > identify the media type, and the subtype name facet (or the absence
-// > of one) identifies the registration tree.  Both top-level type and
-// > subtype names are case-insensitive.
-// >
-// > Type and subtype names MUST conform to the following ABNF:
-// >
-// >     type-name = restricted-name
-// >     subtype-name = restricted-name
-// >
-// >     restricted-name = restricted-name-first *126restricted-name-chars
-// >     restricted-name-first  = ALPHA / DIGIT
-// >     restricted-name-chars  = ALPHA / DIGIT / "!" / "#" /
-// >                              "$" / "&" / "-" / "^" / "_"
-// >     restricted-name-chars =/ "." ; Characters before first dot always
-// >                                  ; specify a facet name
-// >     restricted-name-chars =/ "+" ; Characters after last plus always
-// >                                  ; specify a structured syntax suffix
-//
-fn is_restricted_name_first_char(c: char) -> bool {
-    match c {
-        'a'...'z' |
-        '0'...'9' => true,
-        _ => false
-    }
-}
-
-fn is_restricted_name_char(c: char) -> bool {
-    if is_restricted_name_first_char(c) {
-        true
-    } else {
-        match c {
-            '!' |
-            '#' |
-            '$' |
-            '&' |
-            '-' |
-            '^' |
-            '.' |
-            '+' |
-            '_' => true,
-            _ => false
-        }
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use std::str::FromStr;
-    #[cfg(feature = "nightly")]
-    use test::Bencher;
-    use super::{Mime, Value, Attr};
-
-    #[test]
-    fn test_mime_show() {
-        let mime = mime!(Text/Plain);
-        assert_eq!(mime.to_string(), "text/plain".to_string());
-        let mime = mime!(Text/Plain; Charset=Utf8);
-        assert_eq!(mime.to_string(), "text/plain; charset=utf-8".to_string());
-    }
-
-    #[test]
-    fn test_mime_from_str() {
-        assert_eq!(Mime::from_str("text/plain").unwrap(), mime!(Text/Plain));
-        assert_eq!(Mime::from_str("TEXT/PLAIN").unwrap(), mime!(Text/Plain));
-        assert_eq!(Mime::from_str("text/plain; charset=utf-8").unwrap(), mime!(Text/Plain; Charset=Utf8));
-        assert_eq!(Mime::from_str("text/plain;charset=\"utf-8\"").unwrap(), mime!(Text/Plain; Charset=Utf8));
-        assert_eq!(Mime::from_str("text/plain; charset=utf-8; foo=bar").unwrap(),
-            mime!(Text/Plain; Charset=Utf8, ("foo")=("bar")));
-        assert_eq!("*/*".parse::<Mime>().unwrap(), mime!(Star/Star));
-        assert_eq!("image/*".parse::<Mime>().unwrap(), mime!(Image/Star));
-        assert_eq!("text/*; charset=utf-8".parse::<Mime>().unwrap(), mime!(Text/Star; Charset=Utf8));
-        assert!("*/png".parse::<Mime>().is_err());
-        assert!("*image/png".parse::<Mime>().is_err());
-        assert!("text/*plain".parse::<Mime>().is_err());
-    }
-
-    #[test]
-    fn test_case_sensitive_values() {
-        assert_eq!(Mime::from_str("multipart/form-data; boundary=ABCDEFG").unwrap(),
-                   mime!(Multipart/FormData; Boundary=("ABCDEFG")));
-        assert_eq!(Mime::from_str("multipart/form-data; charset=BASE64; boundary=ABCDEFG").unwrap(),
-                   mime!(Multipart/FormData; Charset=("base64"), Boundary=("ABCDEFG")));
-    }
-
-    #[test]
-    fn test_get_param() {
-        let mime = Mime::from_str("text/plain; charset=utf-8; foo=bar").unwrap();
-        assert_eq!(mime.get_param(Attr::Charset), Some(&Value::Utf8));
-        assert_eq!(mime.get_param("charset"), Some(&Value::Utf8));
-        assert_eq!(mime.get_param("foo").unwrap(), "bar");
-        assert_eq!(mime.get_param("baz"), None);
-    }
-
-    #[test]
-    fn test_value_as_str() {
-        assert_eq!(Value::Utf8.as_str(), "utf-8");
-    }
-
-    #[test]
-    fn test_value_eq_str() {
-        assert_eq!(Value::Utf8, "utf-8");
-        assert_eq!("utf-8", Value::Utf8);
-    }
-
-    #[cfg(feature = "serde")]
-    #[test]
-    fn test_serialize_deserialize() {
-        use serde_json;
-
-        let mime = Mime::from_str("text/plain; charset=utf-8; foo=bar").unwrap();
-        let serialized = serde_json::to_string(&mime).unwrap();
-        let deserialized: Mime = serde_json::from_str(&serialized).unwrap();
-        assert_eq!(mime, deserialized);
-    }
-
-    #[cfg(feature = "nightly")]
-    #[bench]
-    fn bench_fmt(b: &mut Bencher) {
-        use std::fmt::Write;
-        let mime = mime!(Text/Plain; Charset=Utf8, ("foo")=("bar"));
-        b.bytes = mime.to_string().as_bytes().len() as u64;
-        let mut s = String::with_capacity(64);
-        b.iter(|| {
-            let _ = write!(s, "{}", mime);
-            ::test::black_box(&s);
-            unsafe { s.as_mut_vec().set_len(0); }
-        })
-    }
-
-    #[cfg(feature = "nightly")]
-    #[bench]
-    fn bench_from_str(b: &mut Bencher) {
-        let s = "text/plain; charset=utf-8; foo=bar";
-        b.bytes = s.as_bytes().len() as u64;
-        b.iter(|| s.parse::<Mime>())
-    }
-}
--- a/third_party/rust/mime/.cargo-checksum.json
+++ b/third_party/rust/mime/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".travis.yml":"713aa1cac091a99e295194ca0dfd6d74028edbb02a0f5f627f3d3dfdf6437ee0","Cargo.toml":"c2757b0a3b45e977f1f872603ad3cee9a029ffb9a37af5eb639a7c16c96fa3d9","LICENSE":"df9cfd06d8a44d9a671eadd39ffd97f166481da015a30f45dfd27886209c5922","README.md":"706ee5777dbfea1255359f2dd3f905f7bb89282a528c9c14e38751e5e874fd5e","src/lib.rs":"0f534df49767cdf07ee2f59db9b8aeb8ca9f552531504eef0b1bbe55f6fbd7f7"},"package":"ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0"}
\ No newline at end of file
+{"files":{".travis.yml":"713aa1cac091a99e295194ca0dfd6d74028edbb02a0f5f627f3d3dfdf6437ee0","Cargo.toml":"cf9de6a21aa19f3f8c5e074625629f93f3f38cff8d57598e4287a554f10b1549","LICENSE":"df9cfd06d8a44d9a671eadd39ffd97f166481da015a30f45dfd27886209c5922","README.md":"706ee5777dbfea1255359f2dd3f905f7bb89282a528c9c14e38751e5e874fd5e","src/lib.rs":"9635770a9af281e355a538a5f629b9b338b9350c71cc2ec5f7c101794a3289f7"},"package":"9d69889cdc6336ed56b174514ce876c4c3dc564cc23dd872e7bca589bb2a36c8"}
\ No newline at end of file
--- a/third_party/rust/mime/Cargo.toml
+++ b/third_party/rust/mime/Cargo.toml
@@ -1,37 +1,25 @@
-# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
-#
-# When uploading crates to the registry Cargo will automatically
-# "normalize" Cargo.toml files for maximal compatibility
-# with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g. crates.io) dependencies
-#
-# If you believe there's an error in this file please file an
-# issue against the rust-lang/cargo repository. If you're
-# editing this file be aware that the upstream Cargo.toml
-# will likely look very different (and much more reasonable)
+[package]
 
-[package]
 name = "mime"
-version = "0.2.6"
+version = "0.2.4"
 authors = ["Sean McArthur <sean.monstar@gmail.com>"]
+license = "MIT"
 description = "Strongly Typed Mimes"
 documentation = "http://hyperium.github.io/mime.rs"
+repository = "https://github.com/hyperium/mime.rs"
 keywords = ["mime", "media-extensions", "media-types"]
-license = "MIT"
-repository = "https://github.com/hyperium/mime.rs"
+
+[dependencies]
+log = "0.3"
+serde = { version = ">=0.7, <0.9", optional = true }
+
+[dev-dependencies]
+serde_json = ">=0.7, <0.9"
+
 [dependencies.heapsize]
 version = ">=0.2.0, <0.4"
 optional = true
 
-[dependencies.log]
-version = "0.3"
-
-[dependencies.serde]
-version = ">=0.7, <0.9"
-optional = true
-[dev-dependencies.serde_json]
-version = ">=0.7, <0.9"
-
 [features]
 heap_size = ["heapsize"]
 nightly = []
--- a/third_party/rust/mime/src/lib.rs
+++ b/third_party/rust/mime/src/lib.rs
@@ -36,16 +36,24 @@ extern crate serde_json;
 #[cfg(feature = "heapsize")]
 extern crate heapsize;
 
 use std::ascii::AsciiExt;
 use std::fmt;
 use std::iter::Enumerate;
 use std::str::{FromStr, Chars};
 
+macro_rules! inspect(
+    ($s:expr, $t:expr) => ({
+        let t = $t;
+        trace!("inspect {}: {:?}", $s, t);
+        t
+    })
+);
+
 /// Mime, or Media Type. Encapsulates common registers types.
 ///
 /// Consider that a traditional mime type contains a "top level type",
 /// a "sub level type", and 0-N "parameters". And they're all strings.
 /// Strings everywhere. Strings mean typos. Rust has type safety. We should
 /// use types!
 ///
 /// So, Mime bundles together this data into types so the compiler can catch
@@ -71,17 +79,16 @@ impl<T: AsRef<[Param]> + heapsize::HeapS
     fn heap_size_of_children(&self) -> usize {
         self.0.heap_size_of_children() +
         self.1.heap_size_of_children() +
         self.2.heap_size_of_children()
     }
 }
 
 impl<LHS: AsRef<[Param]>, RHS: AsRef<[Param]>> PartialEq<Mime<RHS>> for Mime<LHS> {
-    #[inline]
     fn eq(&self, other: &Mime<RHS>) -> bool {
         self.0 == other.0 && self.1 == other.1 && self.2.as_ref() == other.2.as_ref()
     }
 }
 
 /// Easily create a Mime without having to import so many enums.
 ///
 /// # Example
@@ -146,22 +153,21 @@ macro_rules! enoom {
         impl ::std::ops::Deref for $en {
             type Target = str;
             fn deref(&self) -> &str {
                 self.as_str()
             }
         }
 
         impl PartialEq for $en {
-            #[inline]
             fn eq(&self, other: &$en) -> bool {
                 match (self, other) {
                     $( (&$en::$ty, &$en::$ty) => true ),*,
                     (&$en::$ext(ref a), &$en::$ext(ref b)) => a == b,
-                    (_, _) => self.as_str() == other.as_str(),
+                    _ => self.as_str() == other.as_str()
                 }
             }
         }
 
         impl PartialEq<String> for $en {
             fn eq(&self, other: &String) -> bool {
                 self.as_str() == other
             }
@@ -207,17 +213,17 @@ macro_rules! enoom {
             }
         }
 
         impl FromStr for $en {
             type Err = ();
             fn from_str(s: &str) -> Result<$en, ()> {
                 Ok(match s {
                     $(_s if _s == $text => $en::$ty),*,
-                    s => $en::$ext(s.to_string())
+                    s => $en::$ext(inspect!(stringify!($ext), s).to_string())
                 })
             }
         }
 
         #[cfg(feature = "heapsize")]
         impl heapsize::HeapSizeOf for $en {
             fn heap_size_of_children(&self) -> usize {
                 match *self {
@@ -291,45 +297,16 @@ enoom! {
     Utf8, "utf-8";
 }
 
 pub type Param = (Attr, Value);
 
 impl<T: AsRef<[Param]>> fmt::Display for Mime<T> {
     #[inline]
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        // It's much faster to write a single string, as opposed to push
-        // several parts through f.write_str(). So, check for the most common
-        // mime types, and fast track them.
-        if let TopLevel::Text = self.0 {
-            if let SubLevel::Plain = self.1 {
-                let attrs = self.2.as_ref();
-                if attrs.len() == 0 {
-                    return f.write_str("text/plain");
-                } else if &[(Attr::Charset, Value::Utf8)] == attrs {
-                    return f.write_str("text/plain; charset=utf-8");
-                }
-            }
-        } else if let TopLevel::Application = self.0 {
-            if let SubLevel::Json = self.1 {
-                let attrs = self.2.as_ref();
-                if attrs.len() == 0 {
-                    return f.write_str("application/json");
-                }
-            }
-        } else if let TopLevel::Star = self.0 {
-            if let SubLevel::Star = self.1 {
-                let attrs = self.2.as_ref();
-                if attrs.len() == 0 {
-                    return f.write_str("*/*");
-                }
-            }
-        }
-
-        // slower general purpose fmt
         try!(fmt::Display::fmt(&self.0, f));
         try!(f.write_str("/"));
         try!(fmt::Display::fmt(&self.1, f));
         for param in self.2.as_ref() {
             try!(f.write_str("; "));
             try!(fmt::Display::fmt(&param.0, f));
             try!(f.write_str("="));
             try!(fmt::Display::fmt(&param.1, f));
@@ -354,17 +331,17 @@ impl FromStr for Mime {
         let ascii = raw.to_ascii_lowercase(); // lifetimes :(
         let len = ascii.len();
         let mut iter = ascii.chars().enumerate();
         let mut params = vec![];
         // toplevel
         let mut start;
         let top;
         loop {
-            match iter.next() {
+            match inspect!("top iter", iter.next()) {
                 Some((0, c)) if is_restricted_name_first_char(c) => (),
                 Some((i, c)) if i > 0 && is_restricted_name_char(c) => (),
                 Some((i, '/')) if i > 0 => match FromStr::from_str(&ascii[..i]) {
                     Ok(t) => {
                         top = t;
                         start = i + 1;
                         break;
                     }
@@ -374,17 +351,17 @@ impl FromStr for Mime {
             };
 
         }
 
         // sublevel
         let sub;
         let mut sub_star = false;
         loop {
-            match iter.next() {
+            match inspect!("sub iter", iter.next()) {
                 Some((i, '*')) if i == start => {
                     sub_star = true;
                 },
                 Some((i, c)) if i == start && is_restricted_name_first_char(c) => (),
                 Some((i, c)) if !sub_star && i > start && is_restricted_name_char(c) => (),
                 Some((i, ';')) if i > start => match FromStr::from_str(&ascii[start..i]) {
                     Ok(s) => {
                         sub = s;
@@ -399,17 +376,17 @@ impl FromStr for Mime {
                 },
                 _ => return Err(())
             };
         }
 
         // params
         debug!("starting params, len={}", len);
         loop {
-            match param_from_str(raw, &ascii, &mut iter, start) {
+            match inspect!("param", param_from_str(raw, &ascii, &mut iter, start)) {
                 Some((p, end)) => {
                     params.push(p);
                     start = end;
                     if start >= len {
                         break;
                     }
                 }
                 None => break
@@ -442,23 +419,23 @@ impl serde::de::Deserialize for Mime {
         Ok(mime)
     }
 }
 
 fn param_from_str(raw: &str, ascii: &str, iter: &mut Enumerate<Chars>, mut start: usize) -> Option<(Param, usize)> {
     let attr;
     debug!("param_from_str, start={}", start);
     loop {
-        match iter.next() {
+        match inspect!("attr iter", iter.next()) {
             Some((i, ' ')) if i == start => start = i + 1,
             Some((i, c)) if i == start && is_restricted_name_first_char(c) => (),
             Some((i, c)) if i > start && is_restricted_name_char(c) => (),
             Some((i, '=')) if i > start => match FromStr::from_str(&ascii[start..i]) {
                 Ok(a) => {
-                    attr = a;
+                    attr = inspect!("attr", a);
                     start = i + 1;
                     break;
                 },
                 Err(_) => return None
             },
             _ => return None
         }
     }
@@ -466,17 +443,17 @@ fn param_from_str(raw: &str, ascii: &str
     let value;
     // values must be restrict-name-char or "anything goes"
     let mut is_quoted = false;
 
     {
         let substr = |a,b| { if attr==Attr::Charset { &ascii[a..b] } else { &raw[a..b] } };
         let endstr = |a| { if attr==Attr::Charset { &ascii[a..] } else { &raw[a..] } };
         loop {
-            match iter.next() {
+            match inspect!("value iter", iter.next()) {
                 Some((i, '"')) if i == start => {
                     debug!("quoted");
                     is_quoted = true;
                     start = i + 1;
                 },
                 Some((i, c)) if i == start && is_restricted_name_first_char(c) => (),
                 Some((i, '"')) if i > start && is_quoted => match FromStr::from_str(substr(start,i)) {
                     Ok(v) => {
@@ -630,17 +607,17 @@ mod tests {
         let deserialized: Mime = serde_json::from_str(&serialized).unwrap();
         assert_eq!(mime, deserialized);
     }
 
     #[cfg(feature = "nightly")]
     #[bench]
     fn bench_fmt(b: &mut Bencher) {
         use std::fmt::Write;
-        let mime = mime!(Text/Plain; Charset=Utf8);
+        let mime = mime!(Text/Plain; Charset=Utf8, ("foo")=("bar"));
         b.bytes = mime.to_string().as_bytes().len() as u64;
         let mut s = String::with_capacity(64);
         b.iter(|| {
             let _ = write!(s, "{}", mime);
             ::test::black_box(&s);
             unsafe { s.as_mut_vec().set_len(0); }
         })
     }
deleted file mode 100644
--- a/third_party/rust/num_cpus-1.6.0/.appveyor.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-environment:
-  matrix:
-  - TARGET: x86_64-pc-windows-msvc
-  - TARGET: i686-pc-windows-msvc
-  - TARGET: x86_64-pc-windows-gnu
-  - TARGET: i686-pc-windows-gnu
-install:
-  - curl -sSf -o rustup-init.exe https://win.rustup.rs/
-  - rustup-init.exe -y --default-host %TARGET%
-  - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
-  - rustc -vV
-  - cargo -vV
-build: false
-test_script:
-  - cargo build --verbose
-  - cargo test --verbose
deleted file mode 100644
--- a/third_party/rust/num_cpus-1.6.0/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".appveyor.yml":"2f3f82a91e82a6c0b601048a5c9cd9b39fa78dfb7172ecfe7ff3d4d010af66d8",".travis.yml":"979eec484d5ceb95a6553860cafa053694613fbafda322e6d159cfab261d99a0","Cargo.toml":"06c4215944a3f040dd2d10a724c5926f30b186cb6835fba7b6dab6930c456d78","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0593d22d122d4bfec6407115e3907546312976f75473417aaa4c57ecd2095ae6","README.md":"4d586d8185ea43e6472db25ad748da265024869eabdcd62805c2bf3de06c4eb4","src/lib.rs":"295224974716d3ac2cd3d9f65764bae2ec92d94c01f939f62cf3b00974bb3e63"},"package":"83df569ffd47dbf87f36bead512632f89e90882b8e7a14286d0471daf6b72de9"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/num_cpus-1.6.0/.travis.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-language: rust
-rust:
-  - stable
-  - beta
-  - nightly
-
-sudo: false
-
-cache:
-  apt: true
-  directories:
-    - target/debug/deps
-    - target/debug/build
-
-script:
-  - cargo build --verbose
-  - cargo test --verbose
-
-notifications:
-  email: false
deleted file mode 100644
--- a/third_party/rust/num_cpus-1.6.0/Cargo.toml
+++ /dev/null
@@ -1,24 +0,0 @@
-# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
-#
-# When uploading crates to the registry Cargo will automatically
-# "normalize" Cargo.toml files for maximal compatibility
-# with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g. crates.io) dependencies
-#
-# If you believe there's an error in this file please file an
-# issue against the rust-lang/cargo repository. If you're
-# editing this file be aware that the upstream Cargo.toml
-# will likely look very different (and much more reasonable)
-
-[package]
-name = "num_cpus"
-version = "1.6.0"
-authors = ["Sean McArthur <sean.monstar@gmail.com>"]
-description = "Get the number of CPUs on a machine."
-documentation = "https://docs.rs/num_cpus"
-keywords = ["cpu", "cpus", "cores"]
-categories = ["hardware-support"]
-license = "MIT/Apache-2.0"
-repository = "https://github.com/seanmonstar/num_cpus"
-[dependencies.libc]
-version = "0.2.6"
deleted file mode 100644
--- a/third_party/rust/num_cpus-1.6.0/LICENSE-APACHE
+++ /dev/null
@@ -1,201 +0,0 @@
-                              Apache License
-                        Version 2.0, January 2004
-                     http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-   "License" shall mean the terms and conditions for use, reproduction,
-   and distribution as defined by Sections 1 through 9 of this document.
-
-   "Licensor" shall mean the copyright owner or entity authorized by
-   the copyright owner that is granting the License.
-
-   "Legal Entity" shall mean the union of the acting entity and all
-   other entities that control, are controlled by, or are under common
-   control with that entity. For the purposes of this definition,
-   "control" means (i) the power, direct or indirect, to cause the
-   direction or management of such entity, whether by contract or
-   otherwise, or (ii) ownership of fifty percent (50%) or more of the
-   outstanding shares, or (iii) beneficial ownership of such entity.
-
-   "You" (or "Your") shall mean an individual or Legal Entity
-   exercising permissions granted by this License.
-
-   "Source" form shall mean the preferred form for making modifications,
-   including but not limited to software source code, documentation
-   source, and configuration files.
-
-   "Object" form shall mean any form resulting from mechanical
-   transformation or translation of a Source form, including but
-   not limited to compiled object code, generated documentation,
-   and conversions to other media types.
-
-   "Work" shall mean the work of authorship, whether in Source or
-   Object form, made available under the License, as indicated by a
-   copyright notice that is included in or attached to the work
-   (an example is provided in the Appendix below).
-
-   "Derivative Works" shall mean any work, whether in Source or Object
-   form, that is based on (or derived from) the Work and for which the
-   editorial revisions, annotations, elaborations, or other modifications
-   represent, as a whole, an original work of authorship. For the purposes
-   of this License, Derivative Works shall not include works that remain
-   separable from, or merely link (or bind by name) to the interfaces of,
-   the Work and Derivative Works thereof.
-
-   "Contribution" shall mean any work of authorship, including
-   the original version of the Work and any modifications or additions
-   to that Work or Derivative Works thereof, that is intentionally
-   submitted to Licensor for inclusion in the Work by the copyright owner
-   or by an individual or Legal Entity authorized to submit on behalf of
-   the copyright owner. For the purposes of this definition, "submitted"
-   means any form of electronic, verbal, or written communication sent
-   to the Licensor or its representatives, including but not limited to
-   communication on electronic mailing lists, source code control systems,
-   and issue tracking systems that are managed by, or on behalf of, the
-   Licensor for the purpose of discussing and improving the Work, but
-   excluding communication that is conspicuously marked or otherwise
-   designated in writing by the copyright owner as "Not a Contribution."
-
-   "Contributor" shall mean Licensor and any individual or Legal Entity
-   on behalf of whom a Contribution has been received by Licensor and
-   subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   copyright license to reproduce, prepare Derivative Works of,
-   publicly display, publicly perform, sublicense, and distribute the
-   Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   (except as stated in this section) patent license to make, have made,
-   use, offer to sell, sell, import, and otherwise transfer the Work,
-   where such license applies only to those patent claims licensable
-   by such Contributor that are necessarily infringed by their
-   Contribution(s) alone or by combination of their Contribution(s)
-   with the Work to which such Contribution(s) was submitted. If You
-   institute patent litigation against any entity (including a
-   cross-claim or counterclaim in a lawsuit) alleging that the Work
-   or a Contribution incorporated within the Work constitutes direct
-   or contributory patent infringement, then any patent licenses
-   granted to You under this License for that Work shall terminate
-   as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
-   Work or Derivative Works thereof in any medium, with or without
-   modifications, and in Source or Object form, provided that You
-   meet the following conditions:
-
-   (a) You must give any other recipients of the Work or
-       Derivative Works a copy of this License; and
-
-   (b) You must cause any modified files to carry prominent notices
-       stating that You changed the files; and
-
-   (c) You must retain, in the Source form of any Derivative Works
-       that You distribute, all copyright, patent, trademark, and
-       attribution notices from the Source form of the Work,
-       excluding those notices that do not pertain to any part of
-       the Derivative Works; and
-
-   (d) If the Work includes a "NOTICE" text file as part of its
-       distribution, then any Derivative Works that You distribute must
-       include a readable copy of the attribution notices contained
-       within such NOTICE file, excluding those notices that do not
-       pertain to any part of the Derivative Works, in at least one
-       of the following places: within a NOTICE text file distributed
-       as part of the Derivative Works; within the Source form or
-       documentation, if provided along with the Derivative Works; or,
-       within a display generated by the Derivative Works, if and
-       wherever such third-party notices normally appear. The contents
-       of the NOTICE file are for informational purposes only and
-       do not modify the License. You may add Your own attribution
-       notices within Derivative Works that You distribute, alongside
-       or as an addendum to the NOTICE text from the Work, provided
-       that such additional attribution notices cannot be construed
-       as modifying the License.
-
-   You may add Your own copyright statement to Your modifications and
-   may provide additional or different license terms and conditions
-   for use, reproduction, or distribution of Your modifications, or
-   for any such Derivative Works as a whole, provided Your use,
-   reproduction, and distribution of the Work otherwise complies with
-   the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
-   any Contribution intentionally submitted for inclusion in the Work
-   by You to the Licensor shall be under the terms and conditions of
-   this License, without any additional terms or conditions.
-   Notwithstanding the above, nothing herein shall supersede or modify
-   the terms of any separate license agreement you may have executed
-   with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
-   names, trademarks, service marks, or product names of the Licensor,
-   except as required for reasonable and customary use in describing the
-   origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
-   agreed to in writing, Licensor provides the Work (and each
-   Contributor provides its Contributions) on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-   implied, including, without limitation, any warranties or conditions
-   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-   PARTICULAR PURPOSE. You are solely responsible for determining the
-   appropriateness of using or redistributing the Work and assume any
-   risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
-   whether in tort (including negligence), contract, or otherwise,
-   unless required by applicable law (such as deliberate and grossly
-   negligent acts) or agreed to in writing, shall any Contributor be
-   liable to You for damages, including any direct, indirect, special,
-   incidental, or consequential damages of any character arising as a
-   result of this License or out of the use or inability to use the
-   Work (including but not limited to damages for loss of goodwill,
-   work stoppage, computer failure or malfunction, or any and all
-   other commercial damages or losses), even if such Contributor
-   has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
-   the Work or Derivative Works thereof, You may choose to offer,
-   and charge a fee for, acceptance of support, warranty, indemnity,
-   or other liability obligations and/or rights consistent with this
-   License. However, in accepting such obligations, You may act only
-   on Your own behalf and on Your sole responsibility, not on behalf
-   of any other Contributor, and only if You agree to indemnify,
-   defend, and hold each Contributor harmless for any liability
-   incurred by, or claims asserted against, such Contributor by reason
-   of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
-   To apply the Apache License to your work, attach the following
-   boilerplate notice, with the fields enclosed by brackets "[]"
-   replaced with your own identifying information. (Don't include
-   the brackets!)  The text should be enclosed in the appropriate
-   comment syntax for the file format. We also recommend that a
-   file or class name and description of purpose be included on the
-   same "printed page" as the copyright notice for easier
-   identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-	http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
deleted file mode 100644
--- a/third_party/rust/num_cpus-1.6.0/LICENSE-MIT
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2015
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
deleted file mode 100644
--- a/third_party/rust/num_cpus-1.6.0/README.md
+++ /dev/null
@@ -1,42 +0,0 @@
-# num_cpus
-
-[![crates.io](http://meritbadge.herokuapp.com/num_cpus)](https://crates.io/crates/num_cpus)
-[![Travis CI Status](https://travis-ci.org/seanmonstar/num_cpus.svg?branch=master)](https://travis-ci.org/seanmonstar/num_cpus)
-[![AppVeyor status](https://ci.appveyor.com/api/projects/status/qn8t6grhko5jwno6?svg=true)](https://ci.appveyor.com/project/seanmonstar/num-cpus)
-
-[Documentation](https://docs.rs/num_cpus)
-
-Count the number of CPUs on the current machine.
-
-## Usage
-
-Add to Cargo.toml:
-
-```toml
-[dependencies]
-num_cpus = "1.0"
-```
-
-In your `main.rs` or `lib.rs`:
-
-```rust
-extern crate num_cpus;
-
-// elsewhere
-let num = num_cpus::get();
-```
-
-## License
-
-Licensed under either of
-
- * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
- * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
-
-at your option.
-
-### Contribution
-
-Unless you explicitly state otherwise, any contribution intentionally submitted
-for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
-additional terms or conditions.
deleted file mode 100644
--- a/third_party/rust/num_cpus-1.6.0/src/lib.rs
+++ /dev/null
@@ -1,316 +0,0 @@
-//! # num_cpus
-//!
-//! A crate with utilities to determine the number of CPUs available on the
-//! current system.
-//!
-//! ## Example
-//!
-//! ```
-//! let cpus = num_cpus::get();
-//! ```
-#![cfg_attr(test, deny(warnings))]
-#![deny(missing_docs)]
-#![allow(non_snake_case)]
-
-#[cfg(not(windows))]
-extern crate libc;
-
-/// Returns the number of available CPUs of the current system.
-///
-/// # Note
-///
-/// This will check sched affinity on Linux.
-#[inline]
-pub fn get() -> usize {
-    get_num_cpus()
-}
-
-/// Returns the number of physical cores of the current system.
-///
-/// If not possible on the particular architecture, returns same as `get()`
-/// which is the logical CPUs.
-#[inline]
-pub fn get_physical() -> usize {
-    get_num_physical_cpus()
-}
-
-
-#[cfg(not(any(target_os = "linux", target_os = "windows")))]
-#[inline]
-fn get_num_physical_cpus() -> usize {
-    // Not implemented, fallback
-    get_num_cpus()
-}
-
-#[cfg(target_os = "windows")]
-fn get_num_physical_cpus() -> usize {
-    match get_num_physical_cpus_windows() {
-        Some(num) => num,
-        None => get_num_cpus()
-    }
-}
-
-#[cfg(target_os = "windows")]
-fn get_num_physical_cpus_windows() -> Option<usize> {
-    // Inspired by https://msdn.microsoft.com/en-us/library/ms683194
-
-    use std::ptr;
-    use std::mem;
-
-    #[allow(non_upper_case_globals)]
-    const RelationProcessorCore: u32 = 0;
-
-    #[repr(C)]
-    #[allow(non_camel_case_types)]
-    struct SYSTEM_LOGICAL_PROCESSOR_INFORMATION {
-        mask: usize,
-        relationship: u32,
-        _unused: [u64; 2]
-    }
-
-    extern "system" {
-        fn GetLogicalProcessorInformation(
-            info: *mut SYSTEM_LOGICAL_PROCESSOR_INFORMATION,
-            length: &mut u32
-        ) -> u32;
-    }
-
-    // First we need to determine how much space to reserve.
-
-    // The required size of the buffer, in bytes.
-    let mut needed_size = 0;
-
-    unsafe {
-        GetLogicalProcessorInformation(ptr::null_mut(), &mut needed_size);
-    }
-
-    let struct_size = mem::size_of::<SYSTEM_LOGICAL_PROCESSOR_INFORMATION>() as u32;
-
-    // Could be 0, or some other bogus size.
-    if needed_size == 0 || needed_size < struct_size || needed_size % struct_size != 0 {
-        return None;
-    }
-
-    let count = needed_size / struct_size;
-
-    // Allocate some memory where we will store the processor info.
-    let mut buf = Vec::with_capacity(count as usize);
-
-    let result;
-
-    unsafe {
-        result = GetLogicalProcessorInformation(buf.as_mut_ptr(), &mut needed_size);
-    }
-
-    // Failed for any reason.
-    if result == 0 {
-        return None;
-    }
-
-    let count = needed_size / struct_size;
-
-    unsafe {
-        buf.set_len(count as usize);
-    }
-
-    let phys_proc_count = buf.iter()
-        // Only interested in processor packages (physical processors.)
-        .filter(|proc_info| proc_info.relationship == RelationProcessorCore)
-        .count();
-
-    if phys_proc_count == 0 {
-        None
-    } else {
-        Some(phys_proc_count)
-    }
-}
-
-#[cfg(target_os = "linux")]
-fn get_num_physical_cpus() -> usize {
-    use std::io::BufReader;
-    use std::io::BufRead;
-    use std::fs::File;
-    use std::collections::HashSet;
-
-    let file = match File::open("/proc/cpuinfo") {
-        Ok(val) => val,
-        Err(_) => {return get_num_cpus()},
-    };
-    let reader = BufReader::new(file);
-    let mut set = HashSet::new();
-    let mut coreid: u32 = 0;
-    let mut physid: u32 = 0;
-    let mut chgcount = 0;
-    for line in reader.lines().filter_map(|result| result.ok()) {
-        let parts: Vec<&str> = line.split(':').map(|s| s.trim()).collect();
-        if parts.len() != 2 {
-            continue
-        }
-        if parts[0] == "core id" || parts[0] == "physical id" {
-            let value = match parts[1].trim().parse() {
-              Ok(val) => val,
-              Err(_) => break,
-            };
-            match parts[0] {
-                "core id"     => coreid = value,
-                "physical id" => physid = value,
-                _ => {},
-            }
-            chgcount += 1;
-        }
-        if chgcount == 2 {
-            set.insert((physid, coreid));
-            chgcount = 0;
-        }
-    }
-    let count = set.len();
-    if count == 0 { get_num_cpus() } else { count }
-}
-
-#[cfg(windows)]
-fn get_num_cpus() -> usize {
-    #[repr(C)]
-    struct SYSTEM_INFO {
-        wProcessorArchitecture: u16,
-        wReserved: u16,
-        dwPageSize: u32,
-        lpMinimumApplicationAddress: *mut u8,
-        lpMaximumApplicationAddress: *mut u8,
-        dwActiveProcessorMask: *mut u8,
-        dwNumberOfProcessors: u32,
-        dwProcessorType: u32,
-        dwAllocationGranularity: u32,
-        wProcessorLevel: u16,
-        wProcessorRevision: u16,
-    }
-
-    extern "system" {
-        fn GetSystemInfo(lpSystemInfo: *mut SYSTEM_INFO);
-    }
-
-    unsafe {
-        let mut sysinfo: SYSTEM_INFO = std::mem::uninitialized();
-        GetSystemInfo(&mut sysinfo);
-        sysinfo.dwNumberOfProcessors as usize
-    }
-}
-
-#[cfg(any(target_os = "freebsd",
-          target_os = "dragonfly",
-          target_os = "bitrig",
-          target_os = "netbsd"))]
-fn get_num_cpus() -> usize {
-    let mut cpus: libc::c_uint = 0;
-    let mut cpus_size = std::mem::size_of_val(&cpus);
-
-    unsafe {
-        cpus = libc::sysconf(libc::_SC_NPROCESSORS_ONLN) as libc::c_uint;
-    }
-    if cpus < 1 {
-        let mut mib = [libc::CTL_HW, libc::HW_NCPU, 0, 0];
-        unsafe {
-            libc::sysctl(mib.as_mut_ptr(),
-                         2,
-                         &mut cpus as *mut _ as *mut _,
-                         &mut cpus_size as *mut _ as *mut _,
-                         0 as *mut _,
-                         0);
-        }
-        if cpus < 1 {
-            cpus = 1;
-        }
-    }
-    cpus as usize
-}
-
-#[cfg(target_os = "openbsd")]
-fn get_num_cpus() -> usize {
-    let mut cpus: libc::c_uint = 0;
-    let mut cpus_size = std::mem::size_of_val(&cpus);
-    let mut mib = [libc::CTL_HW, libc::HW_NCPU, 0, 0];
-
-    unsafe {
-        libc::sysctl(mib.as_mut_ptr(),
-                     2,
-                     &mut cpus as *mut _ as *mut _,
-                     &mut cpus_size as *mut _ as *mut _,
-                     0 as *mut _,
-                     0);
-    }
-    if cpus < 1 {
-        cpus = 1;
-    }
-    cpus as usize
-}
-
-#[cfg(target_os = "linux")]
-fn get_num_cpus() -> usize {
-    let mut set:  libc::cpu_set_t = unsafe { std::mem::zeroed() };
-    if unsafe { libc::sched_getaffinity(0, std::mem::size_of::<libc::cpu_set_t>(), &mut set) } == 0 {
-        let mut count: u32 = 0;
-        for i in 0..libc::CPU_SETSIZE as usize {
-            if unsafe { libc::CPU_ISSET(i, &set) } {
-                count += 1
-            }
-        }
-        count as usize
-    } else {
-        let cpus = unsafe { libc::sysconf(libc::_SC_NPROCESSORS_ONLN) };
-        if cpus < 1 {
-            1
-        } else {
-            cpus as usize
-        }
-    }
-}
-
-#[cfg(any(
-    target_os = "nacl",
-    target_os = "macos",
-    target_os = "ios",
-    target_os = "android",
-    target_os = "solaris",
-    target_os = "fuchsia")
-)]
-fn get_num_cpus() -> usize {
-    let cpus = unsafe { libc::sysconf(libc::_SC_NPROCESSORS_ONLN) };
-    if cpus < 1 {
-        1
-    } else {
-        cpus as usize
-    }
-}
-
-#[cfg(any(target_os = "emscripten", target_os = "redox", target_os = "haiku"))]
-fn get_num_cpus() -> usize {
-    1
-}
-
-#[cfg(test)]
-mod tests {
-    fn env_var(name: &'static str) -> Option<usize> {
-        ::std::env::var(name).ok().map(|val| val.parse().unwrap())
-    }
-
-    #[test]
-    fn test_get() {
-        let num = super::get();
-        if let Some(n) = env_var("NUM_CPUS_TEST_GET") {
-            assert_eq!(num, n);
-        } else {
-            assert!(num > 0);
-            assert!(num < 236_451);
-        }
-    }
-
-    #[test]
-    fn test_get_physical() {
-        let num = super::get_physical();
-        if let Some(n) = env_var("NUM_CPUS_TEST_GET_PHYSICAL") {
-            assert_eq!(num, n);
-        } else {
-            assert!(num > 0);
-            assert!(num < 236_451);
-        }
-    }
-}
--- a/third_party/rust/num_cpus/.cargo-checksum.json
+++ b/third_party/rust/num_cpus/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".appveyor.yml":"2f3f82a91e82a6c0b601048a5c9cd9b39fa78dfb7172ecfe7ff3d4d010af66d8",".travis.yml":"7ed9195d081e7416bdd3b8e55884d1576d884254f9c46939cbe03340d812cbb1","CHANGELOG.md":"fef18c34a831fd8d6a6c4248ee76363a2ff273757989fd0f1fd0ba410421c08b","CONTRIBUTING.md":"2390961aab1bba026135338da1216b6cc828dfaeed9357d9c155c55a252d3efb","Cargo.toml":"70e408f452f3b9a83dd60cf5d1e2fcf92982a0fffbd017601e974e0ea2df3224","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0593d22d122d4bfec6407115e3907546312976f75473417aaa4c57ecd2095ae6","README.md":"12451d6905fe9cdac206410de8071b562e5ea936b6e55a19ac97982831a0fcdb","src/lib.rs":"deccac6ae539302e2f1c12b4f91cecd1583272916543ea09717a6ac91efc133c"},"package":"514f0d73e64be53ff320680ca671b64fe3fb91da01e1ae2ddc99eb51d453b20d"}
\ No newline at end of file
+{"files":{".appveyor.yml":"2f3f82a91e82a6c0b601048a5c9cd9b39fa78dfb7172ecfe7ff3d4d010af66d8",".travis.yml":"979eec484d5ceb95a6553860cafa053694613fbafda322e6d159cfab261d99a0","Cargo.toml":"06c4215944a3f040dd2d10a724c5926f30b186cb6835fba7b6dab6930c456d78","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0593d22d122d4bfec6407115e3907546312976f75473417aaa4c57ecd2095ae6","README.md":"4d586d8185ea43e6472db25ad748da265024869eabdcd62805c2bf3de06c4eb4","src/lib.rs":"295224974716d3ac2cd3d9f65764bae2ec92d94c01f939f62cf3b00974bb3e63"},"package":"83df569ffd47dbf87f36bead512632f89e90882b8e7a14286d0471daf6b72de9"}
\ No newline at end of file
--- a/third_party/rust/num_cpus/.travis.yml
+++ b/third_party/rust/num_cpus/.travis.yml
@@ -1,66 +1,20 @@
 language: rust
-rust: stable
-dist: trusty
+rust:
+  - stable
+  - beta
+  - nightly
+
 sudo: false
 
-cache: cargo
-
-install:
-  - if [ -z "$NO_ADD" ]; then rustup target add "$TARGET"; fi
+cache:
+  apt: true
+  directories:
+    - target/debug/deps
+    - target/debug/build
 
 script:
-  - cargo build --verbose --target "$TARGET"
-  # Only run the targets if we are on the same OS.
-  - if [ "$RUN" == "1" ]; then cargo test --verbose --target "$TARGET"; fi
-
-env:
-  global:
-    # Travis CI servers make 2 cores available to processes via virtualization.
-    # See https://docs.travis-ci.com/user/reference/overview/
-    - NUM_CPUS_TEST_GET=2
+  - cargo build --verbose
+  - cargo test --verbose
 
-matrix:
-  include:
-    # Linux
-    # 32-bit requires multilib.
-    - env: TARGET=i686-unknown-linux-gnu RUN=1
-      addons:
-        apt:
-          packages:
-            - gcc-multilib
-    # 64-bit stable.
-    - env: TARGET=x86_64-unknown-linux-gnu RUN=1 NO_ADD=1
-      rust: stable
-    # 64-bit beta.
-    - env: TARGET=x86_64-unknown-linux-gnu RUN=1 NO_ADD=1
-      rust: beta
-    # 64-bit nightly.
-    - env: TARGET=x86_64-unknown-linux-gnu RUN=1 NO_ADD=1
-      rust: nightly
-    # Mac OS X
-    - os: osx
-      env: TARGET=i686-apple-darwin RUN=1
-    - os: osx
-      env: TARGET=x86_64-apple-darwin RUN=1 NO_ADD=1
-    # Android
-    # - for x86
-    - env: TARGET=i686-linux-android
-    - env: TARGET=x86_64-linux-android
-    # - for ARM
-    - env: TARGET=arm-linux-androideabi
-    - env: TARGET=aarch64-linux-android
-    # IOS
-    - os: osx
-      osx_image: xcode9
-      env: TARGET=i386-apple-ios
-    - os: osx
-      osx_image: xcode9
-      env: TARGET=x86_64-apple-ios
-    # FreeBSD
-    - env: TARGET=x86_64-unknown-freebsd
-    # Fuchsia
-    - env: TARGET=x86_64-unknown-fuchsia
-    # NetBSD
-    - env: TARGET=x86_64-unknown-netbsd
-    # Emscripten
-    - env: TARGET=asmjs-unknown-emscripten
+notifications:
+  email: false
deleted file mode 100644
--- a/third_party/rust/num_cpus/CHANGELOG.md
+++ /dev/null
@@ -1,76 +0,0 @@
-## v1.7.0
-
-#### Features
-
-- add `get_physical` support for macOS
-
-#### Fixes
-
-- use `_SC_NPROCESSORS_CONF` on Unix targets
-
-### v1.6.2
-
-#### Fixes
-
-- revert 1.6.1 for now
-
-### v1.6.1
-
-#### Fixes
-
-- fixes sometimes incorrect num on Android/ARM Linux (#45)
-
-## v1.6.0
-
-#### Features
-
-- `get_physical` gains Windows support
-
-### v1.5.1
-
-#### Fixes
-
-- fix `get` to return 1 if `sysconf(_SC_NPROCESSORS_ONLN)` failed
-
-## v1.5.0
-
-#### Features
-
-- `get()` now checks `sched_affinity` on Linux
-
-## v1.4.0
-
-#### Features
-
-- add `haiku` target support
-
-## v1.3.0
-
-#### Features
-
-- add `redox` target support
-
-### v1.2.1
-
-#### Fixes
-
-- fixes `get_physical` count (454ff1b)
-
-## v1.2.0
-
-#### Features
-
-- add `emscripten` target support
-- add `fuchsia` target support
-
-## v1.1.0
-
-#### Features
-
-- added `get_physical` function to return number of physical CPUs found
-
-# v1.0.0
-
-#### Features
-
-- `get` function returns number of CPUs (physical and virtual) of current platform
deleted file mode 100644
--- a/third_party/rust/num_cpus/CONTRIBUTING.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Contributing
-
-## License
-
-Licensed under either of
-
- * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
- * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
-
-at your option.
-
-### Contribution
-
-Unless you explicitly state otherwise, any contribution intentionally submitted
-for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
-additional terms or conditions.
--- a/third_party/rust/num_cpus/Cargo.toml
+++ b/third_party/rust/num_cpus/Cargo.toml
@@ -7,19 +7,18 @@
 #
 # If you believe there's an error in this file please file an
 # issue against the rust-lang/cargo repository. If you're
 # editing this file be aware that the upstream Cargo.toml
 # will likely look very different (and much more reasonable)
 
 [package]
 name = "num_cpus"
-version = "1.7.0"
-authors = ["Sean McArthur <sean@seanmonstar.com>"]
+version = "1.6.0"
+authors = ["Sean McArthur <sean.monstar@gmail.com>"]
 description = "Get the number of CPUs on a machine."
 documentation = "https://docs.rs/num_cpus"
-readme = "README.md"
 keywords = ["cpu", "cpus", "cores"]
 categories = ["hardware-support"]
 license = "MIT/Apache-2.0"
 repository = "https://github.com/seanmonstar/num_cpus"
 [dependencies.libc]
-version = "0.2.26"
+version = "0.2.6"
--- a/third_party/rust/num_cpus/README.md
+++ b/third_party/rust/num_cpus/README.md
@@ -1,16 +1,15 @@
 # num_cpus
 
 [![crates.io](http://meritbadge.herokuapp.com/num_cpus)](https://crates.io/crates/num_cpus)
 [![Travis CI Status](https://travis-ci.org/seanmonstar/num_cpus.svg?branch=master)](https://travis-ci.org/seanmonstar/num_cpus)
 [![AppVeyor status](https://ci.appveyor.com/api/projects/status/qn8t6grhko5jwno6?svg=true)](https://ci.appveyor.com/project/seanmonstar/num-cpus)
 
-- [Documentation](https://docs.rs/num_cpus)
-- [CHANGELOG](CHANGELOG.md)
+[Documentation](https://docs.rs/num_cpus)
 
 Count the number of CPUs on the current machine.
 
 ## Usage
 
 Add to Cargo.toml:
 
 ```toml
@@ -18,11 +17,26 @@ Add to Cargo.toml:
 num_cpus = "1.0"
 ```
 
 In your `main.rs` or `lib.rs`:
 
 ```rust
 extern crate num_cpus;
 
-// count logical cores this process could try to use
+// elsewhere
 let num = num_cpus::get();
 ```
+
+## License
+
+Licensed under either of
+
+ * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
+ * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
+
+at your option.
+
+### Contribution
+
+Unless you explicitly state otherwise, any contribution intentionally submitted
+for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
+additional terms or conditions.
--- a/third_party/rust/num_cpus/src/lib.rs
+++ b/third_party/rust/num_cpus/src/lib.rs
@@ -5,23 +5,21 @@
 //!
 //! ## Example
 //!
 //! ```
 //! let cpus = num_cpus::get();
 //! ```
 #![cfg_attr(test, deny(warnings))]
 #![deny(missing_docs)]
-#![doc(html_root_url = "https://docs.rs/num_cpus/1.7.0")]
 #![allow(non_snake_case)]
 
 #[cfg(not(windows))]
 extern crate libc;
 
-
 /// Returns the number of available CPUs of the current system.
 ///
 /// # Note
 ///
 /// This will check sched affinity on Linux.
 #[inline]
 pub fn get() -> usize {
     get_num_cpus()
@@ -32,17 +30,17 @@ pub fn get() -> usize {
 /// If not possible on the particular architecture, returns same as `get()`
 /// which is the logical CPUs.
 #[inline]
 pub fn get_physical() -> usize {
     get_num_physical_cpus()
 }
 
 
-#[cfg(not(any(target_os = "linux", target_os = "windows", target_os="macos")))]
+#[cfg(not(any(target_os = "linux", target_os = "windows")))]
 #[inline]
 fn get_num_physical_cpus() -> usize {
     // Not implemented, fallback
     get_num_cpus()
 }
 
 #[cfg(target_os = "windows")]
 fn get_num_physical_cpus() -> usize {
@@ -240,40 +238,16 @@ fn get_num_cpus() -> usize {
                      0);
     }
     if cpus < 1 {
         cpus = 1;
     }
     cpus as usize
 }
 
-
-#[cfg(target_os = "macos")]
-fn get_num_physical_cpus() -> usize {
-    use std::ffi::CStr;
-    use std::ptr;
-
-    let mut cpus: i32 = 0;
-    let mut cpus_size = std::mem::size_of_val(&cpus);
-
-    let sysctl_name = CStr::from_bytes_with_nul(b"hw.physicalcpu\0")
-        .expect("byte literal is missing NUL");
-
-    unsafe {
-        if 0 != libc::sysctlbyname(sysctl_name.as_ptr(),
-                                   &mut cpus as *mut _ as *mut _,
-                                   &mut cpus_size as *mut _ as *mut _,
-                                   ptr::null_mut(),
-                                   0) {
-            return get_num_cpus();
-        }
-    }
-    cpus as usize
-}
-
 #[cfg(target_os = "linux")]
 fn get_num_cpus() -> usize {
     let mut set:  libc::cpu_set_t = unsafe { std::mem::zeroed() };
     if unsafe { libc::sched_getaffinity(0, std::mem::size_of::<libc::cpu_set_t>(), &mut set) } == 0 {
         let mut count: u32 = 0;
         for i in 0..libc::CPU_SETSIZE as usize {
             if unsafe { libc::CPU_ISSET(i, &set) } {
                 count += 1
@@ -294,24 +268,17 @@ fn get_num_cpus() -> usize {
     target_os = "nacl",
     target_os = "macos",
     target_os = "ios",
     target_os = "android",
     target_os = "solaris",
     target_os = "fuchsia")
 )]
 fn get_num_cpus() -> usize {
-    // On ARM targets, processors could be turned off to save power.
-    // Use `_SC_NPROCESSORS_CONF` to get the real number.
-    #[cfg(any(target_arch = "arm", target_arch = "aarch64"))]
-    const CONF_NAME: libc::c_int = libc::_SC_NPROCESSORS_CONF;
-    #[cfg(not(any(target_arch = "arm", target_arch = "aarch64")))]
-    const CONF_NAME: libc::c_int = libc::_SC_NPROCESSORS_ONLN;
-
-    let cpus = unsafe { libc::sysconf(CONF_NAME) };
+    let cpus = unsafe { libc::sysconf(libc::_SC_NPROCESSORS_ONLN) };
     if cpus < 1 {
         1
     } else {
         cpus as usize
     }
 }
 
 #[cfg(any(target_os = "emscripten", target_os = "redox", target_os = "haiku"))]
deleted file mode 100644
--- a/third_party/rust/redox_syscall-0.1.16/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{"Cargo.toml":"e1423d4f80dd1b358812a9993312cf6338df844c2b15e423ab779bf914cead14","src/arch/arm.rs":"0cd845b3790f7358b5290b58163ae2663b46b7ecf64eb8c6b0a29b33da6f143c","src/arch/x86.rs":"3fc9757cbb775bd08da9999ab39d95b62b3cb509e0ab309dd26c11c3fbdbc778","src/arch/x86_64.rs":"37bc2c6e74c009ff5f2896b249fac7ddf9f5e30e223a5122a28a93cef5ba33b1","src/call.rs":"7913da5b7d8b11e290d863d6cbca17be20c98bef420ddb964519a9c9cfeff366","src/data.rs":"c3406d581387828b6fb246bea2b57582cef890cedeb2c0e632e472cd3776d884","src/error.rs":"b23c12db8cafb64f3b909a95bdd47cf03f62f6fa1201b40892febf46ec56bcb4","src/flag.rs":"400c91c57b1ab1afd6ab06c0582b1b0817590688900882de31fc3a4aab27da49","src/io/dma.rs":"4ab65016b3bc9121f0844dc4b8de77608eba327c0e0d930900254242b2c204b0","src/io/io.rs":"1bcb36d1867e9bab6a8186cd6928efe70ae2655e9f9d0dd3def20bc0fb6a82f6","src/io/mmio.rs":"bd475c815d483cc2b187348c32e10f94df0ca756ee8d14260b6ca3c660b2a73a","src/io/mod.rs":"4df12af3e82e6b5fe22112c9f51552112ee4811b7d1131d2a43d608d8d1cac09","src/io/pio.rs":"219fcd317d6c490a14794ec4db9de3e305c722dda720043c67076bda60632bb8","src/lib.rs":"988fb0b0bd3b396345f11ef46617072aeaf9307d3fa05a4d2a2ee9d590598bba","src/number.rs":"9043372ef517ecbbca776536efa3d7a822ba6f49d29c20d4c3648f0e3c85fe35","src/scheme.rs":"3281173d9a5d7d420f5dbdaed7562ba5adc1ce5753843a3bf3eecf4060eb09c2"},"package":"8dd35cc9a8bdec562c757e3d43c1526b5c6d2653e23e2315065bc25556550753"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/redox_syscall-0.1.16/Cargo.toml
+++ /dev/null
@@ -1,9 +0,0 @@
-[package]
-name = "redox_syscall"
-version = "0.1.16"
-description = "A Rust library to access raw Redox system calls"
-license = "MIT"
-authors = ["Jeremy Soller <jackpot51@gmail.com>"]
-
-[lib]
-name = "syscall"
deleted file mode 100644
--- a/third_party/rust/redox_syscall-0.1.16/src/arch/arm.rs
+++ /dev/null
@@ -1,72 +0,0 @@
-use error::{Error, Result};
-
-pub unsafe fn syscall0(mut a: usize) -> Result<usize> {
-    asm!("swi $$0"
-        : "={r0}"(a)
-        : "{r7}"(a)
-        : "memory"
-        : "volatile");
-
-    Error::demux(a)
-}
-
-pub unsafe fn syscall1(mut a: usize, b: usize) -> Result<usize> {
-    asm!("swi $$0"
-        : "={r0}"(a)
-        : "{r7}"(a), "{r0}"(b)
-        : "memory"
-        : "volatile");
-
-    Error::demux(a)
-}
-
-// Clobbers all registers - special for clone
-pub unsafe fn syscall1_clobber(mut a: usize, b: usize) -> Result<usize> {
-    asm!("swi $$0"
-        : "={r0}"(a)
-        : "{r7}"(a), "{r0}"(b)
-        : "memory", "r0", "r1", "r2", "r3", "r4"
-        : "volatile");
-
-    Error::demux(a)
-}
-
-pub unsafe fn syscall2(mut a: usize, b: usize, c: usize) -> Result<usize> {
-    asm!("swi $$0"
-        : "={r0}"(a)
-        : "{r7}"(a), "{r0}"(b), "{r1}"(c)
-        : "memory"
-        : "volatile");
-
-    Error::demux(a)
-}
-
-pub unsafe fn syscall3(mut a: usize, b: usize, c: usize, d: usize) -> Result<usize> {
-    asm!("swi $$0"
-        : "={r0}"(a)
-        : "{r7}"(a), "{r0}"(b), "{r1}"(c), "{r2}"(d)
-        : "memory"
-        : "volatile");
-
-    Error::demux(a)
-}
-
-pub unsafe fn syscall4(mut a: usize, b: usize, c: usize, d: usize, e: usize) -> Result<usize> {
-    asm!("swi $$0"
-        : "={r0}"(a)
-        : "{r7}"(a), "{r0}"(b), "{r1}"(c), "{r2}"(d), "{r3}"(e)
-        : "memory"
-        : "volatile");
-
-    Error::demux(a)
-}
-
-pub unsafe fn syscall5(mut a: usize, b: usize, c: usize, d: usize, e: usize, f: usize) -> Result<usize> {
-    asm!("swi $$0"
-        : "={r0}"(a)
-        : "{r7}"(a), "{r0}"(b), "{r1}"(c), "{r2}"(d), "{r3}"(e), "{r4}"(f)
-        : "memory"
-        : "volatile");
-
-    Error::demux(a)
-}
deleted file mode 100644
--- a/third_party/rust/redox_syscall-0.1.16/src/arch/x86.rs
+++ /dev/null
@@ -1,72 +0,0 @@
-use error::{Error, Result};
-
-pub unsafe fn syscall0(mut a: usize) -> Result<usize> {
-    asm!("int 0x80"
-        : "={eax}"(a)
-        : "{eax}"(a)
-        : "memory"
-        : "intel", "volatile");
-
-    Error::demux(a)
-}
-
-pub unsafe fn syscall1(mut a: usize, b: usize) -> Result<usize> {
-    asm!("int 0x80"
-        : "={eax}"(a)
-        : "{eax}"(a), "{ebx}"(b)
-        : "memory"
-        : "intel", "volatile");
-
-    Error::demux(a)
-}
-
-// Clobbers all registers - special for clone
-pub unsafe fn syscall1_clobber(mut a: usize, b: usize) -> Result<usize> {
-    asm!("int 0x80"
-        : "={eax}"(a)
-        : "{eax}"(a), "{ebx}"(b)
-        : "memory", "ebx", "ecx", "edx", "esi", "edi"
-        : "intel", "volatile");
-
-    Error::demux(a)
-}
-
-pub unsafe fn syscall2(mut a: usize, b: usize, c: usize) -> Result<usize> {
-    asm!("int 0x80"
-        : "={eax}"(a)
-        : "{eax}"(a), "{ebx}"(b), "{ecx}"(c)
-        : "memory"
-        : "intel", "volatile");
-
-    Error::demux(a)
-}
-
-pub unsafe fn syscall3(mut a: usize, b: usize, c: usize, d: usize) -> Result<usize> {
-    asm!("int 0x80"
-        : "={eax}"(a)
-        : "{eax}"(a), "{ebx}"(b), "{ecx}"(c), "{edx}"(d)
-        : "memory"
-        : "intel", "volatile");
-
-    Error::demux(a)
-}
-
-pub unsafe fn syscall4(mut a: usize, b: usize, c: usize, d: usize, e: usize) -> Result<usize> {
-    asm!("int 0x80"
-        : "={eax}"(a)
-        : "{eax}"(a), "{ebx}"(b), "{ecx}"(c), "{edx}"(d), "{esi}"(e)
-        : "memory"
-        : "intel", "volatile");
-
-    Error::demux(a)
-}
-
-pub unsafe fn syscall5(mut a: usize, b: usize, c: usize, d: usize, e: usize, f: usize) -> Result<usize> {
-    asm!("int 0x80"
-        : "={eax}"(a)
-        : "{eax}"(a), "{ebx}"(b), "{ecx}"(c), "{edx}"(d), "{esi}"(e), "{edi}"(f)
-        : "memory"
-        : "intel", "volatile");
-
-    Error::demux(a)
-}
deleted file mode 100644
--- a/third_party/rust/redox_syscall-0.1.16/src/arch/x86_64.rs
+++ /dev/null
@@ -1,72 +0,0 @@
-use error::{Error, Result};
-
-pub unsafe fn syscall0(mut a: usize) -> Result<usize> {
-    asm!("int 0x80"
-        : "={rax}"(a)
-        : "{rax}"(a)
-        : "memory"
-        : "intel", "volatile");
-
-    Error::demux(a)
-}
-
-pub unsafe fn syscall1(mut a: usize, b: usize) -> Result<usize> {
-    asm!("int 0x80"
-        : "={rax}"(a)
-        : "{rax}"(a), "{rbx}"(b)
-        : "memory"
-        : "intel", "volatile");
-
-    Error::demux(a)
-}
-
-// Clobbers all registers - special for clone
-pub unsafe fn syscall1_clobber(mut a: usize, b: usize) -> Result<usize> {
-    asm!("int 0x80"
-        : "={rax}"(a)
-        : "{rax}"(a), "{rbx}"(b)
-        : "memory", "rbx", "rcx", "rdx", "rsi", "rdi", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
-        : "intel", "volatile");
-
-    Error::demux(a)
-}
-
-pub unsafe fn syscall2(mut a: usize, b: usize, c: usize) -> Result<usize> {
-    asm!("int 0x80"
-        : "={rax}"(a)
-        : "{rax}"(a), "{rbx}"(b), "{rcx}"(c)
-        : "memory"
-        : "intel", "volatile");
-
-    Error::demux(a)
-}
-
-pub unsafe fn syscall3(mut a: usize, b: usize, c: usize, d: usize) -> Result<usize> {
-    asm!("int 0x80"
-        : "={rax}"(a)
-        : "{rax}"(a), "{rbx}"(b), "{rcx}"(c), "{rdx}"(d)
-        : "memory"
-        : "intel", "volatile");
-
-    Error::demux(a)
-}
-
-pub unsafe fn syscall4(mut a: usize, b: usize, c: usize, d: usize, e: usize) -> Result<usize> {
-    asm!("int 0x80"
-        : "={rax}"(a)
-        : "{rax}"(a), "{rbx}"(b), "{rcx}"(c), "{rdx}"(d), "{rsi}"(e)
-        : "memory"
-        : "intel", "volatile");
-
-    Error::demux(a)
-}
-
-pub unsafe fn syscall5(mut a: usize, b: usize, c: usize, d: usize, e: usize, f: usize) -> Result<usize> {
-    asm!("int 0x80"
-        : "={rax}"(a)
-        : "{rax}"(a), "{rbx}"(b), "{rcx}"(c), "{rdx}"(d), "{rsi}"(e), "{rdi}"(f)
-        : "memory"
-        : "intel", "volatile");
-
-    Error::demux(a)
-}
deleted file mode 100644
--- a/third_party/rust/redox_syscall-0.1.16/src/call.rs
+++ /dev/null
@@ -1,292 +0,0 @@
-use super::arch::*;
-use super::data::{Stat, StatVfs, TimeSpec};
-use super::error::Result;
-use super::number::*;
-
-use core::mem;
-
-/// Set the end of the process's heap
-///
-/// When `addr` is `0`, this function will return the current break.
-///
-/// When `addr` is nonzero, this function will attempt to set the end of the process's
-/// heap to `addr` and return the new program break. The new program break should be
-/// checked by the allocator, it may not be exactly `addr`, as it may be aligned to a page
-/// boundary.
-///
-/// On error, `Err(ENOMEM)` will be returned indicating that no memory is available
-pub unsafe fn brk(addr: usize) -> Result<usize> {
-    syscall1(SYS_BRK, addr)
-}
-
-/// Change the process's working directory
-///
-/// This function will attempt to set the process's working directory to `path`, which can be
-/// either a relative, scheme relative, or absolute path.
-///
-/// On success, `Ok(0)` will be returned. On error, one of the following errors will be returned.
-///
-/// # Errors
-///
-/// * `EACCES` - permission is denied for one of the components of `path`, or `path`
-/// * `EFAULT` - `path` does not point to the process's addressible memory
-/// * `EIO` - an I/O error occured
-/// * `ENOENT` - `path` does not exit
-/// * `ENOTDIR` - `path` is not a directory
-pub fn chdir(path: &str) -> Result<usize> {
-    unsafe { syscall2(SYS_CHDIR, path.as_ptr() as usize, path.len()) }
-}
-
-pub fn chmod(path: &str, mode: usize) -> Result<usize> {
-    unsafe { syscall3(SYS_CHMOD, path.as_ptr() as usize, path.len(), mode) }
-}
-
-/// Produce a fork of the current process, or a new process thread
-pub unsafe fn clone(flags: usize) -> Result<usize> {
-    syscall1_clobber(SYS_CLONE, flags)
-}
-
-/// Close a file
-pub fn close(fd: usize) -> Result<usize> {
-    unsafe { syscall1(SYS_CLOSE, fd) }
-}
-
-/// Get the current system time
-pub fn clock_gettime(clock: usize, tp: &mut TimeSpec) -> Result<usize> {
-    unsafe { syscall2(SYS_CLOCK_GETTIME, clock, tp as *mut TimeSpec as usize) }
-}
-
-/// Copy and transform a file descriptor
-pub fn dup(fd: usize, buf: &[u8]) -> Result<usize> {
-    unsafe { syscall3(SYS_DUP, fd, buf.as_ptr() as usize, buf.len()) }
-}
-
-/// Copy and transform a file descriptor
-pub fn dup2(fd: usize, newfd: usize, buf: &[u8]) -> Result<usize> {
-    unsafe { syscall4(SYS_DUP2, fd, newfd, buf.as_ptr() as usize, buf.len()) }
-}
-
-/// Replace the current process with a new executable
-pub fn execve(path: &str, args: &[[usize; 2]]) -> Result<usize> {
-    unsafe { syscall4(SYS_EXECVE, path.as_ptr() as usize, path.len(), args.as_ptr() as usize, args.len()) }
-}
-
-/// Exit the current process
-pub fn exit(status: usize) -> Result<usize> {
-    unsafe { syscall1(SYS_EXIT, status) }
-}
-
-/// Register a file for event-based I/O
-pub fn fcntl(fd: usize, cmd: usize, arg: usize) -> Result<usize> {
-    unsafe { syscall3(SYS_FCNTL, fd, cmd, arg) }
-}
-
-/// Register a file for event-based I/O
-pub fn fevent(fd: usize, flags: usize) -> Result<usize> {
-    unsafe { syscall2(SYS_FEVENT, fd, flags) }
-}
-
-/// Map a file into memory
-pub unsafe fn fmap(fd: usize, offset: usize, size: usize) -> Result<usize> {
-    syscall3(SYS_FMAP, fd, offset, size)
-}
-
-/// Unmap a memory-mapped file
-pub unsafe fn funmap(addr: usize) -> Result<usize> {
-    syscall1(SYS_FUNMAP, addr)
-}
-
-/// Retrieve the canonical path of a file
-pub fn fpath(fd: usize, buf: &mut [u8]) -> Result<usize> {
-    unsafe { syscall3(SYS_FPATH, fd, buf.as_mut_ptr() as usize, buf.len()) }
-}
-
-/// Get metadata about a file
-pub fn fstat(fd: usize, stat: &mut Stat) -> Result<usize> {
-    unsafe { syscall3(SYS_FSTAT, fd, stat as *mut Stat as usize, mem::size_of::<Stat>()) }
-}
-
-/// Get metadata about a filesystem
-pub fn fstatvfs(fd: usize, stat: &mut StatVfs) -> Result<usize> {
-    unsafe { syscall3(SYS_FSTATVFS, fd, stat as *mut StatVfs as usize, mem::size_of::<StatVfs>()) }
-}
-
-/// Sync a file descriptor to its underlying medium
-pub fn fsync(fd: usize) -> Result<usize> {
-    unsafe { syscall1(SYS_FSYNC, fd) }
-}
-
-/// Truncate or extend a file to a specified length
-pub fn ftruncate(fd: usize, len: usize) -> Result<usize> {
-    unsafe { syscall2(SYS_FTRUNCATE, fd, len) }
-}
-
-/// Fast userspace mutex - TODO: Document
-pub unsafe fn futex(addr: *mut i32, op: usize, val: i32, val2: usize, addr2: *mut i32) -> Result<usize> {
-    syscall5(SYS_FUTEX, addr as usize, op, (val as isize) as usize, val2, addr2 as usize)
-}
-
-/// Get the current working directory
-pub fn getcwd(buf: &mut [u8]) -> Result<usize> {
-    unsafe { syscall2(SYS_GETCWD, buf.as_mut_ptr() as usize, buf.len()) }
-}
-
-/// Get the effective group ID
-pub fn getegid() -> Result<usize> {
-    unsafe { syscall0(SYS_GETEGID) }
-}
-
-/// Get the effective namespace
-pub fn getens() -> Result<usize> {
-    unsafe { syscall0(SYS_GETENS) }
-}
-
-/// Get the effective user ID
-pub fn geteuid() -> Result<usize> {
-    unsafe { syscall0(SYS_GETEUID) }
-}
-
-/// Get the current group ID
-pub fn getgid() -> Result<usize> {
-    unsafe { syscall0(SYS_GETGID) }
-}
-
-/// Get the current namespace
-pub fn getns() -> Result<usize> {
-    unsafe { syscall0(SYS_GETNS) }
-}
-
-/// Get the current process ID
-pub fn getpid() -> Result<usize> {
-    unsafe { syscall0(SYS_GETPID) }
-}
-
-/// Get the current user ID
-pub fn getuid() -> Result<usize> {
-    unsafe { syscall0(SYS_GETUID) }
-}
-
-/// Set the I/O privilege level
-pub unsafe fn iopl(level: usize) -> Result<usize> {
-    syscall1(SYS_IOPL, level)
-}
-
-/// Send a signal `sig` to the process identified by `pid`
-pub fn kill(pid: usize, sig: usize) -> Result<usize> {
-    unsafe { syscall2(SYS_KILL, pid, sig) }
-}
-
-/// Create a link to a file
-pub unsafe fn link(old: *const u8, new: *const u8) -> Result<usize> {
-    syscall2(SYS_LINK, old as usize, new as usize)
-}
-
-/// Seek to `offset` bytes in a file descriptor
-pub fn lseek(fd: usize, offset: isize, whence: usize) -> Result<usize> {
-    unsafe { syscall3(SYS_LSEEK, fd, offset as usize, whence) }
-}
-
-/// Make a new scheme namespace
-pub fn mkns(schemes: &[[usize; 2]]) -> Result<usize> {
-    unsafe { syscall2(SYS_MKNS, schemes.as_ptr() as usize, schemes.len()) }
-}
-
-/// Sleep for the time specified in `req`
-pub fn nanosleep(req: &TimeSpec, rem: &mut TimeSpec) -> Result<usize> {
-    unsafe { syscall2(SYS_NANOSLEEP, req as *const TimeSpec as usize, rem as *mut TimeSpec as usize) }
-}
-
-/// Open a file
-pub fn open(path: &str, flags: usize) -> Result<usize> {
-    unsafe { syscall3(SYS_OPEN, path.as_ptr() as usize, path.len(), flags) }
-}
-
-/// Allocate pages, linearly in physical memory
-pub unsafe fn physalloc(size: usize) -> Result<usize> {
-    syscall1(SYS_PHYSALLOC, size)
-}
-
-/// Free physically allocated pages
-pub unsafe fn physfree(physical_address: usize, size: usize) -> Result<usize> {
-    syscall2(SYS_PHYSFREE, physical_address, size)
-}
-
-/// Map physical memory to virtual memory
-pub unsafe fn physmap(physical_address: usize, size: usize, flags: usize) -> Result<usize> {
-    syscall3(SYS_PHYSMAP, physical_address, size, flags)
-}
-
-/// Unmap previously mapped physical memory
-pub unsafe fn physunmap(virtual_address: usize) -> Result<usize> {
-    syscall1(SYS_PHYSUNMAP, virtual_address)
-}
-
-/// Create a pair of file descriptors referencing the read and write ends of a pipe
-pub fn pipe2(fds: &mut [usize; 2], flags: usize) -> Result<usize> {
-    unsafe { syscall2(SYS_PIPE2, fds.as_ptr() as usize, flags) }
-}
-
-/// Read from a file descriptor into a buffer
-pub fn read(fd: usize, buf: &mut [u8]) -> Result<usize> {
-    unsafe { syscall3(SYS_READ, fd, buf.as_mut_ptr() as usize, buf.len()) }
-}
-
-/// Remove a directory
-pub fn rmdir(path: &str) -> Result<usize> {
-    unsafe { syscall2(SYS_RMDIR, path.as_ptr() as usize, path.len()) }
-}
-
-/// Set the current process group IDs
-pub fn setregid(rgid: usize, egid: usize) -> Result<usize> {
-    unsafe { syscall2(SYS_SETREGID, rgid, egid) }
-}
-
-/// Make a new scheme namespace
-pub fn setrens(rns: usize, ens: usize) -> Result<usize> {
-    unsafe { syscall2(SYS_SETRENS, rns, ens) }
-}
-
-/// Set the current process user IDs
-pub fn setreuid(ruid: usize, euid: usize) -> Result<usize> {
-    unsafe { syscall2(SYS_SETREUID, ruid, euid) }
-}
-
-/// Remove a file
-pub fn unlink(path: &str) -> Result<usize> {
-    unsafe { syscall2(SYS_UNLINK, path.as_ptr() as usize, path.len()) }
-}
-
-/// Convert a virtual address to a physical one
-pub unsafe fn virttophys(virtual_address: usize) -> Result<usize> {
-    syscall1(SYS_VIRTTOPHYS, virtual_address)
-}
-
-/// Check if a child process has exited or received a signal
-pub fn waitpid(pid: usize, status: &mut usize, options: usize) -> Result<usize> {
-    unsafe { syscall3(SYS_WAITPID, pid, status as *mut usize as usize, options) }
-}
-
-/// Write a buffer to a file descriptor
-///
-/// The kernel will attempt to write the bytes in `buf` to the file descriptor `fd`, returning
-/// either an `Err`, explained below, or `Ok(count)` where `count` is the number of bytes which
-/// were written.
-///
-/// # Errors
-///
-/// * `EAGAIN` - the file descriptor was opened with `O_NONBLOCK` and writing would block
-/// * `EBADF` - the file descriptor is not valid or is not open for writing
-/// * `EFAULT` - `buf` does not point to the process's addressible memory
-/// * `EIO` - an I/O error occured
-/// * `ENOSPC` - the device containing the file descriptor has no room for data
-/// * `EPIPE` - the file descriptor refers to a pipe or socket whose reading end is closed
-pub fn write(fd: usize, buf: &[u8]) -> Result<usize> {
-    unsafe { syscall3(SYS_WRITE, fd, buf.as_ptr() as usize, buf.len()) }
-}
-
-/// Yield the process's time slice to the kernel
-///
-/// This function will return Ok(0) on success
-pub fn sched_yield() -> Result<usize> {
-    unsafe { syscall0(SYS_YIELD) }
-}
deleted file mode 100644
--- a/third_party/rust/redox_syscall-0.1.16/src/data.rs
+++ /dev/null
@@ -1,146 +0,0 @@
-use core::ops::{Deref, DerefMut};
-use core::{mem, slice};
-
-#[derive(Copy, Clone, Debug, Default)]
-pub struct Event {
-    pub id: usize,
-    pub flags: usize,
-    pub data: usize
-}
-
-impl Deref for Event {
-    type Target = [u8];
-    fn deref(&self) -> &[u8] {
-        unsafe {
-            slice::from_raw_parts(self as *const Event as *const u8, mem::size_of::<Event>()) as &[u8]
-        }
-    }
-}
-
-impl DerefMut for Event {
-    fn deref_mut(&mut self) -> &mut [u8] {
-        unsafe {
-            slice::from_raw_parts_mut(self as *mut Event as *mut u8, mem::size_of::<Event>()) as &mut [u8]
-        }
-    }
-}
-
-#[derive(Copy, Clone, Debug, Default)]
-#[repr(packed)]
-pub struct Packet {
-    pub id: u64,
-    pub pid: usize,
-    pub uid: u32,
-    pub gid: u32,
-    pub a: usize,
-    pub b: usize,
-    pub c: usize,
-    pub d: usize
-}
-
-impl Deref for Packet {
-    type Target = [u8];
-    fn deref(&self) -> &[u8] {
-        unsafe {
-            slice::from_raw_parts(self as *const Packet as *const u8, mem::size_of::<Packet>()) as &[u8]
-        }
-    }
-}
-
-impl DerefMut for Packet {
-    fn deref_mut(&mut self) -> &mut [u8] {
-        unsafe {
-            slice::from_raw_parts_mut(self as *mut Packet as *mut u8, mem::size_of::<Packet>()) as &mut [u8]
-        }
-    }
-}
-
-#[derive(Copy, Clone, Debug, Default)]
-#[repr(packed)]
-pub struct Stat {
-    pub st_dev: u64,
-    pub st_ino: u64,
-    pub st_mode: u16,
-    pub st_nlink: u32,
-    pub st_uid: u32,
-    pub st_gid: u32,
-    pub st_size: u64,
-    pub st_blksize: u32,
-    pub st_blocks: u64,
-    pub st_mtime: u64,
-    pub st_mtime_nsec: u32,
-    pub st_atime: u64,
-    pub st_atime_nsec: u32,
-    pub st_ctime: u64,
-    pub st_ctime_nsec: u32,
-}
-
-impl Deref for Stat {
-    type Target = [u8];
-    fn deref(&self) -> &[u8] {
-        unsafe {
-            slice::from_raw_parts(self as *const Stat as *const u8, mem::size_of::<Stat>()) as &[u8]
-        }
-    }
-}
-
-impl DerefMut for Stat {
-    fn deref_mut(&mut self) -> &mut [u8] {
-        unsafe {
-            slice::from_raw_parts_mut(self as *mut Stat as *mut u8, mem::size_of::<Stat>()) as &mut [u8]
-        }
-    }
-}
-
-#[derive(Copy, Clone, Debug, Default)]
-#[repr(packed)]
-pub struct StatVfs {
-    pub f_bsize: u32,
-    pub f_blocks: u64,
-    pub f_bfree: u64,
-    pub f_bavail: u64,
-    //TODO: More fields https://linux.die.net/man/2/statvfs
-}
-
-impl Deref for StatVfs {
-    type Target = [u8];
-    fn deref(&self) -> &[u8] {
-        unsafe {
-            slice::from_raw_parts(self as *const StatVfs as *const u8, mem::size_of::<StatVfs>()) as &[u8]
-        }
-    }
-}
-
-impl DerefMut for StatVfs {
-    fn deref_mut(&mut self) -> &mut [u8] {
-        unsafe {
-            slice::from_raw_parts_mut(self as *mut StatVfs as *mut u8, mem::size_of::<StatVfs>()) as &mut [u8]
-        }
-    }
-}
-
-#[derive(Copy, Clone, Debug, Default)]
-#[repr(packed)]
-pub struct TimeSpec {
-    pub tv_sec: i64,
-    pub tv_nsec: i32,
-}
-
-impl Deref for TimeSpec {
-    type Target = [u8];
-    fn deref(&self) -> &[u8] {
-        unsafe {
-            slice::from_raw_parts(self as *const TimeSpec as *const u8,
-                                  mem::size_of::<TimeSpec>()) as &[u8]
-        }
-    }
-}
-
-impl DerefMut for TimeSpec {
-    fn deref_mut(&mut self) -> &mut [u8] {
-        unsafe {
-            slice::from_raw_parts_mut(self as *mut TimeSpec as *mut u8,
-                                      mem::size_of::<TimeSpec>()) as &mut [u8]
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/redox_syscall-0.1.16/src/error.rs
+++ /dev/null
@@ -1,315 +0,0 @@
-use core::{fmt, result};
-
-#[derive(Eq, PartialEq)]
-pub struct Error {
-    pub errno: i32,
-}
-
-pub type Result<T> = result::Result<T, Error>;
-
-impl Error {
-    pub fn new(errno: i32) -> Error {
-        Error { errno: errno }
-    }
-
-    pub fn mux(result: Result<usize>) -> usize {
-        match result {
-            Ok(value) => value,
-            Err(error) => -error.errno as usize,
-        }
-    }
-
-    pub fn demux(value: usize) -> Result<usize> {
-        let errno = -(value as i32);
-        if errno >= 1 && errno < STR_ERROR.len() as i32 {
-            Err(Error::new(errno))
-        } else {
-            Ok(value)
-        }
-    }
-
-    pub fn text(&self) -> &str {
-        if let Some(description) = STR_ERROR.get(self.errno as usize) {
-            description
-        } else {
-            "Unknown Error"
-        }
-    }
-}
-
-impl fmt::Debug for Error {
-    fn fmt(&self, f: &mut fmt::Formatter) -> result::Result<(), fmt::Error> {
-        f.write_str(self.text())
-    }
-}
-
-impl fmt::Display for Error {
-    fn fmt(&self, f: &mut fmt::Formatter) -> result::Result<(), fmt::Error> {
-        f.write_str(self.text())
-    }
-}
-
-pub const EPERM: i32 = 1;  /* Operation not permitted */
-pub const ENOENT: i32 = 2;  /* No such file or directory */
-pub const ESRCH: i32 = 3;  /* No such process */
-pub const EINTR: i32 = 4;  /* Interrupted system call */
-pub const EIO: i32 = 5;  /* I/O error */
-pub const ENXIO: i32 = 6;  /* No such device or address */
-pub const E2BIG: i32 = 7;  /* Argument list too long */
-pub const ENOEXEC: i32 = 8;  /* Exec format error */
-pub const EBADF: i32 = 9;  /* Bad file number */
-pub const ECHILD: i32 = 10;  /* No child processes */
-pub const EAGAIN: i32 = 11;  /* Try again */
-pub const ENOMEM: i32 = 12;  /* Out of memory */
-pub const EACCES: i32 = 13;  /* Permission denied */
-pub const EFAULT: i32 = 14;  /* Bad address */
-pub const ENOTBLK: i32 = 15;  /* Block device required */
-pub const EBUSY: i32 = 16;  /* Device or resource busy */
-pub const EEXIST: i32 = 17;  /* File exists */
-pub const EXDEV: i32 = 18;  /* Cross-device link */
-pub const ENODEV: i32 = 19;  /* No such device */
-pub const ENOTDIR: i32 = 20;  /* Not a directory */
-pub const EISDIR: i32 = 21;  /* Is a directory */
-pub const EINVAL: i32 = 22;  /* Invalid argument */
-pub const ENFILE: i32 = 23;  /* File table overflow */
-pub const EMFILE: i32 = 24;  /* Too many open files */
-pub const ENOTTY: i32 = 25;  /* Not a typewriter */
-pub const ETXTBSY: i32 = 26;  /* Text file busy */
-pub const EFBIG: i32 = 27;  /* File too large */
-pub const ENOSPC: i32 = 28;  /* No space left on device */
-pub const ESPIPE: i32 = 29;  /* Illegal seek */
-pub const EROFS: i32 = 30;  /* Read-only file system */
-pub const EMLINK: i32 = 31;  /* Too many links */
-pub const EPIPE: i32 = 32;  /* Broken pipe */
-pub const EDOM: i32 = 33;  /* Math argument out of domain of func */
-pub const ERANGE: i32 = 34;  /* Math result not representable */
-pub const EDEADLK: i32 = 35;  /* Resource deadlock would occur */
-pub const ENAMETOOLONG: i32 = 36;  /* File name too long */
-pub const ENOLCK: i32 = 37;  /* No record locks available */
-pub const ENOSYS: i32 = 38;  /* Function not implemented */
-pub const ENOTEMPTY: i32 = 39;  /* Directory not empty */
-pub const ELOOP: i32 = 40;  /* Too many symbolic links encountered */
-pub const EWOULDBLOCK: i32 = 41;  /* Operation would block */
-pub const ENOMSG: i32 = 42;  /* No message of desired type */
-pub const EIDRM: i32 = 43;  /* Identifier removed */
-pub const ECHRNG: i32 = 44;  /* Channel number out of range */
-pub const EL2NSYNC: i32 = 45;  /* Level 2 not synchronized */
-pub const EL3HLT: i32 = 46;  /* Level 3 halted */
-pub const EL3RST: i32 = 47;  /* Level 3 reset */
-pub const ELNRNG: i32 = 48;  /* Link number out of range */
-pub const EUNATCH: i32 = 49;  /* Protocol driver not attached */
-pub const ENOCSI: i32 = 50;  /* No CSI structure available */
-pub const EL2HLT: i32 = 51;  /* Level 2 halted */
-pub const EBADE: i32 = 52;  /* Invalid exchange */
-pub const EBADR: i32 = 53;  /* Invalid request descriptor */
-pub const EXFULL: i32 = 54;  /* Exchange full */
-pub const ENOANO: i32 = 55;  /* No anode */
-pub const EBADRQC: i32 = 56;  /* Invalid request code */
-pub const EBADSLT: i32 = 57;  /* Invalid slot */
-pub const EDEADLOCK: i32 = 58; /* Resource deadlock would occur */
-pub const EBFONT: i32 = 59;  /* Bad font file format */
-pub const ENOSTR: i32 = 60;  /* Device not a stream */
-pub const ENODATA: i32 = 61;  /* No data available */
-pub const ETIME: i32 = 62;  /* Timer expired */
-pub const ENOSR: i32 = 63;  /* Out of streams resources */
-pub const ENONET: i32 = 64;  /* Machine is not on the network */
-pub const ENOPKG: i32 = 65;  /* Package not installed */
-pub const EREMOTE: i32 = 66;  /* Object is remote */
-pub const ENOLINK: i32 = 67;  /* Link has been severed */
-pub const EADV: i32 = 68;  /* Advertise error */
-pub const ESRMNT: i32 = 69;  /* Srmount error */
-pub const ECOMM: i32 = 70;  /* Communication error on send */
-pub const EPROTO: i32 = 71;  /* Protocol error */
-pub const EMULTIHOP: i32 = 72;  /* Multihop attempted */
-pub const EDOTDOT: i32 = 73;  /* RFS specific error */
-pub const EBADMSG: i32 = 74;  /* Not a data message */
-pub const EOVERFLOW: i32 = 75;  /* Value too large for defined data type */
-pub const ENOTUNIQ: i32 = 76;  /* Name not unique on network */
-pub const EBADFD: i32 = 77;  /* File descriptor in bad state */
-pub const EREMCHG: i32 = 78;  /* Remote address changed */
-pub const ELIBACC: i32 = 79;  /* Can not access a needed shared library */
-pub const ELIBBAD: i32 = 80;  /* Accessing a corrupted shared library */
-pub const ELIBSCN: i32 = 81;  /* .lib section in a.out corrupted */
-pub const ELIBMAX: i32 = 82;  /* Attempting to link in too many shared libraries */
-pub const ELIBEXEC: i32 = 83;  /* Cannot exec a shared library directly */
-pub const EILSEQ: i32 = 84;  /* Illegal byte sequence */
-pub const ERESTART: i32 = 85;  /* Interrupted system call should be restarted */
-pub const ESTRPIPE: i32 = 86;  /* Streams pipe error */
-pub const EUSERS: i32 = 87;  /* Too many users */
-pub const ENOTSOCK: i32 = 88;  /* Socket operation on non-socket */
-pub const EDESTADDRREQ: i32 = 89;  /* Destination address required */
-pub const EMSGSIZE: i32 = 90;  /* Message too long */
-pub const EPROTOTYPE: i32 = 91;  /* Protocol wrong type for socket */
-pub const ENOPROTOOPT: i32 = 92;  /* Protocol not available */
-pub const EPROTONOSUPPORT: i32 = 93;  /* Protocol not supported */
-pub const ESOCKTNOSUPPORT: i32 = 94;  /* Socket type not supported */
-pub const EOPNOTSUPP: i32 = 95;  /* Operation not supported on transport endpoint */
-pub const EPFNOSUPPORT: i32 = 96;  /* Protocol family not supported */
-pub const EAFNOSUPPORT: i32 = 97;  /* Address family not supported by protocol */
-pub const EADDRINUSE: i32 = 98;  /* Address already in use */
-pub const EADDRNOTAVAIL: i32 = 99;  /* Cannot assign requested address */
-pub const ENETDOWN: i32 = 100; /* Network is down */
-pub const ENETUNREACH: i32 = 101; /* Network is unreachable */
-pub const ENETRESET: i32 = 102; /* Network dropped connection because of reset */
-pub const ECONNABORTED: i32 = 103; /* Software caused connection abort */
-pub const ECONNRESET: i32 = 104; /* Connection reset by peer */
-pub const ENOBUFS: i32 = 105; /* No buffer space available */
-pub const EISCONN: i32 = 106; /* Transport endpoint is already connected */
-pub const ENOTCONN: i32 = 107; /* Transport endpoint is not connected */
-pub const ESHUTDOWN: i32 = 108; /* Cannot send after transport endpoint shutdown */
-pub const ETOOMANYREFS: i32 = 109; /* Too many references: cannot splice */
-pub const ETIMEDOUT: i32 = 110; /* Connection timed out */
-pub const ECONNREFUSED: i32 = 111; /* Connection refused */
-pub const EHOSTDOWN: i32 = 112; /* Host is down */
-pub const EHOSTUNREACH: i32 = 113; /* No route to host */
-pub const EALREADY: i32 = 114; /* Operation already in progress */
-pub const EINPROGRESS: i32 = 115; /* Operation now in progress */
-pub const ESTALE: i32 = 116; /* Stale NFS file handle */
-pub const EUCLEAN: i32 = 117; /* Structure needs cleaning */
-pub const ENOTNAM: i32 = 118; /* Not a XENIX named type file */
-pub const ENAVAIL: i32 = 119; /* No XENIX semaphores available */
-pub const EISNAM: i32 = 120; /* Is a named type file */
-pub const EREMOTEIO: i32 = 121; /* Remote I/O error */
-pub const EDQUOT: i32 = 122; /* Quota exceeded */
-pub const ENOMEDIUM: i32 = 123; /* No medium found */
-pub const EMEDIUMTYPE: i32 = 124; /* Wrong medium type */
-pub const ECANCELED: i32 = 125; /* Operation Canceled */
-pub const ENOKEY: i32 = 126; /* Required key not available */
-pub const EKEYEXPIRED: i32 = 127; /* Key has expired */
-pub const EKEYREVOKED: i32 = 128; /* Key has been revoked */
-pub const EKEYREJECTED: i32 = 129; /* Key was rejected by service */
-pub const EOWNERDEAD: i32 = 130; /* Owner died */
-pub const ENOTRECOVERABLE: i32 = 131; /* State not recoverable */
-
-pub static STR_ERROR: [&'static str; 132] = ["Success",
-                                             "Operation not permitted",
-                                             "No such file or directory",
-                                             "No such process",
-                                             "Interrupted system call",
-                                             "I/O error",
-                                             "No such device or address",
-                                             "Argument list too long",
-                                             "Exec format error",
-                                             "Bad file number",
-                                             "No child processes",
-                                             "Try again",
-                                             "Out of memory",
-                                             "Permission denied",
-                                             "Bad address",
-                                             "Block device required",
-                                             "Device or resource busy",
-                                             "File exists",
-                                             "Cross-device link",
-                                             "No such device",
-                                             "Not a directory",
-                                             "Is a directory",
-                                             "Invalid argument",
-                                             "File table overflow",
-                                             "Too many open files",
-                                             "Not a typewriter",
-                                             "Text file busy",
-                                             "File too large",
-                                             "No space left on device",
-                                             "Illegal seek",
-                                             "Read-only file system",
-                                             "Too many links",
-                                             "Broken pipe",
-                                             "Math argument out of domain of func",
-                                             "Math result not representable",
-                                             "Resource deadlock would occur",
-                                             "File name too long",
-                                             "No record locks available",
-                                             "Function not implemented",
-                                             "Directory not empty",
-                                             "Too many symbolic links encountered",
-                                             "Operation would block",
-                                             "No message of desired type",
-                                             "Identifier removed",
-                                             "Channel number out of range",
-                                             "Level 2 not synchronized",
-                                             "Level 3 halted",
-                                             "Level 3 reset",
-                                             "Link number out of range",
-                                             "Protocol driver not attached",
-                                             "No CSI structure available",
-                                             "Level 2 halted",
-                                             "Invalid exchange",
-                                             "Invalid request descriptor",
-                                             "Exchange full",
-                                             "No anode",
-                                             "Invalid request code",
-                                             "Invalid slot",
-                                             "Resource deadlock would occur",
-                                             "Bad font file format",
-                                             "Device not a stream",
-                                             "No data available",
-                                             "Timer expired",
-                                             "Out of streams resources",
-                                             "Machine is not on the network",
-                                             "Package not installed",
-                                             "Object is remote",
-                                             "Link has been severed",
-                                             "Advertise error",
-                                             "Srmount error",
-                                             "Communication error on send",
-                                             "Protocol error",
-                                             "Multihop attempted",
-                                             "RFS specific error",
-                                             "Not a data message",
-                                             "Value too large for defined data type",
-                                             "Name not unique on network",
-                                             "File descriptor in bad state",
-                                             "Remote address changed",
-                                             "Can not access a needed shared library",
-                                             "Accessing a corrupted shared library",
-                                             ".lib section in a.out corrupted",
-                                             "Attempting to link in too many shared libraries",
-                                             "Cannot exec a shared library directly",
-                                             "Illegal byte sequence",
-                                             "Interrupted system call should be restarted",
-                                             "Streams pipe error",
-                                             "Too many users",
-                                             "Socket operation on non-socket",
-                                             "Destination address required",
-                                             "Message too long",
-                                             "Protocol wrong type for socket",
-                                             "Protocol not available",
-                                             "Protocol not supported",
-                                             "Socket type not supported",
-                                             "Operation not supported on transport endpoint",
-                                             "Protocol family not supported",
-                                             "Address family not supported by protocol",
-                                             "Address already in use",
-                                             "Cannot assign requested address",
-                                             "Network is down",
-                                             "Network is unreachable",
-                                             "Network dropped connection because of reset",
-                                             "Software caused connection abort",
-                                             "Connection reset by peer",
-                                             "No buffer space available",
-                                             "Transport endpoint is already connected",
-                                             "Transport endpoint is not connected",
-                                             "Cannot send after transport endpoint shutdown",
-                                             "Too many references: cannot splice",
-                                             "Connection timed out",
-                                             "Connection refused",
-                                             "Host is down",
-                                             "No route to host",
-                                             "Operation already in progress",
-                                             "Operation now in progress",
-                                             "Stale NFS file handle",
-                                             "Structure needs cleaning",
-                                             "Not a XENIX named type file",
-                                             "No XENIX semaphores available",
-                                             "Is a named type file",
-                                             "Remote I/O error",
-                                             "Quota exceeded",
-                                             "No medium found",
-                                             "Wrong medium type",
-                                             "Operation Canceled",
-                                             "Required key not available",
-                                             "Key has expired",
-                                             "Key has been revoked",
-                                             "Key was rejected by service",
-                                             "Owner died",
-                                             "State not recoverable"];
deleted file mode 100644
--- a/third_party/rust/redox_syscall-0.1.16/src/flag.rs
+++ /dev/null
@@ -1,84 +0,0 @@
-pub const CLONE_VM: usize = 0x100;
-pub const CLONE_FS: usize = 0x200;
-pub const CLONE_FILES: usize = 0x400;
-pub const CLONE_VFORK: usize = 0x4000;
-
-pub const CLOCK_REALTIME: usize = 1;
-pub const CLOCK_MONOTONIC: usize = 4;
-
-pub const EVENT_NONE: usize = 0;
-pub const EVENT_READ: usize = 1;
-pub const EVENT_WRITE: usize = 2;
-
-pub const F_GETFL: usize = 1;
-pub const F_SETFL: usize = 2;
-
-pub const FUTEX_WAIT: usize = 0;
-pub const FUTEX_WAKE: usize = 1;
-pub const FUTEX_REQUEUE: usize = 2;
-
-pub const MAP_WRITE: usize = 1;
-pub const MAP_WRITE_COMBINE: usize = 2;
-
-pub const MODE_TYPE: u16 = 0xF000;
-pub const MODE_DIR: u16 = 0x4000;
-pub const MODE_FILE: u16 = 0x8000;
-
-pub const MODE_PERM: u16 = 0x0FFF;
-pub const MODE_SETUID: u16 = 0o4000;
-pub const MODE_SETGID: u16 = 0o2000;
-
-pub const O_RDONLY: usize =     0x0001_0000;
-pub const O_WRONLY: usize =     0x0002_0000;
-pub const O_RDWR: usize =       0x0003_0000;
-pub const O_NONBLOCK: usize =   0x0004_0000;
-pub const O_APPEND: usize =     0x0008_0000;
-pub const O_SHLOCK: usize =     0x0010_0000;
-pub const O_EXLOCK: usize =     0x0020_0000;
-pub const O_ASYNC: usize =      0x0040_0000;
-pub const O_FSYNC: usize =      0x0080_0000;
-pub const O_CLOEXEC: usize =    0x0100_0000;
-pub const O_CREAT: usize =      0x0200_0000;
-pub const O_TRUNC: usize =      0x0400_0000;
-pub const O_EXCL: usize =       0x0800_0000;
-pub const O_DIRECTORY: usize =  0x1000_0000;
-pub const O_STAT: usize =       0x2000_0000;
-pub const O_ACCMODE: usize =    O_RDONLY | O_WRONLY | O_RDWR;
-
-pub const SEEK_SET: usize = 0;
-pub const SEEK_CUR: usize = 1;
-pub const SEEK_END: usize = 2;
-
-pub const SIGHUP: usize =   1;
-pub const SIGINT: usize =   2;
-pub const SIGQUIT: usize =  3;
-pub const SIGILL: usize =   4;
-pub const SIGTRAP: usize =  5;
-pub const SIGABRT: usize =  6;
-pub const SIGBUS: usize =   7;
-pub const SIGFPE: usize =   8;
-pub const SIGKILL: usize =  9;
-pub const SIGUSR1: usize =  10;
-pub const SIGSEGV: usize =  11;
-pub const SIGUSR2: usize =  12;
-pub const SIGPIPE: usize =  13;
-pub const SIGALRM: usize =  14;
-pub const SIGTERM: usize =  15;
-pub const SIGSTKFLT: usize= 16;
-pub const SIGCHLD: usize =  17;
-pub const SIGCONT: usize =  18;
-pub const SIGSTOP: usize =  19;
-pub const SIGTSTP: usize =  20;
-pub const SIGTTIN: usize =  21;
-pub const SIGTTOU: usize =  22;
-pub const SIGURG: usize =   23;
-pub const SIGXCPU: usize =  24;
-pub const SIGXFSZ: usize =  25;
-pub const SIGVTALRM: usize= 26;
-pub const SIGPROF: usize =  27;
-pub const SIGWINCH: usize = 28;
-pub const SIGIO: usize =    29;
-pub const SIGPWR: usize =   30;
-pub const SIGSYS: usize =   31;
-
-pub const WNOHANG: usize = 1;
deleted file mode 100644
--- a/third_party/rust/redox_syscall-0.1.16/src/io/dma.rs
+++ /dev/null
@@ -1,76 +0,0 @@
-use core::{mem, ptr};
-use core::ops::{Deref, DerefMut};
-
-use Result;
-
-struct PhysBox {
-    address: usize,
-    size: usize
-}
-
-impl PhysBox {
-    fn new(size: usize) -> Result<PhysBox> {
-        let address = unsafe { ::physalloc(size)? };
-        Ok(PhysBox {
-            address: address,
-            size: size
-        })
-    }
-}
-
-impl Drop for PhysBox {
-    fn drop(&mut self) {
-        let _ = unsafe { ::physfree(self.address, self.size) };
-    }
-}
-
-pub struct Dma<T> {
-    phys: PhysBox,
-    virt: *mut T
-}
-
-impl<T> Dma<T> {
-    pub fn new(value: T) -> Result<Dma<T>> {
-        let phys = PhysBox::new(mem::size_of::<T>())?;
-        let virt = unsafe { ::physmap(phys.address, phys.size, ::MAP_WRITE)? } as *mut T;
-        unsafe { ptr::write(virt, value); }
-        Ok(Dma {
-            phys: phys,
-            virt: virt
-        })
-    }
-
-    pub fn zeroed() -> Result<Dma<T>> {
-        let phys = PhysBox::new(mem::size_of::<T>())?;
-        let virt = unsafe { ::physmap(phys.address, phys.size, ::MAP_WRITE)? } as *mut T;
-        unsafe { ptr::write_bytes(virt as *mut u8, 0, phys.size); }
-        Ok(Dma {
-            phys: phys,
-            virt: virt
-        })
-    }
-
-    pub fn physical(&self) -> usize {
-        self.phys.address
-    }
-}
-
-impl<T> Deref for Dma<T> {
-    type Target = T;
-    fn deref(&self) -> &T {
-        unsafe { &*self.virt }
-    }
-}
-
-impl<T> DerefMut for Dma<T> {
-    fn deref_mut(&mut self) -> &mut T {
-        unsafe { &mut *self.virt }
-    }
-}
-
-impl<T> Drop for Dma<T> {
-    fn drop(&mut self) {
-        unsafe { drop(ptr::read(self.virt)); }
-        let _ = unsafe { ::physunmap(self.virt as usize) };
-    }
-}
deleted file mode 100644
--- a/third_party/rust/redox_syscall-0.1.16/src/io/io.rs
+++ /dev/null
@@ -1,67 +0,0 @@
-use core::cmp::PartialEq;
-use core::ops::{BitAnd, BitOr, Not};
-
-pub trait Io {
-    type Value: Copy + PartialEq + BitAnd<Output = Self::Value> + BitOr<Output = Self::Value> + Not<Output = Self::Value>;
-
-    fn read(&self) -> Self::Value;
-    fn write(&mut self, value: Self::Value);
-
-    #[inline(always)]
-    fn readf(&self, flags: Self::Value) -> bool  {
-        (self.read() & flags) as Self::Value == flags
-    }
-
-    #[inline(always)]
-    fn writef(&mut self, flags: Self::Value, value: bool) {
-        let tmp: Self::Value = match value {
-            true => self.read() | flags,
-            false => self.read() & !flags,
-        };
-        self.write(tmp);
-    }
-}
-
-pub struct ReadOnly<I: Io> {
-    inner: I
-}
-
-impl<I: Io> ReadOnly<I> {
-    pub const fn new(inner: I) -> ReadOnly<I> {
-        ReadOnly {
-            inner: inner
-        }
-    }
-
-    #[inline(always)]
-    pub fn read(&self) -> I::Value {
-        self.inner.read()
-    }
-
-    #[inline(always)]
-    pub fn readf(&self, flags: I::Value) -> bool {
-        self.inner.readf(flags)
-    }
-}
-
-pub struct WriteOnly<I: Io> {
-    inner: I
-}
-
-impl<I: Io> WriteOnly<I> {
-    pub const fn new(inner: I) -> WriteOnly<I> {
-        WriteOnly {
-            inner: inner
-        }
-    }
-
-    #[inline(always)]
-    pub fn write(&mut self, value: I::Value) {
-        self.inner.write(value)
-    }
-
-    #[inline(always)]
-    pub fn writef(&mut self, flags: I::Value, value: bool) {
-        self.inner.writef(flags, value)
-    }
-}
deleted file mode 100644
--- a/third_party/rust/redox_syscall-0.1.16/src/io/mmio.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-use core::intrinsics::{volatile_load, volatile_store};
-use core::mem::uninitialized;
-use core::ops::{BitAnd, BitOr, Not};
-
-use super::io::Io;
-
-#[repr(packed)]
-pub struct Mmio<T> {
-    value: T,
-}
-
-impl<T> Mmio<T> {
-    /// Create a new Mmio without initializing
-    pub fn new() -> Self {
-        Mmio {
-            value: unsafe { uninitialized() }
-        }
-    }
-}
-
-impl<T> Io for Mmio<T> where T: Copy + PartialEq + BitAnd<Output = T> + BitOr<Output = T> + Not<Output = T> {
-    type Value = T;
-
-    fn read(&self) -> T {
-        unsafe { volatile_load(&self.value) }
-    }
-
-    fn write(&mut self, value: T) {
-        unsafe { volatile_store(&mut self.value, value) };
-    }
-}
deleted file mode 100644
--- a/third_party/rust/redox_syscall-0.1.16/src/io/mod.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-//! I/O functions
-
-pub use self::dma::*;
-pub use self::io::*;
-pub use self::mmio::*;
-pub use self::pio::*;
-
-mod dma;
-mod io;
-mod mmio;
-mod pio;
deleted file mode 100644
--- a/third_party/rust/redox_syscall-0.1.16/src/io/pio.rs
+++ /dev/null
@@ -1,89 +0,0 @@
-use core::marker::PhantomData;
-
-use super::io::Io;
-
-/// Generic PIO
-#[derive(Copy, Clone)]
-pub struct Pio<T> {
-    port: u16,
-    value: PhantomData<T>,
-}
-
-impl<T> Pio<T> {
-    /// Create a PIO from a given port
-    pub const fn new(port: u16) -> Self {
-        Pio::<T> {
-            port: port,
-            value: PhantomData,
-        }
-    }
-}
-
-/// Read/Write for byte PIO
-impl Io for Pio<u8> {
-    type Value = u8;
-
-    /// Read
-    #[inline(always)]
-    fn read(&self) -> u8 {
-        let value: u8;
-        unsafe {
-            asm!("in $0, $1" : "={al}"(value) : "{dx}"(self.port) : "memory" : "intel", "volatile");
-        }
-        value
-    }
-
-    /// Write
-    #[inline(always)]
-    fn write(&mut self, value: u8) {
-        unsafe {
-            asm!("out $1, $0" : : "{al}"(value), "{dx}"(self.port) : "memory" : "intel", "volatile");
-        }
-    }
-}
-
-/// Read/Write for word PIO
-impl Io for Pio<u16> {
-    type Value = u16;
-
-    /// Read
-    #[inline(always)]
-    fn read(&self) -> u16 {
-        let value: u16;
-        unsafe {
-            asm!("in $0, $1" : "={ax}"(value) : "{dx}"(self.port) : "memory" : "intel", "volatile");
-        }
-        value
-    }
-
-    /// Write
-    #[inline(always)]
-    fn write(&mut self, value: u16) {
-        unsafe {
-            asm!("out $1, $0" : : "{ax}"(value), "{dx}"(self.port) : "memory" : "intel", "volatile");
-        }
-    }
-}
-
-/// Read/Write for doubleword PIO
-impl Io for Pio<u32> {
-    type Value = u32;
-
-    /// Read
-    #[inline(always)]
-    fn read(&self) -> u32 {
-        let value: u32;
-        unsafe {
-            asm!("in $0, $1" : "={eax}"(value) : "{dx}"(self.port) : "memory" : "intel", "volatile");
-        }
-        value
-    }
-
-    /// Write
-    #[inline(always)]
-    fn write(&mut self, value: u32) {
-        unsafe {
-            asm!("out $1, $0" : : "{eax}"(value), "{dx}"(self.port) : "memory" : "intel", "volatile");
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/redox_syscall-0.1.16/src/lib.rs
+++ /dev/null
@@ -1,47 +0,0 @@
-#![deny(warnings)]
-#![feature(asm)]
-#![feature(const_fn)]
-#![feature(core_intrinsics)]
-#![no_std]
-
-pub use self::arch::*;
-pub use self::call::*;
-pub use self::data::*;
-pub use self::error::*;
-pub use self::flag::*;
-pub use self::io::*;
-pub use self::number::*;
-pub use self::scheme::*;
-
-#[cfg(target_arch = "arm")]
-#[path="arch/arm.rs"]
-mod arch;
-
-#[cfg(target_arch = "x86")]
-#[path="arch/x86.rs"]
-mod arch;
-
-#[cfg(target_arch = "x86_64")]
-#[path="arch/x86_64.rs"]
-mod arch;
-
-/// Function definitions
-pub mod call;
-
-/// Complex structures that are used for some system calls
-pub mod data;
-
-/// All errors that can be generated by a system call
-pub mod error;
-
-/// Flags used as an argument to many system calls
-pub mod flag;
-
-/// Functions for low level hardware control
-pub mod io;
-
-/// Call numbers used by each system call
-pub mod number;
-
-/// A trait useful for scheme handlers
-pub mod scheme;
deleted file mode 100644
--- a/third_party/rust/redox_syscall-0.1.16/src/number.rs
+++ /dev/null
@@ -1,64 +0,0 @@
-pub const SYS_CLASS: usize =    0xF000_0000;
-pub const SYS_CLASS_PATH: usize=0x1000_0000;
-pub const SYS_CLASS_FILE: usize=0x2000_0000;
-
-pub const SYS_ARG: usize =      0x0F00_0000;
-pub const SYS_ARG_SLICE: usize =0x0100_0000;
-pub const SYS_ARG_MSLICE: usize=0x0200_0000;
-pub const SYS_ARG_PATH: usize = 0x0300_0000;
-
-pub const SYS_RET: usize =      0x00F0_0000;
-pub const SYS_RET_FILE: usize = 0x0010_0000;
-
-pub const SYS_LINK: usize =     SYS_CLASS_PATH | SYS_ARG_PATH | 9;
-pub const SYS_OPEN: usize =     SYS_CLASS_PATH | SYS_RET_FILE | 5;
-pub const SYS_CHMOD: usize =    SYS_CLASS_PATH | 15;
-pub const SYS_RMDIR: usize =    SYS_CLASS_PATH | 84;
-pub const SYS_UNLINK: usize =   SYS_CLASS_PATH | 10;
-
-pub const SYS_CLOSE: usize =    SYS_CLASS_FILE | 6;
-pub const SYS_DUP: usize =      SYS_CLASS_FILE | SYS_RET_FILE | 41;
-pub const SYS_DUP2: usize =      SYS_CLASS_FILE | SYS_RET_FILE | 63;
-pub const SYS_READ: usize =     SYS_CLASS_FILE | SYS_ARG_MSLICE | 3;
-pub const SYS_WRITE: usize =    SYS_CLASS_FILE | SYS_ARG_SLICE | 4;
-pub const SYS_LSEEK: usize =    SYS_CLASS_FILE | 19;
-pub const SYS_FCNTL: usize =    SYS_CLASS_FILE | 55;
-pub const SYS_FEVENT: usize =   SYS_CLASS_FILE | 927;
-pub const SYS_FMAP: usize =     SYS_CLASS_FILE | 90;
-pub const SYS_FUNMAP: usize =   SYS_CLASS_FILE | 91;
-pub const SYS_FPATH: usize =    SYS_CLASS_FILE | SYS_ARG_MSLICE | 928;
-pub const SYS_FSTAT: usize =    SYS_CLASS_FILE | SYS_ARG_MSLICE | 28;
-pub const SYS_FSTATVFS: usize = SYS_CLASS_FILE | SYS_ARG_MSLICE | 100;
-pub const SYS_FSYNC: usize =    SYS_CLASS_FILE | 118;
-pub const SYS_FTRUNCATE: usize =SYS_CLASS_FILE | 93;
-
-pub const SYS_BRK: usize =      45;
-pub const SYS_CHDIR: usize =    12;
-pub const SYS_CLOCK_GETTIME: usize = 265;
-pub const SYS_CLONE: usize =    120;
-pub const SYS_EXECVE: usize =   11;
-pub const SYS_EXIT: usize =     1;
-pub const SYS_FUTEX: usize =    240;
-pub const SYS_GETCWD: usize =   183;
-pub const SYS_GETEGID: usize =  202;
-pub const SYS_GETENS: usize =   951;
-pub const SYS_GETEUID: usize =  201;
-pub const SYS_GETGID: usize =   200;
-pub const SYS_GETNS: usize =    950;
-pub const SYS_GETPID: usize =   20;
-pub const SYS_GETUID: usize =   199;
-pub const SYS_IOPL: usize =     110;
-pub const SYS_KILL: usize =     37;
-pub const SYS_MKNS: usize =     984;
-pub const SYS_NANOSLEEP: usize =162;
-pub const SYS_PHYSALLOC: usize =945;
-pub const SYS_PHYSFREE: usize = 946;
-pub const SYS_PHYSMAP: usize =  947;
-pub const SYS_PHYSUNMAP: usize =948;
-pub const SYS_VIRTTOPHYS: usize=949;
-pub const SYS_PIPE2: usize =    331;
-pub const SYS_SETREGID: usize = 204;
-pub const SYS_SETRENS: usize =  952;
-pub const SYS_SETREUID: usize = 203;
-pub const SYS_WAITPID: usize =  7;
-pub const SYS_YIELD: usize =    158;
deleted file mode 100644
--- a/third_party/rust/redox_syscall-0.1.16/src/scheme.rs
+++ /dev/null
@@ -1,232 +0,0 @@
-use core::{mem, slice};
-
-use super::*;
-
-pub trait Scheme {
-    fn handle(&self, packet: &mut Packet) {
-        packet.a = Error::mux(match packet.a {
-            SYS_OPEN => self.open(unsafe { slice::from_raw_parts(packet.b as *const u8, packet.c) }, packet.d, packet.uid, packet.gid),
-            SYS_CHMOD => self.chmod(unsafe { slice::from_raw_parts(packet.b as *const u8, packet.c) }, packet.d as u16, packet.uid, packet.gid),
-            SYS_RMDIR => self.rmdir(unsafe { slice::from_raw_parts(packet.b as *const u8, packet.c) }, packet.uid, packet.gid),
-            SYS_UNLINK => self.unlink(unsafe { slice::from_raw_parts(packet.b as *const u8, packet.c) }, packet.uid, packet.gid),
-
-            SYS_DUP => self.dup(packet.b, unsafe { slice::from_raw_parts(packet.c as *const u8, packet.d) }),
-            SYS_READ => self.read(packet.b, unsafe { slice::from_raw_parts_mut(packet.c as *mut u8, packet.d) }),
-            SYS_WRITE => self.write(packet.b, unsafe { slice::from_raw_parts(packet.c as *const u8, packet.d) }),
-            SYS_LSEEK => self.seek(packet.b, packet.c, packet.d),
-            SYS_FCNTL => self.fcntl(packet.b, packet.c, packet.d),
-            SYS_FEVENT => self.fevent(packet.b, packet.c),
-            SYS_FMAP => self.fmap(packet.b, packet.c, packet.d),
-            SYS_FPATH => self.fpath(packet.b, unsafe { slice::from_raw_parts_mut(packet.c as *mut u8, packet.d) }),
-            SYS_FSTAT => if packet.d >= mem::size_of::<Stat>() { self.fstat(packet.b, unsafe { &mut *(packet.c as *mut Stat) }) } else { Err(Error::new(EFAULT)) },
-            SYS_FSTATVFS => if packet.d >= mem::size_of::<StatVfs>() { self.fstatvfs(packet.b, unsafe { &mut *(packet.c as *mut StatVfs) }) } else { Err(Error::new(EFAULT)) },
-            SYS_FSYNC => self.fsync(packet.b),
-            SYS_FTRUNCATE => self.ftruncate(packet.b, packet.c),
-            SYS_CLOSE => self.close(packet.b),
-
-            _ => Err(Error::new(ENOSYS))
-        });
-    }
-
-    /* Scheme operations */
-
-    #[allow(unused_variables)]
-    fn open(&self, path: &[u8], flags: usize, uid: u32, gid: u32) -> Result<usize> {
-        Err(Error::new(ENOENT))
-    }
-
-    #[allow(unused_variables)]
-    fn chmod(&self, path: &[u8], mode: u16, uid: u32, gid: u32) -> Result<usize> {
-        Err(Error::new(ENOENT))
-    }
-
-    #[allow(unused_variables)]
-    fn rmdir(&self, path: &[u8], uid: u32, gid: u32) -> Result<usize> {
-        Err(Error::new(ENOENT))
-    }
-
-    #[allow(unused_variables)]
-    fn unlink(&self, path: &[u8], uid: u32, gid: u32) -> Result<usize> {
-        Err(Error::new(ENOENT))
-    }
-
-    /* Resource operations */
-    #[allow(unused_variables)]
-    fn dup(&self, old_id: usize, buf: &[u8]) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-
-    #[allow(unused_variables)]
-    fn read(&self, id: usize, buf: &mut [u8]) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-
-    #[allow(unused_variables)]
-    fn write(&self, id: usize, buf: &[u8]) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-
-    #[allow(unused_variables)]
-    fn seek(&self, id: usize, pos: usize, whence: usize) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-
-    #[allow(unused_variables)]
-    fn fcntl(&self, id: usize, cmd: usize, arg: usize) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-
-    #[allow(unused_variables)]
-    fn fevent(&self, id: usize, flags: usize) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-
-    #[allow(unused_variables)]
-    fn fmap(&self, id: usize, offset: usize, size: usize) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-
-    #[allow(unused_variables)]
-    fn fpath(&self, id: usize, buf: &mut [u8]) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-
-    #[allow(unused_variables)]
-    fn fstat(&self, id: usize, stat: &mut Stat) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-
-    #[allow(unused_variables)]
-    fn fstatvfs(&self, id: usize, stat: &mut StatVfs) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-
-    #[allow(unused_variables)]
-    fn fsync(&self, id: usize) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-
-    #[allow(unused_variables)]
-    fn ftruncate(&self, id: usize, len: usize) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-
-    #[allow(unused_variables)]
-    fn close(&self, id: usize) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-}
-
-pub trait SchemeMut {
-    fn handle(&mut self, packet: &mut Packet) {
-        packet.a = Error::mux(match packet.a {
-            SYS_OPEN => self.open(unsafe { slice::from_raw_parts(packet.b as *const u8, packet.c) }, packet.d, packet.uid, packet.gid),
-            SYS_CHMOD => self.chmod(unsafe { slice::from_raw_parts(packet.b as *const u8, packet.c) }, packet.d as u16, packet.uid, packet.gid),
-            SYS_RMDIR => self.rmdir(unsafe { slice::from_raw_parts(packet.b as *const u8, packet.c) }, packet.uid, packet.gid),
-            SYS_UNLINK => self.unlink(unsafe { slice::from_raw_parts(packet.b as *const u8, packet.c) }, packet.uid, packet.gid),
-
-            SYS_DUP => self.dup(packet.b, unsafe { slice::from_raw_parts(packet.c as *const u8, packet.d) }),
-            SYS_READ => self.read(packet.b, unsafe { slice::from_raw_parts_mut(packet.c as *mut u8, packet.d) }),
-            SYS_WRITE => self.write(packet.b, unsafe { slice::from_raw_parts(packet.c as *const u8, packet.d) }),
-            SYS_LSEEK => self.seek(packet.b, packet.c, packet.d),
-            SYS_FCNTL => self.fcntl(packet.b, packet.c, packet.d),
-            SYS_FEVENT => self.fevent(packet.b, packet.c),
-            SYS_FMAP => self.fmap(packet.b, packet.c, packet.d),
-            SYS_FPATH => self.fpath(packet.b, unsafe { slice::from_raw_parts_mut(packet.c as *mut u8, packet.d) }),
-            SYS_FSTAT => if packet.d >= mem::size_of::<Stat>() { self.fstat(packet.b, unsafe { &mut *(packet.c as *mut Stat) }) } else { Err(Error::new(EFAULT)) },
-            SYS_FSTATVFS => if packet.d >= mem::size_of::<StatVfs>() { self.fstatvfs(packet.b, unsafe { &mut *(packet.c as *mut StatVfs) }) } else { Err(Error::new(EFAULT)) },
-            SYS_FSYNC => self.fsync(packet.b),
-            SYS_FTRUNCATE => self.ftruncate(packet.b, packet.c),
-            SYS_CLOSE => self.close(packet.b),
-
-            _ => Err(Error::new(ENOSYS))
-        });
-    }
-
-    /* Scheme operations */
-    #[allow(unused_variables)]
-    fn open(&mut self, path: &[u8], flags: usize, uid: u32, gid: u32) -> Result<usize> {
-        Err(Error::new(ENOENT))
-    }
-
-    #[allow(unused_variables)]
-    fn chmod(&self, path: &[u8], mode: u16, uid: u32, gid: u32) -> Result<usize> {
-        Err(Error::new(ENOENT))
-    }
-
-    #[allow(unused_variables)]
-    fn rmdir(&mut self, path: &[u8], uid: u32, gid: u32) -> Result<usize> {
-        Err(Error::new(ENOENT))
-    }
-
-    #[allow(unused_variables)]
-    fn unlink(&mut self, path: &[u8], uid: u32, gid: u32) -> Result<usize> {
-        Err(Error::new(ENOENT))
-    }
-
-    /* Resource operations */
-    #[allow(unused_variables)]
-    fn dup(&mut self, old_id: usize, buf: &[u8]) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-
-    #[allow(unused_variables)]
-    fn read(&mut self, id: usize, buf: &mut [u8]) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-
-    #[allow(unused_variables)]
-    fn write(&mut self, id: usize, buf: &[u8]) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-
-    #[allow(unused_variables)]
-    fn seek(&mut self, id: usize, pos: usize, whence: usize) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-
-    #[allow(unused_variables)]
-    fn fcntl(&mut self, id: usize, cmd: usize, arg: usize) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-
-    #[allow(unused_variables)]
-    fn fevent(&mut self, id: usize, flags: usize) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-
-    #[allow(unused_variables)]
-    fn fmap(&mut self, id: usize, offset: usize, size: usize) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-
-    #[allow(unused_variables)]
-    fn fpath(&mut self, id: usize, buf: &mut [u8]) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-
-    #[allow(unused_variables)]
-    fn fstat(&mut self, id: usize, stat: &mut Stat) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-
-    #[allow(unused_variables)]
-    fn fstatvfs(&self, id: usize, stat: &mut StatVfs) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-
-    #[allow(unused_variables)]
-    fn fsync(&mut self, id: usize) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-
-    #[allow(unused_variables)]
-    fn ftruncate(&mut self, id: usize, len: usize) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-
-    #[allow(unused_variables)]
-    fn close(&mut self, id: usize) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-}
--- a/third_party/rust/redox_syscall/.cargo-checksum.json
+++ b/third_party/rust/redox_syscall/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{"Cargo.toml":"c725f317bb27871da237c88ca08a137e2dbe1f2864d48ffd9fe65e545cd9207a","LICENSE":"efcfee7981ff72431fffb06925cad00a23dce079ed4354f61030ad5abdb78829","README.md":"f2aabeb00e422ebe0f5ccdde1449fca7e8da5e563fb84024db83742ca12633fc","src/arch/arm.rs":"44ed9097879fce0ebe85d29e25ba378fb3ee7fcd649b569207495ed601c42a1c","src/arch/x86.rs":"e72a7f653c25b1ea5595af7ce991fe0e5c96547e127fc67e4967d60abbe1d3bd","src/arch/x86_64.rs":"499a0c997756c1cac5f4b4b98cff474a4e759695d3664712bd1a92d5d4a4a5f1","src/call.rs":"9b8517947298b82f0ccde0e97288856fee20d484470996d4bd19b725ecb7892b","src/data.rs":"8602d05b437216e6774658902f2d5fb030edc7510754ce7277fd299ab53a6b8b","src/error.rs":"b23c12db8cafb64f3b909a95bdd47cf03f62f6fa1201b40892febf46ec56bcb4","src/flag.rs":"4e10f5aeeba8406d50155332d59f7933c933dd7a03cc0a8316237e389c30e278","src/io/dma.rs":"4ab65016b3bc9121f0844dc4b8de77608eba327c0e0d930900254242b2c204b0","src/io/io.rs":"1bcb36d1867e9bab6a8186cd6928efe70ae2655e9f9d0dd3def20bc0fb6a82f6","src/io/mmio.rs":"bd475c815d483cc2b187348c32e10f94df0ca756ee8d14260b6ca3c660b2a73a","src/io/mod.rs":"4df12af3e82e6b5fe22112c9f51552112ee4811b7d1131d2a43d608d8d1cac09","src/io/pio.rs":"219fcd317d6c490a14794ec4db9de3e305c722dda720043c67076bda60632bb8","src/lib.rs":"988fb0b0bd3b396345f11ef46617072aeaf9307d3fa05a4d2a2ee9d590598bba","src/number.rs":"f9779b8abf0473ffbc81614746eb6ef5648129984a69eb43e4890a5b4c0aaedf","src/scheme.rs":"fe4cfac446eb1951795f588648afa0f6014566a7e2aa423f5f6f1dad45fe8583"},"package":"8dde11f18c108289bef24469638a04dce49da56084f2d50618b226e47eb04509"}
\ No newline at end of file
+{"files":{"Cargo.toml":"e1423d4f80dd1b358812a9993312cf6338df844c2b15e423ab779bf914cead14","src/arch/arm.rs":"0cd845b3790f7358b5290b58163ae2663b46b7ecf64eb8c6b0a29b33da6f143c","src/arch/x86.rs":"3fc9757cbb775bd08da9999ab39d95b62b3cb509e0ab309dd26c11c3fbdbc778","src/arch/x86_64.rs":"37bc2c6e74c009ff5f2896b249fac7ddf9f5e30e223a5122a28a93cef5ba33b1","src/call.rs":"7913da5b7d8b11e290d863d6cbca17be20c98bef420ddb964519a9c9cfeff366","src/data.rs":"c3406d581387828b6fb246bea2b57582cef890cedeb2c0e632e472cd3776d884","src/error.rs":"b23c12db8cafb64f3b909a95bdd47cf03f62f6fa1201b40892febf46ec56bcb4","src/flag.rs":"400c91c57b1ab1afd6ab06c0582b1b0817590688900882de31fc3a4aab27da49","src/io/dma.rs":"4ab65016b3bc9121f0844dc4b8de77608eba327c0e0d930900254242b2c204b0","src/io/io.rs":"1bcb36d1867e9bab6a8186cd6928efe70ae2655e9f9d0dd3def20bc0fb6a82f6","src/io/mmio.rs":"bd475c815d483cc2b187348c32e10f94df0ca756ee8d14260b6ca3c660b2a73a","src/io/mod.rs":"4df12af3e82e6b5fe22112c9f51552112ee4811b7d1131d2a43d608d8d1cac09","src/io/pio.rs":"219fcd317d6c490a14794ec4db9de3e305c722dda720043c67076bda60632bb8","src/lib.rs":"988fb0b0bd3b396345f11ef46617072aeaf9307d3fa05a4d2a2ee9d590598bba","src/number.rs":"9043372ef517ecbbca776536efa3d7a822ba6f49d29c20d4c3648f0e3c85fe35","src/scheme.rs":"3281173d9a5d7d420f5dbdaed7562ba5adc1ce5753843a3bf3eecf4060eb09c2"},"package":"8dd35cc9a8bdec562c757e3d43c1526b5c6d2653e23e2315065bc25556550753"}
\ No newline at end of file
--- a/third_party/rust/redox_syscall/Cargo.toml
+++ b/third_party/rust/redox_syscall/Cargo.toml
@@ -1,23 +1,9 @@
-# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
-#
-# When uploading crates to the registry Cargo will automatically
-# "normalize" Cargo.toml files for maximal compatibility
-# with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g. crates.io) dependencies
-#
-# If you believe there's an error in this file please file an
-# issue against the rust-lang/cargo repository. If you're
-# editing this file be aware that the upstream Cargo.toml
-# will likely look very different (and much more reasonable)
-
 [package]
 name = "redox_syscall"
-version = "0.1.31"
-authors = ["Jeremy Soller <jackpot51@gmail.com>"]
+version = "0.1.16"
 description = "A Rust library to access raw Redox system calls"
-documentation = "https://docs.rs/redox_syscall"
 license = "MIT"
-repository = "https://github.com/redox-os/syscall"
+authors = ["Jeremy Soller <jackpot51@gmail.com>"]
 
 [lib]
 name = "syscall"
deleted file mode 100644
--- a/third_party/rust/redox_syscall/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright (c) 2017 Redox OS Developers
-
-MIT License
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
deleted file mode 100644
--- a/third_party/rust/redox_syscall/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-[Redox OS][1]'s syscall API
-
-[Documentation][2]
-
-[1]: https://github.com/redox-os/redox
-[2]: https://docs.rs/redox_syscall
-
--- a/third_party/rust/redox_syscall/src/arch/arm.rs
+++ b/third_party/rust/redox_syscall/src/arch/arm.rs
@@ -1,9 +1,9 @@
-use super::error::{Error, Result};
+use error::{Error, Result};
 
 pub unsafe fn syscall0(mut a: usize) -> Result<usize> {
     asm!("swi $$0"
         : "={r0}"(a)
         : "{r7}"(a)
         : "memory"
         : "volatile");
 
@@ -56,18 +56,17 @@ pub unsafe fn syscall4(mut a: usize, b: 
         : "={r0}"(a)
         : "{r7}"(a), "{r0}"(b), "{r1}"(c), "{r2}"(d), "{r3}"(e)
         : "memory"
         : "volatile");
 
     Error::demux(a)
 }
 
-pub unsafe fn syscall5(mut a: usize, b: usize, c: usize, d: usize, e: usize, f: usize)
-                       -> Result<usize> {
+pub unsafe fn syscall5(mut a: usize, b: usize, c: usize, d: usize, e: usize, f: usize) -> Result<usize> {
     asm!("swi $$0"
         : "={r0}"(a)
         : "{r7}"(a), "{r0}"(b), "{r1}"(c), "{r2}"(d), "{r3}"(e), "{r4}"(f)
         : "memory"
         : "volatile");
 
     Error::demux(a)
 }
--- a/third_party/rust/redox_syscall/src/arch/x86.rs
+++ b/third_party/rust/redox_syscall/src/arch/x86.rs
@@ -1,9 +1,9 @@
-use super::error::{Error, Result};
+use error::{Error, Result};
 
 pub unsafe fn syscall0(mut a: usize) -> Result<usize> {
     asm!("int 0x80"
         : "={eax}"(a)
         : "{eax}"(a)
         : "memory"
         : "intel", "volatile");
 
@@ -56,18 +56,17 @@ pub unsafe fn syscall4(mut a: usize, b: 
         : "={eax}"(a)
         : "{eax}"(a), "{ebx}"(b), "{ecx}"(c), "{edx}"(d), "{esi}"(e)
         : "memory"
         : "intel", "volatile");
 
     Error::demux(a)
 }
 
-pub unsafe fn syscall5(mut a: usize, b: usize, c: usize, d: usize, e: usize, f: usize)
-                       -> Result<usize> {
+pub unsafe fn syscall5(mut a: usize, b: usize, c: usize, d: usize, e: usize, f: usize) -> Result<usize> {
     asm!("int 0x80"
         : "={eax}"(a)
         : "{eax}"(a), "{ebx}"(b), "{ecx}"(c), "{edx}"(d), "{esi}"(e), "{edi}"(f)
         : "memory"
         : "intel", "volatile");
 
     Error::demux(a)
 }
--- a/third_party/rust/redox_syscall/src/arch/x86_64.rs
+++ b/third_party/rust/redox_syscall/src/arch/x86_64.rs
@@ -1,9 +1,9 @@
-use super::error::{Error, Result};
+use error::{Error, Result};
 
 pub unsafe fn syscall0(mut a: usize) -> Result<usize> {
     asm!("int 0x80"
         : "={rax}"(a)
         : "{rax}"(a)
         : "memory"
         : "intel", "volatile");
 
@@ -20,18 +20,17 @@ pub unsafe fn syscall1(mut a: usize, b: 
     Error::demux(a)
 }
 
 // Clobbers all registers - special for clone
 pub unsafe fn syscall1_clobber(mut a: usize, b: usize) -> Result<usize> {
     asm!("int 0x80"
         : "={rax}"(a)
         : "{rax}"(a), "{rbx}"(b)
-        : "memory", "rbx", "rcx", "rdx", "rsi", "rdi", "r8",
-          "r9", "r10", "r11", "r12", "r13", "r14", "r15"
+        : "memory", "rbx", "rcx", "rdx", "rsi", "rdi", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
         : "intel", "volatile");
 
     Error::demux(a)
 }
 
 pub unsafe fn syscall2(mut a: usize, b: usize, c: usize) -> Result<usize> {
     asm!("int 0x80"
         : "={rax}"(a)
@@ -57,18 +56,17 @@ pub unsafe fn syscall4(mut a: usize, b: 
         : "={rax}"(a)
         : "{rax}"(a), "{rbx}"(b), "{rcx}"(c), "{rdx}"(d), "{rsi}"(e)
         : "memory"
         : "intel", "volatile");
 
     Error::demux(a)
 }
 
-pub unsafe fn syscall5(mut a: usize, b: usize, c: usize, d: usize, e: usize, f: usize)
-                       -> Result<usize> {
+pub unsafe fn syscall5(mut a: usize, b: usize, c: usize, d: usize, e: usize, f: usize) -> Result<usize> {
     asm!("int 0x80"
         : "={rax}"(a)
         : "{rax}"(a), "{rbx}"(b), "{rcx}"(c), "{rdx}"(d), "{rsi}"(e), "{rdi}"(f)
         : "memory"
         : "intel", "volatile");
 
     Error::demux(a)
 }
--- a/third_party/rust/redox_syscall/src/call.rs
+++ b/third_party/rust/redox_syscall/src/call.rs
@@ -1,20 +1,14 @@
 use super::arch::*;
-use super::data::{SigAction, Stat, StatVfs, TimeSpec};
+use super::data::{Stat, StatVfs, TimeSpec};
 use super::error::Result;
 use super::number::*;
 
-use core::{mem, ptr};
-
-// Signal restorer
-extern "C" fn restorer() -> ! {
-    sigreturn().unwrap();
-    unreachable!();
-}
+use core::mem;
 
 /// Set the end of the process's heap
 ///
 /// When `addr` is `0`, this function will return the current break.
 ///
 /// When `addr` is nonzero, this function will attempt to set the end of the process's
 /// heap to `addr` and return the new program break. The new program break should be
 /// checked by the allocator, it may not be exactly `addr`, as it may be aligned to a page
@@ -31,25 +25,25 @@ pub unsafe fn brk(addr: usize) -> Result
 /// either a relative, scheme relative, or absolute path.
 ///
 /// On success, `Ok(0)` will be returned. On error, one of the following errors will be returned.
 ///
 /// # Errors
 ///
 /// * `EACCES` - permission is denied for one of the components of `path`, or `path`
 /// * `EFAULT` - `path` does not point to the process's addressible memory
-/// * `EIO` - an I/O error occurred
+/// * `EIO` - an I/O error occured
 /// * `ENOENT` - `path` does not exit
 /// * `ENOTDIR` - `path` is not a directory
-pub fn chdir<T: AsRef<[u8]>>(path: T) -> Result<usize> {
-    unsafe { syscall2(SYS_CHDIR, path.as_ref().as_ptr() as usize, path.as_ref().len()) }
+pub fn chdir(path: &str) -> Result<usize> {
+    unsafe { syscall2(SYS_CHDIR, path.as_ptr() as usize, path.len()) }
 }
 
-pub fn chmod<T: AsRef<[u8]>>(path: T, mode: usize) -> Result<usize> {
-    unsafe { syscall3(SYS_CHMOD, path.as_ref().as_ptr() as usize, path.as_ref().len(), mode) }
+pub fn chmod(path: &str, mode: usize) -> Result<usize> {
+    unsafe { syscall3(SYS_CHMOD, path.as_ptr() as usize, path.len(), mode) }
 }
 
 /// Produce a fork of the current process, or a new process thread
 pub unsafe fn clone(flags: usize) -> Result<usize> {
     syscall1_clobber(SYS_CLONE, flags)
 }
 
 /// Close a file
@@ -68,19 +62,18 @@ pub fn dup(fd: usize, buf: &[u8]) -> Res
 }
 
 /// Copy and transform a file descriptor
 pub fn dup2(fd: usize, newfd: usize, buf: &[u8]) -> Result<usize> {
     unsafe { syscall4(SYS_DUP2, fd, newfd, buf.as_ptr() as usize, buf.len()) }
 }
 
 /// Replace the current process with a new executable
-pub fn execve<T: AsRef<[u8]>>(path: T, args: &[[usize; 2]]) -> Result<usize> {
-    unsafe { syscall4(SYS_EXECVE, path.as_ref().as_ptr() as usize,
-                      path.as_ref().len(), args.as_ptr() as usize, args.len()) }
+pub fn execve(path: &str, args: &[[usize; 2]]) -> Result<usize> {
+    unsafe { syscall4(SYS_EXECVE, path.as_ptr() as usize, path.len(), args.as_ptr() as usize, args.len()) }
 }
 
 /// Exit the current process
 pub fn exit(status: usize) -> Result<usize> {
     unsafe { syscall1(SYS_EXIT, status) }
 }
 
 /// Register a file for event-based I/O
@@ -123,24 +116,18 @@ pub fn fsync(fd: usize) -> Result<usize>
     unsafe { syscall1(SYS_FSYNC, fd) }
 }
 
 /// Truncate or extend a file to a specified length
 pub fn ftruncate(fd: usize, len: usize) -> Result<usize> {
     unsafe { syscall2(SYS_FTRUNCATE, fd, len) }
 }
 
-// Change modify and/or access times
-pub fn futimens(fd: usize, times: &[TimeSpec]) -> Result<usize> {
-    unsafe { syscall3(SYS_FUTIMENS, fd, times.as_ptr() as usize, times.len() * mem::size_of::<TimeSpec>()) }
-}
-
-/// Fast userspace mutex
-pub unsafe fn futex(addr: *mut i32, op: usize, val: i32, val2: usize, addr2: *mut i32)
-                    -> Result<usize> {
+/// Fast userspace mutex - TODO: Document
+pub unsafe fn futex(addr: *mut i32, op: usize, val: i32, val2: usize, addr2: *mut i32) -> Result<usize> {
     syscall5(SYS_FUTEX, addr as usize, op, (val as isize) as usize, val2, addr2 as usize)
 }
 
 /// Get the current working directory
 pub fn getcwd(buf: &mut [u8]) -> Result<usize> {
     unsafe { syscall2(SYS_GETCWD, buf.as_mut_ptr() as usize, buf.len()) }
 }
 
@@ -169,26 +156,16 @@ pub fn getns() -> Result<usize> {
     unsafe { syscall0(SYS_GETNS) }
 }
 
 /// Get the current process ID
 pub fn getpid() -> Result<usize> {
     unsafe { syscall0(SYS_GETPID) }
 }
 
-/// Get the process group ID
-pub fn getpgid(pid: usize) -> Result<usize> {
-    unsafe { syscall1(SYS_GETPGID, pid) }
-}
-
-/// Get the parent process ID
-pub fn getppid() -> Result<usize> {
-    unsafe { syscall0(SYS_GETPPID) }
-}
-
 /// Get the current user ID
 pub fn getuid() -> Result<usize> {
     unsafe { syscall0(SYS_GETUID) }
 }
 
 /// Set the I/O privilege level
 pub unsafe fn iopl(level: usize) -> Result<usize> {
     syscall1(SYS_IOPL, level)
@@ -211,23 +188,22 @@ pub fn lseek(fd: usize, offset: isize, w
 
 /// Make a new scheme namespace
 pub fn mkns(schemes: &[[usize; 2]]) -> Result<usize> {
     unsafe { syscall2(SYS_MKNS, schemes.as_ptr() as usize, schemes.len()) }
 }
 
 /// Sleep for the time specified in `req`
 pub fn nanosleep(req: &TimeSpec, rem: &mut TimeSpec) -> Result<usize> {
-    unsafe { syscall2(SYS_NANOSLEEP, req as *const TimeSpec as usize,
-                                     rem as *mut TimeSpec as usize) }
+    unsafe { syscall2(SYS_NANOSLEEP, req as *const TimeSpec as usize, rem as *mut TimeSpec as usize) }
 }
 
 /// Open a file
-pub fn open<T: AsRef<[u8]>>(path: T, flags: usize) -> Result<usize> {
-    unsafe { syscall3(SYS_OPEN, path.as_ref().as_ptr() as usize, path.as_ref().len(), flags) }
+pub fn open(path: &str, flags: usize) -> Result<usize> {
+    unsafe { syscall3(SYS_OPEN, path.as_ptr() as usize, path.len(), flags) }
 }
 
 /// Allocate pages, linearly in physical memory
 pub unsafe fn physalloc(size: usize) -> Result<usize> {
     syscall1(SYS_PHYSALLOC, size)
 }
 
 /// Free physically allocated pages
@@ -251,23 +227,18 @@ pub fn pipe2(fds: &mut [usize; 2], flags
 }
 
 /// Read from a file descriptor into a buffer
 pub fn read(fd: usize, buf: &mut [u8]) -> Result<usize> {
     unsafe { syscall3(SYS_READ, fd, buf.as_mut_ptr() as usize, buf.len()) }
 }
 
 /// Remove a directory
-pub fn rmdir<T: AsRef<[u8]>>(path: T) -> Result<usize> {
-    unsafe { syscall2(SYS_RMDIR, path.as_ref().as_ptr() as usize, path.as_ref().len()) }
-}
-
-/// Set the process group ID
-pub fn setpgid(pid: usize, pgid: usize) -> Result<usize> {
-    unsafe { syscall2(SYS_SETPGID, pid, pgid) }
+pub fn rmdir(path: &str) -> Result<usize> {
+    unsafe { syscall2(SYS_RMDIR, path.as_ptr() as usize, path.len()) }
 }
 
 /// Set the current process group IDs
 pub fn setregid(rgid: usize, egid: usize) -> Result<usize> {
     unsafe { syscall2(SYS_SETREGID, rgid, egid) }
 }
 
 /// Make a new scheme namespace
@@ -275,32 +246,19 @@ pub fn setrens(rns: usize, ens: usize) -
     unsafe { syscall2(SYS_SETRENS, rns, ens) }
 }
 
 /// Set the current process user IDs
 pub fn setreuid(ruid: usize, euid: usize) -> Result<usize> {
     unsafe { syscall2(SYS_SETREUID, ruid, euid) }
 }
 
-/// Set up a signal handler
-pub fn sigaction(sig: usize, act: Option<&SigAction>, oldact: Option<&mut SigAction>) -> Result<usize> {
-    unsafe { syscall4(SYS_SIGACTION, sig,
-                      act.map(|x| x as *const _).unwrap_or_else(ptr::null) as usize,
-                      oldact.map(|x| x as *mut _).unwrap_or_else(ptr::null_mut) as usize,
-                      restorer as usize) }
-}
-
-// Return from signal handler
-pub fn sigreturn() -> Result<usize> {
-    unsafe { syscall0(SYS_SIGRETURN) }
-}
-
 /// Remove a file
-pub fn unlink<T: AsRef<[u8]>>(path: T) -> Result<usize> {
-    unsafe { syscall2(SYS_UNLINK, path.as_ref().as_ptr() as usize, path.as_ref().len()) }
+pub fn unlink(path: &str) -> Result<usize> {
+    unsafe { syscall2(SYS_UNLINK, path.as_ptr() as usize, path.len()) }
 }
 
 /// Convert a virtual address to a physical one
 pub unsafe fn virttophys(virtual_address: usize) -> Result<usize> {
     syscall1(SYS_VIRTTOPHYS, virtual_address)
 }
 
 /// Check if a child process has exited or received a signal
@@ -314,17 +272,17 @@ pub fn waitpid(pid: usize, status: &mut 
 /// either an `Err`, explained below, or `Ok(count)` where `count` is the number of bytes which
 /// were written.
 ///
 /// # Errors
 ///
 /// * `EAGAIN` - the file descriptor was opened with `O_NONBLOCK` and writing would block
 /// * `EBADF` - the file descriptor is not valid or is not open for writing
 /// * `EFAULT` - `buf` does not point to the process's addressible memory
-/// * `EIO` - an I/O error occurred
+/// * `EIO` - an I/O error occured
 /// * `ENOSPC` - the device containing the file descriptor has no room for data
 /// * `EPIPE` - the file descriptor refers to a pipe or socket whose reading end is closed
 pub fn write(fd: usize, buf: &[u8]) -> Result<usize> {
     unsafe { syscall3(SYS_WRITE, fd, buf.as_ptr() as usize, buf.len()) }
 }
 
 /// Yield the process's time slice to the kernel
 ///
--- a/third_party/rust/redox_syscall/src/data.rs
+++ b/third_party/rust/redox_syscall/src/data.rs
@@ -21,17 +21,17 @@ impl DerefMut for Event {
     fn deref_mut(&mut self) -> &mut [u8] {
         unsafe {
             slice::from_raw_parts_mut(self as *mut Event as *mut u8, mem::size_of::<Event>()) as &mut [u8]
         }
     }
 }
 
 #[derive(Copy, Clone, Debug, Default)]
-#[repr(C)]
+#[repr(packed)]
 pub struct Packet {
     pub id: u64,
     pub pid: usize,
     pub uid: u32,
     pub gid: u32,
     pub a: usize,
     pub b: usize,
     pub c: usize,
@@ -50,36 +50,18 @@ impl Deref for Packet {
 impl DerefMut for Packet {
     fn deref_mut(&mut self) -> &mut [u8] {
         unsafe {
             slice::from_raw_parts_mut(self as *mut Packet as *mut u8, mem::size_of::<Packet>()) as &mut [u8]
         }
     }
 }
 
-#[derive(Copy, Clone, Debug)]
-#[repr(C)]
-pub struct SigAction {
-    pub sa_handler: extern "C" fn(usize),
-    pub sa_mask: [u64; 2],
-    pub sa_flags: usize,
-}
-
-impl Default for SigAction {
-    fn default() -> Self {
-        Self {
-            sa_handler: unsafe { mem::transmute(0usize) },
-            sa_mask: [0; 2],
-            sa_flags: 0,
-        }
-    }
-}
-
 #[derive(Copy, Clone, Debug, Default)]
-#[repr(C)]
+#[repr(packed)]
 pub struct Stat {
     pub st_dev: u64,
     pub st_ino: u64,
     pub st_mode: u16,
     pub st_nlink: u32,
     pub st_uid: u32,
     pub st_gid: u32,
     pub st_size: u64,
@@ -92,61 +74,58 @@ pub struct Stat {
     pub st_ctime: u64,
     pub st_ctime_nsec: u32,
 }
 
 impl Deref for Stat {
     type Target = [u8];
     fn deref(&self) -> &[u8] {
         unsafe {
-            slice::from_raw_parts(self as *const Stat as *const u8,
-                                  mem::size_of::<Stat>()) as &[u8]
+            slice::from_raw_parts(self as *const Stat as *const u8, mem::size_of::<Stat>()) as &[u8]
         }
     }
 }
 
 impl DerefMut for Stat {
     fn deref_mut(&mut self) -> &mut [u8] {
         unsafe {
-            slice::from_raw_parts_mut(self as *mut Stat as *mut u8,
-                                      mem::size_of::<Stat>()) as &mut [u8]
+            slice::from_raw_parts_mut(self as *mut Stat as *mut u8, mem::size_of::<Stat>()) as &mut [u8]
         }
     }
 }
 
 #[derive(Copy, Clone, Debug, Default)]
-#[repr(C)]
+#[repr(packed)]
 pub struct StatVfs {
     pub f_bsize: u32,
     pub f_blocks: u64,
     pub f_bfree: u64,
     pub f_bavail: u64,
+    //TODO: More fields https://linux.die.net/man/2/statvfs
 }
 
 impl Deref for StatVfs {
     type Target = [u8];
     fn deref(&self) -> &[u8] {
         unsafe {
-            slice::from_raw_parts(self as *const StatVfs as *const u8,
-                                  mem::size_of::<StatVfs>()) as &[u8]
+            slice::from_raw_parts(self as *const StatVfs as *const u8, mem::size_of::<StatVfs>()) as &[u8]
         }
     }
 }
 
 impl DerefMut for StatVfs {
     fn deref_mut(&mut self) -> &mut [u8] {
         unsafe {
-            slice::from_raw_parts_mut(self as *mut StatVfs as *mut u8,
-                                      mem::size_of::<StatVfs>()) as &mut [u8]
+            slice::from_raw_parts_mut(self as *mut StatVfs as *mut u8, mem::size_of::<StatVfs>()) as &mut [u8]
         }
     }
 }
 
 #[derive(Copy, Clone, Debug, Default)]
-#[repr(C)]
+#[repr(packed)]
 pub struct TimeSpec {
     pub tv_sec: i64,
     pub tv_nsec: i32,
 }
 
 impl Deref for TimeSpec {
     type Target = [u8];
     fn deref(&self) -> &[u8] {
--- a/third_party/rust/redox_syscall/src/flag.rs
+++ b/third_party/rust/redox_syscall/src/flag.rs
@@ -1,41 +1,33 @@
 pub const CLONE_VM: usize = 0x100;
 pub const CLONE_FS: usize = 0x200;
 pub const CLONE_FILES: usize = 0x400;
-pub const CLONE_SIGHAND: usize = 0x800;
 pub const CLONE_VFORK: usize = 0x4000;
-pub const CLONE_THREAD: usize = 0x10000;
 
 pub const CLOCK_REALTIME: usize = 1;
 pub const CLOCK_MONOTONIC: usize = 4;
 
 pub const EVENT_NONE: usize = 0;
 pub const EVENT_READ: usize = 1;
 pub const EVENT_WRITE: usize = 2;
 
-pub const F_DUPFD: usize = 0;
-pub const F_GETFD: usize = 1;
-pub const F_SETFD: usize = 2;
-pub const F_GETFL: usize = 3;
-pub const F_SETFL: usize = 4;
+pub const F_GETFL: usize = 1;
+pub const F_SETFL: usize = 2;
 
 pub const FUTEX_WAIT: usize = 0;
 pub const FUTEX_WAKE: usize = 1;
 pub const FUTEX_REQUEUE: usize = 2;
 
 pub const MAP_WRITE: usize = 1;
 pub const MAP_WRITE_COMBINE: usize = 2;
 
 pub const MODE_TYPE: u16 = 0xF000;
 pub const MODE_DIR: u16 = 0x4000;
 pub const MODE_FILE: u16 = 0x8000;
-pub const MODE_SYMLINK: u16 = 0xA000;
-pub const MODE_FIFO: u16 = 0x1000;
-pub const MODE_CHR: u16 = 0x2000;
 
 pub const MODE_PERM: u16 = 0x0FFF;
 pub const MODE_SETUID: u16 = 0o4000;
 pub const MODE_SETGID: u16 = 0o2000;
 
 pub const O_RDONLY: usize =     0x0001_0000;
 pub const O_WRONLY: usize =     0x0002_0000;
 pub const O_RDWR: usize =       0x0003_0000;
@@ -46,18 +38,16 @@ pub const O_EXLOCK: usize =     0x0020_0
 pub const O_ASYNC: usize =      0x0040_0000;
 pub const O_FSYNC: usize =      0x0080_0000;
 pub const O_CLOEXEC: usize =    0x0100_0000;
 pub const O_CREAT: usize =      0x0200_0000;
 pub const O_TRUNC: usize =      0x0400_0000;
 pub const O_EXCL: usize =       0x0800_0000;
 pub const O_DIRECTORY: usize =  0x1000_0000;
 pub const O_STAT: usize =       0x2000_0000;
-pub const O_SYMLINK: usize =    0x4000_0000;
-pub const O_NOFOLLOW: usize =   0x8000_0000;
 pub const O_ACCMODE: usize =    O_RDONLY | O_WRONLY | O_RDWR;
 
 pub const SEEK_SET: usize = 0;
 pub const SEEK_CUR: usize = 1;
 pub const SEEK_END: usize = 2;
 
 pub const SIGHUP: usize =   1;
 pub const SIGINT: usize =   2;
@@ -86,21 +76,9 @@ pub const SIGXCPU: usize =  24;
 pub const SIGXFSZ: usize =  25;
 pub const SIGVTALRM: usize= 26;
 pub const SIGPROF: usize =  27;
 pub const SIGWINCH: usize = 28;
 pub const SIGIO: usize =    29;
 pub const SIGPWR: usize =   30;
 pub const SIGSYS: usize =   31;
 
-pub const SIG_DFL: usize = 0;
-pub const SIG_IGN: usize = 1;
-
-pub const SA_NOCLDSTOP: usize = 0x00000001;
-pub const SA_NOCLDWAIT: usize = 0x00000002;
-pub const SA_SIGINFO: usize =   0x00000004;
-pub const SA_RESTORER: usize =  0x04000000;
-pub const SA_ONSTACK: usize =   0x08000000;
-pub const SA_RESTART: usize =   0x10000000;
-pub const SA_NODEFER: usize =   0x40000000;
-pub const SA_RESETHAND: usize = 0x80000000;
-
 pub const WNOHANG: usize = 1;
--- a/third_party/rust/redox_syscall/src/number.rs
+++ b/third_party/rust/redox_syscall/src/number.rs
@@ -13,58 +13,52 @@ pub const SYS_RET_FILE: usize = 0x0010_0
 pub const SYS_LINK: usize =     SYS_CLASS_PATH | SYS_ARG_PATH | 9;
 pub const SYS_OPEN: usize =     SYS_CLASS_PATH | SYS_RET_FILE | 5;
 pub const SYS_CHMOD: usize =    SYS_CLASS_PATH | 15;
 pub const SYS_RMDIR: usize =    SYS_CLASS_PATH | 84;
 pub const SYS_UNLINK: usize =   SYS_CLASS_PATH | 10;
 
 pub const SYS_CLOSE: usize =    SYS_CLASS_FILE | 6;
 pub const SYS_DUP: usize =      SYS_CLASS_FILE | SYS_RET_FILE | 41;
-pub const SYS_DUP2: usize =     SYS_CLASS_FILE | SYS_RET_FILE | 63;
+pub const SYS_DUP2: usize =      SYS_CLASS_FILE | SYS_RET_FILE | 63;
 pub const SYS_READ: usize =     SYS_CLASS_FILE | SYS_ARG_MSLICE | 3;
 pub const SYS_WRITE: usize =    SYS_CLASS_FILE | SYS_ARG_SLICE | 4;
 pub const SYS_LSEEK: usize =    SYS_CLASS_FILE | 19;
 pub const SYS_FCNTL: usize =    SYS_CLASS_FILE | 55;
 pub const SYS_FEVENT: usize =   SYS_CLASS_FILE | 927;
 pub const SYS_FMAP: usize =     SYS_CLASS_FILE | 90;
 pub const SYS_FUNMAP: usize =   SYS_CLASS_FILE | 91;
 pub const SYS_FPATH: usize =    SYS_CLASS_FILE | SYS_ARG_MSLICE | 928;
 pub const SYS_FSTAT: usize =    SYS_CLASS_FILE | SYS_ARG_MSLICE | 28;
 pub const SYS_FSTATVFS: usize = SYS_CLASS_FILE | SYS_ARG_MSLICE | 100;
 pub const SYS_FSYNC: usize =    SYS_CLASS_FILE | 118;
 pub const SYS_FTRUNCATE: usize =SYS_CLASS_FILE | 93;
-pub const SYS_FUTIMENS: usize = SYS_CLASS_FILE | SYS_ARG_SLICE | 320;
 
 pub const SYS_BRK: usize =      45;
 pub const SYS_CHDIR: usize =    12;
 pub const SYS_CLOCK_GETTIME: usize = 265;
 pub const SYS_CLONE: usize =    120;
 pub const SYS_EXECVE: usize =   11;
 pub const SYS_EXIT: usize =     1;
 pub const SYS_FUTEX: usize =    240;
 pub const SYS_GETCWD: usize =   183;
 pub const SYS_GETEGID: usize =  202;
 pub const SYS_GETENS: usize =   951;
 pub const SYS_GETEUID: usize =  201;
 pub const SYS_GETGID: usize =   200;
 pub const SYS_GETNS: usize =    950;
 pub const SYS_GETPID: usize =   20;
-pub const SYS_GETPGID: usize =  132;
-pub const SYS_GETPPID: usize =  64;
 pub const SYS_GETUID: usize =   199;
 pub const SYS_IOPL: usize =     110;
 pub const SYS_KILL: usize =     37;
 pub const SYS_MKNS: usize =     984;
 pub const SYS_NANOSLEEP: usize =162;
 pub const SYS_PHYSALLOC: usize =945;
 pub const SYS_PHYSFREE: usize = 946;
 pub const SYS_PHYSMAP: usize =  947;
 pub const SYS_PHYSUNMAP: usize =948;
 pub const SYS_VIRTTOPHYS: usize=949;
 pub const SYS_PIPE2: usize =    331;
-pub const SYS_SETPGID: usize =  57;
 pub const SYS_SETREGID: usize = 204;
 pub const SYS_SETRENS: usize =  952;
 pub const SYS_SETREUID: usize = 203;
-pub const SYS_SIGACTION: usize =67;
-pub const SYS_SIGRETURN: usize =119;
 pub const SYS_WAITPID: usize =  7;
 pub const SYS_YIELD: usize =    158;
--- a/third_party/rust/redox_syscall/src/scheme.rs
+++ b/third_party/rust/redox_syscall/src/scheme.rs
@@ -13,34 +13,22 @@ pub trait Scheme {
             SYS_DUP => self.dup(packet.b, unsafe { slice::from_raw_parts(packet.c as *const u8, packet.d) }),
             SYS_READ => self.read(packet.b, unsafe { slice::from_raw_parts_mut(packet.c as *mut u8, packet.d) }),
             SYS_WRITE => self.write(packet.b, unsafe { slice::from_raw_parts(packet.c as *const u8, packet.d) }),
             SYS_LSEEK => self.seek(packet.b, packet.c, packet.d),
             SYS_FCNTL => self.fcntl(packet.b, packet.c, packet.d),
             SYS_FEVENT => self.fevent(packet.b, packet.c),
             SYS_FMAP => self.fmap(packet.b, packet.c, packet.d),
             SYS_FPATH => self.fpath(packet.b, unsafe { slice::from_raw_parts_mut(packet.c as *mut u8, packet.d) }),
-            SYS_FSTAT => if packet.d >= mem::size_of::<Stat>() {
-                self.fstat(packet.b, unsafe { &mut *(packet.c as *mut Stat) })
-            } else {
-                Err(Error::new(EFAULT))
-            },
-            SYS_FSTATVFS => if packet.d >= mem::size_of::<StatVfs>() {
-                self.fstatvfs(packet.b, unsafe { &mut *(packet.c as *mut StatVfs) })
-            } else {
-                Err(Error::new(EFAULT))
-            },
+            SYS_FSTAT => if packet.d >= mem::size_of::<Stat>() { self.fstat(packet.b, unsafe { &mut *(packet.c as *mut Stat) }) } else { Err(Error::new(EFAULT)) },
+            SYS_FSTATVFS => if packet.d >= mem::size_of::<StatVfs>() { self.fstatvfs(packet.b, unsafe { &mut *(packet.c as *mut StatVfs) }) } else { Err(Error::new(EFAULT)) },
             SYS_FSYNC => self.fsync(packet.b),
             SYS_FTRUNCATE => self.ftruncate(packet.b, packet.c),
-            SYS_FUTIMENS => if packet.d >= mem::size_of::<TimeSpec>() {
-                self.futimens(packet.b, unsafe { slice::from_raw_parts(packet.c as *const TimeSpec, packet.d / mem::size_of::<TimeSpec>()) })
-            } else {
-                Err(Error::new(EFAULT))
-            },
             SYS_CLOSE => self.close(packet.b),
+
             _ => Err(Error::new(ENOSYS))
         });
     }
 
     /* Scheme operations */
 
     #[allow(unused_variables)]
     fn open(&self, path: &[u8], flags: usize, uid: u32, gid: u32) -> Result<usize> {
@@ -119,21 +107,16 @@ pub trait Scheme {
     }
 
     #[allow(unused_variables)]
     fn ftruncate(&self, id: usize, len: usize) -> Result<usize> {
         Err(Error::new(EBADF))
     }
 
     #[allow(unused_variables)]
-    fn futimens(&self, id: usize, times: &[TimeSpec]) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-
-    #[allow(unused_variables)]
     fn close(&self, id: usize) -> Result<usize> {
         Err(Error::new(EBADF))
     }
 }
 
 pub trait SchemeMut {
     fn handle(&mut self, packet: &mut Packet) {
         packet.a = Error::mux(match packet.a {
@@ -145,46 +128,34 @@ pub trait SchemeMut {
             SYS_DUP => self.dup(packet.b, unsafe { slice::from_raw_parts(packet.c as *const u8, packet.d) }),
             SYS_READ => self.read(packet.b, unsafe { slice::from_raw_parts_mut(packet.c as *mut u8, packet.d) }),
             SYS_WRITE => self.write(packet.b, unsafe { slice::from_raw_parts(packet.c as *const u8, packet.d) }),
             SYS_LSEEK => self.seek(packet.b, packet.c, packet.d),
             SYS_FCNTL => self.fcntl(packet.b, packet.c, packet.d),
             SYS_FEVENT => self.fevent(packet.b, packet.c),
             SYS_FMAP => self.fmap(packet.b, packet.c, packet.d),
             SYS_FPATH => self.fpath(packet.b, unsafe { slice::from_raw_parts_mut(packet.c as *mut u8, packet.d) }),
-            SYS_FSTAT => if packet.d >= mem::size_of::<Stat>() {
-                self.fstat(packet.b, unsafe { &mut *(packet.c as *mut Stat) })
-            } else {
-                Err(Error::new(EFAULT))
-            },
-            SYS_FSTATVFS => if packet.d >= mem::size_of::<StatVfs>() {
-                self.fstatvfs(packet.b, unsafe { &mut *(packet.c as *mut StatVfs) })
-            } else {
-                Err(Error::new(EFAULT))
-            },
+            SYS_FSTAT => if packet.d >= mem::size_of::<Stat>() { self.fstat(packet.b, unsafe { &mut *(packet.c as *mut Stat) }) } else { Err(Error::new(EFAULT)) },
+            SYS_FSTATVFS => if packet.d >= mem::size_of::<StatVfs>() { self.fstatvfs(packet.b, unsafe { &mut *(packet.c as *mut StatVfs) }) } else { Err(Error::new(EFAULT)) },
             SYS_FSYNC => self.fsync(packet.b),
             SYS_FTRUNCATE => self.ftruncate(packet.b, packet.c),
-            SYS_FUTIMENS => if packet.d >= mem::size_of::<TimeSpec>() {
-                self.futimens(packet.b, unsafe { slice::from_raw_parts(packet.c as *const TimeSpec, packet.d / mem::size_of::<TimeSpec>()) })
-            } else {
-                Err(Error::new(EFAULT))
-            },
             SYS_CLOSE => self.close(packet.b),
+
             _ => Err(Error::new(ENOSYS))
         });
     }
 
     /* Scheme operations */
     #[allow(unused_variables)]
     fn open(&mut self, path: &[u8], flags: usize, uid: u32, gid: u32) -> Result<usize> {
         Err(Error::new(ENOENT))
     }
 
     #[allow(unused_variables)]
-    fn chmod(&mut self, path: &[u8], mode: u16, uid: u32, gid: u32) -> Result<usize> {
+    fn chmod(&self, path: &[u8], mode: u16, uid: u32, gid: u32) -> Result<usize> {
         Err(Error::new(ENOENT))
     }
 
     #[allow(unused_variables)]
     fn rmdir(&mut self, path: &[u8], uid: u32, gid: u32) -> Result<usize> {
         Err(Error::new(ENOENT))
     }
 
@@ -250,17 +221,12 @@ pub trait SchemeMut {
     }
 
     #[allow(unused_variables)]
     fn ftruncate(&mut self, id: usize, len: usize) -> Result<usize> {
         Err(Error::new(EBADF))
     }
 
     #[allow(unused_variables)]
-    fn futimens(&mut self, id: usize, times: &[TimeSpec]) -> Result<usize> {
-        Err(Error::new(EBADF))
-    }
-
-    #[allow(unused_variables)]
     fn close(&mut self, id: usize) -> Result<usize> {
         Err(Error::new(EBADF))
     }
 }
deleted file mode 100644
--- a/third_party/rust/safemem/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".idea/runConfigurations/cargo_check.xml":"e4387dbed627bf7ba488115245b1fdfc546d118a7378a97ab3abb1343002170e","Cargo.toml":"94aae7f1f5f45951bc2143279ac3c61259cbd047b1ac9fc6cb820f26d0b6b392","LICENSE-APACHE":"7cfd738c53d61c79f07e348f622bf7707c9084237054d37fbe07788a75f5881c","LICENSE-MIT":"64e1c5f067ee2d8c0ee8abd751e57275d4e97e4f7c05699bc23f5005a9c53043","README.md":"2bb7c7b12f6d223514fdf7e346c9bd9950347a6a7e271dfc8eec06c6fe10ab3e","src/lib.rs":"da812d1fa45ff718510e8f32d5012efca83b0880f9ccf1ff1147dc318e3e434f"},"package":"e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/safemem/.idea/runConfigurations/cargo_check.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<component name="ProjectRunConfigurationManager">
-  <configuration default="false" name="cargo check" type="CargoCommandRunConfiguration" factoryName="Cargo Command" show_console_on_std_err="false" show_console_on_std_out="false">
-    <option name="additionalArguments" value="" />
-    <option name="command" value="check" />
-    <option name="environmentVariables">
-      <map />
-    </option>
-    <option name="printBacktrace" value="false" />
-    <module name="safemem" />
-    <method />
-  </configuration>
-</component>
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/safemem/Cargo.toml
+++ /dev/null
@@ -1,13 +0,0 @@
-[package]
-name = "safemem"
-version = "0.2.0"
-authors = ["Austin Bonander <austin.bonander@gmail.com>"]
-
-description = "Safe wrappers for memory-accessing functions, like `std::ptr::copy()`."
-repository = "https://github.com/abonander/safemem"
-keywords = ["memset", "memmove", "copy"]
-license = "MIT OR Apache-2.0"
-
-documentation = "https://docs.rs/safemem"
-
-[dependencies]
deleted file mode 100644
--- a/third_party/rust/safemem/LICENSE-APACHE
+++ /dev/null
@@ -1,201 +0,0 @@
-                              Apache License
-                        Version 2.0, January 2004
-                     http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-   "License" shall mean the terms and conditions for use, reproduction,
-   and distribution as defined by Sections 1 through 9 of this document.
-
-   "Licensor" shall mean the copyright owner or entity authorized by
-   the copyright owner that is granting the License.
-
-   "Legal Entity" shall mean the union of the acting entity and all
-   other entities that control, are controlled by, or are under common
-   control with that entity. For the purposes of this definition,
-   "control" means (i) the power, direct or indirect, to cause the
-   direction or management of such entity, whether by contract or
-   otherwise, or (ii) ownership of fifty percent (50%) or more of the
-   outstanding shares, or (iii) beneficial ownership of such entity.
-
-   "You" (or "Your") shall mean an individual or Legal Entity
-   exercising permissions granted by this License.
-
-   "Source" form shall mean the preferred form for making modifications,
-   including but not limited to software source code, documentation
-   source, and configuration files.
-
-   "Object" form shall mean any form resulting from mechanical
-   transformation or translation of a Source form, including but
-   not limited to compiled object code, generated documentation,
-   and conversions to other media types.
-
-   "Work" shall mean the work of authorship, whether in Source or
-   Object form, made available under the License, as indicated by a
-   copyright notice that is included in or attached to the work
-   (an example is provided in the Appendix below).
-
-   "Derivative Works" shall mean any work, whether in Source or Object
-   form, that is based on (or derived from) the Work and for which the
-   editorial revisions, annotations, elaborations, or other modifications
-   represent, as a whole, an original work of authorship. For the purposes
-   of this License, Derivative Works shall not include works that remain
-   separable from, or merely link (or bind by name) to the interfaces of,
-   the Work and Derivative Works thereof.
-
-   "Contribution" shall mean any work of authorship, including
-   the original version of the Work and any modifications or additions
-   to that Work or Derivative Works thereof, that is intentionally
-   submitted to Licensor for inclusion in the Work by the copyright owner
-   or by an individual or Legal Entity authorized to submit on behalf of
-   the copyright owner. For the purposes of this definition, "submitted"
-   means any form of electronic, verbal, or written communication sent
-   to the Licensor or its representatives, including but not limited to
-   communication on electronic mailing lists, source code control systems,
-   and issue tracking systems that are managed by, or on behalf of, the
-   Licensor for the purpose of discussing and improving the Work, but
-   excluding communication that is conspicuously marked or otherwise
-   designated in writing by the copyright owner as "Not a Contribution."
-
-   "Contributor" shall mean Licensor and any individual or Legal Entity
-   on behalf of whom a Contribution has been received by Licensor and
-   subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   copyright license to reproduce, prepare Derivative Works of,
-   publicly display, publicly perform, sublicense, and distribute the
-   Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   (except as stated in this section) patent license to make, have made,
-   use, offer to sell, sell, import, and otherwise transfer the Work,
-   where such license applies only to those patent claims licensable
-   by such Contributor that are necessarily infringed by their
-   Contribution(s) alone or by combination of their Contribution(s)
-   with the Work to which such Contribution(s) was submitted. If You
-   institute patent litigation against any entity (including a
-   cross-claim or counterclaim in a lawsuit) alleging that the Work
-   or a Contribution incorporated within the Work constitutes direct
-   or contributory patent infringement, then any patent licenses
-   granted to You under this License for that Work shall terminate
-   as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
-   Work or Derivative Works thereof in any medium, with or without
-   modifications, and in Source or Object form, provided that You
-   meet the following conditions:
-
-   (a) You must give any other recipients of the Work or
-       Derivative Works a copy of this License; and
-
-   (b) You must cause any modified files to carry prominent notices
-       stating that You changed the files; and
-
-   (c) You must retain, in the Source form of any Derivative Works
-       that You distribute, all copyright, patent, trademark, and
-       attribution notices from the Source form of the Work,
-       excluding those notices that do not pertain to any part of
-       the Derivative Works; and
-
-   (d) If the Work includes a "NOTICE" text file as part of its
-       distribution, then any Derivative Works that You distribute must
-       include a readable copy of the attribution notices contained
-       within such NOTICE file, excluding those notices that do not
-       pertain to any part of the Derivative Works, in at least one
-       of the following places: within a NOTICE text file distributed
-       as part of the Derivative Works; within the Source form or
-       documentation, if provided along with the Derivative Works; or,
-       within a display generated by the Derivative Works, if and
-       wherever such third-party notices normally appear. The contents
-       of the NOTICE file are for informational purposes only and
-       do not modify the License. You may add Your own attribution
-       notices within Derivative Works that You distribute, alongside
-       or as an addendum to the NOTICE text from the Work, provided
-       that such additional attribution notices cannot be construed
-       as modifying the License.
-
-   You may add Your own copyright statement to Your modifications and
-   may provide additional or different license terms and conditions
-   for use, reproduction, or distribution of Your modifications, or
-   for any such Derivative Works as a whole, provided Your use,
-   reproduction, and distribution of the Work otherwise complies with
-   the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
-   any Contribution intentionally submitted for inclusion in the Work
-   by You to the Licensor shall be under the terms and conditions of
-   this License, without any additional terms or conditions.
-   Notwithstanding the above, nothing herein shall supersede or modify
-   the terms of any separate license agreement you may have executed
-   with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
-   names, trademarks, service marks, or product names of the Licensor,
-   except as required for reasonable and customary use in describing the
-   origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
-   agreed to in writing, Licensor provides the Work (and each
-   Contributor provides its Contributions) on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-   implied, including, without limitation, any warranties or conditions
-   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-   PARTICULAR PURPOSE. You are solely responsible for determining the
-   appropriateness of using or redistributing the Work and assume any
-   risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
-   whether in tort (including negligence), contract, or otherwise,
-   unless required by applicable law (such as deliberate and grossly
-   negligent acts) or agreed to in writing, shall any Contributor be
-   liable to You for damages, including any direct, indirect, special,
-   incidental, or consequential damages of any character arising as a
-   result of this License or out of the use or inability to use the
-   Work (including but not limited to damages for loss of goodwill,
-   work stoppage, computer failure or malfunction, or any and all
-   other commercial damages or losses), even if such Contributor
-   has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
-   the Work or Derivative Works thereof, You may choose to offer,
-   and charge a fee for, acceptance of support, warranty, indemnity,
-   or other liability obligations and/or rights consistent with this
-   License. However, in accepting such obligations, You may act only
-   on Your own behalf and on Your sole responsibility, not on behalf
-   of any other Contributor, and only if You agree to indemnify,
-   defend, and hold each Contributor harmless for any liability
-   incurred by, or claims asserted against, such Contributor by reason
-   of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
-   To apply the Apache License to your work, attach the following
-   boilerplate notice, with the fields enclosed by brackets "[]"
-   replaced with your own identifying information. (Don't include
-   the brackets!)  The text should be enclosed in the appropriate
-   comment syntax for the file format. We also recommend that a
-   file or class name and description of purpose be included on the
-   same "printed page" as the copyright notice for easier
-   identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-	http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
deleted file mode 100644
--- a/third_party/rust/safemem/LICENSE-MIT
+++ /dev/null
@@ -1,25 +0,0 @@
-Copyright (c) 2016 The `multipart` Crate Developers
-
-Permission is hereby granted, free of charge, to any
-person obtaining a copy of this software and associated
-documentation files (the "Software"), to deal in the
-Software without restriction, including without
-limitation the rights to use, copy, modify, merge,
-publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software
-is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice
-shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
-ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
-TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
deleted file mode 100644
--- a/third_party/rust/safemem/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# safemem
-Safe wrappers for `memmove`, `memset`, etc. in Rust
-
-License
--------
-
-Licensed under either of
-
- * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
- * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
-
-at your option.
-
-### Contribution
-
-Unless you explicitly state otherwise, any contribution intentionally submitted
-for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
-additional terms or conditions.
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/safemem/src/lib.rs
+++ /dev/null
@@ -1,109 +0,0 @@
-//! Safe wrappers for memory-accessing functions like `std::ptr::copy()`.
-use std::ptr;
-
-macro_rules! idx_check (
-    ($slice:expr, $idx:expr) => {
-        assert!($idx < $slice.len(),
-            concat!("`", stringify!($idx), "` ({}) out of bounds. Length: {}"),
-            $idx, $slice.len());
-    }
-);
-
-macro_rules! len_check (
-    ($slice:expr, $start:ident, $len:ident) => {
-        assert!(
-            $start.checked_add($len)
-                .expect(concat!("Overflow evaluating ", stringify!($start + $len)))
-                <= $slice.len(),
-            "Length {} starting at {} is out of bounds (slice len {}).", $len, $start, $slice.len()
-        )
-    }
-);
-
-/// Copy `len` elements from `src_idx` to `dest_idx`. Ranges may overlap.
-///
-/// Safe wrapper for `memmove()`/`std::ptr::copy()`.
-///
-/// ###Panics
-/// * If either `src_idx` or `dest_idx` are out of bounds, or if either of these plus `len` is out of
-/// bounds.
-/// * If `src_idx + len` or `dest_idx + len` overflows.
-pub fn copy_over<T: Copy>(slice: &mut [T], src_idx: usize, dest_idx: usize, len: usize) {
-    if slice.len() == 0 { return; }
-
-    idx_check!(slice, src_idx);
-    idx_check!(slice, dest_idx);
-    len_check!(slice, src_idx, len);
-    len_check!(slice, dest_idx, len);
-
-    let src_ptr: *const T = &slice[src_idx];
-    let dest_ptr: *mut T = &mut slice[dest_idx];
-
-    unsafe {
-        ptr::copy(src_ptr, dest_ptr, len);
-    }
-}
-
-/// Safe wrapper for `std::ptr::write_bytes()`/`memset()`.
-pub fn write_bytes(slice: &mut [u8], byte: u8) {
-    unsafe {
-        ptr::write_bytes(slice.as_mut_ptr(), byte, slice.len());
-    }
-}
-
-/// Prepend `elems` to `vec`, resizing if necessary.
-///
-/// ###Panics
-/// If `vec.len() + elems.len()` overflows.
-pub fn prepend<T: Copy>(elems: &[T], vec: &mut Vec<T>) {
-    // Our overflow check occurs here, no need to do it ourselves.
-    vec.reserve(elems.len());
-
-    let old_len = vec.len();
-    let new_len = old_len + elems.len();
-
-    unsafe {
-        vec.set_len(new_len);
-    }
-
-    // Move the old elements down to the end.
-    if old_len > 0 {
-        copy_over(vec, 0, elems.len(), old_len);
-    }
-
-    vec[..elems.len()].copy_from_slice(elems);
-}
-
-#[cfg(test)]
-mod tests {
-    use super::*;
-
-    #[test]
-    #[should_panic]
-    fn bounds_check() {
-        let mut arr = [0i32, 1, 2, 3, 4, 5];
-
-        copy_over(&mut arr, 2, 1, 7);
-    }
-
-    #[test]
-    fn copy_empty() {
-        let mut arr: [i32; 0] = [];
-
-        copy_over(&mut arr, 0, 0, 0);
-    }
-
-    #[test]
-    fn prepend_empty() {
-        let mut vec: Vec<i32> = vec![];
-        prepend(&[1, 2, 3], &mut vec);
-    }
-
-    #[test]
-    fn prepend_i32() {
-        let mut vec = vec![3, 4, 5];
-        prepend(&[1, 2], &mut vec);
-        assert_eq!(vec, &[1, 2, 3, 4, 5]);
-    }
-}
-
deleted file mode 100644
--- a/third_party/rust/thread_local-0.3.3/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".travis.yml":"474743a2a8c8c7bbcc86ed6a4b68165405635651493757d97c06e965c608ee74","Cargo.toml":"0ec34b07cd55626697c62496ab1f826c9b7928697cf3362e7f5a7bcf9e080fda","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"c9a75f18b9ab2927829a208fc6aa2cf4e63b8420887ba29cdb265d6619ae82d5","README.md":"00a29378d5aeb66b7a48b77bee0d463c8b408b8a9cb0abb7674edb10d142aca0","src/lib.rs":"f5d04966ff4da2a79fe4f484687f4b845df5a2fe2b94151d4cad3f595ef6fce2"},"package":"c85048c6260d17cf486ceae3282d9fb6b90be220bf5b28c400f5485ffc29f0c7"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/thread_local-0.3.3/.travis.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-language: rust
-sudo: false
-
-rust:
-- nightly
-- beta
-- stable
-- 1.9.0
-
-before_script:
-- |
-  pip install 'travis-cargo<0.2' --user &&
-  export PATH=$HOME/.local/bin:$PATH
-
-script:
-- travis-cargo build
-- travis-cargo test
-- travis-cargo doc -- --no-deps
-
-after_success:
-- travis-cargo --only nightly doc-upload
-
-env:
-  global:
-  - TRAVIS_CARGO_NIGHTLY_FEATURE=""
-
-notifications:
-  email: false
deleted file mode 100644
--- a/third_party/rust/thread_local-0.3.3/Cargo.toml
+++ /dev/null
@@ -1,16 +0,0 @@
-[package]
-name = "thread_local"
-version = "0.3.3"
-authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
-description = "Per-object thread-local storage"
-documentation = "https://amanieu.github.io/thread_local-rs/thread_local/index.html"
-license = "Apache-2.0/MIT"
-repository = "https://github.com/Amanieu/thread_local-rs"
-readme = "README.md"
-keywords = ["thread_local", "concurrent", "thread"]
-
-[dependencies]
-unreachable = "0.1"
-
-[target.'cfg(not(target_os = "emscripten"))'.dependencies]
-thread-id = "3.0"
deleted file mode 100644
--- a/third_party/rust/thread_local-0.3.3/LICENSE-APACHE
+++ /dev/null
@@ -1,201 +0,0 @@
-                              Apache License
-                        Version 2.0, January 2004
-                     http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-   "License" shall mean the terms and conditions for use, reproduction,
-   and distribution as defined by Sections 1 through 9 of this document.
-
-   "Licensor" shall mean the copyright owner or entity authorized by
-   the copyright owner that is granting the License.
-
-   "Legal Entity" shall mean the union of the acting entity and all
-   other entities that control, are controlled by, or are under common
-   control with that entity. For the purposes of this definition,
-   "control" means (i) the power, direct or indirect, to cause the
-   direction or management of such entity, whether by contract or
-   otherwise, or (ii) ownership of fifty percent (50%) or more of the
-   outstanding shares, or (iii) beneficial ownership of such entity.
-
-   "You" (or "Your") shall mean an individual or Legal Entity
-   exercising permissions granted by this License.
-
-   "Source" form shall mean the preferred form for making modifications,
-   including but not limited to software source code, documentation
-   source, and configuration files.
-
-   "Object" form shall mean any form resulting from mechanical
-   transformation or translation of a Source form, including but
-   not limited to compiled object code, generated documentation,
-   and conversions to other media types.
-
-   "Work" shall mean the work of authorship, whether in Source or
-   Object form, made available under the License, as indicated by a
-   copyright notice that is included in or attached to the work
-   (an example is provided in the Appendix below).
-
-   "Derivative Works" shall mean any work, whether in Source or Object
-   form, that is based on (or derived from) the Work and for which the
-   editorial revisions, annotations, elaborations, or other modifications
-   represent, as a whole, an original work of authorship. For the purposes
-   of this License, Derivative Works shall not include works that remain
-   separable from, or merely link (or bind by name) to the interfaces of,
-   the Work and Derivative Works thereof.
-
-   "Contribution" shall mean any work of authorship, including
-   the original version of the Work and any modifications or additions
-   to that Work or Derivative Works thereof, that is intentionally
-   submitted to Licensor for inclusion in the Work by the copyright owner
-   or by an individual or Legal Entity authorized to submit on behalf of
-   the copyright owner. For the purposes of this definition, "submitted"
-   means any form of electronic, verbal, or written communication sent
-   to the Licensor or its representatives, including but not limited to
-   communication on electronic mailing lists, source code control systems,
-   and issue tracking systems that are managed by, or on behalf of, the
-   Licensor for the purpose of discussing and improving the Work, but
-   excluding communication that is conspicuously marked or otherwise
-   designated in writing by the copyright owner as "Not a Contribution."
-
-   "Contributor" shall mean Licensor and any individual or Legal Entity
-   on behalf of whom a Contribution has been received by Licensor and
-   subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   copyright license to reproduce, prepare Derivative Works of,
-   publicly display, publicly perform, sublicense, and distribute the
-   Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   (except as stated in this section) patent license to make, have made,
-   use, offer to sell, sell, import, and otherwise transfer the Work,
-   where such license applies only to those patent claims licensable
-   by such Contributor that are necessarily infringed by their
-   Contribution(s) alone or by combination of their Contribution(s)
-   with the Work to which such Contribution(s) was submitted. If You
-   institute patent litigation against any entity (including a
-   cross-claim or counterclaim in a lawsuit) alleging that the Work
-   or a Contribution incorporated within the Work constitutes direct
-   or contributory patent infringement, then any patent licenses
-   granted to You under this License for that Work shall terminate
-   as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
-   Work or Derivative Works thereof in any medium, with or without
-   modifications, and in Source or Object form, provided that You
-   meet the following conditions:
-
-   (a) You must give any other recipients of the Work or
-       Derivative Works a copy of this License; and
-
-   (b) You must cause any modified files to carry prominent notices
-       stating that You changed the files; and
-
-   (c) You must retain, in the Source form of any Derivative Works
-       that You distribute, all copyright, patent, trademark, and
-       attribution notices from the Source form of the Work,
-       excluding those notices that do not pertain to any part of
-       the Derivative Works; and
-
-   (d) If the Work includes a "NOTICE" text file as part of its
-       distribution, then any Derivative Works that You distribute must
-       include a readable copy of the attribution notices contained
-       within such NOTICE file, excluding those notices that do not
-       pertain to any part of the Derivative Works, in at least one
-       of the following places: within a NOTICE text file distributed
-       as part of the Derivative Works; within the Source form or
-       documentation, if provided along with the Derivative Works; or,
-       within a display generated by the Derivative Works, if and
-       wherever such third-party notices normally appear. The contents
-       of the NOTICE file are for informational purposes only and
-       do not modify the License. You may add Your own attribution
-       notices within Derivative Works that You distribute, alongside
-       or as an addendum to the NOTICE text from the Work, provided
-       that such additional attribution notices cannot be construed
-       as modifying the License.
-
-   You may add Your own copyright statement to Your modifications and
-   may provide additional or different license terms and conditions
-   for use, reproduction, or distribution of Your modifications, or
-   for any such Derivative Works as a whole, provided Your use,
-   reproduction, and distribution of the Work otherwise complies with
-   the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
-   any Contribution intentionally submitted for inclusion in the Work
-   by You to the Licensor shall be under the terms and conditions of
-   this License, without any additional terms or conditions.
-   Notwithstanding the above, nothing herein shall supersede or modify
-   the terms of any separate license agreement you may have executed
-   with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
-   names, trademarks, service marks, or product names of the Licensor,
-   except as required for reasonable and customary use in describing the
-   origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
-   agreed to in writing, Licensor provides the Work (and each
-   Contributor provides its Contributions) on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-   implied, including, without limitation, any warranties or conditions
-   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-   PARTICULAR PURPOSE. You are solely responsible for determining the
-   appropriateness of using or redistributing the Work and assume any
-   risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
-   whether in tort (including negligence), contract, or otherwise,
-   unless required by applicable law (such as deliberate and grossly
-   negligent acts) or agreed to in writing, shall any Contributor be
-   liable to You for damages, including any direct, indirect, special,
-   incidental, or consequential damages of any character arising as a
-   result of this License or out of the use or inability to use the
-   Work (including but not limited to damages for loss of goodwill,
-   work stoppage, computer failure or malfunction, or any and all
-   other commercial damages or losses), even if such Contributor
-   has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
-   the Work or Derivative Works thereof, You may choose to offer,
-   and charge a fee for, acceptance of support, warranty, indemnity,
-   or other liability obligations and/or rights consistent with this
-   License. However, in accepting such obligations, You may act only
-   on Your own behalf and on Your sole responsibility, not on behalf
-   of any other Contributor, and only if You agree to indemnify,
-   defend, and hold each Contributor harmless for any liability
-   incurred by, or claims asserted against, such Contributor by reason
-   of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
-   To apply the Apache License to your work, attach the following
-   boilerplate notice, with the fields enclosed by brackets "[]"
-   replaced with your own identifying information. (Don't include
-   the brackets!)  The text should be enclosed in the appropriate
-   comment syntax for the file format. We also recommend that a
-   file or class name and description of purpose be included on the
-   same "printed page" as the copyright notice for easier
-   identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-	http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
deleted file mode 100644
--- a/third_party/rust/thread_local-0.3.3/LICENSE-MIT
+++ /dev/null
@@ -1,25 +0,0 @@
-Copyright (c) 2016 The Rust Project Developers
-
-Permission is hereby granted, free of charge, to any
-person obtaining a copy of this software and associated
-documentation files (the "Software"), to deal in the
-Software without restriction, including without
-limitation the rights to use, copy, modify, merge,
-publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software
-is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice
-shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
-ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
-TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
deleted file mode 100644
--- a/third_party/rust/thread_local-0.3.3/README.md
+++ /dev/null
@@ -1,41 +0,0 @@
-thread_local
-============
-
-[![Build Status](https://travis-ci.org/Amanieu/thread_local-rs.svg?branch=master)](https://travis-ci.org/Amanieu/thread_local-rs) [![Crates.io](https://img.shields.io/crates/v/thread_local.svg)](https://crates.io/crates/thread_local)
-
-This library provides the `ThreadLocal` and `CachedThreadLocal` types which
-allow a separate copy of an object to be used for each thread. This allows for
-per-object thread-local storage, unlike the standard library's `thread_local!`
-macro which only allows static thread-local storage.
-
-[Documentation](https://amanieu.github.io/thread_local-rs/thread_local/index.html)
-
-## Usage
-
-Add this to your `Cargo.toml`:
-
-```toml
-[dependencies]
-thread_local = "0.3"
-```
-
-and this to your crate root:
-
-```rust
-extern crate thread_local;
-```
-
-## License
-
-Licensed under either of
-
- * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
- * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
-
-at your option.
-
-### Contribution
-
-Unless you explicitly state otherwise, any contribution intentionally submitted
-for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
-additional terms or conditions.
deleted file mode 100644
--- a/third_party/rust/thread_local-0.3.3/src/lib.rs
+++ /dev/null
@@ -1,753 +0,0 @@
-// Copyright 2016 Amanieu d'Antras
-//
-// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
-// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
-// http://opensource.org/licenses/MIT>, at your option. This file may not be
-// copied, modified, or distributed except according to those terms.
-
-//! Per-object thread-local storage
-//!
-//! This library provides the `ThreadLocal` type which allows a separate copy of
-//! an object to be used for each thread. This allows for per-object
-//! thread-local storage, unlike the standard library's `thread_local!` macro
-//! which only allows static thread-local storage.
-//!
-//! Per-thread objects are not destroyed when a thread exits. Instead, objects
-//! are only destroyed when the `ThreadLocal` containing them is destroyed.
-//!
-//! You can also iterate over the thread-local values of all thread in a
-//! `ThreadLocal` object using the `iter_mut` and `into_iter` methods. This can
-//! only be done if you have mutable access to the `ThreadLocal` object, which
-//! guarantees that you are the only thread currently accessing it.
-//!
-//! A `CachedThreadLocal` type is also provided which wraps a `ThreadLocal` but
-//! also uses a special fast path for the first thread that writes into it. The
-//! fast path has very low overhead (<1ns per access) while keeping the same
-//! performance as `ThreadLocal` for other threads.
-//!
-//! Note that since thread IDs are recycled when a thread exits, it is possible
-//! for one thread to retrieve the object of another thread. Since this can only
-//! occur after a thread has exited this does not lead to any race conditions.
-//!
-//! # Examples
-//!
-//! Basic usage of `ThreadLocal`:
-//!
-//! ```rust
-//! use thread_local::ThreadLocal;
-//! let tls: ThreadLocal<u32> = ThreadLocal::new();
-//! assert_eq!(tls.get(), None);
-//! assert_eq!(tls.get_or(|| Box::new(5)), &5);
-//! assert_eq!(tls.get(), Some(&5));
-//! ```
-//!
-//! Combining thread-local values into a single result:
-//!
-//! ```rust
-//! use thread_local::ThreadLocal;
-//! use std::sync::Arc;
-//! use std::cell::Cell;
-//! use std::thread;
-//!
-//! let tls = Arc::new(ThreadLocal::new());
-//!
-//! // Create a bunch of threads to do stuff
-//! for _ in 0..5 {
-//!     let tls2 = tls.clone();
-//!     thread::spawn(move || {
-//!         // Increment a counter to count some event...
-//!         let cell = tls2.get_or(|| Box::new(Cell::new(0)));
-//!         cell.set(cell.get() + 1);
-//!     }).join().unwrap();
-//! }
-//!
-//! // Once all threads are done, collect the counter values and return the
-//! // sum of all thread-local counter values.
-//! let tls = Arc::try_unwrap(tls).unwrap();
-//! let total = tls.into_iter().fold(0, |x, y| x + y.get());
-//! assert_eq!(total, 5);
-//! ```
-
-#![warn(missing_docs)]
-
-#[cfg(not(target_os = "emscripten"))]
-extern crate thread_id;
-extern crate unreachable;
-
-use std::sync::atomic::{AtomicPtr, AtomicUsize, Ordering};
-use std::sync::Mutex;
-use std::marker::PhantomData;
-use std::cell::UnsafeCell;
-use std::fmt;
-use std::iter::Chain;
-use std::option::IntoIter as OptionIter;
-use std::panic::UnwindSafe;
-use unreachable::{UncheckedOptionExt, UncheckedResultExt};
-
-/// Thread-local variable wrapper
-///
-/// See the [module-level documentation](index.html) for more.
-pub struct ThreadLocal<T: ?Sized + Send> {
-    // Pointer to the current top-level hash table
-    table: AtomicPtr<Table<T>>,
-
-    // Lock used to guard against concurrent modifications. This is only taken
-    // while writing to the table, not when reading from it. This also guards
-    // the counter for the total number of values in the hash table.
-    lock: Mutex<usize>,
-
-    // PhantomData to indicate that we logically own T
-    marker: PhantomData<T>,
-}
-
-struct Table<T: ?Sized + Send> {
-    // Hash entries for the table
-    entries: Box<[TableEntry<T>]>,
-
-    // Number of bits used for the hash function
-    hash_bits: usize,
-
-    // Previous table, half the size of the current one
-    prev: Option<Box<Table<T>>>,
-}
-
-struct TableEntry<T: ?Sized + Send> {
-    // Current owner of this entry, or 0 if this is an empty entry
-    owner: AtomicUsize,
-
-    // The object associated with this entry. This is only ever accessed by the
-    // owner of the entry.
-    data: UnsafeCell<Option<Box<T>>>,
-}
-
-// ThreadLocal is always Sync, even if T isn't
-unsafe impl<T: ?Sized + Send> Sync for ThreadLocal<T> {}
-
-impl<T: ?Sized + Send> Default for ThreadLocal<T> {
-    fn default() -> ThreadLocal<T> {
-        ThreadLocal::new()
-    }
-}
-
-impl<T: ?Sized + Send> Drop for ThreadLocal<T> {
-    fn drop(&mut self) {
-        unsafe {
-            Box::from_raw(self.table.load(Ordering::Relaxed));
-        }
-    }
-}
-
-// Implementation of Clone for TableEntry, needed to make vec![] work
-impl<T: ?Sized + Send> Clone for TableEntry<T> {
-    fn clone(&self) -> TableEntry<T> {
-        TableEntry {
-            owner: AtomicUsize::new(0),
-            data: UnsafeCell::new(None),
-        }
-    }
-}
-
-// Helper function to get a thread id
-#[cfg(not(target_os = "emscripten"))]
-fn get_thread_id() -> usize {
-    thread_id::get()
-}
-#[cfg(target_os = "emscripten")]
-fn get_thread_id() -> usize {
-    // pthread_self returns 0 on enscripten, but we use that as a
-    // reserved value to indicate an empty slot. We instead fall
-    // back to using the address of a thread-local variable, which
-    // is slightly slower but guaranteed to produce a non-zero value.
-    thread_local!(static KEY: u8 = unsafe { std::mem::uninitialized() });
-    KEY.with(|x| x as *const _ as usize)
-}
-
-// Hash function for the thread id
-#[cfg(target_pointer_width = "32")]
-#[inline]
-fn hash(id: usize, bits: usize) -> usize {
-    id.wrapping_mul(0x9E3779B9) >> (32 - bits)
-}
-#[cfg(target_pointer_width = "64")]
-#[inline]
-fn hash(id: usize, bits: usize) -> usize {
-    id.wrapping_mul(0x9E3779B97F4A7C15) >> (64 - bits)
-}
-
-impl<T: ?Sized + Send> ThreadLocal<T> {
-    /// Creates a new empty `ThreadLocal`.
-    pub fn new() -> ThreadLocal<T> {
-        let entry = TableEntry {
-            owner: AtomicUsize::new(0),
-            data: UnsafeCell::new(None),
-        };
-        let table = Table {
-            entries: vec![entry; 2].into_boxed_slice(),
-            hash_bits: 1,
-            prev: None,
-        };
-        ThreadLocal {
-            table: AtomicPtr::new(Box::into_raw(Box::new(table))),
-            lock: Mutex::new(0),
-            marker: PhantomData,
-        }
-    }
-
-    /// Returns the element for the current thread, if it exists.
-    pub fn get(&self) -> Option<&T> {
-        let id = get_thread_id();
-        self.get_fast(id)
-    }
-
-    /// Returns the element for the current thread, or creates it if it doesn't
-    /// exist.
-    pub fn get_or<F>(&self, create: F) -> &T
-        where F: FnOnce() -> Box<T>
-    {
-        unsafe { self.get_or_try(|| Ok::<Box<T>, ()>(create())).unchecked_unwrap_ok() }
-    }
-
-    /// Returns the element for the current thread, or creates it if it doesn't
-    /// exist. If `create` fails, that error is returned and no element is
-    /// added.
-    pub fn get_or_try<F, E>(&self, create: F) -> Result<&T, E>
-        where F: FnOnce() -> Result<Box<T>, E>
-    {
-        let id = get_thread_id();
-        match self.get_fast(id) {
-            Some(x) => Ok(x),
-            None => Ok(self.insert(id, try!(create()), true)),
-        }
-    }
-
-    // Simple hash table lookup function
-    fn lookup(id: usize, table: &Table<T>) -> Option<&UnsafeCell<Option<Box<T>>>> {
-        // Because we use a Mutex to prevent concurrent modifications (but not
-        // reads) of the hash table, we can avoid any memory barriers here. No
-        // elements between our hash bucket and our value can have been modified
-        // since we inserted our thread-local value into the table.
-        for entry in table.entries.iter().cycle().skip(hash(id, table.hash_bits)) {
-            let owner = entry.owner.load(Ordering::Relaxed);
-            if owner == id {
-                return Some(&entry.data);
-            }
-            if owner == 0 {
-                return None;
-            }
-        }
-        unreachable!();
-    }
-
-    // Fast path: try to find our thread in the top-level hash table
-    fn get_fast(&self, id: usize) -> Option<&T> {
-        let table = unsafe { &*self.table.load(Ordering::Relaxed) };
-        match Self::lookup(id, table) {
-            Some(x) => unsafe { Some((*x.get()).as_ref().unchecked_unwrap()) },
-            None => self.get_slow(id, table),
-        }
-    }
-
-    // Slow path: try to find our thread in the other hash tables, and then
-    // move it to the top-level hash table.
-    #[cold]
-    fn get_slow(&self, id: usize, table_top: &Table<T>) -> Option<&T> {
-        let mut current = &table_top.prev;
-        while let Some(ref table) = *current {
-            if let Some(x) = Self::lookup(id, table) {
-                let data = unsafe { (*x.get()).take().unchecked_unwrap() };
-                return Some(self.insert(id, data, false));
-            }
-            current = &table.prev;
-        }
-        None
-    }
-
-    #[cold]
-    fn insert(&self, id: usize, data: Box<T>, new: bool) -> &T {
-        // Lock the Mutex to ensure only a single thread is modify the hash
-        // table at once.
-        let mut count = self.lock.lock().unwrap();
-        if new {
-            *count += 1;
-        }
-        let table_raw = self.table.load(Ordering::Relaxed);
-        let table = unsafe { &*table_raw };
-
-        // If the current top-level hash table is more than 75% full, add a new
-        // level with 2x the capacity. Elements will be moved up to the new top
-        // level table as they are accessed.
-        let table = if *count > table.entries.len() * 3 / 4 {
-            let entry = TableEntry {
-                owner: AtomicUsize::new(0),
-                data: UnsafeCell::new(None),
-            };
-            let new_table = Box::into_raw(Box::new(Table {
-                entries: vec![entry; table.entries.len() * 2].into_boxed_slice(),
-                hash_bits: table.hash_bits + 1,
-                prev: unsafe { Some(Box::from_raw(table_raw)) },
-            }));
-            self.table.store(new_table, Ordering::Release);
-            unsafe { &*new_table }
-        } else {
-            table
-        };
-
-        // Insert the new element into the top-level hash table
-        for entry in table.entries.iter().cycle().skip(hash(id, table.hash_bits)) {
-            let owner = entry.owner.load(Ordering::Relaxed);
-            if owner == 0 {
-                unsafe {
-                    entry.owner.store(id, Ordering::Relaxed);
-                    *entry.data.get() = Some(data);
-                    return (*entry.data.get()).as_ref().unchecked_unwrap();
-                }
-            }
-            if owner == id {
-                // This can happen if create() inserted a value into this
-                // ThreadLocal between our calls to get_fast() and insert(). We
-                // just return the existing value and drop the newly-allocated
-                // Box.
-                unsafe {
-                    return (*entry.data.get()).as_ref().unchecked_unwrap();
-                }
-            }
-        }
-        unreachable!();
-    }
-
-    /// Returns a mutable iterator over the local values of all threads.
-    ///
-    /// Since this call borrows the `ThreadLocal` mutably, this operation can
-    /// be done safely---the mutable borrow statically guarantees no other
-    /// threads are currently accessing their associated values.
-    pub fn iter_mut(&mut self) -> IterMut<T> {
-        let raw = RawIter {
-            remaining: *self.lock.lock().unwrap(),
-            index: 0,
-            table: self.table.load(Ordering::Relaxed),
-        };
-        IterMut {
-            raw: raw,
-            marker: PhantomData,
-        }
-    }
-
-    /// Removes all thread-specific values from the `ThreadLocal`, effectively
-    /// reseting it to its original state.
-    ///
-    /// Since this call borrows the `ThreadLocal` mutably, this operation can
-    /// be done safely---the mutable borrow statically guarantees no other
-    /// threads are currently accessing their associated values.
-    pub fn clear(&mut self) {
-        *self = ThreadLocal::new();
-    }
-}
-
-impl<T: ?Sized + Send> IntoIterator for ThreadLocal<T> {
-    type Item = Box<T>;
-    type IntoIter = IntoIter<T>;
-
-    fn into_iter(self) -> IntoIter<T> {
-        let raw = RawIter {
-            remaining: *self.lock.lock().unwrap(),
-            index: 0,
-            table: self.table.load(Ordering::Relaxed),
-        };
-        IntoIter {
-            raw: raw,
-            _thread_local: self,
-        }
-    }
-}
-
-impl<'a, T: ?Sized + Send + 'a> IntoIterator for &'a mut ThreadLocal<T> {
-    type Item = &'a mut Box<T>;
-    type IntoIter = IterMut<'a, T>;
-
-    fn into_iter(self) -> IterMut<'a, T> {
-        self.iter_mut()
-    }
-}
-
-impl<T: Send + Default> ThreadLocal<T> {
-    /// Returns the element for the current thread, or creates a default one if
-    /// it doesn't exist.
-    pub fn get_default(&self) -> &T {
-        self.get_or(|| Box::new(T::default()))
-    }
-}
-
-impl<T: ?Sized + Send + fmt::Debug> fmt::Debug for ThreadLocal<T> {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "ThreadLocal {{ local_data: {:?} }}", self.get())
-    }
-}
-
-impl<T: ?Sized + Send + UnwindSafe> UnwindSafe for ThreadLocal<T> {}
-
-struct RawIter<T: ?Sized + Send> {
-    remaining: usize,
-    index: usize,
-    table: *const Table<T>,
-}
-
-impl<T: ?Sized + Send> RawIter<T> {
-    fn next(&mut self) -> Option<*mut Option<Box<T>>> {
-        if self.remaining == 0 {
-            return None;
-        }
-
-        loop {
-            let entries = unsafe { &(*self.table).entries[..] };
-            while self.index < entries.len() {
-                let val = entries[self.index].data.get();
-                self.index += 1;
-                if unsafe { (*val).is_some() } {
-                    self.remaining -= 1;
-                    return Some(val);
-                }
-            }
-            self.index = 0;
-            self.table = unsafe { &**(*self.table).prev.as_ref().unchecked_unwrap() };
-        }
-    }
-}
-
-/// Mutable iterator over the contents of a `ThreadLocal`.
-pub struct IterMut<'a, T: ?Sized + Send + 'a> {
-    raw: RawIter<T>,
-    marker: PhantomData<&'a mut ThreadLocal<T>>,
-}
-
-impl<'a, T: ?Sized + Send + 'a> Iterator for IterMut<'a, T> {
-    type Item = &'a mut Box<T>;
-
-    fn next(&mut self) -> Option<&'a mut Box<T>> {
-        self.raw.next().map(|x| unsafe { (*x).as_mut().unchecked_unwrap() })
-    }
-
-    fn size_hint(&self) -> (usize, Option<usize>) {
-        (self.raw.remaining, Some(self.raw.remaining))
-    }
-}
-
-impl<'a, T: ?Sized + Send + 'a> ExactSizeIterator for IterMut<'a, T> {}
-
-/// An iterator that moves out of a `ThreadLocal`.
-pub struct IntoIter<T: ?Sized + Send> {
-    raw: RawIter<T>,
-    _thread_local: ThreadLocal<T>,
-}
-
-impl<T: ?Sized + Send> Iterator for IntoIter<T> {
-    type Item = Box<T>;
-
-    fn next(&mut self) -> Option<Box<T>> {
-        self.raw.next().map(|x| unsafe { (*x).take().unchecked_unwrap() })
-    }
-
-    fn size_hint(&self) -> (usize, Option<usize>) {
-        (self.raw.remaining, Some(self.raw.remaining))
-    }
-}
-
-impl<T: ?Sized + Send> ExactSizeIterator for IntoIter<T> {}
-
-/// Wrapper around `ThreadLocal` which adds a fast path for a single thread.
-///
-/// This has the same API as `ThreadLocal`, but will register the first thread
-/// that sets a value as its owner. All accesses by the owner will go through
-/// a special fast path which is much faster than the normal `ThreadLocal` path.
-pub struct CachedThreadLocal<T: ?Sized + Send> {
-    owner: AtomicUsize,
-    local: UnsafeCell<Option<Box<T>>>,
-    global: ThreadLocal<T>,
-}
-
-// CachedThreadLocal is always Sync, even if T isn't
-unsafe impl<T: ?Sized + Send> Sync for CachedThreadLocal<T> {}
-
-impl<T: ?Sized + Send> Default for CachedThreadLocal<T> {
-    fn default() -> CachedThreadLocal<T> {
-        CachedThreadLocal::new()
-    }
-}
-
-impl<T: ?Sized + Send> CachedThreadLocal<T> {
-    /// Creates a new empty `CachedThreadLocal`.
-    pub fn new() -> CachedThreadLocal<T> {
-        CachedThreadLocal {
-            owner: AtomicUsize::new(0),
-            local: UnsafeCell::new(None),
-            global: ThreadLocal::new(),
-        }
-    }
-
-    /// Returns the element for the current thread, if it exists.
-    pub fn get(&self) -> Option<&T> {
-        let id = get_thread_id();
-        let owner = self.owner.load(Ordering::Relaxed);
-        if owner == id {
-            return unsafe { Some((*self.local.get()).as_ref().unchecked_unwrap()) };
-        }
-        if owner == 0 {
-            return None;
-        }
-        self.global.get_fast(id)
-    }
-
-    /// Returns the element for the current thread, or creates it if it doesn't
-    /// exist.
-    #[inline(always)]
-    pub fn get_or<F>(&self, create: F) -> &T
-        where F: FnOnce() -> Box<T>
-    {
-        unsafe { self.get_or_try(|| Ok::<Box<T>, ()>(create())).unchecked_unwrap_ok() }
-    }
-
-    /// Returns the element for the current thread, or creates it if it doesn't
-    /// exist. If `create` fails, that error is returned and no element is
-    /// added.
-    pub fn get_or_try<F, E>(&self, create: F) -> Result<&T, E>
-        where F: FnOnce() -> Result<Box<T>, E>
-    {
-        let id = get_thread_id();
-        let owner = self.owner.load(Ordering::Relaxed);
-        if owner == id {
-            return Ok(unsafe { (*self.local.get()).as_ref().unchecked_unwrap() });
-        }
-        self.get_or_try_slow(id, owner, create)
-    }
-
-    #[cold]
-    #[inline(never)]
-    fn get_or_try_slow<F, E>(&self, id: usize, owner: usize, create: F) -> Result<&T, E>
-        where F: FnOnce() -> Result<Box<T>, E>
-    {
-        if owner == 0 && self.owner.compare_and_swap(0, id, Ordering::Relaxed) == 0 {
-            unsafe {
-                (*self.local.get()) = Some(try!(create()));
-                return Ok((*self.local.get()).as_ref().unchecked_unwrap());
-            }
-        }
-        match self.global.get_fast(id) {
-            Some(x) => Ok(x),
-            None => Ok(self.global.insert(id, try!(create()), true)),
-        }
-    }
-
-    /// Returns a mutable iterator over the local values of all threads.
-    ///
-    /// Since this call borrows the `ThreadLocal` mutably, this operation can
-    /// be done safely---the mutable borrow statically guarantees no other
-    /// threads are currently accessing their associated values.
-    pub fn iter_mut(&mut self) -> CachedIterMut<T> {
-        unsafe { (*self.local.get()).as_mut().into_iter().chain(self.global.iter_mut()) }
-    }
-
-    /// Removes all thread-specific values from the `ThreadLocal`, effectively
-    /// reseting it to its original state.
-    ///
-    /// Since this call borrows the `ThreadLocal` mutably, this operation can
-    /// be done safely---the mutable borrow statically guarantees no other
-    /// threads are currently accessing their associated values.
-    pub fn clear(&mut self) {
-        *self = CachedThreadLocal::new();
-    }
-}
-
-impl<T: ?Sized + Send> IntoIterator for CachedThreadLocal<T> {
-    type Item = Box<T>;
-    type IntoIter = CachedIntoIter<T>;
-
-    fn into_iter(self) -> CachedIntoIter<T> {
-        unsafe { (*self.local.get()).take().into_iter().chain(self.global.into_iter()) }
-    }
-}
-
-impl<'a, T: ?Sized + Send + 'a> IntoIterator for &'a mut CachedThreadLocal<T> {
-    type Item = &'a mut Box<T>;
-    type IntoIter = CachedIterMut<'a, T>;
-
-    fn into_iter(self) -> CachedIterMut<'a, T> {
-        self.iter_mut()
-    }
-}
-
-impl<T: Send + Default> CachedThreadLocal<T> {
-    /// Returns the element for the current thread, or creates a default one if
-    /// it doesn't exist.
-    pub fn get_default(&self) -> &T {
-        self.get_or(|| Box::new(T::default()))
-    }
-}
-
-impl<T: ?Sized + Send + fmt::Debug> fmt::Debug for CachedThreadLocal<T> {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "ThreadLocal {{ local_data: {:?} }}", self.get())
-    }
-}
-
-/// Mutable iterator over the contents of a `CachedThreadLocal`.
-pub type CachedIterMut<'a, T> = Chain<OptionIter<&'a mut Box<T>>, IterMut<'a, T>>;
-
-/// An iterator that moves out of a `CachedThreadLocal`.
-pub type CachedIntoIter<T> = Chain<OptionIter<Box<T>>, IntoIter<T>>;
-
-impl<T: ?Sized + Send + UnwindSafe> UnwindSafe for CachedThreadLocal<T> {}
-
-#[cfg(test)]
-mod tests {
-    use std::cell::RefCell;
-    use std::sync::Arc;
-    use std::sync::atomic::AtomicUsize;
-    use std::sync::atomic::Ordering::Relaxed;
-    use std::thread;
-    use super::{ThreadLocal, CachedThreadLocal};
-
-    fn make_create() -> Arc<Fn() -> Box<usize> + Send + Sync> {
-        let count = AtomicUsize::new(0);
-        Arc::new(move || Box::new(count.fetch_add(1, Relaxed)))
-    }
-
-    #[test]
-    fn same_thread() {
-        let create = make_create();
-        let mut tls = ThreadLocal::new();
-        assert_eq!(None, tls.get());
-        assert_eq!("ThreadLocal { local_data: None }", format!("{:?}", &tls));
-        assert_eq!(0, *tls.get_or(|| create()));
-        assert_eq!(Some(&0), tls.get());
-        assert_eq!(0, *tls.get_or(|| create()));
-        assert_eq!(Some(&0), tls.get());
-        assert_eq!(0, *tls.get_or(|| create()));
-        assert_eq!(Some(&0), tls.get());
-        assert_eq!("ThreadLocal { local_data: Some(0) }", format!("{:?}", &tls));
-        tls.clear();
-        assert_eq!(None, tls.get());
-    }
-
-    #[test]
-    fn same_thread_cached() {
-        let create = make_create();
-        let mut tls = CachedThreadLocal::new();
-        assert_eq!(None, tls.get());
-        assert_eq!("ThreadLocal { local_data: None }", format!("{:?}", &tls));
-        assert_eq!(0, *tls.get_or(|| create()));
-        assert_eq!(Some(&0), tls.get());
-        assert_eq!(0, *tls.get_or(|| create()));
-        assert_eq!(Some(&0), tls.get());
-        assert_eq!(0, *tls.get_or(|| create()));
-        assert_eq!(Some(&0), tls.get());
-        assert_eq!("ThreadLocal { local_data: Some(0) }", format!("{:?}", &tls));
-        tls.clear();
-        assert_eq!(None, tls.get());
-    }
-
-    #[test]
-    fn different_thread() {
-        let create = make_create();
-        let tls = Arc::new(ThreadLocal::new());
-        assert_eq!(None, tls.get());
-        assert_eq!(0, *tls.get_or(|| create()));
-        assert_eq!(Some(&0), tls.get());
-
-        let tls2 = tls.clone();
-        let create2 = create.clone();
-        thread::spawn(move || {
-                assert_eq!(None, tls2.get());
-                assert_eq!(1, *tls2.get_or(|| create2()));
-                assert_eq!(Some(&1), tls2.get());
-            })
-            .join()
-            .unwrap();
-
-        assert_eq!(Some(&0), tls.get());
-        assert_eq!(0, *tls.get_or(|| create()));
-    }
-
-    #[test]
-    fn different_thread_cached() {
-        let create = make_create();
-        let tls = Arc::new(CachedThreadLocal::new());
-        assert_eq!(None, tls.get());
-        assert_eq!(0, *tls.get_or(|| create()));
-        assert_eq!(Some(&0), tls.get());
-
-        let tls2 = tls.clone();
-        let create2 = create.clone();
-        thread::spawn(move || {
-                assert_eq!(None, tls2.get());
-                assert_eq!(1, *tls2.get_or(|| create2()));
-                assert_eq!(Some(&1), tls2.get());
-            })
-            .join()
-            .unwrap();
-
-        assert_eq!(Some(&0), tls.get());
-        assert_eq!(0, *tls.get_or(|| create()));
-    }
-
-    #[test]
-    fn iter() {
-        let tls = Arc::new(ThreadLocal::new());
-        tls.get_or(|| Box::new(1));
-
-        let tls2 = tls.clone();
-        thread::spawn(move || {
-                tls2.get_or(|| Box::new(2));
-                let tls3 = tls2.clone();
-                thread::spawn(move || {
-                        tls3.get_or(|| Box::new(3));
-                    })
-                    .join()
-                    .unwrap();
-            })
-            .join()
-            .unwrap();
-
-        let mut tls = Arc::try_unwrap(tls).unwrap();
-        let mut v = tls.iter_mut().map(|x| **x).collect::<Vec<i32>>();
-        v.sort();
-        assert_eq!(vec![1, 2, 3], v);
-        let mut v = tls.into_iter().map(|x| *x).collect::<Vec<i32>>();
-        v.sort();
-        assert_eq!(vec![1, 2, 3], v);
-    }
-
-    #[test]
-    fn iter_cached() {
-        let tls = Arc::new(CachedThreadLocal::new());
-        tls.get_or(|| Box::new(1));
-
-        let tls2 = tls.clone();
-        thread::spawn(move || {
-                tls2.get_or(|| Box::new(2));
-                let tls3 = tls2.clone();
-                thread::spawn(move || {
-                        tls3.get_or(|| Box::new(3));
-                    })
-                    .join()
-                    .unwrap();
-            })
-            .join()
-            .unwrap();
-
-        let mut tls = Arc::try_unwrap(tls).unwrap();
-        let mut v = tls.iter_mut().map(|x| **x).collect::<Vec<i32>>();
-        v.sort();
-        assert_eq!(vec![1, 2, 3], v);
-        let mut v = tls.into_iter().map(|x| *x).collect::<Vec<i32>>();
-        v.sort();
-        assert_eq!(vec![1, 2, 3], v);
-    }
-
-    #[test]
-    fn is_sync() {
-        fn foo<T: Sync>() {}
-        foo::<ThreadLocal<String>>();
-        foo::<ThreadLocal<RefCell<String>>>();
-        foo::<CachedThreadLocal<String>>();
-        foo::<CachedThreadLocal<RefCell<String>>>();
-    }
-}
--- a/third_party/rust/thread_local/.cargo-checksum.json
+++ b/third_party/rust/thread_local/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".travis.yml":"c01fcdfc31a1092bfdbdd22a0d88773bdc280550b806ab2ebe23ac4b32d4a5c2","Cargo.toml":"cc42ea81b9749fdd354f433e91f845f656841e904b986ad08c30bf419a26c6d7","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"c9a75f18b9ab2927829a208fc6aa2cf4e63b8420887ba29cdb265d6619ae82d5","README.md":"00a29378d5aeb66b7a48b77bee0d463c8b408b8a9cb0abb7674edb10d142aca0","benches/thread_local.rs":"cc8bde81ed6206525feff209598caf1e01e89a83bf21d8b7ccc0dadc8b89d815","src/lib.rs":"e5902751bf1768fb756b88146da66a128920d3f1b166b797fd0a5e1528f2e687","src/thread_id.rs":"0962c130061939557aa272115e4420fbbc63b6bd306783a456a8ffcbf304a447"},"package":"1697c4b57aeeb7a536b647165a2825faddffb1d3bad386d507709bd51a90bb14"}
\ No newline at end of file
+{"files":{".travis.yml":"474743a2a8c8c7bbcc86ed6a4b68165405635651493757d97c06e965c608ee74","Cargo.toml":"0ec34b07cd55626697c62496ab1f826c9b7928697cf3362e7f5a7bcf9e080fda","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"c9a75f18b9ab2927829a208fc6aa2cf4e63b8420887ba29cdb265d6619ae82d5","README.md":"00a29378d5aeb66b7a48b77bee0d463c8b408b8a9cb0abb7674edb10d142aca0","src/lib.rs":"f5d04966ff4da2a79fe4f484687f4b845df5a2fe2b94151d4cad3f595ef6fce2"},"package":"c85048c6260d17cf486ceae3282d9fb6b90be220bf5b28c400f5485ffc29f0c7"}
\ No newline at end of file
--- a/third_party/rust/thread_local/.travis.yml
+++ b/third_party/rust/thread_local/.travis.yml
@@ -10,17 +10,16 @@ rust:
 before_script:
 - |
   pip install 'travis-cargo<0.2' --user &&
   export PATH=$HOME/.local/bin:$PATH
 
 script:
 - travis-cargo build
 - travis-cargo test
-- travis-cargo bench
 - travis-cargo doc -- --no-deps
 
 after_success:
 - travis-cargo --only nightly doc-upload
 
 env:
   global:
   - TRAVIS_CARGO_NIGHTLY_FEATURE=""
--- a/third_party/rust/thread_local/Cargo.toml
+++ b/third_party/rust/thread_local/Cargo.toml
@@ -1,27 +1,16 @@
-# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
-#
-# When uploading crates to the registry Cargo will automatically
-# "normalize" Cargo.toml files for maximal compatibility
-# with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g. crates.io) dependencies
-#
-# If you believe there's an error in this file please file an
-# issue against the rust-lang/cargo repository. If you're
-# editing this file be aware that the upstream Cargo.toml
-# will likely look very different (and much more reasonable)
-
 [package]
 name = "thread_local"
-version = "0.3.4"
+version = "0.3.3"
 authors = ["Amanieu d'Antras <amanieu@gmail.com>"]
 description = "Per-object thread-local storage"
 documentation = "https://amanieu.github.io/thread_local-rs/thread_local/index.html"
-readme = "README.md"
-keywords = ["thread_local", "concurrent", "thread"]
 license = "Apache-2.0/MIT"
 repository = "https://github.com/Amanieu/thread_local-rs"
-[dependencies.unreachable]
-version = "1.0"
+readme = "README.md"
+keywords = ["thread_local", "concurrent", "thread"]
 
-[dependencies.lazy_static]
-version = "0.2"
+[dependencies]
+unreachable = "0.1"
+
+[target.'cfg(not(target_os = "emscripten"))'.dependencies]
+thread-id = "3.0"
deleted file mode 100644
--- a/third_party/rust/thread_local/benches/thread_local.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-#![feature(test)]
-
-extern crate thread_local;
-extern crate test;
-
-use thread_local::{ThreadLocal, CachedThreadLocal};
-
-#[bench]
-fn thread_local(b: &mut test::Bencher) {
-    let local = ThreadLocal::new();
-    b.iter(|| { let _: &i32 = local.get_or(|| Box::new(0)); });
-}
-
-#[bench]
-fn cached_thread_local(b: &mut test::Bencher) {
-    let local = CachedThreadLocal::new();
-    b.iter(|| { let _: &i32 = local.get_or(|| Box::new(0)); });
-}
--- a/third_party/rust/thread_local/src/lib.rs
+++ b/third_party/rust/thread_local/src/lib.rs
@@ -1,9 +1,9 @@
-// Copyright 2017 Amanieu d'Antras
+// Copyright 2016 Amanieu d'Antras
 //
 // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
 // http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
 // http://opensource.org/licenses/MIT>, at your option. This file may not be
 // copied, modified, or distributed except according to those terms.
 
 //! Per-object thread-local storage
 //!
@@ -65,21 +65,19 @@
 //! // sum of all thread-local counter values.
 //! let tls = Arc::try_unwrap(tls).unwrap();
 //! let total = tls.into_iter().fold(0, |x, y| x + y.get());
 //! assert_eq!(total, 5);
 //! ```
 
 #![warn(missing_docs)]
 
+#[cfg(not(target_os = "emscripten"))]
+extern crate thread_id;
 extern crate unreachable;
-#[macro_use]
-extern crate lazy_static;
-
-mod thread_id;
 
 use std::sync::atomic::{AtomicPtr, AtomicUsize, Ordering};
 use std::sync::Mutex;
 use std::marker::PhantomData;
 use std::cell::UnsafeCell;
 use std::fmt;
 use std::iter::Chain;
 use std::option::IntoIter as OptionIter;
@@ -144,16 +142,31 @@ impl<T: ?Sized + Send> Clone for TableEn
     fn clone(&self) -> TableEntry<T> {
         TableEntry {
             owner: AtomicUsize::new(0),
             data: UnsafeCell::new(None),
         }
     }
 }
 
+// Helper function to get a thread id
+#[cfg(not(target_os = "emscripten"))]
+fn get_thread_id() -> usize {
+    thread_id::get()
+}
+#[cfg(target_os = "emscripten")]
+fn get_thread_id() -> usize {
+    // pthread_self returns 0 on enscripten, but we use that as a
+    // reserved value to indicate an empty slot. We instead fall
+    // back to using the address of a thread-local variable, which
+    // is slightly slower but guaranteed to produce a non-zero value.
+    thread_local!(static KEY: u8 = unsafe { std::mem::uninitialized() });
+    KEY.with(|x| x as *const _ as usize)
+}
+
 // Hash function for the thread id
 #[cfg(target_pointer_width = "32")]
 #[inline]
 fn hash(id: usize, bits: usize) -> usize {
     id.wrapping_mul(0x9E3779B9) >> (32 - bits)
 }
 #[cfg(target_pointer_width = "64")]
 #[inline]
@@ -177,40 +190,35 @@ impl<T: ?Sized + Send> ThreadLocal<T> {
             table: AtomicPtr::new(Box::into_raw(Box::new(table))),
             lock: Mutex::new(0),
             marker: PhantomData,
         }
     }
 
     /// Returns the element for the current thread, if it exists.
     pub fn get(&self) -> Option<&T> {
-        let id = thread_id::get();
+        let id = get_thread_id();
         self.get_fast(id)
     }
 
     /// Returns the element for the current thread, or creates it if it doesn't
     /// exist.
     pub fn get_or<F>(&self, create: F) -> &T
-    where
-        F: FnOnce() -> Box<T>,
+        where F: FnOnce() -> Box<T>
     {
-        unsafe {
-            self.get_or_try(|| Ok::<Box<T>, ()>(create()))
-                .unchecked_unwrap_ok()
-        }
+        unsafe { self.get_or_try(|| Ok::<Box<T>, ()>(create())).unchecked_unwrap_ok() }
     }
 
     /// Returns the element for the current thread, or creates it if it doesn't
     /// exist. If `create` fails, that error is returned and no element is
     /// added.
     pub fn get_or_try<F, E>(&self, create: F) -> Result<&T, E>
-    where
-        F: FnOnce() -> Result<Box<T>, E>,
+        where F: FnOnce() -> Result<Box<T>, E>
     {
-        let id = thread_id::get();
+        let id = get_thread_id();
         match self.get_fast(id) {
             Some(x) => Ok(x),
             None => Ok(self.insert(id, try!(create()), true)),
         }
     }
 
     // Simple hash table lookup function
     fn lookup(id: usize, table: &Table<T>) -> Option<&UnsafeCell<Option<Box<T>>>> {
@@ -410,19 +418,17 @@ pub struct IterMut<'a, T: ?Sized + Send 
     raw: RawIter<T>,
     marker: PhantomData<&'a mut ThreadLocal<T>>,
 }
 
 impl<'a, T: ?Sized + Send + 'a> Iterator for IterMut<'a, T> {
     type Item = &'a mut Box<T>;
 
     fn next(&mut self) -> Option<&'a mut Box<T>> {
-        self.raw.next().map(|x| unsafe {
-            (*x).as_mut().unchecked_unwrap()
-        })
+        self.raw.next().map(|x| unsafe { (*x).as_mut().unchecked_unwrap() })
     }
 
     fn size_hint(&self) -> (usize, Option<usize>) {
         (self.raw.remaining, Some(self.raw.remaining))
     }
 }
 
 impl<'a, T: ?Sized + Send + 'a> ExactSizeIterator for IterMut<'a, T> {}
@@ -432,19 +438,17 @@ pub struct IntoIter<T: ?Sized + Send> {
     raw: RawIter<T>,
     _thread_local: ThreadLocal<T>,
 }
 
 impl<T: ?Sized + Send> Iterator for IntoIter<T> {
     type Item = Box<T>;
 
     fn next(&mut self) -> Option<Box<T>> {
-        self.raw.next().map(
-            |x| unsafe { (*x).take().unchecked_unwrap() },
-        )
+        self.raw.next().map(|x| unsafe { (*x).take().unchecked_unwrap() })
     }
 
     fn size_hint(&self) -> (usize, Option<usize>) {
         (self.raw.remaining, Some(self.raw.remaining))
     }
 }
 
 impl<T: ?Sized + Send> ExactSizeIterator for IntoIter<T> {}
@@ -476,60 +480,54 @@ impl<T: ?Sized + Send> CachedThreadLocal
             owner: AtomicUsize::new(0),
             local: UnsafeCell::new(None),
             global: ThreadLocal::new(),
         }
     }
 
     /// Returns the element for the current thread, if it exists.
     pub fn get(&self) -> Option<&T> {
-        let id = thread_id::get();
+        let id = get_thread_id();
         let owner = self.owner.load(Ordering::Relaxed);
         if owner == id {
             return unsafe { Some((*self.local.get()).as_ref().unchecked_unwrap()) };
         }
         if owner == 0 {
             return None;
         }
         self.global.get_fast(id)
     }
 
     /// Returns the element for the current thread, or creates it if it doesn't
     /// exist.
     #[inline(always)]
     pub fn get_or<F>(&self, create: F) -> &T
-    where
-        F: FnOnce() -> Box<T>,
+        where F: FnOnce() -> Box<T>
     {
-        unsafe {
-            self.get_or_try(|| Ok::<Box<T>, ()>(create()))
-                .unchecked_unwrap_ok()
-        }
+        unsafe { self.get_or_try(|| Ok::<Box<T>, ()>(create())).unchecked_unwrap_ok() }
     }
 
     /// Returns the element for the current thread, or creates it if it doesn't
     /// exist. If `create` fails, that error is returned and no element is
     /// added.
     pub fn get_or_try<F, E>(&self, create: F) -> Result<&T, E>
-    where
-        F: FnOnce() -> Result<Box<T>, E>,
+        where F: FnOnce() -> Result<Box<T>, E>
     {
-        let id = thread_id::get();
+        let id = get_thread_id();
         let owner = self.owner.load(Ordering::Relaxed);
         if owner == id {
             return Ok(unsafe { (*self.local.get()).as_ref().unchecked_unwrap() });
         }
         self.get_or_try_slow(id, owner, create)
     }
 
     #[cold]
     #[inline(never)]
     fn get_or_try_slow<F, E>(&self, id: usize, owner: usize, create: F) -> Result<&T, E>
-    where
-        F: FnOnce() -> Result<Box<T>, E>,
+        where F: FnOnce() -> Result<Box<T>, E>
     {
         if owner == 0 && self.owner.compare_and_swap(0, id, Ordering::Relaxed) == 0 {
             unsafe {
                 (*self.local.get()) = Some(try!(create()));
                 return Ok((*self.local.get()).as_ref().unchecked_unwrap());
             }
         }
         match self.global.get_fast(id) {
@@ -539,22 +537,17 @@ impl<T: ?Sized + Send> CachedThreadLocal
     }
 
     /// Returns a mutable iterator over the local values of all threads.
     ///
     /// Since this call borrows the `ThreadLocal` mutably, this operation can
     /// be done safely---the mutable borrow statically guarantees no other
     /// threads are currently accessing their associated values.
     pub fn iter_mut(&mut self) -> CachedIterMut<T> {
-        unsafe {
-            (*self.local.get()).as_mut().into_iter().chain(
-                self.global
-                    .iter_mut(),
-            )
-        }
+        unsafe { (*self.local.get()).as_mut().into_iter().chain(self.global.iter_mut()) }
     }
 
     /// Removes all thread-specific values from the `ThreadLocal`, effectively
     /// reseting it to its original state.
     ///
     /// Since this call borrows the `ThreadLocal` mutably, this operation can
     /// be done safely---the mutable borrow statically guarantees no other
     /// threads are currently accessing their associated values.
@@ -563,22 +556,17 @@ impl<T: ?Sized + Send> CachedThreadLocal
     }
 }
 
 impl<T: ?Sized + Send> IntoIterator for CachedThreadLocal<T> {
     type Item = Box<T>;
     type IntoIter = CachedIntoIter<T>;
 
     fn into_iter(self) -> CachedIntoIter<T> {
-        unsafe {
-            (*self.local.get()).take().into_iter().chain(
-                self.global
-                    .into_iter(),
-            )
-        }
+        unsafe { (*self.local.get()).take().into_iter().chain(self.global.into_iter()) }
     }
 }
 
 impl<'a, T: ?Sized + Send + 'a> IntoIterator for &'a mut CachedThreadLocal<T> {
     type Item = &'a mut Box<T>;
     type IntoIter = CachedIterMut<'a, T>;
 
     fn into_iter(self) -> CachedIterMut<'a, T> {
@@ -662,20 +650,21 @@ mod tests {
         let tls = Arc::new(ThreadLocal::new());
         assert_eq!(None, tls.get());
         assert_eq!(0, *tls.get_or(|| create()));
         assert_eq!(Some(&0), tls.get());
 
         let tls2 = tls.clone();
         let create2 = create.clone();
         thread::spawn(move || {
-            assert_eq!(None, tls2.get());
-            assert_eq!(1, *tls2.get_or(|| create2()));
-            assert_eq!(Some(&1), tls2.get());
-        }).join()
+                assert_eq!(None, tls2.get());
+                assert_eq!(1, *tls2.get_or(|| create2()));
+                assert_eq!(Some(&1), tls2.get());
+            })
+            .join()
             .unwrap();
 
         assert_eq!(Some(&0), tls.get());
         assert_eq!(0, *tls.get_or(|| create()));
     }
 
     #[test]
     fn different_thread_cached() {
@@ -683,39 +672,43 @@ mod tests {
         let tls = Arc::new(CachedThreadLocal::new());
         assert_eq!(None, tls.get());
         assert_eq!(0, *tls.get_or(|| create()));
         assert_eq!(Some(&0), tls.get());
 
         let tls2 = tls.clone();
         let create2 = create.clone();
         thread::spawn(move || {
-            assert_eq!(None, tls2.get());
-            assert_eq!(1, *tls2.get_or(|| create2()));
-            assert_eq!(Some(&1), tls2.get());
-        }).join()
+                assert_eq!(None, tls2.get());
+                assert_eq!(1, *tls2.get_or(|| create2()));
+                assert_eq!(Some(&1), tls2.get());
+            })
+            .join()
             .unwrap();
 
         assert_eq!(Some(&0), tls.get());
         assert_eq!(0, *tls.get_or(|| create()));
     }
 
     #[test]
     fn iter() {
         let tls = Arc::new(ThreadLocal::new());
         tls.get_or(|| Box::new(1));
 
         let tls2 = tls.clone();
         thread::spawn(move || {
-            tls2.get_or(|| Box::new(2));
-            let tls3 = tls2.clone();
-            thread::spawn(move || { tls3.get_or(|| Box::new(3)); })
-                .join()
-                .unwrap();
-        }).join()
+                tls2.get_or(|| Box::new(2));
+                let tls3 = tls2.clone();
+                thread::spawn(move || {
+                        tls3.get_or(|| Box::new(3));
+                    })
+                    .join()
+                    .unwrap();
+            })
+            .join()
             .unwrap();
 
         let mut tls = Arc::try_unwrap(tls).unwrap();
         let mut v = tls.iter_mut().map(|x| **x).collect::<Vec<i32>>();
         v.sort();
         assert_eq!(vec![1, 2, 3], v);
         let mut v = tls.into_iter().map(|x| *x).collect::<Vec<i32>>();
         v.sort();
@@ -724,22 +717,25 @@ mod tests {
 
     #[test]
     fn iter_cached() {
         let tls = Arc::new(CachedThreadLocal::new());
         tls.get_or(|| Box::new(1));
 
         let tls2 = tls.clone();
         thread::spawn(move || {
-            tls2.get_or(|| Box::new(2));
-            let tls3 = tls2.clone();
-            thread::spawn(move || { tls3.get_or(|| Box::new(3)); })
-                .join()
-                .unwrap();
-        }).join()
+                tls2.get_or(|| Box::new(2));
+                let tls3 = tls2.clone();
+                thread::spawn(move || {
+                        tls3.get_or(|| Box::new(3));
+                    })
+                    .join()
+                    .unwrap();
+            })
+            .join()
             .unwrap();
 
         let mut tls = Arc::try_unwrap(tls).unwrap();
         let mut v = tls.iter_mut().map(|x| **x).collect::<Vec<i32>>();
         v.sort();
         assert_eq!(vec![1, 2, 3], v);
         let mut v = tls.into_iter().map(|x| *x).collect::<Vec<i32>>();
         v.sort();
deleted file mode 100644
--- a/third_party/rust/thread_local/src/thread_id.rs
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2017 Amanieu d'Antras
-//
-// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
-// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
-// http://opensource.org/licenses/MIT>, at your option. This file may not be
-// copied, modified, or distributed except according to those terms.
-
-use std::collections::BinaryHeap;
-use std::sync::Mutex;
-use std::usize;
-
-// Thread ID manager which allocates thread IDs. It attempts to aggressively
-// reuse thread IDs where possible to avoid cases where a ThreadLocal grows
-// indefinitely when it is used by many short-lived threads.
-struct ThreadIdManager {
-    limit: usize,
-    free_list: BinaryHeap<usize>,
-}
-impl ThreadIdManager {
-    fn new() -> ThreadIdManager {
-        ThreadIdManager {
-            limit: usize::MAX,
-            free_list: BinaryHeap::new(),
-        }
-    }
-    fn alloc(&mut self) -> usize {
-        if let Some(id) = self.free_list.pop() {
-            id
-        } else {
-            let id = self.limit;
-            self.limit = self.limit.checked_sub(1).expect("Ran out of thread IDs");
-            id
-        }
-    }
-    fn free(&mut self, id: usize) {
-        self.free_list.push(id);
-    }
-}
-lazy_static! {
-    static ref THREAD_ID_MANAGER: Mutex<ThreadIdManager> = Mutex::new(ThreadIdManager::new());
-}
-
-// Non-zero integer which is unique to the current thread while it is running.
-// A thread ID may be reused after a thread exits.
-struct ThreadId(usize);
-impl ThreadId {
-    fn new() -> ThreadId {
-        ThreadId(THREAD_ID_MANAGER.lock().unwrap().alloc())
-    }
-}
-impl Drop for ThreadId {
-    fn drop(&mut self) {
-        THREAD_ID_MANAGER.lock().unwrap().free(self.0);
-    }
-}
-thread_local!(static THREAD_ID: ThreadId = ThreadId::new());
-
-/// Returns a non-zero ID for the current thread
-pub fn get() -> usize {
-    THREAD_ID.with(|x| x.0)
-}
deleted file mode 100644
--- a/third_party/rust/time-0.1.36/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".travis.yml":"9555a092ed1f87de52b07a90c614a30c6fa8f307eb4b05229253d06df363ce7a","Cargo.toml":"9369a5798a85c467578e9be04ffdb220d1d7457950373bd3b0662a62ca58520b","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"2c17f942c4a797f6f491c6d40570f904f35047531884ded3244438832b3d6f0a","appveyor.yml":"da991211b72fa6f231af7adb84c9fb72f5a9131d1c0a3d47b8ceffe5a82c8542","benches/precise_time_ns.rs":"f331c85489a05ea3bb83df9d57131a6e651ce852ca881417f328c4e8f53503c6","src/display.rs":"b79a81b4f068e44934ad3398ba0259120cc30cf0855ac5108c4569e320fd7f1d","src/duration.rs":"032f2ced8ea4dddaf6ed111f345e99217bad17edb7ed9fc4c511e405c8e02b87","src/lib.rs":"d01631b2340e30673e4c809678a5bdd3f8c18debb25ada21805a990254cb7caf","src/parse.rs":"717ae5735dfdaaba513f2a54a179e73bb2a48f8d4fb8787740d4662d6ff3389c","src/sys.rs":"a6bf379947da5ed16063a9bfcdf877c84e38e006a9cbc45ee0558cba4cf5c295"},"package":"211b63c112206356ef1ff9b19355f43740fc3f85960c598a93d3a3d3ba7beade"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/time-0.1.36/.travis.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-language: rust
-rust:
-  - stable
-  - beta
-  - nightly
-sudo: false
-before_script:
-  - pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH
-script:
-  - cargo build --verbose
-  - cargo test --verbose
-  - cargo test --verbose --features rustc-serialize
-  - cargo doc --no-deps
-after_success:
-  - travis-cargo --only nightly doc-upload
-env:
-  global:
-    secure: "NlXnNaUBf2MgV2gPJyIQU+JM814e29itvvb8o5BvN4YB60rseu16yLbzKpO4FzuOFBc/Uc+1veDcKyzZYsdV6FIwQk4jfdUkNZ3i56InVCzXcaaHCe78cpg/IxK+/48fGy/EIJkWYdtQsoVCGunaf5NdF360Lzb6G/B1vheC34E="
-
-
-
-notifications:
-  email:
-    on_success: never
-os:
-  - linux
-  - osx
deleted file mode 100644
--- a/third_party/rust/time-0.1.36/Cargo.toml
+++ /dev/null
@@ -1,27 +0,0 @@
-[package]
-
-name = "time"
-version = "0.1.36"
-authors = ["The Rust Project Developers"]
-license = "MIT/Apache-2.0"
-homepage = "https://github.com/rust-lang/time"
-repository = "https://github.com/rust-lang/time"
-documentation = "https://doc.rust-lang.org/time"
-description = """
-Utilities for working with time-related functions in Rust.
-"""
-
-[dependencies]
-libc = "0.2.1"
-rustc-serialize = { version = "0.3", optional = true }
-
-[target.'cfg(target_os = "redox")'.dependencies]
-redox_syscall = "0.1"
-
-[target.'cfg(windows)'.dependencies]
-winapi = "0.2.0"
-kernel32-sys = "0.2.0"
-
-[dev-dependencies]
-log = "0.3"
-advapi32-sys = "0.1.2"
deleted file mode 100644
--- a/third_party/rust/time-0.1.36/LICENSE-APACHE
+++ /dev/null
@@ -1,201 +0,0 @@
-                              Apache License
-                        Version 2.0, January 2004
-                     http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-   "License" shall mean the terms and conditions for use, reproduction,
-   and distribution as defined by Sections 1 through 9 of this document.
-
-   "Licensor" shall mean the copyright owner or entity authorized by
-   the copyright owner that is granting the License.
-
-   "Legal Entity" shall mean the union of the acting entity and all
-   other entities that control, are controlled by, or are under common
-   control with that entity. For the purposes of this definition,
-   "control" means (i) the power, direct or indirect, to cause the
-   direction or management of such entity, whether by contract or
-   otherwise, or (ii) ownership of fifty percent (50%) or more of the
-   outstanding shares, or (iii) beneficial ownership of such entity.
-
-   "You" (or "Your") shall mean an individual or Legal Entity
-   exercising permissions granted by this License.
-
-   "Source" form shall mean the preferred form for making modifications,
-   including but not limited to software source code, documentation
-   source, and configuration files.
-
-   "Object" form shall mean any form resulting from mechanical
-   transformation or translation of a Source form, including but
-   not limited to compiled object code, generated documentation,
-   and conversions to other media types.
-
-   "Work" shall mean the work of authorship, whether in Source or
-   Object form, made available under the License, as indicated by a
-   copyright notice that is included in or attached to the work
-   (an example is provided in the Appendix below).
-
-   "Derivative Works" shall mean any work, whether in Source or Object
-   form, that is based on (or derived from) the Work and for which the
-   editorial revisions, annotations, elaborations, or other modifications
-   represent, as a whole, an original work of authorship. For the purposes
-   of this License, Derivative Works shall not include works that remain
-   separable from, or merely link (or bind by name) to the interfaces of,
-   the Work and Derivative Works thereof.
-
-   "Contribution" shall mean any work of authorship, including
-   the original version of the Work and any modifications or additions
-   to that Work or Derivative Works thereof, that is intentionally
-   submitted to Licensor for inclusion in the Work by the copyright owner
-   or by an individual or Legal Entity authorized to submit on behalf of
-   the copyright owner. For the purposes of this definition, "submitted"
-   means any form of electronic, verbal, or written communication sent
-   to the Licensor or its representatives, including but not limited to
-   communication on electronic mailing lists, source code control systems,
-   and issue tracking systems that are managed by, or on behalf of, the
-   Licensor for the purpose of discussing and improving the Work, but
-   excluding communication that is conspicuously marked or otherwise
-   designated in writing by the copyright owner as "Not a Contribution."
-
-   "Contributor" shall mean Licensor and any individual or Legal Entity
-   on behalf of whom a Contribution has been received by Licensor and
-   subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   copyright license to reproduce, prepare Derivative Works of,
-   publicly display, publicly perform, sublicense, and distribute the
-   Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   (except as stated in this section) patent license to make, have made,
-   use, offer to sell, sell, import, and otherwise transfer the Work,
-   where such license applies only to those patent claims licensable
-   by such Contributor that are necessarily infringed by their
-   Contribution(s) alone or by combination of their Contribution(s)
-   with the Work to which such Contribution(s) was submitted. If You
-   institute patent litigation against any entity (including a
-   cross-claim or counterclaim in a lawsuit) alleging that the Work
-   or a Contribution incorporated within the Work constitutes direct
-   or contributory patent infringement, then any patent licenses
-   granted to You under this License for that Work shall terminate
-   as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
-   Work or Derivative Works thereof in any medium, with or without
-   modifications, and in Source or Object form, provided that You
-   meet the following conditions:
-
-   (a) You must give any other recipients of the Work or
-       Derivative Works a copy of this License; and
-
-   (b) You must cause any modified files to carry prominent notices
-       stating that You changed the files; and
-
-   (c) You must retain, in the Source form of any Derivative Works
-       that You distribute, all copyright, patent, trademark, and
-       attribution notices from the Source form of the Work,
-       excluding those notices that do not pertain to any part of
-       the Derivative Works; and
-
-   (d) If the Work includes a "NOTICE" text file as part of its
-       distribution, then any Derivative Works that You distribute must
-       include a readable copy of the attribution notices contained
-       within such NOTICE file, excluding those notices that do not
-       pertain to any part of the Derivative Works, in at least one
-       of the following places: within a NOTICE text file distributed
-       as part of the Derivative Works; within the Source form or
-       documentation, if provided along with the Derivative Works; or,
-       within a display generated by the Derivative Works, if and
-       wherever such third-party notices normally appear. The contents
-       of the NOTICE file are for informational purposes only and
-       do not modify the License. You may add Your own attribution
-       notices within Derivative Works that You distribute, alongside
-       or as an addendum to the NOTICE text from the Work, provided
-       that such additional attribution notices cannot be construed
-       as modifying the License.
-
-   You may add Your own copyright statement to Your modifications and
-   may provide additional or different license terms and conditions
-   for use, reproduction, or distribution of Your modifications, or
-   for any such Derivative Works as a whole, provided Your use,
-   reproduction, and distribution of the Work otherwise complies with
-   the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
-   any Contribution intentionally submitted for inclusion in the Work
-   by You to the Licensor shall be under the terms and conditions of
-   this License, without any additional terms or conditions.
-   Notwithstanding the above, nothing herein shall supersede or modify
-   the terms of any separate license agreement you may have executed
-   with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
-   names, trademarks, service marks, or product names of the Licensor,
-   except as required for reasonable and customary use in describing the
-   origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
-   agreed to in writing, Licensor provides the Work (and each
-   Contributor provides its Contributions) on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-   implied, including, without limitation, any warranties or conditions
-   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-   PARTICULAR PURPOSE. You are solely responsible for determining the
-   appropriateness of using or redistributing the Work and assume any
-   risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
-   whether in tort (including negligence), contract, or otherwise,
-   unless required by applicable law (such as deliberate and grossly
-   negligent acts) or agreed to in writing, shall any Contributor be
-   liable to You for damages, including any direct, indirect, special,
-   incidental, or consequential damages of any character arising as a
-   result of this License or out of the use or inability to use the
-   Work (including but not limited to damages for loss of goodwill,
-   work stoppage, computer failure or malfunction, or any and all
-   other commercial damages or losses), even if such Contributor
-   has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
-   the Work or Derivative Works thereof, You may choose to offer,
-   and charge a fee for, acceptance of support, warranty, indemnity,
-   or other liability obligations and/or rights consistent with this
-   License. However, in accepting such obligations, You may act only
-   on Your own behalf and on Your sole responsibility, not on behalf
-   of any other Contributor, and only if You agree to indemnify,
-   defend, and hold each Contributor harmless for any liability
-   incurred by, or claims asserted against, such Contributor by reason
-   of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
-   To apply the Apache License to your work, attach the following
-   boilerplate notice, with the fields enclosed by brackets "[]"
-   replaced with your own identifying information. (Don't include
-   the brackets!)  The text should be enclosed in the appropriate
-   comment syntax for the file format. We also recommend that a
-   file or class name and description of purpose be included on the
-   same "printed page" as the copyright notice for easier
-   identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-	http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
deleted file mode 100644
--- a/third_party/rust/time-0.1.36/LICENSE-MIT
+++ /dev/null
@@ -1,25 +0,0 @@
-Copyright (c) 2014 The Rust Project Developers
-
-Permission is hereby granted, free of charge, to any
-person obtaining a copy of this software and associated
-documentation files (the "Software"), to deal in the
-Software without restriction, including without
-limitation the rights to use, copy, modify, merge,
-publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software
-is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice
-shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
-ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
-TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
deleted file mode 100644
--- a/third_party/rust/time-0.1.36/README.md
+++ /dev/null
@@ -1,30 +0,0 @@
-time
-====
-
-Utilities for working with time-related functions in Rust
-
-[![Build Status](https://travis-ci.org/rust-lang-deprecated/time.svg?branch=master)](https://travis-ci.org/rust-lang-deprecated/time)
-[![Build status](https://ci.appveyor.com/api/projects/status/55m7rbaj9a5v3ad7?svg=true)](https://ci.appveyor.com/project/alexcrichton/time)
-
-[Documentation](https://doc.rust-lang.org/time)
-
-## Notes
-
-This library is no longer actively maintained, but bugfixes will be added ([details](https://github.com/rust-lang-deprecated/time/issues/136)).
-
-In case you're looking for something a little fresher and more actively maintained have a look at the [`chrono`](https://github.com/lifthrasiir/rust-chrono) crate.
-
-## Usage
-
-Put this in your `Cargo.toml`:
-
-```toml
-[dependencies]
-time = "0.1"
-```
-
-And this in your crate root:
-
-```rust
-extern crate time;
-```
deleted file mode 100644
--- a/third_party/rust/time-0.1.36/appveyor.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-environment:
-  matrix:
-  - TARGET: x86_64-pc-windows-msvc
-  - TARGET: i686-pc-windows-msvc
-  - TARGET: i686-pc-windows-gnu
-install:
-  - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-nightly-${env:TARGET}.exe"
-  - rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
-  - SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin
-  - SET PATH=%PATH%;C:\MinGW\bin
-  - rustc -V
-  - cargo -V
-
-build: false
-
-test_script:
-  - cargo test --verbose
deleted file mode 100644
--- a/third_party/rust/time-0.1.36/benches/precise_time_ns.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-#![feature(test)]
-
-extern crate test;
-extern crate time;
-
-use test::Bencher;
-
-#[bench]
-fn bench_precise_time_ns(b: &mut Bencher) {
-    b.iter(|| time::precise_time_ns())
-}
deleted file mode 100644
--- a/third_party/rust/time-0.1.36/src/display.rs
+++ /dev/null
@@ -1,260 +0,0 @@
-use std::fmt::{self, Write};
-
-use super::{TmFmt, Tm, Fmt};
-
-impl<'a> fmt::Display for TmFmt<'a> {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        match self.format {
-            Fmt::Str(ref s) => {
-                let mut chars = s.chars();
-                while let Some(ch) = chars.next() {
-                    if ch == '%' {
-                        // we've already validated that % always precedes
-                        // another char
-                        try!(parse_type(fmt, chars.next().unwrap(), self.tm));
-                    } else {
-                        try!(fmt.write_char(ch));
-                    }
-                }
-
-                Ok(())
-            }
-            Fmt::Ctime => self.tm.to_local().asctime().fmt(fmt),
-            Fmt::Rfc3339 => {
-                if self.tm.tm_utcoff == 0 {
-                    TmFmt {
-                        tm: self.tm,
-                        format: Fmt::Str("%Y-%m-%dT%H:%M:%SZ"),
-                    }.fmt(fmt)
-                } else {
-                    let s = TmFmt {
-                        tm: self.tm,
-                        format: Fmt::Str("%Y-%m-%dT%H:%M:%S"),
-                    };
-                    let sign = if self.tm.tm_utcoff > 0 { '+' } else { '-' };
-                    let mut m = abs(self.tm.tm_utcoff) / 60;
-                    let h = m / 60;
-                    m -= h * 60;
-                    write!(fmt, "{}{}{:02}:{:02}", s, sign, h, m)
-                }
-            }
-        }
-    }
-}
-
-fn is_leap_year(year: i32) -> bool {
-    (year % 4 == 0) && ((year % 100 != 0) || (year % 400 == 0))
-}
-
-fn days_in_year(year: i32) -> i32 {
-    if is_leap_year(year) { 366 }
-    else                  { 365 }
-}
-
-fn iso_week_days(yday: i32, wday: i32) -> i32 {
-    /* The number of days from the first day of the first ISO week of this
-    * year to the year day YDAY with week day WDAY.
-    * ISO weeks start on Monday. The first ISO week has the year's first
-    * Thursday.
-    * YDAY may be as small as yday_minimum.
-    */
-    let iso_week_start_wday: i32 = 1;                     /* Monday */
-    let iso_week1_wday: i32 = 4;                          /* Thursday */
-    let yday_minimum: i32 = 366;
-    /* Add enough to the first operand of % to make it nonnegative. */
-    let big_enough_multiple_of_7: i32 = (yday_minimum / 7 + 2) * 7;
-
-    yday - (yday - wday + iso_week1_wday + big_enough_multiple_of_7) % 7
-        + iso_week1_wday - iso_week_start_wday
-}
-
-fn iso_week(fmt: &mut fmt::Formatter, ch:char, tm: &Tm) -> fmt::Result {
-    let mut year = tm.tm_year + 1900;
-    let mut days = iso_week_days(tm.tm_yday, tm.tm_wday);
-
-    if days < 0 {
-        /* This ISO week belongs to the previous year. */
-        year -= 1;
-        days = iso_week_days(tm.tm_yday + (days_in_year(year)), tm.tm_wday);
-    } else {
-        let d = iso_week_days(tm.tm_yday - (days_in_year(year)),
-                              tm.tm_wday);
-        if 0 <= d {
-            /* This ISO week belongs to the next year. */
-            year += 1;
-            days = d;
-        }
-    }
-
-    match ch {
-        'G' => write!(fmt, "{}", year),
-        'g' => write!(fmt, "{:02}", (year % 100 + 100) % 100),
-        'V' => write!(fmt, "{:02}", days / 7 + 1),
-        _ => Ok(())
-    }
-}
-
-fn parse_type(fmt: &mut fmt::Formatter, ch: char, tm: &Tm) -> fmt::Result {
-    match ch {
-        'A' => fmt.write_str(match tm.tm_wday {
-            0 => "Sunday",
-            1 => "Monday",
-            2 => "Tuesday",
-            3 => "Wednesday",
-            4 => "Thursday",
-            5 => "Friday",
-            6 => "Saturday",
-            _ => unreachable!(),
-        }),
-        'a' => fmt.write_str(match tm.tm_wday {
-            0 => "Sun",
-            1 => "Mon",
-            2 => "Tue",
-            3 => "Wed",
-            4 => "Thu",
-            5 => "Fri",
-            6 => "Sat",
-            _ => unreachable!(),
-        }),
-        'B' => fmt.write_str(match tm.tm_mon {
-            0 => "January",
-            1 => "February",
-            2 => "March",
-            3 => "April",
-            4 => "May",
-            5 => "June",
-            6 => "July",
-            7 => "August",
-            8 => "September",
-            9 => "October",
-            10 => "November",
-            11 => "December",
-            _ => unreachable!(),
-        }),
-        'b' | 'h' => fmt.write_str(match tm.tm_mon {
-            0 => "Jan",
-            1 => "Feb",
-            2 => "Mar",
-            3 => "Apr",
-            4 => "May",
-            5 => "Jun",
-            6 => "Jul",
-            7 => "Aug",
-            8 => "Sep",
-            9 => "Oct",
-            10 => "Nov",
-            11 => "Dec",
-            _  => unreachable!(),
-        }),
-        'C' => write!(fmt, "{:02}", (tm.tm_year + 1900) / 100),
-        'c' => {
-            try!(parse_type(fmt, 'a', tm));
-            try!(fmt.write_str(" "));
-            try!(parse_type(fmt, 'b', tm));
-            try!(fmt.write_str(" "));
-            try!(parse_type(fmt, 'e', tm));
-            try!(fmt.write_str(" "));
-            try!(parse_type(fmt, 'T', tm));
-            try!(fmt.write_str(" "));
-            parse_type(fmt, 'Y', tm)
-        }
-        'D' | 'x' => {
-            try!(parse_type(fmt, 'm', tm));
-            try!(fmt.write_str("/"));
-            try!(parse_type(fmt, 'd', tm));
-            try!(fmt.write_str("/"));
-            parse_type(fmt, 'y', tm)
-        }
-        'd' => write!(fmt, "{:02}", tm.tm_mday),
-        'e' => write!(fmt, "{:2}", tm.tm_mday),
-        'f' => write!(fmt, "{:09}", tm.tm_nsec),
-        'F' => {
-            try!(parse_type(fmt, 'Y', tm));
-            try!(fmt.write_str("-"));
-            try!(parse_type(fmt, 'm', tm));
-            try!(fmt.write_str("-"));
-            parse_type(fmt, 'd', tm)
-        }
-        'G' => iso_week(fmt, 'G', tm),
-        'g' => iso_week(fmt, 'g', tm),
-        'H' => write!(fmt, "{:02}", tm.tm_hour),
-        'I' => {
-            let mut h = tm.tm_hour;
-            if h == 0 { h = 12 }
-            if h > 12 { h -= 12 }
-            write!(fmt, "{:02}", h)
-        }
-        'j' => write!(fmt, "{:03}", tm.tm_yday + 1),
-        'k' => write!(fmt, "{:2}", tm.tm_hour),
-        'l' => {
-            let mut h = tm.tm_hour;
-            if h == 0 { h = 12 }
-            if h > 12 { h -= 12 }
-            write!(fmt, "{:2}", h)
-        }
-        'M' => write!(fmt, "{:02}", tm.tm_min),
-        'm' => write!(fmt, "{:02}", tm.tm_mon + 1),
-        'n' => fmt.write_str("\n"),
-        'P' => fmt.write_str(if tm.tm_hour < 12 { "am" } else { "pm" }),
-        'p' => fmt.write_str(if (tm.tm_hour) < 12 { "AM" } else { "PM" }),
-        'R' => {
-            try!(parse_type(fmt, 'H', tm));
-            try!(fmt.write_str(":"));
-            parse_type(fmt, 'M', tm)
-        }
-        'r' => {
-            try!(parse_type(fmt, 'I', tm));
-            try!(fmt.write_str(":"));
-            try!(parse_type(fmt, 'M', tm));
-            try!(fmt.write_str(":"));
-            try!(parse_type(fmt, 'S', tm));
-            try!(fmt.write_str(" "));
-            parse_type(fmt, 'p', tm)
-        }
-        'S' => write!(fmt, "{:02}", tm.tm_sec),
-        's' => write!(fmt, "{}", tm.to_timespec().sec),
-        'T' | 'X' => {
-            try!(parse_type(fmt, 'H', tm));
-            try!(fmt.write_str(":"));
-            try!(parse_type(fmt, 'M', tm));
-            try!(fmt.write_str(":"));
-            parse_type(fmt, 'S', tm)
-        }
-        't' => fmt.write_str("\t"),
-        'U' => write!(fmt, "{:02}", (tm.tm_yday - tm.tm_wday + 7) / 7),
-        'u' => {
-            let i = tm.tm_wday;
-            write!(fmt, "{}", (if i == 0 { 7 } else { i }))
-        }
-        'V' => iso_week(fmt, 'V', tm),
-        'v' => {
-            try!(parse_type(fmt, 'e', tm));
-            try!(fmt.write_str("-"));
-            try!(parse_type(fmt, 'b', tm));
-            try!(fmt.write_str("-"));
-            parse_type(fmt, 'Y', tm)
-        }
-        'W' => {
-            write!(fmt, "{:02}", (tm.tm_yday - (tm.tm_wday - 1 + 7) % 7 + 7) / 7)
-        }
-        'w' => write!(fmt, "{}", tm.tm_wday),
-        'Y' => write!(fmt, "{}", tm.tm_year + 1900),
-        'y' => write!(fmt, "{:02}", (tm.tm_year + 1900) % 100),
-        // FIXME (#2350): support locale
-        'Z' => fmt.write_str(if tm.tm_utcoff == 0 { "UTC"} else { "" }),
-        'z' => {
-            let sign = if tm.tm_utcoff > 0 { '+' } else { '-' };
-            let mut m = abs(tm.tm_utcoff) / 60;
-            let h = m / 60;
-            m -= h * 60;
-            write!(fmt, "{}{:02}{:02}", sign, h, m)
-        }
-        '+' => write!(fmt, "{}", tm.rfc3339()),
-        '%' => fmt.write_str("%"),
-        _   => unreachable!(),
-    }
-}
-
-fn abs(i: i32) -> i32 {
-    if i < 0 {-i} else {i}
-}
deleted file mode 100644
--- a/third_party/rust/time-0.1.36/src/duration.rs
+++ /dev/null
@@ -1,648 +0,0 @@
-// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! Temporal quantification
-
-use std::{fmt, i64};
-use std::error::Error;
-use std::ops::{Add, Sub, Mul, Div, Neg, FnOnce};
-use std::time::Duration as StdDuration;
-
-/// The number of nanoseconds in a microsecond.
-const NANOS_PER_MICRO: i32 = 1000;
-/// The number of nanoseconds in a millisecond.
-const NANOS_PER_MILLI: i32 = 1000_000;
-/// The number of nanoseconds in seconds.
-const NANOS_PER_SEC: i32 = 1_000_000_000;
-/// The number of microseconds per second.
-const MICROS_PER_SEC: i64 = 1000_000;
-/// The number of milliseconds per second.
-const MILLIS_PER_SEC: i64 = 1000;
-/// The number of seconds in a minute.
-const SECS_PER_MINUTE: i64 = 60;
-/// The number of seconds in an hour.
-const SECS_PER_HOUR: i64 = 3600;
-/// The number of (non-leap) seconds in days.
-const SECS_PER_DAY: i64 = 86400;
-/// The number of (non-leap) seconds in a week.
-const SECS_PER_WEEK: i64 = 604800;
-
-macro_rules! try_opt {
-    ($e:expr) => (match $e { Some(v) => v, None => return None })
-}
-
-
-/// ISO 8601 time duration with nanosecond precision.
-/// This also allows for the negative duration; see individual methods for details.
-#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug)]
-pub struct Duration {
-    secs: i64,
-    nanos: i32, // Always 0 <= nanos < NANOS_PER_SEC
-}
-
-/// The minimum possible `Duration`: `i64::MIN` milliseconds.
-pub const MIN: Duration = Duration {
-    secs: i64::MIN / MILLIS_PER_SEC - 1,
-    nanos: NANOS_PER_SEC + (i64::MIN % MILLIS_PER_SEC) as i32 * NANOS_PER_MILLI
-};
-
-/// The maximum possible `Duration`: `i64::MAX` milliseconds.
-pub const MAX: Duration = Duration {
-    secs: i64::MAX / MILLIS_PER_SEC,
-    nanos: (i64::MAX % MILLIS_PER_SEC) as i32 * NANOS_PER_MILLI
-};
-
-impl Duration {
-    /// Makes a new `Duration` with given number of weeks.
-    /// Equivalent to `Duration::seconds(weeks * 7 * 24 * 60 * 60)` with overflow checks.
-    /// Panics when the duration is out of bounds.
-    #[inline]
-    pub fn weeks(weeks: i64) -> Duration {
-        let secs = weeks.checked_mul(SECS_PER_WEEK).expect("Duration::weeks out of bounds");
-        Duration::seconds(secs)
-    }
-
-    /// Makes a new `Duration` with given number of days.
-    /// Equivalent to `Duration::seconds(days * 24 * 60 * 60)` with overflow checks.
-    /// Panics when the duration is out of bounds.
-    #[inline]
-    pub fn days(days: i64) -> Duration {
-        let secs = days.checked_mul(SECS_PER_DAY).expect("Duration::days out of bounds");
-        Duration::seconds(secs)
-    }
-
-    /// Makes a new `Duration` with given number of hours.
-    /// Equivalent to `Duration::seconds(hours * 60 * 60)` with overflow checks.
-    /// Panics when the duration is out of bounds.
-    #[inline]
-    pub fn hours(hours: i64) -> Duration {
-        let secs = hours.checked_mul(SECS_PER_HOUR).expect("Duration::hours ouf of bounds");
-        Duration::seconds(secs)
-    }
-
-    /// Makes a new `Duration` with given number of minutes.
-    /// Equivalent to `Duration::seconds(minutes * 60)` with overflow checks.
-    /// Panics when the duration is out of bounds.
-    #[inline]
-    pub fn minutes(minutes: i64) -> Duration {
-        let secs = minutes.checked_mul(SECS_PER_MINUTE).expect("Duration::minutes out of bounds");
-        Duration::seconds(secs)
-    }
-
-    /// Makes a new `Duration` with given number of seconds.
-    /// Panics when the duration is more than `i64::MAX` milliseconds
-    /// or less than `i64::MIN` milliseconds.
-    #[inline]
-    pub fn seconds(seconds: i64) -> Duration {
-        let d = Duration { secs: seconds, nanos: 0 };
-        if d < MIN || d > MAX {
-            panic!("Duration::seconds out of bounds");
-        }
-        d
-    }
-
-    /// Makes a new `Duration` with given number of milliseconds.
-    #[inline]
-    pub fn milliseconds(milliseconds: i64) -> Duration {
-        let (secs, millis) = div_mod_floor_64(milliseconds, MILLIS_PER_SEC);
-        let nanos = millis as i32 * NANOS_PER_MILLI;
-        Duration { secs: secs, nanos: nanos }
-    }
-
-    /// Makes a new `Duration` with given number of microseconds.
-    #[inline]
-    pub fn microseconds(microseconds: i64) -> Duration {
-        let (secs, micros) = div_mod_floor_64(microseconds, MICROS_PER_SEC);
-        let nanos = micros as i32 * NANOS_PER_MICRO;
-        Duration { secs: secs, nanos: nanos }
-    }
-
-    /// Makes a new `Duration` with given number of nanoseconds.
-    #[inline]
-    pub fn nanoseconds(nanos: i64) -> Duration {
-        let (secs, nanos) = div_mod_floor_64(nanos, NANOS_PER_SEC as i64);
-        Duration { secs: secs, nanos: nanos as i32 }
-    }
-
-    /// Runs a closure, returning the duration of time it took to run the
-    /// closure.
-    pub fn span<F>(f: F) -> Duration where F: FnOnce() {
-        let before = super::precise_time_ns();
-        f();
-        Duration::nanoseconds((super::precise_time_ns() - before) as i64)
-    }
-
-    /// Returns the total number of whole weeks in the duration.
-    #[inline]
-    pub fn num_weeks(&self) -> i64 {
-        self.num_days() / 7
-    }
-
-    /// Returns the total number of whole days in the duration.
-    pub fn num_days(&self) -> i64 {
-        self.num_seconds() / SECS_PER_DAY
-    }
-
-    /// Returns the total number of whole hours in the duration.
-    #[inline]
-    pub fn num_hours(&self) -> i64 {
-        self.num_seconds() / SECS_PER_HOUR
-    }
-
-    /// Returns the total number of whole minutes in the duration.
-    #[inline]
-    pub fn num_minutes(&self) -> i64 {
-        self.num_seconds() / SECS_PER_MINUTE
-    }
-
-    /// Returns the total number of whole seconds in the duration.
-    pub fn num_seconds(&self) -> i64 {
-        // If secs is negative, nanos should be subtracted from the duration.
-        if self.secs < 0 && self.nanos > 0 {
-            self.secs + 1
-        } else {
-            self.secs
-        }
-    }
-
-    /// Returns the number of nanoseconds such that
-    /// `nanos_mod_sec() + num_seconds() * NANOS_PER_SEC` is the total number of
-    /// nanoseconds in the duration.
-    fn nanos_mod_sec(&self) -> i32 {
-        if self.secs < 0 && self.nanos > 0 {
-            self.nanos - NANOS_PER_SEC
-        } else {
-            self.nanos
-        }
-    }
-
-    /// Returns the total number of whole milliseconds in the duration,
-    pub fn num_milliseconds(&self) -> i64 {
-        // A proper Duration will not overflow, because MIN and MAX are defined
-        // such that the range is exactly i64 milliseconds.
-        let secs_part = self.num_seconds() * MILLIS_PER_SEC;
-        let nanos_part = self.nanos_mod_sec() / NANOS_PER_MILLI;
-        secs_part + nanos_part as i64
-    }
-
-    /// Returns the total number of whole microseconds in the duration,
-    /// or `None` on overflow (exceeding 2^63 microseconds in either direction).
-    pub fn num_microseconds(&self) -> Option<i64> {
-        let secs_part = try_opt!(self.num_seconds().checked_mul(MICROS_PER_SEC));
-        let nanos_part = self.nanos_mod_sec() / NANOS_PER_MICRO;
-        secs_part.checked_add(nanos_part as i64)
-    }
-
-    /// Returns the total number of whole nanoseconds in the duration,
-    /// or `None` on overflow (exceeding 2^63 nanoseconds in either direction).
-    pub fn num_nanoseconds(&self) -> Option<i64> {
-        let secs_part = try_opt!(self.num_seconds().checked_mul(NANOS_PER_SEC as i64));
-        let nanos_part = self.nanos_mod_sec();
-        secs_part.checked_add(nanos_part as i64)
-    }
-
-    /// Add two durations, returning `None` if overflow occurred.
-    pub fn checked_add(&self, rhs: &Duration) -> Option<Duration> {
-        let mut secs = try_opt!(self.secs.checked_add(rhs.secs));
-        let mut nanos = self.nanos + rhs.nanos;
-        if nanos >= NANOS_PER_SEC {
-            nanos -= NANOS_PER_SEC;
-            secs = try_opt!(secs.checked_add(1));
-        }
-        let d = Duration { secs: secs, nanos: nanos };
-        // Even if d is within the bounds of i64 seconds,
-        // it might still overflow i64 milliseconds.
-        if d < MIN || d > MAX { None } else { Some(d) }
-    }
-
-    /// Subtract two durations, returning `None` if overflow occurred.
-    pub fn checked_sub(&self, rhs: &Duration) -> Option<Duration> {
-        let mut secs = try_opt!(self.secs.checked_sub(rhs.secs));
-        let mut nanos = self.nanos - rhs.nanos;
-        if nanos < 0 {
-            nanos += NANOS_PER_SEC;
-            secs = try_opt!(secs.checked_sub(1));
-        }
-        let d = Duration { secs: secs, nanos: nanos };
-        // Even if d is within the bounds of i64 seconds,
-        // it might still overflow i64 milliseconds.
-        if d < MIN || d > MAX { None } else { Some(d) }
-    }
-
-    /// The minimum possible `Duration`: `i64::MIN` milliseconds.
-    #[inline]
-    pub fn min_value() -> Duration { MIN }
-
-    /// The maximum possible `Duration`: `i64::MAX` milliseconds.
-    #[inline]
-    pub fn max_value() -> Duration { MAX }
-
-    /// A duration where the stored seconds and nanoseconds are equal to zero.
-    #[inline]
-    pub fn zero() -> Duration {
-        Duration { secs: 0, nanos: 0 }
-    }
-
-    /// Returns `true` if the duration equals `Duration::zero()`.
-    #[inline]
-    pub fn is_zero(&self) -> bool {
-        self.secs == 0 && self.nanos == 0
-    }
-
-    /// Creates a `time::Duration` object from `std::time::Duration`
-    ///
-    /// This function errors when original duration is larger than the maximum
-    /// value supported for this type.
-    pub fn from_std(duration: StdDuration) -> Result<Duration, OutOfRangeError> {
-        // We need to check secs as u64 before coercing to i64
-        if duration.as_secs() > MAX.secs as u64 {
-            return Err(OutOfRangeError(()));
-        }
-        let d = Duration {
-            secs: duration.as_secs() as i64,
-            nanos: duration.subsec_nanos() as i32,
-        };
-        if d > MAX {
-            return Err(OutOfRangeError(()));
-        }
-        Ok(d)
-    }
-
-    /// Creates a `std::time::Duration` object from `time::Duration`
-    ///
-    /// This function errors when duration is less than zero. As standard
-    /// library implementation is limited to non-negative values.
-    pub fn to_std(&self) -> Result<StdDuration, OutOfRangeError> {
-        if self.secs < 0 {
-            return Err(OutOfRangeError(()));
-        }
-        Ok(StdDuration::new(self.secs as u64, self.nanos as u32))
-    }
-}
-
-impl Neg for Duration {
-    type Output = Duration;
-
-    #[inline]
-    fn neg(self) -> Duration {
-        if self.nanos == 0 {
-            Duration { secs: -self.secs, nanos: 0 }
-        } else {
-            Duration { secs: -self.secs - 1, nanos: NANOS_PER_SEC - self.nanos }
-        }
-    }
-}
-
-impl Add for Duration {
-    type Output = Duration;
-
-    fn add(self, rhs: Duration) -> Duration {
-        let mut secs = self.secs + rhs.secs;
-        let mut nanos = self.nanos + rhs.nanos;
-        if nanos >= NANOS_PER_SEC {
-            nanos -= NANOS_PER_SEC;
-            secs += 1;
-        }
-        Duration { secs: secs, nanos: nanos }
-    }
-}
-
-impl Sub for Duration {
-    type Output = Duration;
-
-    fn sub(self, rhs: Duration) -> Duration {
-        let mut secs = self.secs - rhs.secs;
-        let mut nanos = self.nanos - rhs.nanos;
-        if nanos < 0 {
-            nanos += NANOS_PER_SEC;
-            secs -= 1;
-        }
-        Duration { secs: secs, nanos: nanos }
-    }
-}
-
-impl Mul<i32> for Duration {
-    type Output = Duration;
-
-    fn mul(self, rhs: i32) -> Duration {
-        // Multiply nanoseconds as i64, because it cannot overflow that way.
-        let total_nanos = self.nanos as i64 * rhs as i64;
-        let (extra_secs, nanos) = div_mod_floor_64(total_nanos, NANOS_PER_SEC as i64);
-        let secs = self.secs * rhs as i64 + extra_secs;
-        Duration { secs: secs, nanos: nanos as i32 }
-    }
-}
-
-impl Div<i32> for Duration {
-    type Output = Duration;
-
-    fn div(self, rhs: i32) -> Duration {
-        let mut secs = self.secs / rhs as i64;
-        let carry = self.secs - secs * rhs as i64;
-        let extra_nanos = carry * NANOS_PER_SEC as i64 / rhs as i64;
-        let mut nanos = self.nanos / rhs + extra_nanos as i32;
-        if nanos >= NANOS_PER_SEC {
-            nanos -= NANOS_PER_SEC;
-            secs += 1;
-        }
-        if nanos < 0 {
-            nanos += NANOS_PER_SEC;
-            secs -= 1;
-        }
-        Duration { secs: secs, nanos: nanos }
-    }
-}
-
-impl fmt::Display for Duration {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        // technically speaking, negative duration is not valid ISO 8601,
-        // but we need to print it anyway.
-        let (abs, sign) = if self.secs < 0 { (-*self, "-") } else { (*self, "") };
-
-        let days = abs.secs / SECS_PER_DAY;
-        let secs = abs.secs - days * SECS_PER_DAY;
-        let hasdate = days != 0;
-        let hastime = (secs != 0 || abs.nanos != 0) || !hasdate;
-
-        try!(write!(f, "{}P", sign));
-
-        if hasdate {
-            try!(write!(f, "{}D", days));
-        }
-        if hastime {
-            if abs.nanos == 0 {
-                try!(write!(f, "T{}S", secs));
-            } else if abs.nanos % NANOS_PER_MILLI == 0 {
-                try!(write!(f, "T{}.{:03}S", secs, abs.nanos / NANOS_PER_MILLI));
-            } else if abs.nanos % NANOS_PER_MICRO == 0 {
-                try!(write!(f, "T{}.{:06}S", secs, abs.nanos / NANOS_PER_MICRO));
-            } else {
-                try!(write!(f, "T{}.{:09}S", secs, abs.nanos));
-            }
-        }
-        Ok(())
-    }
-}
-
-/// Represents error when converting `Duration` to/from a standard library
-/// implementation
-///
-/// The `std::time::Duration` supports a range from zero to `u64::MAX`
-/// *seconds*, while this module supports signed range of up to
-/// `i64::MAX` of *milliseconds*.
-#[derive(Debug, Clone, Copy, PartialEq, Eq)]
-pub struct OutOfRangeError(());
-
-impl fmt::Display for OutOfRangeError {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        write!(f, "{}", self.description())
-    }
-}
-
-impl Error for OutOfRangeError {
-    fn description(&self) -> &str {
-        "Source duration value is out of range for the target type"
-    }
-}
-
-// Copied from libnum
-#[inline]
-fn div_mod_floor_64(this: i64, other: i64) -> (i64, i64) {
-    (div_floor_64(this, other), mod_floor_64(this, other))
-}
-
-#[inline]
-fn div_floor_64(this: i64, other: i64) -> i64 {
-    match div_rem_64(this, other) {
-        (d, r) if (r > 0 && other < 0)
-               || (r < 0 && other > 0) => d - 1,
-        (d, _)                         => d,
-    }
-}
-
-#[inline]
-fn mod_floor_64(this: i64, other: i64) -> i64 {
-    match this % other {
-        r if (r > 0 && other < 0)
-          || (r < 0 && other > 0) => r + other,
-        r                         => r,
-    }
-}
-
-#[inline]
-fn div_rem_64(this: i64, other: i64) -> (i64, i64) {
-    (this / other, this % other)
-}
-
-#[cfg(test)]
-mod tests {
-    use super::{Duration, MIN, MAX, OutOfRangeError};
-    use std::{i32, i64};
-    use std::time::Duration as StdDuration;
-
-    #[test]
-    fn test_duration() {
-        assert!(Duration::seconds(1) != Duration::zero());
-        assert_eq!(Duration::seconds(1) + Duration::seconds(2), Duration::seconds(3));
-        assert_eq!(Duration::seconds(86399) + Duration::seconds(4),
-                   Duration::days(1) + Duration::seconds(3));
-        assert_eq!(Duration::days(10) - Duration::seconds(1000), Duration::seconds(863000));
-        assert_eq!(Duration::days(10) - Duration::seconds(1000000), Duration::seconds(-136000));
-        assert_eq!(Duration::days(2) + Duration::seconds(86399) +
-                   Duration::nanoseconds(1234567890),
-                   Duration::days(3) + Duration::nanoseconds(234567890));
-        assert_eq!(-Duration::days(3), Duration::days(-3));
-        assert_eq!(-(Duration::days(3) + Duration::seconds(70)),
-                   Duration::days(-4) + Duration::seconds(86400-70));
-    }
-
-    #[test]
-    fn test_duration_num_days() {
-        assert_eq!(Duration::zero().num_days(), 0);
-        assert_eq!(Duration::days(1).num_days(), 1);
-        assert_eq!(Duration::days(-1).num_days(), -1);
-        assert_eq!(Duration::seconds(86399).num_days(), 0);
-        assert_eq!(Duration::seconds(86401).num_days(), 1);
-        assert_eq!(Duration::seconds(-86399).num_days(), 0);
-        assert_eq!(Duration::seconds(-86401).num_days(), -1);
-        assert_eq!(Duration::days(i32::MAX as i64).num_days(), i32::MAX as i64);
-        assert_eq!(Duration::days(i32::MIN as i64).num_days(), i32::MIN as i64);
-    }
-
-    #[test]
-    fn test_duration_num_seconds() {
-        assert_eq!(Duration::zero().num_seconds(), 0);
-        assert_eq!(Duration::seconds(1).num_seconds(), 1);
-        assert_eq!(Duration::seconds(-1).num_seconds(), -1);
-        assert_eq!(Duration::milliseconds(999).num_seconds(), 0);
-        assert_eq!(Duration::milliseconds(1001).num_seconds(), 1);
-        assert_eq!(Duration::milliseconds(-999).num_seconds(), 0);
-        assert_eq!(Duration::milliseconds(-1001).num_seconds(), -1);
-    }
-
-    #[test]
-    fn test_duration_num_milliseconds() {
-        assert_eq!(Duration::zero().num_milliseconds(), 0);
-        assert_eq!(Duration::milliseconds(1).num_milliseconds(), 1);
-        assert_eq!(Duration::milliseconds(-1).num_milliseconds(), -1);
-        assert_eq!(Duration::microseconds(999).num_milliseconds(), 0);
-        assert_eq!(Duration::microseconds(1001).num_milliseconds(), 1);
-        assert_eq!(Duration::microseconds(-999).num_milliseconds(), 0);
-        assert_eq!(Duration::microseconds(-1001).num_milliseconds(), -1);
-        assert_eq!(Duration::milliseconds(i64::MAX).num_milliseconds(), i64::MAX);
-        assert_eq!(Duration::milliseconds(i64::MIN).num_milliseconds(), i64::MIN);
-        assert_eq!(MAX.num_milliseconds(), i64::MAX);
-        assert_eq!(MIN.num_milliseconds(), i64::MIN);
-    }
-
-    #[test]
-    fn test_duration_num_microseconds() {
-        assert_eq!(Duration::zero().num_microseconds(), Some(0));
-        assert_eq!(Duration::microseconds(1).num_microseconds(), Some(1));
-        assert_eq!(Duration::microseconds(-1).num_microseconds(), Some(-1));
-        assert_eq!(Duration::nanoseconds(999).num_microseconds(), Some(0));
-        assert_eq!(Duration::nanoseconds(1001).num_microseconds(), Some(1));
-        assert_eq!(Duration::nanoseconds(-999).num_microseconds(), Some(0));
-        assert_eq!(Duration::nanoseconds(-1001).num_microseconds(), Some(-1));
-        assert_eq!(Duration::microseconds(i64::MAX).num_microseconds(), Some(i64::MAX));
-        assert_eq!(Duration::microseconds(i64::MIN).num_microseconds(), Some(i64::MIN));
-        assert_eq!(MAX.num_microseconds(), None);
-        assert_eq!(MIN.num_microseconds(), None);
-
-        // overflow checks
-        const MICROS_PER_DAY: i64 = 86400_000_000;
-        assert_eq!(Duration::days(i64::MAX / MICROS_PER_DAY).num_microseconds(),
-                   Some(i64::MAX / MICROS_PER_DAY * MICROS_PER_DAY));
-        assert_eq!(Duration::days(i64::MIN / MICROS_PER_DAY).num_microseconds(),
-                   Some(i64::MIN / MICROS_PER_DAY * MICROS_PER_DAY));
-        assert_eq!(Duration::days(i64::MAX / MICROS_PER_DAY + 1).num_microseconds(), None);
-        assert_eq!(Duration::days(i64::MIN / MICROS_PER_DAY - 1).num_microseconds(), None);
-    }
-
-    #[test]
-    fn test_duration_num_nanoseconds() {
-        assert_eq!(Duration::zero().num_nanoseconds(), Some(0));
-        assert_eq!(Duration::nanoseconds(1).num_nanoseconds(), Some(1));
-        assert_eq!(Duration::nanoseconds(-1).num_nanoseconds(), Some(-1));
-        assert_eq!(Duration::nanoseconds(i64::MAX).num_nanoseconds(), Some(i64::MAX));
-        assert_eq!(Duration::nanoseconds(i64::MIN).num_nanoseconds(), Some(i64::MIN));
-        assert_eq!(MAX.num_nanoseconds(), None);
-        assert_eq!(MIN.num_nanoseconds(), None);
-
-        // overflow checks
-        const NANOS_PER_DAY: i64 = 86400_000_000_000;
-        assert_eq!(Duration::days(i64::MAX / NANOS_PER_DAY).num_nanoseconds(),
-                   Some(i64::MAX / NANOS_PER_DAY * NANOS_PER_DAY));
-        assert_eq!(Duration::days(i64::MIN / NANOS_PER_DAY).num_nanoseconds(),
-                   Some(i64::MIN / NANOS_PER_DAY * NANOS_PER_DAY));
-        assert_eq!(Duration::days(i64::MAX / NANOS_PER_DAY + 1).num_nanoseconds(), None);
-        assert_eq!(Duration::days(i64::MIN / NANOS_PER_DAY - 1).num_nanoseconds(), None);
-    }
-
-    #[test]
-    fn test_duration_checked_ops() {
-        assert_eq!(Duration::milliseconds(i64::MAX - 1).checked_add(&Duration::microseconds(999)),
-                   Some(Duration::milliseconds(i64::MAX - 2) + Duration::microseconds(1999)));
-        assert!(Duration::milliseconds(i64::MAX).checked_add(&Duration::microseconds(1000))
-                                                .is_none());
-
-        assert_eq!(Duration::milliseconds(i64::MIN).checked_sub(&Duration::milliseconds(0)),
-                   Some(Duration::milliseconds(i64::MIN)));
-        assert!(Duration::milliseconds(i64::MIN).checked_sub(&Duration::milliseconds(1))
-                                                .is_none());
-    }
-
-    #[test]
-    fn test_duration_mul() {
-        assert_eq!(Duration::zero() * i32::MAX, Duration::zero());
-        assert_eq!(Duration::zero() * i32::MIN, Duration::zero());
-        assert_eq!(Duration::nanoseconds(1) * 0, Duration::zero());
-        assert_eq!(Duration::nanoseconds(1) * 1, Duration::nanoseconds(1));
-        assert_eq!(Duration::nanoseconds(1) * 1_000_000_000, Duration::seconds(1));
-        assert_eq!(Duration::nanoseconds(1) * -1_000_000_000, -Duration::seconds(1));
-        assert_eq!(-Duration::nanoseconds(1) * 1_000_000_000, -Duration::seconds(1));
-        assert_eq!(Duration::nanoseconds(30) * 333_333_333,
-                   Duration::seconds(10) - Duration::nanoseconds(10));
-        assert_eq!((Duration::nanoseconds(1) + Duration::seconds(1) + Duration::days(1)) * 3,
-                   Duration::nanoseconds(3) + Duration::seconds(3) + Duration::days(3));
-        assert_eq!(Duration::milliseconds(1500) * -2, Duration::seconds(-3));
-        assert_eq!(Duration::milliseconds(-1500) * 2, Duration::seconds(-3));
-    }
-
-    #[test]
-    fn test_duration_div() {
-        assert_eq!(Duration::zero() / i32::MAX, Duration::zero());
-        assert_eq!(Duration::zero() / i32::MIN, Duration::zero());
-        assert_eq!(Duration::nanoseconds(123_456_789) / 1, Duration::nanoseconds(123_456_789));
-        assert_eq!(Duration::nanoseconds(123_456_789) / -1, -Duration::nanoseconds(123_456_789));
-        assert_eq!(-Duration::nanoseconds(123_456_789) / -1, Duration::nanoseconds(123_456_789));
-        assert_eq!(-Duration::nanoseconds(123_456_789) / 1, -Duration::nanoseconds(123_456_789));
-        assert_eq!(Duration::seconds(1) / 3, Duration::nanoseconds(333_333_333));
-        assert_eq!(Duration::seconds(4) / 3, Duration::nanoseconds(1_333_333_333));
-        assert_eq!(Duration::seconds(-1) / 2, Duration::milliseconds(-500));
-        assert_eq!(Duration::seconds(1) / -2, Duration::milliseconds(-500));
-        assert_eq!(Duration::seconds(-1) / -2, Duration::milliseconds(500));
-        assert_eq!(Duration::seconds(-4) / 3, Duration::nanoseconds(-1_333_333_333));
-        assert_eq!(Duration::seconds(-4) / -3, Duration::nanoseconds(1_333_333_333));
-    }
-
-    #[test]
-    fn test_duration_fmt() {
-        assert_eq!(Duration::zero().to_string(), "PT0S");
-        assert_eq!(Duration::days(42).to_string(), "P42D");
-        assert_eq!(Duration::days(-42).to_string(), "-P42D");
-        assert_eq!(Duration::seconds(42).to_string(), "PT42S");
-        assert_eq!(Duration::milliseconds(42).to_string(), "PT0.042S");
-        assert_eq!(Duration::microseconds(42).to_string(), "PT0.000042S");
-        assert_eq!(Duration::nanoseconds(42).to_string(), "PT0.000000042S");
-        assert_eq!((Duration::days(7) + Duration::milliseconds(6543)).to_string(),
-                   "P7DT6.543S");
-        assert_eq!(Duration::seconds(-86401).to_string(), "-P1DT1S");
-        assert_eq!(Duration::nanoseconds(-1).to_string(), "-PT0.000000001S");
-
-        // the format specifier should have no effect on `Duration`
-        assert_eq!(format!("{:30}", Duration::days(1) + Duration::milliseconds(2345)),
-                   "P1DT2.345S");
-    }
-
-    #[test]
-    fn test_to_std() {
-        assert_eq!(Duration::seconds(1).to_std(), Ok(StdDuration::new(1, 0)));
-        assert_eq!(Duration::seconds(86401).to_std(), Ok(StdDuration::new(86401, 0)));
-        assert_eq!(Duration::milliseconds(123).to_std(), Ok(StdDuration::new(0, 123000000)));
-        assert_eq!(Duration::milliseconds(123765).to_std(), Ok(StdDuration::new(123, 765000000)));
-        assert_eq!(Duration::nanoseconds(777).to_std(), Ok(StdDuration::new(0, 777)));
-        assert_eq!(MAX.to_std(), Ok(StdDuration::new(9223372036854775, 807000000)));
-        assert_eq!(Duration::seconds(-1).to_std(),
-                   Err(OutOfRangeError(())));
-        assert_eq!(Duration::milliseconds(-1).to_std(),
-                   Err(OutOfRangeError(())));
-    }
-
-    #[test]
-    fn test_from_std() {
-        assert_eq!(Ok(Duration::seconds(1)),
-                   Duration::from_std(StdDuration::new(1, 0)));
-        assert_eq!(Ok(Duration::seconds(86401)),
-                   Duration::from_std(StdDuration::new(86401, 0)));
-        assert_eq!(Ok(Duration::milliseconds(123)),
-                   Duration::from_std(StdDuration::new(0, 123000000)));
-        assert_eq!(Ok(Duration::milliseconds(123765)),
-                   Duration::from_std(StdDuration::new(123, 765000000)));
-        assert_eq!(Ok(Duration::nanoseconds(777)),
-                   Duration::from_std(StdDuration::new(0, 777)));
-        assert_eq!(Ok(MAX),
-                   Duration::from_std(StdDuration::new(9223372036854775, 807000000)));
-        assert_eq!(Duration::from_std(StdDuration::new(9223372036854776, 0)),
-                   Err(OutOfRangeError(())));
-        assert_eq!(Duration::from_std(StdDuration::new(9223372036854775, 807000001)),
-                   Err(OutOfRangeError(())));
-    }
-}
deleted file mode 100644
--- a/third_party/rust/time-0.1.36/src/lib.rs
+++ /dev/null
@@ -1,1277 +0,0 @@
-// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! Simple time handling.
-//!
-//! # Usage
-//!
-//! This crate is [on crates.io](https://crates.io/crates/time) and can be
-//! used by adding `time` to the dependencies in your project's `Cargo.toml`.
-//!
-//! ```toml
-//! [dependencies]
-//! time = "0.1"
-//! ```
-//!
-//! And this in your crate root:
-//!
-//! ```rust
-//! extern crate time;
-//! ```
-//!
-//! This crate uses the same syntax for format strings as the [strftime()]
-//! (http://man7.org/linux/man-pages/man3/strftime.3.html) function from the C
-//! standard library.
-
-#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
-       html_favicon_url = "https://www.rust-lang.org/favicon.ico",
-       html_root_url = "https://doc.rust-lang.org/time/")]
-#![allow(trivial_numeric_casts)]
-#![cfg_attr(test, deny(warnings))]
-
-#[cfg(target_os = "redox")] extern crate syscall;
-#[cfg(unix)] extern crate libc;
-#[cfg(windows)] extern crate kernel32;
-#[cfg(windows)] extern crate winapi;
-#[cfg(feature = "rustc-serialize")] extern crate rustc_serialize;
-
-#[cfg(test)] #[macro_use] extern crate log;
-#[cfg(all(windows, test))] extern crate advapi32;
-
-use std::cmp::Ordering;
-use std::error::Error;
-use std::fmt;
-use std::ops::{Add, Sub};
-
-pub use duration::{Duration, OutOfRangeError};
-
-use self::ParseError::{InvalidDay, InvalidDayOfMonth, InvalidDayOfWeek,
-                       InvalidDayOfYear, InvalidFormatSpecifier, InvalidHour,
-                       InvalidMinute, InvalidMonth, InvalidSecond, InvalidTime,
-                       InvalidYear, InvalidZoneOffset, InvalidSecondsSinceEpoch,
-                       MissingFormatConverter, UnexpectedCharacter};
-
-pub use parse::strptime;
-
-mod display;
-mod duration;
-mod parse;
-mod sys;
-
-static NSEC_PER_SEC: i32 = 1_000_000_000;
-
-/// A record specifying a time value in seconds and nanoseconds, where
-/// nanoseconds represent the offset from the given second.
-///
-/// For example a timespec of 1.2 seconds after the beginning of the epoch would
-/// be represented as {sec: 1, nsec: 200000000}.
-#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)]
-#[cfg_attr(feature = "rustc-serialize", derive(RustcEncodable, RustcDecodable))]
-pub struct Timespec { pub sec: i64, pub nsec: i32 }
-/*
- * Timespec assumes that pre-epoch Timespecs have negative sec and positive
- * nsec fields. Darwin's and Linux's struct timespec functions handle pre-
- * epoch timestamps using a "two steps back, one step forward" representation,
- * though the man pages do not actually document this. For example, the time
- * -1.2 seconds before the epoch is represented by `Timespec { sec: -2_i64,
- * nsec: 800_000_000 }`.
- */
-impl Timespec {
-    pub fn new(sec: i64, nsec: i32) -> Timespec {
-        assert!(nsec >= 0 && nsec < NSEC_PER_SEC);
-        Timespec { sec: sec, nsec: nsec }
-    }
-}
-
-impl Add<Duration> for Timespec {
-    type Output = Timespec;
-
-    fn add(self, other: Duration) -> Timespec {
-        let d_sec = other.num_seconds();
-        // It is safe to unwrap the nanoseconds, because there cannot be
-        // more than one second left, which fits in i64 and in i32.
-        let d_nsec = (other - Duration::seconds(d_sec))
-                     .num_nanoseconds().unwrap() as i32;
-        let mut sec = self.sec + d_sec;
-        let mut nsec = self.nsec + d_nsec;
-        if nsec >= NSEC_PER_SEC {
-            nsec -= NSEC_PER_SEC;
-            sec += 1;
-        } else if nsec < 0 {
-            nsec += NSEC_PER_SEC;
-            sec -= 1;
-        }
-        Timespec::new(sec, nsec)
-    }
-}
-
-impl Sub<Duration> for Timespec {
-    type Output = Timespec;
-
-    fn sub(self, other: Duration) -> Timespec {
-        let d_sec = other.num_seconds();
-        // It is safe to unwrap the nanoseconds, because there cannot be
-        // more than one second left, which fits in i64 and in i32.
-        let d_nsec = (other - Duration::seconds(d_sec))
-                     .num_nanoseconds().unwrap() as i32;
-        let mut sec = self.sec - d_sec;
-        let mut nsec = self.nsec - d_nsec;
-        if nsec >= NSEC_PER_SEC {
-            nsec -= NSEC_PER_SEC;
-            sec += 1;
-        } else if nsec < 0 {
-            nsec += NSEC_PER_SEC;
-            sec -= 1;
-        }
-        Timespec::new(sec, nsec)
-    }
-}
-
-impl Sub<Timespec> for Timespec {
-    type Output = Duration;
-
-    fn sub(self, other: Timespec) -> Duration {
-        let sec = self.sec - other.sec;
-        let nsec = self.nsec - other.nsec;
-        Duration::seconds(sec) + Duration::nanoseconds(nsec as i64)
-    }
-}
-
-/**
- * Returns the current time as a `timespec` containing the seconds and
- * nanoseconds since 1970-01-01T00:00:00Z.
- */
-pub fn get_time() -> Timespec {
-    let (sec, nsec) = sys::get_time();
-    Timespec::new(sec, nsec)
-}
-
-
-/**
- * Returns the current value of a high-resolution performance counter
- * in nanoseconds since an unspecified epoch.
- */
-pub fn precise_time_ns() -> u64 {
-    sys::get_precise_ns()
-}
-
-
-/**
- * Returns the current value of a high-resolution performance counter
- * in seconds since an unspecified epoch.
- */
-pub fn precise_time_s() -> f64 {
-    return (precise_time_ns() as f64) / 1000000000.;
-}
-
-/// An opaque structure representing a moment in time.
-///
-/// The only operation that can be performed on a `PreciseTime` is the
-/// calculation of the `Duration` of time that lies between them.
-///
-/// # Examples
-///
-/// Repeatedly call a function for 1 second:
-///
-/// ```rust
-/// use time::{Duration, PreciseTime};
-/// # fn do_some_work() {}
-///
-/// let start = PreciseTime::now();
-///
-/// while start.to(PreciseTime::now()) < Duration::seconds(1) {
-///     do_some_work();
-/// }
-/// ```
-#[derive(Copy, Clone)]
-pub struct PreciseTime(u64);
-
-impl PreciseTime {
-    /// Returns a `PreciseTime` representing the current moment in time.
-    pub fn now() -> PreciseTime {
-        PreciseTime(precise_time_ns())
-    }
-
-    /// Returns a `Duration` representing the span of time from the value of
-    /// `self` to the value of `later`.
-    ///
-    /// # Notes
-    ///
-    /// If `later` represents a time before `self`, the result of this method
-    /// is unspecified.
-    ///
-    /// If `later` represents a time more than 293 years after `self`, the
-    /// result of this method is unspecified.
-    #[inline]
-    pub fn to(&self, later: PreciseTime) -> Duration {
-        // NB: even if later is less than self due to overflow, this will work
-        // since the subtraction will underflow properly as well.
-        //
-        // We could deal with the overflow when casting to an i64, but all that
-        // gets us is the ability to handle intervals of up to 584 years, which
-        // seems not very useful :)
-        Duration::nanoseconds((later.0 - self.0) as i64)
-    }
-}
-
-/// A structure representing a moment in time.
-///
-/// `SteadyTime`s are generated by a "steady" clock, that is, a clock which
-/// never experiences discontinuous jumps and for which time always flows at
-/// the same rate.
-///
-/// # Examples
-///
-/// Repeatedly call a function for 1 second:
-///
-/// ```rust
-/// # use time::{Duration, SteadyTime};
-/// # fn do_some_work() {}
-/// let start = SteadyTime::now();
-///
-/// while SteadyTime::now() - start < Duration::seconds(1) {
-///     do_some_work();
-/// }
-/// ```
-#[derive(Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Debug)]
-pub struct SteadyTime(sys::SteadyTime);
-
-impl SteadyTime {
-    /// Returns a `SteadyTime` representing the current moment in time.
-    pub fn now() -> SteadyTime {
-        SteadyTime(sys::SteadyTime::now())
-    }
-}
-
-impl fmt::Display for SteadyTime {
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        // TODO: needs a display customization
-        fmt::Debug::fmt(self, fmt)
-    }
-}
-
-impl Sub for SteadyTime {
-    type Output = Duration;
-
-    fn sub(self, other: SteadyTime) -> Duration {
-        self.0 - other.0
-    }
-}
-
-impl Sub<Duration> for SteadyTime {
-    type Output = SteadyTime;
-
-    fn sub(self, other: Duration) -> SteadyTime {
-        SteadyTime(self.0 - other)
-    }
-}
-
-impl Add<Duration> for SteadyTime {
-    type Output = SteadyTime;
-
-    fn add(self, other: Duration) -> SteadyTime {
-        SteadyTime(self.0 + other)
-    }
-}
-
-#[cfg(not(windows))]
-pub fn tzset() {
-    extern { fn tzset(); }
-    unsafe { tzset() }
-}
-
-
-#[cfg(windows)]
-pub fn tzset() {}
-
-/// Holds a calendar date and time broken down into its components (year, month,
-/// day, and so on), also called a broken-down time value.
-// FIXME: use c_int instead of i32?
-#[repr(C)]
-#[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)]
-#[cfg_attr(feature = "rustc-serialize", derive(RustcEncodable, RustcDecodable))]
-pub struct Tm {
-    /// Seconds after the minute - [0, 60]
-    pub tm_sec: i32,
-
-    /// Minutes after the hour - [0, 59]
-    pub tm_min: i32,
-
-    /// Hours after midnight - [0, 23]
-    pub tm_hour: i32,
-
-    /// Day of the month - [1, 31]
-    pub tm_mday: i32,
-
-    /// Months since January - [0, 11]
-    pub tm_mon: i32,
-
-    /// Years since 1900
-    pub tm_year: i32,
-
-    /// Days since Sunday - [0, 6]. 0 = Sunday, 1 = Monday, ..., 6 = Saturday.
-    pub tm_wday: i32,
-
-    /// Days since January 1 - [0, 365]
-    pub tm_yday: i32,
-
-    /// Daylight Saving Time flag.
-    ///
-    /// This value is positive if Daylight Saving Time is in effect, zero if
-    /// Daylight Saving Time is not in effect, and negative if this information
-    /// is not available.
-    pub tm_isdst: i32,
-
-    /// Identifies the time zone that was used to compute this broken-down time
-    /// value, including any adjustment for Daylight Saving Time. This is the
-    /// number of seconds east of UTC. For example, for U.S. Pacific Daylight
-    /// Time, the value is -7*60*60 = -25200.
-    pub tm_utcoff: i32,
-
-    /// Nanoseconds after the second - [0, 10<sup>9</sup> - 1]
-    pub tm_nsec: i32,
-}
-
-impl Add<Duration> for Tm {
-    type Output = Tm;
-
-    /// The resulting Tm is in UTC.
-    // FIXME:  The resulting Tm should have the same timezone as `self`;
-    // however, we need a function such as `at_tm(clock: Timespec, offset: i32)`
-    // for this.
-    fn add(self, other: Duration) -> Tm {
-        at_utc(self.to_timespec() + other)
-    }
-}
-
-impl Sub<Duration> for Tm {
-    type Output = Tm;
-
-    /// The resulting Tm is in UTC.
-    // FIXME:  The resulting Tm should have the same timezone as `self`;
-    // however, we need a function such as `at_tm(clock: Timespec, offset: i32)`
-    // for this.
-    fn sub(self, other: Duration) -> Tm {
-        at_utc(self.to_timespec() - other)
-    }
-}
-
-impl Sub<Tm> for Tm {
-    type Output = Duration;
-
-    fn sub(self, other: Tm) -> Duration {
-        self.to_timespec() - other.to_timespec()
-    }
-}
-
-impl PartialOrd for Tm {
-    fn partial_cmp(&self, other: &Tm) -> Option<Ordering> {
-        self.to_timespec().partial_cmp(&other.to_timespec())
-    }
-}
-
-impl Ord for Tm {
-    fn cmp(&self, other: &Tm) -> Ordering {
-        self.to_timespec().cmp(&other.to_timespec())
-    }
-}
-
-pub fn empty_tm() -> Tm {
-    Tm {
-        tm_sec: 0,
-        tm_min: 0,
-        tm_hour: 0,
-        tm_mday: 0,
-        tm_mon: 0,
-        tm_year: 0,
-        tm_wday: 0,
-        tm_yday: 0,
-        tm_isdst: 0,
-        tm_utcoff: 0,
-        tm_nsec: 0,
-    }
-}
-
-/// Returns the specified time in UTC
-pub fn at_utc(clock: Timespec) -> Tm {
-    let Timespec { sec, nsec } = clock;
-    let mut tm = empty_tm();
-    sys::time_to_utc_tm(sec, &mut tm);
-    tm.tm_nsec = nsec;
-    tm
-}
-
-/// Returns the current time in UTC
-pub fn now_utc() -> Tm {
-    at_utc(get_time())
-}
-
-/// Returns the specified time in the local timezone
-pub fn at(clock: Timespec) -> Tm {
-    let Timespec { sec, nsec } = clock;
-    let mut tm = empty_tm();
-    sys::time_to_local_tm(sec, &mut tm);
-    tm.tm_nsec = nsec;
-    tm
-}
-
-/// Returns the current time in the local timezone
-pub fn now() -> Tm {
-    at(get_time())
-}
-
-impl Tm {
-    /// Convert time to the seconds from January 1, 1970
-    pub fn to_timespec(&self) -> Timespec {
-        let sec = match self.tm_utcoff {
-            0 => sys::utc_tm_to_time(self),
-            _ => sys::local_tm_to_time(self)
-        };
-
-        Timespec::new(sec, self.tm_nsec)
-    }
-
-    /// Convert time to the local timezone
-    pub fn to_local(&self) -> Tm {
-        at(self.to_timespec())
-    }
-
-    /// Convert time to the UTC
-    pub fn to_utc(&self) -> Tm {
-        match self.tm_utcoff {
-            0 => *self,
-            _ => at_utc(self.to_timespec())
-        }
-    }
-
-    /**
-     * Returns a TmFmt that outputs according to the `asctime` format in ISO
-     * C, in the local timezone.
-     *
-     * Example: "Thu Jan  1 00:00:00 1970"
-     */
-    pub fn ctime(&self) -> TmFmt {
-        TmFmt {
-            tm: self,
-            format: Fmt::Ctime,
-        }
-    }
-
-    /**
-     * Returns a TmFmt that outputs according to the `asctime` format in ISO
-     * C.
-     *
-     * Example: "Thu Jan  1 00:00:00 1970"
-     */
-    pub fn asctime(&self) -> TmFmt {
-        TmFmt {
-            tm: self,
-            format: Fmt::Str("%c"),
-        }
-    }
-
-    /// Formats the time according to the format string.
-    pub fn strftime<'a>(&'a self, format: &'a str) -> Result<TmFmt<'a>, ParseError> {
-        validate_format(TmFmt {
-            tm: self,
-            format: Fmt::Str(format),
-        })
-    }
-
-    /**
-     * Returns a TmFmt that outputs according to RFC 822.
-     *
-     * local: "Thu, 22 Mar 2012 07:53:18 PST"
-     * utc:   "Thu, 22 Mar 2012 14:53:18 GMT"
-     */
-    pub fn rfc822(&self) -> TmFmt {
-        let fmt = if self.tm_utcoff == 0 {
-            "%a, %d %b %Y %T GMT"
-        } else {
-            "%a, %d %b %Y %T %Z"
-        };
-        TmFmt {
-            tm: self,
-            format: Fmt::Str(fmt),
-        }
-    }
-
-    /**
-     * Returns a TmFmt that outputs according to RFC 822 with Zulu time.
-     *
-     * local: "Thu, 22 Mar 2012 07:53:18 -0700"
-     * utc:   "Thu, 22 Mar 2012 14:53:18 -0000"
-     */
-    pub fn rfc822z(&self) -> TmFmt {
-        TmFmt {
-            tm: self,
-            format: Fmt::Str("%a, %d %b %Y %T %z"),
-        }
-    }
-
-    /**
-     * Returns a TmFmt that outputs according to RFC 3339. RFC 3339 is
-     * compatible with ISO 8601.
-     *
-     * local: "2012-02-22T07:53:18-07:00"
-     * utc:   "2012-02-22T14:53:18Z"
-     */
-    pub fn rfc3339<'a>(&'a self) -> TmFmt {
-        TmFmt {
-            tm: self,
-            format: Fmt::Rfc3339,
-        }
-    }
-}
-
-#[derive(Copy, PartialEq, Debug, Clone)]
-pub enum ParseError {
-    InvalidSecond,
-    InvalidMinute,
-    InvalidHour,
-    InvalidDay,
-    InvalidMonth,
-    InvalidYear,
-    InvalidDayOfWeek,
-    InvalidDayOfMonth,
-    InvalidDayOfYear,
-    InvalidZoneOffset,
-    InvalidTime,
-    InvalidSecondsSinceEpoch,
-    MissingFormatConverter,
-    InvalidFormatSpecifier(char),
-    UnexpectedCharacter(char, char),
-}
-
-impl fmt::Display for ParseError {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        match *self {
-            InvalidFormatSpecifier(ch) => {
-                write!(f, "{}: %{}", self.description(), ch)
-            }
-            UnexpectedCharacter(a, b) => {
-                write!(f, "expected: `{}`, found: `{}`", a, b)
-            }
-            _ => write!(f, "{}", self.description())
-        }
-    }
-}
-
-impl Error for ParseError {
-    fn description(&self) -> &str {
-        match *self {
-            InvalidSecond => "Invalid second.",
-            InvalidMinute => "Invalid minute.",
-            InvalidHour => "Invalid hour.",
-            InvalidDay => "Invalid day.",
-            InvalidMonth => "Invalid month.",
-            InvalidYear => "Invalid year.",
-            InvalidDayOfWeek => "Invalid day of the week.",
-            InvalidDayOfMonth => "Invalid day of the month.",
-            InvalidDayOfYear => "Invalid day of the year.",
-            InvalidZoneOffset => "Invalid zone offset.",
-            InvalidTime => "Invalid time.",
-            InvalidSecondsSinceEpoch => "Invalid seconds since epoch.",
-            MissingFormatConverter => "missing format converter after `%`",
-            InvalidFormatSpecifier(..) => "invalid format specifier",
-            UnexpectedCharacter(..) => "Unexpected character.",
-        }
-    }
-}
-
-/// A wrapper around a `Tm` and format string that implements Display.
-#[derive(Debug)]
-pub struct TmFmt<'a> {
-    tm: &'a Tm,
-    format: Fmt<'a>
-}
-
-#[derive(Debug)]
-enum Fmt<'a> {
-    Str(&'a str),
-    Rfc3339,
-    Ctime,
-}
-
-fn validate_format<'a>(fmt: TmFmt<'a>) -> Result<TmFmt<'a>, ParseError> {
-
-    match (fmt.tm.tm_wday, fmt.tm.tm_mon) {
-        (0...6, 0...11) => (),
-        (_wday, 0...11) => return Err(InvalidDayOfWeek),
-        (0...6, _mon) => return Err(InvalidMonth),
-        _ => return Err(InvalidDay)
-    }
-    match fmt.format {
-        Fmt::Str(ref s) => {
-            let mut chars = s.chars();
-            loop {
-                match chars.next() {
-                    Some('%') => {
-                        match chars.next() {
-                            Some('A') | Some('a') | Some('B') | Some('b') |
-                            Some('C') | Some('c') | Some('D') | Some('d') |
-                            Some('e') | Some('F') | Some('f') | Some('G') |
-                            Some('g') | Some('H') | Some('h') | Some('I') |
-                            Some('j') | Some('k') | Some('l') | Some('M') |
-                            Some('m') | Some('n') | Some('P') | Some('p') |
-                            Some('R') | Some('r') | Some('S') | Some('s') |
-                            Some('T') | Some('t') | Some('U') | Some('u') |
-                            Some('V') | Some('v') | Some('W') | Some('w') |
-                            Some('X') | Some('x') | Some('Y') | Some('y') |
-                            Some('Z') | Some('z') | Some('+') | Some('%') => (),
-
-                            Some(c) => return Err(InvalidFormatSpecifier(c)),
-                            None => return Err(MissingFormatConverter),
-                        }
-                    },
-                    None => break,
-                    _ => ()
-                }
-            }
-        },
-        _ => ()
-    }
-    Ok(fmt)
-}
-
-/// Formats the time according to the format string.
-pub fn strftime(format: &str, tm: &Tm) -> Result<String, ParseError> {
-    tm.strftime(format).map(|fmt| fmt.to_string())
-}
-
-#[cfg(test)]
-mod tests {
-    use super::{Timespec, get_time, precise_time_ns, precise_time_s,
-                at_utc, at, strptime, PreciseTime, SteadyTime, ParseError, Duration};
-    use super::ParseError::{InvalidTime, InvalidYear, MissingFormatConverter,
-                            InvalidFormatSpecifier};
-
-    use std::sync::{Once, ONCE_INIT, Mutex, MutexGuard, LockResult};
-    use std::mem;
-
-    struct TzReset {
-        _tzreset: ::sys::TzReset,
-        _lock: LockResult<MutexGuard<'static, ()>>,
-    }
-
-    fn set_time_zone_la_or_london(london: bool) -> TzReset {
-        // Lock manages current timezone because some tests require LA some
-        // London
-        static mut LOCK: *mut Mutex<()> = 0 as *mut _;
-        static INIT: Once = ONCE_INIT;
-
-        unsafe {
-            INIT.call_once(|| {
-                LOCK = mem::transmute(Box::new(Mutex::new(())));
-            });
-
-            let timezone_lock = (*LOCK).lock();
-            let reset_func = if london {
-                ::sys::set_london_with_dst_time_zone()
-            } else {
-                ::sys::set_los_angeles_time_zone()
-            };
-            TzReset {
-                _lock: timezone_lock,
-                _tzreset: reset_func,
-            }
-        }
-    }
-
-    fn set_time_zone() -> TzReset {
-        set_time_zone_la_or_london(false)
-    }
-
-    fn set_time_zone_london_dst() -> TzReset {
-        set_time_zone_la_or_london(true)
-    }
-
-    #[test]
-    fn test_get_time() {
-        static SOME_RECENT_DATE: i64 = 1325376000i64; // 2012-01-01T00:00:00Z
-        static SOME_FUTURE_DATE: i64 = 1577836800i64; // 2020-01-01T00:00:00Z
-
-        let tv1 = get_time();
-        debug!("tv1={} sec + {} nsec", tv1.sec, tv1.nsec);
-
-        assert!(tv1.sec > SOME_RECENT_DATE);
-        assert!(tv1.nsec < 1000000000i32);
-
-        let tv2 = get_time();
-        debug!("tv2={} sec + {} nsec", tv2.sec, tv2.nsec);
-
-        assert!(tv2.sec >= tv1.sec);
-        assert!(tv2.sec < SOME_FUTURE_DATE);
-        assert!(tv2.nsec < 1000000000i32);
-        if tv2.sec == tv1.sec {
-            assert!(tv2.nsec >= tv1.nsec);
-        }
-    }
-
-    #[test]
-    fn test_precise_time() {
-        let s0 = precise_time_s();
-        debug!("s0={} sec", s0);
-        assert!(s0 > 0.);
-
-        let ns0 = precise_time_ns();
-        let ns1 = precise_time_ns();
-        debug!("ns0={} ns", ns0);
-        debug!("ns1={} ns", ns1);
-        assert!(ns1 >= ns0);
-
-        let ns2 = precise_time_ns();
-        debug!("ns2={} ns", ns2);
-        assert!(ns2 >= ns1);
-    }
-
-    #[test]
-    fn test_precise_time_to() {
-        let t0 = PreciseTime(1000);
-        let t1 = PreciseTime(1023);
-        assert_eq!(Duration::nanoseconds(23), t0.to(t1));
-    }
-
-    #[test]
-    fn test_at_utc() {
-        let _reset = set_time_zone();
-
-        let time = Timespec::new(1234567890, 54321);
-        let utc = at_utc(time);
-
-        assert_eq!(utc.tm_sec, 30);
-        assert_eq!(utc.tm_min, 31);
-        assert_eq!(utc.tm_hour, 23);
-        assert_eq!(utc.tm_mday, 13);
-        assert_eq!(utc.tm_mon, 1);
-        assert_eq!(utc.tm_year, 109);
-        assert_eq!(utc.tm_wday, 5);
-        assert_eq!(utc.tm_yday, 43);
-        assert_eq!(utc.tm_isdst, 0);
-        assert_eq!(utc.tm_utcoff, 0);
-        assert_eq!(utc.tm_nsec, 54321);
-    }
-
-    #[test]
-    fn test_at() {
-        let _reset = set_time_zone();
-
-        let time = Timespec::new(1234567890, 54321);
-        let local = at(time);
-
-        debug!("time_at: {:?}", local);
-
-        assert_eq!(local.tm_sec, 30);
-        assert_eq!(local.tm_min, 31);
-        assert_eq!(local.tm_hour, 15);
-        assert_eq!(local.tm_mday, 13);
-        assert_eq!(local.tm_mon, 1);
-        assert_eq!(local.tm_year, 109);
-        assert_eq!(local.tm_wday, 5);
-        assert_eq!(local.tm_yday, 43);
-        assert_eq!(local.tm_isdst, 0);
-        assert_eq!(local.tm_utcoff, -28800);
-        assert_eq!(local.tm_nsec, 54321);
-    }
-
-    #[test]
-    fn test_to_timespec() {
-        let _reset = set_time_zone();
-
-        let time = Timespec::new(1234567890, 54321);
-        let utc = at_utc(time);
-
-        assert_eq!(utc.to_timespec(), time);
-        assert_eq!(utc.to_local().to_timespec(), time);
-    }
-
-    #[test]
-    fn test_conversions() {
-        let _reset = set_time_zone();
-
-        let time = Timespec::new(1234567890, 54321);
-        let utc = at_utc(time);
-        let local = at(time);
-
-        assert!(local.to_local() == local);
-        assert!(local.to_utc() == utc);
-        assert!(local.to_utc().to_local() == local);
-        assert!(utc.to_utc() == utc);
-        assert!(utc.to_local() == local);
-        assert!(utc.to_local().to_utc() == utc);
-    }
-
-    #[test]
-    fn test_strptime() {
-        let _reset = set_time_zone();
-
-        match strptime("", "") {
-            Ok(ref tm) => {
-                assert!(tm.tm_sec == 0);
-                assert!(tm.tm_min == 0);
-                assert!(tm.tm_hour == 0);
-                assert!(tm.tm_mday == 0);
-                assert!(tm.tm_mon == 0);
-                assert!(tm.tm_year == 0);
-                assert!(tm.tm_wday == 0);
-                assert!(tm.tm_isdst == 0);
-                assert!(tm.tm_utcoff == 0);
-                assert!(tm.tm_nsec == 0);
-            }
-            Err(_) => ()
-        }
-
-        let format = "%a %b %e %T.%f %Y";
-        assert_eq!(strptime("", format), Err(ParseError::InvalidDay));
-        assert_eq!(strptime("Fri Feb 13 15:31:30", format),
-                   Err(InvalidTime));
-
-        match strptime("Fri Feb 13 15:31:30.01234 2009", format) {
-            Err(e) => panic!("{}", e),
-            Ok(ref tm) => {
-                assert_eq!(tm.tm_sec, 30);
-                assert_eq!(tm.tm_min, 31);
-                assert_eq!(tm.tm_hour, 15);
-                assert_eq!(tm.tm_mday, 13);
-                assert_eq!(tm.tm_mon, 1);
-                assert_eq!(tm.tm_year, 109);
-                assert_eq!(tm.tm_wday, 5);
-                assert_eq!(tm.tm_yday, 0);
-                assert_eq!(tm.tm_isdst, 0);
-                assert_eq!(tm.tm_utcoff, 0);
-                assert_eq!(tm.tm_nsec, 12340000);
-            }
-        }
-
-        fn test(s: &str, format: &str) -> bool {
-            match strptime(s, format) {
-              Ok(tm) => {
-                tm.strftime(format).unwrap().to_string() == s.to_string()
-              },
-              Err(e) => panic!("{:?},  s={:?}, format={:?}", e, s, format)
-            }
-        }
-
-        fn test_oneway(s : &str, format : &str) -> bool {
-            match strptime(s, format) {
-              Ok(_) => {
-                // oneway tests are used when reformatting the parsed Tm
-                // back into a string can generate a different string
-                // from the original (i.e. leading zeroes)
-                true
-              },
-              Err(e) => panic!("{:?},  s={:?}, format={:?}", e, s, format)
-            }
-        }
-
-        let days = [
-            "Sunday".to_string(),
-            "Monday".to_string(),
-            "Tuesday".to_string(),
-            "Wednesday".to_string(),
-            "Thursday".to_string(),
-            "Friday".to_string(),
-            "Saturday".to_string()
-        ];
-        for day in days.iter() {
-            assert!(test(&day, "%A"));
-        }
-
-        let days = [
-            "Sun".to_string(),
-            "Mon".to_string(),
-            "Tue".to_string(),
-            "Wed".to_string(),
-            "Thu".to_string(),
-            "Fri".to_string(),
-            "Sat".to_string()
-        ];
-        for day in days.iter() {
-            assert!(test(&day, "%a"));
-        }
-
-        let months = [
-            "January".to_string(),
-            "February".to_string(),
-            "March".to_string(),
-            "April".to_string(),
-            "May".to_string(),
-            "June".to_string(),
-            "July".to_string(),
-            "August".to_string(),
-            "September".to_string(),
-            "October".to_string(),
-            "November".to_string(),
-            "December".to_string()
-        ];
-        for day in months.iter() {
-            assert!(test(&day, "%B"));
-        }
-
-        let months = [
-            "Jan".to_string(),
-            "Feb".to_string(),
-            "Mar".to_string(),
-            "Apr".to_string(),
-            "May".to_string(),
-            "Jun".to_string(),
-            "Jul".to_string(),
-            "Aug".to_string(),
-            "Sep".to_string(),
-            "Oct".to_string(),
-            "Nov".to_string(),
-            "Dec".to_string()
-        ];
-        for day in months.iter() {
-            assert!(test(&day, "%b"));
-        }
-
-        assert!(test("19", "%C"));
-        assert!(test("Fri Feb  3 23:31:30 2009", "%c"));
-        assert!(test("Fri Feb 13 23:31:30 2009", "%c"));
-        assert!(test("02/13/09", "%D"));
-        assert!(test("03", "%d"));
-        assert!(test("13", "%d"));
-        assert!(test(" 3", "%e"));
-        assert!(test("13", "%e"));
-        assert!(test("2009-02-13", "%F"));
-        assert!(test("03", "%H"));
-        assert!(test("13", "%H"));
-        assert!(test("03", "%I")); // FIXME (#2350): flesh out
-        assert!(test("11", "%I")); // FIXME (#2350): flesh out
-        assert!(test("044", "%j"));
-        assert!(test(" 3", "%k"));
-        assert!(test("13", "%k"));
-        assert!(test(" 1", "%l"));
-        assert!(test("11", "%l"));
-        assert!(test("03", "%M"));
-        assert!(test("13", "%M"));
-        assert!(test("\n", "%n"));
-        assert!(test("am", "%P"));
-        assert!(test("pm", "%P"));
-        assert!(test("AM", "%p"));
-        assert!(test("PM", "%p"));
-        assert!(test("23:31", "%R"));
-        assert!(test("11:31:30 AM", "%r"));
-        assert!(test("11:31:30 PM", "%r"));
-        assert!(test("03", "%S"));
-        assert!(test("13", "%S"));
-        assert!(test("15:31:30", "%T"));
-        assert!(test("\t", "%t"));
-        assert!(test("1", "%u"));
-        assert!(test("7", "%u"));
-        assert!(test("13-Feb-2009", "%v"));
-        assert!(test("0", "%w"));
-        assert!(test("6", "%w"));
-        assert!(test("2009", "%Y"));
-        assert!(test("09", "%y"));
-
-        assert!(test_oneway("3",  "%d"));
-        assert!(test_oneway("3",  "%H"));
-        assert!(test_oneway("3",  "%e"));
-        assert!(test_oneway("3",  "%M"));
-        assert!(test_oneway("3",  "%S"));
-
-        assert!(strptime("-0000", "%z").unwrap().tm_utcoff == 0);
-        assert!(strptime("-00:00", "%z").unwrap().tm_utcoff == 0);
-        assert!(strptime("Z", "%z").unwrap().tm_utcoff == 0);
-        assert_eq!(-28800, strptime("-0800", "%z").unwrap().tm_utcoff);
-        assert_eq!(-28800, strptime("-08:00", "%z").unwrap().tm_utcoff);
-        assert_eq!(28800, strptime("+0800", "%z").unwrap().tm_utcoff);
-        assert_eq!(28800, strptime("+08:00", "%z").unwrap().tm_utcoff);
-        assert_eq!(5400, strptime("+0130", "%z").unwrap().tm_utcoff);
-        assert_eq!(5400, strptime("+01:30", "%z").unwrap().tm_utcoff);
-        assert!(test("%", "%%"));
-
-        // Test for #7256
-        assert_eq!(strptime("360", "%Y-%m-%d"), Err(InvalidYear));
-
-        // Test for epoch seconds parsing
-        {
-            assert!(test("1428035610", "%s"));
-            let tm = strptime("1428035610", "%s").unwrap();
-            assert_eq!(tm.tm_utcoff, 0);
-            assert_eq!(tm.tm_isdst, 0);
-            assert_eq!(tm.tm_yday, 92);
-            assert_eq!(tm.tm_wday, 5);
-            assert_eq!(tm.tm_year, 115);
-            assert_eq!(tm.tm_mon, 3);
-            assert_eq!(tm.tm_mday, 3);
-            assert_eq!(tm.tm_hour, 4);
-        }
-    }
-
-    #[test]
-    fn test_asctime() {
-        let _reset = set_time_zone();
-
-        let time = Timespec::new(1234567890, 54321);
-        let utc   = at_utc(time);
-        let local = at(time);
-
-        debug!("test_ctime: {} {}", utc.asctime(), local.asctime());
-
-        assert_eq!(utc.asctime().to_string(), "Fri Feb 13 23:31:30 2009".to_string());
-        assert_eq!(local.asctime().to_string(), "Fri Feb 13 15:31:30 2009".to_string());
-    }
-
-    #[test]
-    fn test_ctime() {
-        let _reset = set_time_zone();
-
-        let time = Timespec::new(1234567890, 54321);
-        let utc   = at_utc(time);
-        let local = at(time);
-
-        debug!("test_ctime: {} {}", utc.ctime(), local.ctime());
-
-        assert_eq!(utc.ctime().to_string(), "Fri Feb 13 15:31:30 2009".to_string());
-        assert_eq!(local.ctime().to_string(), "Fri Feb 13 15:31:30 2009".to_string());
-    }
-
-    #[test]
-    fn test_strftime() {
-        let _reset = set_time_zone();
-
-        let time = Timespec::new(1234567890, 54321);
-        let utc = at_utc(time);
-        let local = at(time);
-
-        assert_eq!(local.strftime("").unwrap().to_string(), "".to_string());
-        assert_eq!(local.strftime("%A").unwrap().to_string(), "Friday".to_string());
-        assert_eq!(local.strftime("%a").unwrap().to_string(), "Fri".to_string());
-        assert_eq!(local.strftime("%B").unwrap().to_string(), "February".to_string());
-        assert_eq!(local.strftime("%b").unwrap().to_string(), "Feb".to_string());
-        assert_eq!(local.strftime("%C").unwrap().to_string(), "20".to_string());
-        assert_eq!(local.strftime("%c").unwrap().to_string(),
-                   "Fri Feb 13 15:31:30 2009".to_string());
-        assert_eq!(local.strftime("%D").unwrap().to_string(), "02/13/09".to_string());
-        assert_eq!(local.strftime("%d").unwrap().to_string(), "13".to_string());
-        assert_eq!(local.strftime("%e").unwrap().to_string(), "13".to_string());
-        assert_eq!(local.strftime("%F").unwrap().to_string(), "2009-02-13".to_string());
-        assert_eq!(local.strftime("%f").unwrap().to_string(), "000054321".to_string());
-        assert_eq!(local.strftime("%G").unwrap().to_string(), "2009".to_string());
-        assert_eq!(local.strftime("%g").unwrap().to_string(), "09".to_string());
-        assert_eq!(local.strftime("%H").unwrap().to_string(), "15".to_string());
-        assert_eq!(local.strftime("%h").unwrap().to_string(), "Feb".to_string());
-        assert_eq!(local.strftime("%I").unwrap().to_string(), "03".to_string());
-        assert_eq!(local.strftime("%j").unwrap().to_string(), "044".to_string());
-        assert_eq!(local.strftime("%k").unwrap().to_string(), "15".to_string());
-        assert_eq!(local.strftime("%l").unwrap().to_string(), " 3".to_string());
-        assert_eq!(local.strftime("%M").unwrap().to_string(), "31".to_string());
-        assert_eq!(local.strftime("%m").unwrap().to_string(), "02".to_string());
-        assert_eq!(local.strftime("%n").unwrap().to_string(), "\n".to_string());
-        assert_eq!(local.strftime("%P").unwrap().to_string(), "pm".to_string());
-        assert_eq!(local.strftime("%p").unwrap().to_string(), "PM".to_string());
-        assert_eq!(local.strftime("%R").unwrap().to_string(), "15:31".to_string());
-        assert_eq!(local.strftime("%r").unwrap().to_string(), "03:31:30 PM".to_string());
-        assert_eq!(local.strftime("%S").unwrap().to_string(), "30".to_string());
-        assert_eq!(local.strftime("%s").unwrap().to_string(), "1234567890".to_string());
-        assert_eq!(local.strftime("%T").unwrap().to_string(), "15:31:30".to_string());
-        assert_eq!(local.strftime("%t").unwrap().to_string(), "\t".to_string());
-        assert_eq!(local.strftime("%U").unwrap().to_string(), "06".to_string());
-        assert_eq!(local.strftime("%u").unwrap().to_string(), "5".to_string());
-        assert_eq!(local.strftime("%V").unwrap().to_string(), "07".to_string());
-        assert_eq!(local.strftime("%v").unwrap().to_string(), "13-Feb-2009".to_string());
-        assert_eq!(local.strftime("%W").unwrap().to_string(), "06".to_string());
-        assert_eq!(local.strftime("%w").unwrap().to_string(), "5".to_string());
-        // FIXME (#2350): support locale
-        assert_eq!(local.strftime("%X").unwrap().to_string(), "15:31:30".to_string());
-        // FIXME (#2350): support locale
-        assert_eq!(local.strftime("%x").unwrap().to_string(), "02/13/09".to_string());
-        assert_eq!(local.strftime("%Y").unwrap().to_string(), "2009".to_string());
-        assert_eq!(local.strftime("%y").unwrap().to_string(), "09".to_string());
-        // FIXME (#2350): support locale
-        assert_eq!(local.strftime("%Z").unwrap().to_string(), "".to_string());
-        assert_eq!(local.strftime("%z").unwrap().to_string(), "-0800".to_string());
-        assert_eq!(local.strftime("%+").unwrap().to_string(),
-                   "2009-02-13T15:31:30-08:00".to_string());
-        assert_eq!(local.strftime("%%").unwrap().to_string(), "%".to_string());
-
-         let invalid_specifiers = ["%E", "%J", "%K", "%L", "%N", "%O", "%o", "%Q", "%q"];
-        for &sp in invalid_specifiers.iter() {
-            assert_eq!(local.strftime(sp).unwrap_err(),
-                       InvalidFormatSpecifier(sp[1..].chars().next().unwrap()));
-        }
-        assert_eq!(local.strftime("%").unwrap_err(), MissingFormatConverter);
-        assert_eq!(local.strftime("%A %").unwrap_err(), MissingFormatConverter);
-
-        assert_eq!(local.asctime().to_string(), "Fri Feb 13 15:31:30 2009".to_string());
-        assert_eq!(local.ctime().to_string(), "Fri Feb 13 15:31:30 2009".to_string());
-        assert_eq!(local.rfc822z().to_string(), "Fri, 13 Feb 2009 15:31:30 -0800".to_string());
-        assert_eq!(local.rfc3339().to_string(), "2009-02-13T15:31:30-08:00".to_string());
-
-        assert_eq!(utc.asctime().to_string(), "Fri Feb 13 23:31:30 2009".to_string());
-        assert_eq!(utc.ctime().to_string(), "Fri Feb 13 15:31:30 2009".to_string());
-        assert_eq!(utc.rfc822().to_string(), "Fri, 13 Feb 2009 23:31:30 GMT".to_string());
-        assert_eq!(utc.rfc822z().to_string(), "Fri, 13 Feb 2009 23:31:30 -0000".to_string());
-        assert_eq!(utc.rfc3339().to_string(), "2009-02-13T23:31:30Z".to_string());
-    }
-
-    #[test]
-    fn test_timespec_eq_ord() {
-        let a = &Timespec::new(-2, 1);
-        let b = &Timespec::new(-1, 2);
-        let c = &Timespec::new(1, 2);
-        let d = &Timespec::new(2, 1);
-        let e = &Timespec::new(2, 1);
-
-        assert!(d.eq(e));
-        assert!(c.ne(e));
-
-        assert!(a.lt(b));
-        assert!(b.lt(c));
-        assert!(c.lt(d));
-
-        assert!(a.le(b));
-        assert!(b.le(c));
-        assert!(c.le(d));
-        assert!(d.le(e));
-        assert!(e.le(d));
-
-        assert!(b.ge(a));
-        assert!(c.ge(b));
-        assert!(d.ge(c));
-        assert!(e.ge(d));
-        assert!(d.ge(e));
-
-        assert!(b.gt(a));
-        assert!(c.gt(b));
-        assert!(d.gt(c));
-    }
-
-    #[test]
-    #[allow(deprecated)]
-    fn test_timespec_hash() {
-        use std::hash::{Hash, Hasher};
-
-        let c = &Timespec::new(3, 2);
-        let d = &Timespec::new(2, 1);
-        let e = &Timespec::new(2, 1);
-
-        let mut hasher = ::std::hash::SipHasher::new();
-
-        let d_hash:u64 = {
-          d.hash(&mut hasher);
-          hasher.finish()
-        };
-
-        hasher = ::std::hash::SipHasher::new();
-
-        let e_hash:u64 = {
-          e.hash(&mut hasher);
-          hasher.finish()
-        };
-
-        hasher = ::std::hash::SipHasher::new();
-
-        let c_hash:u64 = {
-          c.hash(&mut hasher);
-          hasher.finish()
-        };
-
-        assert_eq!(d_hash, e_hash);
-        assert!(c_hash != e_hash);
-    }
-
-    #[test]
-    fn test_timespec_add() {
-        let a = Timespec::new(1, 2);
-        let b = Duration::seconds(2) + Duration::nanoseconds(3);
-        let c = a + b;
-        assert_eq!(c.sec, 3);
-        assert_eq!(c.nsec, 5);
-
-        let p = Timespec::new(1, super::NSEC_PER_SEC - 2);
-        let q = Duration::seconds(2) + Duration::nanoseconds(2);
-        let r = p + q;
-        assert_eq!(r.sec, 4);
-        assert_eq!(r.nsec, 0);
-
-        let u = Timespec::new(1, super::NSEC_PER_SEC - 2);
-        let v = Duration::seconds(2) + Duration::nanoseconds(3);
-        let w = u + v;
-        assert_eq!(w.sec, 4);
-        assert_eq!(w.nsec, 1);
-
-        let k = Timespec::new(1, 0);
-        let l = Duration::nanoseconds(-1);
-        let m = k + l;
-        assert_eq!(m.sec, 0);
-        assert_eq!(m.nsec, 999_999_999);
-    }
-
-    #[test]
-    fn test_timespec_sub() {
-        let a = Timespec::new(2, 3);
-        let b = Timespec::new(1, 2);
-        let c = a - b;
-        assert_eq!(c.num_nanoseconds(), Some(super::NSEC_PER_SEC as i64 + 1));
-
-        let p = Timespec::new(2, 0);
-        let q = Timespec::new(1, 2);
-        let r = p - q;
-        assert_eq!(r.num_nanoseconds(), Some(super::NSEC_PER_SEC as i64 - 2));
-
-        let u = Timespec::new(1, 2);
-        let v = Timespec::new(2, 3);
-        let w = u - v;
-        assert_eq!(w.num_nanoseconds(), Some(-super::NSEC_PER_SEC as i64 - 1));
-    }
-
-    #[test]
-    fn test_time_sub() {
-        let a = ::now();
-        let b = at(a.to_timespec() + Duration::seconds(5));
-        let c = b - a;
-        assert_eq!(c.num_nanoseconds(), Some(super::NSEC_PER_SEC as i64 * 5));
-    }
-
-    #[test]
-    fn test_steadytime_sub() {
-        let a = SteadyTime::now();
-        let b = a + Duration::seconds(1);
-        assert_eq!(b - a, Duration::seconds(1));
-        assert_eq!(a - b, Duration::seconds(-1));
-    }
-
-    #[test]
-    fn test_date_before_1970() {
-        let early = strptime("1901-01-06", "%F").unwrap();
-        let late = strptime("2000-01-01", "%F").unwrap();
-        assert!(early < late);
-    }
-
-    #[test]
-    fn test_dst() {
-        let _reset = set_time_zone_london_dst();
-        let utc_in_feb = strptime("2015-02-01Z", "%F%z").unwrap();
-        let utc_in_jun = strptime("2015-06-01Z", "%F%z").unwrap();
-        let utc_in_nov = strptime("2015-11-01Z", "%F%z").unwrap();
-        let local_in_feb = utc_in_feb.to_local();
-        let local_in_jun = utc_in_jun.to_local();
-        let local_in_nov = utc_in_nov.to_local();
-
-        assert_eq!(local_in_feb.tm_mon, 1);
-        assert_eq!(local_in_feb.tm_hour, 0);
-        assert_eq!(local_in_feb.tm_utcoff, 0);
-        assert_eq!(local_in_feb.tm_isdst, 0);
-
-        assert_eq!(local_in_jun.tm_mon, 5);
-        assert_eq!(local_in_jun.tm_hour, 1);
-        assert_eq!(local_in_jun.tm_utcoff, 3600);
-        assert_eq!(local_in_jun.tm_isdst, 1);
-
-        assert_eq!(local_in_nov.tm_mon, 10);
-        assert_eq!(local_in_nov.tm_hour, 0);
-        assert_eq!(local_in_nov.tm_utcoff, 0);
-        assert_eq!(local_in_nov.tm_isdst, 0)
-    }
-}
deleted file mode 100644
--- a/third_party/rust/time-0.1.36/src/parse.rs
+++ /dev/null
@@ -1,394 +0,0 @@
-use super::{Timespec, Tm, at_utc, ParseError, NSEC_PER_SEC};
-
-/// Parses the time from the string according to the format string.
-pub fn strptime(mut s: &str, format: &str) -> Result<Tm, ParseError> {
-    let mut tm = Tm {
-        tm_sec: 0,
-        tm_min: 0,
-        tm_hour: 0,
-        tm_mday: 0,
-        tm_mon: 0,
-        tm_year: 0,
-        tm_wday: 0,
-        tm_yday: 0,
-        tm_isdst: 0,
-        tm_utcoff: 0,
-        tm_nsec: 0,
-    };
-    let mut chars = format.chars();
-
-    while let Some(ch) = chars.next() {
-        if ch == '%' {
-            if let Some(ch) = chars.next() {
-                try!(parse_type(&mut s, ch, &mut tm));
-            }
-        } else {
-            try!(parse_char(&mut s, ch));
-        }
-    }
-
-    Ok(tm)
-}
-
-fn parse_type(s: &mut &str, ch: char, tm: &mut Tm) -> Result<(), ParseError> {
-    match ch {
-        'A' => match match_strs(s, &[("Sunday", 0),
-                                     ("Monday", 1),
-                                     ("Tuesday", 2),
-                                     ("Wednesday", 3),
-                                     ("Thursday", 4),
-                                     ("Friday", 5),
-                                     ("Saturday", 6)]) {
-            Some(v) => { tm.tm_wday = v; Ok(()) }
-            None => Err(ParseError::InvalidDay)
-        },
-        'a' => match match_strs(s, &[("Sun", 0),
-                                     ("Mon", 1),
-                                     ("Tue", 2),
-                                     ("Wed", 3),
-                                     ("Thu", 4),
-                                     ("Fri", 5),
-                                     ("Sat", 6)]) {
-            Some(v) => { tm.tm_wday = v; Ok(()) }
-            None => Err(ParseError::InvalidDay)
-        },
-        'B' => match match_strs(s, &[("January", 0),
-                                     ("February", 1),
-                                     ("March", 2),
-                                     ("April", 3),
-                                     ("May", 4),
-                                     ("June", 5),
-                                     ("July", 6),
-                                     ("August", 7),
-                                     ("September", 8),
-                                     ("October", 9),
-                                     ("November", 10),
-                                     ("December", 11)]) {
-            Some(v) => { tm.tm_mon = v; Ok(()) }
-            None => Err(ParseError::InvalidMonth)
-        },
-        'b' | 'h' => match match_strs(s, &[("Jan", 0),
-                                           ("Feb", 1),
-                                           ("Mar", 2),
-                                           ("Apr", 3),
-                                           ("May", 4),
-                                           ("Jun", 5),
-                                           ("Jul", 6),
-                                           ("Aug", 7),
-                                           ("Sep", 8),
-                                           ("Oct", 9),
-                                           ("Nov", 10),
-                                           ("Dec", 11)]) {
-            Some(v) => { tm.tm_mon = v; Ok(()) }
-            None => Err(ParseError::InvalidMonth)
-        },
-        'C' => match match_digits_in_range(s, 1, 2, false, 0, 99) {
-            Some(v) => { tm.tm_year += (v * 100) - 1900; Ok(()) }
-            None => Err(ParseError::InvalidYear)
-        },
-        'c' => {
-            parse_type(s, 'a', tm)
-                .and_then(|()| parse_char(s, ' '))
-                .and_then(|()| parse_type(s, 'b', tm))
-                .and_then(|()| parse_char(s, ' '))
-                .and_then(|()| parse_type(s, 'e', tm))
-                .and_then(|()| parse_char(s, ' '))
-                .and_then(|()| parse_type(s, 'T', tm))
-                .and_then(|()| parse_char(s, ' '))
-                .and_then(|()| parse_type(s, 'Y', tm))
-        }
-        'D' | 'x' => {
-            parse_type(s, 'm', tm)
-                .and_then(|()| parse_char(s, '/'))
-                .and_then(|()| parse_type(s, 'd', tm))
-                .and_then(|()| parse_char(s, '/'))
-                .and_then(|()| parse_type(s, 'y', tm))
-        }
-        'd' => match match_digits_in_range(s, 1, 2, false, 1, 31) {
-            Some(v) => { tm.tm_mday = v; Ok(()) }
-            None => Err(ParseError::InvalidDayOfMonth)
-        },
-        'e' => match match_digits_in_range(s, 1, 2, true, 1, 31) {
-            Some(v) => { tm.tm_mday = v; Ok(()) }
-            None => Err(ParseError::InvalidDayOfMonth)
-        },
-        'f' => {
-            tm.tm_nsec = match_fractional_seconds(s);
-            Ok(())
-        }
-        'F' => {
-            parse_type(s, 'Y', tm)
-                .and_then(|()| parse_char(s, '-'))
-                .and_then(|()| parse_type(s, 'm', tm))
-                .and_then(|()| parse_char(s, '-'))
-                .and_then(|()| parse_type(s, 'd', tm))
-        }
-        'H' => {
-            match match_digits_in_range(s, 1, 2, false, 0, 23) {
-                Some(v) => { tm.tm_hour = v; Ok(()) }
-                None => Err(ParseError::InvalidHour)
-            }
-        }
-        'I' => {
-            match match_digits_in_range(s, 1, 2, false, 1, 12) {
-                Some(v) => { tm.tm_hour = if v == 12 { 0 } else { v }; Ok(()) }
-                None => Err(ParseError::InvalidHour)
-            }
-        }
-        'j' => {
-            match match_digits_in_range(s, 1, 3, false, 1, 366) {
-                Some(v) => { tm.tm_yday = v - 1; Ok(()) }
-                None => Err(ParseError::InvalidDayOfYear)
-            }
-        }
-        'k' => {
-            match match_digits_in_range(s, 1, 2, true, 0, 23) {
-                Some(v) => { tm.tm_hour = v; Ok(()) }
-                None => Err(ParseError::InvalidHour)
-            }
-        }
-        'l' => {
-            match match_digits_in_range(s, 1, 2, true, 1, 12) {
-                Some(v) => { tm.tm_hour = if v == 12 { 0 } else { v }; Ok(()) }
-                None => Err(ParseError::InvalidHour)
-            }
-        }
-        'M' => {
-            match match_digits_in_range(s, 1, 2, false, 0, 59) {
-                Some(v) => { tm.tm_min = v; Ok(()) }
-                None => Err(ParseError::InvalidMinute)
-            }
-        }
-        'm' => {
-            match match_digits_in_range(s, 1, 2, false, 1, 12) {
-                Some(v) => { tm.tm_mon = v - 1; Ok(()) }
-                None => Err(ParseError::InvalidMonth)
-            }
-        }
-        'n' => parse_char(s, '\n'),
-        'P' => match match_strs(s, &[("am", 0), ("pm", 12)]) {
-            Some(v) => { tm.tm_hour += v; Ok(()) }
-            None => Err(ParseError::InvalidHour)
-        },
-        'p' => match match_strs(s, &[("AM", 0), ("PM", 12)]) {
-            Some(v) => { tm.tm_hour += v; Ok(()) }
-            None => Err(ParseError::InvalidHour)
-        },
-        'R' => {
-            parse_type(s, 'H', tm)
-                .and_then(|()| parse_char(s, ':'))
-                .and_then(|()| parse_type(s, 'M', tm))
-        }
-        'r' => {
-            parse_type(s, 'I', tm)
-                .and_then(|()| parse_char(s, ':'))
-                .and_then(|()| parse_type(s, 'M', tm))
-                .and_then(|()| parse_char(s, ':'))
-                .and_then(|()| parse_type(s, 'S', tm))
-                .and_then(|()| parse_char(s, ' '))
-                .and_then(|()| parse_type(s, 'p', tm))
-        }
-        's' => {
-            match match_digits_i64(s, 1, 18, false) {
-                Some(v) => {
-                    *tm = at_utc(Timespec::new(v, 0));
-                    Ok(())
-                },
-                None => Err(ParseError::InvalidSecondsSinceEpoch)
-            }
-        }
-        'S' => {
-            match match_digits_in_range(s, 1, 2, false, 0, 60) {
-                Some(v) => { tm.tm_sec = v; Ok(()) }
-                None => Err(ParseError::InvalidSecond)
-            }
-        }
-        //'s' {}
-        'T' | 'X' => {
-            parse_type(s, 'H', tm)
-                .and_then(|()| parse_char(s, ':'))
-                .and_then(|()| parse_type(s, 'M', tm))
-                .and_then(|()| parse_char(s, ':'))
-                .and_then(|()| parse_type(s, 'S', tm))
-        }
-        't' => parse_char(s, '\t'),
-        'u' => {
-            match match_digits_in_range(s, 1, 1, false, 1, 7) {
-                Some(v) => { tm.tm_wday = if v == 7 { 0 } else { v }; Ok(()) }
-                None => Err(ParseError::InvalidDayOfWeek)
-            }
-        }
-        'v' => {
-            parse_type(s, 'e', tm)
-                .and_then(|()| parse_char(s, '-'))
-                .and_then(|()| parse_type(s, 'b', tm))
-                .and_then(|()| parse_char(s, '-'))
-                .and_then(|()| parse_type(s, 'Y', tm))
-        }
-        //'W' {}
-        'w' => {
-            match match_digits_in_range(s, 1, 1, false, 0, 6) {
-                Some(v) => { tm.tm_wday = v; Ok(()) }
-                None => Err(ParseError::InvalidDayOfWeek)
-            }
-        }
-        'Y' => {
-            match match_digits(s, 4, 4, false) {
-                Some(v) => { tm.tm_year = v - 1900; Ok(()) }
-                None => Err(ParseError::InvalidYear)
-            }
-        }
-        'y' => {
-            match match_digits_in_range(s, 1, 2, false, 0, 99) {
-                Some(v) => { tm.tm_year = v; Ok(()) }
-                None => Err(ParseError::InvalidYear)
-            }
-        }
-        'Z' => {
-            if match_str(s, "UTC") || match_str(s, "GMT") {
-                tm.tm_utcoff = 0;
-                Ok(())
-            } else {
-                // It's odd, but to maintain compatibility with c's
-                // strptime we ignore the timezone.
-                for (i, ch) in s.char_indices() {
-                    if ch == ' ' {
-                        *s = &s[i..];
-                        return Ok(())
-                    }
-                }
-                *s = "";
-                Ok(())
-            }
-        }
-        'z' => {
-            if parse_char(s, 'Z').is_ok() {
-                tm.tm_utcoff = 0;
-                Ok(())
-            } else {
-                let sign = if parse_char(s, '+').is_ok() {1}
-                           else if parse_char(s, '-').is_ok() {-1}
-                           else { return Err(ParseError::InvalidZoneOffset) };
-
-                let hours;
-                let minutes;
-
-                match match_digits(s, 2, 2, false) {
-                    Some(h) => hours = h,
-                    None => return Err(ParseError::InvalidZoneOffset)
-                }
-
-                // consume the colon if its present,
-                // just ignore it otherwise
-                let _ = parse_char(s, ':');
-
-                match match_digits(s, 2, 2, false) {
-                    Some(m) => minutes = m,
-                    None => return Err(ParseError::InvalidZoneOffset)
-                }
-
-                tm.tm_utcoff = sign * (hours * 60 * 60 + minutes * 60);
-                Ok(())
-            }
-        }
-        '%' => parse_char(s, '%'),
-        ch => Err(ParseError::InvalidFormatSpecifier(ch))
-    }
-}
-
-
-fn match_str(s: &mut &str, needle: &str) -> bool {
-    if s.starts_with(needle) {
-        *s = &s[needle.len()..];
-        true
-    } else {
-        false
-    }
-}
-
-fn match_strs(ss: &mut &str, strs: &[(&str, i32)]) -> Option<i32> {
-    for &(needle, value) in strs.iter() {
-        if match_str(ss, needle) {
-            return Some(value)
-        }
-    }
-    None
-}
-
-fn match_digits(ss: &mut &str, min_digits : usize, max_digits: usize, ws: bool) -> Option<i32> {
-    match match_digits_i64(ss, min_digits, max_digits, ws) {
-        Some(v) => Some(v as i32),
-        None => None
-    }
-}
-
-fn match_digits_i64(ss: &mut &str, min_digits : usize, max_digits: usize, ws: bool) -> Option<i64> {
-    let mut value : i64 = 0;
-    let mut n = 0;
-    if ws {
-        let s2 = ss.trim_left_matches(" ");
-        n = ss.len() - s2.len();
-        if n > max_digits { return None }
-    }
-    let chars = ss[n..].char_indices();
-    for (_, ch) in chars.take(max_digits - n) {
-        match ch {
-            '0' ... '9' => value = value * 10 + (ch as i64 - '0' as i64),
-            _ => break,
-        }
-        n += 1;
-    }
-
-    if n >= min_digits && n <= max_digits {
-        *ss = &ss[n..];
-        Some(value)
-    } else {
-        None
-    }
-}
-
-fn match_fractional_seconds(ss: &mut &str) -> i32 {
-    let mut value = 0;
-    let mut multiplier = NSEC_PER_SEC / 10;
-
-    let mut chars = ss.char_indices();
-    let orig = *ss;
-    for (i, ch) in &mut chars {
-        *ss = &orig[i..];
-        match ch {
-            '0' ... '9' => {
-                // This will drop digits after the nanoseconds place
-                let digit = ch as i32 - '0' as i32;
-                value += digit * multiplier;
-                multiplier /= 10;
-            }
-            _ => break
-        }
-    }
-
-    value
-}
-
-fn match_digits_in_range(ss: &mut &str,
-                         min_digits : usize, max_digits : usize,
-                         ws: bool, min: i32, max: i32) -> Option<i32> {
-    let before = *ss;
-    match match_digits(ss, min_digits, max_digits, ws) {
-        Some(val) if val >= min && val <= max => Some(val),
-        _ => { *ss = before; None }
-    }
-}
-
-fn parse_char(s: &mut &str, c: char) -> Result<(), ParseError> {
-    match s.char_indices().next() {
-        Some((i, c2)) => {
-            if c == c2 {
-                *s = &s[i + c2.len_utf8()..];
-                Ok(())
-            } else {
-                Err(ParseError::UnexpectedCharacter(c, c2))
-            }
-        }
-        None => Err(ParseError::InvalidTime),
-    }
-}
deleted file mode 100644
--- a/third_party/rust/time-0.1.36/src/sys.rs
+++ /dev/null
@@ -1,841 +0,0 @@
-#![allow(bad_style)]
-
-pub use self::inner::*;
-
-#[cfg(target_os = "redox")]
-mod inner {
-    use std::fmt;
-    use std::cmp::Ordering;
-    use std::ops::{Add, Sub};
-    use syscall;
-
-    use Duration;
-    use Tm;
-
-    fn time_to_tm(ts: i64, tm: &mut Tm) {
-        let leapyear = |year| -> bool {
-            year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)
-        };
-
-        static _ytab: [[i64; 12]; 2] = [
-            [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ],
-            [ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ]
-        ];
-
-        let mut year = 1970;
-
-        let dayclock = ts % 86400;
-        let mut dayno = ts / 86400;
-
-        tm.tm_sec = (dayclock % 60) as i32;
-        tm.tm_min = ((dayclock % 3600) / 60) as i32;
-        tm.tm_hour = (dayclock / 3600) as i32;
-        tm.tm_wday = ((dayno + 4) % 7) as i32;
-        loop {
-            let yearsize = if leapyear(year) {
-                366
-            } else {
-                365
-            };
-            if dayno >= yearsize {
-                    dayno -= yearsize;
-                    year += 1;
-            } else {
-                break;
-            }
-        }
-        tm.tm_year = (year - 1900) as i32;
-        tm.tm_yday = dayno as i32;
-        let mut mon = 0;
-        while dayno >= _ytab[if leapyear(year) { 1 } else { 0 }][mon] {
-                dayno -= _ytab[if leapyear(year) { 1 } else { 0 }][mon];
-                mon += 1;
-        }
-        tm.tm_mon = mon as i32;
-        tm.tm_mday = dayno as i32 + 1;
-        tm.tm_isdst = 0;
-    }
-
-    fn tm_to_time(tm: &Tm) -> i64 {
-        let mut y = tm.tm_year as i64 + 1900;
-        let mut m = tm.tm_mon as i64 + 1;
-        if m <= 2 {
-            y -= 1;
-            m += 12;
-        }
-        let d = tm.tm_mday as i64;
-        let h = tm.tm_hour as i64;
-        let mi = tm.tm_min as i64;
-        let s = tm.tm_sec as i64;
-        (365*y + y/4 - y/100 + y/400 + 3*(m+1)/5 + 30*m + d - 719561)
-            * 86400 + 3600 * h + 60 * mi + s
-    }
-
-    pub fn time_to_utc_tm(sec: i64, tm: &mut Tm) {
-        time_to_tm(sec, tm);
-    }
-
-    pub fn time_to_local_tm(sec: i64, tm: &mut Tm) {
-        // FIXME: Add timezone logic
-        time_to_tm(sec, tm);
-    }
-
-    pub fn utc_tm_to_time(tm: &Tm) -> i64 {
-        tm_to_time(tm)
-    }
-
-    pub fn local_tm_to_time(tm: &Tm) -> i64 {
-        // FIXME: Add timezone logic
-        tm_to_time(tm)
-    }
-
-    pub fn get_time() -> (i64, i32) {
-        let mut tv = syscall::TimeSpec { tv_sec: 0, tv_nsec: 0 };
-        syscall::clock_gettime(syscall::CLOCK_REALTIME, &mut tv).unwrap();
-        (tv.tv_sec as i64, tv.tv_nsec as i32)
-    }
-
-    pub fn get_precise_ns() -> u64 {
-        let mut ts = syscall::TimeSpec { tv_sec: 0, tv_nsec: 0 };
-        syscall::clock_gettime(syscall::CLOCK_MONOTONIC, &mut ts).unwrap();
-        (ts.tv_sec as u64) * 1000000000 + (ts.tv_nsec as u64)
-    }
-
-    #[derive(Copy)]
-    pub struct SteadyTime {
-        t: syscall::TimeSpec,
-    }
-
-    impl fmt::Debug for SteadyTime {
-        fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-            write!(fmt, "SteadyTime {{ tv_sec: {:?}, tv_nsec: {:?} }}",
-                   self.t.tv_sec, self.t.tv_nsec)
-        }
-    }
-
-    impl Clone for SteadyTime {
-        fn clone(&self) -> SteadyTime {
-            SteadyTime { t: self.t }
-        }
-    }
-
-    impl SteadyTime {
-        pub fn now() -> SteadyTime {
-            let mut t = SteadyTime {
-                t: syscall::TimeSpec {
-                    tv_sec: 0,
-                    tv_nsec: 0,
-                }
-            };
-            syscall::clock_gettime(syscall::CLOCK_MONOTONIC, &mut t.t).unwrap();
-            t
-        }
-    }
-
-    impl Sub for SteadyTime {
-        type Output = Duration;
-        fn sub(self, other: SteadyTime) -> Duration {
-            if self.t.tv_nsec >= other.t.tv_nsec {
-                Duration::seconds(self.t.tv_sec as i64 - other.t.tv_sec as i64) +
-                    Duration::nanoseconds(self.t.tv_nsec as i64 - other.t.tv_nsec as i64)
-            } else {
-                Duration::seconds(self.t.tv_sec as i64 - 1 - other.t.tv_sec as i64) +
-                    Duration::nanoseconds(self.t.tv_nsec as i64 + ::NSEC_PER_SEC as i64 -
-                                          other.t.tv_nsec as i64)
-            }
-        }
-    }
-
-    impl Sub<Duration> for SteadyTime {
-        type Output = SteadyTime;
-        fn sub(self, other: Duration) -> SteadyTime {
-            self + -other
-        }
-    }
-
-    impl Add<Duration> for SteadyTime {
-        type Output = SteadyTime;
-        fn add(mut self, other: Duration) -> SteadyTime {
-            let seconds = other.num_seconds();
-            let nanoseconds = other - Duration::seconds(seconds);
-            let nanoseconds = nanoseconds.num_nanoseconds().unwrap();
-            self.t.tv_sec += seconds;
-            self.t.tv_nsec += nanoseconds as i32;
-            if self.t.tv_nsec >= ::NSEC_PER_SEC {
-                self.t.tv_nsec -= ::NSEC_PER_SEC;
-                self.t.tv_sec += 1;
-            } else if self.t.tv_nsec < 0 {
-                self.t.tv_sec -= 1;
-                self.t.tv_nsec += ::NSEC_PER_SEC;
-            }
-            self
-        }
-    }
-
-    impl PartialOrd for SteadyTime {
-        fn partial_cmp(&self, other: &SteadyTime) -> Option<Ordering> {
-            Some(self.cmp(other))
-        }
-    }
-
-    impl Ord for SteadyTime {
-        fn cmp(&self, other: &SteadyTime) -> Ordering {
-            match self.t.tv_sec.cmp(&other.t.tv_sec) {
-                Ordering::Equal => self.t.tv_nsec.cmp(&other.t.tv_nsec),
-                ord => ord
-            }
-        }
-    }
-
-    impl PartialEq for SteadyTime {
-        fn eq(&self, other: &SteadyTime) -> bool {
-            self.t.tv_sec == other.t.tv_sec &&
-                self.t.tv_nsec == other.t.tv_nsec
-        }
-    }
-
-    impl Eq for SteadyTime {}
-}
-
-#[cfg(unix)]
-mod inner {
-    use libc::{self, time_t};
-    use std::mem;
-    use std::io;
-    use Tm;
-
-    #[cfg(any(target_os = "macos", target_os = "ios"))]
-    pub use self::mac::*;
-    #[cfg(all(not(target_os = "macos"), not(target_os = "ios")))]
-    pub use self::unix::*;
-
-    fn rust_tm_to_tm(rust_tm: &Tm, tm: &mut libc::tm) {
-        tm.tm_sec = rust_tm.tm_sec;
-        tm.tm_min = rust_tm.tm_min;
-        tm.tm_hour = rust_tm.tm_hour;
-        tm.tm_mday = rust_tm.tm_mday;
-        tm.tm_mon = rust_tm.tm_mon;
-        tm.tm_year = rust_tm.tm_year;
-        tm.tm_wday = rust_tm.tm_wday;
-        tm.tm_yday = rust_tm.tm_yday;
-        tm.tm_isdst = rust_tm.tm_isdst;
-    }
-
-    fn tm_to_rust_tm(tm: &libc::tm, utcoff: i32, rust_tm: &mut Tm) {
-        rust_tm.tm_sec = tm.tm_sec;
-        rust_tm.tm_min = tm.tm_min;
-        rust_tm.tm_hour = tm.tm_hour;
-        rust_tm.tm_mday = tm.tm_mday;
-        rust_tm.tm_mon = tm.tm_mon;
-        rust_tm.tm_year = tm.tm_year;
-        rust_tm.tm_wday = tm.tm_wday;
-        rust_tm.tm_yday = tm.tm_yday;
-        rust_tm.tm_isdst = tm.tm_isdst;
-        rust_tm.tm_utcoff = utcoff;
-    }
-
-    #[cfg(target_os = "nacl")]
-    unsafe fn timegm(tm: *const libc::tm) -> time_t {
-        use std::env::{set_var, var_os, remove_var};
-        extern {
-            fn tzset();
-        }
-
-        let ret;
-
-        let current_tz = var_os("TZ");
-        set_var("TZ", "UTC");
-        tzset();
-
-        ret = libc::mktime(tm);
-
-        if let Some(tz) = current_tz {
-            set_var("TZ", tz);
-        } else {
-            remove_var("TZ");
-        }
-        tzset();
-
-        ret
-    }
-
-    pub fn time_to_utc_tm(sec: i64, tm: &mut Tm) {
-        unsafe {
-            let sec = sec as time_t;
-            let mut out = mem::zeroed();
-            if libc::gmtime_r(&sec, &mut out).is_null() {
-                panic!("gmtime_r failed: {}", io::Error::last_os_error());
-            }
-            tm_to_rust_tm(&out, 0, tm);
-        }
-    }
-
-    pub fn time_to_local_tm(sec: i64, tm: &mut Tm) {
-        unsafe {
-            let sec = sec as time_t;
-            let mut out = mem::zeroed();
-            if libc::localtime_r(&sec, &mut out).is_null() {
-                panic!("localtime_r failed: {}", io::Error::last_os_error());
-            }
-            tm_to_rust_tm(&out, out.tm_gmtoff as i32, tm);
-        }
-    }
-
-    pub fn utc_tm_to_time(rust_tm: &Tm) -> i64 {
-        #[cfg(all(target_os = "android", not(target_arch = "aarch64")))]
-        use libc::timegm64 as timegm;
-        #[cfg(not(all(target_os = "android", not(target_arch = "aarch64"))))]
-        use libc::timegm;
-
-        let mut tm = unsafe { mem::zeroed() };
-        rust_tm_to_tm(rust_tm, &mut tm);
-        unsafe { timegm(&mut tm) as i64 }
-    }
-
-    pub fn local_tm_to_time(rust_tm: &Tm) -> i64 {
-        let mut tm = unsafe { mem::zeroed() };
-        rust_tm_to_tm(rust_tm, &mut tm);
-        unsafe { libc::mktime(&mut tm) as i64 }
-    }
-
-    #[cfg(any(target_os = "macos", target_os = "ios"))]
-    mod mac {
-        use libc::{self, timeval, mach_timebase_info};
-        use std::sync::{Once, ONCE_INIT};
-        use std::ops::{Add, Sub};
-        use Duration;
-
-        fn info() -> &'static mach_timebase_info {
-            static mut INFO: mach_timebase_info = mach_timebase_info {
-                numer: 0,
-                denom: 0,
-            };
-            static ONCE: Once = ONCE_INIT;
-
-            unsafe {
-                ONCE.call_once(|| {
-                    mach_timebase_info(&mut INFO);
-                });
-                &INFO
-            }
-        }
-
-        pub fn get_time() -> (i64, i32) {
-            use std::ptr;
-            let mut tv = timeval { tv_sec: 0, tv_usec: 0 };
-            unsafe { libc::gettimeofday(&mut tv, ptr::null_mut()); }
-            (tv.tv_sec as i64, tv.tv_usec * 1000)
-        }
-
-        pub fn get_precise_ns() -> u64 {
-            unsafe {
-                let time = libc::mach_absolute_time();
-                let info = info();
-                time * info.numer as u64 / info.denom as u64
-            }
-        }
-
-        #[derive(Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Debug)]
-        pub struct SteadyTime { t: u64 }
-
-        impl SteadyTime {
-            pub fn now() -> SteadyTime {
-                SteadyTime { t: get_precise_ns() }
-            }
-        }
-        impl Sub for SteadyTime {
-            type Output = Duration;
-            fn sub(self, other: SteadyTime) -> Duration {
-                Duration::nanoseconds(self.t as i64 - other.t as i64)
-            }
-        }
-        impl Sub<Duration> for SteadyTime {
-            type Output = SteadyTime;
-            fn sub(self, other: Duration) -> SteadyTime {
-                self + -other
-            }
-        }
-        impl Add<Duration> for SteadyTime {
-            type Output = SteadyTime;
-            fn add(self, other: Duration) -> SteadyTime {
-                let delta = other.num_nanoseconds().unwrap();
-                SteadyTime {
-                    t: (self.t as i64 + delta) as u64
-                }
-            }
-        }
-    }
-
-    #[cfg(test)]
-    pub struct TzReset;
-
-    #[cfg(test)]
-    pub fn set_los_angeles_time_zone() -> TzReset {
-        use std::env;
-        env::set_var("TZ", "America/Los_Angeles");
-        ::tzset();
-        TzReset
-    }
-
-    #[cfg(test)]
-    pub fn set_london_with_dst_time_zone() -> TzReset {
-        use std::env;
-        env::set_var("TZ", "Europe/London");
-        ::tzset();
-        TzReset
-    }
-
-    #[cfg(all(not(target_os = "macos"), not(target_os = "ios")))]
-    mod unix {
-        use std::fmt;
-        use std::cmp::Ordering;
-        use std::ops::{Add, Sub};
-        use libc;
-
-        use Duration;
-
-        pub fn get_time() -> (i64, i32) {
-            let mut tv = libc::timespec { tv_sec: 0, tv_nsec: 0 };
-            unsafe { libc::clock_gettime(libc::CLOCK_REALTIME, &mut tv); }
-            (tv.tv_sec as i64, tv.tv_nsec as i32)
-        }
-
-        pub fn get_precise_ns() -> u64 {
-            let mut ts = libc::timespec { tv_sec: 0, tv_nsec: 0 };
-            unsafe {
-                libc::clock_gettime(libc::CLOCK_MONOTONIC, &mut ts);
-            }
-            (ts.tv_sec as u64) * 1000000000 + (ts.tv_nsec as u64)
-        }
-
-        #[derive(Copy)]
-        pub struct SteadyTime {
-            t: libc::timespec,
-        }
-
-        impl fmt::Debug for SteadyTime {
-            fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-                write!(fmt, "SteadyTime {{ tv_sec: {:?}, tv_nsec: {:?} }}",
-                       self.t.tv_sec, self.t.tv_nsec)
-            }
-        }
-
-        impl Clone for SteadyTime {
-            fn clone(&self) -> SteadyTime {
-                SteadyTime { t: self.t }
-            }
-        }
-
-        impl SteadyTime {
-            pub fn now() -> SteadyTime {
-                let mut t = SteadyTime {
-                    t: libc::timespec {
-                        tv_sec: 0,
-                        tv_nsec: 0,
-                    }
-                };
-                unsafe {
-                    assert_eq!(0, libc::clock_gettime(libc::CLOCK_MONOTONIC,
-                                                      &mut t.t));
-                }
-                t
-            }
-        }
-
-        impl Sub for SteadyTime {
-            type Output = Duration;
-            fn sub(self, other: SteadyTime) -> Duration {
-                if self.t.tv_nsec >= other.t.tv_nsec {
-                    Duration::seconds(self.t.tv_sec as i64 - other.t.tv_sec as i64) +
-                        Duration::nanoseconds(self.t.tv_nsec as i64 - other.t.tv_nsec as i64)
-                } else {
-                    Duration::seconds(self.t.tv_sec as i64 - 1 - other.t.tv_sec as i64) +
-                        Duration::nanoseconds(self.t.tv_nsec as i64 + ::NSEC_PER_SEC as i64 -
-                                              other.t.tv_nsec as i64)
-                }
-            }
-        }
-
-        impl Sub<Duration> for SteadyTime {
-            type Output = SteadyTime;
-            fn sub(self, other: Duration) -> SteadyTime {
-                self + -other
-            }
-        }
-
-        impl Add<Duration> for SteadyTime {
-            type Output = SteadyTime;
-            fn add(mut self, other: Duration) -> SteadyTime {
-                let seconds = other.num_seconds();
-                let nanoseconds = other - Duration::seconds(seconds);
-                let nanoseconds = nanoseconds.num_nanoseconds().unwrap();
-                self.t.tv_sec += seconds as libc::time_t;
-                self.t.tv_nsec += nanoseconds as libc::c_long;
-                if self.t.tv_nsec >= ::NSEC_PER_SEC as libc::c_long {
-                    self.t.tv_nsec -= ::NSEC_PER_SEC as libc::c_long;
-                    self.t.tv_sec += 1;
-                } else if self.t.tv_nsec < 0 {
-                    self.t.tv_sec -= 1;
-                    self.t.tv_nsec += ::NSEC_PER_SEC as libc::c_long;
-                }
-                self
-            }
-        }
-
-        impl PartialOrd for SteadyTime {
-            fn partial_cmp(&self, other: &SteadyTime) -> Option<Ordering> {
-                Some(self.cmp(other))
-            }
-        }
-
-        impl Ord for SteadyTime {
-            fn cmp(&self, other: &SteadyTime) -> Ordering {
-                match self.t.tv_sec.cmp(&other.t.tv_sec) {
-                    Ordering::Equal => self.t.tv_nsec.cmp(&other.t.tv_nsec),
-                    ord => ord
-                }
-            }
-        }
-
-        impl PartialEq for SteadyTime {
-            fn eq(&self, other: &SteadyTime) -> bool {
-                self.t.tv_sec == other.t.tv_sec &&
-                    self.t.tv_nsec == other.t.tv_nsec
-            }
-        }
-
-        impl Eq for SteadyTime {}
-
-    }
-}
-
-#[cfg(windows)]
-#[allow(non_snake_case)]
-mod inner {
-    use std::io;
-    use std::mem;
-    use std::sync::{Once, ONCE_INIT};
-    use std::ops::{Add, Sub};
-    use {Tm, Duration};
-
-    use kernel32::*;
-    use winapi::*;
-
-    fn frequency() -> LARGE_INTEGER {
-        static mut FREQUENCY: LARGE_INTEGER = 0;
-        static ONCE: Once = ONCE_INIT;
-
-        unsafe {
-            ONCE.call_once(|| {
-                QueryPerformanceFrequency(&mut FREQUENCY);
-            });
-            FREQUENCY
-        }
-    }
-
-    const HECTONANOSECS_IN_SEC: i64 = 10_000_000;
-    const HECTONANOSEC_TO_UNIX_EPOCH: i64 = 11_644_473_600 * HECTONANOSECS_IN_SEC;
-
-    fn time_to_file_time(sec: i64) -> FILETIME {
-        let t = (((sec * HECTONANOSECS_IN_SEC) + HECTONANOSEC_TO_UNIX_EPOCH)) as u64;
-        FILETIME {
-            dwLowDateTime: t as DWORD,
-            dwHighDateTime: (t >> 32) as DWORD
-        }
-    }
-
-    fn file_time_as_u64(ft: &FILETIME) -> u64 {
-        ((ft.dwHighDateTime as u64) << 32) | (ft.dwLowDateTime as u64)
-    }
-
-    fn file_time_to_nsec(ft: &FILETIME) -> i32 {
-        let t = file_time_as_u64(ft) as i64;
-        ((t % HECTONANOSECS_IN_SEC) * 100) as i32
-    }
-
-    fn file_time_to_unix_seconds(ft: &FILETIME) -> i64 {
-        let t = file_time_as_u64(ft) as i64;
-        ((t - HECTONANOSEC_TO_UNIX_EPOCH) / HECTONANOSECS_IN_SEC) as i64
-    }
-
-    fn system_time_to_file_time(sys: &SYSTEMTIME) -> FILETIME {
-        unsafe {
-            let mut ft = mem::zeroed();
-            SystemTimeToFileTime(sys, &mut ft);
-            ft
-        }
-    }
-
-    fn tm_to_system_time(tm: &Tm) -> SYSTEMTIME {
-        let mut sys: SYSTEMTIME = unsafe { mem::zeroed() };
-        sys.wSecond = tm.tm_sec as WORD;
-        sys.wMinute = tm.tm_min as WORD;
-        sys.wHour = tm.tm_hour as WORD;
-        sys.wDay = tm.tm_mday as WORD;
-        sys.wDayOfWeek = tm.tm_wday as WORD;
-        sys.wMonth = (tm.tm_mon + 1) as WORD;
-        sys.wYear = (tm.tm_year + 1900) as WORD;
-        sys
-    }
-
-    fn system_time_to_tm(sys: &SYSTEMTIME, tm: &mut Tm) {
-        tm.tm_sec = sys.wSecond as i32;
-        tm.tm_min = sys.wMinute as i32;
-        tm.tm_hour = sys.wHour as i32;
-        tm.tm_mday = sys.wDay as i32;
-        tm.tm_wday = sys.wDayOfWeek as i32;
-        tm.tm_mon = (sys.wMonth - 1) as i32;
-        tm.tm_year = (sys.wYear - 1900) as i32;
-        tm.tm_yday = yday(tm.tm_year, tm.tm_mon + 1, tm.tm_mday);
-
-        fn yday(year: i32, month: i32, day: i32) -> i32 {
-            let leap = if month > 2 {
-                if year % 4 == 0 { 1 } else { 2 }
-            } else {
-                0
-            };
-            let july = if month > 7 { 1 } else { 0 };
-
-            (month - 1) * 30 + month / 2 + (day - 1) - leap + july
-        }
-    }
-
-    macro_rules! call {
-        ($name:ident($($arg:expr),*)) => {
-            if $name($($arg),*) == 0 {
-                panic!(concat!(stringify!($name), " failed with: {}"),
-                       io::Error::last_os_error());
-            }
-        }
-    }
-
-    pub fn time_to_utc_tm(sec: i64, tm: &mut Tm) {
-        let mut out = unsafe { mem::zeroed() };
-        let ft = time_to_file_time(sec);
-        unsafe {
-            call!(FileTimeToSystemTime(&ft, &mut out));
-        }
-        system_time_to_tm(&out, tm);
-        tm.tm_utcoff = 0;
-    }
-
-    pub fn time_to_local_tm(sec: i64, tm: &mut Tm) {
-        let ft = time_to_file_time(sec);
-        unsafe {
-            let mut utc = mem::zeroed();
-            let mut local = mem::zeroed();
-            call!(FileTimeToSystemTime(&ft, &mut utc));
-            call!(SystemTimeToTzSpecificLocalTime(0 as *const _,
-                                                  &mut utc, &mut local));
-            system_time_to_tm(&local, tm);
-
-            let local = system_time_to_file_time(&local);
-            let local_sec = file_time_to_unix_seconds(&local);
-
-            let mut tz = mem::zeroed();
-            GetTimeZoneInformation(&mut tz);
-
-            // SystemTimeToTzSpecificLocalTime already applied the biases so
-            // check if it non standard
-            tm.tm_utcoff = (local_sec - sec) as i32;
-            tm.tm_isdst = if tm.tm_utcoff == -60 * (tz.Bias + tz.StandardBias) {
-                0
-            } else {
-                1
-            };
-        }
-    }
-
-    pub fn utc_tm_to_time(tm: &Tm) -> i64 {
-        unsafe {
-            let mut ft = mem::zeroed();
-            let sys_time = tm_to_system_time(tm);
-            call!(SystemTimeToFileTime(&sys_time, &mut ft));
-            file_time_to_unix_seconds(&ft)
-        }
-    }
-
-    pub fn local_tm_to_time(tm: &Tm) -> i64 {
-        unsafe {
-            let mut ft = mem::zeroed();
-            let mut utc = mem::zeroed();
-            let mut sys_time = tm_to_system_time(tm);
-            call!(TzSpecificLocalTimeToSystemTime(0 as *mut _,
-                                                  &mut sys_time, &mut utc));
-            call!(SystemTimeToFileTime(&utc, &mut ft));
-            file_time_to_unix_seconds(&ft)
-        }
-    }
-
-    pub fn get_time() -> (i64, i32) {
-        unsafe {
-            let mut ft = mem::zeroed();
-            GetSystemTimeAsFileTime(&mut ft);
-            (file_time_to_unix_seconds(&ft), file_time_to_nsec(&ft))
-        }
-    }
-
-    pub fn get_precise_ns() -> u64 {
-        let mut ticks = 0;
-        unsafe {
-            assert!(QueryPerformanceCounter(&mut ticks) == 1);
-        }
-        mul_div_i64(ticks as i64, 1000000000, frequency() as i64) as u64
-
-    }
-
-    #[derive(Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Debug)]
-    pub struct SteadyTime {
-        t: LARGE_INTEGER,
-    }
-
-    impl SteadyTime {
-        pub fn now() -> SteadyTime {
-            let mut t = SteadyTime { t: 0 };
-            unsafe { QueryPerformanceCounter(&mut t.t); }
-            t
-        }
-    }
-
-    impl Sub for SteadyTime {
-        type Output = Duration;
-        fn sub(self, other: SteadyTime) -> Duration {
-            let diff = self.t as i64 - other.t as i64;
-            Duration::nanoseconds(mul_div_i64(diff, 1000000000,
-                                              frequency() as i64))
-        }
-    }
-
-    impl Sub<Duration> for SteadyTime {
-        type Output = SteadyTime;
-        fn sub(self, other: Duration) -> SteadyTime {
-            self + -other
-        }
-    }
-
-    impl Add<Duration> for SteadyTime {
-        type Output = SteadyTime;
-        fn add(mut self, other: Duration) -> SteadyTime {
-            self.t += (other.num_microseconds().unwrap() * frequency() as i64 /
-                       1_000_000) as LARGE_INTEGER;
-            self
-        }
-    }
-
-    #[cfg(test)]
-    pub struct TzReset {
-        old: TIME_ZONE_INFORMATION,
-    }
-
-    #[cfg(test)]
-    impl Drop for TzReset {
-        fn drop(&mut self) {
-            unsafe {
-                call!(SetTimeZoneInformation(&self.old));
-            }
-        }
-    }
-
-    #[cfg(test)]
-    pub fn set_los_angeles_time_zone() -> TzReset {
-        acquire_privileges();
-
-        unsafe {
-            let mut tz = mem::zeroed::<TIME_ZONE_INFORMATION>();
-            GetTimeZoneInformation(&mut tz);
-            let ret = TzReset { old: tz };
-            tz.Bias = 60 * 8;
-            call!(SetTimeZoneInformation(&tz));
-            return ret
-        }
-    }
-
-    #[cfg(test)]
-    pub fn set_london_with_dst_time_zone() -> TzReset {
-        acquire_privileges();
-
-        unsafe {
-            let mut tz = mem::zeroed::<TIME_ZONE_INFORMATION>();
-            GetTimeZoneInformation(&mut tz);
-            let ret = TzReset { old: tz };
-            // Since date set precisely this is 2015's dates
-            tz.Bias = 0;
-            tz.DaylightBias = -60;
-            tz.DaylightDate.wYear = 0;
-            tz.DaylightDate.wMonth = 3;
-            tz.DaylightDate.wDayOfWeek = 0;
-            tz.DaylightDate.wDay = 5;
-            tz.DaylightDate.wHour = 2;
-            tz.StandardBias = 0;
-            tz.StandardDate.wYear = 0;
-            tz.StandardDate.wMonth = 10;
-            tz.StandardDate.wDayOfWeek = 0;
-            tz.StandardDate.wDay = 5;
-            tz.StandardDate.wHour = 2;
-            call!(SetTimeZoneInformation(&tz));
-            return ret
-        }
-    }
-
-    // Ensures that this process has the necessary privileges to set a new time
-    // zone, and this is all transcribed from:
-    // https://msdn.microsoft.com/en-us/library/windows/desktop/ms724944%28v=vs.85%29.aspx
-    #[cfg(test)]
-    fn acquire_privileges() {
-        use std::sync::{ONCE_INIT, Once};
-        use advapi32::*;
-        const SE_PRIVILEGE_ENABLED: DWORD = 2;
-        static INIT: Once = ONCE_INIT;
-
-        #[repr(C)]
-        struct TKP {
-            tkp: TOKEN_PRIVILEGES,
-            laa: LUID_AND_ATTRIBUTES,
-        }
-
-        INIT.call_once(|| unsafe {
-            let mut hToken = 0 as *mut _;
-            call!(OpenProcessToken(GetCurrentProcess(),
-                                   TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY,
-                                   &mut hToken));
-
-            let mut tkp = mem::zeroed::<TKP>();
-            assert_eq!(tkp.tkp.Privileges.len(), 0);
-            let c = ::std::ffi::CString::new("SeTimeZonePrivilege").unwrap();
-            call!(LookupPrivilegeValueA(0 as *const _, c.as_ptr(),
-                                        &mut tkp.laa.Luid));
-            tkp.tkp.PrivilegeCount = 1;
-            tkp.laa.Attributes = SE_PRIVILEGE_ENABLED;
-            call!(AdjustTokenPrivileges(hToken, FALSE, &mut tkp.tkp, 0,
-                                        0 as *mut _, 0 as *mut _));
-        });
-    }
-
-
-
-    // Computes (value*numer)/denom without overflow, as long as both
-    // (numer*denom) and the overall result fit into i64 (which is the case
-    // for our time conversions).
-    fn mul_div_i64(value: i64, numer: i64, denom: i64) -> i64 {
-        let q = value / denom;
-        let r = value % denom;
-        // Decompose value as (value/denom*denom + value%denom),
-        // substitute into (value*numer)/denom and simplify.
-        // r < denom, so (denom*numer) is the upper bound of (r*numer)
-        q * numer + r * numer / denom
-    }
-
-    #[test]
-    fn test_muldiv() {
-        assert_eq!(mul_div_i64( 1_000_000_000_001, 1_000_000_000, 1_000_000),
-                   1_000_000_000_001_000);
-        assert_eq!(mul_div_i64(-1_000_000_000_001, 1_000_000_000, 1_000_000),
-                   -1_000_000_000_001_000);
-        assert_eq!(mul_div_i64(-1_000_000_000_001,-1_000_000_000, 1_000_000),
-                   1_000_000_000_001_000);
-        assert_eq!(mul_div_i64( 1_000_000_000_001, 1_000_000_000,-1_000_000),
-                   -1_000_000_000_001_000);
-        assert_eq!(mul_div_i64( 1_000_000_000_001,-1_000_000_000,-1_000_000),
-                   1_000_000_000_001_000);
-    }
-}
--- a/third_party/rust/time/.cargo-checksum.json
+++ b/third_party/rust/time/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".travis.yml":"9555a092ed1f87de52b07a90c614a30c6fa8f307eb4b05229253d06df363ce7a","Cargo.toml":"e51328f4f8dd0d9b1f039121c70de3e8bb4cf29975a64036af64c95bfeaa9e72","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"2c17f942c4a797f6f491c6d40570f904f35047531884ded3244438832b3d6f0a","appveyor.yml":"da991211b72fa6f231af7adb84c9fb72f5a9131d1c0a3d47b8ceffe5a82c8542","benches/precise_time_ns.rs":"f331c85489a05ea3bb83df9d57131a6e651ce852ca881417f328c4e8f53503c6","src/display.rs":"b79a81b4f068e44934ad3398ba0259120cc30cf0855ac5108c4569e320fd7f1d","src/duration.rs":"032f2ced8ea4dddaf6ed111f345e99217bad17edb7ed9fc4c511e405c8e02b87","src/lib.rs":"d01631b2340e30673e4c809678a5bdd3f8c18debb25ada21805a990254cb7caf","src/parse.rs":"717ae5735dfdaaba513f2a54a179e73bb2a48f8d4fb8787740d4662d6ff3389c","src/sys.rs":"0ca713b16747d046e4ce117828148bea66f23f4d461ad17045a24c7895d62be7"},"package":"d5d788d3aa77bc0ef3e9621256885555368b47bd495c13dd2e7413c89f845520"}
\ No newline at end of file
+{"files":{".travis.yml":"9555a092ed1f87de52b07a90c614a30c6fa8f307eb4b05229253d06df363ce7a","Cargo.toml":"9369a5798a85c467578e9be04ffdb220d1d7457950373bd3b0662a62ca58520b","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"2c17f942c4a797f6f491c6d40570f904f35047531884ded3244438832b3d6f0a","appveyor.yml":"da991211b72fa6f231af7adb84c9fb72f5a9131d1c0a3d47b8ceffe5a82c8542","benches/precise_time_ns.rs":"f331c85489a05ea3bb83df9d57131a6e651ce852ca881417f328c4e8f53503c6","src/display.rs":"b79a81b4f068e44934ad3398ba0259120cc30cf0855ac5108c4569e320fd7f1d","src/duration.rs":"032f2ced8ea4dddaf6ed111f345e99217bad17edb7ed9fc4c511e405c8e02b87","src/lib.rs":"d01631b2340e30673e4c809678a5bdd3f8c18debb25ada21805a990254cb7caf","src/parse.rs":"717ae5735dfdaaba513f2a54a179e73bb2a48f8d4fb8787740d4662d6ff3389c","src/sys.rs":"a6bf379947da5ed16063a9bfcdf877c84e38e006a9cbc45ee0558cba4cf5c295"},"package":"211b63c112206356ef1ff9b19355f43740fc3f85960c598a93d3a3d3ba7beade"}
\ No newline at end of file
--- a/third_party/rust/time/Cargo.toml
+++ b/third_party/rust/time/Cargo.toml
@@ -1,12 +1,12 @@
 [package]
 
 name = "time"
-version = "0.1.38"
+version = "0.1.36"
 authors = ["The Rust Project Developers"]
 license = "MIT/Apache-2.0"
 homepage = "https://github.com/rust-lang/time"
 repository = "https://github.com/rust-lang/time"
 documentation = "https://doc.rust-lang.org/time"
 description = """
 Utilities for working with time-related functions in Rust.
 """
@@ -19,11 +19,9 @@ rustc-serialize = { version = "0.3", opt
 redox_syscall = "0.1"
 
 [target.'cfg(windows)'.dependencies]
 winapi = "0.2.0"
 kernel32-sys = "0.2.0"
 
 [dev-dependencies]
 log = "0.3"
-
-[target.'cfg(windows)'.dev-dependencies]
 advapi32-sys = "0.1.2"
--- a/third_party/rust/time/src/sys.rs
+++ b/third_party/rust/time/src/sys.rs
@@ -204,22 +204,16 @@ mod inner {
     use std::io;
     use Tm;
 
     #[cfg(any(target_os = "macos", target_os = "ios"))]
     pub use self::mac::*;
     #[cfg(all(not(target_os = "macos"), not(target_os = "ios")))]
     pub use self::unix::*;
 
-    #[cfg(target_os = "solaris")]
-    extern {
-        static timezone: time_t;
-        static altzone: time_t;
-    }
-
     fn rust_tm_to_tm(rust_tm: &Tm, tm: &mut libc::tm) {
         tm.tm_sec = rust_tm.tm_sec;
         tm.tm_min = rust_tm.tm_min;
         tm.tm_hour = rust_tm.tm_hour;
         tm.tm_mday = rust_tm.tm_mday;
         tm.tm_mon = rust_tm.tm_mon;
         tm.tm_year = rust_tm.tm_year;
         tm.tm_wday = rust_tm.tm_wday;
@@ -278,39 +272,24 @@ mod inner {
 
     pub fn time_to_local_tm(sec: i64, tm: &mut Tm) {
         unsafe {
             let sec = sec as time_t;
             let mut out = mem::zeroed();
             if libc::localtime_r(&sec, &mut out).is_null() {
                 panic!("localtime_r failed: {}", io::Error::last_os_error());
             }
-            #[cfg(target_os = "solaris")]
-            let gmtoff = {
-                ::tzset();
-                // < 0 means we don't know; assume we're not in DST.
-                if out.tm_isdst == 0 {
-                    // timezone is seconds west of UTC, tm_gmtoff is seconds east
-                    -timezone
-                } else if out.tm_isdst > 0 {
-                    -altzone
-                } else {
-                    -timezone
-                }
-            };
-            #[cfg(not(target_os = "solaris"))]
-            let gmtoff = out.tm_gmtoff;
-            tm_to_rust_tm(&out, gmtoff as i32, tm);
+            tm_to_rust_tm(&out, out.tm_gmtoff as i32, tm);
         }
     }
 
     pub fn utc_tm_to_time(rust_tm: &Tm) -> i64 {
-        #[cfg(all(target_os = "android", target_pointer_width = "32"))]
+        #[cfg(all(target_os = "android", not(target_arch = "aarch64")))]
         use libc::timegm64 as timegm;
-        #[cfg(not(all(target_os = "android", target_pointer_width = "32")))]
+        #[cfg(not(all(target_os = "android", not(target_arch = "aarch64"))))]
         use libc::timegm;
 
         let mut tm = unsafe { mem::zeroed() };
         rust_tm_to_tm(rust_tm, &mut tm);
         unsafe { timegm(&mut tm) as i64 }
     }
 
     pub fn local_tm_to_time(rust_tm: &Tm) -> i64 {
deleted file mode 100644
--- a/third_party/rust/unicase-1.4.0/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".travis.yml":"659372b49358cc4b09cde98923122b608b9733a861ae51a7bb27ffe25808fad7","Cargo.toml":"b0a7941038e0cd9aa68c0bffdd2d872e71e1228f0d6fa33e090c09c843ee6a93","LICENSE":"a745ca7ae4a3c089cfbe4b0a6288fa95776244a65be2914b147878146f8c64da","README.md":"4c7e3e81e09029b9c8465241a6b673ba5f723ea279464fd0d44c3544ed0867c5","build.rs":"81a706e8a238587fdea06eb97c3756dd9eda8d92028c4ccd6339ffedbe0b78ff","src/lib.rs":"cca9109bf1124f46e9158e88b426bd74353917685226aeb442013ad30f84ab5d"},"package":"13a5906ca2b98c799f4b1ab4557b76367ebd6ae5ef14930ec841c74aed5f3764"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/unicase-1.4.0/.travis.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-language: rust
-rust:
-  - stable
-  - beta
-  - nightly
-matrix:
-  allow_failures:
-    - rust: nightly
-
-after_success: |
-    [ $TRAVIS_BRANCH = master ] &&
-    [ $TRAVIS_PULL_REQUEST = false ] &&
-    cargo doc &&
-    echo '<meta http-equiv=refresh content=0;url=case/index.html>' > target/doc/index.html &&
-    sudo pip install ghp-import &&
-    ghp-import -n target/doc &&
-    git push -fq https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
-
-env:
-    global:
-        - secure: rkPwcgjGQobsH3/LAV3Ecyt5Q6BiqWhAITLUUCX/lrBjXDaUma+RUjnh7bEzCQ5sG1hFLCJUlLZbWuNx+95t7yRgP14T3asp/a4PdtPkwL8okqq7RLAt7tjI6optUZ8Kr7HNp3jQDHda4tpSLDaZvM3zmrHOLwsDpYLRNAbhWM8=
deleted file mode 100644
--- a/third_party/rust/unicase-1.4.0/Cargo.toml
+++ /dev/null
@@ -1,25 +0,0 @@
-[package]
-
-name = "unicase"
-version = "1.4.0"
-authors = ["Sean McArthur <sean.monstar@gmail.com>"]
-description = "A case-insensitive wrapper around strings."
-repository = "https://github.com/seanmonstar/unicase"
-license = "MIT"
-keywords = ["lowercase", "case", "case-insensitive"]
-
-build = "build.rs"
-
-[build-dependencies]
-rustc_version = "0.1"
-
-[dependencies.heapsize]
-version = ">=0.2.0, <0.4"
-optional = true
-
-[dependencies.heapsize_plugin]
-version = "0.1.2"
-optional = true
-
-[features]
-heap_size = ["heapsize", "heapsize_plugin"]
deleted file mode 100644
--- a/third_party/rust/unicase-1.4.0/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2014-2015 Sean McArthur
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
deleted file mode 100644
--- a/third_party/rust/unicase-1.4.0/README.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# unicase
-
-[![Build Status](https://travis-ci.org/seanmonstar/unicase.svg?branch=master)](https://travis-ci.org/seanmonstar/unicase)
-
-Compare strings when case is not important.
-
-```rust
-if UniCase(method) == UniCase('GET') {
-    // GET request
-}
-```
-
-## License
-
-[MIT](./LICENSE)
deleted file mode 100644
--- a/third_party/rust/unicase-1.4.0/build.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-extern crate rustc_version as rustc;
-
-fn main() {
-    if rustc::version_matches(">= 1.5") {
-        println!("cargo:rustc-cfg=iter_cmp");
-    }
-}
deleted file mode 100644
--- a/third_party/rust/unicase-1.4.0/src/lib.rs
+++ /dev/null
@@ -1,210 +0,0 @@
-#![cfg_attr(test, deny(missing_docs))]
-#![cfg_attr(test, deny(warnings))]
-#![cfg_attr(feature = "heap_size", feature(custom_derive, plugin))]
-#![cfg_attr(feature = "heap_size", plugin(heapsize_plugin))]
-
-//! # Case
-//!
-//! Case provices a way of specifying strings that are case-insensitive.
-//!
-//! ## Example
-//!
-//! ```rust
-//! use unicase::UniCase;
-//!
-//! let a = UniCase("foobar");
-//! let b = UniCase("FoObAr");
-//!
-//! assert_eq!(a, b);
-//! ```
-
-#[cfg(feature = "heap_size")]
-extern crate heapsize;
-
-use std::ascii::AsciiExt;
-#[cfg(iter_cmp)]
-use std::cmp::Ordering;
-use std::fmt;
-use std::hash::{Hash, Hasher};
-use std::ops::{Deref, DerefMut};
-use std::str::FromStr;
-
-/// Case Insensitive wrapper of strings.
-#[derive(Copy, Clone, Debug)]
-#[cfg_attr(feature = "heap_size", derive(HeapSizeOf))]
-pub struct UniCase<S>(pub S);
-
-impl<S> Deref for UniCase<S> {
-    type Target = S;
-    #[inline]
-    fn deref<'a>(&'a self) -> &'a S {
-        &self.0
-    }
-}
-
-impl<S> DerefMut for UniCase<S> {
-    #[inline]
-    fn deref_mut<'a>(&'a mut self) -> &'a mut S {
-        &mut self.0
-    }
-}
-
-#[cfg(iter_cmp)]
-impl<T: AsRef<str>> PartialOrd for UniCase<T> {
-    fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
-        Some(self.cmp(other))
-    }
-}
-
-#[cfg(iter_cmp)]
-impl<T: AsRef<str>> Ord for UniCase<T> {
-    fn cmp(&self, other: &Self) -> Ordering {
-        let self_chars = self.as_ref().chars().map(|c| c.to_ascii_lowercase());
-        let other_chars = other.as_ref().chars().map(|c| c.to_ascii_lowercase());
-        self_chars.cmp(other_chars)
-    }
-}
-
-impl<S: AsRef<str>> AsRef<str> for UniCase<S> {
-    #[inline]
-    fn as_ref(&self) -> &str {
-        self.0.as_ref()
-    }
-
-}
-
-impl<S: fmt::Display> fmt::Display for UniCase<S> {
-    #[inline]
-    fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(&self.0, fmt)
-    }
-}
-
-impl<S1: AsRef<str>, S2: AsRef<str>> PartialEq<S2> for UniCase<S1> {
-    #[inline]
-    fn eq(&self, other: &S2) -> bool {
-        self.as_ref().eq_ignore_ascii_case(other.as_ref())
-    }
-}
-
-
-impl<S: AsRef<str>> Eq for UniCase<S> {}
-
-impl<S: FromStr> FromStr for UniCase<S> {
-    type Err = <S as FromStr>::Err;
-    fn from_str(s: &str) -> Result<UniCase<S>, <S as FromStr>::Err> {
-        s.parse().map(UniCase)
-    }
-}
-
-impl<S: AsRef<str>> Hash for UniCase<S> {
-    #[inline]
-    fn hash<H: Hasher>(&self, hasher: &mut H) {
-        for byte in self.as_ref().bytes().map(|b| b.to_ascii_lowercase()) {
-            hasher.write(&[byte]);
-        }
-    }
-}
-
-macro_rules! from_impl {
-    ($from:ty => $to:ty; $by:ident) => (
-        impl<'a> From<$from> for UniCase<$to> {
-            fn from(s: $from) -> Self {
-                UniCase(s.$by())
-            }
-        }
-    );
-    ($from:ty => $to:ty) => ( from_impl!($from => $to; into); )
-}
-
-macro_rules! into_impl {
-    ($to:ty) => (
-        impl<'a> Into<$to> for UniCase<$to> {
-            fn into(self) -> $to {
-                self.0
-            }
-        }
-    );
-}
-
-from_impl!(&'a str => &'a str);
-from_impl!(&'a str => String);
-from_impl!(&'a String => &'a str; as_ref);
-from_impl!(String => String);
-
-into_impl!(&'a str);
-into_impl!(String);
-
-#[cfg(test)]
-mod test {
-    use super::UniCase;
-    use std::hash::{Hash, Hasher, SipHasher};
-
-    fn hash<T: Hash>(t: &T) -> u64 {
-        let mut s = SipHasher::new();
-        t.hash(&mut s);
-        s.finish()
-    }
-
-    #[test]
-    fn test_copy_for_refs() {
-        fn foo<T>(_: UniCase<T>) {}
-
-        let a = UniCase("foobar");
-        foo(a);
-        foo(a);
-    }
-
-    #[test]
-    fn test_case_insensitive() {
-        let a = UniCase("foobar");
-        let b = UniCase("FOOBAR");
-
-        assert_eq!(a, b);
-        assert_eq!(hash(&a), hash(&b));
-    }
-
-    #[test]
-    fn test_different_string_types() {
-        let a = UniCase("foobar");
-        let b = "FOOBAR".to_owned();
-        assert_eq!(a, b);
-        assert_eq!(UniCase(b), a);
-    }
-
-    #[cfg(iter_cmp)]
-    #[test]
-    fn test_case_cmp() {
-        assert!(UniCase("foobar") == UniCase("FOOBAR"));
-        assert!(UniCase("a") < UniCase("B"));
-
-        assert!(UniCase("A") < UniCase("b"));
-        assert!(UniCase("aa") > UniCase("a"));
-
-        assert!(UniCase("a") < UniCase("aa"));
-        assert!(UniCase("a") < UniCase("AA"));
-    }
-
-    #[test]
-    fn test_from_impls() {
-        let view: &'static str = "foobar";
-        let _: UniCase<&'static str> = view.into();
-        let _: UniCase<&str> = view.into();
-        let _: UniCase<String> = view.into();
-
-        let owned: String = view.to_owned();
-        let _: UniCase<&str> = (&owned).into();
-        let _: UniCase<String> = owned.into();
-    }
-
-    #[test]
-    fn test_into_impls() {
-        let view: UniCase<&'static str> = UniCase("foobar");
-        let _: &'static str = view.into();
-        let _: &str = view.into();
-
-        let owned: UniCase<String> = "foobar".into();
-        let _: String = owned.clone().into();
-        let _: &str = owned.as_ref();
-    }
-}
--- a/third_party/rust/unicase/.cargo-checksum.json
+++ b/third_party/rust/unicase/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".travis.yml":"2b8c34447a7f2e36ed670780610caaf95d2b6450406762a28e866d10d412b3a2","Cargo.toml":"c9e02b663403a7bbc6a72da2db4dd19fc107f003c70fc908309168cd01205abc","LICENSE":"a745ca7ae4a3c089cfbe4b0a6288fa95776244a65be2914b147878146f8c64da","README.md":"4c7e3e81e09029b9c8465241a6b673ba5f723ea279464fd0d44c3544ed0867c5","build.rs":"2c7412ba90a1181cdfaf5dbbe04076054cc565fd753a2c83e59c2f34208abf6c","src/lib.rs":"fd09b88d0aa3a0e8f51e060267d031678a86cb6496afaa5f33224c3d2e2deaf3"},"package":"7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33"}
\ No newline at end of file
+{"files":{".travis.yml":"659372b49358cc4b09cde98923122b608b9733a861ae51a7bb27ffe25808fad7","Cargo.toml":"b0a7941038e0cd9aa68c0bffdd2d872e71e1228f0d6fa33e090c09c843ee6a93","LICENSE":"a745ca7ae4a3c089cfbe4b0a6288fa95776244a65be2914b147878146f8c64da","README.md":"4c7e3e81e09029b9c8465241a6b673ba5f723ea279464fd0d44c3544ed0867c5","build.rs":"81a706e8a238587fdea06eb97c3756dd9eda8d92028c4ccd6339ffedbe0b78ff","src/lib.rs":"cca9109bf1124f46e9158e88b426bd74353917685226aeb442013ad30f84ab5d"},"package":"13a5906ca2b98c799f4b1ab4557b76367ebd6ae5ef14930ec841c74aed5f3764"}
\ No newline at end of file
--- a/third_party/rust/unicase/.travis.yml
+++ b/third_party/rust/unicase/.travis.yml
@@ -1,26 +1,16 @@
 language: rust
-
-sudo: false
-
+rust:
+  - stable
+  - beta
+  - nightly
 matrix:
-    fast_finish: true
-    include:
-        - rust: nightly
-          env: FEATURES="--features nightly"
-        - rust: beta
-        - rust: stable
-        - rust: 1.3.0
-
-cache:
-    apt: true
-    directories:
-        - target/debug/deps
-        - target/debug/build
+  allow_failures:
+    - rust: nightly
 
 after_success: |
     [ $TRAVIS_BRANCH = master ] &&
     [ $TRAVIS_PULL_REQUEST = false ] &&
     cargo doc &&
     echo '<meta http-equiv=refresh content=0;url=case/index.html>' > target/doc/index.html &&
     sudo pip install ghp-import &&
     ghp-import -n target/doc &&
--- a/third_party/rust/unicase/Cargo.toml
+++ b/third_party/rust/unicase/Cargo.toml
@@ -1,33 +1,25 @@
-# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
-#
-# When uploading crates to the registry Cargo will automatically
-# "normalize" Cargo.toml files for maximal compatibility
-# with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g. crates.io) dependencies
-#
-# If you believe there's an error in this file please file an
-# issue against the rust-lang/cargo repository. If you're
-# editing this file be aware that the upstream Cargo.toml
-# will likely look very different (and much more reasonable)
+[package]
 
-[package]
 name = "unicase"
-version = "1.4.2"
+version = "1.4.0"
 authors = ["Sean McArthur <sean.monstar@gmail.com>"]
+description = "A case-insensitive wrapper around strings."
+repository = "https://github.com/seanmonstar/unicase"
+license = "MIT"
+keywords = ["lowercase", "case", "case-insensitive"]
+
 build = "build.rs"
-description = "A case-insensitive wrapper around strings."
-keywords = ["lowercase", "case", "case-insensitive"]
-license = "MIT"
-repository = "https://github.com/seanmonstar/unicase"
+
+[build-dependencies]
+rustc_version = "0.1"
+
 [dependencies.heapsize]
 version = ">=0.2.0, <0.4"
 optional = true
 
 [dependencies.heapsize_plugin]
 version = "0.1.2"
 optional = true
-[build-dependencies.version_check]
-version = "0.1"
 
 [features]
 heap_size = ["heapsize", "heapsize_plugin"]
--- a/third_party/rust/unicase/build.rs
+++ b/third_party/rust/unicase/build.rs
@@ -1,10 +1,7 @@
-extern crate version_check as rustc;
+extern crate rustc_version as rustc;
 
 fn main() {
-    if rustc::is_min_version("1.5.0").map(|(is_min, _)| is_min).unwrap_or(true) {
-        println!("cargo:rustc-cfg=__unicase__iter_cmp");
-    }
-    if rustc::is_min_version("1.13.0").map(|(is_min, _)| is_min).unwrap_or(true) {
-        println!("cargo:rustc-cfg=__unicase__default_hasher");
+    if rustc::version_matches(">= 1.5") {
+        println!("cargo:rustc-cfg=iter_cmp");
     }
 }
--- a/third_party/rust/unicase/src/lib.rs
+++ b/third_party/rust/unicase/src/lib.rs
@@ -17,17 +17,17 @@
 //!
 //! assert_eq!(a, b);
 //! ```
 
 #[cfg(feature = "heap_size")]
 extern crate heapsize;
 
 use std::ascii::AsciiExt;
-#[cfg(__unicase__iter_cmp)]
+#[cfg(iter_cmp)]
 use std::cmp::Ordering;
 use std::fmt;
 use std::hash::{Hash, Hasher};
 use std::ops::{Deref, DerefMut};
 use std::str::FromStr;
 
 /// Case Insensitive wrapper of strings.
 #[derive(Copy, Clone, Debug)]
@@ -44,24 +44,24 @@ impl<S> Deref for UniCase<S> {
 
 impl<S> DerefMut for UniCase<S> {
     #[inline]
     fn deref_mut<'a>(&'a mut self) -> &'a mut S {
         &mut self.0
     }
 }
 
-#[cfg(__unicase__iter_cmp)]
+#[cfg(iter_cmp)]
 impl<T: AsRef<str>> PartialOrd for UniCase<T> {
     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
         Some(self.cmp(other))
     }
 }
 
-#[cfg(__unicase__iter_cmp)]
+#[cfg(iter_cmp)]
 impl<T: AsRef<str>> Ord for UniCase<T> {
     fn cmp(&self, other: &Self) -> Ordering {
         let self_chars = self.as_ref().chars().map(|c| c.to_ascii_lowercase());
         let other_chars = other.as_ref().chars().map(|c| c.to_ascii_lowercase());
         self_chars.cmp(other_chars)
     }
 }
 
@@ -133,24 +133,20 @@ from_impl!(&'a String => &'a str; as_ref
 from_impl!(String => String);
 
 into_impl!(&'a str);
 into_impl!(String);
 
 #[cfg(test)]
 mod test {
     use super::UniCase;
-    use std::hash::{Hash, Hasher};
-    #[cfg(not(__unicase__default_hasher))]
-    use std::hash::SipHasher as DefaultHasher;
-    #[cfg(__unicase__default_hasher)]
-    use std::collections::hash_map::DefaultHasher;
+    use std::hash::{Hash, Hasher, SipHasher};
 
     fn hash<T: Hash>(t: &T) -> u64 {
-        let mut s = DefaultHasher::new();
+        let mut s = SipHasher::new();
         t.hash(&mut s);
         s.finish()
     }
 
     #[test]
     fn test_copy_for_refs() {
         fn foo<T>(_: UniCase<T>) {}
 
@@ -171,17 +167,17 @@ mod test {
     #[test]
     fn test_different_string_types() {
         let a = UniCase("foobar");
         let b = "FOOBAR".to_owned();
         assert_eq!(a, b);
         assert_eq!(UniCase(b), a);
     }
 
-    #[cfg(__unicase__iter_cmp)]
+    #[cfg(iter_cmp)]
     #[test]
     fn test_case_cmp() {
         assert!(UniCase("foobar") == UniCase("FOOBAR"));
         assert!(UniCase("a") < UniCase("B"));
 
         assert!(UniCase("A") < UniCase("b"));
         assert!(UniCase("aa") > UniCase("a"));
 
deleted file mode 100644
--- a/third_party/rust/unicode-bidi-0.3.3/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".rustfmt.toml":"4587a30e695dc4afdd3b5d33370cf712c90a716de06ab0c5a2c023b0f269ab1a",".travis.yml":"e340419604a35e795fc3afdab237eb0ea3a31e71c98fb98fa88626d61b8a50f7","AUTHORS":"1ff3a7c8519b29544bb28ba9b1e7502df0cb764051fb9a1172e60006aa2b8dcc","COPYRIGHT":"edb20b474f6cbd4f4db066b54a9e0f687d0009d309412a63431189b59b8e2a07","Cargo.toml":"dc21922a66df3876268bc4c187aeaf8db875aee8a1869c7f78e2c67b2e572680","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"7b63ecd5f1902af1b63729947373683c32745c16a10e8e6292e2e2dcd7e90ae0","README.md":"e764abd9a6abbe9517dd9dedc003dd64594351282437a509fec9362ef136686d","benches/basic.rs":"e1538acb2de8b0c510d663d5ba0b6877f148955774c713a7aa2374b62ceb6e6a","benches/udhr.rs":"7869911021fc0f0a71246d2535183a4610a0b9efd14fc8fc58daf121a02acd21","benches/udhr_data/README.md":"103dd98f2777082f73dd90ce441245370169a6e889b329da81ee4b9c236c0e05","src/char_data/mod.rs":"6fa055d2c81061bcc15854eb91f897998ed9109725827932266a0dc4d4051166","src/char_data/tables.rs":"3742ed00360d3955b10ba690b1446e69ddf04f2cee13e86dd185ba6641bc6198","src/deprecated.rs":"ce1b62ac47d0d7ea547a1e03d17cd86b6b850e4e095642ba2e9c29130f13fa72","src/explicit.rs":"273c56d064891a9b2f1ef61f81845c0467c81db4e3ce756a9f2ac58f7e6e3e14","src/format_chars.rs":"0b60e26adfff7f61abfbaf63bc5e37896f12f9d420a6df630c4f71e0acb4222a","src/implicit.rs":"ab583bd9f0e9ecff8bd5e26253912c1f40598d0212a6bc78664774149c38dccb","src/level.rs":"b8739d4dd84d9270140047972167d9e72db8637c769228eec17d12e07c5ab55f","src/lib.rs":"f264fe18c7ae5d4c4b100f9304be0466a138384cbcc9b08cb7b5185c5aac6bd4","src/prepare.rs":"cacf4ff9f7b0adf700b9f5cd82165c67eec93fd8e4d05cb6c7fe54111d9bbe40","tests/conformance_tests.rs":"777c74cbb3946d5b4495d4f8abe1f8edd0169a38bb724c44eea82eff5ca9581d","tools/generate.py":"12f94bdf2226f306d993fe2a0fa623b8dc9b1db1ac038a17ab44892ccdc8feeb"},"package":"a6a2c4e3710edd365cd7e78383153ed739fa31af19f9172f72d3575060f5a43a"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/unicode-bidi-0.3.3/.rustfmt.toml
+++ /dev/null
@@ -1,6 +0,0 @@
-array_layout = "Block"
-array_width = 80
-fn_args_layout = "Block"
-fn_brace_style = "SameLineWhere"
-fn_call_style = "Block"
-generics_indent = "Block"
deleted file mode 100644
--- a/third_party/rust/unicode-bidi-0.3.3/.travis.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-sudo: false
-language: rust
-
-rust:
-  - nightly
-  - beta
-  - stable
-  - 1.15.0
-
-matrix:
-  fast_finish: true
-
-notifications:
-  webhooks: http://build.servo.org:54856/travis
-
-before_script:
-    - pip install git+https://github.com/euclio/travis-cargo@kcov --user && export PATH=$HOME/.local/bin:$PATH
-
-script:
-  - cargo build --verbose
-  - cargo test  --verbose
-  - cargo test  --verbose --features with_serde
-  - cargo doc   --verbose --no-deps
-  - travis-cargo bench
deleted file mode 100644
--- a/third_party/rust/unicode-bidi-0.3.3/AUTHORS
+++ /dev/null
@@ -1,4 +0,0 @@
-This software was written by the following people:
-
-Matt Brubeck <mbrubeck@limpet.net>
-Behnam Esfahbod <behnam@zwnj.org>
deleted file mode 100644
--- a/third_party/rust/unicode-bidi-0.3.3/COPYRIGHT
+++ /dev/null
@@ -1,8 +0,0 @@
-This project is copyright 2015, The Servo Project Developers (given in the
-file AUTHORS).
-
-Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-http://www.apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
-http://opensource.org/licenses/MIT>, at your option. All files in the project
-carrying such notice may not be copied, modified, or distributed except
-according to those terms.
deleted file mode 100644
--- a/third_party/rust/unicode-bidi-0.3.3/Cargo.toml
+++ /dev/null
@@ -1,27 +0,0 @@
-[package]
-name = "unicode-bidi"
-version = "0.3.3"
-authors = ["The Servo Project Developers"]
-license = "MIT / Apache-2.0"
-description = "Implementation of the Unicode Bidirectional Algorithm"
-repository = "https://github.com/servo/unicode-bidi"
-documentation = "http://doc.servo.org/unicode_bidi/"
-keywords = ["rtl", "unicode", "text", "layout", "bidi"]
-
-exclude = ["*.txt"]
-
-[lib]
-name = "unicode_bidi"
-
-[dependencies]
-matches = "0.1"
-serde = {version = ">=0.8, <2.0", optional = true}
-serde_derive = {version = ">=0.8, <2.0", optional = true}
-
-[dev-dependencies]
-serde_test = ">=0.8, <2.0"
-
-[features]
-default = []
-unstable = []  # Use in benches/
-with_serde = ["serde", "serde_derive"]
deleted file mode 100644
--- a/third_party/rust/unicode-bidi-0.3.3/LICENSE-APACHE
+++ /dev/null
@@ -1,201 +0,0 @@
-                              Apache License
-                        Version 2.0, January 2004
-                     http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-   "License" shall mean the terms and conditions for use, reproduction,
-   and distribution as defined by Sections 1 through 9 of this document.
-
-   "Licensor" shall mean the copyright owner or entity authorized by
-   the copyright owner that is granting the License.
-
-   "Legal Entity" shall mean the union of the acting entity and all
-   other entities that control, are controlled by, or are under common
-   control with that entity. For the purposes of this definition,
-   "control" means (i) the power, direct or indirect, to cause the
-   direction or management of such entity, whether by contract or
-   otherwise, or (ii) ownership of fifty percent (50%) or more of the
-   outstanding shares, or (iii) beneficial ownership of such entity.
-
-   "You" (or "Your") shall mean an individual or Legal Entity
-   exercising permissions granted by this License.
-
-   "Source" form shall mean the preferred form for making modifications,
-   including but not limited to software source code, documentation
-   source, and configuration files.
-
-   "Object" form shall mean any form resulting from mechanical
-   transformation or translation of a Source form, including but
-   not limited to compiled object code, generated documentation,
-   and conversions to other media types.
-
-   "Work" shall mean the work of authorship, whether in Source or
-   Object form, made available under the License, as indicated by a
-   copyright notice that is included in or attached to the work
-   (an example is provided in the Appendix below).
-
-   "Derivative Works" shall mean any work, whether in Source or Object
-   form, that is based on (or derived from) the Work and for which the
-   editorial revisions, annotations, elaborations, or other modifications
-   represent, as a whole, an original work of authorship. For the purposes
-   of this License, Derivative Works shall not include works that remain
-   separable from, or merely link (or bind by name) to the interfaces of,
-   the Work and Derivative Works thereof.
-
-   "Contribution" shall mean any work of authorship, including
-   the original version of the Work and any modifications or additions
-   to that Work or Derivative Works thereof, that is intentionally
-   submitted to Licensor for inclusion in the Work by the copyright owner
-   or by an individual or Legal Entity authorized to submit on behalf of
-   the copyright owner. For the purposes of this definition, "submitted"
-   means any form of electronic, verbal, or written communication sent
-   to the Licensor or its representatives, including but not limited to
-   communication on electronic mailing lists, source code control systems,
-   and issue tracking systems that are managed by, or on behalf of, the
-   Licensor for the purpose of discussing and improving the Work, but
-   excluding communication that is conspicuously marked or otherwise
-   designated in writing by the copyright owner as "Not a Contribution."
-
-   "Contributor" shall mean Licensor and any individual or Legal Entity
-   on behalf of whom a Contribution has been received by Licensor and
-   subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   copyright license to reproduce, prepare Derivative Works of,
-   publicly display, publicly perform, sublicense, and distribute the
-   Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   (except as stated in this section) patent license to make, have made,
-   use, offer to sell, sell, import, and otherwise transfer the Work,
-   where such license applies only to those patent claims licensable
-   by such Contributor that are necessarily infringed by their
-   Contribution(s) alone or by combination of their Contribution(s)
-   with the Work to which such Contribution(s) was submitted. If You
-   institute patent litigation against any entity (including a
-   cross-claim or counterclaim in a lawsuit) alleging that the Work
-   or a Contribution incorporated within the Work constitutes direct
-   or contributory patent infringement, then any patent licenses
-   granted to You under this License for that Work shall terminate
-   as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
-   Work or Derivative Works thereof in any medium, with or without
-   modifications, and in Source or Object form, provided that You
-   meet the following conditions:
-
-   (a) You must give any other recipients of the Work or
-       Derivative Works a copy of this License; and
-
-   (b) You must cause any modified files to carry prominent notices
-       stating that You changed the files; and
-
-   (c) You must retain, in the Source form of any Derivative Works
-       that You distribute, all copyright, patent, trademark, and
-       attribution notices from the Source form of the Work,
-       excluding those notices that do not pertain to any part of
-       the Derivative Works; and
-
-   (d) If the Work includes a "NOTICE" text file as part of its
-       distribution, then any Derivative Works that You distribute must
-       include a readable copy of the attribution notices contained
-       within such NOTICE file, excluding those notices that do not
-       pertain to any part of the Derivative Works, in at least one
-       of the following places: within a NOTICE text file distributed
-       as part of the Derivative Works; within the Source form or
-       documentation, if provided along with the Derivative Works; or,
-       within a display generated by the Derivative Works, if and
-       wherever such third-party notices normally appear. The contents
-       of the NOTICE file are for informational purposes only and
-       do not modify the License. You may add Your own attribution
-       notices within Derivative Works that You distribute, alongside
-       or as an addendum to the NOTICE text from the Work, provided
-       that such additional attribution notices cannot be construed
-       as modifying the License.
-
-   You may add Your own copyright statement to Your modifications and
-   may provide additional or different license terms and conditions
-   for use, reproduction, or distribution of Your modifications, or
-   for any such Derivative Works as a whole, provided Your use,
-   reproduction, and distribution of the Work otherwise complies with
-   the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
-   any Contribution intentionally submitted for inclusion in the Work
-   by You to the Licensor shall be under the terms and conditions of
-   this License, without any additional terms or conditions.
-   Notwithstanding the above, nothing herein shall supersede or modify
-   the terms of any separate license agreement you may have executed
-   with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
-   names, trademarks, service marks, or product names of the Licensor,
-   except as required for reasonable and customary use in describing the
-   origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
-   agreed to in writing, Licensor provides the Work (and each
-   Contributor provides its Contributions) on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-   implied, including, without limitation, any warranties or conditions
-   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-   PARTICULAR PURPOSE. You are solely responsible for determining the
-   appropriateness of using or redistributing the Work and assume any
-   risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
-   whether in tort (including negligence), contract, or otherwise,
-   unless required by applicable law (such as deliberate and grossly
-   negligent acts) or agreed to in writing, shall any Contributor be
-   liable to You for damages, including any direct, indirect, special,
-   incidental, or consequential damages of any character arising as a
-   result of this License or out of the use or inability to use the
-   Work (including but not limited to damages for loss of goodwill,
-   work stoppage, computer failure or malfunction, or any and all
-   other commercial damages or losses), even if such Contributor
-   has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
-   the Work or Derivative Works thereof, You may choose to offer,
-   and charge a fee for, acceptance of support, warranty, indemnity,
-   or other liability obligations and/or rights consistent with this
-   License. However, in accepting such obligations, You may act only
-   on Your own behalf and on Your sole responsibility, not on behalf
-   of any other Contributor, and only if You agree to indemnify,
-   defend, and hold each Contributor harmless for any liability
-   incurred by, or claims asserted against, such Contributor by reason
-   of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
-   To apply the Apache License to your work, attach the following
-   boilerplate notice, with the fields enclosed by brackets "[]"
-   replaced with your own identifying information. (Don't include
-   the brackets!)  The text should be enclosed in the appropriate
-   comment syntax for the file format. We also recommend that a
-   file or class name and description of purpose be included on the
-   same "printed page" as the copyright notice for easier
-   identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-	http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
deleted file mode 100644
--- a/third_party/rust/unicode-bidi-0.3.3/LICENSE-MIT
+++ /dev/null
@@ -1,25 +0,0 @@
-Copyright (c) 2015 The Rust Project Developers
-
-Permission is hereby granted, free of charge, to any
-person obtaining a copy of this software and associated
-documentation files (the "Software"), to deal in the
-Software without restriction, including without
-limitation the rights to use, copy, modify, merge,
-publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software
-is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice
-shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
-ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
-TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
deleted file mode 100644
--- a/third_party/rust/unicode-bidi-0.3.3/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# unicode-bidi
-
-This crate implements the [Unicode Bidirectional Algorithm][tr9] for display
-of mixed right-to-left and left-to-right text.  It is written in safe Rust,
-compatible with the current stable release.
-
-[Documentation](http://doc.servo.org/unicode_bidi/)
-
-[![Build Status](https://travis-ci.org/servo/unicode-bidi.svg?branch=master)](https://travis-ci.org/servo/unicode-bidi)
-
-[tr9]: http://www.unicode.org/reports/tr9/
deleted file mode 100644
--- a/third_party/rust/unicode-bidi-0.3.3/src/char_data/mod.rs
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright 2015 The Servo Project Developers. See the
-// COPYRIGHT file at the top-level directory of this distribution.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! Accessor for `Bidi_Class` property from Unicode Character Database (UCD)
-
-mod tables;
-
-pub use self::tables::{BidiClass, UNICODE_VERSION};
-
-use std::cmp::Ordering::{Equal, Less, Greater};
-use std::char;
-
-use self::tables::bidi_class_table;
-use BidiClass::*;
-
-/// Find the BidiClass of a single char.
-pub fn bidi_class(c: char) -> BidiClass {
-    bsearch_range_value_table(c, bidi_class_table)
-}
-
-pub fn is_rtl(bidi_class: BidiClass) -> bool {
-    match bidi_class {
-        RLE | RLO | RLI => true,
-        _ => false,
-    }
-}
-
-fn bsearch_range_value_table(c: char, r: &'static [(char, char, BidiClass)]) -> BidiClass {
-    match r.binary_search_by(
-        |&(lo, hi, _)| if lo <= c && c <= hi {
-            Equal
-        } else if hi < c {
-            Less
-        } else {
-            Greater
-        }
-    ) {
-        Ok(idx) => {
-            let (_, _, cat) = r[idx];
-            cat
-        }
-        // UCD/extracted/DerivedBidiClass.txt: "All code points not explicitly listed
-        // for Bidi_Class have the value Left_To_Right (L)."
-        Err(_) => L,
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use super::*;
-
-    #[test]
-    fn test_bidi_class() {
-        for (input, expected) in
-            vec![
-                (0x0000, BN),
-                (0x0040, ON),
-                (0x0041, L),
-                (0x0062, L),
-                (0x007F, BN),
-
-                // Hebrew
-                (0x0590, R),
-                (0x05D0, R),
-                (0x05D1, R),
-                (0x05FF, R),
-
-                // Arabic
-                (0x0600, AN),
-                (0x0627, AL),
-                (0x07BF, AL),
-
-                // Default R + Arabic Extras
-                (0x07C0, R),
-                (0x085F, R),
-                (0x0860, R),
-                (0x089F, R),
-                (0x08A0, AL),
-                (0x089F, R),
-                (0x08FF, NSM),
-
-                // Default ET
-                (0x20A0, ET),
-                (0x20CF, ET),
-
-                // Arabic Presentation Forms
-                (0xFB1D, R),
-                (0xFB4F, R),
-                (0xFB50, AL),
-                (0xFDCF, AL),
-                (0xFDF0, AL),
-                (0xFDFF, AL),
-                (0xFE70, AL),
-                (0xFEFE, AL),
-                (0xFEFF, BN),
-
-                // Default AL + R
-                (0x10800, R),
-                (0x10FFF, R),
-                (0x1E800, R),
-                (0x1EDFF, R),
-                (0x1EE00, AL),
-                (0x1EEFF, AL),
-                (0x1EF00, R),
-                (0x1EFFF, R),
-            ] {
-            assert_eq!(bidi_class(char::from_u32(input).unwrap()), expected);
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/unicode-bidi-0.3.3/src/char_data/tables.rs
+++ /dev/null
@@ -1,452 +0,0 @@
-// NOTE:
-// The following code was generated by "tools/generate.py". do not edit directly
-
-#![allow(missing_docs, non_upper_case_globals, non_snake_case)]
-#![cfg_attr(rustfmt, rustfmt_skip)]
-
-/// The [Unicode version](http://www.unicode.org/versions/) of data
-pub const UNICODE_VERSION: (u64, u64, u64) = (9, 0, 0);
-
-#[allow(non_camel_case_types)]
-#[derive(Clone, Copy, Debug, PartialEq, Eq)]
-/// Represents values of the Unicode character property
-/// [Bidi_Class](http://www.unicode.org/reports/tr44/#Bidi_Class), also
-/// known as the *bidirectional character type*.
-///
-/// * http://www.unicode.org/reports/tr9/#Bidirectional_Character_Types
-/// * http://www.unicode.org/reports/tr44/#Bidi_Class_Values
-pub enum BidiClass {
-    AL,
-    AN,
-    B,
-    BN,
-    CS,
-    EN,
-    ES,
-    ET,
-    FSI,
-    L,
-    LRE,
-    LRI,
-    LRO,
-    NSM,
-    ON,
-    PDF,
-    PDI,
-    R,
-    RLE,
-    RLI,
-    RLO,
-    S,
-    WS,
-}
-
-use self::BidiClass::*;
-pub const bidi_class_table: &'static [(char, char, BidiClass)] = &[
-    ('\u{0}', '\u{8}', BN), ('\u{9}', '\u{9}', S), ('\u{a}', '\u{a}', B), ('\u{b}', '\u{b}', S),
-    ('\u{c}', '\u{c}', WS), ('\u{d}', '\u{d}', B), ('\u{e}', '\u{1b}', BN), ('\u{1c}', '\u{1e}', B),
-    ('\u{1f}', '\u{1f}', S), ('\u{20}', '\u{20}', WS), ('\u{21}', '\u{22}', ON), ('\u{23}',
-    '\u{25}', ET), ('\u{26}', '\u{2a}', ON), ('\u{2b}', '\u{2b}', ES), ('\u{2c}', '\u{2c}', CS),
-    ('\u{2d}', '\u{2d}', ES), ('\u{2e}', '\u{2f}', CS), ('\u{30}', '\u{39}', EN), ('\u{3a}',
-    '\u{3a}', CS), ('\u{3b}', '\u{40}', ON), ('\u{41}', '\u{5a}', L), ('\u{5b}', '\u{60}', ON),
-    ('\u{61}', '\u{7a}', L), ('\u{7b}', '\u{7e}', ON), ('\u{7f}', '\u{84}', BN), ('\u{85}',
-    '\u{85}', B), ('\u{86}', '\u{9f}', BN), ('\u{a0}', '\u{a0}', CS), ('\u{a1}', '\u{a1}', ON),
-    ('\u{a2}', '\u{a5}', ET), ('\u{a6}', '\u{a9}', ON), ('\u{aa}', '\u{aa}', L), ('\u{ab}',
-    '\u{ac}', ON), ('\u{ad}', '\u{ad}', BN), ('\u{ae}', '\u{af}', ON), ('\u{b0}', '\u{b1}', ET),
-    ('\u{b2}', '\u{b3}', EN), ('\u{b4}', '\u{b4}', ON), ('\u{b5}', '\u{b5}', L), ('\u{b6}',
-    '\u{b8}', ON), ('\u{b9}', '\u{b9}', EN), ('\u{ba}', '\u{ba}', L), ('\u{bb}', '\u{bf}', ON),
-    ('\u{c0}', '\u{d6}', L), ('\u{d7}', '\u{d7}', ON), ('\u{d8}', '\u{f6}', L), ('\u{f7}', '\u{f7}',
-    ON), ('\u{f8}', '\u{2b8}', L), ('\u{2b9}', '\u{2ba}', ON), ('\u{2bb}', '\u{2c1}', L),
-    ('\u{2c2}', '\u{2cf}', ON), ('\u{2d0}', '\u{2d1}', L), ('\u{2d2}', '\u{2df}', ON), ('\u{2e0}',
-    '\u{2e4}', L), ('\u{2e5}', '\u{2ed}', ON), ('\u{2ee}', '\u{2ee}', L), ('\u{2ef}', '\u{2ff}',
-    ON), ('\u{300}', '\u{36f}', NSM), ('\u{370}', '\u{373}', L), ('\u{374}', '\u{375}', ON),
-    ('\u{376}', '\u{377}', L), ('\u{37a}', '\u{37d}', L), ('\u{37e}', '\u{37e}', ON), ('\u{37f}',
-    '\u{37f}', L), ('\u{384}', '\u{385}', ON), ('\u{386}', '\u{386}', L), ('\u{387}', '\u{387}',
-    ON), ('\u{388}', '\u{38a}', L), ('\u{38c}', '\u{38c}', L), ('\u{38e}', '\u{3a1}', L),
-    ('\u{3a3}', '\u{3f5}', L), ('\u{3f6}', '\u{3f6}', ON), ('\u{3f7}', '\u{482}', L), ('\u{483}',
-    '\u{489}', NSM), ('\u{48a}', '\u{52f}', L), ('\u{531}', '\u{556}', L), ('\u{559}', '\u{55f}',
-    L), ('\u{561}', '\u{587}', L), ('\u{589}', '\u{589}', L), ('\u{58a}', '\u{58a}', ON),
-    ('\u{58d}', '\u{58e}', ON), ('\u{58f}', '\u{58f}', ET), ('\u{590}', '\u{590}', R), ('\u{591}',
-    '\u{5bd}', NSM), ('\u{5be}', '\u{5be}', R), ('\u{5bf}', '\u{5bf}', NSM), ('\u{5c0}', '\u{5c0}',
-    R), ('\u{5c1}', '\u{5c2}', NSM), ('\u{5c3}', '\u{5c3}', R), ('\u{5c4}', '\u{5c5}', NSM),
-    ('\u{5c6}', '\u{5c6}', R), ('\u{5c7}', '\u{5c7}', NSM), ('\u{5c8}', '\u{5ff}', R), ('\u{600}',
-    '\u{605}', AN), ('\u{606}', '\u{607}', ON), ('\u{608}', '\u{608}', AL), ('\u{609}', '\u{60a}',
-    ET), ('\u{60b}', '\u{60b}', AL), ('\u{60c}', '\u{60c}', CS), ('\u{60d}', '\u{60d}', AL),
-    ('\u{60e}', '\u{60f}', ON), ('\u{610}', '\u{61a}', NSM), ('\u{61b}', '\u{64a}', AL), ('\u{64b}',
-    '\u{65f}', NSM), ('\u{660}', '\u{669}', AN), ('\u{66a}', '\u{66a}', ET), ('\u{66b}', '\u{66c}',
-    AN), ('\u{66d}', '\u{66f}', AL), ('\u{670}', '\u{670}', NSM), ('\u{671}', '\u{6d5}', AL),
-    ('\u{6d6}', '\u{6dc}', NSM), ('\u{6dd}', '\u{6dd}', AN), ('\u{6de}', '\u{6de}', ON), ('\u{6df}',
-    '\u{6e4}', NSM), ('\u{6e5}', '\u{6e6}', AL), ('\u{6e7}', '\u{6e8}', NSM), ('\u{6e9}', '\u{6e9}',
-    ON), ('\u{6ea}', '\u{6ed}', NSM), ('\u{6ee}', '\u{6ef}', AL), ('\u{6f0}', '\u{6f9}', EN),
-    ('\u{6fa}', '\u{710}', AL), ('\u{711}', '\u{711}', NSM), ('\u{712}', '\u{72f}', AL), ('\u{730}',
-    '\u{74a}', NSM), ('\u{74b}', '\u{7a5}', AL), ('\u{7a6}', '\u{7b0}', NSM), ('\u{7b1}', '\u{7bf}',
-    AL), ('\u{7c0}', '\u{7ea}', R), ('\u{7eb}', '\u{7f3}', NSM), ('\u{7f4}', '\u{7f5}', R),
-    ('\u{7f6}', '\u{7f9}', ON), ('\u{7fa}', '\u{815}', R), ('\u{816}', '\u{819}', NSM), ('\u{81a}',
-    '\u{81a}', R), ('\u{81b}', '\u{823}', NSM), ('\u{824}', '\u{824}', R), ('\u{825}', '\u{827}',
-    NSM), ('\u{828}', '\u{828}', R), ('\u{829}', '\u{82d}', NSM), ('\u{82e}', '\u{858}', R),
-    ('\u{859}', '\u{85b}', NSM), ('\u{85c}', '\u{89f}', R), ('\u{8a0}', '\u{8d3}', AL), ('\u{8d4}',
-    '\u{8e1}', NSM), ('\u{8e2}', '\u{8e2}', AN), ('\u{8e3}', '\u{902}', NSM), ('\u{903}', '\u{939}',
-    L), ('\u{93a}', '\u{93a}', NSM), ('\u{93b}', '\u{93b}', L), ('\u{93c}', '\u{93c}', NSM),
-    ('\u{93d}', '\u{940}', L), ('\u{941}', '\u{948}', NSM), ('\u{949}', '\u{94c}', L), ('\u{94d}',
-    '\u{94d}', NSM), ('\u{94e}', '\u{950}', L), ('\u{951}', '\u{957}', NSM), ('\u{958}', '\u{961}',
-    L), ('\u{962}', '\u{963}', NSM), ('\u{964}', '\u{980}', L), ('\u{981}', '\u{981}', NSM),
-    ('\u{982}', '\u{983}', L), ('\u{985}', '\u{98c}', L), ('\u{98f}', '\u{990}', L), ('\u{993}',
-    '\u{9a8}', L), ('\u{9aa}', '\u{9b0}', L), ('\u{9b2}', '\u{9b2}', L), ('\u{9b6}', '\u{9b9}', L),
-    ('\u{9bc}', '\u{9bc}', NSM), ('\u{9bd}', '\u{9c0}', L), ('\u{9c1}', '\u{9c4}', NSM), ('\u{9c7}',
-    '\u{9c8}', L), ('\u{9cb}', '\u{9cc}', L), ('\u{9cd}', '\u{9cd}', NSM), ('\u{9ce}', '\u{9ce}',
-    L), ('\u{9d7}', '\u{9d7}', L), ('\u{9dc}', '\u{9dd}', L), ('\u{9df}', '\u{9e1}', L), ('\u{9e2}',
-    '\u{9e3}', NSM), ('\u{9e6}', '\u{9f1}', L), ('\u{9f2}', '\u{9f3}', ET), ('\u{9f4}', '\u{9fa}',
-    L), ('\u{9fb}', '\u{9fb}', ET), ('\u{a01}', '\u{a02}', NSM), ('\u{a03}', '\u{a03}', L),
-    ('\u{a05}', '\u{a0a}', L), ('\u{a0f}', '\u{a10}', L), ('\u{a13}', '\u{a28}', L), ('\u{a2a}',
-    '\u{a30}', L), ('\u{a32}', '\u{a33}', L), ('\u{a35}', '\u{a36}', L), ('\u{a38}', '\u{a39}', L),
-    ('\u{a3c}', '\u{a3c}', NSM), ('\u{a3e}', '\u{a40}', L), ('\u{a41}', '\u{a42}', NSM), ('\u{a47}',
-    '\u{a48}', NSM), ('\u{a4b}', '\u{a4d}', NSM), ('\u{a51}', '\u{a51}', NSM), ('\u{a59}',
-    '\u{a5c}', L), ('\u{a5e}', '\u{a5e}', L), ('\u{a66}', '\u{a6f}', L), ('\u{a70}', '\u{a71}',
-    NSM), ('\u{a72}', '\u{a74}', L), ('\u{a75}', '\u{a75}', NSM), ('\u{a81}', '\u{a82}', NSM),
-    ('\u{a83}', '\u{a83}', L), ('\u{a85}', '\u{a8d}', L), ('\u{a8f}', '\u{a91}', L), ('\u{a93}',
-    '\u{aa8}', L), ('\u{aaa}', '\u{ab0}', L), ('\u{ab2}', '\u{ab3}', L), ('\u{ab5}', '\u{ab9}', L),
-    ('\u{abc}', '\u{abc}', NSM), ('\u{abd}', '\u{ac0}', L), ('\u{ac1}', '\u{ac5}', NSM), ('\u{ac7}',
-    '\u{ac8}', NSM), ('\u{ac9}', '\u{ac9}', L), ('\u{acb}', '\u{acc}', L), ('\u{acd}', '\u{acd}',
-    NSM), ('\u{ad0}', '\u{ad0}', L), ('\u{ae0}', '\u{ae1}', L), ('\u{ae2}', '\u{ae3}', NSM),
-    ('\u{ae6}', '\u{af0}', L), ('\u{af1}', '\u{af1}', ET), ('\u{af9}', '\u{af9}', L), ('\u{b01}',
-    '\u{b01}', NSM), ('\u{b02}', '\u{b03}', L), ('\u{b05}', '\u{b0c}', L), ('\u{b0f}', '\u{b10}',
-    L), ('\u{b13}', '\u{b28}', L), ('\u{b2a}', '\u{b30}', L), ('\u{b32}', '\u{b33}', L), ('\u{b35}',
-    '\u{b39}', L), ('\u{b3c}', '\u{b3c}', NSM), ('\u{b3d}', '\u{b3e}', L), ('\u{b3f}', '\u{b3f}',
-    NSM), ('\u{b40}', '\u{b40}', L), ('\u{b41}', '\u{b44}', NSM), ('\u{b47}', '\u{b48}', L),
-    ('\u{b4b}', '\u{b4c}', L), ('\u{b4d}', '\u{b4d}', NSM), ('\u{b56}', '\u{b56}', NSM), ('\u{b57}',
-    '\u{b57}', L), ('\u{b5c}', '\u{b5d}', L), ('\u{b5f}', '\u{b61}', L), ('\u{b62}', '\u{b63}',
-    NSM), ('\u{b66}', '\u{b77}', L), ('\u{b82}', '\u{b82}', NSM), ('\u{b83}', '\u{b83}', L),
-    ('\u{b85}', '\u{b8a}', L), ('\u{b8e}', '\u{b90}', L), ('\u{b92}', '\u{b95}', L), ('\u{b99}',
-    '\u{b9a}', L), ('\u{b9c}', '\u{b9c}', L), ('\u{b9e}', '\u{b9f}', L), ('\u{ba3}', '\u{ba4}', L),
-    ('\u{ba8}', '\u{baa}', L), ('\u{bae}', '\u{bb9}', L), ('\u{bbe}', '\u{bbf}', L), ('\u{bc0}',
-    '\u{bc0}', NSM), ('\u{bc1}', '\u{bc2}', L), ('\u{bc6}', '\u{bc8}', L), ('\u{bca}', '\u{bcc}',
-    L), ('\u{bcd}', '\u{bcd}', NSM), ('\u{bd0}', '\u{bd0}', L), ('\u{bd7}', '\u{bd7}', L),
-    ('\u{be6}', '\u{bf2}', L), ('\u{bf3}', '\u{bf8}', ON), ('\u{bf9}', '\u{bf9}', ET), ('\u{bfa}',
-    '\u{bfa}', ON), ('\u{c00}', '\u{c00}', NSM), ('\u{c01}', '\u{c03}', L), ('\u{c05}', '\u{c0c}',
-    L), ('\u{c0e}', '\u{c10}', L), ('\u{c12}', '\u{c28}', L), ('\u{c2a}', '\u{c39}', L), ('\u{c3d}',
-    '\u{c3d}', L), ('\u{c3e}', '\u{c40}', NSM), ('\u{c41}', '\u{c44}', L), ('\u{c46}', '\u{c48}',
-    NSM), ('\u{c4a}', '\u{c4d}', NSM), ('\u{c55}', '\u{c56}', NSM), ('\u{c58}', '\u{c5a}', L),
-    ('\u{c60}', '\u{c61}', L), ('\u{c62}', '\u{c63}', NSM), ('\u{c66}', '\u{c6f}', L), ('\u{c78}',
-    '\u{c7e}', ON), ('\u{c7f}', '\u{c80}', L), ('\u{c81}', '\u{c81}', NSM), ('\u{c82}', '\u{c83}',
-    L), ('\u{c85}', '\u{c8c}', L), ('\u{c8e}', '\u{c90}', L), ('\u{c92}', '\u{ca8}', L), ('\u{caa}',
-    '\u{cb3}', L), ('\u{cb5}', '\u{cb9}', L), ('\u{cbc}', '\u{cbc}', NSM), ('\u{cbd}', '\u{cc4}',
-    L), ('\u{cc6}', '\u{cc8}', L), ('\u{cca}', '\u{ccb}', L), ('\u{ccc}', '\u{ccd}', NSM),
-    ('\u{cd5}', '\u{cd6}', L), ('\u{cde}', '\u{cde}', L), ('\u{ce0}', '\u{ce1}', L), ('\u{ce2}',
-    '\u{ce3}', NSM), ('\u{ce6}', '\u{cef}', L), ('\u{cf1}', '\u{cf2}', L), ('\u{d01}', '\u{d01}',
-    NSM), ('\u{d02}', '\u{d03}', L), ('\u{d05}', '\u{d0c}', L), ('\u{d0e}', '\u{d10}', L),
-    ('\u{d12}', '\u{d3a}', L), ('\u{d3d}', '\u{d40}', L), ('\u{d41}', '\u{d44}', NSM), ('\u{d46}',
-    '\u{d48}', L), ('\u{d4a}', '\u{d4c}', L), ('\u{d4d}', '\u{d4d}', NSM), ('\u{d4e}', '\u{d4f}',
-    L), ('\u{d54}', '\u{d61}', L), ('\u{d62}', '\u{d63}', NSM), ('\u{d66}', '\u{d7f}', L),
-    ('\u{d82}', '\u{d83}', L), ('\u{d85}', '\u{d96}', L), ('\u{d9a}', '\u{db1}', L), ('\u{db3}',
-    '\u{dbb}', L), ('\u{dbd}', '\u{dbd}', L), ('\u{dc0}', '\u{dc6}', L), ('\u{dca}', '\u{dca}',
-    NSM), ('\u{dcf}', '\u{dd1}', L), ('\u{dd2}', '\u{dd4}', NSM), ('\u{dd6}', '\u{dd6}', NSM),
-    ('\u{dd8}', '\u{ddf}', L), ('\u{de6}', '\u{def}', L), ('\u{df2}', '\u{df4}', L), ('\u{e01}',
-    '\u{e30}', L), ('\u{e31}', '\u{e31}', NSM), ('\u{e32}', '\u{e33}', L), ('\u{e34}', '\u{e3a}',
-    NSM), ('\u{e3f}', '\u{e3f}', ET), ('\u{e40}', '\u{e46}', L), ('\u{e47}', '\u{e4e}', NSM),
-    ('\u{e4f}', '\u{e5b}', L), ('\u{e81}', '\u{e82}', L), ('\u{e84}', '\u{e84}', L), ('\u{e87}',
-    '\u{e88}', L), ('\u{e8a}', '\u{e8a}', L), ('\u{e8d}', '\u{e8d}', L), ('\u{e94}', '\u{e97}', L),
-    ('\u{e99}', '\u{e9f}', L), ('\u{ea1}', '\u{ea3}', L), ('\u{ea5}', '\u{ea5}', L), ('\u{ea7}',
-    '\u{ea7}', L), ('\u{eaa}', '\u{eab}', L), ('\u{ead}', '\u{eb0}', L), ('\u{eb1}', '\u{eb1}',
-    NSM), ('\u{eb2}', '\u{eb3}', L), ('\u{eb4}', '\u{eb9}', NSM), ('\u{ebb}', '\u{ebc}', NSM),
-    ('\u{ebd}', '\u{ebd}', L), ('\u{ec0}', '\u{ec4}', L), ('\u{ec6}', '\u{ec6}', L), ('\u{ec8}',
-    '\u{ecd}', NSM), ('\u{ed0}', '\u{ed9}', L), ('\u{edc}', '\u{edf}', L), ('\u{f00}', '\u{f17}',
-    L), ('\u{f18}', '\u{f19}', NSM), ('\u{f1a}', '\u{f34}', L), ('\u{f35}', '\u{f35}', NSM),
-    ('\u{f36}', '\u{f36}', L), ('\u{f37}', '\u{f37}', NSM), ('\u{f38}', '\u{f38}', L), ('\u{f39}',
-    '\u{f39}', NSM), ('\u{f3a}', '\u{f3d}', ON), ('\u{f3e}', '\u{f47}', L), ('\u{f49}', '\u{f6c}',
-    L), ('\u{f71}', '\u{f7e}', NSM), ('\u{f7f}', '\u{f7f}', L), ('\u{f80}', '\u{f84}', NSM),
-    ('\u{f85}', '\u{f85}', L), ('\u{f86}', '\u{f87}', NSM), ('\u{f88}', '\u{f8c}', L), ('\u{f8d}',
-    '\u{f97}', NSM), ('\u{f99}', '\u{fbc}', NSM), ('\u{fbe}', '\u{fc5}', L), ('\u{fc6}', '\u{fc6}',
-    NSM), ('\u{fc7}', '\u{fcc}', L), ('\u{fce}', '\u{fda}', L), ('\u{1000}', '\u{102c}', L),
-    ('\u{102d}', '\u{1030}', NSM), ('\u{1031}', '\u{1031}', L), ('\u{1032}', '\u{1037}', NSM),
-    ('\u{1038}', '\u{1038}', L), ('\u{1039}', '\u{103a}', NSM), ('\u{103b}', '\u{103c}', L),
-    ('\u{103d}', '\u{103e}', NSM), ('\u{103f}', '\u{1057}', L), ('\u{1058}', '\u{1059}', NSM),
-    ('\u{105a}', '\u{105d}', L), ('\u{105e}', '\u{1060}', NSM), ('\u{1061}', '\u{1070}', L),
-    ('\u{1071}', '\u{1074}', NSM), ('\u{1075}', '\u{1081}', L), ('\u{1082}', '\u{1082}', NSM),
-    ('\u{1083}', '\u{1084}', L), ('\u{1085}', '\u{1086}', NSM), ('\u{1087}', '\u{108c}', L),
-    ('\u{108d}', '\u{108d}', NSM), ('\u{108e}', '\u{109c}', L), ('\u{109d}', '\u{109d}', NSM),
-    ('\u{109e}', '\u{10c5}', L), ('\u{10c7}', '\u{10c7}', L), ('\u{10cd}', '\u{10cd}', L),
-    ('\u{10d0}', '\u{1248}', L), ('\u{124a}', '\u{124d}', L), ('\u{1250}', '\u{1256}', L),
-    ('\u{1258}', '\u{1258}', L), ('\u{125a}', '\u{125d}', L), ('\u{1260}', '\u{1288}', L),
-    ('\u{128a}', '\u{128d}', L), ('\u{1290}', '\u{12b0}', L), ('\u{12b2}', '\u{12b5}', L),
-    ('\u{12b8}', '\u{12be}', L), ('\u{12c0}', '\u{12c0}', L), ('\u{12c2}', '\u{12c5}', L),
-    ('\u{12c8}', '\u{12d6}', L), ('\u{12d8}', '\u{1310}', L), ('\u{1312}', '\u{1315}', L),
-    ('\u{1318}', '\u{135a}', L), ('\u{135d}', '\u{135f}', NSM), ('\u{1360}', '\u{137c}', L),
-    ('\u{1380}', '\u{138f}', L), ('\u{1390}', '\u{1399}', ON), ('\u{13a0}', '\u{13f5}', L),
-    ('\u{13f8}', '\u{13fd}', L), ('\u{1400}', '\u{1400}', ON), ('\u{1401}', '\u{167f}', L),
-    ('\u{1680}', '\u{1680}', WS), ('\u{1681}', '\u{169a}', L), ('\u{169b}', '\u{169c}', ON),
-    ('\u{16a0}', '\u{16f8}', L), ('\u{1700}', '\u{170c}', L), ('\u{170e}', '\u{1711}', L),
-    ('\u{1712}', '\u{1714}', NSM), ('\u{1720}', '\u{1731}', L), ('\u{1732}', '\u{1734}', NSM),
-    ('\u{1735}', '\u{1736}', L), ('\u{1740}', '\u{1751}', L), ('\u{1752}', '\u{1753}', NSM),
-    ('\u{1760}', '\u{176c}', L), ('\u{176e}', '\u{1770}', L), ('\u{1772}', '\u{1773}', NSM),
-    ('\u{1780}', '\u{17b3}', L), ('\u{17b4}', '\u{17b5}', NSM), ('\u{17b6}', '\u{17b6}', L),
-    ('\u{17b7}', '\u{17bd}', NSM), ('\u{17be}', '\u{17c5}', L), ('\u{17c6}', '\u{17c6}', NSM),
-    ('\u{17c7}', '\u{17c8}', L), ('\u{17c9}', '\u{17d3}', NSM), ('\u{17d4}', '\u{17da}', L),
-    ('\u{17db}', '\u{17db}', ET), ('\u{17dc}', '\u{17dc}', L), ('\u{17dd}', '\u{17dd}', NSM),
-    ('\u{17e0}', '\u{17e9}', L), ('\u{17f0}', '\u{17f9}', ON), ('\u{1800}', '\u{180a}', ON),
-    ('\u{180b}', '\u{180d}', NSM), ('\u{180e}', '\u{180e}', BN), ('\u{1810}', '\u{1819}', L),
-    ('\u{1820}', '\u{1877}', L), ('\u{1880}', '\u{1884}', L), ('\u{1885}', '\u{1886}', NSM),
-    ('\u{1887}', '\u{18a8}', L), ('\u{18a9}', '\u{18a9}', NSM), ('\u{18aa}', '\u{18aa}', L),
-    ('\u{18b0}', '\u{18f5}', L), ('\u{1900}', '\u{191e}', L), ('\u{1920}', '\u{1922}', NSM),
-    ('\u{1923}', '\u{1926}', L), ('\u{1927}', '\u{1928}', NSM), ('\u{1929}', '\u{192b}', L),
-    ('\u{1930}', '\u{1931}', L), ('\u{1932}', '\u{1932}', NSM), ('\u{1933}', '\u{1938}', L),
-    ('\u{1939}', '\u{193b}', NSM), ('\u{1940}', '\u{1940}', ON), ('\u{1944}', '\u{1945}', ON),
-    ('\u{1946}', '\u{196d}', L), ('\u{1970}', '\u{1974}', L), ('\u{1980}', '\u{19ab}', L),
-    ('\u{19b0}', '\u{19c9}', L), ('\u{19d0}', '\u{19da}', L), ('\u{19de}', '\u{19ff}', ON),
-    ('\u{1a00}', '\u{1a16}', L), ('\u{1a17}', '\u{1a18}', NSM), ('\u{1a19}', '\u{1a1a}', L),
-    ('\u{1a1b}', '\u{1a1b}', NSM), ('\u{1a1e}', '\u{1a55}', L), ('\u{1a56}', '\u{1a56}', NSM),
-    ('\u{1a57}', '\u{1a57}', L), ('\u{1a58}', '\u{1a5e}', NSM), ('\u{1a60}', '\u{1a60}', NSM),
-    ('\u{1a61}', '\u{1a61}', L), ('\u{1a62}', '\u{1a62}', NSM), ('\u{1a63}', '\u{1a64}', L),
-    ('\u{1a65}', '\u{1a6c}', NSM), ('\u{1a6d}', '\u{1a72}', L), ('\u{1a73}', '\u{1a7c}', NSM),
-    ('\u{1a7f}', '\u{1a7f}', NSM), ('\u{1a80}', '\u{1a89}', L), ('\u{1a90}', '\u{1a99}', L),
-    ('\u{1aa0}', '\u{1aad}', L), ('\u{1ab0}', '\u{1abe}', NSM), ('\u{1b00}', '\u{1b03}', NSM),
-    ('\u{1b04}', '\u{1b33}', L), ('\u{1b34}', '\u{1b34}', NSM), ('\u{1b35}', '\u{1b35}', L),
-    ('\u{1b36}', '\u{1b3a}', NSM), ('\u{1b3b}', '\u{1b3b}', L), ('\u{1b3c}', '\u{1b3c}', NSM),
-    ('\u{1b3d}', '\u{1b41}', L), ('\u{1b42}', '\u{1b42}', NSM), ('\u{1b43}', '\u{1b4b}', L),
-    ('\u{1b50}', '\u{1b6a}', L), ('\u{1b6b}', '\u{1b73}', NSM), ('\u{1b74}', '\u{1b7c}', L),
-    ('\u{1b80}', '\u{1b81}', NSM), ('\u{1b82}', '\u{1ba1}', L), ('\u{1ba2}', '\u{1ba5}', NSM),
-    ('\u{1ba6}', '\u{1ba7}', L), ('\u{1ba8}', '\u{1ba9}', NSM), ('\u{1baa}', '\u{1baa}', L),
-    ('\u{1bab}', '\u{1bad}', NSM), ('\u{1bae}', '\u{1be5}', L), ('\u{1be6}', '\u{1be6}', NSM),
-    ('\u{1be7}', '\u{1be7}', L), ('\u{1be8}', '\u{1be9}', NSM), ('\u{1bea}', '\u{1bec}', L),
-    ('\u{1bed}', '\u{1bed}', NSM), ('\u{1bee}', '\u{1bee}', L), ('\u{1bef}', '\u{1bf1}', NSM),
-    ('\u{1bf2}', '\u{1bf3}', L), ('\u{1bfc}', '\u{1c2b}', L), ('\u{1c2c}', '\u{1c33}', NSM),
-    ('\u{1c34}', '\u{1c35}', L), ('\u{1c36}', '\u{1c37}', NSM), ('\u{1c3b}', '\u{1c49}', L),
-    ('\u{1c4d}', '\u{1c88}', L), ('\u{1cc0}', '\u{1cc7}', L), ('\u{1cd0}', '\u{1cd2}', NSM),
-    ('\u{1cd3}', '\u{1cd3}', L), ('\u{1cd4}', '\u{1ce0}', NSM), ('\u{1ce1}', '\u{1ce1}', L),
-    ('\u{1ce2}', '\u{1ce8}', NSM), ('\u{1ce9}', '\u{1cec}', L), ('\u{1ced}', '\u{1ced}', NSM),
-    ('\u{1cee}', '\u{1cf3}', L), ('\u{1cf4}', '\u{1cf4}', NSM), ('\u{1cf5}', '\u{1cf6}', L),
-    ('\u{1cf8}', '\u{1cf9}', NSM), ('\u{1d00}', '\u{1dbf}', L), ('\u{1dc0}', '\u{1df5}', NSM),
-    ('\u{1dfb}', '\u{1dff}', NSM), ('\u{1e00}', '\u{1f15}', L), ('\u{1f18}', '\u{1f1d}', L),
-    ('\u{1f20}', '\u{1f45}', L), ('\u{1f48}', '\u{1f4d}', L), ('\u{1f50}', '\u{1f57}', L),
-    ('\u{1f59}', '\u{1f59}', L), ('\u{1f5b}', '\u{1f5b}', L), ('\u{1f5d}', '\u{1f5d}', L),
-    ('\u{1f5f}', '\u{1f7d}', L), ('\u{1f80}', '\u{1fb4}', L), ('\u{1fb6}', '\u{1fbc}', L),
-    ('\u{1fbd}', '\u{1fbd}', ON), ('\u{1fbe}', '\u{1fbe}', L), ('\u{1fbf}', '\u{1fc1}', ON),
-    ('\u{1fc2}', '\u{1fc4}', L), ('\u{1fc6}', '\u{1fcc}', L), ('\u{1fcd}', '\u{1fcf}', ON),
-    ('\u{1fd0}', '\u{1fd3}', L), ('\u{1fd6}', '\u{1fdb}', L), ('\u{1fdd}', '\u{1fdf}', ON),
-    ('\u{1fe0}', '\u{1fec}', L), ('\u{1fed}', '\u{1fef}', ON), ('\u{1ff2}', '\u{1ff4}', L),
-    ('\u{1ff6}', '\u{1ffc}', L), ('\u{1ffd}', '\u{1ffe}', ON), ('\u{2000}', '\u{200a}', WS),
-    ('\u{200b}', '\u{200d}', BN), ('\u{200e}', '\u{200e}', L), ('\u{200f}', '\u{200f}', R),
-    ('\u{2010}', '\u{2027}', ON), ('\u{2028}', '\u{2028}', WS), ('\u{2029}', '\u{2029}', B),
-    ('\u{202a}', '\u{202a}', LRE), ('\u{202b}', '\u{202b}', RLE), ('\u{202c}', '\u{202c}', PDF),
-    ('\u{202d}', '\u{202d}', LRO), ('\u{202e}', '\u{202e}', RLO), ('\u{202f}', '\u{202f}', CS),
-    ('\u{2030}', '\u{2034}', ET), ('\u{2035}', '\u{2043}', ON), ('\u{2044}', '\u{2044}', CS),
-    ('\u{2045}', '\u{205e}', ON), ('\u{205f}', '\u{205f}', WS), ('\u{2060}', '\u{2064}', BN),
-    ('\u{2066}', '\u{2066}', LRI), ('\u{2067}', '\u{2067}', RLI), ('\u{2068}', '\u{2068}', FSI),
-    ('\u{2069}', '\u{2069}', PDI), ('\u{206a}', '\u{206f}', BN), ('\u{2070}', '\u{2070}', EN),
-    ('\u{2071}', '\u{2071}', L), ('\u{2074}', '\u{2079}', EN), ('\u{207a}', '\u{207b}', ES),
-    ('\u{207c}', '\u{207e}', ON), ('\u{207f}', '\u{207f}', L), ('\u{2080}', '\u{2089}', EN),
-    ('\u{208a}', '\u{208b}', ES), ('\u{208c}', '\u{208e}', ON), ('\u{2090}', '\u{209c}', L),
-    ('\u{20a0}', '\u{20cf}', ET), ('\u{20d0}', '\u{20f0}', NSM), ('\u{2100}', '\u{2101}', ON),
-    ('\u{2102}', '\u{2102}', L), ('\u{2103}', '\u{2106}', ON), ('\u{2107}', '\u{2107}', L),
-    ('\u{2108}', '\u{2109}', ON), ('\u{210a}', '\u{2113}', L), ('\u{2114}', '\u{2114}', ON),
-    ('\u{2115}', '\u{2115}', L), ('\u{2116}', '\u{2118}', ON), ('\u{2119}', '\u{211d}', L),
-    ('\u{211e}', '\u{2123}', ON), ('\u{2124}', '\u{2124}', L), ('\u{2125}', '\u{2125}', ON),
-    ('\u{2126}', '\u{2126}', L), ('\u{2127}', '\u{2127}', ON), ('\u{2128}', '\u{2128}', L),
-    ('\u{2129}', '\u{2129}', ON), ('\u{212a}', '\u{212d}', L), ('\u{212e}', '\u{212e}', ET),
-    ('\u{212f}', '\u{2139}', L), ('\u{213a}', '\u{213b}', ON), ('\u{213c}', '\u{213f}', L),
-    ('\u{2140}', '\u{2144}', ON), ('\u{2145}', '\u{2149}', L), ('\u{214a}', '\u{214d}', ON),
-    ('\u{214e}', '\u{214f}', L), ('\u{2150}', '\u{215f}', ON), ('\u{2160}', '\u{2188}', L),
-    ('\u{2189}', '\u{218b}', ON), ('\u{2190}', '\u{2211}', ON), ('\u{2212}', '\u{2212}', ES),
-    ('\u{2213}', '\u{2213}', ET), ('\u{2214}', '\u{2335}', ON), ('\u{2336}', '\u{237a}', L),
-    ('\u{237b}', '\u{2394}', ON), ('\u{2395}', '\u{2395}', L), ('\u{2396}', '\u{23fe}', ON),
-    ('\u{2400}', '\u{2426}', ON), ('\u{2440}', '\u{244a}', ON), ('\u{2460}', '\u{2487}', ON),
-    ('\u{2488}', '\u{249b}', EN), ('\u{249c}', '\u{24e9}', L), ('\u{24ea}', '\u{26ab}', ON),
-    ('\u{26ac}', '\u{26ac}', L), ('\u{26ad}', '\u{27ff}', ON), ('\u{2800}', '\u{28ff}', L),
-    ('\u{2900}', '\u{2b73}', ON), ('\u{2b76}', '\u{2b95}', ON), ('\u{2b98}', '\u{2bb9}', ON),
-    ('\u{2bbd}', '\u{2bc8}', ON), ('\u{2bca}', '\u{2bd1}', ON), ('\u{2bec}', '\u{2bef}', ON),
-    ('\u{2c00}', '\u{2c2e}', L), ('\u{2c30}', '\u{2c5e}', L), ('\u{2c60}', '\u{2ce4}', L),
-    ('\u{2ce5}', '\u{2cea}', ON), ('\u{2ceb}', '\u{2cee}', L), ('\u{2cef}', '\u{2cf1}', NSM),
-    ('\u{2cf2}', '\u{2cf3}', L), ('\u{2cf9}', '\u{2cff}', ON), ('\u{2d00}', '\u{2d25}', L),
-    ('\u{2d27}', '\u{2d27}', L), ('\u{2d2d}', '\u{2d2d}', L), ('\u{2d30}', '\u{2d67}', L),
-    ('\u{2d6f}', '\u{2d70}', L), ('\u{2d7f}', '\u{2d7f}', NSM), ('\u{2d80}', '\u{2d96}', L),
-    ('\u{2da0}', '\u{2da6}', L), ('\u{2da8}', '\u{2dae}', L), ('\u{2db0}', '\u{2db6}', L),
-    ('\u{2db8}', '\u{2dbe}', L), ('\u{2dc0}', '\u{2dc6}', L), ('\u{2dc8}', '\u{2dce}', L),
-    ('\u{2dd0}', '\u{2dd6}', L), ('\u{2dd8}', '\u{2dde}', L), ('\u{2de0}', '\u{2dff}', NSM),
-    ('\u{2e00}', '\u{2e44}', ON), ('\u{2e80}', '\u{2e99}', ON), ('\u{2e9b}', '\u{2ef3}', ON),
-    ('\u{2f00}', '\u{2fd5}', ON), ('\u{2ff0}', '\u{2ffb}', ON), ('\u{3000}', '\u{3000}', WS),
-    ('\u{3001}', '\u{3004}', ON), ('\u{3005}', '\u{3007}', L), ('\u{3008}', '\u{3020}', ON),
-    ('\u{3021}', '\u{3029}', L), ('\u{302a}', '\u{302d}', NSM), ('\u{302e}', '\u{302f}', L),
-    ('\u{3030}', '\u{3030}', ON), ('\u{3031}', '\u{3035}', L), ('\u{3036}', '\u{3037}', ON),
-    ('\u{3038}', '\u{303c}', L), ('\u{303d}', '\u{303f}', ON), ('\u{3041}', '\u{3096}', L),
-    ('\u{3099}', '\u{309a}', NSM), ('\u{309b}', '\u{309c}', ON), ('\u{309d}', '\u{309f}', L),
-    ('\u{30a0}', '\u{30a0}', ON), ('\u{30a1}', '\u{30fa}', L), ('\u{30fb}', '\u{30fb}', ON),
-    ('\u{30fc}', '\u{30ff}', L), ('\u{3105}', '\u{312d}', L), ('\u{3131}', '\u{318e}', L),
-    ('\u{3190}', '\u{31ba}', L), ('\u{31c0}', '\u{31e3}', ON), ('\u{31f0}', '\u{321c}', L),
-    ('\u{321d}', '\u{321e}', ON), ('\u{3220}', '\u{324f}', L), ('\u{3250}', '\u{325f}', ON),
-    ('\u{3260}', '\u{327b}', L), ('\u{327c}', '\u{327e}', ON), ('\u{327f}', '\u{32b0}', L),
-    ('\u{32b1}', '\u{32bf}', ON), ('\u{32c0}', '\u{32cb}', L), ('\u{32cc}', '\u{32cf}', ON),
-    ('\u{32d0}', '\u{32fe}', L), ('\u{3300}', '\u{3376}', L), ('\u{3377}', '\u{337a}', ON),
-    ('\u{337b}', '\u{33dd}', L), ('\u{33de}', '\u{33df}', ON), ('\u{33e0}', '\u{33fe}', L),
-    ('\u{33ff}', '\u{33ff}', ON), ('\u{3400}', '\u{4db5}', L), ('\u{4dc0}', '\u{4dff}', ON),
-    ('\u{4e00}', '\u{9fd5}', L), ('\u{a000}', '\u{a48c}', L), ('\u{a490}', '\u{a4c6}', ON),
-    ('\u{a4d0}', '\u{a60c}', L), ('\u{a60d}', '\u{a60f}', ON), ('\u{a610}', '\u{a62b}', L),
-    ('\u{a640}', '\u{a66e}', L), ('\u{a66f}', '\u{a672}', NSM), ('\u{a673}', '\u{a673}', ON),
-    ('\u{a674}', '\u{a67d}', NSM), ('\u{a67e}', '\u{a67f}', ON), ('\u{a680}', '\u{a69d}', L),
-    ('\u{a69e}', '\u{a69f}', NSM), ('\u{a6a0}', '\u{a6ef}', L), ('\u{a6f0}', '\u{a6f1}', NSM),
-    ('\u{a6f2}', '\u{a6f7}', L), ('\u{a700}', '\u{a721}', ON), ('\u{a722}', '\u{a787}', L),
-    ('\u{a788}', '\u{a788}', ON), ('\u{a789}', '\u{a7ae}', L), ('\u{a7b0}', '\u{a7b7}', L),
-    ('\u{a7f7}', '\u{a801}', L), ('\u{a802}', '\u{a802}', NSM), ('\u{a803}', '\u{a805}', L),
-    ('\u{a806}', '\u{a806}', NSM), ('\u{a807}', '\u{a80a}', L), ('\u{a80b}', '\u{a80b}', NSM),
-    ('\u{a80c}', '\u{a824}', L), ('\u{a825}', '\u{a826}', NSM), ('\u{a827}', '\u{a827}', L),
-    ('\u{a828}', '\u{a82b}', ON), ('\u{a830}', '\u{a837}', L), ('\u{a838}', '\u{a839}', ET),
-    ('\u{a840}', '\u{a873}', L), ('\u{a874}', '\u{a877}', ON), ('\u{a880}', '\u{a8c3}', L),
-    ('\u{a8c4}', '\u{a8c5}', NSM), ('\u{a8ce}', '\u{a8d9}', L), ('\u{a8e0}', '\u{a8f1}', NSM),
-    ('\u{a8f2}', '\u{a8fd}', L), ('\u{a900}', '\u{a925}', L), ('\u{a926}', '\u{a92d}', NSM),
-    ('\u{a92e}', '\u{a946}', L), ('\u{a947}', '\u{a951}', NSM), ('\u{a952}', '\u{a953}', L),
-    ('\u{a95f}', '\u{a97c}', L), ('\u{a980}', '\u{a982}', NSM), ('\u{a983}', '\u{a9b2}', L),
-    ('\u{a9b3}', '\u{a9b3}', NSM), ('\u{a9b4}', '\u{a9b5}', L), ('\u{a9b6}', '\u{a9b9}', NSM),
-    ('\u{a9ba}', '\u{a9bb}', L), ('\u{a9bc}', '\u{a9bc}', NSM), ('\u{a9bd}', '\u{a9cd}', L),
-    ('\u{a9cf}', '\u{a9d9}', L), ('\u{a9de}', '\u{a9e4}', L), ('\u{a9e5}', '\u{a9e5}', NSM),
-    ('\u{a9e6}', '\u{a9fe}', L), ('\u{aa00}', '\u{aa28}', L), ('\u{aa29}', '\u{aa2e}', NSM),
-    ('\u{aa2f}', '\u{aa30}', L), ('\u{aa31}', '\u{aa32}', NSM), ('\u{aa33}', '\u{aa34}', L),
-    ('\u{aa35}', '\u{aa36}', NSM), ('\u{aa40}', '\u{aa42}', L), ('\u{aa43}', '\u{aa43}', NSM),
-    ('\u{aa44}', '\u{aa4b}', L), ('\u{aa4c}', '\u{aa4c}', NSM), ('\u{aa4d}', '\u{aa4d}', L),
-    ('\u{aa50}', '\u{aa59}', L), ('\u{aa5c}', '\u{aa7b}', L), ('\u{aa7c}', '\u{aa7c}', NSM),
-    ('\u{aa7d}', '\u{aaaf}', L), ('\u{aab0}', '\u{aab0}', NSM), ('\u{aab1}', '\u{aab1}', L),
-    ('\u{aab2}', '\u{aab4}', NSM), ('\u{aab5}', '\u{aab6}', L), ('\u{aab7}', '\u{aab8}', NSM),
-    ('\u{aab9}', '\u{aabd}', L), ('\u{aabe}', '\u{aabf}', NSM), ('\u{aac0}', '\u{aac0}', L),
-    ('\u{aac1}', '\u{aac1}', NSM), ('\u{aac2}', '\u{aac2}', L), ('\u{aadb}', '\u{aaeb}', L),
-    ('\u{aaec}', '\u{aaed}', NSM), ('\u{aaee}', '\u{aaf5}', L), ('\u{aaf6}', '\u{aaf6}', NSM),
-    ('\u{ab01}', '\u{ab06}', L), ('\u{ab09}', '\u{ab0e}', L), ('\u{ab11}', '\u{ab16}', L),
-    ('\u{ab20}', '\u{ab26}', L), ('\u{ab28}', '\u{ab2e}', L), ('\u{ab30}', '\u{ab65}', L),
-    ('\u{ab70}', '\u{abe4}', L), ('\u{abe5}', '\u{abe5}', NSM), ('\u{abe6}', '\u{abe7}', L),
-    ('\u{abe8}', '\u{abe8}', NSM), ('\u{abe9}', '\u{abec}', L), ('\u{abed}', '\u{abed}', NSM),
-    ('\u{abf0}', '\u{abf9}', L), ('\u{ac00}', '\u{d7a3}', L), ('\u{d7b0}', '\u{d7c6}', L),
-    ('\u{d7cb}', '\u{d7fb}', L), ('\u{e000}', '\u{fa6d}', L), ('\u{fa70}', '\u{fad9}', L),
-    ('\u{fb00}', '\u{fb06}', L), ('\u{fb13}', '\u{fb17}', L), ('\u{fb1d}', '\u{fb1d}', R),
-    ('\u{fb1e}', '\u{fb1e}', NSM), ('\u{fb1f}', '\u{fb28}', R), ('\u{fb29}', '\u{fb29}', ES),
-    ('\u{fb2a}', '\u{fb4f}', R), ('\u{fb50}', '\u{fd3d}', AL), ('\u{fd3e}', '\u{fd3f}', ON),
-    ('\u{fd40}', '\u{fdcf}', AL), ('\u{fdf0}', '\u{fdfc}', AL), ('\u{fdfd}', '\u{fdfd}', ON),
-    ('\u{fdfe}', '\u{fdff}', AL), ('\u{fe00}', '\u{fe0f}', NSM), ('\u{fe10}', '\u{fe19}', ON),
-    ('\u{fe20}', '\u{fe2f}', NSM), ('\u{fe30}', '\u{fe4f}', ON), ('\u{fe50}', '\u{fe50}', CS),
-    ('\u{fe51}', '\u{fe51}', ON), ('\u{fe52}', '\u{fe52}', CS), ('\u{fe54}', '\u{fe54}', ON),
-    ('\u{fe55}', '\u{fe55}', CS), ('\u{fe56}', '\u{fe5e}', ON), ('\u{fe5f}', '\u{fe5f}', ET),
-    ('\u{fe60}', '\u{fe61}', ON), ('\u{fe62}', '\u{fe63}', ES), ('\u{fe64}', '\u{fe66}', ON),
-    ('\u{fe68}', '\u{fe68}', ON), ('\u{fe69}', '\u{fe6a}', ET), ('\u{fe6b}', '\u{fe6b}', ON),
-    ('\u{fe70}', '\u{fefe}', AL), ('\u{feff}', '\u{feff}', BN), ('\u{ff01}', '\u{ff02}', ON),
-    ('\u{ff03}', '\u{ff05}', ET), ('\u{ff06}', '\u{ff0a}', ON), ('\u{ff0b}', '\u{ff0b}', ES),
-    ('\u{ff0c}', '\u{ff0c}', CS), ('\u{ff0d}', '\u{ff0d}', ES), ('\u{ff0e}', '\u{ff0f}', CS),
-    ('\u{ff10}', '\u{ff19}', EN), ('\u{ff1a}', '\u{ff1a}', CS), ('\u{ff1b}', '\u{ff20}', ON),
-    ('\u{ff21}', '\u{ff3a}', L), ('\u{ff3b}', '\u{ff40}', ON), ('\u{ff41}', '\u{ff5a}', L),
-    ('\u{ff5b}', '\u{ff65}', ON), ('\u{ff66}', '\u{ffbe}', L), ('\u{ffc2}', '\u{ffc7}', L),
-    ('\u{ffca}', '\u{ffcf}', L), ('\u{ffd2}', '\u{ffd7}', L), ('\u{ffda}', '\u{ffdc}', L),
-    ('\u{ffe0}', '\u{ffe1}', ET), ('\u{ffe2}', '\u{ffe4}', ON), ('\u{ffe5}', '\u{ffe6}', ET),
-    ('\u{ffe8}', '\u{ffee}', ON), ('\u{fff9}', '\u{fffd}', ON), ('\u{10000}', '\u{1000b}', L),
-    ('\u{1000d}', '\u{10026}', L), ('\u{10028}', '\u{1003a}', L), ('\u{1003c}', '\u{1003d}', L),
-    ('\u{1003f}', '\u{1004d}', L), ('\u{10050}', '\u{1005d}', L), ('\u{10080}', '\u{100fa}', L),
-    ('\u{10100}', '\u{10100}', L), ('\u{10101}', '\u{10101}', ON), ('\u{10102}', '\u{10102}', L),
-    ('\u{10107}', '\u{10133}', L), ('\u{10137}', '\u{1013f}', L), ('\u{10140}', '\u{1018c}', ON),
-    ('\u{1018d}', '\u{1018e}', L), ('\u{10190}', '\u{1019b}', ON), ('\u{101a0}', '\u{101a0}', ON),
-    ('\u{101d0}', '\u{101fc}', L), ('\u{101fd}', '\u{101fd}', NSM), ('\u{10280}', '\u{1029c}', L),
-    ('\u{102a0}', '\u{102d0}', L), ('\u{102e0}', '\u{102e0}', NSM), ('\u{102e1}', '\u{102fb}', EN),
-    ('\u{10300}', '\u{10323}', L), ('\u{10330}', '\u{1034a}', L), ('\u{10350}', '\u{10375}', L),
-    ('\u{10376}', '\u{1037a}', NSM), ('\u{10380}', '\u{1039d}', L), ('\u{1039f}', '\u{103c3}', L),
-    ('\u{103c8}', '\u{103d5}', L), ('\u{10400}', '\u{1049d}', L), ('\u{104a0}', '\u{104a9}', L),
-    ('\u{104b0}', '\u{104d3}', L), ('\u{104d8}', '\u{104fb}', L), ('\u{10500}', '\u{10527}', L),
-    ('\u{10530}', '\u{10563}', L), ('\u{1056f}', '\u{1056f}', L), ('\u{10600}', '\u{10736}', L),
-    ('\u{10740}', '\u{10755}', L), ('\u{10760}', '\u{10767}', L), ('\u{10800}', '\u{1091e}', R),
-    ('\u{1091f}', '\u{1091f}', ON), ('\u{10920}', '\u{10a00}', R), ('\u{10a01}', '\u{10a03}', NSM),
-    ('\u{10a04}', '\u{10a04}', R), ('\u{10a05}', '\u{10a06}', NSM), ('\u{10a07}', '\u{10a0b}', R),
-    ('\u{10a0c}', '\u{10a0f}', NSM), ('\u{10a10}', '\u{10a37}', R), ('\u{10a38}', '\u{10a3a}', NSM),
-    ('\u{10a3b}', '\u{10a3e}', R), ('\u{10a3f}', '\u{10a3f}', NSM), ('\u{10a40}', '\u{10ae4}', R),
-    ('\u{10ae5}', '\u{10ae6}', NSM), ('\u{10ae7}', '\u{10b38}', R), ('\u{10b39}', '\u{10b3f}', ON),
-    ('\u{10b40}', '\u{10e5f}', R), ('\u{10e60}', '\u{10e7e}', AN), ('\u{10e7f}', '\u{10fff}', R),
-    ('\u{11000}', '\u{11000}', L), ('\u{11001}', '\u{11001}', NSM), ('\u{11002}', '\u{11037}', L),
-    ('\u{11038}', '\u{11046}', NSM), ('\u{11047}', '\u{1104d}', L), ('\u{11052}', '\u{11065}', ON),
-    ('\u{11066}', '\u{1106f}', L), ('\u{1107f}', '\u{11081}', NSM), ('\u{11082}', '\u{110b2}', L),
-    ('\u{110b3}', '\u{110b6}', NSM), ('\u{110b7}', '\u{110b8}', L), ('\u{110b9}', '\u{110ba}', NSM),
-    ('\u{110bb}', '\u{110c1}', L), ('\u{110d0}', '\u{110e8}', L), ('\u{110f0}', '\u{110f9}', L),
-    ('\u{11100}', '\u{11102}', NSM), ('\u{11103}', '\u{11126}', L), ('\u{11127}', '\u{1112b}', NSM),
-    ('\u{1112c}', '\u{1112c}', L), ('\u{1112d}', '\u{11134}', NSM), ('\u{11136}', '\u{11143}', L),
-    ('\u{11150}', '\u{11172}', L), ('\u{11173}', '\u{11173}', NSM), ('\u{11174}', '\u{11176}', L),
-    ('\u{11180}', '\u{11181}', NSM), ('\u{11182}', '\u{111b5}', L), ('\u{111b6}', '\u{111be}', NSM),
-    ('\u{111bf}', '\u{111c9}', L), ('\u{111ca}', '\u{111cc}', NSM), ('\u{111cd}', '\u{111cd}', L),
-    ('\u{111d0}', '\u{111df}', L), ('\u{111e1}', '\u{111f4}', L), ('\u{11200}', '\u{11211}', L),
-    ('\u{11213}', '\u{1122e}', L), ('\u{1122f}', '\u{11231}', NSM), ('\u{11232}', '\u{11233}', L),
-    ('\u{11234}', '\u{11234}', NSM), ('\u{11235}', '\u{11235}', L), ('\u{11236}', '\u{11237}', NSM),
-    ('\u{11238}', '\u{1123d}', L), ('\u{1123e}', '\u{1123e}', NSM), ('\u{11280}', '\u{11286}', L),
-    ('\u{11288}', '\u{11288}', L), ('\u{1128a}', '\u{1128d}', L), ('\u{1128f}', '\u{1129d}', L),
-    ('\u{1129f}', '\u{112a9}', L), ('\u{112b0}', '\u{112de}', L), ('\u{112df}', '\u{112df}', NSM),
-    ('\u{112e0}', '\u{112e2}', L), ('\u{112e3}', '\u{112ea}', NSM), ('\u{112f0}', '\u{112f9}', L),
-    ('\u{11300}', '\u{11301}', NSM), ('\u{11302}', '\u{11303}', L), ('\u{11305}', '\u{1130c}', L),
-    ('\u{1130f}', '\u{11310}', L), ('\u{11313}', '\u{11328}', L), ('\u{1132a}', '\u{11330}', L),
-    ('\u{11332}', '\u{11333}', L), ('\u{11335}', '\u{11339}', L), ('\u{1133c}', '\u{1133c}', NSM),
-    ('\u{1133d}', '\u{1133f}', L), ('\u{11340}', '\u{11340}', NSM), ('\u{11341}', '\u{11344}', L),
-    ('\u{11347}', '\u{11348}', L), ('\u{1134b}', '\u{1134d}', L), ('\u{11350}', '\u{11350}', L),
-    ('\u{11357}', '\u{11357}', L), ('\u{1135d}', '\u{11363}', L), ('\u{11366}', '\u{1136c}', NSM),
-    ('\u{11370}', '\u{11374}', NSM), ('\u{11400}', '\u{11437}', L), ('\u{11438}', '\u{1143f}', NSM),
-    ('\u{11440}', '\u{11441}', L), ('\u{11442}', '\u{11444}', NSM), ('\u{11445}', '\u{11445}', L),
-    ('\u{11446}', '\u{11446}', NSM), ('\u{11447}', '\u{11459}', L), ('\u{1145b}', '\u{1145b}', L),
-    ('\u{1145d}', '\u{1145d}', L), ('\u{11480}', '\u{114b2}', L), ('\u{114b3}', '\u{114b8}', NSM),
-    ('\u{114b9}', '\u{114b9}', L), ('\u{114ba}', '\u{114ba}', NSM), ('\u{114bb}', '\u{114be}', L),
-    ('\u{114bf}', '\u{114c0}', NSM), ('\u{114c1}', '\u{114c1}', L), ('\u{114c2}', '\u{114c3}', NSM),
-    ('\u{114c4}', '\u{114c7}', L), ('\u{114d0}', '\u{114d9}', L), ('\u{11580}', '\u{115b1}', L),
-    ('\u{115b2}', '\u{115b5}', NSM), ('\u{115b8}', '\u{115bb}', L), ('\u{115bc}', '\u{115bd}', NSM),
-    ('\u{115be}', '\u{115be}', L), ('\u{115bf}', '\u{115c0}', NSM), ('\u{115c1}', '\u{115db}', L),
-    ('\u{115dc}', '\u{115dd}', NSM), ('\u{11600}', '\u{11632}', L), ('\u{11633}', '\u{1163a}', NSM),
-    ('\u{1163b}', '\u{1163c}', L), ('\u{1163d}', '\u{1163d}', NSM), ('\u{1163e}', '\u{1163e}', L),
-    ('\u{1163f}', '\u{11640}', NSM), ('\u{11641}', '\u{11644}', L), ('\u{11650}', '\u{11659}', L),
-    ('\u{11660}', '\u{1166c}', ON), ('\u{11680}', '\u{116aa}', L), ('\u{116ab}', '\u{116ab}', NSM),
-    ('\u{116ac}', '\u{116ac}', L), ('\u{116ad}', '\u{116ad}', NSM), ('\u{116ae}', '\u{116af}', L),
-    ('\u{116b0}', '\u{116b5}', NSM), ('\u{116b6}', '\u{116b6}', L), ('\u{116b7}', '\u{116b7}', NSM),
-    ('\u{116c0}', '\u{116c9}', L), ('\u{11700}', '\u{11719}', L), ('\u{1171d}', '\u{1171f}', NSM),
-    ('\u{11720}', '\u{11721}', L), ('\u{11722}', '\u{11725}', NSM), ('\u{11726}', '\u{11726}', L),
-    ('\u{11727}', '\u{1172b}', NSM), ('\u{11730}', '\u{1173f}', L), ('\u{118a0}', '\u{118f2}', L),
-    ('\u{118ff}', '\u{118ff}', L), ('\u{11ac0}', '\u{11af8}', L), ('\u{11c00}', '\u{11c08}', L),
-    ('\u{11c0a}', '\u{11c2f}', L), ('\u{11c30}', '\u{11c36}', NSM), ('\u{11c38}', '\u{11c3d}', NSM),
-    ('\u{11c3e}', '\u{11c45}', L), ('\u{11c50}', '\u{11c6c}', L), ('\u{11c70}', '\u{11c8f}', L),
-    ('\u{11c92}', '\u{11ca7}', NSM), ('\u{11ca9}', '\u{11ca9}', L), ('\u{11caa}', '\u{11cb0}', NSM),
-    ('\u{11cb1}', '\u{11cb1}', L), ('\u{11cb2}', '\u{11cb3}', NSM), ('\u{11cb4}', '\u{11cb4}', L),
-    ('\u{11cb5}', '\u{11cb6}', NSM), ('\u{12000}', '\u{12399}', L), ('\u{12400}', '\u{1246e}', L),
-    ('\u{12470}', '\u{12474}', L), ('\u{12480}', '\u{12543}', L), ('\u{13000}', '\u{1342e}', L),
-    ('\u{14400}', '\u{14646}', L), ('\u{16800}', '\u{16a38}', L), ('\u{16a40}', '\u{16a5e}', L),
-    ('\u{16a60}', '\u{16a69}', L), ('\u{16a6e}', '\u{16a6f}', L), ('\u{16ad0}', '\u{16aed}', L),
-    ('\u{16af0}', '\u{16af4}', NSM), ('\u{16af5}', '\u{16af5}', L), ('\u{16b00}', '\u{16b2f}', L),
-    ('\u{16b30}', '\u{16b36}', NSM), ('\u{16b37}', '\u{16b45}', L), ('\u{16b50}', '\u{16b59}', L),
-    ('\u{16b5b}', '\u{16b61}', L), ('\u{16b63}', '\u{16b77}', L), ('\u{16b7d}', '\u{16b8f}', L),
-    ('\u{16f00}', '\u{16f44}', L), ('\u{16f50}', '\u{16f7e}', L), ('\u{16f8f}', '\u{16f92}', NSM),
-    ('\u{16f93}', '\u{16f9f}', L), ('\u{16fe0}', '\u{16fe0}', L), ('\u{17000}', '\u{187ec}', L),
-    ('\u{18800}', '\u{18af2}', L), ('\u{1b000}', '\u{1b001}', L), ('\u{1bc00}', '\u{1bc6a}', L),
-    ('\u{1bc70}', '\u{1bc7c}', L), ('\u{1bc80}', '\u{1bc88}', L), ('\u{1bc90}', '\u{1bc99}', L),
-    ('\u{1bc9c}', '\u{1bc9c}', L), ('\u{1bc9d}', '\u{1bc9e}', NSM), ('\u{1bc9f}', '\u{1bc9f}', L),
-    ('\u{1bca0}', '\u{1bca3}', BN), ('\u{1d000}', '\u{1d0f5}', L), ('\u{1d100}', '\u{1d126}', L),
-    ('\u{1d129}', '\u{1d166}', L), ('\u{1d167}', '\u{1d169}', NSM), ('\u{1d16a}', '\u{1d172}', L),
-    ('\u{1d173}', '\u{1d17a}', BN), ('\u{1d17b}', '\u{1d182}', NSM), ('\u{1d183}', '\u{1d184}', L),
-    ('\u{1d185}', '\u{1d18b}', NSM), ('\u{1d18c}', '\u{1d1a9}', L), ('\u{1d1aa}', '\u{1d1ad}', NSM),
-    ('\u{1d1ae}', '\u{1d1e8}', L), ('\u{1d200}', '\u{1d241}', ON), ('\u{1d242}', '\u{1d244}', NSM),
-    ('\u{1d245}', '\u{1d245}', ON), ('\u{1d300}', '\u{1d356}', ON), ('\u{1d360}', '\u{1d371}', L),
-    ('\u{1d400}', '\u{1d454}', L), ('\u{1d456}', '\u{1d49c}', L), ('\u{1d49e}', '\u{1d49f}', L),
-    ('\u{1d4a2}', '\u{1d4a2}', L), ('\u{1d4a5}', '\u{1d4a6}', L), ('\u{1d4a9}', '\u{1d4ac}', L),
-    ('\u{1d4ae}', '\u{1d4b9}', L), ('\u{1d4bb}', '\u{1d4bb}', L), ('\u{1d4bd}', '\u{1d4c3}', L),
-    ('\u{1d4c5}', '\u{1d505}', L), ('\u{1d507}', '\u{1d50a}', L), ('\u{1d50d}', '\u{1d514}', L),
-    ('\u{1d516}', '\u{1d51c}', L), ('\u{1d51e}', '\u{1d539}', L), ('\u{1d53b}', '\u{1d53e}', L),
-    ('\u{1d540}', '\u{1d544}', L), ('\u{1d546}', '\u{1d546}', L), ('\u{1d54a}', '\u{1d550}', L),
-    ('\u{1d552}', '\u{1d6a5}', L), ('\u{1d6a8}', '\u{1d6da}', L), ('\u{1d6db}', '\u{1d6db}', ON),
-    ('\u{1d6dc}', '\u{1d714}', L), ('\u{1d715}', '\u{1d715}', ON), ('\u{1d716}', '\u{1d74e}', L),
-    ('\u{1d74f}', '\u{1d74f}', ON), ('\u{1d750}', '\u{1d788}', L), ('\u{1d789}', '\u{1d789}', ON),
-    ('\u{1d78a}', '\u{1d7c2}', L), ('\u{1d7c3}', '\u{1d7c3}', ON), ('\u{1d7c4}', '\u{1d7cb}', L),
-    ('\u{1d7ce}', '\u{1d7ff}', EN), ('\u{1d800}', '\u{1d9ff}', L), ('\u{1da00}', '\u{1da36}', NSM),
-    ('\u{1da37}', '\u{1da3a}', L), ('\u{1da3b}', '\u{1da6c}', NSM), ('\u{1da6d}', '\u{1da74}', L),
-    ('\u{1da75}', '\u{1da75}', NSM), ('\u{1da76}', '\u{1da83}', L), ('\u{1da84}', '\u{1da84}', NSM),
-    ('\u{1da85}', '\u{1da8b}', L), ('\u{1da9b}', '\u{1da9f}', NSM), ('\u{1daa1}', '\u{1daaf}', NSM),
-    ('\u{1e000}', '\u{1e006}', NSM), ('\u{1e008}', '\u{1e018}', NSM), ('\u{1e01b}', '\u{1e021}',
-    NSM), ('\u{1e023}', '\u{1e024}', NSM), ('\u{1e026}', '\u{1e02a}', NSM), ('\u{1e800}',
-    '\u{1e8cf}', R), ('\u{1e8d0}', '\u{1e8d6}', NSM), ('\u{1e8d7}', '\u{1e943}', R), ('\u{1e944}',
-    '\u{1e94a}', NSM), ('\u{1e94b}', '\u{1edff}', R), ('\u{1ee00}', '\u{1eeef}', AL), ('\u{1eef0}',
-    '\u{1eef1}', ON), ('\u{1eef2}', '\u{1eeff}', AL), ('\u{1ef00}', '\u{1efff}', R), ('\u{1f000}',
-    '\u{1f02b}', ON), ('\u{1f030}', '\u{1f093}', ON), ('\u{1f0a0}', '\u{1f0ae}', ON), ('\u{1f0b1}',
-    '\u{1f0bf}', ON), ('\u{1f0c1}', '\u{1f0cf}', ON), ('\u{1f0d1}', '\u{1f0f5}', ON), ('\u{1f100}',
-    '\u{1f10a}', EN), ('\u{1f10b}', '\u{1f10c}', ON), ('\u{1f110}', '\u{1f12e}', L), ('\u{1f130}',
-    '\u{1f169}', L), ('\u{1f16a}', '\u{1f16b}', ON), ('\u{1f170}', '\u{1f1ac}', L), ('\u{1f1e6}',
-    '\u{1f202}', L), ('\u{1f210}', '\u{1f23b}', L), ('\u{1f240}', '\u{1f248}', L), ('\u{1f250}',
-    '\u{1f251}', L), ('\u{1f300}', '\u{1f6d2}', ON), ('\u{1f6e0}', '\u{1f6ec}', ON), ('\u{1f6f0}',
-    '\u{1f6f6}', ON), ('\u{1f700}', '\u{1f773}', ON), ('\u{1f780}', '\u{1f7d4}', ON), ('\u{1f800}',
-    '\u{1f80b}', ON), ('\u{1f810}', '\u{1f847}', ON), ('\u{1f850}', '\u{1f859}', ON), ('\u{1f860}',
-    '\u{1f887}', ON), ('\u{1f890}', '\u{1f8ad}', ON), ('\u{1f910}', '\u{1f91e}', ON), ('\u{1f920}',
-    '\u{1f927}', ON), ('\u{1f930}', '\u{1f930}', ON), ('\u{1f933}', '\u{1f93e}', ON), ('\u{1f940}',
-    '\u{1f94b}', ON), ('\u{1f950}', '\u{1f95e}', ON), ('\u{1f980}', '\u{1f991}', ON), ('\u{1f9c0}',
-    '\u{1f9c0}', ON), ('\u{20000}', '\u{2a6d6}', L), ('\u{2a700}', '\u{2b734}', L), ('\u{2b740}',
-    '\u{2b81d}', L), ('\u{2b820}', '\u{2cea1}', L), ('\u{2f800}', '\u{2fa1d}', L), ('\u{e0001}',
-    '\u{e0001}', BN), ('\u{e0020}', '\u{e007f}', BN), ('\u{e0100}', '\u{e01ef}', NSM), ('\u{f0000}',
-    '\u{ffffd}', L), ('\u{100000}', '\u{10fffd}', L)
-];
-
deleted file mode 100644
--- a/third_party/rust/unicode-bidi-0.3.3/src/deprecated.rs
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright 2015 The Servo Project Developers. See the
-// COPYRIGHT file at the top-level directory of this distribution.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! This module holds deprecated assets only.
-
-use super::*;
-
-/// Find the level runs within a line and return them in visual order.
-///
-/// NOTE: This implementation is incomplete. The algorithm needs information about the text,
-/// including original BidiClass property of each character, to be able to perform correctly.
-/// Please see [`BidiInfo::visual_runs()`](../struct.BidiInfo.html#method.visual_runs) for the
-/// improved implementation.
-///
-/// `line` is a range of bytes indices within `levels`.
-///
-/// http://www.unicode.org/reports/tr9/#Reordering_Resolved_Levels
-#[deprecated(since="0.3.0", note="please use `BidiInfo::visual_runs()` instead.")]
-pub fn visual_runs(line: Range<usize>, levels: &[Level]) -> Vec<LevelRun> {
-    assert!(line.start <= levels.len());
-    assert!(line.end <= levels.len());
-
-    let mut runs = Vec::new();
-
-    // Find consecutive level runs.
-    let mut start = line.start;
-    let mut level = levels[start];
-    let mut min_level = level;
-    let mut max_level = level;
-
-    for i in (start + 1)..line.end {
-        let new_level = levels[i];
-        if new_level != level {
-            // End of the previous run, start of a new one.
-            runs.push(start..i);
-            start = i;
-            level = new_level;
-
-            min_level = min(level, min_level);
-            max_level = max(level, max_level);
-        }
-    }
-    runs.push(start..line.end);
-
-    let run_count = runs.len();
-
-    // Re-order the odd runs.
-    // http://www.unicode.org/reports/tr9/#L2
-
-    // Stop at the lowest *odd* level.
-    min_level = min_level.new_lowest_ge_rtl().expect("Level error");
-
-    while max_level >= min_level {
-        // Look for the start of a sequence of consecutive runs of max_level or higher.
-        let mut seq_start = 0;
-        while seq_start < run_count {
-            if levels[runs[seq_start].start] < max_level {
-                seq_start += 1;
-                continue;
-            }
-
-            // Found the start of a sequence. Now find the end.
-            let mut seq_end = seq_start + 1;
-            while seq_end < run_count {
-                if levels[runs[seq_end].start] < max_level {
-                    break;
-                }
-                seq_end += 1;
-            }
-
-            // Reverse the runs within this sequence.
-            runs[seq_start..seq_end].reverse();
-
-            seq_start = seq_end;
-        }
-        max_level
-            .lower(1)
-            .expect("Lowering embedding level below zero");
-    }
-
-    runs
-}
deleted file mode 100644
--- a/third_party/rust/unicode-bidi-0.3.3/src/explicit.rs
+++ /dev/null
@@ -1,189 +0,0 @@
-// Copyright 2015 The Servo Project Developers. See the
-// COPYRIGHT file at the top-level directory of this distribution.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! 3.3.2 Explicit Levels and Directions
-//!
-//! http://www.unicode.org/reports/tr9/#Explicit_Levels_and_Directions
-
-use super::char_data::{BidiClass, is_rtl};
-use super::level::Level;
-
-use BidiClass::*;
-
-/// Compute explicit embedding levels for one paragraph of text (X1-X8).
-///
-/// `processing_classes[i]` must contain the BidiClass of the char at byte index `i`,
-/// for each char in `text`.
-pub fn compute(
-    text: &str,
-    para_level: Level,
-    original_classes: &[BidiClass],
-    levels: &mut [Level],
-    processing_classes: &mut [BidiClass],
-) {
-    assert!(text.len() == original_classes.len());
-
-    // http://www.unicode.org/reports/tr9/#X1
-    let mut stack = DirectionalStatusStack::new();
-    stack.push(para_level, OverrideStatus::Neutral);
-
-    let mut overflow_isolate_count = 0u32;
-    let mut overflow_embedding_count = 0u32;
-    let mut valid_isolate_count = 0u32;
-
-    for (i, c) in text.char_indices() {
-        match original_classes[i] {
-
-            // Rules X2-X5c
-            RLE | LRE | RLO | LRO | RLI | LRI | FSI => {
-                let last_level = stack.last().level;
-
-                // X5a-X5c: Isolate initiators get the level of the last entry on the stack.
-                let is_isolate = matches!(original_classes[i], RLI | LRI | FSI);
-                if is_isolate {
-                    levels[i] = last_level;
-                    match stack.last().status {
-                        OverrideStatus::RTL => processing_classes[i] = R,
-                        OverrideStatus::LTR => processing_classes[i] = L,
-                        _ => {}
-                    }
-                }
-
-                let new_level = if is_rtl(original_classes[i]) {
-                    last_level.new_explicit_next_rtl()
-                } else {
-                    last_level.new_explicit_next_ltr()
-                };
-                if new_level.is_ok() && overflow_isolate_count == 0 &&
-                   overflow_embedding_count == 0 {
-                    let new_level = new_level.unwrap();
-                    stack.push(
-                        new_level, match original_classes[i] {
-                            RLO => OverrideStatus::RTL,
-                            LRO => OverrideStatus::LTR,
-                            RLI | LRI | FSI => OverrideStatus::Isolate,
-                            _ => OverrideStatus::Neutral,
-                        }
-                    );
-                    if is_isolate {
-                        valid_isolate_count += 1;
-                    } else {
-                        // The spec doesn't explicitly mention this step, but it is necessary.
-                        // See the reference implementations for comparison.
-                        levels[i] = new_level;
-                    }
-                } else if is_isolate {
-                    overflow_isolate_count += 1;
-                } else if overflow_isolate_count == 0 {
-                    overflow_embedding_count += 1;
-                }
-            }
-
-            // http://www.unicode.org/reports/tr9/#X6a
-            PDI => {
-                if overflow_isolate_count > 0 {
-                    overflow_isolate_count -= 1;
-                } else if valid_isolate_count > 0 {
-                    overflow_embedding_count = 0;
-                    loop {
-                        // Pop everything up to and including the last Isolate status.
-                        match stack.vec.pop() {
-                            Some(Status { status: OverrideStatus::Isolate, .. }) => break,
-                            None => break,
-                            _ => continue,
-                        }
-                    }
-                    valid_isolate_count -= 1;
-                }
-                let last = stack.last();
-                levels[i] = last.level;
-                match last.status {
-                    OverrideStatus::RTL => processing_classes[i] = R,
-                    OverrideStatus::LTR => processing_classes[i] = L,
-                    _ => {}
-                }
-            }
-
-            // http://www.unicode.org/reports/tr9/#X7
-            PDF => {
-                if overflow_isolate_count > 0 {
-                    continue;
-                }
-                if overflow_embedding_count > 0 {
-                    overflow_embedding_count -= 1;
-                    continue;
-                }
-                if stack.last().status != OverrideStatus::Isolate && stack.vec.len() >= 2 {
-                    stack.vec.pop();
-                }
-                // The spec doesn't explicitly mention this step, but it is necessary.
-                // See the reference implementations for comparison.
-                levels[i] = stack.last().level;
-            }
-
-            // Nothing
-            B | BN => {}
-
-            // http://www.unicode.org/reports/tr9/#X6
-            _ => {
-                let last = stack.last();
-                levels[i] = last.level;
-                match last.status {
-                    OverrideStatus::RTL => processing_classes[i] = R,
-                    OverrideStatus::LTR => processing_classes[i] = L,
-                    _ => {}
-                }
-            }
-        }
-
-        // Handle multi-byte characters.
-        for j in 1..c.len_utf8() {
-            levels[i + j] = levels[i];
-            processing_classes[i + j] = processing_classes[i];
-        }
-    }
-}
-
-/// Entries in the directional status stack:
-struct Status {
-    level: Level,
-    status: OverrideStatus,
-}
-
-#[derive(PartialEq)]
-enum OverrideStatus {
-    Neutral,
-    RTL,
-    LTR,
-    Isolate,
-}
-
-struct DirectionalStatusStack {
-    vec: Vec<Status>,
-}
-
-impl DirectionalStatusStack {
-    fn new() -> Self {
-        DirectionalStatusStack { vec: Vec::with_capacity(Level::max_explicit_depth() as usize + 2) }
-    }
-
-    fn push(&mut self, level: Level, status: OverrideStatus) {
-        self.vec
-            .push(
-                Status {
-                    level: level,
-                    status: status,
-                }
-            );
-    }
-
-    fn last(&self) -> &Status {
-        self.vec.last().unwrap()
-    }
-}
deleted file mode 100644
--- a/third_party/rust/unicode-bidi-0.3.3/src/format_chars.rs
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2014 The html5ever Project Developers. See the
-// COPYRIGHT file at the top-level directory of this distribution.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! Directional Formatting Characters
-//!
-//! http://www.unicode.org/reports/tr9/#Directional_Formatting_Characters
-
-// == Implicit ==
-/// ARABIC LETTER MARK
-pub const ALM: char = '\u{061C}';
-/// LEFT-TO-RIGHT MARK
-pub const LRM: char = '\u{200E}';
-/// RIGHT-TO-LEFT MARK
-pub const RLM: char = '\u{200F}';
-
-// == Explicit Isolates ==
-/// LEFT‑TO‑RIGHT ISOLATE
-pub const LRI: char = '\u{2066}';
-/// RIGHT‑TO‑LEFT ISOLATE
-pub const RLI: char = '\u{2067}';
-/// FIRST STRONG ISOLATE
-pub const FSI: char = '\u{2068}';
-/// POP DIRECTIONAL ISOLATE
-pub const PDI: char = '\u{2069}';
-
-// == Explicit Embeddings and Overrides ==
-/// LEFT-TO-RIGHT EMBEDDING
-pub const LRE: char = '\u{202A}';
-/// RIGHT-TO-LEFT EMBEDDING
-pub const RLE: char = '\u{202B}';
-/// POP DIRECTIONAL FORMATTING
-pub const PDF: char = '\u{202C}';
-/// LEFT-TO-RIGHT OVERRIDE
-pub const LRO: char = '\u{202D}';
-/// RIGHT-TO-LEFT OVERRIDE
-pub const RLO: char = '\u{202E}';
deleted file mode 100644
--- a/third_party/rust/unicode-bidi-0.3.3/src/implicit.rs
+++ /dev/null
@@ -1,229 +0,0 @@
-// Copyright 2015 The Servo Project Developers. See the
-// COPYRIGHT file at the top-level directory of this distribution.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! 3.3.4 - 3.3.6. Resolve implicit levels and types.
-
-use std::cmp::max;
-
-use super::char_data::BidiClass;
-use super::prepare::{IsolatingRunSequence, LevelRun, not_removed_by_x9, removed_by_x9};
-use super::level::Level;
-
-use BidiClass::*;
-
-/// 3.3.4 Resolving Weak Types
-///
-/// http://www.unicode.org/reports/tr9/#Resolving_Weak_Types
-pub fn resolve_weak(sequence: &IsolatingRunSequence, processing_classes: &mut [BidiClass]) {
-    // FIXME (#8): This function applies steps W1-W6 in a single pass.  This can produce
-    // incorrect results in cases where a "later" rule changes the value of `prev_class` seen
-    // by an "earlier" rule.  We should either split this into separate passes, or preserve
-    // extra state so each rule can see the correct previous class.
-
-    // FIXME: Also, this could be the cause of increased failure for using longer-UTF-8 chars in
-    // conformance tests, like BidiTest:69635 (AL ET EN)
-
-    let mut prev_class = sequence.sos;
-    let mut last_strong_is_al = false;
-    let mut et_run_indices = Vec::new(); // for W5
-
-    // Like sequence.runs.iter().flat_map(Clone::clone), but make indices itself clonable.
-    fn id(x: LevelRun) -> LevelRun {
-        x
-    }
-    let mut indices = sequence
-        .runs
-        .iter()
-        .cloned()
-        .flat_map(id as fn(LevelRun) -> LevelRun);
-
-    while let Some(i) = indices.next() {
-        match processing_classes[i] {
-            // http://www.unicode.org/reports/tr9/#W1
-            NSM => {
-                processing_classes[i] = match prev_class {
-                    RLI | LRI | FSI | PDI => ON,
-                    _ => prev_class,
-                };
-            }
-            EN => {
-                if last_strong_is_al {
-                    // W2. If previous strong char was AL, change EN to AN.
-                    processing_classes[i] = AN;
-                } else {
-                    // W5. If a run of ETs is adjacent to an EN, change the ETs to EN.
-                    for j in &et_run_indices {
-                        processing_classes[*j] = EN;
-                    }
-                    et_run_indices.clear();
-                }
-            }
-            // http://www.unicode.org/reports/tr9/#W3
-            AL => processing_classes[i] = R,
-
-            // http://www.unicode.org/reports/tr9/#W4
-            ES | CS => {
-                let next_class = indices
-                    .clone()
-                    .map(|j| processing_classes[j])
-                    .filter(not_removed_by_x9)
-                    .next()
-                    .unwrap_or(sequence.eos);
-                processing_classes[i] = match (prev_class, processing_classes[i], next_class) {
-                    (EN, ES, EN) | (EN, CS, EN) => EN,
-                    (AN, CS, AN) => AN,
-                    (_, _, _) => ON,
-                }
-            }
-            // http://www.unicode.org/reports/tr9/#W5
-            ET => {
-                match prev_class {
-                    EN => processing_classes[i] = EN,
-                    _ => et_run_indices.push(i), // In case this is followed by an EN.
-                }
-            }
-            class => {
-                if removed_by_x9(class) {
-                    continue;
-                }
-            }
-        }
-
-        prev_class = processing_classes[i];
-        match prev_class {
-            L | R => {
-                last_strong_is_al = false;
-            }
-            AL => {
-                last_strong_is_al = true;
-            }
-            _ => {}
-        }
-        if prev_class != ET {
-            // W6. If we didn't find an adjacent EN, turn any ETs into ON instead.
-            for j in &et_run_indices {
-                processing_classes[*j] = ON;
-            }
-            et_run_indices.clear();
-        }
-    }
-
-    // W7. If the previous strong char was L, change EN to L.
-    let mut last_strong_is_l = sequence.sos == L;
-    for run in &sequence.runs {
-        for i in run.clone() {
-            match processing_classes[i] {
-                EN if last_strong_is_l => {
-                    processing_classes[i] = L;
-                }
-                L => {
-                    last_strong_is_l = true;
-                }
-                R | AL => {
-                    last_strong_is_l = false;
-                }
-                _ => {}
-            }
-        }
-    }
-}
-
-/// 3.3.5 Resolving Neutral Types
-///
-/// http://www.unicode.org/reports/tr9/#Resolving_Neutral_Types
-pub fn resolve_neutral(
-    sequence: &IsolatingRunSequence,
-    levels: &[Level],
-    processing_classes: &mut [BidiClass],
-) {
-    let e: BidiClass = levels[sequence.runs[0].start].bidi_class();
-    let mut indices = sequence.runs.iter().flat_map(Clone::clone);
-    let mut prev_class = sequence.sos;
-
-    while let Some(mut i) = indices.next() {
-        // N0. Process bracket pairs.
-        // TODO
-
-        // Process sequences of NI characters.
-        let mut ni_run = Vec::new();
-        if is_NI(processing_classes[i]) {
-            // Consume a run of consecutive NI characters.
-            ni_run.push(i);
-            let mut next_class;
-            loop {
-                match indices.next() {
-                    Some(j) => {
-                        i = j;
-                        if removed_by_x9(processing_classes[i]) {
-                            continue;
-                        }
-                        next_class = processing_classes[j];
-                        if is_NI(next_class) {
-                            ni_run.push(i);
-                        } else {
-                            break;
-                        }
-                    }
-                    None => {
-                        next_class = sequence.eos;
-                        break;
-                    }
-                };
-            }
-
-            // N1-N2.
-            //
-            // http://www.unicode.org/reports/tr9/#N1
-            // http://www.unicode.org/reports/tr9/#N2
-            let new_class = match (prev_class, next_class) {
-                (L, L) => L,
-                (R, R) | (R, AN) | (R, EN) | (AN, R) | (AN, AN) | (AN, EN) | (EN, R) |
-                (EN, AN) | (EN, EN) => R,
-                (_, _) => e,
-            };
-            for j in &ni_run {
-                processing_classes[*j] = new_class;
-            }
-            ni_run.clear();
-        }
-        prev_class = processing_classes[i];
-    }
-}
-
-/// 3.3.6 Resolving Implicit Levels
-///
-/// Returns the maximum embedding level in the paragraph.
-///
-/// http://www.unicode.org/reports/tr9/#Resolving_Implicit_Levels
-pub fn resolve_levels(original_classes: &[BidiClass], levels: &mut [Level]) -> Level {
-    let mut max_level = Level::ltr();
-
-    assert!(original_classes.len() == levels.len());
-    for i in 0..levels.len() {
-        match (levels[i].is_rtl(), original_classes[i]) {
-            // http://www.unicode.org/reports/tr9/#I1
-            (false, R) => levels[i].raise(1).expect("Level number error"),
-            (false, AN) | (false, EN) => levels[i].raise(2).expect("Level number error"),
-            // http://www.unicode.org/reports/tr9/#I2
-            (true, L) | (true, EN) | (true, AN) => levels[i].raise(1).expect("Level number error"),
-            (_, _) => {}
-        }
-        max_level = max(max_level, levels[i]);
-    }
-
-    max_level
-}
-
-/// Neutral or Isolate formatting character (B, S, WS, ON, FSI, LRI, RLI, PDI)
-///
-/// http://www.unicode.org/reports/tr9/#NI
-#[allow(non_snake_case)]
-fn is_NI(class: BidiClass) -> bool {
-    matches!(class, B | S | WS | ON | FSI | LRI | RLI | PDI)
-}
deleted file mode 100644
--- a/third_party/rust/unicode-bidi-0.3.3/src/level.rs
+++ /dev/null
@@ -1,382 +0,0 @@
-// Copyright 2017 The Servo Project Developers. See the
-// COPYRIGHT file at the top-level directory of this distribution.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! Bidi Embedding Level
-//!
-//! See [`Level`](struct.Level.html) for more details.
-//!
-//! http://www.unicode.org/reports/tr9/#BD2
-
-use std::convert::{From, Into};
-
-use super::char_data::BidiClass;
-
-/// Embedding Level
-///
-/// Embedding Levels are numbers between 0 and 126 (inclusive), where even values denote a
-/// left-to-right (LTR) direction and odd values a right-to-left (RTL) direction.
-///
-/// This struct maintains a *valid* status for level numbers, meaning that creating a new level, or
-/// mutating an existing level, with the value smaller than `0` (before conversion to `u8`) or
-/// larger than 125 results in an `Error`.
-///
-/// http://www.unicode.org/reports/tr9/#BD2
-#[derive(Copy, Clone, Debug, Eq, Ord, PartialEq, PartialOrd)]
-#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
-pub struct Level(u8);
-
-pub const LTR_LEVEL: Level = Level(0);
-pub const RTL_LEVEL: Level = Level(1);
-
-const MAX_DEPTH: u8 = 125;
-/// During explicit level resolution, embedding level can go as high as `max_depth`.
-pub const MAX_EXPLICIT_DEPTH: u8 = MAX_DEPTH;
-/// During implicit level resolution, embedding level can go as high as `max_depth + 1`.
-pub const MAX_IMPLICIT_DEPTH: u8 = MAX_DEPTH + 1;
-
-/// Errors that can occur on Level creation or mutation
-#[derive(Debug, PartialEq)]
-pub enum Error {
-    /// Out-of-range (invalid) embedding level number.
-    OutOfRangeNumber,
-}
-
-impl Level {
-    /// New LTR level with smallest number value (0).
-    #[inline]
-    pub fn ltr() -> Level {
-        LTR_LEVEL
-    }
-
-    /// New RTL level with smallest number value (1).
-    #[inline]
-    pub fn rtl() -> Level {
-        RTL_LEVEL
-    }
-
-    /// Maximum depth of the directional status stack during implicit resolutions.
-    pub fn max_implicit_depth() -> u8 {
-        MAX_IMPLICIT_DEPTH
-    }
-
-    /// Maximum depth of the directional status stack during explicit resolutions.
-    pub fn max_explicit_depth() -> u8 {
-        MAX_EXPLICIT_DEPTH
-    }
-
-    // == Inquiries ==
-
-    /// Create new level, fail if number is larger than `max_depth + 1`.
-    #[inline]
-    pub fn new(number: u8) -> Result<Level, Error> {
-        if number <= MAX_IMPLICIT_DEPTH {
-            Ok(Level(number))
-        } else {
-            Err(Error::OutOfRangeNumber)
-        }
-    }
-
-    /// Create new level, fail if number is larger than `max_depth`.
-    #[inline]
-    pub fn new_explicit(number: u8) -> Result<Level, Error> {
-        if number <= MAX_EXPLICIT_DEPTH {
-            Ok(Level(number))
-        } else {
-            Err(Error::OutOfRangeNumber)
-        }
-    }
-
-    // == Inquiries ==
-
-    /// The level number.
-    #[inline]
-    pub fn number(&self) -> u8 {
-        self.0
-    }
-
-    /// If this level is left-to-right.
-    #[inline]
-    pub fn is_ltr(&self) -> bool {
-        self.0 % 2 == 0
-    }
-
-    /// If this level is right-to-left.
-    #[inline]
-    pub fn is_rtl(&self) -> bool {
-        self.0 % 2 == 1
-    }
-
-    // == Mutators ==
-
-    /// Raise level by `amount`, fail if number is larger than `max_depth + 1`.
-    #[inline]
-    pub fn raise(&mut self, amount: u8) -> Result<(), Error> {
-        match self.0.checked_add(amount) {
-            Some(number) => {
-                if number <= MAX_IMPLICIT_DEPTH {
-                    self.0 = number;
-                    Ok(())
-                } else {
-                    Err(Error::OutOfRangeNumber)
-                }
-            }
-            None => Err(Error::OutOfRangeNumber),
-        }
-    }
-
-    /// Raise level by `amount`, fail if number is larger than `max_depth`.
-    #[inline]
-    pub fn raise_explicit(&mut self, amount: u8) -> Result<(), Error> {
-        match self.0.checked_add(amount) {
-            Some(number) => {
-                if number <= MAX_EXPLICIT_DEPTH {
-                    self.0 = number;
-                    Ok(())
-                } else {
-                    Err(Error::OutOfRangeNumber)
-                }
-            }
-            None => Err(Error::OutOfRangeNumber),
-        }
-    }
-
-    /// Lower level by `amount`, fail if number goes below zero.
-    #[inline]
-    pub fn lower(&mut self, amount: u8) -> Result<(), Error> {
-        match self.0.checked_sub(amount) {
-            Some(number) => {
-                self.0 = number;
-                Ok(())
-            }
-            None => Err(Error::OutOfRangeNumber),
-        }
-    }
-
-    // == Helpers ==
-
-    /// The next LTR (even) level greater than this, or fail if number is larger than `max_depth`.
-    #[inline]
-    pub fn new_explicit_next_ltr(&self) -> Result<Level, Error> {
-        Level::new_explicit(self.0 + 2 & !1)
-    }
-
-    /// The next RTL (odd) level greater than this, or fail if number is larger than `max_depth`.
-    #[inline]
-    pub fn new_explicit_next_rtl(&self) -> Result<Level, Error> {
-        Level::new_explicit((self.0 + 1) | 1)
-    }
-
-    /// The lowest RTL (odd) level greater than or equal to this, or fail if number is larger than
-    /// `max_depth + 1`.
-    #[inline]
-    pub fn new_lowest_ge_rtl(&self) -> Result<Level, Error> {
-        Level::new(self.0 | 1)
-    }
-
-    /// Generate a character type based on a level (as specified in steps X10 and N2).
-    #[inline]
-    pub fn bidi_class(&self) -> BidiClass {
-        if self.is_rtl() {
-            BidiClass::R
-        } else {
-            BidiClass::L
-        }
-    }
-
-    pub fn vec(v: &[u8]) -> Vec<Level> {
-        v.iter().map(|&x| x.into()).collect()
-    }
-}
-
-/// If levels has any RTL (odd) level
-///
-/// This information is usually used to skip re-ordering of text when no RTL level is present
-#[inline]
-pub fn has_rtl(levels: &[Level]) -> bool {
-    levels.iter().any(|&lvl| lvl.is_rtl())
-}
-
-impl Into<u8> for Level {
-    /// Convert to the level number
-    #[inline]
-    fn into(self) -> u8 {
-        self.number()
-    }
-}
-
-impl From<u8> for Level {
-    /// Create level by number
-    #[inline]
-    fn from(number: u8) -> Level {
-        Level::new(number).expect("Level number error")
-    }
-}
-
-/// Used for matching levels in conformance tests
-impl<'a> PartialEq<&'a str> for Level {
-    #[inline]
-    fn eq(&self, s: &&'a str) -> bool {
-        *s == "x" || *s == self.0.to_string()
-    }
-}
-
-/// Used for matching levels in conformance tests
-impl<'a> PartialEq<String> for Level {
-    #[inline]
-    fn eq(&self, s: &String) -> bool {
-        self == &s.as_str()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use super::*;
-
-    #[test]
-    fn test_new() {
-        assert_eq!(Level::new(0), Ok(Level(0)));
-        assert_eq!(Level::new(1), Ok(Level(1)));
-        assert_eq!(Level::new(10), Ok(Level(10)));
-        assert_eq!(Level::new(125), Ok(Level(125)));
-        assert_eq!(Level::new(126), Ok(Level(126)));
-        assert_eq!(Level::new(127), Err(Error::OutOfRangeNumber));
-        assert_eq!(Level::new(255), Err(Error::OutOfRangeNumber));
-    }
-
-    #[test]
-    fn test_new_explicit() {
-        assert_eq!(Level::new_explicit(0), Ok(Level(0)));
-        assert_eq!(Level::new_explicit(1), Ok(Level(1)));
-        assert_eq!(Level::new_explicit(10), Ok(Level(10)));
-        assert_eq!(Level::new_explicit(125), Ok(Level(125)));
-        assert_eq!(Level::new_explicit(126), Err(Error::OutOfRangeNumber));
-        assert_eq!(Level::new_explicit(255), Err(Error::OutOfRangeNumber));
-    }
-
-    #[test]
-    fn test_is_ltr() {
-        assert_eq!(Level(0).is_ltr(), true);
-        assert_eq!(Level(1).is_ltr(), false);
-        assert_eq!(Level(10).is_ltr(), true);
-        assert_eq!(Level(11).is_ltr(), false);
-        assert_eq!(Level(124).is_ltr(), true);
-        assert_eq!(Level(125).is_ltr(), false);
-    }
-
-    #[test]
-    fn test_is_rtl() {
-        assert_eq!(Level(0).is_rtl(), false);
-        assert_eq!(Level(1).is_rtl(), true);
-        assert_eq!(Level(10).is_rtl(), false);
-        assert_eq!(Level(11).is_rtl(), true);
-        assert_eq!(Level(124).is_rtl(), false);
-        assert_eq!(Level(125).is_rtl(), true);
-    }
-
-    #[test]
-    fn test_raise() {
-        let mut level = Level::ltr();
-        assert_eq!(level.number(), 0);
-        assert!(level.raise(100).is_ok());
-        assert_eq!(level.number(), 100);
-        assert!(level.raise(26).is_ok());
-        assert_eq!(level.number(), 126);
-        assert!(level.raise(1).is_err()); // invalid!
-        assert!(level.raise(250).is_err()); // overflow!
-        assert_eq!(level.number(), 126);
-    }
-
-    #[test]
-    fn test_raise_explicit() {
-        let mut level = Level::ltr();
-        assert_eq!(level.number(), 0);
-        assert!(level.raise_explicit(100).is_ok());
-        assert_eq!(level.number(), 100);
-        assert!(level.raise_explicit(25).is_ok());
-        assert_eq!(level.number(), 125);
-        assert!(level.raise_explicit(1).is_err()); // invalid!
-        assert!(level.raise_explicit(250).is_err()); // overflow!
-        assert_eq!(level.number(), 125);
-    }
-
-    #[test]
-    fn test_lower() {
-        let mut level = Level::rtl();
-        assert_eq!(level.number(), 1);
-        assert!(level.lower(1).is_ok());
-        assert_eq!(level.number(), 0);
-        assert!(level.lower(1).is_err()); // underflow!
-        assert!(level.lower(250).is_err()); // underflow!
-        assert_eq!(level.number(), 0);
-    }
-
-    #[test]
-    fn test_has_rtl() {
-        assert_eq!(has_rtl(&Level::vec(&[0, 0, 0])), false);
-        assert_eq!(has_rtl(&Level::vec(&[0, 1, 0])), true);
-        assert_eq!(has_rtl(&Level::vec(&[0, 2, 0])), false);
-        assert_eq!(has_rtl(&Level::vec(&[0, 125, 0])), true);
-        assert_eq!(has_rtl(&Level::vec(&[0, 126, 0])), false);
-    }
-
-    #[test]
-    fn test_into() {
-        let level = Level::rtl();
-        assert_eq!(1u8, level.into());
-    }
-
-    #[test]
-    fn test_vec() {
-        assert_eq!(
-            Level::vec(&[0, 1, 125]),
-            vec![Level(0), Level(1), Level(125)]
-        );
-    }
-
-    #[test]
-    fn test_str_eq() {
-        assert_eq!(Level::vec(&[0, 1, 4, 125]), vec!["0", "1", "x", "125"]);
-        assert_ne!(Level::vec(&[0, 1, 4, 125]), vec!["0", "1", "5", "125"]);
-    }
-
-    #[test]
-    fn test_string_eq() {
-        assert_eq!(
-            Level::vec(&[0, 1, 4, 125]),
-            vec!["0".to_string(), "1".to_string(), "x".to_string(), "125".to_string()]
-        );
-    }
-}
-
-#[cfg(all(feature = "with_serde", test))]
-mod serde_tests {
-    use serde_test::{Token, assert_tokens};
-    use super::*;
-
-    #[test]
-    fn test_statics() {
-        assert_tokens(
-            &Level::ltr(),
-            &[Token::NewtypeStruct { name: "Level" }, Token::U8(0)],
-        );
-        assert_tokens(
-            &Level::rtl(),
-            &[Token::NewtypeStruct { name: "Level" }, Token::U8(1)],
-        );
-    }
-
-    #[test]
-    fn test_new() {
-        let level = Level::new(42).unwrap();
-        assert_tokens(
-            &level,
-            &[Token::NewtypeStruct { name: "Level" }, Token::U8(42)],
-        );
-    }
-}
deleted file mode 100644
--- a/third_party/rust/unicode-bidi-0.3.3/src/lib.rs
+++ /dev/null
@@ -1,873 +0,0 @@
-// Copyright 2015 The Servo Project Developers. See the
-// COPYRIGHT file at the top-level directory of this distribution.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! This crate implements the [Unicode Bidirectional Algorithm][tr9] for display of mixed
-//! right-to-left and left-to-right text.  It is written in safe Rust, compatible with the
-//! current stable release.
-//!
-//! ## Example
-//!
-//! ```rust
-//! use unicode_bidi::BidiInfo;
-//!
-//! // This example text is defined using `concat!` because some browsers
-//! // and text editors have trouble displaying bidi strings.
-//! let text = concat![
-//!   "א",
-//!   "ב",
-//!   "ג",
-//!   "a",
-//!   "b",
-//!   "c",
-//! ];
-//!
-//! // Resolve embedding levels within the text.  Pass `None` to detect the
-//! // paragraph level automatically.
-//! let bidi_info = BidiInfo::new(&text, None);
-//!
-//! // This paragraph has embedding level 1 because its first strong character is RTL.
-//! assert_eq!(bidi_info.paragraphs.len(), 1);
-//! let para = &bidi_info.paragraphs[0];
-//! assert_eq!(para.level.number(), 1);
-//! assert_eq!(para.level.is_rtl(), true);
-//!
-//! // Re-ordering is done after wrapping each paragraph into a sequence of
-//! // lines. For this example, I'll just use a single line that spans the
-//! // entire paragraph.
-//! let line = para.range.clone();
-//!
-//! let display = bidi_info.reorder_line(para, line);
-//! assert_eq!(display, concat![
-//!   "a",
-//!   "b",
-//!   "c",
-//!   "ג",
-//!   "ב",
-//!   "א",
-//! ]);
-//! ```
-//!
-//! [tr9]: http://www.unicode.org/reports/tr9/
-
-#![forbid(unsafe_code)]
-
-#[macro_use]
-extern crate matches;
-
-#[cfg(feature = "with_serde")]
-#[macro_use]
-extern crate serde_derive;
-
-#[cfg(all(feature = "with_serde", test))]
-extern crate serde_test;
-
-pub mod deprecated;
-pub mod format_chars;
-pub mod level;
-
-mod char_data;
-mod explicit;
-mod implicit;
-mod prepare;
-
-pub use char_data::{BidiClass, bidi_class, UNICODE_VERSION};
-pub use level::Level;
-pub use prepare::LevelRun;
-
-use std::borrow::Cow;
-use std::cmp::{max, min};
-use std::iter::repeat;
-use std::ops::Range;
-
-use BidiClass::*;
-use format_chars as chars;
-
-
-/// Bidi information about a single paragraph
-#[derive(Debug, PartialEq)]
-pub struct ParagraphInfo {
-    /// The paragraphs boundaries within the text, as byte indices.
-    ///
-    /// TODO: Shrink this to only include the starting index?
-    pub range: Range<usize>,
-
-    /// The paragraph embedding level.
-    ///
-    /// http://www.unicode.org/reports/tr9/#BD4
-    pub level: Level,
-}
-
-/// Initial bidi information of the text
-///
-/// Contains the paragraphs and BidiClasses in a string of text.
-#[derive(PartialEq, Debug)]
-pub struct InitialInfo<'text> {
-    /// The text
-    pub text: &'text str,
-
-    /// The BidiClass of the character at each byte in the text.
-    /// If a character is multiple bytes, its class will appear multiple times in the vector.
-    pub original_classes: Vec<BidiClass>,
-
-    /// The boundaries and level of each paragraph within the text.
-    pub paragraphs: Vec<ParagraphInfo>,
-}
-
-impl<'text> InitialInfo<'text> {
-    /// Find the paragraphs and BidiClasses in a string of text.
-    ///
-    /// http://www.unicode.org/reports/tr9/#The_Paragraph_Level
-    ///
-    /// Also sets the class for each First Strong Isolate initiator (FSI) to LRI or RLI if a strong
-    /// character is found before the matching PDI.  If no strong character is found, the class will
-    /// remain FSI, and it's up to later stages to treat these as LRI when needed.
-    pub fn new(text: &str, default_para_level: Option<Level>) -> InitialInfo {
-        let mut original_classes = Vec::with_capacity(text.len());
-
-        // The stack contains the starting byte index for each nested isolate we're inside.
-        let mut isolate_stack = Vec::new();
-        let mut paragraphs = Vec::new();
-
-        let mut para_start = 0;
-        let mut para_level = default_para_level;
-
-        for (i, c) in text.char_indices() {
-            let class = bidi_class(c);
-            original_classes.extend(repeat(class).take(c.len_utf8()));
-            match class {
-                B => {
-                    // P1. Split the text into separate paragraphs. The paragraph separator is kept
-                    // with the previous paragraph.
-                    let para_end = i + c.len_utf8();
-                    paragraphs.push(
-                        ParagraphInfo {
-                            range: para_start..para_end,
-                            // P3. If no character is found in p2, set the paragraph level to zero.
-                            level: para_level.unwrap_or(Level::ltr()),
-                        }
-                    );
-                    // Reset state for the start of the next paragraph.
-                    para_start = para_end;
-                    // TODO: Support defaulting to direction of previous paragraph
-                    //
-                    // http://www.unicode.org/reports/tr9/#HL1
-                    para_level = default_para_level;
-                    isolate_stack.clear();
-                }
-                L | R | AL => {
-                    match isolate_stack.last() {
-                        Some(&start) => {
-                            if original_classes[start] == FSI {
-                                // X5c. If the first strong character between FSI and its matching
-                                // PDI is R or AL, treat it as RLI. Otherwise, treat it as LRI.
-                                for j in 0..chars::FSI.len_utf8() {
-                                    original_classes[start + j] =
-                                        if class == L { LRI } else { RLI };
-                                }
-                            }
-                        }
-                        None => {
-                            if para_level.is_none() {
-                                // P2. Find the first character of type L, AL, or R, while skipping
-                                // any characters between an isolate initiator and its matching
-                                // PDI.
-                                para_level = Some(
-                                    if class != L {
-                                        Level::rtl()
-                                    } else {
-                                        Level::ltr()
-                                    }
-                                );
-                            }
-                        }
-                    }
-                }
-                RLI | LRI | FSI => {
-                    isolate_stack.push(i);
-                }
-                PDI => {
-                    isolate_stack.pop();
-                }
-                _ => {}
-            }
-        }
-        if para_start < text.len() {
-            paragraphs.push(
-                ParagraphInfo {
-                    range: para_start..text.len(),
-                    level: para_level.unwrap_or(Level::ltr()),
-                }
-            );
-        }
-        assert!(original_classes.len() == text.len());
-
-        InitialInfo {
-            text: text,
-            original_classes: original_classes,
-            paragraphs: paragraphs,
-        }
-    }
-}
-
-/// Bidi information of the text
-///
-/// The `original_classes` and `levels` vectors are indexed by byte offsets into the text.  If a
-/// character is multiple bytes wide, then its class and level will appear multiple times in these
-/// vectors.
-// TODO: Impl `struct StringProperty<T> { values: Vec<T> }` and use instead of Vec<T>
-#[derive(Debug, PartialEq)]
-pub struct BidiInfo<'text> {
-    /// The text
-    pub text: &'text str,
-
-    /// The BidiClass of the character at each byte in the text.
-    pub original_classes: Vec<BidiClass>,
-
-    /// The directional embedding level of each byte in the text.
-    pub levels: Vec<Level>,
-
-    /// The boundaries and paragraph embedding level of each paragraph within the text.
-    ///
-    /// TODO: Use SmallVec or similar to avoid overhead when there are only one or two paragraphs?
-    /// Or just don't include the first paragraph, which always starts at 0?
-    pub paragraphs: Vec<ParagraphInfo>,
-}
-
-impl<'text> BidiInfo<'text> {
-    /// Split the text into paragraphs and determine the bidi embedding levels for each paragraph.
-    ///
-    /// TODO: In early steps, check for special cases that allow later steps to be skipped. like
-    /// text that is entirely LTR.  See the `nsBidi` class from Gecko for comparison.
-    ///
-    /// TODO: Support auto-RTL base direction
-    pub fn new(text: &str, default_para_level: Option<Level>) -> BidiInfo {
-        let InitialInfo {
-            text: _,
-            original_classes,
-            paragraphs,
-        } = InitialInfo::new(text, default_para_level);
-
-        let mut levels = Vec::<Level>::with_capacity(text.len());
-        let mut processing_classes = original_classes.clone();
-
-        for para in &paragraphs {
-            let text = &text[para.range.clone()];
-            let original_classes = &original_classes[para.range.clone()];
-            let processing_classes = &mut processing_classes[para.range.clone()];
-
-            let new_len = levels.len() + para.range.len();
-            levels.resize(new_len, para.level);
-            let levels = &mut levels[para.range.clone()];
-
-            explicit::compute(
-                text,
-                para.level,
-                &original_classes,
-                levels,
-                processing_classes,
-            );
-
-            let sequences = prepare::isolating_run_sequences(para.level, &original_classes, levels);
-            for sequence in &sequences {
-                implicit::resolve_weak(sequence, processing_classes);
-                implicit::resolve_neutral(sequence, levels, processing_classes);
-            }
-            implicit::resolve_levels(processing_classes, levels);
-
-            assign_levels_to_removed_chars(para.level, &original_classes, levels);
-        }
-
-        BidiInfo {
-            text: text,
-            original_classes: original_classes,
-            paragraphs: paragraphs,
-            levels: levels,
-        }
-    }
-
-    /// Re-order a line based on resolved levels and return only the embedding levels, one `Level`
-    /// per *byte*.
-    pub fn reordered_levels(&self, para: &ParagraphInfo, line: Range<usize>) -> Vec<Level> {
-        let (levels, _) = self.visual_runs(para, line.clone());
-        levels
-    }
-
-    /// Re-order a line based on resolved levels and return only the embedding levels, one `Level`
-    /// per *character*.
-    pub fn reordered_levels_per_char(
-        &self,
-        para: &ParagraphInfo,
-        line: Range<usize>,
-    ) -> Vec<Level> {
-        let levels = self.reordered_levels(para, line);
-        self.text.char_indices().map(|(i, _)| levels[i]).collect()
-    }
-
-
-    /// Re-order a line based on resolved levels and return the line in display order.
-    pub fn reorder_line(&self, para: &ParagraphInfo, line: Range<usize>) -> Cow<'text, str> {
-        let (levels, runs) = self.visual_runs(para, line.clone());
-
-        // If all isolating run sequences are LTR, no reordering is needed
-        if runs.iter().all(|run| levels[run.start].is_ltr()) {
-            return self.text[line.clone()].into();
-        }
-
-        let mut result = String::with_capacity(line.len());
-        for run in runs {
-            if levels[run.start].is_rtl() {
-                result.extend(self.text[run].chars().rev());
-            } else {
-                result.push_str(&self.text[run]);
-            }
-        }
-        result.into()
-    }
-
-    /// Find the level runs within a line and return them in visual order.
-    ///
-    /// `line` is a range of bytes indices within `levels`.
-    ///
-    /// http://www.unicode.org/reports/tr9/#Reordering_Resolved_Levels
-    pub fn visual_runs(
-        &self,
-        para: &ParagraphInfo,
-        line: Range<usize>,
-    ) -> (Vec<Level>, Vec<LevelRun>) {
-        assert!(line.start <= self.levels.len());
-        assert!(line.end <= self.levels.len());
-
-        let mut levels = self.levels.clone();
-
-        // Reset some whitespace chars to paragraph level.
-        // http://www.unicode.org/reports/tr9/#L1
-        let line_str: &str = &self.text[line.clone()];
-        let mut reset_from: Option<usize> = Some(0);
-        let mut reset_to: Option<usize> = None;
-        for (i, c) in line_str.char_indices() {
-            match self.original_classes[i] {
-                // Ignored by X9
-                RLE | LRE | RLO | LRO | PDF | BN => {}
-                // Segment separator, Paragraph separator
-                B | S => {
-                    assert!(reset_to == None);
-                    reset_to = Some(i + c.len_utf8());
-                    if reset_from == None {
-                        reset_from = Some(i);
-                    }
-                }
-                // Whitespace, isolate formatting
-                WS | FSI | LRI | RLI | PDI => {
-                    if reset_from == None {
-                        reset_from = Some(i);
-                    }
-                }
-                _ => {
-                    reset_from = None;
-                }
-            }
-            if let (Some(from), Some(to)) = (reset_from, reset_to) {
-                for j in from..to {
-                    levels[j] = para.level;
-                }
-                reset_from = None;
-                reset_to = None;
-            }
-        }
-        if let Some(from) = reset_from {
-            for j in from..line_str.len() {
-                levels[j] = para.level;
-            }
-        }
-
-        // Find consecutive level runs.
-        let mut runs = Vec::new();
-        let mut start = line.start;
-        let mut level = levels[start];
-        let mut min_level = level;
-        let mut max_level = level;
-
-        for i in (start + 1)..line.end {
-            let new_level = levels[i];
-            if new_level != level {
-                // End of the previous run, start of a new one.
-                runs.push(start..i);
-                start = i;
-                level = new_level;
-
-                min_level = min(level, min_level);
-                max_level = max(level, max_level);
-            }
-        }
-        runs.push(start..line.end);
-
-        let run_count = runs.len();
-
-        // Re-order the odd runs.
-        // http://www.unicode.org/reports/tr9/#L2
-
-        // Stop at the lowest *odd* level.
-        min_level = min_level.new_lowest_ge_rtl().expect("Level error");
-
-        while max_level >= min_level {
-            // Look for the start of a sequence of consecutive runs of max_level or higher.
-            let mut seq_start = 0;
-            while seq_start < run_count {
-                if self.levels[runs[seq_start].start] < max_level {
-                    seq_start += 1;
-                    continue;
-                }
-
-                // Found the start of a sequence. Now find the end.
-                let mut seq_end = seq_start + 1;
-                while seq_end < run_count {
-                    if self.levels[runs[seq_end].start] < max_level {
-                        break;
-                    }
-                    seq_end += 1;
-                }
-
-                // Reverse the runs within this sequence.
-                runs[seq_start..seq_end].reverse();
-
-                seq_start = seq_end;
-            }
-            max_level
-                .lower(1)
-                .expect("Lowering embedding level below zero");
-        }
-
-        (levels, runs)
-    }
-
-    /// If processed text has any computed RTL levels
-    ///
-    /// This information is usually used to skip re-ordering of text when no RTL level is present
-    #[inline]
-    pub fn has_rtl(&self) -> bool {
-        level::has_rtl(&self.levels)
-    }
-}
-
-/// Assign levels to characters removed by rule X9.
-///
-/// The levels assigned to these characters are not specified by the algorithm.  This function
-/// assigns each one the level of the previous character, to avoid breaking level runs.
-fn assign_levels_to_removed_chars(para_level: Level, classes: &[BidiClass], levels: &mut [Level]) {
-    for i in 0..levels.len() {
-        if prepare::removed_by_x9(classes[i]) {
-            levels[i] = if i > 0 { levels[i - 1] } else { para_level };
-        }
-    }
-}
-
-
-#[cfg(test)]
-mod tests {
-    use super::*;
-
-    #[test]
-    fn test_initial_text_info() {
-        let text = "a1";
-        assert_eq!(
-            InitialInfo::new(text, None),
-            InitialInfo {
-                text: &text,
-                original_classes: vec![L, EN],
-                paragraphs: vec![
-                    ParagraphInfo {
-                        range: 0..2,
-                        level: Level::ltr(),
-                    },
-                ],
-            }
-        );
-
-        let text = "غ א";
-        assert_eq!(
-            InitialInfo::new(text, None),
-            InitialInfo {
-                text: &text,
-                original_classes: vec![AL, AL, WS, R, R],
-                paragraphs: vec![
-                    ParagraphInfo {
-                        range: 0..5,
-                        level: Level::rtl(),
-                    },
-                ],
-            }
-        );
-
-        let text = "a\u{2029}b";
-        assert_eq!(
-            InitialInfo::new(text, None),
-            InitialInfo {
-                text: &text,
-                original_classes: vec![L, B, B, B, L],
-                paragraphs: vec![
-                    ParagraphInfo {
-                        range: 0..4,
-                        level: Level::ltr(),
-                    },
-                    ParagraphInfo {
-                        range: 4..5,
-                        level: Level::ltr(),
-                    },
-                ],
-            }
-        );
-
-        let text = format!("{}א{}a", chars::FSI, chars::PDI);
-        assert_eq!(
-            InitialInfo::new(&text, None),
-            InitialInfo {
-                text: &text,
-                original_classes: vec![RLI, RLI, RLI, R, R, PDI, PDI, PDI, L],
-                paragraphs: vec![
-                    ParagraphInfo {
-                        range: 0..9,
-                        level: Level::ltr(),
-                    },
-                ],
-            }
-        );
-    }
-
-    #[test]
-    fn test_process_text() {
-        let text = "abc123";
-        assert_eq!(
-            BidiInfo::new(text, Some(Level::ltr())),
-            BidiInfo {
-                text: &text,
-                levels: Level::vec(&[0, 0, 0, 0, 0, 0]),
-                original_classes: vec![L, L, L, EN, EN, EN],
-                paragraphs: vec![
-                    ParagraphInfo {
-                        range: 0..6,
-                        level: Level::ltr(),
-                    },
-                ],
-            }
-        );
-
-        let text = "abc אבג";
-        assert_eq!(
-            BidiInfo::new(text, Some(Level::ltr())),
-            BidiInfo {
-                text: &text,
-                levels: Level::vec(&[0, 0, 0, 0, 1, 1, 1, 1, 1, 1]),
-                original_classes: vec![L, L, L, WS, R, R, R, R, R, R],
-                paragraphs: vec![
-                    ParagraphInfo {
-                        range: 0..10,
-                        level: Level::ltr(),
-                    },
-                ],
-            }
-        );
-        assert_eq!(
-            BidiInfo::new(text, Some(Level::rtl())),
-            BidiInfo {
-                text: &text,
-                levels: Level::vec(&[2, 2, 2, 1, 1, 1, 1, 1, 1, 1]),
-                original_classes: vec![L, L, L, WS, R, R, R, R, R, R],
-                paragraphs: vec![
-                    ParagraphInfo {
-                        range: 0..10,
-                        level: Level::rtl(),
-                    },
-                ],
-            }
-        );
-
-        let text = "אבג abc";
-        assert_eq!(
-            BidiInfo::new(text, Some(Level::ltr())),
-            BidiInfo {
-                text: &text,
-                levels: Level::vec(&[1, 1, 1, 1, 1, 1, 0, 0, 0, 0]),
-                original_classes: vec![R, R, R, R, R, R, WS, L, L, L],
-                paragraphs: vec![
-                    ParagraphInfo {
-                        range: 0..10,
-                        level: Level::ltr(),
-                    },
-                ],
-            }
-        );
-        assert_eq!(
-            BidiInfo::new(text, None),
-            BidiInfo {
-                text: &text,
-                levels: Level::vec(&[1, 1, 1, 1, 1, 1, 1, 2, 2, 2]),
-                original_classes: vec![R, R, R, R, R, R, WS, L, L, L],
-                paragraphs: vec![
-                    ParagraphInfo {
-                        range: 0..10,
-                        level: Level::rtl(),
-                    },
-                ],
-            }
-        );
-
-        let text = "غ2ظ א2ג";
-        assert_eq!(
-            BidiInfo::new(text, Some(Level::ltr())),
-            BidiInfo {
-                text: &text,
-                levels: Level::vec(&[1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1]),
-                original_classes: vec![AL, AL, EN, AL, AL, WS, R, R, EN, R, R],
-                paragraphs: vec![
-                    ParagraphInfo {
-                        range: 0..11,
-                        level: Level::ltr(),
-                    },
-                ],
-            }
-        );
-
-        let text = "a א.\nג";
-        assert_eq!(
-            BidiInfo::new(text, None),
-            BidiInfo {
-                text: &text,
-                original_classes: vec![L, WS, R, R, CS, B, R, R],
-                levels: Level::vec(&[0, 0, 1, 1, 0, 0, 1, 1]),
-                paragraphs: vec![
-                    ParagraphInfo {
-                        range: 0..6,
-                        level: Level::ltr(),
-                    },
-                    ParagraphInfo {
-                        range: 6..8,
-                        level: Level::rtl(),
-                    },
-                ],
-            }
-        );
-
-        /// BidiTest:69635 (AL ET EN)
-        let bidi_info = BidiInfo::new("\u{060B}\u{20CF}\u{06F9}", None);
-        assert_eq!(bidi_info.original_classes, vec![AL, AL, ET, ET, ET, EN, EN]);
-    }
-
-    #[test]
-    fn test_bidi_info_has_rtl() {
-        // ASCII only
-        assert_eq!(BidiInfo::new("123", None).has_rtl(), false);
-        assert_eq!(BidiInfo::new("123", Some(Level::ltr())).has_rtl(), false);
-        assert_eq!(BidiInfo::new("123", Some(Level::rtl())).has_rtl(), false);
-        assert_eq!(BidiInfo::new("abc", None).has_rtl(), false);
-        assert_eq!(BidiInfo::new("abc", Some(Level::ltr())).has_rtl(), false);
-        assert_eq!(BidiInfo::new("abc", Some(Level::rtl())).has_rtl(), false);
-        assert_eq!(BidiInfo::new("abc 123", None).has_rtl(), false);
-        assert_eq!(BidiInfo::new("abc\n123", None).has_rtl(), false);
-
-        // With Hebrew
-        assert_eq!(BidiInfo::new("אבּג", None).has_rtl(), true);
-        assert_eq!(
-            BidiInfo::new("אבּג", Some(Level::ltr())).has_rtl(),
-            true
-        );
-        assert_eq!(
-            BidiInfo::new("אבּג", Some(Level::rtl())).has_rtl(),
-            true
-        );
-        assert_eq!(BidiInfo::new("abc אבּג", None).has_rtl(), true);
-        assert_eq!(BidiInfo::new("abc\nאבּג", None).has_rtl(), true);
-        assert_eq!(BidiInfo::new("אבּג abc", None).has_rtl(), true);
-        assert_eq!(BidiInfo::new("אבּג\nabc", None).has_rtl(), true);
-        assert_eq!(BidiInfo::new("אבּג 123", None).has_rtl(), true);
-        assert_eq!(BidiInfo::new("אבּג\n123", None).has_rtl(), true);
-    }
-
-    fn reorder_paras(text: &str) -> Vec<Cow<str>> {
-        let bidi_info = BidiInfo::new(text, None);
-        bidi_info
-            .paragraphs
-            .iter()
-            .map(|para| bidi_info.reorder_line(para, para.range.clone()))
-            .collect()
-    }
-
-    #[test]
-    fn test_reorder_line() {
-        /// Bidi_Class: L L L B L L L B L L L
-        assert_eq!(
-            reorder_paras("abc\ndef\nghi"),
-            vec!["abc\n", "def\n", "ghi"]
-        );
-
-        /// Bidi_Class: L L EN B L L EN B L L EN
-        assert_eq!(
-            reorder_paras("ab1\nde2\ngh3"),
-            vec!["ab1\n", "de2\n", "gh3"]
-        );
-
-        /// Bidi_Class: L L L B AL AL AL
-        assert_eq!(reorder_paras("abc\nابج"), vec!["abc\n", "جبا"]);
-
-        /// Bidi_Class: AL AL AL B L L L
-        assert_eq!(reorder_paras("ابج\nabc"), vec!["\nجبا", "abc"]);
-
-        assert_eq!(reorder_paras("1.-2"), vec!["1.-2"]);
-        assert_eq!(reorder_paras("1-.2"), vec!["1-.2"]);
-        assert_eq!(reorder_paras("abc אבג"), vec!["abc גבא"]);
-
-        // Numbers being weak LTR characters, cannot reorder strong RTL
-        assert_eq!(reorder_paras("123 אבג"), vec!["גבא 123"]);
-
-        assert_eq!(reorder_paras("abc\u{202A}def"), vec!["abc\u{202A}def"]);
-
-        assert_eq!(
-            reorder_paras("abc\u{202A}def\u{202C}ghi"),
-            vec!["abc\u{202A}def\u{202C}ghi"]
-        );
-
-        assert_eq!(
-            reorder_paras("abc\u{2066}def\u{2069}ghi"),
-            vec!["abc\u{2066}def\u{2069}ghi"]
-        );
-
-        // Testing for RLE Character
-        assert_eq!(
-            reorder_paras("\u{202B}abc אבג\u{202C}"),
-            vec!["\u{202B}\u{202C}גבא abc"]
-        );
-
-        // Testing neutral characters
-        assert_eq!(reorder_paras("אבג? אבג"), vec!["גבא ?גבא"]);
-
-        // Testing neutral characters with special case
-        assert_eq!(reorder_paras("A אבג?"), vec!["A גבא?"]);
-
-        // Testing neutral characters with Implicit RTL Marker
-        assert_eq!(
-            reorder_paras("A אבג?\u{200F}"),
-            vec!["A \u{200F}?גבא"]
-        );
-        assert_eq!(reorder_paras("אבג abc"), vec!["abc גבא"]);
-        assert_eq!(
-            reorder_paras("abc\u{2067}.-\u{2069}ghi"),
-            vec!["abc\u{2067}-.\u{2069}ghi"]
-        );
-
-        assert_eq!(
-            reorder_paras("Hello, \u{2068}\u{202E}world\u{202C}\u{2069}!"),
-            vec!["Hello, \u{2068}\u{202E}\u{202C}dlrow\u{2069}!"]
-        );
-
-        // With mirrorable characters in RTL run
-        assert_eq!(reorder_paras("א(ב)ג."), vec![".ג)ב(א"]);
-
-        // With mirrorable characters on level boundry
-        assert_eq!(
-            reorder_paras("אב(גד[&ef].)gh"),
-            vec!["ef].)gh&[דג(בא"]
-        );
-    }
-
-    fn reordered_levels_for_paras(text: &str) -> Vec<Vec<Level>> {
-        let bidi_info = BidiInfo::new(text, None);
-        bidi_info
-            .paragraphs
-            .iter()
-            .map(|para| bidi_info.reordered_levels(para, para.range.clone()))
-            .collect()
-    }
-
-    fn reordered_levels_per_char_for_paras(text: &str) -> Vec<Vec<Level>> {
-        let bidi_info = BidiInfo::new(text, None);
-        bidi_info
-            .paragraphs
-            .iter()
-            .map(|para| bidi_info.reordered_levels_per_char(para, para.range.clone()))
-            .collect()
-    }
-
-    #[test]
-    fn test_reordered_levels() {
-
-        /// BidiTest:946 (LRI PDI)
-        let text = "\u{2067}\u{2069}";
-        assert_eq!(
-            reordered_levels_for_paras(text),
-            vec![Level::vec(&[0, 0, 0, 0, 0, 0])]
-        );
-        assert_eq!(
-            reordered_levels_per_char_for_paras(text),
-            vec![Level::vec(&[0, 0])]
-        );
-
-        /* TODO
-        /// BidiTest:69635 (AL ET EN)
-        let text = "\u{060B}\u{20CF}\u{06F9}";
-        assert_eq!(
-            reordered_levels_for_paras(text),
-            vec![Level::vec(&[1, 1, 1, 1, 1, 2, 2])]
-        );
-        assert_eq!(
-            reordered_levels_per_char_for_paras(text),
-            vec![Level::vec(&[1, 1, 2])]
-        );
-         */
-
-        /* TODO
-        // BidiTest:291284 (AN RLI PDF R)
-        assert_eq!(
-            reordered_levels_per_char_for_paras("\u{0605}\u{2067}\u{202C}\u{0590}"),
-            vec![&["2", "0", "x", "1"]]
-        );
-         */
-    }
-}
-
-
-#[cfg(all(feature = "with_serde", test))]
-mod serde_tests {
-    use serde_test::{Token, assert_tokens};
-    use super::*;
-
-    #[test]
-    fn test_levels() {
-        let text = "abc אבג";
-        let bidi_info = BidiInfo::new(text, None);
-        let levels = bidi_info.levels;
-        assert_eq!(text.as_bytes().len(), 10);
-        assert_eq!(levels.len(), 10);
-        assert_tokens(
-            &levels,
-            &[
-                Token::Seq { len: Some(10) },
-                Token::NewtypeStruct { name: "Level" },
-                Token::U8(0),
-                Token::NewtypeStruct { name: "Level" },
-                Token::U8(0),
-                Token::NewtypeStruct { name: "Level" },
-                Token::U8(0),
-                Token::NewtypeStruct { name: "Level" },
-                Token::U8(0),
-                Token::NewtypeStruct { name: "Level" },
-                Token::U8(1),
-                Token::NewtypeStruct { name: "Level" },
-                Token::U8(1),
-                Token::NewtypeStruct { name: "Level" },
-                Token::U8(1),
-                Token::NewtypeStruct { name: "Level" },
-                Token::U8(1),
-                Token::NewtypeStruct { name: "Level" },
-                Token::U8(1),
-                Token::NewtypeStruct { name: "Level" },
-                Token::U8(1),
-                Token::SeqEnd,
-            ],
-        );
-    }
-}
deleted file mode 100644
--- a/third_party/rust/unicode-bidi-0.3.3/src/prepare.rs
+++ /dev/null
@@ -1,369 +0,0 @@
-// Copyright 2015 The Servo Project Developers. See the
-// COPYRIGHT file at the top-level directory of this distribution.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! 3.3.3 Preparations for Implicit Processing
-//!
-//! http://www.unicode.org/reports/tr9/#Preparations_for_Implicit_Processing
-
-use std::cmp::max;
-use std::ops::Range;
-
-use super::char_data::BidiClass;
-use super::level::Level;
-
-use BidiClass::*;
-
-/// A maximal substring of characters with the same embedding level.
-///
-/// Represented as a range of byte indices.
-pub type LevelRun = Range<usize>;
-
-
-/// Output of `isolating_run_sequences` (steps X9-X10)
-#[derive(Debug, PartialEq)]
-pub struct IsolatingRunSequence {
-    pub runs: Vec<LevelRun>,
-    pub sos: BidiClass, // Start-of-sequence type.
-    pub eos: BidiClass, // End-of-sequence type.
-}
-
-
-/// Compute the set of isolating run sequences.
-///
-/// An isolating run sequence is a maximal sequence of level runs such that for all level runs
-/// except the last one in the sequence, the last character of the run is an isolate initiator
-/// whose matching PDI is the first character of the next level run in the sequence.
-///
-/// Note: This function does *not* return the sequences in order by their first characters.
-pub fn isolating_run_sequences(
-    para_level: Level,
-    original_classes: &[BidiClass],
-    levels: &[Level],
-) -> Vec<IsolatingRunSequence> {
-    let runs = level_runs(levels, original_classes);
-
-    // Compute the set of isolating run sequences.
-    // http://www.unicode.org/reports/tr9/#BD13
-    let mut sequences = Vec::with_capacity(runs.len());
-
-    // When we encounter an isolate initiator, we push the current sequence onto the
-    // stack so we can resume it after the matching PDI.
-    let mut stack = vec![Vec::new()];
-
-    for run in runs {
-        assert!(run.len() > 0);
-        assert!(stack.len() > 0);
-
-        let start_class = original_classes[run.start];
-        let end_class = original_classes[run.end - 1];
-
-        let mut sequence = if start_class == PDI && stack.len() > 1 {
-            // Continue a previous sequence interrupted by an isolate.
-            stack.pop().unwrap()
-        } else {
-            // Start a new sequence.
-            Vec::new()
-        };
-
-        sequence.push(run);
-
-        if matches!(end_class, RLI | LRI | FSI) {
-            // Resume this sequence after the isolate.
-            stack.push(sequence);
-        } else {
-            // This sequence is finished.
-            sequences.push(sequence);
-        }
-    }
-    // Pop any remaning sequences off the stack.
-    sequences.extend(stack.into_iter().rev().filter(|seq| seq.len() > 0));
-
-    // Determine the `sos` and `eos` class for each sequence.
-    // http://www.unicode.org/reports/tr9/#X10
-    sequences
-        .into_iter()
-        .map(
-            |sequence: Vec<LevelRun>| {
-                assert!(!sequence.is_empty());
-
-                let start_of_seq = sequence[0].start;
-                let end_of_seq = sequence[sequence.len() - 1].end;
-                let seq_level = levels[start_of_seq];
-
-                #[cfg(test)]
-                for run in sequence.clone() {
-                    for idx in run {
-                        if not_removed_by_x9(&original_classes[idx]) {
-                            assert_eq!(seq_level, levels[idx]);
-                        }
-                    }
-                }
-
-                // Get the level of the last non-removed char before the runs.
-                let pred_level = match original_classes[..start_of_seq]
-                          .iter()
-                          .rposition(not_removed_by_x9) {
-                    Some(idx) => levels[idx],
-                    None => para_level,
-                };
-
-                // Get the level of the next non-removed char after the runs.
-                let succ_level = if matches!(original_classes[end_of_seq - 1], RLI | LRI | FSI) {
-                    para_level
-                } else {
-                    match original_classes[end_of_seq..]
-                              .iter()
-                              .position(not_removed_by_x9) {
-                        Some(idx) => levels[end_of_seq + idx],
-                        None => para_level,
-                    }
-                };
-
-                IsolatingRunSequence {
-                    runs: sequence,
-                    sos: max(seq_level, pred_level).bidi_class(),
-                    eos: max(seq_level, succ_level).bidi_class(),
-                }
-            }
-        )
-        .collect()
-}
-
-/// Finds the level runs in a paragraph.
-///
-/// http://www.unicode.org/reports/tr9/#BD7
-fn level_runs(levels: &[Level], original_classes: &[BidiClass]) -> Vec<LevelRun> {
-    assert!(levels.len() == original_classes.len());
-
-    let mut runs = Vec::new();
-    if levels.len() == 0 {
-        return runs;
-    }
-
-    let mut current_run_level = levels[0];
-    let mut current_run_start = 0;
-    for i in 1..levels.len() {
-        if !removed_by_x9(original_classes[i]) {
-            if levels[i] != current_run_level {
-                // End the last run and start a new one.
-                runs.push(current_run_start..i);
-                current_run_level = levels[i];
-                current_run_start = i;
-            }
-        }
-    }
-    runs.push(current_run_start..levels.len());
-
-    runs
-}
-
-/// Should this character be ignored in steps after X9?
-///
-/// http://www.unicode.org/reports/tr9/#X9
-pub fn removed_by_x9(class: BidiClass) -> bool {
-    matches!(class, RLE | LRE | RLO | LRO | PDF | BN)
-}
-
-// For use as a predicate for `position` / `rposition`
-pub fn not_removed_by_x9(class: &BidiClass) -> bool {
-    !removed_by_x9(*class)
-}
-
-#[cfg(test)]
-mod tests {
-    use super::*;
-
-    #[test]
-    fn test_level_runs() {
-        assert_eq!(level_runs(&Level::vec(&[]), &[]), &[]);
-        assert_eq!(
-            level_runs(&Level::vec(&[0, 0, 0, 1, 1, 2, 0, 0]), &[L; 8]),
-            &[0..3, 3..5, 5..6, 6..8]
-        );
-    }
-
-    // From http://www.unicode.org/reports/tr9/#BD13
-    #[cfg_attr(rustfmt, rustfmt_skip)]
-    #[test]
-    fn test_isolating_run_sequences() {
-
-        // == Example 1 ==
-        // text1·RLE·text2·PDF·RLE·text3·PDF·text4
-        // index        0    1  2    3    4  5    6  7
-        let classes = &[L, RLE, L, PDF, RLE, L, PDF, L];
-        let levels =  &[0,   1, 1,   1,   1, 1,   1, 0];
-        let para_level = Level::ltr();
-        let mut sequences = isolating_run_sequences(para_level, classes, &Level::vec(levels));
-        sequences.sort_by(|a, b| a.runs[0].clone().cmp(b.runs[0].clone()));
-        assert_eq!(
-            sequences.iter().map(|s| s.runs.clone()).collect::<Vec<_>>(),
-            vec![vec![0..2], vec![2..7], vec![7..8]]
-        );
-
-        // == Example 2 ==
-        // text1·RLI·text2·PDI·RLI·text3·PDI·text4
-        // index        0    1  2    3    4  5    6  7
-        let classes = &[L, RLI, L, PDI, RLI, L, PDI, L];
-        let levels =  &[0,   0, 1,   0,   0, 1,   0, 0];
-        let para_level = Level::ltr();
-        let mut sequences = isolating_run_sequences(para_level, classes, &Level::vec(levels));
-        sequences.sort_by(|a, b| a.runs[0].clone().cmp(b.runs[0].clone()));
-        assert_eq!(
-            sequences.iter().map(|s| s.runs.clone()).collect::<Vec<_>>(),
-            vec![vec![0..2, 3..5, 6..8], vec![2..3], vec![5..6]]
-        );
-
-        // == Example 3 ==
-        // text1·RLI·text2·LRI·text3·RLE·text4·PDF·text5·PDI·text6·PDI·text7
-        // index        0    1  2    3  4    5  6    7  8    9  10  11  12
-        let classes = &[L, RLI, L, LRI, L, RLE, L, PDF, L, PDI, L, PDI,  L];
-        let levels =  &[0,   0, 1,   1, 2,   3, 3,   3, 2,   1, 1,   0,  0];
-        let para_level = Level::ltr();
-        let mut sequences = isolating_run_sequences(para_level, classes, &Level::vec(levels));
-        sequences.sort_by(|a, b| a.runs[0].clone().cmp(b.runs[0].clone()));
-        assert_eq!(
-            sequences.iter().map(|s| s.runs.clone()).collect::<Vec<_>>(),
-            vec![vec![0..2, 11..13], vec![2..4, 9..11], vec![4..6], vec![6..8], vec![8..9]]
-        );
-    }
-
-    // From http://www.unicode.org/reports/tr9/#X10
-    #[cfg_attr(rustfmt, rustfmt_skip)]
-    #[test]
-    fn test_isolating_run_sequences_sos_and_eos() {
-
-        // == Example 1 ==
-        // text1·RLE·text2·LRE·text3·PDF·text4·PDF·RLE·text5·PDF·text6
-        // index        0    1  2    3  4    5  6    7    8  9   10  11
-        let classes = &[L, RLE, L, LRE, L, PDF, L, PDF, RLE, L, PDF,  L];
-        let levels =  &[0,   1, 1,   2, 2,   2, 1,   1,   1, 1,   1,  0];
-        let para_level = Level::ltr();
-        let mut sequences = isolating_run_sequences(para_level, classes, &Level::vec(levels));
-        sequences.sort_by(|a, b| a.runs[0].clone().cmp(b.runs[0].clone()));
-
-        // text1
-        assert_eq!(
-            &sequences[0],
-            &IsolatingRunSequence {
-                runs: vec![0..2],
-                sos: L,
-                eos: R,
-            }
-        );
-
-        // text2
-        assert_eq!(
-            &sequences[1],
-            &IsolatingRunSequence {
-                runs: vec![2..4],
-                sos: R,
-                eos: L,
-            }
-        );
-
-        // text3
-        assert_eq!(
-            &sequences[2],
-            &IsolatingRunSequence {
-                runs: vec![4..6],
-                sos: L,
-                eos: L,
-            }
-        );
-
-        // text4 text5
-        assert_eq!(
-            &sequences[3],
-            &IsolatingRunSequence {
-                runs: vec![6..11],
-                sos: L,
-                eos: R,
-            }
-        );
-
-        // text6
-        assert_eq!(
-            &sequences[4],
-            &IsolatingRunSequence {
-                runs: vec![11..12],
-                sos: R,
-                eos: L,
-            }
-        );
-
-        // == Example 2 ==
-        // text1·RLI·text2·LRI·text3·PDI·text4·PDI·RLI·text5·PDI·text6
-        // index        0    1  2    3  4    5  6    7    8  9   10  11
-        let classes = &[L, RLI, L, LRI, L, PDI, L, PDI, RLI, L, PDI,  L];
-        let levels =  &[0,   0, 1,   1, 2,   1, 1,   0,   0, 1,   0,  0];
-        let para_level = Level::ltr();
-        let mut sequences = isolating_run_sequences(para_level, classes, &Level::vec(levels));
-        sequences.sort_by(|a, b| a.runs[0].clone().cmp(b.runs[0].clone()));
-
-        // text1·RLI·PDI·RLI·PDI·text6
-        assert_eq!(
-            &sequences[0],
-            &IsolatingRunSequence {
-                runs: vec![0..2, 7..9, 10..12],
-                sos: L,
-                eos: L,
-            }
-        );
-
-        // text2·LRI·PDI·text4
-        assert_eq!(
-            &sequences[1],
-            &IsolatingRunSequence {
-                runs: vec![2..4, 5..7],
-                sos: R,
-                eos: R,
-            }
-        );
-
-        // text3
-        assert_eq!(
-            &sequences[2],
-            &IsolatingRunSequence {
-                runs: vec![4..5],
-                sos: L,
-                eos: L,
-            }
-        );
-
-        // text5
-        assert_eq!(
-            &sequences[3],
-            &IsolatingRunSequence {
-                runs: vec![9..10],
-                sos: R,
-                eos: R,
-            }
-        );
-    }
-
-    #[test]
-    fn test_removed_by_x9() {
-        let rem_classes = &[RLE, LRE, RLO, LRO, PDF, BN];
-        let not_classes = &[L, RLI, AL, LRI, PDI];
-        for x in rem_classes {
-            assert_eq!(removed_by_x9(*x), true);
-        }
-        for x in not_classes {
-            assert_eq!(removed_by_x9(*x), false);
-        }
-    }
-
-    #[test]
-    fn test_not_removed_by_x9() {
-        let non_x9_classes = &[L, R, AL, EN, ES, ET, AN, CS, NSM, B, S, WS, ON, LRI, RLI, FSI, PDI];
-        for x in non_x9_classes {
-            assert_eq!(not_removed_by_x9(&x), true);
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/unicode-bidi/.appveyor.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-install:
-  - ps: Start-FileDownload 'https://static.rust-lang.org/dist/rust-nightly-i686-pc-windows-gnu.exe'
-  - rust-nightly-i686-pc-windows-gnu.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
-  - SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin
-  - rustc -V
-  - cargo -V
-  - git submodule update --init --recursive
-
-build: false
-
-environment:
-    RUST_BACKTRACE: full
-
-test_script:
-  - cargo build --verbose --all
-  - cargo doc   --verbose --all --no-deps
-
-  - cargo test  --verbose --all
-  - cargo test  --verbose --all --features serde
--- a/third_party/rust/unicode-bidi/.cargo-checksum.json
+++ b/third_party/rust/unicode-bidi/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".appveyor.yml":"ab30fe181e4c87679afd5f7f10f6dcf622fd4d5df5a872e5f5d84911348dd60e",".rustfmt.toml":"4587a30e695dc4afdd3b5d33370cf712c90a716de06ab0c5a2c023b0f269ab1a",".travis.yml":"e93173a373b24339c49452f973bc6c086e13bf364d8637599a5f63e4d5b357cd","AUTHORS":"1ff3a7c8519b29544bb28ba9b1e7502df0cb764051fb9a1172e60006aa2b8dcc","COPYRIGHT":"edb20b474f6cbd4f4db066b54a9e0f687d0009d309412a63431189b59b8e2a07","Cargo.toml":"4f2ad9af370a75060a68d930ce56613b7a3dc47a33bd22d0a3e43118f0d62172","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"7b63ecd5f1902af1b63729947373683c32745c16a10e8e6292e2e2dcd7e90ae0","README.md":"bec1ce7b4dd0873f67e5b3f615453557403caaa385d01a53e2de0201e4b19fa2","src/char_data/mod.rs":"400505d0c7f9f201403e828181dde79648f412c0f72aa4ced76c1b91fcdd087c","src/char_data/tables.rs":"a27f625544bc49817b02b78cf55997a73d27dc4d616724aa96f70128b9629b23","src/deprecated.rs":"314c68b009ed66989bd233dc3d07ac0eea1327ec4fe6ee9cb41c26c3dcf05d97","src/explicit.rs":"fdf07374d0a5825bc9d6e616be10b57cc0b159d39590d86409da6df50b6a2ee7","src/format_chars.rs":"678399fec3f4bfaf4093f38cfdb8956288313386dc3511dab9fb58164e8dc01b","src/implicit.rs":"bd324d5f4814610b18851ad2981b8a18b04c3817bb8492b4346e15cb712daf3c","src/level.rs":"d31289f55b65602863c16bce37e370ff6ca8fa8cee344787e06acf215d29a77a","src/lib.rs":"b32ad80998b7cd11bf2edca7a5eca81cc8d4a33656758751ec4958c74649e029","src/prepare.rs":"a9f7db29099fb557dfec56fbb5b24d031a5ee0b9b3fb9a73a3a92e3fe1ebd051"},"package":"49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5"}
\ No newline at end of file
+{"files":{".rustfmt.toml":"4587a30e695dc4afdd3b5d33370cf712c90a716de06ab0c5a2c023b0f269ab1a",".travis.yml":"e340419604a35e795fc3afdab237eb0ea3a31e71c98fb98fa88626d61b8a50f7","AUTHORS":"1ff3a7c8519b29544bb28ba9b1e7502df0cb764051fb9a1172e60006aa2b8dcc","COPYRIGHT":"edb20b474f6cbd4f4db066b54a9e0f687d0009d309412a63431189b59b8e2a07","Cargo.toml":"dc21922a66df3876268bc4c187aeaf8db875aee8a1869c7f78e2c67b2e572680","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"7b63ecd5f1902af1b63729947373683c32745c16a10e8e6292e2e2dcd7e90ae0","README.md":"e764abd9a6abbe9517dd9dedc003dd64594351282437a509fec9362ef136686d","benches/basic.rs":"e1538acb2de8b0c510d663d5ba0b6877f148955774c713a7aa2374b62ceb6e6a","benches/udhr.rs":"7869911021fc0f0a71246d2535183a4610a0b9efd14fc8fc58daf121a02acd21","benches/udhr_data/README.md":"103dd98f2777082f73dd90ce441245370169a6e889b329da81ee4b9c236c0e05","src/char_data/mod.rs":"6fa055d2c81061bcc15854eb91f897998ed9109725827932266a0dc4d4051166","src/char_data/tables.rs":"3742ed00360d3955b10ba690b1446e69ddf04f2cee13e86dd185ba6641bc6198","src/deprecated.rs":"ce1b62ac47d0d7ea547a1e03d17cd86b6b850e4e095642ba2e9c29130f13fa72","src/explicit.rs":"273c56d064891a9b2f1ef61f81845c0467c81db4e3ce756a9f2ac58f7e6e3e14","src/format_chars.rs":"0b60e26adfff7f61abfbaf63bc5e37896f12f9d420a6df630c4f71e0acb4222a","src/implicit.rs":"ab583bd9f0e9ecff8bd5e26253912c1f40598d0212a6bc78664774149c38dccb","src/level.rs":"b8739d4dd84d9270140047972167d9e72db8637c769228eec17d12e07c5ab55f","src/lib.rs":"f264fe18c7ae5d4c4b100f9304be0466a138384cbcc9b08cb7b5185c5aac6bd4","src/prepare.rs":"cacf4ff9f7b0adf700b9f5cd82165c67eec93fd8e4d05cb6c7fe54111d9bbe40","tests/conformance_tests.rs":"777c74cbb3946d5b4495d4f8abe1f8edd0169a38bb724c44eea82eff5ca9581d","tools/generate.py":"12f94bdf2226f306d993fe2a0fa623b8dc9b1db1ac038a17ab44892ccdc8feeb"},"package":"a6a2c4e3710edd365cd7e78383153ed739fa31af19f9172f72d3575060f5a43a"}
\ No newline at end of file
--- a/third_party/rust/unicode-bidi/.travis.yml
+++ b/third_party/rust/unicode-bidi/.travis.yml
@@ -1,38 +1,24 @@
+sudo: false
 language: rust
-sudo: false
-os: linux
-dist: trusty
 
 rust:
   - nightly
   - beta
   - stable
-  - 1.17.0
+  - 1.15.0
 
 matrix:
   fast_finish: true
-  allow_failures:
-    - rust: nightly
 
 notifications:
   webhooks: http://build.servo.org:54856/travis
-  email:
-    on_success: never
 
-env:
-  global:
-    - RUST_BACKTRACE=full
+before_script:
+    - pip install git+https://github.com/euclio/travis-cargo@kcov --user && export PATH=$HOME/.local/bin:$PATH
 
 script:
   - cargo build --verbose
+  - cargo test  --verbose
+  - cargo test  --verbose --features with_serde
   - cargo doc   --verbose --no-deps
-
-  - cargo test  --verbose
-  - cargo test  --verbose --features 'serde'
-  - cargo test  --verbose --features 'with_serde'
-
-  - test "$TRAVIS_RUST_VERSION" != "nightly" ||
-    cargo bench --verbose --features 'bench_it'
-
-  - test "$TRAVIS_RUST_VERSION" != "nightly" ||
-    cargo run   --verbose --features 'flame_it' --example 'flame_udhr'
+  - travis-cargo bench
--- a/third_party/rust/unicode-bidi/Cargo.toml
+++ b/third_party/rust/unicode-bidi/Cargo.toml
@@ -1,49 +1,27 @@
-# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
-#
-# When uploading crates to the registry Cargo will automatically
-# "normalize" Cargo.toml files for maximal compatibility
-# with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g. crates.io) dependencies
-#
-# If you believe there's an error in this file please file an
-# issue against the rust-lang/cargo repository. If you're
-# editing this file be aware that the upstream Cargo.toml
-# will likely look very different (and much more reasonable)
-
 [package]
 name = "unicode-bidi"
-version = "0.3.4"
+version = "0.3.3"
 authors = ["The Servo Project Developers"]
-exclude = ["benches/**", "data/**", "examples/**", "tests/**", "tools/**"]
+license = "MIT / Apache-2.0"
 description = "Implementation of the Unicode Bidirectional Algorithm"
+repository = "https://github.com/servo/unicode-bidi"
 documentation = "http://doc.servo.org/unicode_bidi/"
 keywords = ["rtl", "unicode", "text", "layout", "bidi"]
-license = "MIT / Apache-2.0"
-repository = "https://github.com/servo/unicode-bidi"
+
+exclude = ["*.txt"]
 
 [lib]
 name = "unicode_bidi"
-[dependencies.flame]
-version = "0.1"
-optional = true
-
-[dependencies.flamer]
-version = "0.1"
-optional = true
 
-[dependencies.serde]
-version = ">=0.8, <2.0"
-features = ["derive"]
-optional = true
+[dependencies]
+matches = "0.1"
+serde = {version = ">=0.8, <2.0", optional = true}
+serde_derive = {version = ">=0.8, <2.0", optional = true}
 
-[dependencies.matches]
-version = "0.1"
-[dev-dependencies.serde_test]
-version = ">=0.8, <2.0"
+[dev-dependencies]
+serde_test = ">=0.8, <2.0"
 
 [features]
-with_serde = ["serde"]
-flame_it = ["flame", "flamer"]
-unstable = []
 default = []
-bench_it = []
+unstable = []  # Use in benches/
+with_serde = ["serde", "serde_derive"]
--- a/third_party/rust/unicode-bidi/README.md
+++ b/third_party/rust/unicode-bidi/README.md
@@ -1,12 +1,11 @@
 # unicode-bidi
 
 This crate implements the [Unicode Bidirectional Algorithm][tr9] for display
 of mixed right-to-left and left-to-right text.  It is written in safe Rust,
 compatible with the current stable release.
 
 [Documentation](http://doc.servo.org/unicode_bidi/)
 
-[![Travis-CI](https://travis-ci.org/servo/unicode-bidi.svg?branch=master)](https://travis-ci.org/servo/unicode-bidi)
-[![AppVeyor](https://img.shields.io/appveyor/ci/servo/unicode-bidi/master.svg)](https://ci.appveyor.com/project/servo/unicode-bidi)
+[![Build Status](https://travis-ci.org/servo/unicode-bidi.svg?branch=master)](https://travis-ci.org/servo/unicode-bidi)
 
 [tr9]: http://www.unicode.org/reports/tr9/
rename from third_party/rust/unicode-bidi-0.3.3/benches/basic.rs
rename to third_party/rust/unicode-bidi/benches/basic.rs
rename from third_party/rust/unicode-bidi-0.3.3/benches/udhr.rs
rename to third_party/rust/unicode-bidi/benches/udhr.rs
rename from third_party/rust/unicode-bidi-0.3.3/benches/udhr_data/README.md
rename to third_party/rust/unicode-bidi/benches/udhr_data/README.md
--- a/third_party/rust/unicode-bidi/src/char_data/mod.rs
+++ b/third_party/rust/unicode-bidi/src/char_data/mod.rs
@@ -14,123 +14,103 @@ mod tables;
 pub use self::tables::{BidiClass, UNICODE_VERSION};
 
 use std::cmp::Ordering::{Equal, Less, Greater};
 use std::char;
 
 use self::tables::bidi_class_table;
 use BidiClass::*;
 
-/// Find the `BidiClass` of a single char.
+/// Find the BidiClass of a single char.
 pub fn bidi_class(c: char) -> BidiClass {
     bsearch_range_value_table(c, bidi_class_table)
 }
 
 pub fn is_rtl(bidi_class: BidiClass) -> bool {
     match bidi_class {
         RLE | RLO | RLI => true,
         _ => false,
     }
 }
 
 fn bsearch_range_value_table(c: char, r: &'static [(char, char, BidiClass)]) -> BidiClass {
-    match r.binary_search_by(|&(lo, hi, _)| if lo <= c && c <= hi {
-        Equal
-    } else if hi < c {
-        Less
-    } else {
-        Greater
-    }) {
+    match r.binary_search_by(
+        |&(lo, hi, _)| if lo <= c && c <= hi {
+            Equal
+        } else if hi < c {
+            Less
+        } else {
+            Greater
+        }
+    ) {
         Ok(idx) => {
             let (_, _, cat) = r[idx];
             cat
         }
         // UCD/extracted/DerivedBidiClass.txt: "All code points not explicitly listed
         // for Bidi_Class have the value Left_To_Right (L)."
         Err(_) => L,
     }
 }
 
 #[cfg(test)]
 mod tests {
     use super::*;
 
     #[test]
-    fn test_ascii() {
-        assert_eq!(bidi_class('\u{0000}'), BN);
-        assert_eq!(bidi_class('\u{0040}'), ON);
-        assert_eq!(bidi_class('\u{0041}'), L);
-        assert_eq!(bidi_class('\u{0062}'), L);
-        assert_eq!(bidi_class('\u{007F}'), BN);
-    }
-
-    #[test]
-    fn test_bmp() {
-        // Hebrew
-        assert_eq!(bidi_class('\u{0590}'), R);
-        assert_eq!(bidi_class('\u{05D0}'), R);
-        assert_eq!(bidi_class('\u{05D1}'), R);
-        assert_eq!(bidi_class('\u{05FF}'), R);
+    fn test_bidi_class() {
+        for (input, expected) in
+            vec![
+                (0x0000, BN),
+                (0x0040, ON),
+                (0x0041, L),
+                (0x0062, L),
+                (0x007F, BN),
 
-        // Arabic
-        assert_eq!(bidi_class('\u{0600}'), AN);
-        assert_eq!(bidi_class('\u{0627}'), AL);
-        assert_eq!(bidi_class('\u{07BF}'), AL);
+                // Hebrew
+                (0x0590, R),
+                (0x05D0, R),
+                (0x05D1, R),
+                (0x05FF, R),
 
-        // Default R + Arabic Extras
-        assert_eq!(bidi_class('\u{07C0}'), R);
-        assert_eq!(bidi_class('\u{085F}'), R);
-        assert_eq!(bidi_class('\u{0860}'), AL);
-        assert_eq!(bidi_class('\u{0870}'), R);
-        assert_eq!(bidi_class('\u{089F}'), R);
-        assert_eq!(bidi_class('\u{08A0}'), AL);
-        assert_eq!(bidi_class('\u{089F}'), R);
-        assert_eq!(bidi_class('\u{08FF}'), NSM);
-
-        // Default ET
-        assert_eq!(bidi_class('\u{20A0}'), ET);
-        assert_eq!(bidi_class('\u{20CF}'), ET);
+                // Arabic
+                (0x0600, AN),
+                (0x0627, AL),
+                (0x07BF, AL),
 
-        // Arabic Presentation Forms
-        assert_eq!(bidi_class('\u{FB1D}'), R);
-        assert_eq!(bidi_class('\u{FB4F}'), R);
-        assert_eq!(bidi_class('\u{FB50}'), AL);
-        assert_eq!(bidi_class('\u{FDCF}'), AL);
-        assert_eq!(bidi_class('\u{FDF0}'), AL);
-        assert_eq!(bidi_class('\u{FDFF}'), AL);
-        assert_eq!(bidi_class('\u{FE70}'), AL);
-        assert_eq!(bidi_class('\u{FEFE}'), AL);
-        assert_eq!(bidi_class('\u{FEFF}'), BN);
+                // Default R + Arabic Extras
+                (0x07C0, R),
+                (0x085F, R),
+                (0x0860, R),
+                (0x089F, R),
+                (0x08A0, AL),
+                (0x089F, R),
+                (0x08FF, NSM),
 
-        // noncharacters
-        assert_eq!(bidi_class('\u{FDD0}'), L);
-        assert_eq!(bidi_class('\u{FDD1}'), L);
-        assert_eq!(bidi_class('\u{FDEE}'), L);
-        assert_eq!(bidi_class('\u{FDEF}'), L);
-        assert_eq!(bidi_class('\u{FFFE}'), L);
-        assert_eq!(bidi_class('\u{FFFF}'), L);
-    }
+                // Default ET
+                (0x20A0, ET),
+                (0x20CF, ET),
 
-    #[test]
-    fn test_smp() {
-        // Default AL + R
-        assert_eq!(bidi_class('\u{10800}'), R);
-        assert_eq!(bidi_class('\u{10FFF}'), R);
-        assert_eq!(bidi_class('\u{1E800}'), R);
-        assert_eq!(bidi_class('\u{1EDFF}'), R);
-        assert_eq!(bidi_class('\u{1EE00}'), AL);
-        assert_eq!(bidi_class('\u{1EEFF}'), AL);
-        assert_eq!(bidi_class('\u{1EF00}'), R);
-        assert_eq!(bidi_class('\u{1EFFF}'), R);
-    }
+                // Arabic Presentation Forms
+                (0xFB1D, R),
+                (0xFB4F, R),
+                (0xFB50, AL),
+                (0xFDCF, AL),
+                (0xFDF0, AL),
+                (0xFDFF, AL),
+                (0xFE70, AL),
+                (0xFEFE, AL),
+                (0xFEFF, BN),
 
-    #[test]
-    fn test_unassigned_planes() {
-        assert_eq!(bidi_class('\u{30000}'), L);
-        assert_eq!(bidi_class('\u{40000}'), L);
-        assert_eq!(bidi_class('\u{50000}'), L);
-        assert_eq!(bidi_class('\u{60000}'), L);
-        assert_eq!(bidi_class('\u{70000}'), L);
-        assert_eq!(bidi_class('\u{80000}'), L);
-        assert_eq!(bidi_class('\u{90000}'), L);
-        assert_eq!(bidi_class('\u{a0000}'), L);
+                // Default AL + R
+                (0x10800, R),
+                (0x10FFF, R),
+                (0x1E800, R),
+                (0x1EDFF, R),
+                (0x1EE00, AL),
+                (0x1EEFF, AL),
+                (0x1EF00, R),
+                (0x1EFFF, R),
+            ] {
+            assert_eq!(bidi_class(char::from_u32(input).unwrap()), expected);
+        }
     }
 }
--- a/third_party/rust/unicode-bidi/src/char_data/tables.rs
+++ b/third_party/rust/unicode-bidi/src/char_data/tables.rs
@@ -1,25 +1,25 @@
 // NOTE:
 // The following code was generated by "tools/generate.py". do not edit directly
 
 #![allow(missing_docs, non_upper_case_globals, non_snake_case)]
 #![cfg_attr(rustfmt, rustfmt_skip)]
 
 /// The [Unicode version](http://www.unicode.org/versions/) of data
-pub const UNICODE_VERSION: (u64, u64, u64) = (10, 0, 0);
+pub const UNICODE_VERSION: (u64, u64, u64) = (9, 0, 0);
 
 #[allow(non_camel_case_types)]
 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
 /// Represents values of the Unicode character property
-/// [`Bidi_Class`](http://www.unicode.org/reports/tr44/#Bidi_Class), also
+/// [Bidi_Class](http://www.unicode.org/reports/tr44/#Bidi_Class), also
 /// known as the *bidirectional character type*.
 ///
-/// * <http://www.unicode.org/reports/tr9/#Bidirectional_Character_Types>
-/// * <http://www.unicode.org/reports/tr44/#Bidi_Class_Values>
+/// * http://www.unicode.org/reports/tr9/#Bidirectional_Character_Types
+/// * http://www.unicode.org/reports/tr44/#Bidi_Class_Values
 pub enum BidiClass {
     AL,
     AN,
     B,
     BN,
     CS,
     EN,
     ES,
@@ -79,350 +79,338 @@ pub const bidi_class_table: &'static [(c
     '\u{6e4}', NSM), ('\u{6e5}', '\u{6e6}', AL), ('\u{6e7}', '\u{6e8}', NSM), ('\u{6e9}', '\u{6e9}',
     ON), ('\u{6ea}', '\u{6ed}', NSM), ('\u{6ee}', '\u{6ef}', AL), ('\u{6f0}', '\u{6f9}', EN),
     ('\u{6fa}', '\u{710}', AL), ('\u{711}', '\u{711}', NSM), ('\u{712}', '\u{72f}', AL), ('\u{730}',
     '\u{74a}', NSM), ('\u{74b}', '\u{7a5}', AL), ('\u{7a6}', '\u{7b0}', NSM), ('\u{7b1}', '\u{7bf}',
     AL), ('\u{7c0}', '\u{7ea}', R), ('\u{7eb}', '\u{7f3}', NSM), ('\u{7f4}', '\u{7f5}', R),
     ('\u{7f6}', '\u{7f9}', ON), ('\u{7fa}', '\u{815}', R), ('\u{816}', '\u{819}', NSM), ('\u{81a}',
     '\u{81a}', R), ('\u{81b}', '\u{823}', NSM), ('\u{824}', '\u{824}', R), ('\u{825}', '\u{827}',
     NSM), ('\u{828}', '\u{828}', R), ('\u{829}', '\u{82d}', NSM), ('\u{82e}', '\u{858}', R),
-    ('\u{859}', '\u{85b}', NSM), ('\u{85c}', '\u{85f}', R), ('\u{860}', '\u{86a}', AL), ('\u{86b}',
-    '\u{89f}', R), ('\u{8a0}', '\u{8d3}', AL), ('\u{8d4}', '\u{8e1}', NSM), ('\u{8e2}', '\u{8e2}',
-    AN), ('\u{8e3}', '\u{902}', NSM), ('\u{903}', '\u{939}', L), ('\u{93a}', '\u{93a}', NSM),
-    ('\u{93b}', '\u{93b}', L), ('\u{93c}', '\u{93c}', NSM), ('\u{93d}', '\u{940}', L), ('\u{941}',
-    '\u{948}', NSM), ('\u{949}', '\u{94c}', L), ('\u{94d}', '\u{94d}', NSM), ('\u{94e}', '\u{950}',
-    L), ('\u{951}', '\u{957}', NSM), ('\u{958}', '\u{961}', L), ('\u{962}', '\u{963}', NSM),
-    ('\u{964}', '\u{980}', L), ('\u{981}', '\u{981}', NSM), ('\u{982}', '\u{983}', L), ('\u{985}',
-    '\u{98c}', L), ('\u{98f}', '\u{990}', L), ('\u{993}', '\u{9a8}', L), ('\u{9aa}', '\u{9b0}', L),
-    ('\u{9b2}', '\u{9b2}', L), ('\u{9b6}', '\u{9b9}', L), ('\u{9bc}', '\u{9bc}', NSM), ('\u{9bd}',
-    '\u{9c0}', L), ('\u{9c1}', '\u{9c4}', NSM), ('\u{9c7}', '\u{9c8}', L), ('\u{9cb}', '\u{9cc}',
-    L), ('\u{9cd}', '\u{9cd}', NSM), ('\u{9ce}', '\u{9ce}', L), ('\u{9d7}', '\u{9d7}', L),
-    ('\u{9dc}', '\u{9dd}', L), ('\u{9df}', '\u{9e1}', L), ('\u{9e2}', '\u{9e3}', NSM), ('\u{9e6}',
-    '\u{9f1}', L), ('\u{9f2}', '\u{9f3}', ET), ('\u{9f4}', '\u{9fa}', L), ('\u{9fb}', '\u{9fb}',
-    ET), ('\u{9fc}', '\u{9fd}', L), ('\u{a01}', '\u{a02}', NSM), ('\u{a03}', '\u{a03}', L),
+    ('\u{859}', '\u{85b}', NSM), ('\u{85c}', '\u{89f}', R), ('\u{8a0}', '\u{8d3}', AL), ('\u{8d4}',
+    '\u{8e1}', NSM), ('\u{8e2}', '\u{8e2}', AN), ('\u{8e3}', '\u{902}', NSM), ('\u{903}', '\u{939}',
+    L), ('\u{93a}', '\u{93a}', NSM), ('\u{93b}', '\u{93b}', L), ('\u{93c}', '\u{93c}', NSM),
+    ('\u{93d}', '\u{940}', L), ('\u{941}', '\u{948}', NSM), ('\u{949}', '\u{94c}', L), ('\u{94d}',
+    '\u{94d}', NSM), ('\u{94e}', '\u{950}', L), ('\u{951}', '\u{957}', NSM), ('\u{958}', '\u{961}',
+    L), ('\u{962}', '\u{963}', NSM), ('\u{964}', '\u{980}', L), ('\u{981}', '\u{981}', NSM),
+    ('\u{982}', '\u{983}', L), ('\u{985}', '\u{98c}', L), ('\u{98f}', '\u{990}', L), ('\u{993}',
+    '\u{9a8}', L), ('\u{9aa}', '\u{9b0}', L), ('\u{9b2}', '\u{9b2}', L), ('\u{9b6}', '\u{9b9}', L),
+    ('\u{9bc}', '\u{9bc}', NSM), ('\u{9bd}', '\u{9c0}', L), ('\u{9c1}', '\u{9c4}', NSM), ('\u{9c7}',
+    '\u{9c8}', L), ('\u{9cb}', '\u{9cc}', L), ('\u{9cd}', '\u{9cd}', NSM), ('\u{9ce}', '\u{9ce}',
+    L), ('\u{9d7}', '\u{9d7}', L), ('\u{9dc}', '\u{9dd}', L), ('\u{9df}', '\u{9e1}', L), ('\u{9e2}',
+    '\u{9e3}', NSM), ('\u{9e6}', '\u{9f1}', L), ('\u{9f2}', '\u{9f3}', ET), ('\u{9f4}', '\u{9fa}',
+    L), ('\u{9fb}', '\u{9fb}', ET), ('\u{a01}', '\u{a02}', NSM), ('\u{a03}', '\u{a03}', L),
     ('\u{a05}', '\u{a0a}', L), ('\u{a0f}', '\u{a10}', L), ('\u{a13}', '\u{a28}', L), ('\u{a2a}',
     '\u{a30}', L), ('\u{a32}', '\u{a33}', L), ('\u{a35}', '\u{a36}', L), ('\u{a38}', '\u{a39}', L),
     ('\u{a3c}', '\u{a3c}', NSM), ('\u{a3e}', '\u{a40}', L), ('\u{a41}', '\u{a42}', NSM), ('\u{a47}',
     '\u{a48}', NSM), ('\u{a4b}', '\u{a4d}', NSM), ('\u{a51}', '\u{a51}', NSM), ('\u{a59}',
     '\u{a5c}', L), ('\u{a5e}', '\u{a5e}', L), ('\u{a66}', '\u{a6f}', L), ('\u{a70}', '\u{a71}',
     NSM), ('\u{a72}', '\u{a74}', L), ('\u{a75}', '\u{a75}', NSM), ('\u{a81}', '\u{a82}', NSM),
     ('\u{a83}', '\u{a83}', L), ('\u{a85}', '\u{a8d}', L), ('\u{a8f}', '\u{a91}', L), ('\u{a93}',
     '\u{aa8}', L), ('\u{aaa}', '\u{ab0}', L), ('\u{ab2}', '\u{ab3}', L), ('\u{ab5}', '\u{ab9}', L),
     ('\u{abc}', '\u{abc}', NSM), ('\u{abd}', '\u{ac0}', L), ('\u{ac1}', '\u{ac5}', NSM), ('\u{ac7}',
     '\u{ac8}', NSM), ('\u{ac9}', '\u{ac9}', L), ('\u{acb}', '\u{acc}', L), ('\u{acd}', '\u{acd}',
     NSM), ('\u{ad0}', '\u{ad0}', L), ('\u{ae0}', '\u{ae1}', L), ('\u{ae2}', '\u{ae3}', NSM),
-    ('\u{ae6}', '\u{af0}', L), ('\u{af1}', '\u{af1}', ET), ('\u{af9}', '\u{af9}', L), ('\u{afa}',
-    '\u{aff}', NSM), ('\u{b01}', '\u{b01}', NSM), ('\u{b02}', '\u{b03}', L), ('\u{b05}', '\u{b0c}',
-    L), ('\u{b0f}', '\u{b10}', L), ('\u{b13}', '\u{b28}', L), ('\u{b2a}', '\u{b30}', L), ('\u{b32}',
-    '\u{b33}', L), ('\u{b35}', '\u{b39}', L), ('\u{b3c}', '\u{b3c}', NSM), ('\u{b3d}', '\u{b3e}',
-    L), ('\u{b3f}', '\u{b3f}', NSM), ('\u{b40}', '\u{b40}', L), ('\u{b41}', '\u{b44}', NSM),
-    ('\u{b47}', '\u{b48}', L), ('\u{b4b}', '\u{b4c}', L), ('\u{b4d}', '\u{b4d}', NSM), ('\u{b56}',
-    '\u{b56}', NSM), ('\u{b57}', '\u{b57}', L), ('\u{b5c}', '\u{b5d}', L), ('\u{b5f}', '\u{b61}',
-    L), ('\u{b62}', '\u{b63}', NSM), ('\u{b66}', '\u{b77}', L), ('\u{b82}', '\u{b82}', NSM),
-    ('\u{b83}', '\u{b83}', L), ('\u{b85}', '\u{b8a}', L), ('\u{b8e}', '\u{b90}', L), ('\u{b92}',
-    '\u{b95}', L), ('\u{b99}', '\u{b9a}', L), ('\u{b9c}', '\u{b9c}', L), ('\u{b9e}', '\u{b9f}', L),
-    ('\u{ba3}', '\u{ba4}', L), ('\u{ba8}', '\u{baa}', L), ('\u{bae}', '\u{bb9}', L), ('\u{bbe}',
-    '\u{bbf}', L), ('\u{bc0}', '\u{bc0}', NSM), ('\u{bc1}', '\u{bc2}', L), ('\u{bc6}', '\u{bc8}',
-    L), ('\u{bca}', '\u{bcc}', L), ('\u{bcd}', '\u{bcd}', NSM), ('\u{bd0}', '\u{bd0}', L),
-    ('\u{bd7}', '\u{bd7}', L), ('\u{be6}', '\u{bf2}', L), ('\u{bf3}', '\u{bf8}', ON), ('\u{bf9}',
-    '\u{bf9}', ET), ('\u{bfa}', '\u{bfa}', ON), ('\u{c00}', '\u{c00}', NSM), ('\u{c01}', '\u{c03}',
-    L), ('\u{c05}', '\u{c0c}', L), ('\u{c0e}', '\u{c10}', L), ('\u{c12}', '\u{c28}', L), ('\u{c2a}',
-    '\u{c39}', L), ('\u{c3d}', '\u{c3d}', L), ('\u{c3e}', '\u{c40}', NSM), ('\u{c41}', '\u{c44}',
-    L), ('\u{c46}', '\u{c48}', NSM), ('\u{c4a}', '\u{c4d}', NSM), ('\u{c55}', '\u{c56}', NSM),
-    ('\u{c58}', '\u{c5a}', L), ('\u{c60}', '\u{c61}', L), ('\u{c62}', '\u{c63}', NSM), ('\u{c66}',
-    '\u{c6f}', L), ('\u{c78}', '\u{c7e}', ON), ('\u{c7f}', '\u{c80}', L), ('\u{c81}', '\u{c81}',
-    NSM), ('\u{c82}', '\u{c83}', L), ('\u{c85}', '\u{c8c}', L), ('\u{c8e}', '\u{c90}', L),
-    ('\u{c92}', '\u{ca8}', L), ('\u{caa}', '\u{cb3}', L), ('\u{cb5}', '\u{cb9}', L), ('\u{cbc}',
-    '\u{cbc}', NSM), ('\u{cbd}', '\u{cc4}', L), ('\u{cc6}', '\u{cc8}', L), ('\u{cca}', '\u{ccb}',
-    L), ('\u{ccc}', '\u{ccd}', NSM), ('\u{cd5}', '\u{cd6}', L), ('\u{cde}', '\u{cde}', L),
-    ('\u{ce0}', '\u{ce1}', L), ('\u{ce2}', '\u{ce3}', NSM), ('\u{ce6}', '\u{cef}', L), ('\u{cf1}',
-    '\u{cf2}', L), ('\u{d00}', '\u{d01}', NSM), ('\u{d02}', '\u{d03}', L), ('\u{d05}', '\u{d0c}',
-    L), ('\u{d0e}', '\u{d10}', L), ('\u{d12}', '\u{d3a}', L), ('\u{d3b}', '\u{d3c}', NSM),
-    ('\u{d3d}', '\u{d40}', L), ('\u{d41}', '\u{d44}', NSM), ('\u{d46}', '\u{d48}', L), ('\u{d4a}',
-    '\u{d4c}', L), ('\u{d4d}', '\u{d4d}', NSM), ('\u{d4e}', '\u{d4f}', L), ('\u{d54}', '\u{d61}',
-    L), ('\u{d62}', '\u{d63}', NSM), ('\u{d66}', '\u{d7f}', L), ('\u{d82}', '\u{d83}', L),
-    ('\u{d85}', '\u{d96}', L), ('\u{d9a}', '\u{db1}', L), ('\u{db3}', '\u{dbb}', L), ('\u{dbd}',
-    '\u{dbd}', L), ('\u{dc0}', '\u{dc6}', L), ('\u{dca}', '\u{dca}', NSM), ('\u{dcf}', '\u{dd1}',
-    L), ('\u{dd2}', '\u{dd4}', NSM), ('\u{dd6}', '\u{dd6}', NSM), ('\u{dd8}', '\u{ddf}', L),
-    ('\u{de6}', '\u{def}', L), ('\u{df2}', '\u{df4}', L), ('\u{e01}', '\u{e30}', L), ('\u{e31}',
-    '\u{e31}', NSM), ('\u{e32}', '\u{e33}', L), ('\u{e34}', '\u{e3a}', NSM), ('\u{e3f}', '\u{e3f}',
-    ET), ('\u{e40}', '\u{e46}', L), ('\u{e47}', '\u{e4e}', NSM), ('\u{e4f}', '\u{e5b}', L),
-    ('\u{e81}', '\u{e82}', L), ('\u{e84}', '\u{e84}', L), ('\u{e87}', '\u{e88}', L), ('\u{e8a}',
-    '\u{e8a}', L), ('\u{e8d}', '\u{e8d}', L), ('\u{e94}', '\u{e97}', L), ('\u{e99}', '\u{e9f}', L),
-    ('\u{ea1}', '\u{ea3}', L), ('\u{ea5}', '\u{ea5}', L), ('\u{ea7}', '\u{ea7}', L), ('\u{eaa}',
-    '\u{eab}', L), ('\u{ead}', '\u{eb0}', L), ('\u{eb1}', '\u{eb1}', NSM), ('\u{eb2}', '\u{eb3}',
-    L), ('\u{eb4}', '\u{eb9}', NSM), ('\u{ebb}', '\u{ebc}', NSM), ('\u{ebd}', '\u{ebd}', L),
-    ('\u{ec0}', '\u{ec4}', L), ('\u{ec6}', '\u{ec6}', L), ('\u{ec8}', '\u{ecd}', NSM), ('\u{ed0}',
-    '\u{ed9}', L), ('\u{edc}', '\u{edf}', L), ('\u{f00}', '\u{f17}', L), ('\u{f18}', '\u{f19}',
-    NSM), ('\u{f1a}', '\u{f34}', L), ('\u{f35}', '\u{f35}', NSM), ('\u{f36}', '\u{f36}', L),
-    ('\u{f37}', '\u{f37}', NSM), ('\u{f38}', '\u{f38}', L), ('\u{f39}', '\u{f39}', NSM), ('\u{f3a}',
-    '\u{f3d}', ON), ('\u{f3e}', '\u{f47}', L), ('\u{f49}', '\u{f6c}', L), ('\u{f71}', '\u{f7e}',
-    NSM), ('\u{f7f}', '\u{f7f}', L), ('\u{f80}', '\u{f84}', NSM), ('\u{f85}', '\u{f85}', L),
-    ('\u{f86}', '\u{f87}', NSM), ('\u{f88}', '\u{f8c}', L), ('\u{f8d}', '\u{f97}', NSM), ('\u{f99}',
-    '\u{fbc}', NSM), ('\u{fbe}', '\u{fc5}', L), ('\u{fc6}', '\u{fc6}', NSM), ('\u{fc7}', '\u{fcc}',
-    L), ('\u{fce}', '\u{fda}', L), ('\u{1000}', '\u{102c}', L), ('\u{102d}', '\u{1030}', NSM),
-    ('\u{1031}', '\u{1031}', L), ('\u{1032}', '\u{1037}', NSM), ('\u{1038}', '\u{1038}', L),
-    ('\u{1039}', '\u{103a}', NSM), ('\u{103b}', '\u{103c}', L), ('\u{103d}', '\u{103e}', NSM),
-    ('\u{103f}', '\u{1057}', L), ('\u{1058}', '\u{1059}', NSM), ('\u{105a}', '\u{105d}', L),
-    ('\u{105e}', '\u{1060}', NSM), ('\u{1061}', '\u{1070}', L), ('\u{1071}', '\u{1074}', NSM),
-    ('\u{1075}', '\u{1081}', L), ('\u{1082}', '\u{1082}', NSM), ('\u{1083}', '\u{1084}', L),
-    ('\u{1085}', '\u{1086}', NSM), ('\u{1087}', '\u{108c}', L), ('\u{108d}', '\u{108d}', NSM),
-    ('\u{108e}', '\u{109c}', L), ('\u{109d}', '\u{109d}', NSM), ('\u{109e}', '\u{10c5}', L),
-    ('\u{10c7}', '\u{10c7}', L), ('\u{10cd}', '\u{10cd}', L), ('\u{10d0}', '\u{1248}', L),
-    ('\u{124a}', '\u{124d}', L), ('\u{1250}', '\u{1256}', L), ('\u{1258}', '\u{1258}', L),
-    ('\u{125a}', '\u{125d}', L), ('\u{1260}', '\u{1288}', L), ('\u{128a}', '\u{128d}', L),
-    ('\u{1290}', '\u{12b0}', L), ('\u{12b2}', '\u{12b5}', L), ('\u{12b8}', '\u{12be}', L),
-    ('\u{12c0}', '\u{12c0}', L), ('\u{12c2}', '\u{12c5}', L), ('\u{12c8}', '\u{12d6}', L),
-    ('\u{12d8}', '\u{1310}', L), ('\u{1312}', '\u{1315}', L), ('\u{1318}', '\u{135a}', L),
-    ('\u{135d}', '\u{135f}', NSM), ('\u{1360}', '\u{137c}', L), ('\u{1380}', '\u{138f}', L),
-    ('\u{1390}', '\u{1399}', ON), ('\u{13a0}', '\u{13f5}', L), ('\u{13f8}', '\u{13fd}', L),
-    ('\u{1400}', '\u{1400}', ON), ('\u{1401}', '\u{167f}', L), ('\u{1680}', '\u{1680}', WS),
-    ('\u{1681}', '\u{169a}', L), ('\u{169b}', '\u{169c}', ON), ('\u{16a0}', '\u{16f8}', L),
-    ('\u{1700}', '\u{170c}', L), ('\u{170e}', '\u{1711}', L), ('\u{1712}', '\u{1714}', NSM),
-    ('\u{1720}', '\u{1731}', L), ('\u{1732}', '\u{1734}', NSM), ('\u{1735}', '\u{1736}', L),
-    ('\u{1740}', '\u{1751}', L), ('\u{1752}', '\u{1753}', NSM), ('\u{1760}', '\u{176c}', L),
-    ('\u{176e}', '\u{1770}', L), ('\u{1772}', '\u{1773}', NSM), ('\u{1780}', '\u{17b3}', L),
-    ('\u{17b4}', '\u{17b5}', NSM), ('\u{17b6}', '\u{17b6}', L), ('\u{17b7}', '\u{17bd}', NSM),
-    ('\u{17be}', '\u{17c5}', L), ('\u{17c6}', '\u{17c6}', NSM), ('\u{17c7}', '\u{17c8}', L),
-    ('\u{17c9}', '\u{17d3}', NSM), ('\u{17d4}', '\u{17da}', L), ('\u{17db}', '\u{17db}', ET),
-    ('\u{17dc}', '\u{17dc}', L), ('\u{17dd}', '\u{17dd}', NSM), ('\u{17e0}', '\u{17e9}', L),
-    ('\u{17f0}', '\u{17f9}', ON), ('\u{1800}', '\u{180a}', ON), ('\u{180b}', '\u{180d}', NSM),
-    ('\u{180e}', '\u{180e}', BN), ('\u{1810}', '\u{1819}', L), ('\u{1820}', '\u{1877}', L),
-    ('\u{1880}', '\u{1884}', L), ('\u{1885}', '\u{1886}', NSM), ('\u{1887}', '\u{18a8}', L),
-    ('\u{18a9}', '\u{18a9}', NSM), ('\u{18aa}', '\u{18aa}', L), ('\u{18b0}', '\u{18f5}', L),
-    ('\u{1900}', '\u{191e}', L), ('\u{1920}', '\u{1922}', NSM), ('\u{1923}', '\u{1926}', L),
-    ('\u{1927}', '\u{1928}', NSM), ('\u{1929}', '\u{192b}', L), ('\u{1930}', '\u{1931}', L),
-    ('\u{1932}', '\u{1932}', NSM), ('\u{1933}', '\u{1938}', L), ('\u{1939}', '\u{193b}', NSM),
-    ('\u{1940}', '\u{1940}', ON), ('\u{1944}', '\u{1945}', ON), ('\u{1946}', '\u{196d}', L),
-    ('\u{1970}', '\u{1974}', L), ('\u{1980}', '\u{19ab}', L), ('\u{19b0}', '\u{19c9}', L),
-    ('\u{19d0}', '\u{19da}', L), ('\u{19de}', '\u{19ff}', ON), ('\u{1a00}', '\u{1a16}', L),
-    ('\u{1a17}', '\u{1a18}', NSM), ('\u{1a19}', '\u{1a1a}', L), ('\u{1a1b}', '\u{1a1b}', NSM),
-    ('\u{1a1e}', '\u{1a55}', L), ('\u{1a56}', '\u{1a56}', NSM), ('\u{1a57}', '\u{1a57}', L),
-    ('\u{1a58}', '\u{1a5e}', NSM), ('\u{1a60}', '\u{1a60}', NSM), ('\u{1a61}', '\u{1a61}', L),
-    ('\u{1a62}', '\u{1a62}', NSM), ('\u{1a63}', '\u{1a64}', L), ('\u{1a65}', '\u{1a6c}', NSM),
-    ('\u{1a6d}', '\u{1a72}', L), ('\u{1a73}', '\u{1a7c}', NSM), ('\u{1a7f}', '\u{1a7f}', NSM),
-    ('\u{1a80}', '\u{1a89}', L), ('\u{1a90}', '\u{1a99}', L), ('\u{1aa0}', '\u{1aad}', L),
-    ('\u{1ab0}', '\u{1abe}', NSM), ('\u{1b00}', '\u{1b03}', NSM), ('\u{1b04}', '\u{1b33}', L),
-    ('\u{1b34}', '\u{1b34}', NSM), ('\u{1b35}', '\u{1b35}', L), ('\u{1b36}', '\u{1b3a}', NSM),
-    ('\u{1b3b}', '\u{1b3b}', L), ('\u{1b3c}', '\u{1b3c}', NSM), ('\u{1b3d}', '\u{1b41}', L),
-    ('\u{1b42}', '\u{1b42}', NSM), ('\u{1b43}', '\u{1b4b}', L), ('\u{1b50}', '\u{1b6a}', L),
-    ('\u{1b6b}', '\u{1b73}', NSM), ('\u{1b74}', '\u{1b7c}', L), ('\u{1b80}', '\u{1b81}', NSM),
-    ('\u{1b82}', '\u{1ba1}', L), ('\u{1ba2}', '\u{1ba5}', NSM), ('\u{1ba6}', '\u{1ba7}', L),
-    ('\u{1ba8}', '\u{1ba9}', NSM), ('\u{1baa}', '\u{1baa}', L), ('\u{1bab}', '\u{1bad}', NSM),
-    ('\u{1bae}', '\u{1be5}', L), ('\u{1be6}', '\u{1be6}', NSM), ('\u{1be7}', '\u{1be7}', L),
-    ('\u{1be8}', '\u{1be9}', NSM), ('\u{1bea}', '\u{1bec}', L), ('\u{1bed}', '\u{1bed}', NSM),
-    ('\u{1bee}', '\u{1bee}', L), ('\u{1bef}', '\u{1bf1}', NSM), ('\u{1bf2}', '\u{1bf3}', L),
-    ('\u{1bfc}', '\u{1c2b}', L), ('\u{1c2c}', '\u{1c33}', NSM), ('\u{1c34}', '\u{1c35}', L),
-    ('\u{1c36}', '\u{1c37}', NSM), ('\u{1c3b}', '\u{1c49}', L), ('\u{1c4d}', '\u{1c88}', L),
-    ('\u{1cc0}', '\u{1cc7}', L), ('\u{1cd0}', '\u{1cd2}', NSM), ('\u{1cd3}', '\u{1cd3}', L),
-    ('\u{1cd4}', '\u{1ce0}', NSM), ('\u{1ce1}', '\u{1ce1}', L), ('\u{1ce2}', '\u{1ce8}', NSM),
-    ('\u{1ce9}', '\u{1cec}', L), ('\u{1ced}', '\u{1ced}', NSM), ('\u{1cee}', '\u{1cf3}', L),
-    ('\u{1cf4}', '\u{1cf4}', NSM), ('\u{1cf5}', '\u{1cf7}', L), ('\u{1cf8}', '\u{1cf9}', NSM),
-    ('\u{1d00}', '\u{1dbf}', L), ('\u{1dc0}', '\u{1df9}', NSM), ('\u{1dfb}', '\u{1dff}', NSM),
-    ('\u{1e00}', '\u{1f15}', L), ('\u{1f18}', '\u{1f1d}', L), ('\u{1f20}', '\u{1f45}', L),
-    ('\u{1f48}', '\u{1f4d}', L), ('\u{1f50}', '\u{1f57}', L), ('\u{1f59}', '\u{1f59}', L),
-    ('\u{1f5b}', '\u{1f5b}', L), ('\u{1f5d}', '\u{1f5d}', L), ('\u{1f5f}', '\u{1f7d}', L),
-    ('\u{1f80}', '\u{1fb4}', L), ('\u{1fb6}', '\u{1fbc}', L), ('\u{1fbd}', '\u{1fbd}', ON),
-    ('\u{1fbe}', '\u{1fbe}', L), ('\u{1fbf}', '\u{1fc1}', ON), ('\u{1fc2}', '\u{1fc4}', L),
-    ('\u{1fc6}', '\u{1fcc}', L), ('\u{1fcd}', '\u{1fcf}', ON), ('\u{1fd0}', '\u{1fd3}', L),
-    ('\u{1fd6}', '\u{1fdb}', L), ('\u{1fdd}', '\u{1fdf}', ON), ('\u{1fe0}', '\u{1fec}', L),
-    ('\u{1fed}', '\u{1fef}', ON), ('\u{1ff2}', '\u{1ff4}', L), ('\u{1ff6}', '\u{1ffc}', L),
-    ('\u{1ffd}', '\u{1ffe}', ON), ('\u{2000}', '\u{200a}', WS), ('\u{200b}', '\u{200d}', BN),
-    ('\u{200e}', '\u{200e}', L), ('\u{200f}', '\u{200f}', R), ('\u{2010}', '\u{2027}', ON),
-    ('\u{2028}', '\u{2028}', WS), ('\u{2029}', '\u{2029}', B), ('\u{202a}', '\u{202a}', LRE),
-    ('\u{202b}', '\u{202b}', RLE), ('\u{202c}', '\u{202c}', PDF), ('\u{202d}', '\u{202d}', LRO),
-    ('\u{202e}', '\u{202e}', RLO), ('\u{202f}', '\u{202f}', CS), ('\u{2030}', '\u{2034}', ET),
-    ('\u{2035}', '\u{2043}', ON), ('\u{2044}', '\u{2044}', CS), ('\u{2045}', '\u{205e}', ON),
-    ('\u{205f}', '\u{205f}', WS), ('\u{2060}', '\u{2064}', BN), ('\u{2066}', '\u{2066}', LRI),
-    ('\u{2067}', '\u{2067}', RLI), ('\u{2068}', '\u{2068}', FSI), ('\u{2069}', '\u{2069}', PDI),
-    ('\u{206a}', '\u{206f}', BN), ('\u{2070}', '\u{2070}', EN), ('\u{2071}', '\u{2071}', L),
-    ('\u{2074}', '\u{2079}', EN), ('\u{207a}', '\u{207b}', ES), ('\u{207c}', '\u{207e}', ON),
-    ('\u{207f}', '\u{207f}', L), ('\u{2080}', '\u{2089}', EN), ('\u{208a}', '\u{208b}', ES),
-    ('\u{208c}', '\u{208e}', ON), ('\u{2090}', '\u{209c}', L), ('\u{20a0}', '\u{20cf}', ET),
-    ('\u{20d0}', '\u{20f0}', NSM), ('\u{2100}', '\u{2101}', ON), ('\u{2102}', '\u{2102}', L),
-    ('\u{2103}', '\u{2106}', ON), ('\u{2107}', '\u{2107}', L), ('\u{2108}', '\u{2109}', ON),
-    ('\u{210a}', '\u{2113}', L), ('\u{2114}', '\u{2114}', ON), ('\u{2115}', '\u{2115}', L),
-    ('\u{2116}', '\u{2118}', ON), ('\u{2119}', '\u{211d}', L), ('\u{211e}', '\u{2123}', ON),
-    ('\u{2124}', '\u{2124}', L), ('\u{2125}', '\u{2125}', ON), ('\u{2126}', '\u{2126}', L),
-    ('\u{2127}', '\u{2127}', ON), ('\u{2128}', '\u{2128}', L), ('\u{2129}', '\u{2129}', ON),
-    ('\u{212a}', '\u{212d}', L), ('\u{212e}', '\u{212e}', ET), ('\u{212f}', '\u{2139}', L),
-    ('\u{213a}', '\u{213b}', ON), ('\u{213c}', '\u{213f}', L), ('\u{2140}', '\u{2144}', ON),
-    ('\u{2145}', '\u{2149}', L), ('\u{214a}', '\u{214d}', ON), ('\u{214e}', '\u{214f}', L),
-    ('\u{2150}', '\u{215f}', ON), ('\u{2160}', '\u{2188}', L), ('\u{2189}', '\u{218b}', ON),
-    ('\u{2190}', '\u{2211}', ON), ('\u{2212}', '\u{2212}', ES), ('\u{2213}', '\u{2213}', ET),
-    ('\u{2214}', '\u{2335}', ON), ('\u{2336}', '\u{237a}', L), ('\u{237b}', '\u{2394}', ON),
-    ('\u{2395}', '\u{2395}', L), ('\u{2396}', '\u{2426}', ON), ('\u{2440}', '\u{244a}', ON),
-    ('\u{2460}', '\u{2487}', ON), ('\u{2488}', '\u{249b}', EN), ('\u{249c}', '\u{24e9}', L),
-    ('\u{24ea}', '\u{26ab}', ON), ('\u{26ac}', '\u{26ac}', L), ('\u{26ad}', '\u{27ff}', ON),
-    ('\u{2800}', '\u{28ff}', L), ('\u{2900}', '\u{2b73}', ON), ('\u{2b76}', '\u{2b95}', ON),
-    ('\u{2b98}', '\u{2bb9}', ON), ('\u{2bbd}', '\u{2bc8}', ON), ('\u{2bca}', '\u{2bd2}', ON),
-    ('\u{2bec}', '\u{2bef}', ON), ('\u{2c00}', '\u{2c2e}', L), ('\u{2c30}', '\u{2c5e}', L),
-    ('\u{2c60}', '\u{2ce4}', L), ('\u{2ce5}', '\u{2cea}', ON), ('\u{2ceb}', '\u{2cee}', L),
-    ('\u{2cef}', '\u{2cf1}', NSM), ('\u{2cf2}', '\u{2cf3}', L), ('\u{2cf9}', '\u{2cff}', ON),
-    ('\u{2d00}', '\u{2d25}', L), ('\u{2d27}', '\u{2d27}', L), ('\u{2d2d}', '\u{2d2d}', L),
-    ('\u{2d30}', '\u{2d67}', L), ('\u{2d6f}', '\u{2d70}', L), ('\u{2d7f}', '\u{2d7f}', NSM),
-    ('\u{2d80}', '\u{2d96}', L), ('\u{2da0}', '\u{2da6}', L), ('\u{2da8}', '\u{2dae}', L),
-    ('\u{2db0}', '\u{2db6}', L), ('\u{2db8}', '\u{2dbe}', L), ('\u{2dc0}', '\u{2dc6}', L),
-    ('\u{2dc8}', '\u{2dce}', L), ('\u{2dd0}', '\u{2dd6}', L), ('\u{2dd8}', '\u{2dde}', L),
-    ('\u{2de0}', '\u{2dff}', NSM), ('\u{2e00}', '\u{2e49}', ON), ('\u{2e80}', '\u{2e99}', ON),
-    ('\u{2e9b}', '\u{2ef3}', ON), ('\u{2f00}', '\u{2fd5}', ON), ('\u{2ff0}', '\u{2ffb}', ON),
-    ('\u{3000}', '\u{3000}', WS), ('\u{3001}', '\u{3004}', ON), ('\u{3005}', '\u{3007}', L),
-    ('\u{3008}', '\u{3020}', ON), ('\u{3021}', '\u{3029}', L), ('\u{302a}', '\u{302d}', NSM),
-    ('\u{302e}', '\u{302f}', L), ('\u{3030}', '\u{3030}', ON), ('\u{3031}', '\u{3035}', L),
-    ('\u{3036}', '\u{3037}', ON), ('\u{3038}', '\u{303c}', L), ('\u{303d}', '\u{303f}', ON),
-    ('\u{3041}', '\u{3096}', L), ('\u{3099}', '\u{309a}', NSM), ('\u{309b}', '\u{309c}', ON),
-    ('\u{309d}', '\u{309f}', L), ('\u{30a0}', '\u{30a0}', ON), ('\u{30a1}', '\u{30fa}', L),
-    ('\u{30fb}', '\u{30fb}', ON), ('\u{30fc}', '\u{30ff}', L), ('\u{3105}', '\u{312e}', L),
-    ('\u{3131}', '\u{318e}', L), ('\u{3190}', '\u{31ba}', L), ('\u{31c0}', '\u{31e3}', ON),
-    ('\u{31f0}', '\u{321c}', L), ('\u{321d}', '\u{321e}', ON), ('\u{3220}', '\u{324f}', L),
-    ('\u{3250}', '\u{325f}', ON), ('\u{3260}', '\u{327b}', L), ('\u{327c}', '\u{327e}', ON),
-    ('\u{327f}', '\u{32b0}', L), ('\u{32b1}', '\u{32bf}', ON), ('\u{32c0}', '\u{32cb}', L),
-    ('\u{32cc}', '\u{32cf}', ON), ('\u{32d0}', '\u{32fe}', L), ('\u{3300}', '\u{3376}', L),
-    ('\u{3377}', '\u{337a}', ON), ('\u{337b}', '\u{33dd}', L), ('\u{33de}', '\u{33df}', ON),
-    ('\u{33e0}', '\u{33fe}', L), ('\u{33ff}', '\u{33ff}', ON), ('\u{3400}', '\u{4db5}', L),
-    ('\u{4dc0}', '\u{4dff}', ON), ('\u{4e00}', '\u{9fea}', L), ('\u{a000}', '\u{a48c}', L),
-    ('\u{a490}', '\u{a4c6}', ON), ('\u{a4d0}', '\u{a60c}', L), ('\u{a60d}', '\u{a60f}', ON),
-    ('\u{a610}', '\u{a62b}', L), ('\u{a640}', '\u{a66e}', L), ('\u{a66f}', '\u{a672}', NSM),
-    ('\u{a673}', '\u{a673}', ON), ('\u{a674}', '\u{a67d}', NSM), ('\u{a67e}', '\u{a67f}', ON),
-    ('\u{a680}', '\u{a69d}', L), ('\u{a69e}', '\u{a69f}', NSM), ('\u{a6a0}', '\u{a6ef}', L),
-    ('\u{a6f0}', '\u{a6f1}', NSM), ('\u{a6f2}', '\u{a6f7}', L), ('\u{a700}', '\u{a721}', ON),
-    ('\u{a722}', '\u{a787}', L), ('\u{a788}', '\u{a788}', ON), ('\u{a789}', '\u{a7ae}', L),
-    ('\u{a7b0}', '\u{a7b7}', L), ('\u{a7f7}', '\u{a801}', L), ('\u{a802}', '\u{a802}', NSM),
-    ('\u{a803}', '\u{a805}', L), ('\u{a806}', '\u{a806}', NSM), ('\u{a807}', '\u{a80a}', L),
-    ('\u{a80b}', '\u{a80b}', NSM), ('\u{a80c}', '\u{a824}', L), ('\u{a825}', '\u{a826}', NSM),
-    ('\u{a827}', '\u{a827}', L), ('\u{a828}', '\u{a82b}', ON), ('\u{a830}', '\u{a837}', L),
-    ('\u{a838}', '\u{a839}', ET), ('\u{a840}', '\u{a873}', L), ('\u{a874}', '\u{a877}', ON),
-    ('\u{a880}', '\u{a8c3}', L), ('\u{a8c4}', '\u{a8c5}', NSM), ('\u{a8ce}', '\u{a8d9}', L),
-    ('\u{a8e0}', '\u{a8f1}', NSM), ('\u{a8f2}', '\u{a8fd}', L), ('\u{a900}', '\u{a925}', L),
-    ('\u{a926}', '\u{a92d}', NSM), ('\u{a92e}', '\u{a946}', L), ('\u{a947}', '\u{a951}', NSM),
-    ('\u{a952}', '\u{a953}', L), ('\u{a95f}', '\u{a97c}', L), ('\u{a980}', '\u{a982}', NSM),
-    ('\u{a983}', '\u{a9b2}', L), ('\u{a9b3}', '\u{a9b3}', NSM), ('\u{a9b4}', '\u{a9b5}', L),
-    ('\u{a9b6}', '\u{a9b9}', NSM), ('\u{a9ba}', '\u{a9bb}', L), ('\u{a9bc}', '\u{a9bc}', NSM),
-    ('\u{a9bd}', '\u{a9cd}', L), ('\u{a9cf}', '\u{a9d9}', L), ('\u{a9de}', '\u{a9e4}', L),
-    ('\u{a9e5}', '\u{a9e5}', NSM), ('\u{a9e6}', '\u{a9fe}', L), ('\u{aa00}', '\u{aa28}', L),
-    ('\u{aa29}', '\u{aa2e}', NSM), ('\u{aa2f}', '\u{aa30}', L), ('\u{aa31}', '\u{aa32}', NSM),
-    ('\u{aa33}', '\u{aa34}', L), ('\u{aa35}', '\u{aa36}', NSM), ('\u{aa40}', '\u{aa42}', L),
-    ('\u{aa43}', '\u{aa43}', NSM), ('\u{aa44}', '\u{aa4b}', L), ('\u{aa4c}', '\u{aa4c}', NSM),
-    ('\u{aa4d}', '\u{aa4d}', L), ('\u{aa50}', '\u{aa59}', L), ('\u{aa5c}', '\u{aa7b}', L),
-    ('\u{aa7c}', '\u{aa7c}', NSM), ('\u{aa7d}', '\u{aaaf}', L), ('\u{aab0}', '\u{aab0}', NSM),
-    ('\u{aab1}', '\u{aab1}', L), ('\u{aab2}', '\u{aab4}', NSM), ('\u{aab5}', '\u{aab6}', L),
-    ('\u{aab7}', '\u{aab8}', NSM), ('\u{aab9}', '\u{aabd}', L), ('\u{aabe}', '\u{aabf}', NSM),
-    ('\u{aac0}', '\u{aac0}', L), ('\u{aac1}', '\u{aac1}', NSM), ('\u{aac2}', '\u{aac2}', L),
-    ('\u{aadb}', '\u{aaeb}', L), ('\u{aaec}', '\u{aaed}', NSM), ('\u{aaee}', '\u{aaf5}', L),
-    ('\u{aaf6}', '\u{aaf6}', NSM), ('\u{ab01}', '\u{ab06}', L), ('\u{ab09}', '\u{ab0e}', L),
-    ('\u{ab11}', '\u{ab16}', L), ('\u{ab20}', '\u{ab26}', L), ('\u{ab28}', '\u{ab2e}', L),
-    ('\u{ab30}', '\u{ab65}', L), ('\u{ab70}', '\u{abe4}', L), ('\u{abe5}', '\u{abe5}', NSM),
-    ('\u{abe6}', '\u{abe7}', L), ('\u{abe8}', '\u{abe8}', NSM), ('\u{abe9}', '\u{abec}', L),
-    ('\u{abed}', '\u{abed}', NSM), ('\u{abf0}', '\u{abf9}', L), ('\u{ac00}', '\u{d7a3}', L),
-    ('\u{d7b0}', '\u{d7c6}', L), ('\u{d7cb}', '\u{d7fb}', L), ('\u{e000}', '\u{fa6d}', L),
-    ('\u{fa70}', '\u{fad9}', L), ('\u{fb00}', '\u{fb06}', L), ('\u{fb13}', '\u{fb17}', L),
-    ('\u{fb1d}', '\u{fb1d}', R), ('\u{fb1e}', '\u{fb1e}', NSM), ('\u{fb1f}', '\u{fb28}', R),
-    ('\u{fb29}', '\u{fb29}', ES), ('\u{fb2a}', '\u{fb4f}', R), ('\u{fb50}', '\u{fd3d}', AL),
-    ('\u{fd3e}', '\u{fd3f}', ON), ('\u{fd40}', '\u{fdcf}', AL), ('\u{fdf0}', '\u{fdfc}', AL),
-    ('\u{fdfd}', '\u{fdfd}', ON), ('\u{fdfe}', '\u{fdff}', AL), ('\u{fe00}', '\u{fe0f}', NSM),
-    ('\u{fe10}', '\u{fe19}', ON), ('\u{fe20}', '\u{fe2f}', NSM), ('\u{fe30}', '\u{fe4f}', ON),
-    ('\u{fe50}', '\u{fe50}', CS), ('\u{fe51}', '\u{fe51}', ON), ('\u{fe52}', '\u{fe52}', CS),
-    ('\u{fe54}', '\u{fe54}', ON), ('\u{fe55}', '\u{fe55}', CS), ('\u{fe56}', '\u{fe5e}', ON),
-    ('\u{fe5f}', '\u{fe5f}', ET), ('\u{fe60}', '\u{fe61}', ON), ('\u{fe62}', '\u{fe63}', ES),
-    ('\u{fe64}', '\u{fe66}', ON), ('\u{fe68}', '\u{fe68}', ON), ('\u{fe69}', '\u{fe6a}', ET),
-    ('\u{fe6b}', '\u{fe6b}', ON), ('\u{fe70}', '\u{fefe}', AL), ('\u{feff}', '\u{feff}', BN),
-    ('\u{ff01}', '\u{ff02}', ON), ('\u{ff03}', '\u{ff05}', ET), ('\u{ff06}', '\u{ff0a}', ON),
-    ('\u{ff0b}', '\u{ff0b}', ES), ('\u{ff0c}', '\u{ff0c}', CS), ('\u{ff0d}', '\u{ff0d}', ES),
-    ('\u{ff0e}', '\u{ff0f}', CS), ('\u{ff10}', '\u{ff19}', EN), ('\u{ff1a}', '\u{ff1a}', CS),
-    ('\u{ff1b}', '\u{ff20}', ON), ('\u{ff21}', '\u{ff3a}', L), ('\u{ff3b}', '\u{ff40}', ON),
-    ('\u{ff41}', '\u{ff5a}', L), ('\u{ff5b}', '\u{ff65}', ON), ('\u{ff66}', '\u{ffbe}', L),
-    ('\u{ffc2}', '\u{ffc7}', L), ('\u{ffca}', '\u{ffcf}', L), ('\u{ffd2}', '\u{ffd7}', L),
-    ('\u{ffda}', '\u{ffdc}', L), ('\u{ffe0}', '\u{ffe1}', ET), ('\u{ffe2}', '\u{ffe4}', ON),
-    ('\u{ffe5}', '\u{ffe6}', ET), ('\u{ffe8}', '\u{ffee}', ON), ('\u{fff9}', '\u{fffd}', ON),
-    ('\u{10000}', '\u{1000b}', L), ('\u{1000d}', '\u{10026}', L), ('\u{10028}', '\u{1003a}', L),
-    ('\u{1003c}', '\u{1003d}', L), ('\u{1003f}', '\u{1004d}', L), ('\u{10050}', '\u{1005d}', L),
-    ('\u{10080}', '\u{100fa}', L), ('\u{10100}', '\u{10100}', L), ('\u{10101}', '\u{10101}', ON),
-    ('\u{10102}', '\u{10102}', L), ('\u{10107}', '\u{10133}', L), ('\u{10137}', '\u{1013f}', L),
-    ('\u{10140}', '\u{1018c}', ON), ('\u{1018d}', '\u{1018e}', L), ('\u{10190}', '\u{1019b}', ON),
-    ('\u{101a0}', '\u{101a0}', ON), ('\u{101d0}', '\u{101fc}', L), ('\u{101fd}', '\u{101fd}', NSM),
-    ('\u{10280}', '\u{1029c}', L), ('\u{102a0}', '\u{102d0}', L), ('\u{102e0}', '\u{102e0}', NSM),
-    ('\u{102e1}', '\u{102fb}', EN), ('\u{10300}', '\u{10323}', L), ('\u{1032d}', '\u{1034a}', L),
-    ('\u{10350}', '\u{10375}', L), ('\u{10376}', '\u{1037a}', NSM), ('\u{10380}', '\u{1039d}', L),
-    ('\u{1039f}', '\u{103c3}', L), ('\u{103c8}', '\u{103d5}', L), ('\u{10400}', '\u{1049d}', L),
-    ('\u{104a0}', '\u{104a9}', L), ('\u{104b0}', '\u{104d3}', L), ('\u{104d8}', '\u{104fb}', L),
-    ('\u{10500}', '\u{10527}', L), ('\u{10530}', '\u{10563}', L), ('\u{1056f}', '\u{1056f}', L),
-    ('\u{10600}', '\u{10736}', L), ('\u{10740}', '\u{10755}', L), ('\u{10760}', '\u{10767}', L),
-    ('\u{10800}', '\u{1091e}', R), ('\u{1091f}', '\u{1091f}', ON), ('\u{10920}', '\u{10a00}', R),
-    ('\u{10a01}', '\u{10a03}', NSM), ('\u{10a04}', '\u{10a04}', R), ('\u{10a05}', '\u{10a06}', NSM),
-    ('\u{10a07}', '\u{10a0b}', R), ('\u{10a0c}', '\u{10a0f}', NSM), ('\u{10a10}', '\u{10a37}', R),
-    ('\u{10a38}', '\u{10a3a}', NSM), ('\u{10a3b}', '\u{10a3e}', R), ('\u{10a3f}', '\u{10a3f}', NSM),
-    ('\u{10a40}', '\u{10ae4}', R), ('\u{10ae5}', '\u{10ae6}', NSM), ('\u{10ae7}', '\u{10b38}', R),
-    ('\u{10b39}', '\u{10b3f}', ON), ('\u{10b40}', '\u{10e5f}', R), ('\u{10e60}', '\u{10e7e}', AN),
-    ('\u{10e7f}', '\u{10fff}', R), ('\u{11000}', '\u{11000}', L), ('\u{11001}', '\u{11001}', NSM),
-    ('\u{11002}', '\u{11037}', L), ('\u{11038}', '\u{11046}', NSM), ('\u{11047}', '\u{1104d}', L),
-    ('\u{11052}', '\u{11065}', ON), ('\u{11066}', '\u{1106f}', L), ('\u{1107f}', '\u{11081}', NSM),
-    ('\u{11082}', '\u{110b2}', L), ('\u{110b3}', '\u{110b6}', NSM), ('\u{110b7}', '\u{110b8}', L),
-    ('\u{110b9}', '\u{110ba}', NSM), ('\u{110bb}', '\u{110c1}', L), ('\u{110d0}', '\u{110e8}', L),
-    ('\u{110f0}', '\u{110f9}', L), ('\u{11100}', '\u{11102}', NSM), ('\u{11103}', '\u{11126}', L),
-    ('\u{11127}', '\u{1112b}', NSM), ('\u{1112c}', '\u{1112c}', L), ('\u{1112d}', '\u{11134}', NSM),
-    ('\u{11136}', '\u{11143}', L), ('\u{11150}', '\u{11172}', L), ('\u{11173}', '\u{11173}', NSM),
-    ('\u{11174}', '\u{11176}', L), ('\u{11180}', '\u{11181}', NSM), ('\u{11182}', '\u{111b5}', L),
-    ('\u{111b6}', '\u{111be}', NSM), ('\u{111bf}', '\u{111c9}', L), ('\u{111ca}', '\u{111cc}', NSM),
-    ('\u{111cd}', '\u{111cd}', L), ('\u{111d0}', '\u{111df}', L), ('\u{111e1}', '\u{111f4}', L),
-    ('\u{11200}', '\u{11211}', L), ('\u{11213}', '\u{1122e}', L), ('\u{1122f}', '\u{11231}', NSM),
-    ('\u{11232}', '\u{11233}', L), ('\u{11234}', '\u{11234}', NSM), ('\u{11235}', '\u{11235}', L),
-    ('\u{11236}', '\u{11237}', NSM), ('\u{11238}', '\u{1123d}', L), ('\u{1123e}', '\u{1123e}', NSM),
-    ('\u{11280}', '\u{11286}', L), ('\u{11288}', '\u{11288}', L), ('\u{1128a}', '\u{1128d}', L),
-    ('\u{1128f}', '\u{1129d}', L), ('\u{1129f}', '\u{112a9}', L), ('\u{112b0}', '\u{112de}', L),
-    ('\u{112df}', '\u{112df}', NSM), ('\u{112e0}', '\u{112e2}', L), ('\u{112e3}', '\u{112ea}', NSM),
-    ('\u{112f0}', '\u{112f9}', L), ('\u{11300}', '\u{11301}', NSM), ('\u{11302}', '\u{11303}', L),
-    ('\u{11305}', '\u{1130c}', L), ('\u{1130f}', '\u{11310}', L), ('\u{11313}', '\u{11328}', L),
-    ('\u{1132a}', '\u{11330}', L), ('\u{11332}', '\u{11333}', L), ('\u{11335}', '\u{11339}', L),
-    ('\u{1133c}', '\u{1133c}', NSM), ('\u{1133d}', '\u{1133f}', L), ('\u{11340}', '\u{11340}', NSM),
-    ('\u{11341}', '\u{11344}', L), ('\u{11347}', '\u{11348}', L), ('\u{1134b}', '\u{1134d}', L),
-    ('\u{11350}', '\u{11350}', L), ('\u{11357}', '\u{11357}', L), ('\u{1135d}', '\u{11363}', L),
-    ('\u{11366}', '\u{1136c}', NSM), ('\u{11370}', '\u{11374}', NSM), ('\u{11400}', '\u{11437}', L),
-    ('\u{11438}', '\u{1143f}', NSM), ('\u{11440}', '\u{11441}', L), ('\u{11442}', '\u{11444}', NSM),
-    ('\u{11445}', '\u{11445}', L), ('\u{11446}', '\u{11446}', NSM), ('\u{11447}', '\u{11459}', L),
-    ('\u{1145b}', '\u{1145b}', L), ('\u{1145d}', '\u{1145d}', L), ('\u{11480}', '\u{114b2}', L),
-    ('\u{114b3}', '\u{114b8}', NSM), ('\u{114b9}', '\u{114b9}', L), ('\u{114ba}', '\u{114ba}', NSM),
-    ('\u{114bb}', '\u{114be}', L), ('\u{114bf}', '\u{114c0}', NSM), ('\u{114c1}', '\u{114c1}', L),
-    ('\u{114c2}', '\u{114c3}', NSM), ('\u{114c4}', '\u{114c7}', L), ('\u{114d0}', '\u{114d9}', L),
-    ('\u{11580}', '\u{115b1}', L), ('\u{115b2}', '\u{115b5}', NSM), ('\u{115b8}', '\u{115bb}', L),
-    ('\u{115bc}', '\u{115bd}', NSM), ('\u{115be}', '\u{115be}', L), ('\u{115bf}', '\u{115c0}', NSM),
-    ('\u{115c1}', '\u{115db}', L), ('\u{115dc}', '\u{115dd}', NSM), ('\u{11600}', '\u{11632}', L),
-    ('\u{11633}', '\u{1163a}', NSM), ('\u{1163b}', '\u{1163c}', L), ('\u{1163d}', '\u{1163d}', NSM),
-    ('\u{1163e}', '\u{1163e}', L), ('\u{1163f}', '\u{11640}', NSM), ('\u{11641}', '\u{11644}', L),
-    ('\u{11650}', '\u{11659}', L), ('\u{11660}', '\u{1166c}', ON), ('\u{11680}', '\u{116aa}', L),
-    ('\u{116ab}', '\u{116ab}', NSM), ('\u{116ac}', '\u{116ac}', L), ('\u{116ad}', '\u{116ad}', NSM),
-    ('\u{116ae}', '\u{116af}', L), ('\u{116b0}', '\u{116b5}', NSM), ('\u{116b6}', '\u{116b6}', L),
-    ('\u{116b7}', '\u{116b7}', NSM), ('\u{116c0}', '\u{116c9}', L), ('\u{11700}', '\u{11719}', L),
-    ('\u{1171d}', '\u{1171f}', NSM), ('\u{11720}', '\u{11721}', L), ('\u{11722}', '\u{11725}', NSM),
-    ('\u{11726}', '\u{11726}', L), ('\u{11727}', '\u{1172b}', NSM), ('\u{11730}', '\u{1173f}', L),
-    ('\u{118a0}', '\u{118f2}', L), ('\u{118ff}', '\u{118ff}', L), ('\u{11a00}', '\u{11a00}', L),
-    ('\u{11a01}', '\u{11a06}', NSM), ('\u{11a07}', '\u{11a08}', L), ('\u{11a09}', '\u{11a0a}', NSM),
-    ('\u{11a0b}', '\u{11a32}', L), ('\u{11a33}', '\u{11a38}', NSM), ('\u{11a39}', '\u{11a3a}', L),
-    ('\u{11a3b}', '\u{11a3e}', NSM), ('\u{11a3f}', '\u{11a46}', L), ('\u{11a47}', '\u{11a47}', NSM),
-    ('\u{11a50}', '\u{11a50}', L), ('\u{11a51}', '\u{11a56}', NSM), ('\u{11a57}', '\u{11a58}', L),
-    ('\u{11a59}', '\u{11a5b}', NSM), ('\u{11a5c}', '\u{11a83}', L), ('\u{11a86}', '\u{11a89}', L),
-    ('\u{11a8a}', '\u{11a96}', NSM), ('\u{11a97}', '\u{11a97}', L), ('\u{11a98}', '\u{11a99}', NSM),
-    ('\u{11a9a}', '\u{11a9c}', L), ('\u{11a9e}', '\u{11aa2}', L), ('\u{11ac0}', '\u{11af8}', L),
-    ('\u{11c00}', '\u{11c08}', L), ('\u{11c0a}', '\u{11c2f}', L), ('\u{11c30}', '\u{11c36}', NSM),
-    ('\u{11c38}', '\u{11c3d}', NSM), ('\u{11c3e}', '\u{11c45}', L), ('\u{11c50}', '\u{11c6c}', L),
-    ('\u{11c70}', '\u{11c8f}', L), ('\u{11c92}', '\u{11ca7}', NSM), ('\u{11ca9}', '\u{11ca9}', L),
-    ('\u{11caa}', '\u{11cb0}', NSM), ('\u{11cb1}', '\u{11cb1}', L), ('\u{11cb2}', '\u{11cb3}', NSM),
-    ('\u{11cb4}', '\u{11cb4}', L), ('\u{11cb5}', '\u{11cb6}', NSM), ('\u{11d00}', '\u{11d06}', L),
-    ('\u{11d08}', '\u{11d09}', L), ('\u{11d0b}', '\u{11d30}', L), ('\u{11d31}', '\u{11d36}', NSM),
-    ('\u{11d3a}', '\u{11d3a}', NSM), ('\u{11d3c}', '\u{11d3d}', NSM), ('\u{11d3f}', '\u{11d45}',
-    NSM), ('\u{11d46}', '\u{11d46}', L), ('\u{11d47}', '\u{11d47}', NSM), ('\u{11d50}', '\u{11d59}',
-    L), ('\u{12000}', '\u{12399}', L), ('\u{12400}', '\u{1246e}', L), ('\u{12470}', '\u{12474}', L),
-    ('\u{12480}', '\u{12543}', L), ('\u{13000}', '\u{1342e}', L), ('\u{14400}', '\u{14646}', L),
-    ('\u{16800}', '\u{16a38}', L), ('\u{16a40}', '\u{16a5e}', L), ('\u{16a60}', '\u{16a69}', L),
-    ('\u{16a6e}', '\u{16a6f}', L), ('\u{16ad0}', '\u{16aed}', L), ('\u{16af0}', '\u{16af4}', NSM),
-    ('\u{16af5}', '\u{16af5}', L), ('\u{16b00}', '\u{16b2f}', L), ('\u{16b30}', '\u{16b36}', NSM),
-    ('\u{16b37}', '\u{16b45}', L), ('\u{16b50}', '\u{16b59}', L), ('\u{16b5b}', '\u{16b61}', L),
-    ('\u{16b63}', '\u{16b77}', L), ('\u{16b7d}', '\u{16b8f}', L), ('\u{16f00}', '\u{16f44}', L),
-    ('\u{16f50}', '\u{16f7e}', L), ('\u{16f8f}', '\u{16f92}', NSM), ('\u{16f93}', '\u{16f9f}', L),
-    ('\u{16fe0}', '\u{16fe1}', L), ('\u{17000}', '\u{187ec}', L), ('\u{18800}', '\u{18af2}', L),
-    ('\u{1b000}', '\u{1b11e}', L), ('\u{1b170}', '\u{1b2fb}', L), ('\u{1bc00}', '\u{1bc6a}', L),
+    ('\u{ae6}', '\u{af0}', L), ('\u{af1}', '\u{af1}', ET), ('\u{af9}', '\u{af9}', L), ('\u{b01}',
+    '\u{b01}', NSM), ('\u{b02}', '\u{b03}', L), ('\u{b05}', '\u{b0c}', L), ('\u{b0f}', '\u{b10}',
+    L), ('\u{b13}', '\u{b28}', L), ('\u{b2a}', '\u{b30}', L), ('\u{b32}', '\u{b33}', L), ('\u{b35}',
+    '\u{b39}', L), ('\u{b3c}', '\u{b3c}', NSM), ('\u{b3d}', '\u{b3e}', L), ('\u{b3f}', '\u{b3f}',
+    NSM), ('\u{b40}', '\u{b40}', L), ('\u{b41}', '\u{b44}', NSM), ('\u{b47}', '\u{b48}', L),
+    ('\u{b4b}', '\u{b4c}', L), ('\u{b4d}', '\u{b4d}', NSM), ('\u{b56}', '\u{b56}', NSM), ('\u{b57}',
+    '\u{b57}', L), ('\u{b5c}', '\u{b5d}', L), ('\u{b5f}', '\u{b61}', L), ('\u{b62}', '\u{b63}',
+    NSM), ('\u{b66}', '\u{b77}', L), ('\u{b82}', '\u{b82}', NSM), ('\u{b83}', '\u{b83}', L),
+    ('\u{b85}', '\u{b8a}', L), ('\u{b8e}', '\u{b90}', L), ('\u{b92}', '\u{b95}', L), ('\u{b99}',
+    '\u{b9a}', L), ('\u{b9c}', '\u{b9c}', L), ('\u{b9e}', '\u{b9f}', L), ('\u{ba3}', '\u{ba4}', L),
+    ('\u{ba8}', '\u{baa}', L), ('\u{bae}', '\u{bb9}', L), ('\u{bbe}', '\u{bbf}', L), ('\u{bc0}',
+    '\u{bc0}', NSM), ('\u{bc1}', '\u{bc2}', L), ('\u{bc6}', '\u{bc8}', L), ('\u{bca}', '\u{bcc}',
+    L), ('\u{bcd}', '\u{bcd}', NSM), ('\u{bd0}', '\u{bd0}', L), ('\u{bd7}', '\u{bd7}', L),
+    ('\u{be6}', '\u{bf2}', L), ('\u{bf3}', '\u{bf8}', ON), ('\u{bf9}', '\u{bf9}', ET), ('\u{bfa}',
+    '\u{bfa}', ON), ('\u{c00}', '\u{c00}', NSM), ('\u{c01}', '\u{c03}', L), ('\u{c05}', '\u{c0c}',
+    L), ('\u{c0e}', '\u{c10}', L), ('\u{c12}', '\u{c28}', L), ('\u{c2a}', '\u{c39}', L), ('\u{c3d}',
+    '\u{c3d}', L), ('\u{c3e}', '\u{c40}', NSM), ('\u{c41}', '\u{c44}', L), ('\u{c46}', '\u{c48}',
+    NSM), ('\u{c4a}', '\u{c4d}', NSM), ('\u{c55}', '\u{c56}', NSM), ('\u{c58}', '\u{c5a}', L),
+    ('\u{c60}', '\u{c61}', L), ('\u{c62}', '\u{c63}', NSM), ('\u{c66}', '\u{c6f}', L), ('\u{c78}',
+    '\u{c7e}', ON), ('\u{c7f}', '\u{c80}', L), ('\u{c81}', '\u{c81}', NSM), ('\u{c82}', '\u{c83}',
+    L), ('\u{c85}', '\u{c8c}', L), ('\u{c8e}', '\u{c90}', L), ('\u{c92}', '\u{ca8}', L), ('\u{caa}',
+    '\u{cb3}', L), ('\u{cb5}', '\u{cb9}', L), ('\u{cbc}', '\u{cbc}', NSM), ('\u{cbd}', '\u{cc4}',
+    L), ('\u{cc6}', '\u{cc8}', L), ('\u{cca}', '\u{ccb}', L), ('\u{ccc}', '\u{ccd}', NSM),
+    ('\u{cd5}', '\u{cd6}', L), ('\u{cde}', '\u{cde}', L), ('\u{ce0}', '\u{ce1}', L), ('\u{ce2}',
+    '\u{ce3}', NSM), ('\u{ce6}', '\u{cef}', L), ('\u{cf1}', '\u{cf2}', L), ('\u{d01}', '\u{d01}',
+    NSM), ('\u{d02}', '\u{d03}', L), ('\u{d05}', '\u{d0c}', L), ('\u{d0e}', '\u{d10}', L),
+    ('\u{d12}', '\u{d3a}', L), ('\u{d3d}', '\u{d40}', L), ('\u{d41}', '\u{d44}', NSM), ('\u{d46}',
+    '\u{d48}', L), ('\u{d4a}', '\u{d4c}', L), ('\u{d4d}', '\u{d4d}', NSM), ('\u{d4e}', '\u{d4f}',
+    L), ('\u{d54}', '\u{d61}', L), ('\u{d62}', '\u{d63}', NSM), ('\u{d66}', '\u{d7f}', L),
+    ('\u{d82}', '\u{d83}', L), ('\u{d85}', '\u{d96}', L), ('\u{d9a}', '\u{db1}', L), ('\u{db3}',
+    '\u{dbb}', L), ('\u{dbd}', '\u{dbd}', L), ('\u{dc0}', '\u{dc6}', L), ('\u{dca}', '\u{dca}',
+    NSM), ('\u{dcf}', '\u{dd1}', L), ('\u{dd2}', '\u{dd4}', NSM), ('\u{dd6}', '\u{dd6}', NSM),
+    ('\u{dd8}', '\u{ddf}', L), ('\u{de6}', '\u{def}', L), ('\u{df2}', '\u{df4}', L), ('\u{e01}',
+    '\u{e30}', L), ('\u{e31}', '\u{e31}', NSM), ('\u{e32}', '\u{e33}', L), ('\u{e34}', '\u{e3a}',
+    NSM), ('\u{e3f}', '\u{e3f}', ET), ('\u{e40}', '\u{e46}', L), ('\u{e47}', '\u{e4e}', NSM),
+    ('\u{e4f}', '\u{e5b}', L), ('\u{e81}', '\u{e82}', L), ('\u{e84}', '\u{e84}', L), ('\u{e87}',
+    '\u{e88}', L), ('\u{e8a}', '\u{e8a}', L), ('\u{e8d}', '\u{e8d}', L), ('\u{e94}', '\u{e97}', L),
+    ('\u{e99}', '\u{e9f}', L), ('\u{ea1}', '\u{ea3}', L), ('\u{ea5}', '\u{ea5}', L), ('\u{ea7}',
+    '\u{ea7}', L), ('\u{eaa}', '\u{eab}', L), ('\u{ead}', '\u{eb0}', L), ('\u{eb1}', '\u{eb1}',
+    NSM), ('\u{eb2}', '\u{eb3}', L), ('\u{eb4}', '\u{eb9}', NSM), ('\u{ebb}', '\u{ebc}', NSM),
+    ('\u{ebd}', '\u{ebd}', L), ('\u{ec0}', '\u{ec4}', L), ('\u{ec6}', '\u{ec6}', L), ('\u{ec8}',
+    '\u{ecd}', NSM), ('\u{ed0}', '\u{ed9}', L), ('\u{edc}', '\u{edf}', L), ('\u{f00}', '\u{f17}',
+    L), ('\u{f18}', '\u{f19}', NSM), ('\u{f1a}', '\u{f34}', L), ('\u{f35}', '\u{f35}', NSM),
+    ('\u{f36}', '\u{f36}', L), ('\u{f37}', '\u{f37}', NSM), ('\u{f38}', '\u{f38}', L), ('\u{f39}',
+    '\u{f39}', NSM), ('\u{f3a}', '\u{f3d}', ON), ('\u{f3e}', '\u{f47}', L), ('\u{f49}', '\u{f6c}',
+    L), ('\u{f71}', '\u{f7e}', NSM), ('\u{f7f}', '\u{f7f}', L), ('\u{f80}', '\u{f84}', NSM),
+    ('\u{f85}', '\u{f85}', L), ('\u{f86}', '\u{f87}', NSM), ('\u{f88}', '\u{f8c}', L), ('\u{f8d}',
+    '\u{f97}', NSM), ('\u{f99}', '\u{fbc}', NSM), ('\u{fbe}', '\u{fc5}', L), ('\u{fc6}', '\u{fc6}',
+    NSM), ('\u{fc7}', '\u{fcc}', L), ('\u{fce}', '\u{fda}', L), ('\u{1000}', '\u{102c}', L),
+    ('\u{102d}', '\u{1030}', NSM), ('\u{1031}', '\u{1031}', L), ('\u{1032}', '\u{1037}', NSM),
+    ('\u{1038}', '\u{1038}', L), ('\u{1039}', '\u{103a}', NSM), ('\u{103b}', '\u{103c}', L),
+    ('\u{103d}', '\u{103e}', NSM), ('\u{103f}', '\u{1057}', L), ('\u{1058}', '\u{1059}', NSM),
+    ('\u{105a}', '\u{105d}', L), ('\u{105e}', '\u{1060}', NSM), ('\u{1061}', '\u{1070}', L),
+    ('\u{1071}', '\u{1074}', NSM), ('\u{1075}', '\u{1081}', L), ('\u{1082}', '\u{1082}', NSM),
+    ('\u{1083}', '\u{1084}', L), ('\u{1085}', '\u{1086}', NSM), ('\u{1087}', '\u{108c}', L),
+    ('\u{108d}', '\u{108d}', NSM), ('\u{108e}', '\u{109c}', L), ('\u{109d}', '\u{109d}', NSM),
+    ('\u{109e}', '\u{10c5}', L), ('\u{10c7}', '\u{10c7}', L), ('\u{10cd}', '\u{10cd}', L),
+    ('\u{10d0}', '\u{1248}', L), ('\u{124a}', '\u{124d}', L), ('\u{1250}', '\u{1256}', L),
+    ('\u{1258}', '\u{1258}', L), ('\u{125a}', '\u{125d}', L), ('\u{1260}', '\u{1288}', L),
+    ('\u{128a}', '\u{128d}', L), ('\u{1290}', '\u{12b0}', L), ('\u{12b2}', '\u{12b5}', L),
+    ('\u{12b8}', '\u{12be}', L), ('\u{12c0}', '\u{12c0}', L), ('\u{12c2}', '\u{12c5}', L),
+    ('\u{12c8}', '\u{12d6}', L), ('\u{12d8}', '\u{1310}', L), ('\u{1312}', '\u{1315}', L),
+    ('\u{1318}', '\u{135a}', L), ('\u{135d}', '\u{135f}', NSM), ('\u{1360}', '\u{137c}', L),
+    ('\u{1380}', '\u{138f}', L), ('\u{1390}', '\u{1399}', ON), ('\u{13a0}', '\u{13f5}', L),
+    ('\u{13f8}', '\u{13fd}', L), ('\u{1400}', '\u{1400}', ON), ('\u{1401}', '\u{167f}', L),
+    ('\u{1680}', '\u{1680}', WS), ('\u{1681}', '\u{169a}', L), ('\u{169b}', '\u{169c}', ON),
+    ('\u{16a0}', '\u{16f8}', L), ('\u{1700}', '\u{170c}', L), ('\u{170e}', '\u{1711}', L),
+    ('\u{1712}', '\u{1714}', NSM), ('\u{1720}', '\u{1731}', L), ('\u{1732}', '\u{1734}', NSM),
+    ('\u{1735}', '\u{1736}', L), ('\u{1740}', '\u{1751}', L), ('\u{1752}', '\u{1753}', NSM),
+    ('\u{1760}', '\u{176c}', L), ('\u{176e}', '\u{1770}', L), ('\u{1772}', '\u{1773}', NSM),
+    ('\u{1780}', '\u{17b3}', L), ('\u{17b4}', '\u{17b5}', NSM), ('\u{17b6}', '\u{17b6}', L),
+    ('\u{17b7}', '\u{17bd}', NSM), ('\u{17be}', '\u{17c5}', L), ('\u{17c6}', '\u{17c6}', NSM),
+    ('\u{17c7}', '\u{17c8}', L), ('\u{17c9}', '\u{17d3}', NSM), ('\u{17d4}', '\u{17da}', L),
+    ('\u{17db}', '\u{17db}', ET), ('\u{17dc}', '\u{17dc}', L), ('\u{17dd}', '\u{17dd}', NSM),
+    ('\u{17e0}', '\u{17e9}', L), ('\u{17f0}', '\u{17f9}', ON), ('\u{1800}', '\u{180a}', ON),
+    ('\u{180b}', '\u{180d}', NSM), ('\u{180e}', '\u{180e}', BN), ('\u{1810}', '\u{1819}', L),
+    ('\u{1820}', '\u{1877}', L), ('\u{1880}', '\u{1884}', L), ('\u{1885}', '\u{1886}', NSM),
+    ('\u{1887}', '\u{18a8}', L), ('\u{18a9}', '\u{18a9}', NSM), ('\u{18aa}', '\u{18aa}', L),
+    ('\u{18b0}', '\u{18f5}', L), ('\u{1900}', '\u{191e}', L), ('\u{1920}', '\u{1922}', NSM),
+    ('\u{1923}', '\u{1926}', L), ('\u{1927}', '\u{1928}', NSM), ('\u{1929}', '\u{192b}', L),
+    ('\u{1930}', '\u{1931}', L), ('\u{1932}', '\u{1932}', NSM), ('\u{1933}', '\u{1938}', L),
+    ('\u{1939}', '\u{193b}', NSM), ('\u{1940}', '\u{1940}', ON), ('\u{1944}', '\u{1945}', ON),
+    ('\u{1946}', '\u{196d}', L), ('\u{1970}', '\u{1974}', L), ('\u{1980}', '\u{19ab}', L),
+    ('\u{19b0}', '\u{19c9}', L), ('\u{19d0}', '\u{19da}', L), ('\u{19de}', '\u{19ff}', ON),
+    ('\u{1a00}', '\u{1a16}', L), ('\u{1a17}', '\u{1a18}', NSM), ('\u{1a19}', '\u{1a1a}', L),
+    ('\u{1a1b}', '\u{1a1b}', NSM), ('\u{1a1e}', '\u{1a55}', L), ('\u{1a56}', '\u{1a56}', NSM),
+    ('\u{1a57}', '\u{1a57}', L), ('\u{1a58}', '\u{1a5e}', NSM), ('\u{1a60}', '\u{1a60}', NSM),
+    ('\u{1a61}', '\u{1a61}', L), ('\u{1a62}', '\u{1a62}', NSM), ('\u{1a63}', '\u{1a64}', L),
+    ('\u{1a65}', '\u{1a6c}', NSM), ('\u{1a6d}', '\u{1a72}', L), ('\u{1a73}', '\u{1a7c}', NSM),
+    ('\u{1a7f}', '\u{1a7f}', NSM), ('\u{1a80}', '\u{1a89}', L), ('\u{1a90}', '\u{1a99}', L),
+    ('\u{1aa0}', '\u{1aad}', L), ('\u{1ab0}', '\u{1abe}', NSM), ('\u{1b00}', '\u{1b03}', NSM),
+    ('\u{1b04}', '\u{1b33}', L), ('\u{1b34}', '\u{1b34}', NSM), ('\u{1b35}', '\u{1b35}', L),
+    ('\u{1b36}', '\u{1b3a}', NSM), ('\u{1b3b}', '\u{1b3b}', L), ('\u{1b3c}', '\u{1b3c}', NSM),
+    ('\u{1b3d}', '\u{1b41}', L), ('\u{1b42}', '\u{1b42}', NSM), ('\u{1b43}', '\u{1b4b}', L),
+    ('\u{1b50}', '\u{1b6a}', L), ('\u{1b6b}', '\u{1b73}', NSM), ('\u{1b74}', '\u{1b7c}', L),
+    ('\u{1b80}', '\u{1b81}', NSM), ('\u{1b82}', '\u{1ba1}', L), ('\u{1ba2}', '\u{1ba5}', NSM),
+    ('\u{1ba6}', '\u{1ba7}', L), ('\u{1ba8}', '\u{1ba9}', NSM), ('\u{1baa}', '\u{1baa}', L),
+    ('\u{1bab}', '\u{1bad}', NSM), ('\u{1bae}', '\u{1be5}', L), ('\u{1be6}', '\u{1be6}', NSM),
+    ('\u{1be7}', '\u{1be7}', L), ('\u{1be8}', '\u{1be9}', NSM), ('\u{1bea}', '\u{1bec}', L),
+    ('\u{1bed}', '\u{1bed}', NSM), ('\u{1bee}', '\u{1bee}', L), ('\u{1bef}', '\u{1bf1}', NSM),
+    ('\u{1bf2}', '\u{1bf3}', L), ('\u{1bfc}', '\u{1c2b}', L), ('\u{1c2c}', '\u{1c33}', NSM),
+    ('\u{1c34}', '\u{1c35}', L), ('\u{1c36}', '\u{1c37}', NSM), ('\u{1c3b}', '\u{1c49}', L),
+    ('\u{1c4d}', '\u{1c88}', L), ('\u{1cc0}', '\u{1cc7}', L), ('\u{1cd0}', '\u{1cd2}', NSM),
+    ('\u{1cd3}', '\u{1cd3}', L), ('\u{1cd4}', '\u{1ce0}', NSM), ('\u{1ce1}', '\u{1ce1}', L),
+    ('\u{1ce2}', '\u{1ce8}', NSM), ('\u{1ce9}', '\u{1cec}', L), ('\u{1ced}', '\u{1ced}', NSM),
+    ('\u{1cee}', '\u{1cf3}', L), ('\u{1cf4}', '\u{1cf4}', NSM), ('\u{1cf5}', '\u{1cf6}', L),
+    ('\u{1cf8}', '\u{1cf9}', NSM), ('\u{1d00}', '\u{1dbf}', L), ('\u{1dc0}', '\u{1df5}', NSM),
+    ('\u{1dfb}', '\u{1dff}', NSM), ('\u{1e00}', '\u{1f15}', L), ('\u{1f18}', '\u{1f1d}', L),
+    ('\u{1f20}', '\u{1f45}', L), ('\u{1f48}', '\u{1f4d}', L), ('\u{1f50}', '\u{1f57}', L),
+    ('\u{1f59}', '\u{1f59}', L), ('\u{1f5b}', '\u{1f5b}', L), ('\u{1f5d}', '\u{1f5d}', L),
+    ('\u{1f5f}', '\u{1f7d}', L), ('\u{1f80}', '\u{1fb4}', L), ('\u{1fb6}', '\u{1fbc}', L),
+    ('\u{1fbd}', '\u{1fbd}', ON), ('\u{1fbe}', '\u{1fbe}', L), ('\u{1fbf}', '\u{1fc1}', ON),
+    ('\u{1fc2}', '\u{1fc4}', L), ('\u{1fc6}', '\u{1fcc}', L), ('\u{1fcd}', '\u{1fcf}', ON),
+    ('\u{1fd0}', '\u{1fd3}', L), ('\u{1fd6}', '\u{1fdb}', L), ('\u{1fdd}', '\u{1fdf}', ON),
+    ('\u{1fe0}', '\u{1fec}', L), ('\u{1fed}', '\u{1fef}', ON), ('\u{1ff2}', '\u{1ff4}', L),
+    ('\u{1ff6}', '\u{1ffc}', L), ('\u{1ffd}', '\u{1ffe}', ON), ('\u{2000}', '\u{200a}', WS),
+    ('\u{200b}', '\u{200d}', BN), ('\u{200e}', '\u{200e}', L), ('\u{200f}', '\u{200f}', R),
+    ('\u{2010}', '\u{2027}', ON), ('\u{2028}', '\u{2028}', WS), ('\u{2029}', '\u{2029}', B),
+    ('\u{202a}', '\u{202a}', LRE), ('\u{202b}', '\u{202b}', RLE), ('\u{202c}', '\u{202c}', PDF),
+    ('\u{202d}', '\u{202d}', LRO), ('\u{202e}', '\u{202e}', RLO), ('\u{202f}', '\u{202f}', CS),
+    ('\u{2030}', '\u{2034}', ET), ('\u{2035}', '\u{2043}', ON), ('\u{2044}', '\u{2044}', CS),
+    ('\u{2045}', '\u{205e}', ON), ('\u{205f}', '\u{205f}', WS), ('\u{2060}', '\u{2064}', BN),
+    ('\u{2066}', '\u{2066}', LRI), ('\u{2067}', '\u{2067}', RLI), ('\u{2068}', '\u{2068}', FSI),
+    ('\u{2069}', '\u{2069}', PDI), ('\u{206a}', '\u{206f}', BN), ('\u{2070}', '\u{2070}', EN),
+    ('\u{2071}', '\u{2071}', L), ('\u{2074}', '\u{2079}', EN), ('\u{207a}', '\u{207b}', ES),
+    ('\u{207c}', '\u{207e}', ON), ('\u{207f}', '\u{207f}', L), ('\u{2080}', '\u{2089}', EN),
+    ('\u{208a}', '\u{208b}', ES), ('\u{208c}', '\u{208e}', ON), ('\u{2090}', '\u{209c}', L),
+    ('\u{20a0}', '\u{20cf}', ET), ('\u{20d0}', '\u{20f0}', NSM), ('\u{2100}', '\u{2101}', ON),
+    ('\u{2102}', '\u{2102}', L), ('\u{2103}', '\u{2106}', ON), ('\u{2107}', '\u{2107}', L),
+    ('\u{2108}', '\u{2109}', ON), ('\u{210a}', '\u{2113}', L), ('\u{2114}', '\u{2114}', ON),
+    ('\u{2115}', '\u{2115}', L), ('\u{2116}', '\u{2118}', ON), ('\u{2119}', '\u{211d}', L),
+    ('\u{211e}', '\u{2123}', ON), ('\u{2124}', '\u{2124}', L), ('\u{2125}', '\u{2125}', ON),
+    ('\u{2126}', '\u{2126}', L), ('\u{2127}', '\u{2127}', ON), ('\u{2128}', '\u{2128}', L),
+    ('\u{2129}', '\u{2129}', ON), ('\u{212a}', '\u{212d}', L), ('\u{212e}', '\u{212e}', ET),
+    ('\u{212f}', '\u{2139}', L), ('\u{213a}', '\u{213b}', ON), ('\u{213c}', '\u{213f}', L),
+    ('\u{2140}', '\u{2144}', ON), ('\u{2145}', '\u{2149}', L), ('\u{214a}', '\u{214d}', ON),
+    ('\u{214e}', '\u{214f}', L), ('\u{2150}', '\u{215f}', ON), ('\u{2160}', '\u{2188}', L),
+    ('\u{2189}', '\u{218b}', ON), ('\u{2190}', '\u{2211}', ON), ('\u{2212}', '\u{2212}', ES),
+    ('\u{2213}', '\u{2213}', ET), ('\u{2214}', '\u{2335}', ON), ('\u{2336}', '\u{237a}', L),
+    ('\u{237b}', '\u{2394}', ON), ('\u{2395}', '\u{2395}', L), ('\u{2396}', '\u{23fe}', ON),
+    ('\u{2400}', '\u{2426}', ON), ('\u{2440}', '\u{244a}', ON), ('\u{2460}', '\u{2487}', ON),
+    ('\u{2488}', '\u{249b}', EN), ('\u{249c}', '\u{24e9}', L), ('\u{24ea}', '\u{26ab}', ON),
+    ('\u{26ac}', '\u{26ac}', L), ('\u{26ad}', '\u{27ff}', ON), ('\u{2800}', '\u{28ff}', L),
+    ('\u{2900}', '\u{2b73}', ON), ('\u{2b76}', '\u{2b95}', ON), ('\u{2b98}', '\u{2bb9}', ON),
+    ('\u{2bbd}', '\u{2bc8}', ON), ('\u{2bca}', '\u{2bd1}', ON), ('\u{2bec}', '\u{2bef}', ON),
+    ('\u{2c00}', '\u{2c2e}', L), ('\u{2c30}', '\u{2c5e}', L), ('\u{2c60}', '\u{2ce4}', L),
+    ('\u{2ce5}', '\u{2cea}', ON), ('\u{2ceb}', '\u{2cee}', L), ('\u{2cef}', '\u{2cf1}', NSM),
+    ('\u{2cf2}', '\u{2cf3}', L), ('\u{2cf9}', '\u{2cff}', ON), ('\u{2d00}', '\u{2d25}', L),
+    ('\u{2d27}', '\u{2d27}', L), ('\u{2d2d}', '\u{2d2d}', L), ('\u{2d30}', '\u{2d67}', L),
+    ('\u{2d6f}', '\u{2d70}', L), ('\u{2d7f}', '\u{2d7f}', NSM), ('\u{2d80}', '\u{2d96}', L),
+    ('\u{2da0}', '\u{2da6}', L), ('\u{2da8}', '\u{2dae}', L), ('\u{2db0}', '\u{2db6}', L),
+    ('\u{2db8}', '\u{2dbe}', L), ('\u{2dc0}', '\u{2dc6}', L), ('\u{2dc8}', '\u{2dce}', L),
+    ('\u{2dd0}', '\u{2dd6}', L), ('\u{2dd8}', '\u{2dde}', L), ('\u{2de0}', '\u{2dff}', NSM),
+    ('\u{2e00}', '\u{2e44}', ON), ('\u{2e80}', '\u{2e99}', ON), ('\u{2e9b}', '\u{2ef3}', ON),
+    ('\u{2f00}', '\u{2fd5}', ON), ('\u{2ff0}', '\u{2ffb}', ON), ('\u{3000}', '\u{3000}', WS),
+    ('\u{3001}', '\u{3004}', ON), ('\u{3005}', '\u{3007}', L), ('\u{3008}', '\u{3020}', ON),
+    ('\u{3021}', '\u{3029}', L), ('\u{302a}', '\u{302d}', NSM), ('\u{302e}', '\u{302f}', L),
+    ('\u{3030}', '\u{3030}', ON), ('\u{3031}', '\u{3035}', L), ('\u{3036}', '\u{3037}', ON),
+    ('\u{3038}', '\u{303c}', L), ('\u{303d}', '\u{303f}', ON), ('\u{3041}', '\u{3096}', L),
+    ('\u{3099}', '\u{309a}', NSM), ('\u{309b}', '\u{309c}', ON), ('\u{309d}', '\u{309f}', L),
+    ('\u{30a0}', '\u{30a0}', ON), ('\u{30a1}', '\u{30fa}', L), ('\u{30fb}', '\u{30fb}', ON),
+    ('\u{30fc}', '\u{30ff}', L), ('\u{3105}', '\u{312d}', L), ('\u{3131}', '\u{318e}', L),
+    ('\u{3190}', '\u{31ba}', L), ('\u{31c0}', '\u{31e3}', ON), ('\u{31f0}', '\u{321c}', L),
+    ('\u{321d}', '\u{321e}', ON), ('\u{3220}', '\u{324f}', L), ('\u{3250}', '\u{325f}', ON),
+    ('\u{3260}', '\u{327b}', L), ('\u{327c}', '\u{327e}', ON), ('\u{327f}', '\u{32b0}', L),
+    ('\u{32b1}', '\u{32bf}', ON), ('\u{32c0}', '\u{32cb}', L), ('\u{32cc}', '\u{32cf}', ON),
+    ('\u{32d0}', '\u{32fe}', L), ('\u{3300}', '\u{3376}', L), ('\u{3377}', '\u{337a}', ON),
+    ('\u{337b}', '\u{33dd}', L), ('\u{33de}', '\u{33df}', ON), ('\u{33e0}', '\u{33fe}', L),
+    ('\u{33ff}', '\u{33ff}', ON), ('\u{3400}', '\u{4db5}', L), ('\u{4dc0}', '\u{4dff}', ON),
+    ('\u{4e00}', '\u{9fd5}', L), ('\u{a000}', '\u{a48c}', L), ('\u{a490}', '\u{a4c6}', ON),
+    ('\u{a4d0}', '\u{a60c}', L), ('\u{a60d}', '\u{a60f}', ON), ('\u{a610}', '\u{a62b}', L),
+    ('\u{a640}', '\u{a66e}', L), ('\u{a66f}', '\u{a672}', NSM), ('\u{a673}', '\u{a673}', ON),
+    ('\u{a674}', '\u{a67d}', NSM), ('\u{a67e}', '\u{a67f}', ON), ('\u{a680}', '\u{a69d}', L),
+    ('\u{a69e}', '\u{a69f}', NSM), ('\u{a6a0}', '\u{a6ef}', L), ('\u{a6f0}', '\u{a6f1}', NSM),
+    ('\u{a6f2}', '\u{a6f7}', L), ('\u{a700}', '\u{a721}', ON), ('\u{a722}', '\u{a787}', L),
+    ('\u{a788}', '\u{a788}', ON), ('\u{a789}', '\u{a7ae}', L), ('\u{a7b0}', '\u{a7b7}', L),
+    ('\u{a7f7}', '\u{a801}', L), ('\u{a802}', '\u{a802}', NSM), ('\u{a803}', '\u{a805}', L),
+    ('\u{a806}', '\u{a806}', NSM), ('\u{a807}', '\u{a80a}', L), ('\u{a80b}', '\u{a80b}', NSM),
+    ('\u{a80c}', '\u{a824}', L), ('\u{a825}', '\u{a826}', NSM), ('\u{a827}', '\u{a827}', L),
+    ('\u{a828}', '\u{a82b}', ON), ('\u{a830}', '\u{a837}', L), ('\u{a838}', '\u{a839}', ET),
+    ('\u{a840}', '\u{a873}', L), ('\u{a874}', '\u{a877}', ON), ('\u{a880}', '\u{a8c3}', L),
+    ('\u{a8c4}', '\u{a8c5}', NSM), ('\u{a8ce}', '\u{a8d9}', L), ('\u{a8e0}', '\u{a8f1}', NSM),
+    ('\u{a8f2}', '\u{a8fd}', L), ('\u{a900}', '\u{a925}', L), ('\u{a926}', '\u{a92d}', NSM),
+    ('\u{a92e}', '\u{a946}', L), ('\u{a947}', '\u{a951}', NSM), ('\u{a952}', '\u{a953}', L),
+    ('\u{a95f}', '\u{a97c}', L), ('\u{a980}', '\u{a982}', NSM), ('\u{a983}', '\u{a9b2}', L),
+    ('\u{a9b3}', '\u{a9b3}', NSM), ('\u{a9b4}', '\u{a9b5}', L), ('\u{a9b6}', '\u{a9b9}', NSM),
+    ('\u{a9ba}', '\u{a9bb}', L), ('\u{a9bc}', '\u{a9bc}', NSM), ('\u{a9bd}', '\u{a9cd}', L),
+    ('\u{a9cf}', '\u{a9d9}', L), ('\u{a9de}', '\u{a9e4}', L), ('\u{a9e5}', '\u{a9e5}', NSM),
+    ('\u{a9e6}', '\u{a9fe}', L), ('\u{aa00}', '\u{aa28}', L), ('\u{aa29}', '\u{aa2e}', NSM),
+    ('\u{aa2f}', '\u{aa30}', L), ('\u{aa31}', '\u{aa32}', NSM), ('\u{aa33}', '\u{aa34}', L),
+    ('\u{aa35}', '\u{aa36}', NSM), ('\u{aa40}', '\u{aa42}', L), ('\u{aa43}', '\u{aa43}', NSM),
+    ('\u{aa44}', '\u{aa4b}', L), ('\u{aa4c}', '\u{aa4c}', NSM), ('\u{aa4d}', '\u{aa4d}', L),
+    ('\u{aa50}', '\u{aa59}', L), ('\u{aa5c}', '\u{aa7b}', L), ('\u{aa7c}', '\u{aa7c}', NSM),
+    ('\u{aa7d}', '\u{aaaf}', L), ('\u{aab0}', '\u{aab0}', NSM), ('\u{aab1}', '\u{aab1}', L),
+    ('\u{aab2}', '\u{aab4}', NSM), ('\u{aab5}', '\u{aab6}', L), ('\u{aab7}', '\u{aab8}', NSM),
+    ('\u{aab9}', '\u{aabd}', L), ('\u{aabe}', '\u{aabf}', NSM), ('\u{aac0}', '\u{aac0}', L),
+    ('\u{aac1}', '\u{aac1}', NSM), ('\u{aac2}', '\u{aac2}', L), ('\u{aadb}', '\u{aaeb}', L),
+    ('\u{aaec}', '\u{aaed}', NSM), ('\u{aaee}', '\u{aaf5}', L), ('\u{aaf6}', '\u{aaf6}', NSM),
+    ('\u{ab01}', '\u{ab06}', L), ('\u{ab09}', '\u{ab0e}', L), ('\u{ab11}', '\u{ab16}', L),
+    ('\u{ab20}', '\u{ab26}', L), ('\u{ab28}', '\u{ab2e}', L), ('\u{ab30}', '\u{ab65}', L),
+    ('\u{ab70}', '\u{abe4}', L), ('\u{abe5}', '\u{abe5}', NSM), ('\u{abe6}', '\u{abe7}', L),
+    ('\u{abe8}', '\u{abe8}', NSM), ('\u{abe9}', '\u{abec}', L), ('\u{abed}', '\u{abed}', NSM),
+    ('\u{abf0}', '\u{abf9}', L), ('\u{ac00}', '\u{d7a3}', L), ('\u{d7b0}', '\u{d7c6}', L),
+    ('\u{d7cb}', '\u{d7fb}', L), ('\u{e000}', '\u{fa6d}', L), ('\u{fa70}', '\u{fad9}', L),
+    ('\u{fb00}', '\u{fb06}', L), ('\u{fb13}', '\u{fb17}', L), ('\u{fb1d}', '\u{fb1d}', R),
+    ('\u{fb1e}', '\u{fb1e}', NSM), ('\u{fb1f}', '\u{fb28}', R), ('\u{fb29}', '\u{fb29}', ES),
+    ('\u{fb2a}', '\u{fb4f}', R), ('\u{fb50}', '\u{fd3d}', AL), ('\u{fd3e}', '\u{fd3f}', ON),
+    ('\u{fd40}', '\u{fdcf}', AL), ('\u{fdf0}', '\u{fdfc}', AL), ('\u{fdfd}', '\u{fdfd}', ON),
+    ('\u{fdfe}', '\u{fdff}', AL), ('\u{fe00}', '\u{fe0f}', NSM), ('\u{fe10}', '\u{fe19}', ON),
+    ('\u{fe20}', '\u{fe2f}', NSM), ('\u{fe30}', '\u{fe4f}', ON), ('\u{fe50}', '\u{fe50}', CS),
+    ('\u{fe51}', '\u{fe51}', ON), ('\u{fe52}', '\u{fe52}', CS), ('\u{fe54}', '\u{fe54}', ON),
+    ('\u{fe55}', '\u{fe55}', CS), ('\u{fe56}', '\u{fe5e}', ON), ('\u{fe5f}', '\u{fe5f}', ET),
+    ('\u{fe60}', '\u{fe61}', ON), ('\u{fe62}', '\u{fe63}', ES), ('\u{fe64}', '\u{fe66}', ON),
+    ('\u{fe68}', '\u{fe68}', ON), ('\u{fe69}', '\u{fe6a}', ET), ('\u{fe6b}', '\u{fe6b}', ON),
+    ('\u{fe70}', '\u{fefe}', AL), ('\u{feff}', '\u{feff}', BN), ('\u{ff01}', '\u{ff02}', ON),
+    ('\u{ff03}', '\u{ff05}', ET), ('\u{ff06}', '\u{ff0a}', ON), ('\u{ff0b}', '\u{ff0b}', ES),
+    ('\u{ff0c}', '\u{ff0c}', CS), ('\u{ff0d}', '\u{ff0d}', ES), ('\u{ff0e}', '\u{ff0f}', CS),
+    ('\u{ff10}', '\u{ff19}', EN), ('\u{ff1a}', '\u{ff1a}', CS), ('\u{ff1b}', '\u{ff20}', ON),
+    ('\u{ff21}', '\u{ff3a}', L), ('\u{ff3b}', '\u{ff40}', ON), ('\u{ff41}', '\u{ff5a}', L),
+    ('\u{ff5b}', '\u{ff65}', ON), ('\u{ff66}', '\u{ffbe}', L), ('\u{ffc2}', '\u{ffc7}', L),
+    ('\u{ffca}', '\u{ffcf}', L), ('\u{ffd2}', '\u{ffd7}', L), ('\u{ffda}', '\u{ffdc}', L),
+    ('\u{ffe0}', '\u{ffe1}', ET), ('\u{ffe2}', '\u{ffe4}', ON), ('\u{ffe5}', '\u{ffe6}', ET),
+    ('\u{ffe8}', '\u{ffee}', ON), ('\u{fff9}', '\u{fffd}', ON), ('\u{10000}', '\u{1000b}', L),
+    ('\u{1000d}', '\u{10026}', L), ('\u{10028}', '\u{1003a}', L), ('\u{1003c}', '\u{1003d}', L),
+    ('\u{1003f}', '\u{1004d}', L), ('\u{10050}', '\u{1005d}', L), ('\u{10080}', '\u{100fa}', L),
+    ('\u{10100}', '\u{10100}', L), ('\u{10101}', '\u{10101}', ON), ('\u{10102}', '\u{10102}', L),
+    ('\u{10107}', '\u{10133}', L), ('\u{10137}', '\u{1013f}', L), ('\u{10140}', '\u{1018c}', ON),
+    ('\u{1018d}', '\u{1018e}', L), ('\u{10190}', '\u{1019b}', ON), ('\u{101a0}', '\u{101a0}', ON),
+    ('\u{101d0}', '\u{101fc}', L), ('\u{101fd}', '\u{101fd}', NSM), ('\u{10280}', '\u{1029c}', L),
+    ('\u{102a0}', '\u{102d0}', L), ('\u{102e0}', '\u{102e0}', NSM), ('\u{102e1}', '\u{102fb}', EN),
+    ('\u{10300}', '\u{10323}', L), ('\u{10330}', '\u{1034a}', L), ('\u{10350}', '\u{10375}', L),
+    ('\u{10376}', '\u{1037a}', NSM), ('\u{10380}', '\u{1039d}', L), ('\u{1039f}', '\u{103c3}', L),
+    ('\u{103c8}', '\u{103d5}', L), ('\u{10400}', '\u{1049d}', L), ('\u{104a0}', '\u{104a9}', L),
+    ('\u{104b0}', '\u{104d3}', L), ('\u{104d8}', '\u{104fb}', L), ('\u{10500}', '\u{10527}', L),
+    ('\u{10530}', '\u{10563}', L), ('\u{1056f}', '\u{1056f}', L), ('\u{10600}', '\u{10736}', L),
+    ('\u{10740}', '\u{10755}', L), ('\u{10760}', '\u{10767}', L), ('\u{10800}', '\u{1091e}', R),
+    ('\u{1091f}', '\u{1091f}', ON), ('\u{10920}', '\u{10a00}', R), ('\u{10a01}', '\u{10a03}', NSM),
+    ('\u{10a04}', '\u{10a04}', R), ('\u{10a05}', '\u{10a06}', NSM), ('\u{10a07}', '\u{10a0b}', R),
+    ('\u{10a0c}', '\u{10a0f}', NSM), ('\u{10a10}', '\u{10a37}', R), ('\u{10a38}', '\u{10a3a}', NSM),
+    ('\u{10a3b}', '\u{10a3e}', R), ('\u{10a3f}', '\u{10a3f}', NSM), ('\u{10a40}', '\u{10ae4}', R),
+    ('\u{10ae5}', '\u{10ae6}', NSM), ('\u{10ae7}', '\u{10b38}', R), ('\u{10b39}', '\u{10b3f}', ON),
+    ('\u{10b40}', '\u{10e5f}', R), ('\u{10e60}', '\u{10e7e}', AN), ('\u{10e7f}', '\u{10fff}', R),
+    ('\u{11000}', '\u{11000}', L), ('\u{11001}', '\u{11001}', NSM), ('\u{11002}', '\u{11037}', L),
+    ('\u{11038}', '\u{11046}', NSM), ('\u{11047}', '\u{1104d}', L), ('\u{11052}', '\u{11065}', ON),
+    ('\u{11066}', '\u{1106f}', L), ('\u{1107f}', '\u{11081}', NSM), ('\u{11082}', '\u{110b2}', L),
+    ('\u{110b3}', '\u{110b6}', NSM), ('\u{110b7}', '\u{110b8}', L), ('\u{110b9}', '\u{110ba}', NSM),
+    ('\u{110bb}', '\u{110c1}', L), ('\u{110d0}', '\u{110e8}', L), ('\u{110f0}', '\u{110f9}', L),
+    ('\u{11100}', '\u{11102}', NSM), ('\u{11103}', '\u{11126}', L), ('\u{11127}', '\u{1112b}', NSM),
+    ('\u{1112c}', '\u{1112c}', L), ('\u{1112d}', '\u{11134}', NSM), ('\u{11136}', '\u{11143}', L),
+    ('\u{11150}', '\u{11172}', L), ('\u{11173}', '\u{11173}', NSM), ('\u{11174}', '\u{11176}', L),
+    ('\u{11180}', '\u{11181}', NSM), ('\u{11182}', '\u{111b5}', L), ('\u{111b6}', '\u{111be}', NSM),
+    ('\u{111bf}', '\u{111c9}', L), ('\u{111ca}', '\u{111cc}', NSM), ('\u{111cd}', '\u{111cd}', L),
+    ('\u{111d0}', '\u{111df}', L), ('\u{111e1}', '\u{111f4}', L), ('\u{11200}', '\u{11211}', L),
+    ('\u{11213}', '\u{1122e}', L), ('\u{1122f}', '\u{11231}', NSM), ('\u{11232}', '\u{11233}', L),
+    ('\u{11234}', '\u{11234}', NSM), ('\u{11235}', '\u{11235}', L), ('\u{11236}', '\u{11237}', NSM),
+    ('\u{11238}', '\u{1123d}', L), ('\u{1123e}', '\u{1123e}', NSM), ('\u{11280}', '\u{11286}', L),
+    ('\u{11288}', '\u{11288}', L), ('\u{1128a}', '\u{1128d}', L), ('\u{1128f}', '\u{1129d}', L),
+    ('\u{1129f}', '\u{112a9}', L), ('\u{112b0}', '\u{112de}', L), ('\u{112df}', '\u{112df}', NSM),
+    ('\u{112e0}', '\u{112e2}', L), ('\u{112e3}', '\u{112ea}', NSM), ('\u{112f0}', '\u{112f9}', L),
+    ('\u{11300}', '\u{11301}', NSM), ('\u{11302}', '\u{11303}', L), ('\u{11305}', '\u{1130c}', L),
+    ('\u{1130f}', '\u{11310}', L), ('\u{11313}', '\u{11328}', L), ('\u{1132a}', '\u{11330}', L),
+    ('\u{11332}', '\u{11333}', L), ('\u{11335}', '\u{11339}', L), ('\u{1133c}', '\u{1133c}', NSM),
+    ('\u{1133d}', '\u{1133f}', L), ('\u{11340}', '\u{11340}', NSM), ('\u{11341}', '\u{11344}', L),
+    ('\u{11347}', '\u{11348}', L), ('\u{1134b}', '\u{1134d}', L), ('\u{11350}', '\u{11350}', L),
+    ('\u{11357}', '\u{11357}', L), ('\u{1135d}', '\u{11363}', L), ('\u{11366}', '\u{1136c}', NSM),
+    ('\u{11370}', '\u{11374}', NSM), ('\u{11400}', '\u{11437}', L), ('\u{11438}', '\u{1143f}', NSM),
+    ('\u{11440}', '\u{11441}', L), ('\u{11442}', '\u{11444}', NSM), ('\u{11445}', '\u{11445}', L),
+    ('\u{11446}', '\u{11446}', NSM), ('\u{11447}', '\u{11459}', L), ('\u{1145b}', '\u{1145b}', L),
+    ('\u{1145d}', '\u{1145d}', L), ('\u{11480}', '\u{114b2}', L), ('\u{114b3}', '\u{114b8}', NSM),
+    ('\u{114b9}', '\u{114b9}', L), ('\u{114ba}', '\u{114ba}', NSM), ('\u{114bb}', '\u{114be}', L),
+    ('\u{114bf}', '\u{114c0}', NSM), ('\u{114c1}', '\u{114c1}', L), ('\u{114c2}', '\u{114c3}', NSM),
+    ('\u{114c4}', '\u{114c7}', L), ('\u{114d0}', '\u{114d9}', L), ('\u{11580}', '\u{115b1}', L),
+    ('\u{115b2}', '\u{115b5}', NSM), ('\u{115b8}', '\u{115bb}', L), ('\u{115bc}', '\u{115bd}', NSM),
+    ('\u{115be}', '\u{115be}', L), ('\u{115bf}', '\u{115c0}', NSM), ('\u{115c1}', '\u{115db}', L),
+    ('\u{115dc}', '\u{115dd}', NSM), ('\u{11600}', '\u{11632}', L), ('\u{11633}', '\u{1163a}', NSM),
+    ('\u{1163b}', '\u{1163c}', L), ('\u{1163d}', '\u{1163d}', NSM), ('\u{1163e}', '\u{1163e}', L),
+    ('\u{1163f}', '\u{11640}', NSM), ('\u{11641}', '\u{11644}', L), ('\u{11650}', '\u{11659}', L),
+    ('\u{11660}', '\u{1166c}', ON), ('\u{11680}', '\u{116aa}', L), ('\u{116ab}', '\u{116ab}', NSM),
+    ('\u{116ac}', '\u{116ac}', L), ('\u{116ad}', '\u{116ad}', NSM), ('\u{116ae}', '\u{116af}', L),
+    ('\u{116b0}', '\u{116b5}', NSM), ('\u{116b6}', '\u{116b6}', L), ('\u{116b7}', '\u{116b7}', NSM),
+    ('\u{116c0}', '\u{116c9}', L), ('\u{11700}', '\u{11719}', L), ('\u{1171d}', '\u{1171f}', NSM),
+    ('\u{11720}', '\u{11721}', L), ('\u{11722}', '\u{11725}', NSM), ('\u{11726}', '\u{11726}', L),
+    ('\u{11727}', '\u{1172b}', NSM), ('\u{11730}', '\u{1173f}', L), ('\u{118a0}', '\u{118f2}', L),
+    ('\u{118ff}', '\u{118ff}', L), ('\u{11ac0}', '\u{11af8}', L), ('\u{11c00}', '\u{11c08}', L),
+    ('\u{11c0a}', '\u{11c2f}', L), ('\u{11c30}', '\u{11c36}', NSM), ('\u{11c38}', '\u{11c3d}', NSM),
+    ('\u{11c3e}', '\u{11c45}', L), ('\u{11c50}', '\u{11c6c}', L), ('\u{11c70}', '\u{11c8f}', L),
+    ('\u{11c92}', '\u{11ca7}', NSM), ('\u{11ca9}', '\u{11ca9}', L), ('\u{11caa}', '\u{11cb0}', NSM),
+    ('\u{11cb1}', '\u{11cb1}', L), ('\u{11cb2}', '\u{11cb3}', NSM), ('\u{11cb4}', '\u{11cb4}', L),
+    ('\u{11cb5}', '\u{11cb6}', NSM), ('\u{12000}', '\u{12399}', L), ('\u{12400}', '\u{1246e}', L),
+    ('\u{12470}', '\u{12474}', L), ('\u{12480}', '\u{12543}', L), ('\u{13000}', '\u{1342e}', L),
+    ('\u{14400}', '\u{14646}', L), ('\u{16800}', '\u{16a38}', L), ('\u{16a40}', '\u{16a5e}', L),
+    ('\u{16a60}', '\u{16a69}', L), ('\u{16a6e}', '\u{16a6f}', L), ('\u{16ad0}', '\u{16aed}', L),
+    ('\u{16af0}', '\u{16af4}', NSM), ('\u{16af5}', '\u{16af5}', L), ('\u{16b00}', '\u{16b2f}', L),
+    ('\u{16b30}', '\u{16b36}', NSM), ('\u{16b37}', '\u{16b45}', L), ('\u{16b50}', '\u{16b59}', L),
+    ('\u{16b5b}', '\u{16b61}', L), ('\u{16b63}', '\u{16b77}', L), ('\u{16b7d}', '\u{16b8f}', L),
+    ('\u{16f00}', '\u{16f44}', L), ('\u{16f50}', '\u{16f7e}', L), ('\u{16f8f}', '\u{16f92}', NSM),
+    ('\u{16f93}', '\u{16f9f}', L), ('\u{16fe0}', '\u{16fe0}', L), ('\u{17000}', '\u{187ec}', L),
+    ('\u{18800}', '\u{18af2}', L), ('\u{1b000}', '\u{1b001}', L), ('\u{1bc00}', '\u{1bc6a}', L),
     ('\u{1bc70}', '\u{1bc7c}', L), ('\u{1bc80}', '\u{1bc88}', L), ('\u{1bc90}', '\u{1bc99}', L),
     ('\u{1bc9c}', '\u{1bc9c}', L), ('\u{1bc9d}', '\u{1bc9e}', NSM), ('\u{1bc9f}', '\u{1bc9f}', L),
     ('\u{1bca0}', '\u{1bca3}', BN), ('\u{1d000}', '\u{1d0f5}', L), ('\u{1d100}', '\u{1d126}', L),
     ('\u{1d129}', '\u{1d166}', L), ('\u{1d167}', '\u{1d169}', NSM), ('\u{1d16a}', '\u{1d172}', L),
     ('\u{1d173}', '\u{1d17a}', BN), ('\u{1d17b}', '\u{1d182}', NSM), ('\u{1d183}', '\u{1d184}', L),
     ('\u{1d185}', '\u{1d18b}', NSM), ('\u{1d18c}', '\u{1d1a9}', L), ('\u{1d1aa}', '\u{1d1ad}', NSM),
     ('\u{1d1ae}', '\u{1d1e8}', L), ('\u{1d200}', '\u{1d241}', ON), ('\u{1d242}', '\u{1d244}', NSM),
     ('\u{1d245}', '\u{1d245}', ON), ('\u{1d300}', '\u{1d356}', ON), ('\u{1d360}', '\u{1d371}', L),
@@ -445,20 +433,20 @@ pub const bidi_class_table: &'static [(c
     '\u{1e8cf}', R), ('\u{1e8d0}', '\u{1e8d6}', NSM), ('\u{1e8d7}', '\u{1e943}', R), ('\u{1e944}',
     '\u{1e94a}', NSM), ('\u{1e94b}', '\u{1edff}', R), ('\u{1ee00}', '\u{1eeef}', AL), ('\u{1eef0}',
     '\u{1eef1}', ON), ('\u{1eef2}', '\u{1eeff}', AL), ('\u{1ef00}', '\u{1efff}', R), ('\u{1f000}',
     '\u{1f02b}', ON), ('\u{1f030}', '\u{1f093}', ON), ('\u{1f0a0}', '\u{1f0ae}', ON), ('\u{1f0b1}',
     '\u{1f0bf}', ON), ('\u{1f0c1}', '\u{1f0cf}', ON), ('\u{1f0d1}', '\u{1f0f5}', ON), ('\u{1f100}',
     '\u{1f10a}', EN), ('\u{1f10b}', '\u{1f10c}', ON), ('\u{1f110}', '\u{1f12e}', L), ('\u{1f130}',
     '\u{1f169}', L), ('\u{1f16a}', '\u{1f16b}', ON), ('\u{1f170}', '\u{1f1ac}', L), ('\u{1f1e6}',
     '\u{1f202}', L), ('\u{1f210}', '\u{1f23b}', L), ('\u{1f240}', '\u{1f248}', L), ('\u{1f250}',
-    '\u{1f251}', L), ('\u{1f260}', '\u{1f265}', ON), ('\u{1f300}', '\u{1f6d4}', ON), ('\u{1f6e0}',
-    '\u{1f6ec}', ON), ('\u{1f6f0}', '\u{1f6f8}', ON), ('\u{1f700}', '\u{1f773}', ON), ('\u{1f780}',
-    '\u{1f7d4}', ON), ('\u{1f800}', '\u{1f80b}', ON), ('\u{1f810}', '\u{1f847}', ON), ('\u{1f850}',
-    '\u{1f859}', ON), ('\u{1f860}', '\u{1f887}', ON), ('\u{1f890}', '\u{1f8ad}', ON), ('\u{1f900}',
-    '\u{1f90b}', ON), ('\u{1f910}', '\u{1f93e}', ON), ('\u{1f940}', '\u{1f94c}', ON), ('\u{1f950}',
-    '\u{1f96b}', ON), ('\u{1f980}', '\u{1f997}', ON), ('\u{1f9c0}', '\u{1f9c0}', ON), ('\u{1f9d0}',
-    '\u{1f9e6}', ON), ('\u{20000}', '\u{2a6d6}', L), ('\u{2a700}', '\u{2b734}', L), ('\u{2b740}',
-    '\u{2b81d}', L), ('\u{2b820}', '\u{2cea1}', L), ('\u{2ceb0}', '\u{2ebe0}', L), ('\u{2f800}',
-    '\u{2fa1d}', L), ('\u{e0001}', '\u{e0001}', BN), ('\u{e0020}', '\u{e007f}', BN), ('\u{e0100}',
-    '\u{e01ef}', NSM), ('\u{f0000}', '\u{ffffd}', L), ('\u{100000}', '\u{10fffd}', L)
+    '\u{1f251}', L), ('\u{1f300}', '\u{1f6d2}', ON), ('\u{1f6e0}', '\u{1f6ec}', ON), ('\u{1f6f0}',
+    '\u{1f6f6}', ON), ('\u{1f700}', '\u{1f773}', ON), ('\u{1f780}', '\u{1f7d4}', ON), ('\u{1f800}',
+    '\u{1f80b}', ON), ('\u{1f810}', '\u{1f847}', ON), ('\u{1f850}', '\u{1f859}', ON), ('\u{1f860}',
+    '\u{1f887}', ON), ('\u{1f890}', '\u{1f8ad}', ON), ('\u{1f910}', '\u{1f91e}', ON), ('\u{1f920}',
+    '\u{1f927}', ON), ('\u{1f930}', '\u{1f930}', ON), ('\u{1f933}', '\u{1f93e}', ON), ('\u{1f940}',
+    '\u{1f94b}', ON), ('\u{1f950}', '\u{1f95e}', ON), ('\u{1f980}', '\u{1f991}', ON), ('\u{1f9c0}',
+    '\u{1f9c0}', ON), ('\u{20000}', '\u{2a6d6}', L), ('\u{2a700}', '\u{2b734}', L), ('\u{2b740}',
+    '\u{2b81d}', L), ('\u{2b820}', '\u{2cea1}', L), ('\u{2f800}', '\u{2fa1d}', L), ('\u{e0001}',
+    '\u{e0001}', BN), ('\u{e0020}', '\u{e007f}', BN), ('\u{e0100}', '\u{e01ef}', NSM), ('\u{f0000}',
+    '\u{ffffd}', L), ('\u{100000}', '\u{10fffd}', L)
 ];
 
--- a/third_party/rust/unicode-bidi/src/deprecated.rs
+++ b/third_party/rust/unicode-bidi/src/deprecated.rs
@@ -4,61 +4,59 @@
 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
 //! This module holds deprecated assets only.
 
-// Doesn't worth updating API here
-#![cfg_attr(feature="cargo-clippy", allow(needless_pass_by_value))]
-
 use super::*;
 
 /// Find the level runs within a line and return them in visual order.
 ///
 /// NOTE: This implementation is incomplete. The algorithm needs information about the text,
-/// including original `BidiClass` property of each character, to be able to perform correctly.
+/// including original BidiClass property of each character, to be able to perform correctly.
 /// Please see [`BidiInfo::visual_runs()`](../struct.BidiInfo.html#method.visual_runs) for the
 /// improved implementation.
 ///
 /// `line` is a range of bytes indices within `levels`.
 ///
-/// <http://www.unicode.org/reports/tr9/#Reordering_Resolved_Levels>
-#[deprecated(since = "0.3.0", note = "please use `BidiInfo::visual_runs()` instead.")]
+/// http://www.unicode.org/reports/tr9/#Reordering_Resolved_Levels
+#[deprecated(since="0.3.0", note="please use `BidiInfo::visual_runs()` instead.")]
 pub fn visual_runs(line: Range<usize>, levels: &[Level]) -> Vec<LevelRun> {
     assert!(line.start <= levels.len());
     assert!(line.end <= levels.len());
 
     let mut runs = Vec::new();
 
     // Find consecutive level runs.
     let mut start = line.start;
-    let mut run_level = levels[start];
-    let mut min_level = run_level;
-    let mut max_level = run_level;
+    let mut level = levels[start];
+    let mut min_level = level;
+    let mut max_level = level;
 
-    for (i, &new_level) in levels.iter().enumerate().take(line.end).skip(start + 1) {
-        if new_level != run_level {
+    for i in (start + 1)..line.end {
+        let new_level = levels[i];
+        if new_level != level {
             // End of the previous run, start of a new one.
             runs.push(start..i);
             start = i;
-            run_level = new_level;
+            level = new_level;
 
-            min_level = min(run_level, min_level);
-            max_level = max(run_level, max_level);
+            min_level = min(level, min_level);
+            max_level = max(level, max_level);
         }
     }
     runs.push(start..line.end);
 
     let run_count = runs.len();
 
     // Re-order the odd runs.
-    // <http://www.unicode.org/reports/tr9/#L2>
+    // http://www.unicode.org/reports/tr9/#L2
 
     // Stop at the lowest *odd* level.
     min_level = min_level.new_lowest_ge_rtl().expect("Level error");
 
     while max_level >= min_level {
         // Look for the start of a sequence of consecutive runs of max_level or higher.
         let mut seq_start = 0;
         while seq_start < run_count {
@@ -76,15 +74,15 @@ pub fn visual_runs(line: Range<usize>, l
                 seq_end += 1;
             }
 
             // Reverse the runs within this sequence.
             runs[seq_start..seq_end].reverse();
 
             seq_start = seq_end;
         }
-        max_level.lower(1).expect(
-            "Lowering embedding level below zero",
-        );
+        max_level
+            .lower(1)
+            .expect("Lowering embedding level below zero");
     }
 
     runs
 }
--- a/third_party/rust/unicode-bidi/src/explicit.rs
+++ b/third_party/rust/unicode-bidi/src/explicit.rs
@@ -4,38 +4,37 @@
 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
 //! 3.3.2 Explicit Levels and Directions
 //!
-//! <http://www.unicode.org/reports/tr9/#Explicit_Levels_and_Directions>
+//! http://www.unicode.org/reports/tr9/#Explicit_Levels_and_Directions
 
 use super::char_data::{BidiClass, is_rtl};
 use super::level::Level;
 
 use BidiClass::*;
 
 /// Compute explicit embedding levels for one paragraph of text (X1-X8).
 ///
-/// `processing_classes[i]` must contain the `BidiClass` of the char at byte index `i`,
+/// `processing_classes[i]` must contain the BidiClass of the char at byte index `i`,
 /// for each char in `text`.
-#[cfg_attr(feature = "flame_it", flame)]
 pub fn compute(
     text: &str,
     para_level: Level,
     original_classes: &[BidiClass],
     levels: &mut [Level],
     processing_classes: &mut [BidiClass],
 ) {
-    assert_eq!(text.len(), original_classes.len());
+    assert!(text.len() == original_classes.len());
 
-    // <http://www.unicode.org/reports/tr9/#X1>
+    // http://www.unicode.org/reports/tr9/#X1
     let mut stack = DirectionalStatusStack::new();
     stack.push(para_level, OverrideStatus::Neutral);
 
     let mut overflow_isolate_count = 0u32;
     let mut overflow_embedding_count = 0u32;
     let mut valid_isolate_count = 0u32;
 
     for (i, c) in text.char_indices() {
@@ -57,68 +56,66 @@ pub fn compute(
                 }
 
                 let new_level = if is_rtl(original_classes[i]) {
                     last_level.new_explicit_next_rtl()
                 } else {
                     last_level.new_explicit_next_ltr()
                 };
                 if new_level.is_ok() && overflow_isolate_count == 0 &&
-                    overflow_embedding_count == 0
-                {
+                   overflow_embedding_count == 0 {
                     let new_level = new_level.unwrap();
                     stack.push(
-                        new_level,
-                        match original_classes[i] {
+                        new_level, match original_classes[i] {
                             RLO => OverrideStatus::RTL,
                             LRO => OverrideStatus::LTR,
                             RLI | LRI | FSI => OverrideStatus::Isolate,
                             _ => OverrideStatus::Neutral,
-                        },
+                        }
                     );
                     if is_isolate {
                         valid_isolate_count += 1;
                     } else {
                         // The spec doesn't explicitly mention this step, but it is necessary.
                         // See the reference implementations for comparison.
                         levels[i] = new_level;
                     }
                 } else if is_isolate {
                     overflow_isolate_count += 1;
                 } else if overflow_isolate_count == 0 {
                     overflow_embedding_count += 1;
                 }
             }
 
-            // <http://www.unicode.org/reports/tr9/#X6a>
+            // http://www.unicode.org/reports/tr9/#X6a
             PDI => {
                 if overflow_isolate_count > 0 {
                     overflow_isolate_count -= 1;
                 } else if valid_isolate_count > 0 {
                     overflow_embedding_count = 0;
                     loop {
                         // Pop everything up to and including the last Isolate status.
                         match stack.vec.pop() {
-                            None |
                             Some(Status { status: OverrideStatus::Isolate, .. }) => break,
+                            None => break,
                             _ => continue,
                         }
                     }
                     valid_isolate_count -= 1;
                 }
                 let last = stack.last();
                 levels[i] = last.level;
                 match last.status {
                     OverrideStatus::RTL => processing_classes[i] = R,
                     OverrideStatus::LTR => processing_classes[i] = L,
                     _ => {}
                 }
             }
 
-            // <http://www.unicode.org/reports/tr9/#X7>
+            // http://www.unicode.org/reports/tr9/#X7
             PDF => {
                 if overflow_isolate_count > 0 {
                     continue;
                 }
                 if overflow_embedding_count > 0 {
                     overflow_embedding_count -= 1;
                     continue;
                 }
@@ -128,17 +125,17 @@ pub fn compute(
                 // The spec doesn't explicitly mention this step, but it is necessary.
                 // See the reference implementations for comparison.
                 levels[i] = stack.last().level;
             }
 
             // Nothing
             B | BN => {}
 
-            // <http://www.unicode.org/reports/tr9/#X6>
+            // http://www.unicode.org/reports/tr9/#X6
             _ => {
                 let last = stack.last();
                 levels[i] = last.level;
                 match last.status {
                     OverrideStatus::RTL => processing_classes[i] = R,
                     OverrideStatus::LTR => processing_classes[i] = L,
                     _ => {}
                 }
@@ -172,15 +169,21 @@ struct DirectionalStatusStack {
 }
 
 impl DirectionalStatusStack {
     fn new() -> Self {
         DirectionalStatusStack { vec: Vec::with_capacity(Level::max_explicit_depth() as usize + 2) }
     }
 
     fn push(&mut self, level: Level, status: OverrideStatus) {
-        self.vec.push(Status { level, status });
+        self.vec
+            .push(
+                Status {
+                    level: level,
+                    status: status,
+                }
+            );
     }
 
     fn last(&self) -> &Status {
         self.vec.last().unwrap()
     }
 }
--- a/third_party/rust/unicode-bidi/src/format_chars.rs
+++ b/third_party/rust/unicode-bidi/src/format_chars.rs
@@ -1,20 +1,20 @@
-// Copyright 2017 The Servo Project Developers. See the
+// Copyright 2014 The html5ever Project Developers. See the
 // COPYRIGHT file at the top-level directory of this distribution.
 //
 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
 //! Directional Formatting Characters
 //!
-//! <http://www.unicode.org/reports/tr9/#Directional_Formatting_Characters>
+//! http://www.unicode.org/reports/tr9/#Directional_Formatting_Characters
 
 // == Implicit ==
 /// ARABIC LETTER MARK
 pub const ALM: char = '\u{061C}';
 /// LEFT-TO-RIGHT MARK
 pub const LRM: char = '\u{200E}';
 /// RIGHT-TO-LEFT MARK
 pub const RLM: char = '\u{200F}';
--- a/third_party/rust/unicode-bidi/src/implicit.rs
+++ b/third_party/rust/unicode-bidi/src/implicit.rs
@@ -14,18 +14,17 @@ use std::cmp::max;
 use super::char_data::BidiClass;
 use super::prepare::{IsolatingRunSequence, LevelRun, not_removed_by_x9, removed_by_x9};
 use super::level::Level;
 
 use BidiClass::*;
 
 /// 3.3.4 Resolving Weak Types
 ///
-/// <http://www.unicode.org/reports/tr9/#Resolving_Weak_Types>
-#[cfg_attr(feature = "flame_it", flame)]
+/// http://www.unicode.org/reports/tr9/#Resolving_Weak_Types
 pub fn resolve_weak(sequence: &IsolatingRunSequence, processing_classes: &mut [BidiClass]) {
     // FIXME (#8): This function applies steps W1-W6 in a single pass.  This can produce
     // incorrect results in cases where a "later" rule changes the value of `prev_class` seen
     // by an "earlier" rule.  We should either split this into separate passes, or preserve
     // extra state so each rule can see the correct previous class.
 
     // FIXME: Also, this could be the cause of increased failure for using longer-UTF-8 chars in
     // conformance tests, like BidiTest:69635 (AL ET EN)
@@ -33,23 +32,25 @@ pub fn resolve_weak(sequence: &Isolating
     let mut prev_class = sequence.sos;
     let mut last_strong_is_al = false;
     let mut et_run_indices = Vec::new(); // for W5
 
     // Like sequence.runs.iter().flat_map(Clone::clone), but make indices itself clonable.
     fn id(x: LevelRun) -> LevelRun {
         x
     }
-    let mut indices = sequence.runs.iter().cloned().flat_map(
-        id as fn(LevelRun) -> LevelRun,
-    );
+    let mut indices = sequence
+        .runs
+        .iter()
+        .cloned()
+        .flat_map(id as fn(LevelRun) -> LevelRun);
 
     while let Some(i) = indices.next() {
         match processing_classes[i] {
-            // <http://www.unicode.org/reports/tr9/#W1>
+            // http://www.unicode.org/reports/tr9/#W1
             NSM => {
                 processing_classes[i] = match prev_class {
                     RLI | LRI | FSI | PDI => ON,
                     _ => prev_class,
                 };
             }
             EN => {
                 if last_strong_is_al {
@@ -58,33 +59,34 @@ pub fn resolve_weak(sequence: &Isolating
                 } else {
                     // W5. If a run of ETs is adjacent to an EN, change the ETs to EN.
                     for j in &et_run_indices {
                         processing_classes[*j] = EN;
                     }
                     et_run_indices.clear();
                 }
             }
-            // <http://www.unicode.org/reports/tr9/#W3>
+            // http://www.unicode.org/reports/tr9/#W3
             AL => processing_classes[i] = R,
 
-            // <http://www.unicode.org/reports/tr9/#W4>
+            // http://www.unicode.org/reports/tr9/#W4
             ES | CS => {
                 let next_class = indices
                     .clone()
                     .map(|j| processing_classes[j])
-                    .find(not_removed_by_x9)
+                    .filter(not_removed_by_x9)
+                    .next()
                     .unwrap_or(sequence.eos);
                 processing_classes[i] = match (prev_class, processing_classes[i], next_class) {
                     (EN, ES, EN) | (EN, CS, EN) => EN,
                     (AN, CS, AN) => AN,
                     (_, _, _) => ON,
                 }
             }
-            // <http://www.unicode.org/reports/tr9/#W5>
+            // http://www.unicode.org/reports/tr9/#W5
             ET => {
                 match prev_class {
                     EN => processing_classes[i] = EN,
                     _ => et_run_indices.push(i), // In case this is followed by an EN.
                 }
             }
             class => {
                 if removed_by_x9(class) {
@@ -129,18 +131,17 @@ pub fn resolve_weak(sequence: &Isolating
                 _ => {}
             }
         }
     }
 }
 
 /// 3.3.5 Resolving Neutral Types
 ///
-/// <http://www.unicode.org/reports/tr9/#Resolving_Neutral_Types>
-#[cfg_attr(feature = "flame_it", flame)]
+/// http://www.unicode.org/reports/tr9/#Resolving_Neutral_Types
 pub fn resolve_neutral(
     sequence: &IsolatingRunSequence,
     levels: &[Level],
     processing_classes: &mut [BidiClass],
 ) {
     let e: BidiClass = levels[sequence.runs[0].start].bidi_class();
     let mut indices = sequence.runs.iter().flat_map(Clone::clone);
     let mut prev_class = sequence.sos;
@@ -173,18 +174,18 @@ pub fn resolve_neutral(
                         next_class = sequence.eos;
                         break;
                     }
                 };
             }
 
             // N1-N2.
             //
-            // <http://www.unicode.org/reports/tr9/#N1>
-            // <http://www.unicode.org/reports/tr9/#N2>
+            // http://www.unicode.org/reports/tr9/#N1
+            // http://www.unicode.org/reports/tr9/#N2
             let new_class = match (prev_class, next_class) {
                 (L, L) => L,
                 (R, R) | (R, AN) | (R, EN) | (AN, R) | (AN, AN) | (AN, EN) | (EN, R) |
                 (EN, AN) | (EN, EN) => R,
                 (_, _) => e,
             };
             for j in &ni_run {
                 processing_classes[*j] = new_class;
@@ -194,35 +195,35 @@ pub fn resolve_neutral(
         prev_class = processing_classes[i];
     }
 }
 
 /// 3.3.6 Resolving Implicit Levels
 ///
 /// Returns the maximum embedding level in the paragraph.
 ///
-/// <http://www.unicode.org/reports/tr9/#Resolving_Implicit_Levels>
-#[cfg_attr(feature = "flame_it", flame)]
+/// http://www.unicode.org/reports/tr9/#Resolving_Implicit_Levels
 pub fn resolve_levels(original_classes: &[BidiClass], levels: &mut [Level]) -> Level {
     let mut max_level = Level::ltr();
 
-    assert_eq!(original_classes.len(), levels.len());
+    assert!(original_classes.len() == levels.len());
     for i in 0..levels.len() {
         match (levels[i].is_rtl(), original_classes[i]) {
+            // http://www.unicode.org/reports/tr9/#I1
+            (false, R) => levels[i].raise(1).expect("Level number error"),
             (false, AN) | (false, EN) => levels[i].raise(2).expect("Level number error"),
-            (false, R) | (true, L) | (true, EN) | (true, AN) => {
-                levels[i].raise(1).expect("Level number error")
-            }
+            // http://www.unicode.org/reports/tr9/#I2
+            (true, L) | (true, EN) | (true, AN) => levels[i].raise(1).expect("Level number error"),
             (_, _) => {}
         }
         max_level = max(max_level, levels[i]);
     }
 
     max_level
 }
 
 /// Neutral or Isolate formatting character (B, S, WS, ON, FSI, LRI, RLI, PDI)
 ///
-/// <http://www.unicode.org/reports/tr9/#NI>
+/// http://www.unicode.org/reports/tr9/#NI
 #[allow(non_snake_case)]
 fn is_NI(class: BidiClass) -> bool {
     matches!(class, B | S | WS | ON | FSI | LRI | RLI | PDI)
 }
--- a/third_party/rust/unicode-bidi/src/level.rs
+++ b/third_party/rust/unicode-bidi/src/level.rs
@@ -6,34 +6,34 @@
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
 //! Bidi Embedding Level
 //!
 //! See [`Level`](struct.Level.html) for more details.
 //!
-//! <http://www.unicode.org/reports/tr9/#BD2>
+//! http://www.unicode.org/reports/tr9/#BD2
 
 use std::convert::{From, Into};
 
 use super::char_data::BidiClass;
 
 /// Embedding Level
 ///
 /// Embedding Levels are numbers between 0 and 126 (inclusive), where even values denote a
 /// left-to-right (LTR) direction and odd values a right-to-left (RTL) direction.
 ///
 /// This struct maintains a *valid* status for level numbers, meaning that creating a new level, or
 /// mutating an existing level, with the value smaller than `0` (before conversion to `u8`) or
 /// larger than 125 results in an `Error`.
 ///
-/// <http://www.unicode.org/reports/tr9/#BD2>
+/// http://www.unicode.org/reports/tr9/#BD2
 #[derive(Copy, Clone, Debug, Eq, Ord, PartialEq, PartialOrd)]
-#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
+#[cfg_attr(feature = "with_serde", derive(Serialize, Deserialize))]
 pub struct Level(u8);
 
 pub const LTR_LEVEL: Level = Level(0);
 pub const RTL_LEVEL: Level = Level(1);
 
 const MAX_DEPTH: u8 = 125;
 /// During explicit level resolution, embedding level can go as high as `max_depth`.
 pub const MAX_EXPLICIT_DEPTH: u8 = MAX_DEPTH;
@@ -158,17 +158,17 @@ impl Level {
         }
     }
 
     // == Helpers ==
 
     /// The next LTR (even) level greater than this, or fail if number is larger than `max_depth`.
     #[inline]
     pub fn new_explicit_next_ltr(&self) -> Result<Level, Error> {
-        Level::new_explicit((self.0 + 2) & !1)
+        Level::new_explicit(self.0 + 2 & !1)
     }
 
     /// The next RTL (odd) level greater than this, or fail if number is larger than `max_depth`.
     #[inline]
     pub fn new_explicit_next_rtl(&self) -> Result<Level, Error> {
         Level::new_explicit((self.0 + 1) | 1)
     }
 
@@ -349,17 +349,17 @@ mod tests {
     fn test_string_eq() {
         assert_eq!(
             Level::vec(&[0, 1, 4, 125]),
             vec!["0".to_string(), "1".to_string(), "x".to_string(), "125".to_string()]
         );
     }
 }
 
-#[cfg(all(feature = "serde", test))]
+#[cfg(all(feature = "with_serde", test))]
 mod serde_tests {
     use serde_test::{Token, assert_tokens};
     use super::*;
 
     #[test]
     fn test_statics() {
         assert_tokens(
             &Level::ltr(),
--- a/third_party/rust/unicode-bidi/src/lib.rs
+++ b/third_party/rust/unicode-bidi/src/lib.rs
@@ -48,49 +48,41 @@
 //!   "b",
 //!   "c",
 //!   "ג",
 //!   "ב",
 //!   "א",
 //! ]);
 //! ```
 //!
-//! [tr9]: <http://www.unicode.org/reports/tr9/>
+//! [tr9]: http://www.unicode.org/reports/tr9/
 
 #![forbid(unsafe_code)]
 
-#![cfg_attr(feature="flame_it", feature(plugin, custom_attribute))]
-#![cfg_attr(feature="flame_it", plugin(flamer))]
-
-
 #[macro_use]
 extern crate matches;
 
-#[cfg(feature = "serde")]
+#[cfg(feature = "with_serde")]
 #[macro_use]
-extern crate serde;
+extern crate serde_derive;
 
-#[cfg(all(feature = "serde", test))]
+#[cfg(all(feature = "with_serde", test))]
 extern crate serde_test;
 
-#[cfg(feature = "flame_it")]
-extern crate flame;
-
-
 pub mod deprecated;
 pub mod format_chars;
 pub mod level;
 
 mod char_data;
 mod explicit;
 mod implicit;
 mod prepare;
 
 pub use char_data::{BidiClass, bidi_class, UNICODE_VERSION};
-pub use level::{Level, LTR_LEVEL, RTL_LEVEL};
+pub use level::Level;
 pub use prepare::LevelRun;
 
 use std::borrow::Cow;
 use std::cmp::{max, min};
 use std::iter::repeat;
 use std::ops::Range;
 
 use BidiClass::*;
@@ -102,140 +94,133 @@ use format_chars as chars;
 pub struct ParagraphInfo {
     /// The paragraphs boundaries within the text, as byte indices.
     ///
     /// TODO: Shrink this to only include the starting index?
     pub range: Range<usize>,
 
     /// The paragraph embedding level.
     ///
-    /// <http://www.unicode.org/reports/tr9/#BD4>
+    /// http://www.unicode.org/reports/tr9/#BD4
     pub level: Level,
 }
 
-/// Initial bidi information of the text.
+/// Initial bidi information of the text
 ///
-/// Contains the text paragraphs and `BidiClass` of its characters.
+/// Contains the paragraphs and BidiClasses in a string of text.
 #[derive(PartialEq, Debug)]
 pub struct InitialInfo<'text> {
     /// The text
     pub text: &'text str,
 
     /// The BidiClass of the character at each byte in the text.
     /// If a character is multiple bytes, its class will appear multiple times in the vector.
     pub original_classes: Vec<BidiClass>,
 
     /// The boundaries and level of each paragraph within the text.
     pub paragraphs: Vec<ParagraphInfo>,
 }
 
 impl<'text> InitialInfo<'text> {
     /// Find the paragraphs and BidiClasses in a string of text.
     ///
-    /// <http://www.unicode.org/reports/tr9/#The_Paragraph_Level>
+    /// http://www.unicode.org/reports/tr9/#The_Paragraph_Level
     ///
     /// Also sets the class for each First Strong Isolate initiator (FSI) to LRI or RLI if a strong
     /// character is found before the matching PDI.  If no strong character is found, the class will
     /// remain FSI, and it's up to later stages to treat these as LRI when needed.
-    #[cfg_attr(feature = "flame_it", flame)]
     pub fn new(text: &str, default_para_level: Option<Level>) -> InitialInfo {
         let mut original_classes = Vec::with_capacity(text.len());
 
         // The stack contains the starting byte index for each nested isolate we're inside.
         let mut isolate_stack = Vec::new();
         let mut paragraphs = Vec::new();
 
         let mut para_start = 0;
         let mut para_level = default_para_level;
 
-        #[cfg(feature = "flame_it")] flame::start("InitialInfo::new(): iter text.char_indices()");
-
         for (i, c) in text.char_indices() {
             let class = bidi_class(c);
-
-            #[cfg(feature = "flame_it")] flame::start("original_classes.extend()");
-
             original_classes.extend(repeat(class).take(c.len_utf8()));
-
-            #[cfg(feature = "flame_it")] flame::end("original_classes.extend()");
-
             match class {
-
                 B => {
                     // P1. Split the text into separate paragraphs. The paragraph separator is kept
                     // with the previous paragraph.
                     let para_end = i + c.len_utf8();
-                    paragraphs.push(ParagraphInfo {
-                        range: para_start..para_end,
-                        // P3. If no character is found in p2, set the paragraph level to zero.
-                        level: para_level.unwrap_or(LTR_LEVEL),
-                    });
+                    paragraphs.push(
+                        ParagraphInfo {
+                            range: para_start..para_end,
+                            // P3. If no character is found in p2, set the paragraph level to zero.
+                            level: para_level.unwrap_or(Level::ltr()),
+                        }
+                    );
                     // Reset state for the start of the next paragraph.
                     para_start = para_end;
                     // TODO: Support defaulting to direction of previous paragraph
                     //
-                    // <http://www.unicode.org/reports/tr9/#HL1>
+                    // http://www.unicode.org/reports/tr9/#HL1
                     para_level = default_para_level;
                     isolate_stack.clear();
                 }
-
                 L | R | AL => {
                     match isolate_stack.last() {
                         Some(&start) => {
                             if original_classes[start] == FSI {
                                 // X5c. If the first strong character between FSI and its matching
                                 // PDI is R or AL, treat it as RLI. Otherwise, treat it as LRI.
                                 for j in 0..chars::FSI.len_utf8() {
                                     original_classes[start + j] =
                                         if class == L { LRI } else { RLI };
                                 }
                             }
                         }
-
                         None => {
                             if para_level.is_none() {
                                 // P2. Find the first character of type L, AL, or R, while skipping
                                 // any characters between an isolate initiator and its matching
                                 // PDI.
-                                para_level = Some(if class != L { RTL_LEVEL } else { LTR_LEVEL });
+                                para_level = Some(
+                                    if class != L {
+                                        Level::rtl()
+                                    } else {
+                                        Level::ltr()
+                                    }
+                                );
                             }
                         }
                     }
                 }
-
                 RLI | LRI | FSI => {
                     isolate_stack.push(i);
                 }
-
                 PDI => {
                     isolate_stack.pop();
                 }
-
                 _ => {}
             }
         }
         if para_start < text.len() {
-            paragraphs.push(ParagraphInfo {
-                range: para_start..text.len(),
-                level: para_level.unwrap_or(LTR_LEVEL),
-            });
+            paragraphs.push(
+                ParagraphInfo {
+                    range: para_start..text.len(),
+                    level: para_level.unwrap_or(Level::ltr()),
+                }
+            );
         }
-        assert_eq!(original_classes.len(), text.len());
-
-        #[cfg(feature = "flame_it")] flame::end("InitialInfo::new(): iter text.char_indices()");
+        assert!(original_classes.len() == text.len());
 
         InitialInfo {
-            text,
-            original_classes,
-            paragraphs,
+            text: text,
+            original_classes: original_classes,
+            paragraphs: paragraphs,
         }
     }
 }
 
-/// Bidi information of the text.
+/// Bidi information of the text
 ///
 /// The `original_classes` and `levels` vectors are indexed by byte offsets into the text.  If a
 /// character is multiple bytes wide, then its class and level will appear multiple times in these
 /// vectors.
 // TODO: Impl `struct StringProperty<T> { values: Vec<T> }` and use instead of Vec<T>
 #[derive(Debug, PartialEq)]
 pub struct BidiInfo<'text> {
     /// The text
@@ -256,22 +241,21 @@ pub struct BidiInfo<'text> {
 
 impl<'text> BidiInfo<'text> {
     /// Split the text into paragraphs and determine the bidi embedding levels for each paragraph.
     ///
     /// TODO: In early steps, check for special cases that allow later steps to be skipped. like
     /// text that is entirely LTR.  See the `nsBidi` class from Gecko for comparison.
     ///
     /// TODO: Support auto-RTL base direction
-    #[cfg_attr(feature = "flame_it", flame)]
     pub fn new(text: &str, default_para_level: Option<Level>) -> BidiInfo {
         let InitialInfo {
+            text: _,
             original_classes,
             paragraphs,
-            ..
         } = InitialInfo::new(text, default_para_level);
 
         let mut levels = Vec::<Level>::with_capacity(text.len());
         let mut processing_classes = original_classes.clone();
 
         for para in &paragraphs {
             let text = &text[para.range.clone()];
             let original_classes = &original_classes[para.range.clone()];
@@ -279,62 +263,59 @@ impl<'text> BidiInfo<'text> {
 
             let new_len = levels.len() + para.range.len();
             levels.resize(new_len, para.level);
             let levels = &mut levels[para.range.clone()];
 
             explicit::compute(
                 text,
                 para.level,
-                original_classes,
+                &original_classes,
                 levels,
                 processing_classes,
             );
 
-            let sequences = prepare::isolating_run_sequences(para.level, original_classes, levels);
+            let sequences = prepare::isolating_run_sequences(para.level, &original_classes, levels);
             for sequence in &sequences {
                 implicit::resolve_weak(sequence, processing_classes);
                 implicit::resolve_neutral(sequence, levels, processing_classes);
             }
             implicit::resolve_levels(processing_classes, levels);
 
-            assign_levels_to_removed_chars(para.level, original_classes, levels);
+            assign_levels_to_removed_chars(para.level, &original_classes, levels);
         }
 
         BidiInfo {
-            text,
-            original_classes,
-            paragraphs,
-            levels,
+            text: text,
+            original_classes: original_classes,
+            paragraphs: paragraphs,
+            levels: levels,
         }
     }
 
     /// Re-order a line based on resolved levels and return only the embedding levels, one `Level`
     /// per *byte*.
-    #[cfg_attr(feature = "flame_it", flame)]
     pub fn reordered_levels(&self, para: &ParagraphInfo, line: Range<usize>) -> Vec<Level> {
         let (levels, _) = self.visual_runs(para, line.clone());
         levels
     }
 
     /// Re-order a line based on resolved levels and return only the embedding levels, one `Level`
     /// per *character*.
-    #[cfg_attr(feature = "flame_it", flame)]
     pub fn reordered_levels_per_char(
         &self,
         para: &ParagraphInfo,
         line: Range<usize>,
     ) -> Vec<Level> {
         let levels = self.reordered_levels(para, line);
         self.text.char_indices().map(|(i, _)| levels[i]).collect()
     }
 
 
     /// Re-order a line based on resolved levels and return the line in display order.
-    #[cfg_attr(feature = "flame_it", flame)]
     pub fn reorder_line(&self, para: &ParagraphInfo, line: Range<usize>) -> Cow<'text, str> {
         let (levels, runs) = self.visual_runs(para, line.clone());
 
         // If all isolating run sequences are LTR, no reordering is needed
         if runs.iter().all(|run| levels[run.start].is_ltr()) {
             return self.text[line.clone()].into();
         }
 
@@ -348,94 +329,93 @@ impl<'text> BidiInfo<'text> {
         }
         result.into()
     }
 
     /// Find the level runs within a line and return them in visual order.
     ///
     /// `line` is a range of bytes indices within `levels`.
     ///
-    /// <http://www.unicode.org/reports/tr9/#Reordering_Resolved_Levels>
-    #[cfg_attr(feature = "flame_it", flame)]
+    /// http://www.unicode.org/reports/tr9/#Reordering_Resolved_Levels
     pub fn visual_runs(
         &self,
         para: &ParagraphInfo,
         line: Range<usize>,
     ) -> (Vec<Level>, Vec<LevelRun>) {
         assert!(line.start <= self.levels.len());
         assert!(line.end <= self.levels.len());
 
         let mut levels = self.levels.clone();
 
         // Reset some whitespace chars to paragraph level.
-        // <http://www.unicode.org/reports/tr9/#L1>
+        // http://www.unicode.org/reports/tr9/#L1
         let line_str: &str = &self.text[line.clone()];
         let mut reset_from: Option<usize> = Some(0);
         let mut reset_to: Option<usize> = None;
         for (i, c) in line_str.char_indices() {
             match self.original_classes[i] {
                 // Ignored by X9
                 RLE | LRE | RLO | LRO | PDF | BN => {}
                 // Segment separator, Paragraph separator
                 B | S => {
-                    assert_eq!(reset_to, None);
+                    assert!(reset_to == None);
                     reset_to = Some(i + c.len_utf8());
                     if reset_from == None {
                         reset_from = Some(i);
                     }
                 }
                 // Whitespace, isolate formatting
                 WS | FSI | LRI | RLI | PDI => {
                     if reset_from == None {
                         reset_from = Some(i);
                     }
                 }
                 _ => {
                     reset_from = None;
                 }
             }
             if let (Some(from), Some(to)) = (reset_from, reset_to) {
-                #[cfg_attr(feature = "cargo-clippy", allow(needless_range_loop))]
                 for j in from..to {
                     levels[j] = para.level;
                 }
                 reset_from = None;
                 reset_to = None;
             }
         }
         if let Some(from) = reset_from {
-            #[cfg_attr(feature = "cargo-clippy", allow(needless_range_loop))]
             for j in from..line_str.len() {
                 levels[j] = para.level;
             }
         }
 
         // Find consecutive level runs.
         let mut runs = Vec::new();
         let mut start = line.start;
-        let mut run_level = levels[start];
-        let mut min_level = run_level;
-        let mut max_level = run_level;
+        let mut level = levels[start];
+        let mut min_level = level;
+        let mut max_level = level;
 
-        for (i, &new_level) in levels.iter().enumerate().take(line.end).skip(start + 1) {
-            if new_level != run_level {
+        for i in (start + 1)..line.end {
+            let new_level = levels[i];
+            if new_level != level {
                 // End of the previous run, start of a new one.
                 runs.push(start..i);
                 start = i;
-                run_level = new_level;
-                min_level = min(run_level, min_level);
-                max_level = max(run_level, max_level);
+                level = new_level;
+
+                min_level = min(level, min_level);
+                max_level = max(level, max_level);
             }
         }
         runs.push(start..line.end);
 
         let run_count = runs.len();
 
         // Re-order the odd runs.
-        // <http://www.unicode.org/reports/tr9/#L2>
+        // http://www.unicode.org/reports/tr9/#L2
 
         // Stop at the lowest *odd* level.
         min_level = min_level.new_lowest_ge_rtl().expect("Level error");
 
         while max_level >= min_level {
             // Look for the start of a sequence of consecutive runs of max_level or higher.
             let mut seq_start = 0;
             while seq_start < run_count {
@@ -453,19 +433,19 @@ impl<'text> BidiInfo<'text> {
                     seq_end += 1;
                 }
 
                 // Reverse the runs within this sequence.
                 runs[seq_start..seq_end].reverse();
 
                 seq_start = seq_end;
             }
-            max_level.lower(1).expect(
-                "Lowering embedding level below zero",
-            );
+            max_level
+                .lower(1)
+                .expect("Lowering embedding level below zero");
         }
 
         (levels, runs)
     }
 
     /// If processed text has any computed RTL levels
     ///
     /// This information is usually used to skip re-ordering of text when no RTL level is present
@@ -474,17 +454,16 @@ impl<'text> BidiInfo<'text> {
         level::has_rtl(&self.levels)
     }
 }
 
 /// Assign levels to characters removed by rule X9.
 ///
 /// The levels assigned to these characters are not specified by the algorithm.  This function
 /// assigns each one the level of the previous character, to avoid breaking level runs.
-#[cfg_attr(feature = "flame_it", flame)]
 fn assign_levels_to_removed_chars(para_level: Level, classes: &[BidiClass], levels: &mut [Level]) {
     for i in 0..levels.len() {
         if prepare::removed_by_x9(classes[i]) {
             levels[i] = if i > 0 { levels[i - 1] } else { para_level };
         }
     }
 }
 
@@ -494,212 +473,218 @@ mod tests {
     use super::*;
 
     #[test]
     fn test_initial_text_info() {
         let text = "a1";
         assert_eq!(
             InitialInfo::new(text, None),
             InitialInfo {
-                text,
+                text: &text,
                 original_classes: vec![L, EN],
                 paragraphs: vec![
                     ParagraphInfo {
                         range: 0..2,
-                        level: LTR_LEVEL,
+                        level: Level::ltr(),
                     },
                 ],
             }
         );
 
         let text = "غ א";
         assert_eq!(
             InitialInfo::new(text, None),
             InitialInfo {
-                text,
+                text: &text,
                 original_classes: vec![AL, AL, WS, R, R],
                 paragraphs: vec![
                     ParagraphInfo {
                         range: 0..5,
-                        level: RTL_LEVEL,
+                        level: Level::rtl(),
                     },
                 ],
             }
         );
 
         let text = "a\u{2029}b";
         assert_eq!(
             InitialInfo::new(text, None),
             InitialInfo {
-                text,
+                text: &text,
                 original_classes: vec![L, B, B, B, L],
                 paragraphs: vec![
                     ParagraphInfo {
                         range: 0..4,
-                        level: LTR_LEVEL,
+                        level: Level::ltr(),
                     },
                     ParagraphInfo {
                         range: 4..5,
-                        level: LTR_LEVEL,
+                        level: Level::ltr(),
                     },
                 ],
             }
         );
 
         let text = format!("{}א{}a", chars::FSI, chars::PDI);
         assert_eq!(
             InitialInfo::new(&text, None),
             InitialInfo {
                 text: &text,
                 original_classes: vec![RLI, RLI, RLI, R, R, PDI, PDI, PDI, L],
                 paragraphs: vec![
                     ParagraphInfo {
                         range: 0..9,
-                        level: LTR_LEVEL,
+                        level: Level::ltr(),
                     },
                 ],
             }
         );
     }
 
     #[test]
     fn test_process_text() {
         let text = "abc123";
         assert_eq!(
-            BidiInfo::new(text, Some(LTR_LEVEL)),
+            BidiInfo::new(text, Some(Level::ltr())),
             BidiInfo {
-                text,
+                text: &text,
                 levels: Level::vec(&[0, 0, 0, 0, 0, 0]),
                 original_classes: vec![L, L, L, EN, EN, EN],
                 paragraphs: vec![
                     ParagraphInfo {
                         range: 0..6,
-                        level: LTR_LEVEL,
+                        level: Level::ltr(),
                     },
                 ],
             }
         );
 
         let text = "abc אבג";
         assert_eq!(
-            BidiInfo::new(text, Some(LTR_LEVEL)),
+            BidiInfo::new(text, Some(Level::ltr())),
             BidiInfo {
-                text,
+                text: &text,
                 levels: Level::vec(&[0, 0, 0, 0, 1, 1, 1, 1, 1, 1]),
                 original_classes: vec![L, L, L, WS, R, R, R, R, R, R],
                 paragraphs: vec![
                     ParagraphInfo {
                         range: 0..10,
-                        level: LTR_LEVEL,
+                        level: Level::ltr(),
                     },
                 ],
             }
         );
         assert_eq!(
-            BidiInfo::new(text, Some(RTL_LEVEL)),
+            BidiInfo::new(text, Some(Level::rtl())),
             BidiInfo {
-                text,
+                text: &text,
                 levels: Level::vec(&[2, 2, 2, 1, 1, 1, 1, 1, 1, 1]),
                 original_classes: vec![L, L, L, WS, R, R, R, R, R, R],
                 paragraphs: vec![
                     ParagraphInfo {
                         range: 0..10,
-                        level: RTL_LEVEL,
+                        level: Level::rtl(),
                     },
                 ],
             }
         );
 
         let text = "אבג abc";
         assert_eq!(
-            BidiInfo::new(text, Some(LTR_LEVEL)),
+            BidiInfo::new(text, Some(Level::ltr())),
             BidiInfo {
-                text,
+                text: &text,
                 levels: Level::vec(&[1, 1, 1, 1, 1, 1, 0, 0, 0, 0]),
                 original_classes: vec![R, R, R, R, R, R, WS, L, L, L],
                 paragraphs: vec![
                     ParagraphInfo {
                         range: 0..10,
-                        level: LTR_LEVEL,
+                        level: Level::ltr(),
                     },
                 ],
             }
         );
         assert_eq!(
             BidiInfo::new(text, None),
             BidiInfo {
-                text,
+                text: &text,
                 levels: Level::vec(&[1, 1, 1, 1, 1, 1, 1, 2, 2, 2]),
                 original_classes: vec![R, R, R, R, R, R, WS, L, L, L],
                 paragraphs: vec![
                     ParagraphInfo {
                         range: 0..10,
-                        level: RTL_LEVEL,
+                        level: Level::rtl(),
                     },
                 ],
             }
         );
 
         let text = "غ2ظ א2ג";
         assert_eq!(
-            BidiInfo::new(text, Some(LTR_LEVEL)),
+            BidiInfo::new(text, Some(Level::ltr())),
             BidiInfo {
-                text,
+                text: &text,
                 levels: Level::vec(&[1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1]),
                 original_classes: vec![AL, AL, EN, AL, AL, WS, R, R, EN, R, R],
                 paragraphs: vec![
                     ParagraphInfo {
                         range: 0..11,
-                        level: LTR_LEVEL,
+                        level: Level::ltr(),
                     },
                 ],
             }
         );
 
         let text = "a א.\nג";
         assert_eq!(
             BidiInfo::new(text, None),
             BidiInfo {
-                text,
+                text: &text,
                 original_classes: vec![L, WS, R, R, CS, B, R, R],
                 levels: Level::vec(&[0, 0, 1, 1, 0, 0, 1, 1]),
                 paragraphs: vec![
                     ParagraphInfo {
                         range: 0..6,
-                        level: LTR_LEVEL,
+                        level: Level::ltr(),
                     },
                     ParagraphInfo {
                         range: 6..8,
-                        level: RTL_LEVEL,
+                        level: Level::rtl(),
                     },
                 ],
             }
         );
 
         /// BidiTest:69635 (AL ET EN)
         let bidi_info = BidiInfo::new("\u{060B}\u{20CF}\u{06F9}", None);
         assert_eq!(bidi_info.original_classes, vec![AL, AL, ET, ET, ET, EN, EN]);
     }
 
     #[test]
     fn test_bidi_info_has_rtl() {
         // ASCII only
         assert_eq!(BidiInfo::new("123", None).has_rtl(), false);
-        assert_eq!(BidiInfo::new("123", Some(LTR_LEVEL)).has_rtl(), false);
-        assert_eq!(BidiInfo::new("123", Some(RTL_LEVEL)).has_rtl(), false);
+        assert_eq!(BidiInfo::new("123", Some(Level::ltr())).has_rtl(), false);
+        assert_eq!(BidiInfo::new("123", Some(Level::rtl())).has_rtl(), false);
         assert_eq!(BidiInfo::new("abc", None).has_rtl(), false);
-        assert_eq!(BidiInfo::new("abc", Some(LTR_LEVEL)).has_rtl(), false);
-        assert_eq!(BidiInfo::new("abc", Some(RTL_LEVEL)).has_rtl(), false);
+        assert_eq!(BidiInfo::new("abc", Some(Level::ltr())).has_rtl(), false);
+        assert_eq!(BidiInfo::new("abc", Some(Level::rtl())).has_rtl(), false);
         assert_eq!(BidiInfo::new("abc 123", None).has_rtl(), false);
         assert_eq!(BidiInfo::new("abc\n123", None).has_rtl(), false);
 
         // With Hebrew
         assert_eq!(BidiInfo::new("אבּג", None).has_rtl(), true);
-        assert_eq!(BidiInfo::new("אבּג", Some(LTR_LEVEL)).has_rtl(), true);
-        assert_eq!(BidiInfo::new("אבּג", Some(RTL_LEVEL)).has_rtl(), true);
+        assert_eq!(
+            BidiInfo::new("אבּג", Some(Level::ltr())).has_rtl(),
+            true
+        );
+        assert_eq!(
+            BidiInfo::new("אבּג", Some(Level::rtl())).has_rtl(),
+            true
+        );
         assert_eq!(BidiInfo::new("abc אבּג", None).has_rtl(), true);
         assert_eq!(BidiInfo::new("abc\nאבּג", None).has_rtl(), true);
         assert_eq!(BidiInfo::new("אבּג abc", None).has_rtl(), true);
         assert_eq!(BidiInfo::new("אבּג\nabc", None).has_rtl(), true);
         assert_eq!(BidiInfo::new("אבּג 123", None).has_rtl(), true);
         assert_eq!(BidiInfo::new("אבּג\n123", None).has_rtl(), true);
     }
 
@@ -798,19 +783,17 @@ mod tests {
             .collect()
     }
 
     fn reordered_levels_per_char_for_paras(text: &str) -> Vec<Vec<Level>> {
         let bidi_info = BidiInfo::new(text, None);
         bidi_info
             .paragraphs
             .iter()
-            .map(|para| {
-                bidi_info.reordered_levels_per_char(para, para.range.clone())
-            })
+            .map(|para| bidi_info.reordered_levels_per_char(para, para.range.clone()))
             .collect()
     }
 
     #[test]
     fn test_reordered_levels() {
 
         /// BidiTest:946 (LRI PDI)
         let text = "\u{2067}\u{2069}";
@@ -842,17 +825,17 @@ mod tests {
             reordered_levels_per_char_for_paras("\u{0605}\u{2067}\u{202C}\u{0590}"),
             vec![&["2", "0", "x", "1"]]
         );
          */
     }
 }
 
 
-#[cfg(all(feature = "serde", test))]
+#[cfg(all(feature = "with_serde", test))]
 mod serde_tests {
     use serde_test::{Token, assert_tokens};
     use super::*;
 
     #[test]
     fn test_levels() {
         let text = "abc אבג";
         let bidi_info = BidiInfo::new(text, None);
--- a/third_party/rust/unicode-bidi/src/prepare.rs
+++ b/third_party/rust/unicode-bidi/src/prepare.rs
@@ -4,17 +4,17 @@
 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
 //! 3.3.3 Preparations for Implicit Processing
 //!
-//! <http://www.unicode.org/reports/tr9/#Preparations_for_Implicit_Processing>
+//! http://www.unicode.org/reports/tr9/#Preparations_for_Implicit_Processing
 
 use std::cmp::max;
 use std::ops::Range;
 
 use super::char_data::BidiClass;
 use super::level::Level;
 
 use BidiClass::*;
@@ -36,35 +36,34 @@ pub struct IsolatingRunSequence {
 
 /// Compute the set of isolating run sequences.
 ///
 /// An isolating run sequence is a maximal sequence of level runs such that for all level runs
 /// except the last one in the sequence, the last character of the run is an isolate initiator
 /// whose matching PDI is the first character of the next level run in the sequence.
 ///
 /// Note: This function does *not* return the sequences in order by their first characters.
-#[cfg_attr(feature = "flame_it", flame)]
 pub fn isolating_run_sequences(
     para_level: Level,
     original_classes: &[BidiClass],
     levels: &[Level],
 ) -> Vec<IsolatingRunSequence> {
     let runs = level_runs(levels, original_classes);
 
     // Compute the set of isolating run sequences.
-    // <http://www.unicode.org/reports/tr9/#BD13>
+    // http://www.unicode.org/reports/tr9/#BD13
     let mut sequences = Vec::with_capacity(runs.len());
 
     // When we encounter an isolate initiator, we push the current sequence onto the
     // stack so we can resume it after the matching PDI.
     let mut stack = vec![Vec::new()];
 
     for run in runs {
         assert!(run.len() > 0);
-        assert!(!stack.is_empty());
+        assert!(stack.len() > 0);
 
         let start_class = original_classes[run.start];
         let end_class = original_classes[run.end - 1];
 
         let mut sequence = if start_class == PDI && stack.len() > 1 {
             // Continue a previous sequence interrupted by an isolate.
             stack.pop().unwrap()
         } else {
@@ -78,96 +77,100 @@ pub fn isolating_run_sequences(
             // Resume this sequence after the isolate.
             stack.push(sequence);
         } else {
             // This sequence is finished.
             sequences.push(sequence);
         }
     }
     // Pop any remaning sequences off the stack.
-    sequences.extend(stack.into_iter().rev().filter(|seq| !seq.is_empty()));
+    sequences.extend(stack.into_iter().rev().filter(|seq| seq.len() > 0));
 
     // Determine the `sos` and `eos` class for each sequence.
-    // <http://www.unicode.org/reports/tr9/#X10>
+    // http://www.unicode.org/reports/tr9/#X10
     sequences
         .into_iter()
-        .map(|sequence: Vec<LevelRun>| {
-            assert!(!sequence.is_empty());
+        .map(
+            |sequence: Vec<LevelRun>| {
+                assert!(!sequence.is_empty());
+
+                let start_of_seq = sequence[0].start;
+                let end_of_seq = sequence[sequence.len() - 1].end;
+                let seq_level = levels[start_of_seq];
 
-            let start_of_seq = sequence[0].start;
-            let end_of_seq = sequence[sequence.len() - 1].end;
-            let seq_level = levels[start_of_seq];
+                #[cfg(test)]
+                for run in sequence.clone() {
+                    for idx in run {
+                        if not_removed_by_x9(&original_classes[idx]) {
+                            assert_eq!(seq_level, levels[idx]);
+                        }
+                    }
+                }
 
-            #[cfg(test)]
-            for run in sequence.clone() {
-                for idx in run {
-                    if not_removed_by_x9(&original_classes[idx]) {
-                        assert_eq!(seq_level, levels[idx]);
+                // Get the level of the last non-removed char before the runs.
+                let pred_level = match original_classes[..start_of_seq]
+                          .iter()
+                          .rposition(not_removed_by_x9) {
+                    Some(idx) => levels[idx],
+                    None => para_level,
+                };
+
+                // Get the level of the next non-removed char after the runs.
+                let succ_level = if matches!(original_classes[end_of_seq - 1], RLI | LRI | FSI) {
+                    para_level
+                } else {
+                    match original_classes[end_of_seq..]
+                              .iter()
+                              .position(not_removed_by_x9) {
+                        Some(idx) => levels[end_of_seq + idx],
+                        None => para_level,
                     }
+                };
+
+                IsolatingRunSequence {
+                    runs: sequence,
+                    sos: max(seq_level, pred_level).bidi_class(),
+                    eos: max(seq_level, succ_level).bidi_class(),
                 }
             }
-
-            // Get the level of the last non-removed char before the runs.
-            let pred_level = match original_classes[..start_of_seq].iter().rposition(
-                not_removed_by_x9,
-            ) {
-                Some(idx) => levels[idx],
-                None => para_level,
-            };
-
-            // Get the level of the next non-removed char after the runs.
-            let succ_level = if matches!(original_classes[end_of_seq - 1], RLI | LRI | FSI) {
-                para_level
-            } else {
-                match original_classes[end_of_seq..].iter().position(
-                    not_removed_by_x9,
-                ) {
-                    Some(idx) => levels[end_of_seq + idx],
-                    None => para_level,
-                }
-            };
-
-            IsolatingRunSequence {
-                runs: sequence,
-                sos: max(seq_level, pred_level).bidi_class(),
-                eos: max(seq_level, succ_level).bidi_class(),
-            }
-        })
+        )
         .collect()
 }
 
 /// Finds the level runs in a paragraph.
 ///
-/// <http://www.unicode.org/reports/tr9/#BD7>
+/// http://www.unicode.org/reports/tr9/#BD7
 fn level_runs(levels: &[Level], original_classes: &[BidiClass]) -> Vec<LevelRun> {
-    assert_eq!(levels.len(), original_classes.len());
+    assert!(levels.len() == original_classes.len());
 
     let mut runs = Vec::new();
-    if levels.is_empty() {
+    if levels.len() == 0 {
         return runs;
     }
 
     let mut current_run_level = levels[0];
     let mut current_run_start = 0;
     for i in 1..levels.len() {
-        if !removed_by_x9(original_classes[i]) && levels[i] != current_run_level {
-            // End the last run and start a new one.
-            runs.push(current_run_start..i);
-            current_run_level = levels[i];
-            current_run_start = i;
+        if !removed_by_x9(original_classes[i]) {
+            if levels[i] != current_run_level {
+                // End the last run and start a new one.
+                runs.push(current_run_start..i);
+                current_run_level = levels[i];
+                current_run_start = i;
+            }
         }
     }
     runs.push(current_run_start..levels.len());
 
     runs
 }
 
 /// Should this character be ignored in steps after X9?
 ///
-/// <http://www.unicode.org/reports/tr9/#X9>
+/// http://www.unicode.org/reports/tr9/#X9
 pub fn removed_by_x9(class: BidiClass) -> bool {
     matches!(class, RLE | LRE | RLO | LRO | PDF | BN)
 }
 
 // For use as a predicate for `position` / `rposition`
 pub fn not_removed_by_x9(class: &BidiClass) -> bool {
     !removed_by_x9(*class)
 }
@@ -180,17 +183,17 @@ mod tests {
     fn test_level_runs() {
         assert_eq!(level_runs(&Level::vec(&[]), &[]), &[]);
         assert_eq!(
             level_runs(&Level::vec(&[0, 0, 0, 1, 1, 2, 0, 0]), &[L; 8]),
             &[0..3, 3..5, 5..6, 6..8]
         );
     }
 
-    // From <http://www.unicode.org/reports/tr9/#BD13>
+    // From http://www.unicode.org/reports/tr9/#BD13
     #[cfg_attr(rustfmt, rustfmt_skip)]
     #[test]
     fn test_isolating_run_sequences() {
 
         // == Example 1 ==
         // text1·RLE·text2·PDF·RLE·text3·PDF·text4
         // index        0    1  2    3    4  5    6  7
         let classes = &[L, RLE, L, PDF, RLE, L, PDF, L];
@@ -225,17 +228,17 @@ mod tests {
         let mut sequences = isolating_run_sequences(para_level, classes, &Level::vec(levels));
         sequences.sort_by(|a, b| a.runs[0].clone().cmp(b.runs[0].clone()));
         assert_eq!(
             sequences.iter().map(|s| s.runs.clone()).collect::<Vec<_>>(),
             vec![vec![0..2, 11..13], vec![2..4, 9..11], vec![4..6], vec![6..8], vec![8..9]]
         );
     }
 
-    // From <http://www.unicode.org/reports/tr9/#X10>
+    // From http://www.unicode.org/reports/tr9/#X10
     #[cfg_attr(rustfmt, rustfmt_skip)]
     #[test]
     fn test_isolating_run_sequences_sos_and_eos() {
 
         // == Example 1 ==
         // text1·RLE·text2·LRE·text3·PDF·text4·PDF·RLE·text5·PDF·text6
         // index        0    1  2    3  4    5  6    7    8  9   10  11
         let classes = &[L, RLE, L, LRE, L, PDF, L, PDF, RLE, L, PDF,  L];
rename from third_party/rust/unicode-bidi-0.3.3/tests/conformance_tests.rs
rename to third_party/rust/unicode-bidi/tests/conformance_tests.rs
rename from third_party/rust/unicode-bidi-0.3.3/tools/generate.py
rename to third_party/rust/unicode-bidi/tools/generate.py
deleted file mode 100644
--- a/third_party/rust/unreachable-0.1.1/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".travis.yml":"180cc837b1ea2ce0ed737c2e15208e83abf6f92291a77ed1ebcc564c628c2077","Cargo.toml":"cc09349f0610a327f3562a4c44b9c3889e5a9bf43c290ce436bfb98a4e66b0ed","README.md":"447088161e4b8c6060ae830d41ba2adf3cac2dbd8b1195c618b062878832be82","src/lib.rs":"2cb4bbb6a0c7058e49f5bbc0c1e2f208b5374cf70c495813401a357f9dfad188"},"package":"1f2ae5ddb18e1c92664717616dd9549dde73f539f01bd7b77c2edb2446bdff91"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/unreachable-0.1.1/.travis.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-language: rust
-sudo: false
-
-script:
-    - cargo build
-    - cargo test
-    - cargo bench --no-run
-    - cargo doc
-
-after_success:
-    - if [ "$TRAVIS_PULL_REQUEST" == false && test == "TRAVIS_BRANCH" == "master" ]; then
-    - curl https://raw.githubusercontent.com/reem/rust-gh-docs/master/make-docs.sh > docs.sh
-    - chmod u+x docs.sh
-    - ./docs.sh reem project-name
-
-env:
-  global:
-    secure: QPYL1XUr4CyK/2DXlsYC1eCpWRpyEiqQSd/FFVR+YdP/rOJ7AyAXQqPhfgjDBQwvc6E2fUiyYjoV/xe1a757DDeZKlgd8Lp20fSDwvNt/Ejx8ueh3h3kuOtgDpIGSKX/l+XC+ltDpzjhh7bowI2/fOEf+kE53jvu9i4PiLnKdlY=
-
deleted file mode 100644
--- a/third_party/rust/unreachable-0.1.1/Cargo.toml
+++ /dev/null
@@ -1,13 +0,0 @@
-[package]
-
-name = "unreachable"
-version = "0.1.1"
-authors = ["Jonathan Reem <jonathan.reem@gmail.com>"]
-repository = "https://github.com/reem/rust-unreachable.git"
-description = "An unreachable code optimization hint in stable rust."
-readme = "README.md"
-license = "MIT"
-
-[dependencies.void]
-version = "1"
-default-features = false
deleted file mode 100644
--- a/third_party/rust/unreachable-0.1.1/README.md
+++ /dev/null
@@ -1,24 +0,0 @@
-# unreachable
-
-> An unreachable code optimization hint in stable rust.
-
-## [Documentation](https://crates.fyi/crates/unreachable/0.1.1)
-
-## Usage
-
-Use the crates.io repository; add this to your `Cargo.toml` along
-with the rest of your dependencies:
-
-```toml
-[dependencies]
-unreachable = "0.1"
-```
-
-## Author
-
-[Jonathan Reem](https://medium.com/@jreem) is the primary author and maintainer of unreachable.
-
-## License
-
-MIT
-
deleted file mode 100644
--- a/third_party/rust/unreachable-0.1.1/src/lib.rs
+++ /dev/null
@@ -1,77 +0,0 @@
-#![cfg_attr(test, deny(warnings))]
-#![deny(missing_docs)]
-
-//! # unreachable
-//!
-//! An unreachable code optimization hint in stable rust, and some useful
-//! extension traits for `Option` and `Result`.
-//!
-
-#![no_std]
-
-extern crate void;
-
-use core::mem;
-
-/// Hint to the optimizer that any code path which calls this function is
-/// statically unreachable and can be removed.
-///
-/// Calling this function in reachable code invokes undefined behavior. Be
-/// very, very sure this is what you want; often, a simple `panic!` is more
-/// suitable.
-#[inline]
-pub unsafe fn unreachable() -> ! {
-    let x: &void::Void = mem::transmute(1usize);
-    void::unreachable(*x)
-}
-
-/// An extension trait for `Option<T>` providing unchecked unwrapping methods.
-pub trait UncheckedOptionExt<T> {
-    /// Get the value out of this Option without checking for None.
-    unsafe fn unchecked_unwrap(self) -> T;
-
-    /// Assert that this Option is a None to the optimizer.
-    unsafe fn unchecked_unwrap_none(self);
-}
-
-/// An extension trait for `Result<T, E>` providing unchecked unwrapping methods.
-pub trait UncheckedResultExt<T, E> {
-    /// Get the value out of this Result without checking for Err.
-    unsafe fn unchecked_unwrap_ok(self) -> T;
-
-    /// Get the error out of this Result without checking for Ok.
-    unsafe fn unchecked_unwrap_err(self) -> E;
-}
-
-impl<T> UncheckedOptionExt<T> for Option<T> {
-    unsafe fn unchecked_unwrap(self) -> T {
-        match self {
-            Some(x) => x,
-            None => unreachable()
-        }
-    }
-
-    unsafe fn unchecked_unwrap_none(self) {
-        match self {
-            Some(_) => unreachable(),
-            None => ()
-        }
-    }
-}
-
-impl<T, E> UncheckedResultExt<T, E> for Result<T, E> {
-    unsafe fn unchecked_unwrap_ok(self) -> T {
-        match self {
-            Ok(x) => x,
-            Err(_) => unreachable()
-        }
-    }
-
-    unsafe fn unchecked_unwrap_err(self) -> E {
-        match self {
-            Ok(_) => unreachable(),
-            Err(e) => e
-        }
-    }
-}
-
--- a/third_party/rust/unreachable/.cargo-checksum.json
+++ b/third_party/rust/unreachable/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".travis.yml":"180cc837b1ea2ce0ed737c2e15208e83abf6f92291a77ed1ebcc564c628c2077","Cargo.toml":"9347536f7400ac984522823ce009af0c6c8daca66a51715b653b6ec98436967d","LICENSE-APACHE":"c6596eb7be8581c18be736c846fb9173b69eccf6ef94c5135893ec56bd92ba08","LICENSE-MIT":"9a5633009ff51b0a74dd81f7576fce531fea6097cd377867f6ce445617b6fa78","README.md":"bd81710532521de9e3eaf29c1b4a6e17ef0c169c6fe5e43f03dd463babae3f50","src/lib.rs":"2cb4bbb6a0c7058e49f5bbc0c1e2f208b5374cf70c495813401a357f9dfad188"},"package":"382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56"}
\ No newline at end of file
+{"files":{".travis.yml":"180cc837b1ea2ce0ed737c2e15208e83abf6f92291a77ed1ebcc564c628c2077","Cargo.toml":"cc09349f0610a327f3562a4c44b9c3889e5a9bf43c290ce436bfb98a4e66b0ed","README.md":"447088161e4b8c6060ae830d41ba2adf3cac2dbd8b1195c618b062878832be82","src/lib.rs":"2cb4bbb6a0c7058e49f5bbc0c1e2f208b5374cf70c495813401a357f9dfad188"},"package":"1f2ae5ddb18e1c92664717616dd9549dde73f539f01bd7b77c2edb2446bdff91"}
\ No newline at end of file
--- a/third_party/rust/unreachable/Cargo.toml
+++ b/third_party/rust/unreachable/Cargo.toml
@@ -1,13 +1,13 @@
 [package]
 
 name = "unreachable"
-version = "1.0.0"
+version = "0.1.1"
 authors = ["Jonathan Reem <jonathan.reem@gmail.com>"]
 repository = "https://github.com/reem/rust-unreachable.git"
 description = "An unreachable code optimization hint in stable rust."
 readme = "README.md"
-license = "MIT / Apache-2.0"
+license = "MIT"
 
 [dependencies.void]
 version = "1"
 default-features = false
deleted file mode 100644
--- a/third_party/rust/unreachable/LICENSE-APACHE
+++ /dev/null
@@ -1,202 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "{}"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright {yyyy} {name of copyright owner}
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
deleted file mode 100644
--- a/third_party/rust/unreachable/LICENSE-MIT
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2015 The rust-unreachable Developers
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
--- a/third_party/rust/unreachable/README.md
+++ b/third_party/rust/unreachable/README.md
@@ -15,21 +15,10 @@ unreachable = "0.1"
 ```
 
 ## Author
 
 [Jonathan Reem](https://medium.com/@jreem) is the primary author and maintainer of unreachable.
 
 ## License
 
-Licensed under either of
-
- * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
- * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
-
-at your option.
+MIT
 
-### Contribution
-
-Unless you explicitly state otherwise, any contribution intentionally
-submitted for inclusion in the work by you, as defined in the Apache-2.0
-license, shall be dual licensed as above, without any additional terms or
-conditions.
deleted file mode 100644
--- a/third_party/rust/url-1.5.1/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{".travis.yml":"890af214187ffcba4732acb2d1af30d7adb9aade0679e9fdb06baae363240b8e","Cargo.toml":"ec586106c4d0625919a3591fe3ae915043e82c8bfdd1c9e747171ba5e21047e1","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"20c7855c364d57ea4c97889a5e8d98470a9952dade37bd9248b9a54431670e5e","Makefile":"bffd75d34654b2955d4f005f1a5e85c821c90becf1a8a52cbe10121972f43148","README.md":"eb3f4694003f408cbe3c7f3e9fbbc71241defb940cc55a816981f0f0f144c8eb","UPGRADING.md":"fbcc2d39bdf17db0745793db6626fcd5c909dddd4ce13b27566cfabece22c368","appveyor.yml":"c78486dbfbe6ebbf3d808afb9a19f7ec18c4704ce451c6305f0716999b70a1a6","docs/.nojekyll":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","docs/404.html":"f61e6271c1ea1aa113b64b356e994595fa548f0433f89948d747503ad22195cd","docs/index.html":"f61e6271c1ea1aa113b64b356e994595fa548f0433f89948d747503ad22195cd","github.png":"b432fd855efe7c430fe6a57ccf83935c1996f03a7cdc8d6e1b34154b8c43f6ec","rust-url-todo":"1192cee7b6cedf2133d97dc6074b593a1d19b0ee13fff6f28d6329855044e575","src/encoding.rs":"f3e109ca8ec5a9130da50cdfb3003530aedb6dd5a440f0790d76b71f6981119c","src/form_urlencoded.rs":"7ccaef7148e4bc2577154c50f8705db3a055b641269e24c22770f06222321e1e","src/host.rs":"281165d732ea87b6f01a98f7c68ffcb284c41f84b3ab6ed674fb8e57022d1019","src/lib.rs":"bd156e8bcfbd44f0cd52c8b394e03ec63fea012c0bf5ca554521352714838605","src/origin.rs":"7071dcc1070ccfae84cdcd43586b84a9706e35a9a099ff4dde128da0909bd0bc","src/parser.rs":"9d30868f0900586fec6f122a0322598a08116ab0b4c4d8caf5c35a720381a73a","src/path_segments.rs":"7bd3142eaa568863ef44e2255c181239141f9eeee337f889b9ffaaeab4ca669d","src/quirks.rs":"1231f965e22bb3632c22993e2a8d4c7470bcb4a8de25d049f31784303f0def03","src/slicing.rs":"4e539886b23945a92094625f3e531a4bff40daa44240b5d19ee8577478c4f7fe","tests/data.rs":"c333766897f6492fb6583ab5c8a511973b7a55f58ca550799432343da64d5ca7","tests/setters_tests.json":"ebcbdb52e9a4b5a565f8806d52ebc610d46a34df883e10b0be080d026468ff73","tests/unit.rs":"c2f206f433be619414d761d358a2a4a5a46cfe8a4fea5339adec5e9937d78de2","tests/urltestdata.json":"430c74aa3a31afaa57a92805544e00825f4dffe2def98c1e3c212c3db80268af"},"package":"eeb819346883532a271eb626deb43c4a1bb4c4dd47c519bd78137c3e72a4fe27"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/url-1.5.1/.travis.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-language: rust
-rust:
-  - nightly
-  - beta
-  - stable
-  - 1.17.0
-script: make test
-notifications:
-  webhooks: http://build.servo.org:54856/travis
deleted file mode 100644
--- a/third_party/rust/url-1.5.1/Cargo.toml
+++ /dev/null
@@ -1,49 +0,0 @@
-[package]
-
-name = "url"
-# When updating version, also modify html_root_url in the lib.rs
-version = "1.5.1"
-authors = ["The rust-url developers"]
-
-description = "URL library for Rust, based on the WHATWG URL Standard"
-documentation = "https://docs.rs/url"
-repository = "https://github.com/servo/rust-url"
-readme = "README.md"
-keywords = ["url", "parser"]
-categories = ["parser-implementations", "web-programming", "encoding"]
-license = "MIT/Apache-2.0"
-
-[badges]
-travis-ci = { repository = "servo/rust-url" }
-appveyor = { repository = "servo/rust-url" }
-
-[workspace]
-members = [".", "idna", "percent_encoding", "url_serde"]
-
-[[test]]
-name = "unit"
-
-[[test]]
-name = "data"
-harness = false
-
-[lib]
-test = false
-
-[dev-dependencies]
-rustc-test = "0.1"
-rustc-serialize = "0.3"
-serde_json = ">=0.6.1, <0.9"
-
-[features]
-query_encoding = ["encoding"]
-heap_size = ["heapsize"]
-
-[dependencies]
-encoding = {version = "0.2", optional = true}
-heapsize = {version = ">=0.1.1, <0.5", optional = true}
-idna = { version = "0.1.0", path = "./idna" }
-matches = "0.1"
-percent-encoding = { version = "1.0.0", path = "./percent_encoding" }
-rustc-serialize = {version = "0.3", optional = true}
-serde = {version = ">=0.6.1, <0.9", optional = true}
deleted file mode 100644
--- a/third_party/rust/url-1.5.1/LICENSE-APACHE
+++ /dev/null
@@ -1,201 +0,0 @@
-                              Apache License
-                        Version 2.0, January 2004
-                     http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-   "License" shall mean the terms and conditions for use, reproduction,
-   and distribution as defined by Sections 1 through 9 of this document.
-
-   "Licensor" shall mean the copyright owner or entity authorized by
-   the copyright owner that is granting the License.
-
-   "Legal Entity" shall mean the union of the acting entity and all
-   other entities that control, are controlled by, or are under common
-   control with that entity. For the purposes of this definition,
-   "control" means (i) the power, direct or indirect, to cause the
-   direction or management of such entity, whether by contract or
-   otherwise, or (ii) ownership of fifty percent (50%) or more of the
-   outstanding shares, or (iii) beneficial ownership of such entity.
-
-   "You" (or "Your") shall mean an individual or Legal Entity
-   exercising permissions granted by this License.
-
-   "Source" form shall mean the preferred form for making modifications,
-   including but not limited to software source code, documentation
-   source, and configuration files.
-
-   "Object" form shall mean any form resulting from mechanical
-   transformation or translation of a Source form, including but
-   not limited to compiled object code, generated documentation,
-   and conversions to other media types.
-
-   "Work" shall mean the work of authorship, whether in Source or
-   Object form, made available under the License, as indicated by a
-   copyright notice that is included in or attached to the work
-   (an example is provided in the Appendix below).
-
-   "Derivative Works" shall mean any work, whether in Source or Object
-   form, that is based on (or derived from) the Work and for which the
-   editorial revisions, annotations, elaborations, or other modifications
-   represent, as a whole, an original work of authorship. For the purposes
-   of this License, Derivative Works shall not include works that remain
-   separable from, or merely link (or bind by name) to the interfaces of,
-   the Work and Derivative Works thereof.
-
-   "Contribution" shall mean any work of authorship, including
-   the original version of the Work and any modifications or additions
-   to that Work or Derivative Works thereof, that is intentionally
-   submitted to Licensor for inclusion in the Work by the copyright owner
-   or by an individual or Legal Entity authorized to submit on behalf of
-   the copyright owner. For the purposes of this definition, "submitted"
-   means any form of electronic, verbal, or written communication sent
-   to the Licensor or its representatives, including but not limited to
-   communication on electronic mailing lists, source code control systems,
-   and issue tracking systems that are managed by, or on behalf of, the
-   Licensor for the purpose of discussing and improving the Work, but
-   excluding communication that is conspicuously marked or otherwise
-   designated in writing by the copyright owner as "Not a Contribution."
-
-   "Contributor" shall mean Licensor and any individual or Legal Entity
-   on behalf of whom a Contribution has been received by Licensor and
-   subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   copyright license to reproduce, prepare Derivative Works of,
-   publicly display, publicly perform, sublicense, and distribute the
-   Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
-   this License, each Contributor hereby grants to You a perpetual,
-   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-   (except as stated in this section) patent license to make, have made,
-   use, offer to sell, sell, import, and otherwise transfer the Work,
-   where such license applies only to those patent claims licensable
-   by such Contributor that are necessarily infringed by their
-   Contribution(s) alone or by combination of their Contribution(s)
-   with the Work to which such Contribution(s) was submitted. If You
-   institute patent litigation against any entity (including a
-   cross-claim or counterclaim in a lawsuit) alleging that the Work
-   or a Contribution incorporated within the Work constitutes direct
-   or contributory patent infringement, then any patent licenses
-   granted to You under this License for that Work shall terminate
-   as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
-   Work or Derivative Works thereof in any medium, with or without
-   modifications, and in Source or Object form, provided that You
-   meet the following conditions:
-
-   (a) You must give any other recipients of the Work or
-       Derivative Works a copy of this License; and
-
-   (b) You must cause any modified files to carry prominent notices
-       stating that You changed the files; and
-
-   (c) You must retain, in the Source form of any Derivative Works
-       that You distribute, all copyright, patent, trademark, and
-       attribution notices from the Source form of the Work,
-       excluding those notices that do not pertain to any part of
-       the Derivative Works; and
-
-   (d) If the Work includes a "NOTICE" text file as part of its
-       distribution, then any Derivative Works that You distribute must
-       include a readable copy of the attribution notices contained
-       within such NOTICE file, excluding those notices that do not
-       pertain to any part of the Derivative Works, in at least one
-       of the following places: within a NOTICE text file distributed
-       as part of the Derivative Works; within the Source form or
-       documentation, if provided along with the Derivative Works; or,
-       within a display generated by the Derivative Works, if and
-       wherever such third-party notices normally appear. The contents
-       of the NOTICE file are for informational purposes only and
-       do not modify the License. You may add Your own attribution
-       notices within Derivative Works that You distribute, alongside
-       or as an addendum to the NOTICE text from the Work, provided
-       that such additional attribution notices cannot be construed
-       as modifying the License.
-
-   You may add Your own copyright statement to Your modifications and
-   may provide additional or different license terms and conditions
-   for use, reproduction, or distribution of Your modifications, or
-   for any such Derivative Works as a whole, provided Your use,
-   reproduction, and distribution of the Work otherwise complies with
-   the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
-   any Contribution intentionally submitted for inclusion in the Work
-   by You to the Licensor shall be under the terms and conditions of
-   this License, without any additional terms or conditions.
-   Notwithstanding the above, nothing herein shall supersede or modify
-   the terms of any separate license agreement you may have executed
-   with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
-   names, trademarks, service marks, or product names of the Licensor,
-   except as required for reasonable and customary use in describing the
-   origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
-   agreed to in writing, Licensor provides the Work (and each
-   Contributor provides its Contributions) on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-   implied, including, without limitation, any warranties or conditions
-   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-   PARTICULAR PURPOSE. You are solely responsible for determining the
-   appropriateness of using or redistributing the Work and assume any
-   risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
-   whether in tort (including negligence), contract, or otherwise,
-   unless required by applicable law (such as deliberate and grossly
-   negligent acts) or agreed to in writing, shall any Contributor be
-   liable to You for damages, including any direct, indirect, special,
-   incidental, or consequential damages of any character arising as a
-   result of this License or out of the use or inability to use the
-   Work (including but not limited to damages for loss of goodwill,
-   work stoppage, computer failure or malfunction, or any and all
-   other commercial damages or losses), even if such Contributor
-   has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
-   the Work or Derivative Works thereof, You may choose to offer,
-   and charge a fee for, acceptance of support, warranty, indemnity,
-   or other liability obligations and/or rights consistent with this
-   License. However, in accepting such obligations, You may act only
-   on Your own behalf and on Your sole responsibility, not on behalf
-   of any other Contributor, and only if You agree to indemnify,
-   defend, and hold each Contributor harmless for any liability
-   incurred by, or claims asserted against, such Contributor by reason
-   of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
-   To apply the Apache License to your work, attach the following
-   boilerplate notice, with the fields enclosed by brackets "[]"
-   replaced with your own identifying information. (Don't include
-   the brackets!)  The text should be enclosed in the appropriate
-   comment syntax for the file format. We also recommend that a
-   file or class name and description of purpose be included on the
-   same "printed page" as the copyright notice for easier
-   identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-	http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
deleted file mode 100644
--- a/third_party/rust/url-1.5.1/LICENSE-MIT
+++ /dev/null
@@ -1,25 +0,0 @@
-Copyright (c) 2013-2016 The rust-url developers
-
-Permission is hereby granted, free of charge, to any
-person obtaining a copy of this software and associated
-documentation files (the "Software"), to deal in the
-Software without restriction, including without
-limitation the rights to use, copy, modify, merge,
-publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software
-is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice
-shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
-ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
-TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
-SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
-IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
deleted file mode 100644
--- a/third_party/rust/url-1.5.1/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-test:
-	cargo test --features "query_encoding serde rustc-serialize heapsize"
-	(cd idna && cargo test)
-	(cd url_serde && cargo test)
-
-.PHONY: test
deleted file mode 100644
--- a/third_party/rust/url-1.5.1/README.md
+++ /dev/null
@@ -1,10 +0,0 @@
-rust-url
-========
-
-[![Travis build Status](https://travis-ci.org/servo/rust-url.svg?branch=master)](https://travis-ci.org/servo/rust-url) [![Appveyor build status](https://ci.appveyor.com/api/projects/status/ulkqx2xcemyod6xa?svg=true)](https://ci.appveyor.com/project/Manishearth/rust-url)
-
-URL library for Rust, based on the [URL Standard](https://url.spec.whatwg.org/).
-
-[Documentation](https://docs.rs/url/)
-
-Please see [UPGRADING.md](https://github.com/servo/rust-url/blob/master/UPGRADING.md) if you are upgrading from 0.x to 1.x.
deleted file mode 100644
--- a/third_party/rust/url-1.5.1/UPGRADING.md
+++ /dev/null
@@ -1,263 +0,0 @@
-# Guide to upgrading from url 0.x to 1.x
-
-* The fields of `Url` are now private because the `Url` constructor, parser,
-  and setters maintain invariants that could be violated if you were to set the fields directly.
-  Instead of accessing, for example, `url.scheme`, use the getter method, such as `url.scheme()`.
-  Instead of assigning directly to a field, for example `url.scheme = "https".to_string()`,
-  use the setter method, such as `url.set_scheme("https").unwrap()`.
-  (Some setters validate the new value and return a `Result` that must be used).
-
-* The methods of `Url` now return `&str` instead of `String`,
-  thus reducing allocations and making serialization cheap.
-
-* The `path()` method on `url::Url` instances used to return `Option<&[String]>`;
-  now it returns `&str`.
-  If you would like functionality more similar to the old behavior of `path()`,
-  use `path_segments()` that returns `Option<str::Split<char>>`.
-
-    Before upgrading:
-
-    ```rust
-    let issue_list_url = Url::parse(
-         "https://github.com/rust-lang/rust/issues?labels=E-easy&state=open"
-    ).unwrap();
-    assert_eq!(issue_list_url.path(), Some(&["rust-lang".to_string(),
-                                             "rust".to_string(),
-                                             "issues".to_string()][..]));
-    ```
-
-    After upgrading:
-
-    ```rust
-    let issue_list_url = Url::parse(
-         "https://github.com/rust-lang/rust/issues?labels=E-easy&state=open"
-    ).unwrap();
-    assert_eq!(issue_list_url.path(), "/rust-lang/rust/issues");
-    assert_eq!(issue_list_url.path_segments().map(|c| c.collect::<Vec<_>>()),
-               Some(vec!["rust-lang", "rust", "issues"]));
-    ```
-
-* The `path_mut()` method on `url::Url` instances that allowed modification of a URL's path
-  has been replaced by `path_segments_mut()`.
-
-    Before upgrading:
-
-    ```rust
-    let mut url = Url::parse("https://github.com/rust-lang/rust").unwrap();
-    url.path_mut().unwrap().push("issues");
-    ```
-
-    After upgrading:
-
-    ```rust
-    let mut url = Url::parse("https://github.com/rust-lang/rust").unwrap();
-    url.path_segments_mut().unwrap().push("issues");
-    ```
-
-* The `domain_mut()` method on `url::Url` instances that allowed modification of a URL's domain
-  has been replaced by `set_host()` and `set_ip_host()`.
-
-* The `host()` method on `url::Url` instances used to return `Option<&Host>`;
-  now it returns `Option<Host<&str>>`.
-  The `serialize_host()` method that returned `Option<String>`
-  has been replaced by the `host_str()` method that returns `Option<&str>`.
-
-* The `serialize()` method on `url::Url` instances that returned `String`
-  has been replaced by an `as_str()` method that returns `&str`.
-
-    Before upgrading:
-
-    ```rust
-    let this_document = Url::parse("http://servo.github.io/rust-url/url/index.html").unwrap();
-    assert_eq!(this_document.serialize(), "http://servo.github.io/rust-url/url/index.html".to_string());
-    ```
-
-    After upgrading:
-
-    ```rust
-    let this_document = Url::parse("http://servo.github.io/rust-url/url/index.html").unwrap();
-    assert_eq!(this_document.as_str(), "http://servo.github.io/rust-url/url/index.html");
-    ```
-
-* `url::UrlParser` has been replaced by `url::Url::parse()` and `url::Url::join()`.
-
-    Before upgrading:
-
-    ```rust
-    let this_document = Url::parse("http://servo.github.io/rust-url/url/index.html").unwrap();
-    let css_url = UrlParser::new().base_url(&this_document).parse("../main.css").unwrap();
-    assert_eq!(css_url.serialize(), "http://servo.github.io/rust-url/main.css".to_string());
-    ```
-
-    After upgrading:
-
-    ```rust
-    let this_document = Url::parse("http://servo.github.io/rust-url/url/index.html").unwrap();
-    let css_url = this_document.join("../main.css").unwrap();
-    assert_eq!(css_url.as_str(), "http://servo.github.io/rust-url/main.css");
-    ```
-
-* `url::parse_path()` and `url::UrlParser::parse_path()` have been removed without replacement.
-  As a workaround, you can give a base URL that you then ignore too `url::Url::parse()`.
-
-    Before upgrading:
-
-    ```rust
-    let (path, query, fragment) = url::parse_path("/foo/bar/../baz?q=42").unwrap();
-    assert_eq!(path, vec!["foo".to_string(), "baz".to_string()]);
-    assert_eq!(query, Some("q=42".to_string()));
-    assert_eq!(fragment, None);
-    ```
-
-    After upgrading:
-
-    ```rust
-    let base = Url::parse("http://example.com").unwrap();
-    let with_path = base.join("/foo/bar/../baz?q=42").unwrap();
-    assert_eq!(with_path.path(), "/foo/baz");
-    assert_eq!(with_path.query(), Some("q=42"));
-    assert_eq!(with_path.fragment(), None);
-    ```
-
-* The `url::form_urlencoded::serialize()` method
-  has been replaced with the `url::form_urlencoded::Serializer` struct.
-  Instead of calling `serialize()` with key/value pairs,
-  create a new `Serializer` with a new string,
-  call the `extend_pairs()` method on the `Serializer` instance with the key/value pairs as the argument,
-  then call `finish()`.
-
-    Before upgrading:
-
-    ```rust
-    let form = url::form_urlencoded::serialize(form.iter().map(|(k, v)| {
-        (&k[..], &v[..])
-    }));
-    ```
-
-    After upgrading:
-
-    ```rust
-    let form = url::form_urlencoded::Serializer::new(String::new()).extend_pairs(
-        form.iter().map(|(k, v)| { (&k[..], &v[..]) })
-    ).finish();
-    ```
-
-* The `set_query_from_pairs()` method on `url::Url` instances that took key/value pairs
-  has been replaced with `query_pairs_mut()`, which allows you to modify the `url::Url`'s query pairs.
-
-    Before upgrading:
-
-    ```rust
-    let mut url = Url::parse("https://duckduckgo.com/").unwrap();
-    let pairs = vec![
-        ("q", "test"),
-        ("ia", "images"),
-    ];
-    url.set_query_from_pairs(pairs.iter().map(|&(k, v)| {
-        (&k[..], &v[..])
-    }));
-    ```
-
-    After upgrading:
-
-    ```rust
-    let mut url = Url::parse("https://duckduckgo.com/").unwrap();
-    let pairs = vec![
-        ("q", "test"),
-        ("ia", "images"),
-    ];
-    url.query_pairs_mut().clear().extend_pairs(
-      pairs.iter().map(|&(k, v)| { (&k[..], &v[..]) })
-    );
-    ```
-
-* `url::SchemeData`, its variants `Relative` and `NonRelative`,
-  and the struct `url::RelativeSchemeData` have been removed.
-  Instead of matching on these variants
-  to determine if you have a URL in a relative scheme such as HTTP
-  versus a URL in a non-relative scheme as data,
-  use the `cannot_be_a_base()` method to determine which kind you have.
-
-    Before upgrading:
-
-    ```rust
-    match url.scheme_data {
-        url::SchemeData::Relative(..) => {}
-        url::SchemeData::NonRelative(..) => {
-            return Err(human(format!("`{}` must have relative scheme \
-                                      data: {}", field, url)))
-        }
-    }
-    ```
-
-    After upgrading:
-
-    ```rust
-    if url.cannot_be_a_base() {
-        return Err(human(format!("`{}` must have relative scheme \
-                                  data: {}", field, url)))
-    }
-    ```
-
-* The functions `url::whatwg_scheme_type_mapper()`, the `SchemeType` enum,
-  and the `scheme_type_mapper()` method on `url::UrlParser` instances have been removed.
-  `SchemeType` had a method for getting the `default_port()`;
-  to replicate this functionality, use the method `port_or_known_default()` on `url::Url` instances.
-  The `port_or_default()` method on `url::Url` instances has been removed;
-  use `port_or_known_default()` instead.
-
-    Before upgrading:
-
-    ```rust
-    let port = match whatwg_scheme_type_mapper(&url.scheme) {
-        SchemeType::Relative(port) => port,
-        _ => return Err(format!("Invalid special scheme: `{}`",
-                                raw_url.scheme)),
-    };
-    ```
-
-    After upgrading:
-
-    ```rust
-    let port = match url.port_or_known_default() {
-        Some(port) => port,
-        _ => return Err(format!("Invalid special scheme: `{}`",
-                                url.scheme())),
-    };
-    ```
-
-* The following formatting utilities have been removed without replacement;
-  look at their linked previous implementations
-  if you would like to replicate the functionality in your code:
-  * [`url::format::PathFormatter`](https://github.com/servo/rust-url/pull/176/commits/9e759f18726c8e1343162922b87163d4dd08fe3c#diff-0bb16ac13b75e9b568fa4aff61b0e71dL24)
-  * [`url::format::UserInfoFormatter`](https://github.com/servo/rust-url/pull/176/commits/9e759f18726c8e1343162922b87163d4dd08fe3c#diff-0bb16ac13b75e9b568fa4aff61b0e71dL50)
-  * [`url::format::UrlNoFragmentFormatter`](https://github.com/servo/rust-url/pull/176/commits/9e759f18726c8e1343162922b87163d4dd08fe3c#diff-0bb16ac13b75e9b568fa4aff61b0e71dL70)
-
-* `url::percent_encoding::percent_decode()` used to have a return type of `Vec<u8>`;
-  now it returns an iterator of decoded `u8` bytes that also implements `Into<Cow<u8>>`.
-  Use `.into().to_owned()` to obtain a `Vec<u8>`.
-  (`.collect()` also works but might not be as efficient.)
-
-* The `url::percent_encoding::EncodeSet` struct and constant instances
-  used with `url::percent_encoding::percent_encode()`
-  have been changed to structs that implement the trait `url::percent_encoding::EncodeSet`.
-  * `SIMPLE_ENCODE_SET`, `QUERY_ENCODE_SET`, `DEFAULT_ENCODE_SET`,
-    and `USERINFO_ENCODE_SET` have the same behavior.
-  * `USERNAME_ENCODE_SET` and `PASSWORD_ENCODE_SET` have been removed;
-    use `USERINFO_ENCODE_SET` instead.
-  * `HTTP_VALUE_ENCODE_SET` has been removed;
-    an implementation of it in the new types can be found [in hyper's source](
-    https://github.com/hyperium/hyper/blob/67436c5bf615cf5a55a71e32b788afef5985570e/src/header/parsing.rs#L131-L138)
-    if you need to replicate this functionality in your code.
-  * `FORM_URLENCODED_ENCODE_SET` has been removed;
-    instead, use the functionality in `url::form_urlencoded`.
-  * `PATH_SEGMENT_ENCODE_SET` has been added for use on '/'-separated path segments.
-
-* `url::percent_encoding::percent_decode_to()` has been removed.
-  Use `url::percent_encoding::percent_decode()` which returns an iterator.
-  You can then use the iterator’s `collect()` method
-  or give it to some data structure’s `extend()` method.
-* A number of `ParseError` variants have changed.
-  [See the documentation for the current set](http://servo.github.io/rust-url/url/enum.ParseError.html).
-* `url::OpaqueOrigin::new()` and `url::Origin::UID(OpaqueOrigin)`
-  have been replaced by `url::Origin::new_opaque()` and `url::Origin::Opaque(OpaqueOrigin)`, respectively.
deleted file mode 100644
--- a/third_party/rust/url-1.5.1/appveyor.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-install:
-  - ps: Start-FileDownload 'https://static.rust-lang.org/dist/rust-nightly-i686-pc-windows-gnu.exe'
-  - rust-nightly-i686-pc-windows-gnu.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
-  - SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin
-  - rustc -V
-  - cargo -V
-  - git submodule update --init --recursive
-
-build: false
-
-test_script:
-  - cargo build
-  - cargo test --verbose
deleted file mode 100644
deleted file mode 100644
--- a/third_party/rust/url-1.5.1/docs/404.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<meta http-equiv="refresh" content="0; url=https://docs.rs/url/">
-<link rel="canonical" href="https://docs.rs/url/">
-<a href="https://docs.rs/url/">Moved to docs.rs</a>
deleted file mode 100644
--- a/third_party/rust/url-1.5.1/docs/index.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<meta http-equiv="refresh" content="0; url=https://docs.rs/url/">
-<link rel="canonical" href="https://docs.rs/url/">
-<a href="https://docs.rs/url/">Moved to docs.rs</a>
deleted file mode 100644
index b2c327097e33667628759b5b8194cbe364f471fc..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/third_party/rust/url-1.5.1/rust-url-todo
+++ /dev/null
@@ -1,14 +0,0 @@
-* standalone path parsing?
-* Test setters
-  * Test trim C0/space
-  * Test remove tab & newline
-
-
-
-#[test]
-fn test_path_segments() {
-    let mut url = Url::parse("http://example.net").unwrap();
-    url.push_path_segment("foo").unwrap();
-    url.extend_path_segments(&["bar", "b/az"]).unwrap();
-    assert_eq!(url.as_str(), "http://example.net/foo");
-}
deleted file mode 100644
--- a/third_party/rust/url-1.5.1/src/encoding.rs
+++ /dev/null
@@ -1,146 +0,0 @@
-// Copyright 2013-2014 The rust-url developers.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-
-//! Abstraction that conditionally compiles either to rust-encoding,
-//! or to only support UTF-8.
-
-#[cfg(feature = "query_encoding")] extern crate encoding;
-
-use std::borrow::Cow;
-#[cfg(feature = "query_encoding")] use std::fmt::{self, Debug, Formatter};
-
-#[cfg(feature = "query_encoding")] use self::encoding::types::{DecoderTrap, EncoderTrap};
-#[cfg(feature = "query_encoding")] use self::encoding::label::encoding_from_whatwg_label;
-#[cfg(feature = "query_encoding")] pub use self::encoding::types::EncodingRef;
-
-#[cfg(feature = "query_encoding")]
-#[derive(Copy, Clone)]
-pub struct EncodingOverride {
-    /// `None` means UTF-8.
-    encoding: Option<EncodingRef>
-}
-
-#[cfg(feature = "query_encoding")]
-impl EncodingOverride {
-    pub fn from_opt_encoding(encoding: Option<EncodingRef>) -> Self {
-        encoding.map(Self::from_encoding).unwrap_or_else(Self::utf8)
-    }
-
-    pub fn from_encoding(encoding: EncodingRef) -> Self {
-        EncodingOverride {
-            encoding: if encoding.name() == "utf-8" { None } else { Some(encoding) }
-        }
-    }
-
-    #[inline]
-    pub fn utf8() -> Self {
-        EncodingOverride { encoding: None }
-    }
-
-    pub fn lookup(label: &[u8]) -> Option<Self> {
-        // Don't use String::from_utf8_lossy since no encoding label contains U+FFFD
-        // https://encoding.spec.whatwg.org/#names-and-labels
-        ::std::str::from_utf8(label)
-        .ok()
-        .and_then(encoding_from_whatwg_label)
-        .map(Self::from_encoding)
-    }
-
-    /// https://encoding.spec.whatwg.org/#get-an-output-encoding
-    pub fn to_output_encoding(self) -> Self {
-        if let Some(encoding) = self.encoding {
-            if matches!(encoding.name(), "utf-16le" | "utf-16be") {
-                return Self::utf8()
-            }
-        }
-        self
-    }
-
-    pub fn is_utf8(&self) -> bool {
-        self.encoding.is_none()
-    }
-
-    pub fn name(&self) -> &'static str {
-        match self.encoding {
-            Some(encoding) => encoding.name(),
-            None => "utf-8",
-        }
-    }
-
-    pub fn decode<'a>(&self, input: Cow<'a, [u8]>) -> Cow<'a, str> {
-        match self.encoding {
-            // `encoding.decode` never returns `Err` when called with `DecoderTrap::Replace`
-            Some(encoding) => encoding.decode(&input, DecoderTrap::Replace).unwrap().into(),
-            None => decode_utf8_lossy(input),
-        }
-    }
-
-    pub fn encode<'a>(&self, input: Cow<'a, str>) -> Cow<'a, [u8]> {
-        match self.encoding {
-            // `encoding.encode` never returns `Err` when called with `EncoderTrap::NcrEscape`
-            Some(encoding) => Cow::Owned(encoding.encode(&input, EncoderTrap::NcrEscape).unwrap()),
-            None => encode_utf8(input)
-        }
-    }
-}
-
-#[cfg(feature = "query_encoding")]
-impl Debug for EncodingOverride {
-    fn fmt(&self, f: &mut Formatter) -> fmt::Result {
-        write!(f, "EncodingOverride {{ encoding: ")?;
-        match self.encoding {
-            Some(e) => write!(f, "{} }}", e.name()),
-            None => write!(f, "None }}")
-        }
-    }
-}
-
-#[cfg(not(feature = "query_encoding"))]
-#[derive(Copy, Clone, Debug)]
-pub struct EncodingOverride;
-
-#[cfg(not(feature = "query_encoding"))]
-impl EncodingOverride {
-    #[inline]
-    pub fn utf8() -> Self {
-        EncodingOverride
-    }
-
-    pub fn decode<'a>(&self, input: Cow<'a, [u8]>) -> Cow<'a, str> {
-        decode_utf8_lossy(input)
-    }
-
-    pub fn encode<'a>(&self, input: Cow<'a, str>) -> Cow<'a, [u8]> {
-        encode_utf8(input)
-    }
-}
-
-pub fn decode_utf8_lossy(input: Cow<[u8]>) -> Cow<str> {
-    match input {
-        Cow::Borrowed(bytes) => String::from_utf8_lossy(bytes),
-        Cow::Owned(bytes) => {
-            let raw_utf8: *const [u8];
-            match String::from_utf8_lossy(&bytes) {
-                Cow::Borrowed(utf8) => raw_utf8 = utf8.as_bytes(),
-                Cow::Owned(s) => return s.into(),
-            }
-            // from_utf8_lossy returned a borrow of `bytes` unchanged.
-            debug_assert!(raw_utf8 == &*bytes as *const [u8]);
-            // Reuse the existing `Vec` allocation.
-            unsafe { String::from_utf8_unchecked(bytes) }.into()
-        }
-    }
-}
-
-pub fn encode_utf8(input: Cow<str>) -> Cow<[u8]> {
-    match input {
-        Cow::Borrowed(s) => Cow::Borrowed(s.as_bytes()),
-        Cow::Owned(s) => Cow::Owned(s.into_bytes())
-    }
-}
deleted file mode 100644
--- a/third_party/rust/url-1.5.1/src/form_urlencoded.rs
+++ /dev/null
@@ -1,369 +0,0 @@
-// Copyright 2013-2016 The rust-url developers.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! Parser and serializer for the [`application/x-www-form-urlencoded` syntax](
-//! http://url.spec.whatwg.org/#application/x-www-form-urlencoded),
-//! as used by HTML forms.
-//!
-//! Converts between a string (such as an URL’s query string)
-//! and a sequence of (name, value) pairs.
-
-use encoding::EncodingOverride;
-use percent_encoding::{percent_encode_byte, percent_decode};
-use std::borrow::{Borrow, Cow};
-use std::str;
-
-
-/// Convert a byte string in the `application/x-www-form-urlencoded` syntax
-/// into a iterator of (name, value) pairs.
-///
-/// Use `parse(input.as_bytes())` to parse a `&str` string.
-///
-/// The names and values are percent-decoded. For instance, `%23first=%25try%25` will be
-/// converted to `[("#first", "%try%")]`.
-#[inline]
-pub fn parse(input: &[u8]) -> Parse {
-    Parse {
-        input: input,
-        encoding: EncodingOverride::utf8(),
-    }
-}
-
-
-/// Convert a byte string in the `application/x-www-form-urlencoded` syntax
-/// into a iterator of (name, value) pairs.
-///
-/// Use `parse(input.as_bytes())` to parse a `&str` string.
-///
-/// This function is only available if the `query_encoding`
-/// [feature](http://doc.crates.io/manifest.html#the-features-section]) is enabled.
-///
-/// Arguments:
-///
-/// * `encoding_override`: The character encoding each name and values is decoded as
-///    after percent-decoding. Defaults to UTF-8.
-///    `EncodingRef` is defined in [rust-encoding](https://github.com/lifthrasiir/rust-encoding).
-/// * `use_charset`: The *use _charset_ flag*. If in doubt, set to `false`.
-#[cfg(feature = "query_encoding")]
-pub fn parse_with_encoding<'a>(input: &'a [u8],
-                               encoding_override: Option<::encoding::EncodingRef>,
-                               use_charset: bool)
-                               -> Result<Parse<'a>, ()> {
-    use std::ascii::AsciiExt;
-
-    let mut encoding = EncodingOverride::from_opt_encoding(encoding_override);
-    if !(encoding.is_utf8() || input.is_ascii()) {
-        return Err(())
-    }
-    if use_charset {
-        for sequence in input.split(|&b| b == b'&') {
-            // No '+' in "_charset_" to replace with ' '.
-            if sequence.starts_with(b"_charset_=") {
-                let value = &sequence[b"_charset_=".len()..];
-                // Skip replacing '+' with ' ' in value since no encoding label contains either:
-                // https://encoding.spec.whatwg.org/#names-and-labels
-                if let Some(e) = EncodingOverride::lookup(value) {
-                    encoding = e;
-                    break
-                }
-            }
-        }
-    }
-    Ok(Parse {
-        input: input,
-        encoding: encoding,
-    })
-}
-
-/// The return type of `parse()`.
-#[derive(Copy, Clone, Debug)]
-pub struct Parse<'a> {
-    input: &'a [u8],
-    encoding: EncodingOverride,
-}
-
-impl<'a> Iterator for Parse<'a> {
-    type Item = (Cow<'a, str>, Cow<'a, str>);
-
-    fn next(&mut self) -> Option<Self::Item> {
-        loop {
-            if self.input.is_empty() {
-                return None
-            }
-            let mut split2 = self.input.splitn(2, |&b| b == b'&');
-            let sequence = split2.next().unwrap();
-            self.input = split2.next().unwrap_or(&[][..]);
-            if sequence.is_empty() {
-                continue
-            }
-            let mut split2 = sequence.splitn(2, |&b| b == b'=');
-            let name = split2.next().unwrap();
-            let value = split2.next().unwrap_or(&[][..]);
-            return Some((
-                decode(name, self.encoding),
-                decode(value, self.encoding),
-            ))
-        }
-    }
-}
-
-fn decode(input: &[u8], encoding: EncodingOverride) -> Cow<str> {
-    let replaced = replace_plus(input);
-    encoding.decode(match percent_decode(&replaced).if_any() {
-        Some(vec) => Cow::Owned(vec),
-        None => replaced,
-    })
-}
-
-/// Replace b'+' with b' '
-fn replace_plus(input: &[u8]) -> Cow<[u8]> {
-    match input.iter().position(|&b| b == b'+') {
-        None => Cow::Borrowed(input),
-        Some(first_position) => {
-            let mut replaced = input.to_owned();
-            replaced[first_position] = b' ';
-            for byte in &mut replaced[first_position + 1..] {
-                if *byte == b'+' {
-                    *byte = b' ';
-                }
-            }
-            Cow::Owned(replaced)
-        }
-    }
-}
-
-impl<'a> Parse<'a> {
-    /// Return a new iterator that yields pairs of `String` instead of pairs of `Cow<str>`.
-    pub fn into_owned(self) -> ParseIntoOwned<'a> {
-        ParseIntoOwned { inner: self }
-    }
-}
-
-/// Like `Parse`, but yields pairs of `String` instead of pairs of `Cow<str>`.
-#[derive(Debug)]
-pub struct ParseIntoOwned<'a> {
-    inner: Parse<'a>
-}
-
-impl<'a> Iterator for ParseIntoOwned<'a> {
-    type Item = (String, String);
-
-    fn next(&mut self) -> Option<Self::Item> {
-        self.inner.next().map(|(k, v)| (k.into_owned(), v.into_owned()))
-    }
-}
-
-/// The [`application/x-www-form-urlencoded` byte serializer](
-/// https://url.spec.whatwg.org/#concept-urlencoded-byte-serializer).
-///
-/// Return an iterator of `&str` slices.
-pub fn byte_serialize(input: &[u8]) -> ByteSerialize {
-    ByteSerialize {
-        bytes: input,
-    }
-}
-
-/// Return value of `byte_serialize()`.
-#[derive(Debug)]
-pub struct ByteSerialize<'a> {
-    bytes: &'a [u8],
-}
-
-fn byte_serialized_unchanged(byte: u8) -> bool {
-    matches!(byte, b'*' | b'-' | b'.' | b'0' ... b'9' | b'A' ... b'Z' | b'_' | b'a' ... b'z')
-}
-
-impl<'a> Iterator for ByteSerialize<'a> {
-    type Item = &'a str;
-
-    fn next(&mut self) -> Option<&'a str> {
-        if let Some((&first, tail)) = self.bytes.split_first() {
-            if !byte_serialized_unchanged(first) {
-                self.bytes = tail;
-                return Some(if first == b' ' { "+" } else { percent_encode_byte(first) })
-            }
-            let position = tail.iter().position(|&b| !byte_serialized_unchanged(b));
-            let (unchanged_slice, remaining) = match position {
-                // 1 for first_byte + i unchanged in tail
-                Some(i) => self.bytes.split_at(1 + i),
-                None => (self.bytes, &[][..]),
-            };
-            self.bytes = remaining;
-            Some(unsafe { str::from_utf8_unchecked(unchanged_slice) })
-        } else {
-            None
-        }
-    }
-
-    fn size_hint(&self) -> (usize, Option<usize>) {
-        if self.bytes.is_empty() {
-            (0, Some(0))
-        } else {
-            (1, Some(self.bytes.len()))
-        }
-    }
-}
-
-/// The [`application/x-www-form-urlencoded` serializer](
-/// https://url.spec.whatwg.org/#concept-urlencoded-serializer).
-#[derive(Debug)]
-pub struct Serializer<T: Target> {
-    target: Option<T>,
-    start_position: usize,
-    encoding: EncodingOverride,
-}
-
-pub trait Target {
-    fn as_mut_string(&mut self) -> &mut String;
-    fn finish(self) -> Self::Finished;
-    type Finished;
-}
-
-impl Target for String {
-    fn as_mut_string(&mut self) -> &mut String { self }
-    fn finish(self) -> Self { self }
-    type Finished = Self;
-}
-
-impl<'a> Target for &'a mut String {
-    fn as_mut_string(&mut self) -> &mut String { &mut **self }
-    fn finish(self) -> Self { self }
-    type Finished = Self;
-}
-
-// `as_mut_string` string here exposes the internal serialization of an `Url`,
-// which should not be exposed to users.
-// We achieve that by not giving users direct access to `UrlQuery`:
-// * Its fields are private
-//   (and so can not be constructed with struct literal syntax outside of this crate),
-// * It has no constructor
-// * It is only visible (on the type level) to users in the return type of
-//   `Url::query_pairs_mut` which is `Serializer<UrlQuery>`
-// * `Serializer` keeps its target in a private field
-// * Unlike in other `Target` impls, `UrlQuery::finished` does not return `Self`.
-impl<'a> Target for ::UrlQuery<'a> {
-    fn as_mut_string(&mut self) -> &mut String { &mut self.url.serialization }
-    fn finish(self) -> &'a mut ::Url { self.url }
-    type Finished = &'a mut ::Url;
-}
-
-impl<T: Target> Serializer<T> {
-    /// Create a new `application/x-www-form-urlencoded` serializer for the given target.
-    ///
-    /// If the target is non-empty,
-    /// its content is assumed to already be in `application/x-www-form-urlencoded` syntax.
-    pub fn new(target: T) -> Self {
-        Self::for_suffix(target, 0)
-    }
-
-    /// Create a new `application/x-www-form-urlencoded` serializer
-    /// for a suffix of the given target.
-    ///
-    /// If that suffix is non-empty,
-    /// its content is assumed to already be in `application/x-www-form-urlencoded` syntax.
-    pub fn for_suffix(mut target: T, start_position: usize) -> Self {
-        &target.as_mut_string()[start_position..];  // Panic if out of bounds
-        Serializer {
-            target: Some(target),
-            start_position: start_position,
-            encoding: EncodingOverride::utf8(),
-        }
-    }
-
-    /// Remove any existing name/value pair.
-    ///
-    /// Panics if called after `.finish()`.
-    pub fn clear(&mut self) -> &mut Self {
-        string(&mut self.target).truncate(self.start_position);
-        self
-    }
-
-    /// Set the character encoding to be used for names and values before percent-encoding.
-    #[cfg(feature = "query_encoding")]
-    pub fn encoding_override(&mut self, new: Option<::encoding::EncodingRef>) -> &mut Self {
-        self.encoding = EncodingOverride::from_opt_encoding(new).to_output_encoding();
-        self
-    }
-
-    /// Serialize and append a name/value pair.
-    ///
-    /// Panics if called after `.finish()`.
-    pub fn append_pair(&mut self, name: &str, value: &str) -> &mut Self {
-        append_pair(string(&mut self.target), self.start_position, self.encoding, name, value);
-        self
-    }
-
-    /// Serialize and append a number of name/value pairs.
-    ///
-    /// This simply calls `append_pair` repeatedly.
-    /// This can be more convenient, so the user doesn’t need to introduce a block
-    /// to limit the scope of `Serializer`’s borrow of its string.
-    ///
-    /// Panics if called after `.finish()`.
-    pub fn extend_pairs<I, K, V>(&mut self, iter: I) -> &mut Self
-    where I: IntoIterator, I::Item: Borrow<(K, V)>, K: AsRef<str>, V: AsRef<str> {
-        {
-            let string = string(&mut self.target);
-            for pair in iter {
-                let &(ref k, ref v) = pair.borrow();
-                append_pair(string, self.start_position, self.encoding, k.as_ref(), v.as_ref());
-            }
-        }
-        self
-    }
-
-    /// Add a name/value pair whose name is `_charset_`
-    /// and whose value is the character encoding’s name.
-    /// (See the `encoding_override()` method.)
-    ///
-    /// Panics if called after `.finish()`.
-    #[cfg(feature = "query_encoding")]
-    pub fn append_charset(&mut self) -> &mut Self {
-        {
-            let string = string(&mut self.target);
-            append_separator_if_needed(string, self.start_position);
-            string.push_str("_charset_=");
-            string.push_str(self.encoding.name());
-        }
-        self
-    }
-
-    /// If this serializer was constructed with a string, take and return that string.
-    ///
-    /// ```rust
-    /// use url::form_urlencoded;
-    /// let encoded: String = form_urlencoded::Serializer::new(String::new())
-    ///     .append_pair("foo", "bar & baz")
-    ///     .append_pair("saison", "Été+hiver")
-    ///     .finish();
-    /// assert_eq!(encoded, "foo=bar+%26+baz&saison=%C3%89t%C3%A9%2Bhiver");
-    /// ```
-    ///
-    /// Panics if called more than once.
-    pub fn finish(&mut self) -> T::Finished {
-        self.target.take().expect("url::form_urlencoded::Serializer double finish").finish()
-    }
-}
-
-fn append_separator_if_needed(string: &mut String, start_position: usize) {
-    if string.len() > start_position {
-        string.push('&')
-    }
-}
-
-fn string<T: Target>(target: &mut Option<T>) -> &mut String {
-    target.as_mut().expect("url::form_urlencoded::Serializer finished").as_mut_string()
-}
-
-fn append_pair(string: &mut String, start_position: usize, encoding: EncodingOverride,
-               name: &str, value: &str) {
-    append_separator_if_needed(string, start_position);
-    string.extend(byte_serialize(&encoding.encode(name.into())));
-    string.push('=');
-    string.extend(byte_serialize(&encoding.encode(value.into())));
-}
deleted file mode 100644
--- a/third_party/rust/url-1.5.1/src/host.rs
+++ /dev/null
@@ -1,502 +0,0 @@
-// Copyright 2013-2016 The rust-url developers.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#[cfg(feature = "heapsize")] use heapsize::HeapSizeOf;
-use std::cmp;
-use std::fmt::{self, Formatter};
-use std::io;
-use std::net::{Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6, ToSocketAddrs};
-use std::vec;
-use parser::{ParseResult, ParseError};
-use percent_encoding::percent_decode;
-use idna;
-
-#[derive(Copy, Clone, Debug, Eq, PartialEq)]
-pub enum HostInternal {
-    None,
-    Domain,
-    Ipv4(Ipv4Addr),
-    Ipv6(Ipv6Addr),
-}
-
-#[cfg(feature = "heapsize")]
-known_heap_size!(0, HostInternal);
-
-#[cfg(feature="serde")]
-impl ::serde::Serialize for HostInternal {
-    fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error> where S: ::serde::Serializer {
-        // This doesn’t use `derive` because that involves
-        // large dependencies (that take a long time to build), and
-        // either Macros 1.1 which are not stable yet or a cumbersome build script.
-        //
-        // Implementing `Serializer` correctly for an enum is tricky,
-        // so let’s use existing enums that already do.
-        use std::net::IpAddr;
-        match *self {
-            HostInternal::None => None,
-            HostInternal::Domain => Some(None),
-            HostInternal::Ipv4(addr) => Some(Some(IpAddr::V4(addr))),
-            HostInternal::Ipv6(addr) => Some(Some(IpAddr::V6(addr))),
-        }.serialize(serializer)
-    }
-}
-
-#[cfg(feature="serde")]
-impl ::serde::Deserialize for HostInternal {
-    fn deserialize<D>(deserializer: &mut D) -> Result<Self, D::Error> where D: ::serde::Deserializer {
-        use std::net::IpAddr;
-        Ok(match ::serde::Deserialize::deserialize(deserializer)? {
-            None => HostInternal::None,
-            Some(None) => HostInternal::Domain,
-            Some(Some(IpAddr::V4(addr))) => HostInternal::Ipv4(addr),
-            Some(Some(IpAddr::V6(addr))) => HostInternal::Ipv6(addr),
-        })
-    }
-}
-
-impl<S> From<Host<S>> for HostInternal {
-    fn from(host: Host<S>) -> HostInternal {
-        match host {
-            Host::Domain(_) => HostInternal::Domain,
-            Host::Ipv4(address) => HostInternal::Ipv4(address),
-            Host::Ipv6(address) => HostInternal::Ipv6(address),
-        }
-    }
-}
-
-/// The host name of an URL.
-#[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
-pub enum Host<S=String> {
-    /// A DNS domain name, as '.' dot-separated labels.
-    /// Non-ASCII labels are encoded in punycode per IDNA.
-    Domain(S),
-
-    /// An IPv4 address.
-    /// `Url::host_str` returns the serialization of this address,
-    /// as four decimal integers separated by `.` dots.
-    Ipv4(Ipv4Addr),
-
-    /// An IPv6 address.
-    /// `Url::host_str` returns the serialization of that address between `[` and `]` brackets,
-    /// in the format per [RFC 5952 *A Recommendation
-    /// for IPv6 Address Text Representation*](https://tools.ietf.org/html/rfc5952):
-    /// lowercase hexadecimal with maximal `::` compression.
-    Ipv6(Ipv6Addr),
-}
-
-#[cfg(feature="serde")]
-impl<S: ::serde::Serialize>  ::serde::Serialize for Host<S> {
-    fn serialize<R>(&self, serializer: &mut R) -> Result<(), R::Error> where R: ::serde::Serializer {
-        use std::net::IpAddr;
-        match *self {
-            Host::Domain(ref s) => Ok(s),
-            Host::Ipv4(addr) => Err(IpAddr::V4(addr)),
-            Host::Ipv6(addr) => Err(IpAddr::V6(addr)),
-        }.serialize(serializer)
-    }
-}
-
-#[cfg(feature="serde")]
-impl<S: ::serde::Deserialize> ::serde::Deserialize for Host<S> {
-    fn deserialize<D>(deserializer: &mut D) -> Result<Self, D::Error> where D: ::serde::Deserializer {
-        use std::net::IpAddr;
-        Ok(match ::serde::Deserialize::deserialize(deserializer)? {
-            Ok(s) => Host::Domain(s),
-            Err(IpAddr::V4(addr)) => Host::Ipv4(addr),
-            Err(IpAddr::V6(addr)) => Host::Ipv6(addr),
-        })
-    }
-}
-
-#[cfg(feature = "heapsize")]
-impl<S: HeapSizeOf> HeapSizeOf for Host<S> {
-    fn heap_size_of_children(&self) -> usize {
-        match *self {
-            Host::Domain(ref s) => s.heap_size_of_children(),
-            _ => 0,
-        }
-    }
-}
-
-impl<'a> Host<&'a str> {
-    /// Return a copy of `self` that owns an allocated `String` but does not borrow an `&Url`.
-    pub fn to_owned(&self) -> Host<String> {
-        match *self {
-            Host::Domain(domain) => Host::Domain(domain.to_owned()),
-            Host::Ipv4(address) => Host::Ipv4(address),
-            Host::Ipv6(address) => Host::Ipv6(address),
-        }
-    }
-}
-
-impl Host<String> {
-    /// Parse a host: either an IPv6 address in [] square brackets, or a domain.
-    ///
-    /// https://url.spec.whatwg.org/#host-parsing
-    pub fn parse(input: &str) -> Result<Self, ParseError> {
-        if input.starts_with('[') {
-            if !input.ends_with(']') {
-                return Err(ParseError::InvalidIpv6Address)
-            }
-            return parse_ipv6addr(&input[1..input.len() - 1]).map(Host::Ipv6)
-        }
-        let domain = percent_decode(input.as_bytes()).decode_utf8_lossy();
-        let domain = idna::domain_to_ascii(&domain)?;
-        if domain.find(|c| matches!(c,
-            '\0' | '\t' | '\n' | '\r' | ' ' | '#' | '%' | '/' | ':' | '?' | '@' | '[' | '\\' | ']'
-        )).is_some() {
-            return Err(ParseError::InvalidDomainCharacter)
-        }
-        if let Some(address) = parse_ipv4addr(&domain)? {
-            Ok(Host::Ipv4(address))
-        } else {
-            Ok(Host::Domain(domain.into()))
-        }
-    }
-}
-
-impl<S: AsRef<str>> fmt::Display for Host<S> {
-    fn fmt(&self, f: &mut Formatter) -> fmt::Result {
-        match *self {
-            Host::Domain(ref domain) => domain.as_ref().fmt(f),
-            Host::Ipv4(ref addr) => addr.fmt(f),
-            Host::Ipv6(ref addr) => {
-                f.write_str("[")?;
-                write_ipv6(addr, f)?;
-                f.write_str("]")
-            }
-        }
-    }
-}
-
-/// This mostly exists because coherence rules don’t allow us to implement
-/// `ToSocketAddrs for (Host<S>, u16)`.
-#[derive(Clone, Debug)]
-pub struct HostAndPort<S=String> {
-    pub host: Host<S>,
-    pub port: u16,
-}
-
-impl<'a> HostAndPort<&'a str> {
-    /// Return a copy of `self` that owns an allocated `String` but does not borrow an `&Url`.
-    pub fn to_owned(&self) -> HostAndPort<String> {
-        HostAndPort {
-            host: self.host.to_owned(),
-            port: self.port
-        }
-    }
-}
-
-impl<S: AsRef<str>> fmt::Display for HostAndPort<S> {
-    fn fmt(&self, f: &mut Formatter) -> fmt::Result {
-        self.host.fmt(f)?;
-        f.write_str(":")?;
-        self.port.fmt(f)
-    }
-}
-
-
-impl<S: AsRef<str>> ToSocketAddrs for HostAndPort<S> {
-    type Iter = SocketAddrs;
-
-    fn to_socket_addrs(&self) -> io::Result<Self::Iter> {
-        let port = self.port;
-        match self.host {
-            Host::Domain(ref domain) => Ok(SocketAddrs {
-                // FIXME: use std::net::lookup_host when it’s stable.
-                state: SocketAddrsState::Domain((domain.as_ref(), port).to_socket_addrs()?)
-            }),
-            Host::Ipv4(address) => Ok(SocketAddrs {
-                state: SocketAddrsState::One(SocketAddr::V4(SocketAddrV4::new(address, port)))
-            }),
-            Host::Ipv6(address) => Ok(SocketAddrs {
-                state: SocketAddrsState::One(SocketAddr::V6(SocketAddrV6::new(address, port, 0, 0)))
-            }),
-        }
-    }
-}
-
-/// Socket addresses for an URL.
-#[derive(Debug)]
-pub struct SocketAddrs {
-    state: SocketAddrsState
-}
-
-#[derive(Debug)]
-enum SocketAddrsState {
-    Domain(vec::IntoIter<SocketAddr>),
-    One(SocketAddr),
-    Done,
-}
-
-impl Iterator for SocketAddrs {
-    type Item = SocketAddr;
-    fn next(&mut self) -> Option<SocketAddr> {
-        match self.state {
-            SocketAddrsState::Domain(ref mut iter) => iter.next(),
-            SocketAddrsState::One(s) => {
-                self.state = SocketAddrsState::Done;
-                Some(s)
-            }
-            SocketAddrsState::Done => None
-        }
-    }
-}
-
-fn write_ipv6(addr: &Ipv6Addr, f: &mut Formatter) -> fmt::Result {
-    let segments = addr.segments();
-    let (compress_start, compress_end) = longest_zero_sequence(&segments);
-    let mut i = 0;
-    while i < 8 {
-        if i == compress_start {
-            f.write_str(":")?;
-            if i == 0 {
-                f.write_str(":")?;
-            }
-            if compress_end < 8 {
-                i = compress_end;
-            } else {
-                break;
-            }
-        }
-        write!(f, "{:x}", segments[i as usize])?;
-        if i < 7 {
-            f.write_str(":")?;
-        }
-        i += 1;
-    }
-    Ok(())
-}
-
-// https://url.spec.whatwg.org/#concept-ipv6-serializer step 2 and 3
-fn longest_zero_sequence(pieces: &[u16; 8]) -> (isize, isize) {
-    let mut longest = -1;
-    let mut longest_length = -1;
-    let mut start = -1;
-    macro_rules! finish_sequence(
-        ($end: expr) => {
-            if start >= 0 {
-                let length = $end - start;
-                if length > longest_length {
-                    longest = start;
-                    longest_length = length;
-                }
-            }
-        };
-    );
-    for i in 0..8 {
-        if pieces[i as usize] == 0 {
-            if start < 0 {
-                start = i;
-            }
-        } else {
-            finish_sequence!(i);
-            start = -1;
-        }
-    }
-    finish_sequence!(8);
-    // https://url.spec.whatwg.org/#concept-ipv6-serializer
-    // step 3: ignore lone zeroes
-    if longest_length < 2 {
-        (-1, -2)
-    } else {
-        (longest, longest + longest_length)
-    }
-}
-
-/// https://url.spec.whatwg.org/#ipv4-number-parser
-fn parse_ipv4number(mut input: &str) -> Result<u32, ()> {
-    let mut r = 10;
-    if input.starts_with("0x") || input.starts_with("0X") {
-        input = &input[2..];
-        r = 16;
-    } else if input.len() >= 2 && input.starts_with('0') {
-        input = &input[1..];
-        r = 8;
-    }
-    if input.is_empty() {
-        return Ok(0);
-    }
-    if input.starts_with('+') {
-        return Err(())
-    }
-    match u32::from_str_radix(input, r) {
-        Ok(number) => Ok(number),
-        Err(_) => Err(()),
-    }
-}
-
-/// https://url.spec.whatwg.org/#concept-ipv4-parser
-fn parse_ipv4addr(input: &str) -> ParseResult<Option<Ipv4Addr>> {
-    if input.is_empty() {
-        return Ok(None)
-    }
-    let mut parts: Vec<&str> = input.split('.').collect();
-    if parts.last() == Some(&"") {
-        parts.pop();
-    }
-    if parts.len() > 4 {
-        return Ok(None);
-    }
-    let mut numbers: Vec<u32> = Vec::new();
-    for part in parts {
-        if part == "" {
-            return Ok(None);
-        }
-        if let Ok(n) = parse_ipv4number(part) {
-            numbers.push(n);
-        } else {
-            return Ok(None);
-        }
-    }
-    let mut ipv4 = numbers.pop().expect("a non-empty list of numbers");
-    // Equivalent to: ipv4 >= 256 ** (4 − numbers.len())
-    if ipv4 > u32::max_value() >> (8 * numbers.len() as u32)  {
-        return Err(ParseError::InvalidIpv4Address);
-    }
-    if numbers.iter().any(|x| *x > 255) {
-        return Err(ParseError::InvalidIpv4Address);
-    }
-    for (counter, n) in numbers.iter().enumerate() {
-        ipv4 += n << (8 * (3 - counter as u32))
-    }
-    Ok(Some(Ipv4Addr::from(ipv4)))
-}
-
-/// https://url.spec.whatwg.org/#concept-ipv6-parser
-fn parse_ipv6addr(input: &str) -> ParseResult<Ipv6Addr> {
-    let input = input.as_bytes();
-    let len = input.len();
-    let mut is_ip_v4 = false;
-    let mut pieces = [0, 0, 0, 0, 0, 0, 0, 0];
-    let mut piece_pointer = 0;
-    let mut compress_pointer = None;
-    let mut i = 0;
-
-    if len < 2 {
-        return Err(ParseError::InvalidIpv6Address)
-    }
-
-    if input[0] == b':' {
-        if input[1] != b':' {
-            return Err(ParseError::InvalidIpv6Address)
-        }
-        i = 2;
-        piece_pointer = 1;
-        compress_pointer = Some(1);
-    }
-
-    while i < len {
-        if piece_pointer == 8 {
-            return Err(ParseError::InvalidIpv6Address)
-        }
-        if input[i] == b':' {
-            if compress_pointer.is_some() {
-                return Err(ParseError::InvalidIpv6Address)
-            }
-            i += 1;
-            piece_pointer += 1;
-            compress_pointer = Some(piece_pointer);
-            continue
-        }
-        let start = i;
-        let end = cmp::min(len, start + 4);
-        let mut value = 0u16;
-        while i < end {
-            match (input[i] as char).to_digit(16) {
-                Some(digit) => {
-                    value = value * 0x10 + digit as u16;
-                    i += 1;
-                },
-                None => break
-            }
-        }
-        if i < len {
-            match input[i] {
-                b'.' => {
-                    if i == start {
-                        return Err(ParseError::InvalidIpv6Address)
-                    }
-                    i = start;
-                    is_ip_v4 = true;
-                },
-                b':' => {
-                    i += 1;
-                    if i == len {
-                        return Err(ParseError::InvalidIpv6Address)
-                    }
-                },
-                _ => return Err(ParseError::InvalidIpv6Address)
-            }
-        }
-        if is_ip_v4 {
-            break
-        }
-        pieces[piece_pointer] = value;
-        piece_pointer += 1;
-    }
-
-    if is_ip_v4 {
-        if piece_pointer > 6 {
-            return Err(ParseError::InvalidIpv6Address)
-        }
-        let mut dots_seen = 0;
-        while i < len {
-            let mut value = None;
-            while i < len {
-                let digit = match input[i] {
-                    c @ b'0' ... b'9' => c - b'0',
-                    _ => break
-                };
-                match value {
-                    None => value = Some(digit as u16),
-                    Some(0) => return Err(ParseError::InvalidIpv6Address),  // No leading zero
-                    Some(ref mut v) => {
-                        *v = *v * 10 + digit as u16;
-                        if *v > 255 {
-                            return Err(ParseError::InvalidIpv6Address)
-                        }
-                    }
-                }
-                i += 1;
-            }
-            if dots_seen < 3 && !(i < len && input[i] == b'.') {
-                return Err(ParseError::InvalidIpv6Address)
-            }
-            pieces[piece_pointer] = if let Some(v) = value {
-                pieces[piece_pointer] * 0x100 + v
-            } else {
-                return Err(ParseError::InvalidIpv6Address)
-            };
-            if dots_seen == 1 || dots_seen == 3 {
-                piece_pointer += 1;
-            }
-            i += 1;
-            if dots_seen == 3 && i < len {
-                return Err(ParseError::InvalidIpv6Address)
-            }
-            dots_seen += 1;
-        }
-    }
-    match compress_pointer {
-        Some(compress_pointer) => {
-            let mut swaps = piece_pointer - compress_pointer;
-            piece_pointer = 7;
-            while swaps > 0 {
-                pieces.swap(piece_pointer, compress_pointer + swaps - 1);
-                swaps -= 1;
-                piece_pointer -= 1;
-            }
-        }
-        _ => if piece_pointer != 8 {
-            return Err(ParseError::InvalidIpv6Address)
-        }
-    }
-    Ok(Ipv6Addr::new(pieces[0], pieces[1], pieces[2], pieces[3],
-                     pieces[4], pieces[5], pieces[6], pieces[7]))
-}
deleted file mode 100644
--- a/third_party/rust/url-1.5.1/src/lib.rs
+++ /dev/null
@@ -1,2403 +0,0 @@
-// Copyright 2013-2015 The rust-url developers.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-/*!
-
-rust-url is an implementation of the [URL Standard](http://url.spec.whatwg.org/)
-for the [Rust](http://rust-lang.org/) programming language.
-
-
-# URL parsing and data structures
-
-First, URL parsing may fail for various reasons and therefore returns a `Result`.
-
-```
-use url::{Url, ParseError};
-
-assert!(Url::parse("http://[:::1]") == Err(ParseError::InvalidIpv6Address))
-```
-
-Let’s parse a valid URL and look at its components.
-
-```
-use url::{Url, Host};
-# use url::ParseError;
-# fn run() -> Result<(), ParseError> {
-let issue_list_url = Url::parse(
-    "https://github.com/rust-lang/rust/issues?labels=E-easy&state=open"
-)?;
-
-
-assert!(issue_list_url.scheme() == "https");
-assert!(issue_list_url.username() == "");
-assert!(issue_list_url.password() == None);
-assert!(issue_list_url.host_str() == Some("github.com"));
-assert!(issue_list_url.host() == Some(Host::Domain("github.com")));
-assert!(issue_list_url.port() == None);
-assert!(issue_list_url.path() == "/rust-lang/rust/issues");
-assert!(issue_list_url.path_segments().map(|c| c.collect::<Vec<_>>()) ==
-        Some(vec!["rust-lang", "rust", "issues"]));
-assert!(issue_list_url.query() == Some("labels=E-easy&state=open"));
-assert!(issue_list_url.fragment() == None);
-assert!(!issue_list_url.cannot_be_a_base());
-# Ok(())
-# }
-# run().unwrap();
-```
-
-Some URLs are said to be *cannot-be-a-base*:
-they don’t have a username, password, host, or port,
-and their "path" is an arbitrary string rather than slash-separated segments:
-
-```
-use url::Url;
-# use url::ParseError;
-
-# fn run() -> Result<(), ParseError> {
-let data_url = Url::parse("data:text/plain,Hello?World#")?;
-
-assert!(data_url.cannot_be_a_base());
-assert!(data_url.scheme() == "data");
-assert!(data_url.path() == "text/plain,Hello");
-assert!(data_url.path_segments().is_none());
-assert!(data_url.query() == Some("World"));
-assert!(data_url.fragment() == Some(""));
-# Ok(())
-# }
-# run().unwrap();
-```
-
-
-# Base URL
-
-Many contexts allow URL *references* that can be relative to a *base URL*:
-
-```html
-<link rel="stylesheet" href="../main.css">
-```
-
-Since parsed URL are absolute, giving a base is required for parsing relative URLs:
-
-```
-use url::{Url, ParseError};
-
-assert!(Url::parse("../main.css") == Err(ParseError::RelativeUrlWithoutBase))
-```
-
-Use the `join` method on an `Url` to use it as a base URL:
-
-```
-use url::Url;
-# use url::ParseError;
-
-# fn run() -> Result<(), ParseError> {
-let this_document = Url::parse("http://servo.github.io/rust-url/url/index.html")?;
-let css_url = this_document.join("../main.css")?;
-assert_eq!(css_url.as_str(), "http://servo.github.io/rust-url/main.css");
-# Ok(())
-# }
-# run().unwrap();
-*/
-
-#![doc(html_root_url = "https://docs.rs/url/1.5.1")]
-
-#[cfg(feature="rustc-serialize")] extern crate rustc_serialize;
-#[macro_use] extern crate matches;
-#[cfg(feature="serde")] extern crate serde;
-#[cfg(feature="heapsize")] #[macro_use] extern crate heapsize;
-
-pub extern crate idna;
-pub extern crate percent_encoding;
-
-use encoding::EncodingOverride;
-#[cfg(feature = "heapsize")] use heapsize::HeapSizeOf;
-use host::HostInternal;
-use parser::{Parser, Context, SchemeType, to_u32};
-use percent_encoding::{PATH_SEGMENT_ENCODE_SET, USERINFO_ENCODE_SET,
-                       percent_encode, percent_decode, utf8_percent_encode};
-use std::borrow::Borrow;
-use std::cmp;
-#[cfg(feature = "serde")] use std::error::Error;
-use std::fmt::{self, Write, Debug, Formatter};
-use std::hash;
-use std::io;
-use std::mem;
-use std::net::{ToSocketAddrs, IpAddr};
-use std::ops::{Range, RangeFrom, RangeTo};
-use std::path::{Path, PathBuf};
-use std::str;
-
-pub use origin::{Origin, OpaqueOrigin};
-pub use host::{Host, HostAndPort, SocketAddrs};
-pub use path_segments::PathSegmentsMut;
-pub use parser::ParseError;
-pub use slicing::Position;
-
-mod encoding;
-mod host;
-mod origin;
-mod path_segments;
-mod parser;
-mod slicing;
-
-pub mod form_urlencoded;
-#[doc(hidden)] pub mod quirks;
-
-/// A parsed URL record.
-#[derive(Clone)]
-pub struct Url {
-    /// Syntax in pseudo-BNF:
-    ///
-    ///   url = scheme ":" [ hierarchical | non-hierarchical ] [ "?" query ]? [ "#" fragment ]?
-    ///   non-hierarchical = non-hierarchical-path
-    ///   non-hierarchical-path = /* Does not start with "/" */
-    ///   hierarchical = authority? hierarchical-path
-    ///   authority = "//" userinfo? host [ ":" port ]?
-    ///   userinfo = username [ ":" password ]? "@"
-    ///   hierarchical-path = [ "/" path-segment ]+
-    serialization: String,
-
-    // Components
-    scheme_end: u32,  // Before ':'
-    username_end: u32,  // Before ':' (if a password is given) or '@' (if not)
-    host_start: u32,
-    host_end: u32,
-    host: HostInternal,
-    port: Option<u16>,
-    path_start: u32,  // Before initial '/', if any
-    query_start: Option<u32>,  // Before '?', unlike Position::QueryStart
-    fragment_start: Option<u32>,  // Before '#', unlike Position::FragmentStart
-}
-
-#[cfg(feature = "heapsize")]
-impl HeapSizeOf for Url {
-    fn heap_size_of_children(&self) -> usize {
-        self.serialization.heap_size_of_children()
-    }
-}
-
-/// Full configuration for the URL parser.
-#[derive(Copy, Clone)]
-pub struct ParseOptions<'a> {
-    base_url: Option<&'a Url>,
-    encoding_override: encoding::EncodingOverride,
-    log_syntax_violation: Option<&'a Fn(&'static str)>,
-}
-
-impl<'a> ParseOptions<'a> {
-    /// Change the base URL
-    pub fn base_url(mut self, new: Option<&'a Url>) -> Self {
-        self.base_url = new;
-        self
-    }
-
-    /// Override the character encoding of query strings.
-    /// This is a legacy concept only relevant for HTML.
-    ///
-    /// `EncodingRef` is defined in [rust-encoding](https://github.com/lifthrasiir/rust-encoding).
-    ///
-    /// This method is only available if the `query_encoding`
-    /// [feature](http://doc.crates.io/manifest.html#the-features-section]) is enabled.
-    #[cfg(feature = "query_encoding")]
-    pub fn encoding_override(mut self, new: Option<encoding::EncodingRef>) -> Self {
-        self.encoding_override = EncodingOverride::from_opt_encoding(new).to_output_encoding();
-        self
-    }
-
-    /// Call the provided function or closure on non-fatal parse errors.
-    pub fn log_syntax_violation(mut self, new: Option<&'a Fn(&'static str)>) -> Self {
-        self.log_syntax_violation = new;
-        self
-    }
-
-    /// Parse an URL string with the configuration so far.
-    pub fn parse(self, input: &str) -> Result<Url, ::ParseError> {
-        Parser {
-            serialization: String::with_capacity(input.len()),
-            base_url: self.base_url,
-            query_encoding_override: self.encoding_override,
-            log_syntax_violation: self.log_syntax_violation,
-            context: Context::UrlParser,
-        }.parse_url(input)
-    }
-}
-
-impl<'a> Debug for ParseOptions<'a> {
-    fn fmt(&self, f: &mut Formatter) -> fmt::Result {
-        write!(f, "ParseOptions {{ base_url: {:?}, encoding_override: {:?}, log_syntax_violation: ", self.base_url, self.encoding_override)?;
-        match self.log_syntax_violation {
-            Some(_) => write!(f, "Some(Fn(&'static str)) }}"),
-            None => write!(f, "None }}")
-        }
-    }
-}
-
-impl Url {
-    /// Parse an absolute URL from a string.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// use url::Url;
-    /// # use url::ParseError;
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let url = Url::parse("https://example.net")?;
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    #[inline]
-    pub fn parse(input: &str) -> Result<Url, ::ParseError> {
-        Url::options().parse(input)
-    }
-
-    /// Parse an absolute URL from a string and add params to its query string.
-    ///
-    /// Existing params are not removed.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// use url::Url;
-    /// # use url::ParseError;
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let url = Url::parse_with_params("https://example.net?dont=clobberme",
-    ///                                  &[("lang", "rust"), ("browser", "servo")])?;
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    #[inline]
-    pub fn parse_with_params<I, K, V>(input: &str, iter: I) -> Result<Url, ::ParseError>
-        where I: IntoIterator,
-              I::Item: Borrow<(K, V)>,
-              K: AsRef<str>,
-              V: AsRef<str>
-    {
-        let mut url = Url::options().parse(input);
-
-        if let Ok(ref mut url) = url {
-            url.query_pairs_mut().extend_pairs(iter);
-        }
-
-        url
-    }
-
-    /// Parse a string as an URL, with this URL as the base URL.
-    ///
-    /// Note: a trailing slash is significant.
-    /// Without it, the last path component is considered to be a “file” name
-    /// to be removed to get at the “directory” that is used as the base:
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// use url::Url;
-    /// # use url::ParseError;
-    /// 
-    /// # fn run() -> Result<(), ParseError> {
-    /// let base = Url::parse("https://example.net/a/b.html")?;
-    /// let url = base.join("c.png")?;
-    /// assert_eq!(url.as_str(), "https://example.net/a/c.png");  // Not /a/b.html/c.png
-    ///
-    /// let base = Url::parse("https://example.net/a/b/")?;
-    /// let url = base.join("c.png")?;
-    /// assert_eq!(url.as_str(), "https://example.net/a/b/c.png");
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    #[inline]
-    pub fn join(&self, input: &str) -> Result<Url, ::ParseError> {
-        Url::options().base_url(Some(self)).parse(input)
-    }
-
-    /// Return a default `ParseOptions` that can fully configure the URL parser.
-    ///
-    /// # Examples
-    ///
-    /// Get default `ParseOptions`, then change base url
-    ///
-    /// ```rust
-    /// use url::Url;
-    /// # use url::ParseError;
-    /// # fn run() -> Result<(), ParseError> {
-    /// let options = Url::options();
-    /// let api = Url::parse("https://api.example.com")?;
-    /// let base_url = options.base_url(Some(&api));
-    /// let version_url = base_url.parse("version.json")?;
-    /// assert_eq!(version_url.as_str(), "https://api.example.com/version.json");
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    pub fn options<'a>() -> ParseOptions<'a> {
-        ParseOptions {
-            base_url: None,
-            encoding_override: EncodingOverride::utf8(),
-            log_syntax_violation: None,
-        }
-    }
-
-    /// Return the serialization of this URL.
-    ///
-    /// This is fast since that serialization is already stored in the `Url` struct.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// use url::Url;
-    /// # use url::ParseError;
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let url_str = "https://example.net/";
-    /// let url = Url::parse(url_str)?;
-    /// assert_eq!(url.as_str(), url_str);
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    #[inline]
-    pub fn as_str(&self) -> &str {
-        &self.serialization
-    }
-
-    /// Return the serialization of this URL.
-    ///
-    /// This consumes the `Url` and takes ownership of the `String` stored in it.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// use url::Url;
-    /// # use url::ParseError;
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let url_str = "https://example.net/";
-    /// let url = Url::parse(url_str)?;
-    /// assert_eq!(url.into_string(), url_str);
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    #[inline]
-    pub fn into_string(self) -> String {
-        self.serialization
-    }
-
-    /// For internal testing, not part of the public API.
-    ///
-    /// Methods of the `Url` struct assume a number of invariants.
-    /// This checks each of these invariants and panic if one is not met.
-    /// This is for testing rust-url itself.
-    #[doc(hidden)]
-    pub fn check_invariants(&self) -> Result<(), String> {
-        macro_rules! assert {
-            ($x: expr) => {
-                if !$x {
-                    return Err(format!("!( {} ) for URL {:?}",
-                                       stringify!($x), self.serialization))
-                }
-            }
-        }
-
-        macro_rules! assert_eq {
-            ($a: expr, $b: expr) => {
-                {
-                    let a = $a;
-                    let b = $b;
-                    if a != b {
-                        return Err(format!("{:?} != {:?} ({} != {}) for URL {:?}",
-                                           a, b, stringify!($a), stringify!($b),
-                                           self.serialization))
-                    }
-                }
-            }
-        }
-
-        assert!(self.scheme_end >= 1);
-        assert!(matches!(self.byte_at(0), b'a'...b'z' | b'A'...b'Z'));
-        assert!(self.slice(1..self.scheme_end).chars()
-                .all(|c| matches!(c, 'a'...'z' | 'A'...'Z' | '0'...'9' | '+' | '-' | '.')));
-        assert_eq!(self.byte_at(self.scheme_end), b':');
-
-        if self.slice(self.scheme_end + 1 ..).starts_with("//") {
-            // URL with authority
-            match self.byte_at(self.username_end) {
-                b':' => {
-                    assert!(self.host_start >= self.username_end + 2);
-                    assert_eq!(self.byte_at(self.host_start - 1), b'@');
-                }
-                b'@' => assert!(self.host_start == self.username_end + 1),
-                _ => assert_eq!(self.username_end, self.scheme_end + 3),
-            }
-            assert!(self.host_start >= self.username_end);
-            assert!(self.host_end >= self.host_start);
-            let host_str = self.slice(self.host_start..self.host_end);
-            match self.host {
-                HostInternal::None => assert_eq!(host_str, ""),
-                HostInternal::Ipv4(address) => assert_eq!(host_str, address.to_string()),
-                HostInternal::Ipv6(address) => {
-                    let h: Host<String> = Host::Ipv6(address);
-                    assert_eq!(host_str, h.to_string())
-                }
-                HostInternal::Domain => {
-                    if SchemeType::from(self.scheme()).is_special() {
-                        assert!(!host_str.is_empty())
-                    }
-                }
-            }
-            if self.path_start == self.host_end {
-                assert_eq!(self.port, None);
-            } else {
-                assert_eq!(self.byte_at(self.host_end), b':');
-                let port_str = self.slice(self.host_end + 1..self.path_start);
-                assert_eq!(self.port, Some(port_str.parse::<u16>().expect("Couldn't parse port?")));
-            }
-            assert_eq!(self.byte_at(self.path_start), b'/');
-        } else {
-            // Anarchist URL (no authority)
-            assert_eq!(self.username_end, self.scheme_end + 1);
-            assert_eq!(self.host_start, self.scheme_end + 1);
-            assert_eq!(self.host_end, self.scheme_end + 1);
-            assert_eq!(self.host, HostInternal::None);
-            assert_eq!(self.port, None);
-            assert_eq!(self.path_start, self.scheme_end + 1);
-        }
-        if let Some(start) = self.query_start {
-            assert!(start > self.path_start);
-            assert_eq!(self.byte_at(start), b'?');
-        }
-        if let Some(start) = self.fragment_start {
-            assert!(start > self.path_start);
-            assert_eq!(self.byte_at(start), b'#');
-        }
-        if let (Some(query_start), Some(fragment_start)) = (self.query_start, self.fragment_start) {
-            assert!(fragment_start > query_start);
-        }
-
-        let other = Url::parse(self.as_str()).expect("Failed to parse myself?");
-        assert_eq!(&self.serialization, &other.serialization);
-        assert_eq!(self.scheme_end, other.scheme_end);
-        assert_eq!(self.username_end, other.username_end);
-        assert_eq!(self.host_start, other.host_start);
-        assert_eq!(self.host_end, other.host_end);
-        assert!(self.host == other.host ||
-                // XXX No host round-trips to empty host.
-                // See https://github.com/whatwg/url/issues/79
-                (self.host_str(), other.host_str()) == (None, Some("")));
-        assert_eq!(self.port, other.port);
-        assert_eq!(self.path_start, other.path_start);
-        assert_eq!(self.query_start, other.query_start);
-        assert_eq!(self.fragment_start, other.fragment_start);
-        Ok(())
-    }
-
-    /// Return the origin of this URL (https://url.spec.whatwg.org/#origin)
-    ///
-    /// Note: this returns an opaque origin for `file:` URLs, which causes
-    /// `url.origin() != url.origin()`.
-    ///
-    /// # Examples
-    ///
-    /// URL with `ftp` scheme:
-    ///
-    /// ```rust
-    /// use url::{Host, Origin, Url};
-    /// # use url::ParseError;
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let url = Url::parse("ftp://example.com/foo")?;
-    /// assert_eq!(url.origin(),
-    ///            Origin::Tuple("ftp".into(),
-    ///                          Host::Domain("example.com".into()),
-    ///                          21));
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    ///
-    /// URL with `blob` scheme:
-    ///
-    /// ```rust
-    /// use url::{Host, Origin, Url};
-    /// # use url::ParseError;
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let url = Url::parse("blob:https://example.com/foo")?;
-    /// assert_eq!(url.origin(),
-    ///            Origin::Tuple("https".into(),
-    ///                          Host::Domain("example.com".into()),
-    ///                          443));
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    ///
-    /// URL with `file` scheme:
-    ///
-    /// ```rust
-    /// use url::{Host, Origin, Url};
-    /// # use url::ParseError;
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let url = Url::parse("file:///tmp/foo")?;
-    /// assert!(!url.origin().is_tuple());
-    ///
-    /// let other_url = Url::parse("file:///tmp/foo")?;
-    /// assert!(url.origin() != other_url.origin());
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    ///
-    /// URL with other scheme:
-    ///
-    /// ```rust
-    /// use url::{Host, Origin, Url};
-    /// # use url::ParseError;
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let url = Url::parse("foo:bar")?;
-    /// assert!(!url.origin().is_tuple());
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    #[inline]
-    pub fn origin(&self) -> Origin {
-        origin::url_origin(self)
-    }
-
-    /// Return the scheme of this URL, lower-cased, as an ASCII string without the ':' delimiter.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use url::Url;
-    /// # use url::ParseError;
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let url = Url::parse("file:///tmp/foo")?;
-    /// assert_eq!(url.scheme(), "file");
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    #[inline]
-    pub fn scheme(&self) -> &str {
-        self.slice(..self.scheme_end)
-    }
-
-    /// Return whether the URL has an 'authority',
-    /// which can contain a username, password, host, and port number.
-    ///
-    /// URLs that do *not* are either path-only like `unix:/run/foo.socket`
-    /// or cannot-be-a-base like `data:text/plain,Stuff`.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use url::Url;
-    /// # use url::ParseError;
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let url = Url::parse("ftp://rms@example.com")?;
-    /// assert!(url.has_authority());
-    ///
-    /// let url = Url::parse("unix:/run/foo.socket")?;
-    /// assert!(!url.has_authority());
-    ///
-    /// let url = Url::parse("data:text/plain,Stuff")?;
-    /// assert!(!url.has_authority());
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    #[inline]
-    pub fn has_authority(&self) -> bool {
-        debug_assert!(self.byte_at(self.scheme_end) == b':');
-        self.slice(self.scheme_end..).starts_with("://")
-    }
-
-    /// Return whether this URL is a cannot-be-a-base URL,
-    /// meaning that parsing a relative URL string with this URL as the base will return an error.
-    ///
-    /// This is the case if the scheme and `:` delimiter are not followed by a `/` slash,
-    /// as is typically the case of `data:` and `mailto:` URLs.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use url::Url;
-    /// # use url::ParseError;
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let url = Url::parse("ftp://rms@example.com")?;
-    /// assert!(!url.cannot_be_a_base());
-    ///
-    /// let url = Url::parse("unix:/run/foo.socket")?;
-    /// assert!(!url.cannot_be_a_base());
-    ///
-    /// let url = Url::parse("data:text/plain,Stuff")?;
-    /// assert!(url.cannot_be_a_base());
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    #[inline]
-    pub fn cannot_be_a_base(&self) -> bool {
-        !self.slice(self.path_start..).starts_with('/')
-    }
-
-    /// Return the username for this URL (typically the empty string)
-    /// as a percent-encoded ASCII string.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use url::Url;
-    /// # use url::ParseError;
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let url = Url::parse("ftp://rms@example.com")?;
-    /// assert_eq!(url.username(), "rms");
-    ///
-    /// let url = Url::parse("ftp://:secret123@example.com")?;
-    /// assert_eq!(url.username(), "");
-    ///
-    /// let url = Url::parse("https://example.com")?;
-    /// assert_eq!(url.username(), "");
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    pub fn username(&self) -> &str {
-        if self.has_authority() {
-            self.slice(self.scheme_end + ("://".len() as u32)..self.username_end)
-        } else {
-            ""
-        }
-    }
-
-    /// Return the password for this URL, if any, as a percent-encoded ASCII string.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use url::Url;
-    /// # use url::ParseError;
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let url = Url::parse("ftp://rms:secret123@example.com")?;
-    /// assert_eq!(url.password(), Some("secret123"));
-    ///
-    /// let url = Url::parse("ftp://:secret123@example.com")?;
-    /// assert_eq!(url.password(), Some("secret123"));
-    ///
-    /// let url = Url::parse("ftp://rms@example.com")?;
-    /// assert_eq!(url.password(), None);
-    ///
-    /// let url = Url::parse("https://example.com")?;
-    /// assert_eq!(url.password(), None);
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    pub fn password(&self) -> Option<&str> {
-        // This ':' is not the one marking a port number since a host can not be empty.
-        // (Except for file: URLs, which do not have port numbers.)
-        if self.has_authority() && self.byte_at(self.username_end) == b':' {
-            debug_assert!(self.byte_at(self.host_start - 1) == b'@');
-            Some(self.slice(self.username_end + 1..self.host_start - 1))
-        } else {
-            None
-        }
-    }
-
-    /// Equivalent to `url.host().is_some()`.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use url::Url;
-    /// # use url::ParseError;
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let url = Url::parse("ftp://rms@example.com")?;
-    /// assert!(url.has_host());
-    ///
-    /// let url = Url::parse("unix:/run/foo.socket")?;
-    /// assert!(!url.has_host());
-    ///
-    /// let url = Url::parse("data:text/plain,Stuff")?;
-    /// assert!(!url.has_host());
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    pub fn has_host(&self) -> bool {
-        !matches!(self.host, HostInternal::None)
-    }
-
-    /// Return the string representation of the host (domain or IP address) for this URL, if any.
-    ///
-    /// Non-ASCII domains are punycode-encoded per IDNA.
-    /// IPv6 addresses are given between `[` and `]` brackets.
-    ///
-    /// Cannot-be-a-base URLs (typical of `data:` and `mailto:`) and some `file:` URLs
-    /// don’t have a host.
-    ///
-    /// See also the `host` method.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use url::Url;
-    /// # use url::ParseError;
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let url = Url::parse("https://127.0.0.1/index.html")?;
-    /// assert_eq!(url.host_str(), Some("127.0.0.1"));
-    ///
-    /// let url = Url::parse("ftp://rms@example.com")?;
-    /// assert_eq!(url.host_str(), Some("example.com"));
-    ///
-    /// let url = Url::parse("unix:/run/foo.socket")?;
-    /// assert_eq!(url.host_str(), None);
-    ///
-    /// let url = Url::parse("data:text/plain,Stuff")?;
-    /// assert_eq!(url.host_str(), None);
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    pub fn host_str(&self) -> Option<&str> {
-        if self.has_host() {
-            Some(self.slice(self.host_start..self.host_end))
-        } else {
-            None
-        }
-    }
-
-    /// Return the parsed representation of the host for this URL.
-    /// Non-ASCII domain labels are punycode-encoded per IDNA.
-    ///
-    /// Cannot-be-a-base URLs (typical of `data:` and `mailto:`) and some `file:` URLs
-    /// don’t have a host.
-    ///
-    /// See also the `host_str` method.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use url::Url;
-    /// # use url::ParseError;
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let url = Url::parse("https://127.0.0.1/index.html")?;
-    /// assert!(url.host().is_some());
-    ///
-    /// let url = Url::parse("ftp://rms@example.com")?;
-    /// assert!(url.host().is_some());
-    ///
-    /// let url = Url::parse("unix:/run/foo.socket")?;
-    /// assert!(url.host().is_none());
-    ///
-    /// let url = Url::parse("data:text/plain,Stuff")?;
-    /// assert!(url.host().is_none());
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    pub fn host(&self) -> Option<Host<&str>> {
-        match self.host {
-            HostInternal::None => None,
-            HostInternal::Domain => Some(Host::Domain(self.slice(self.host_start..self.host_end))),
-            HostInternal::Ipv4(address) => Some(Host::Ipv4(address)),
-            HostInternal::Ipv6(address) => Some(Host::Ipv6(address)),
-        }
-    }
-
-    /// If this URL has a host and it is a domain name (not an IP address), return it.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use url::Url;
-    /// # use url::ParseError;
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let url = Url::parse("https://127.0.0.1/")?;
-    /// assert_eq!(url.domain(), None);
-    ///
-    /// let url = Url::parse("mailto:rms@example.net")?;
-    /// assert_eq!(url.domain(), None);
-    ///
-    /// let url = Url::parse("https://example.com/")?;
-    /// assert_eq!(url.domain(), Some("example.com"));
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    pub fn domain(&self) -> Option<&str> {
-        match self.host {
-            HostInternal::Domain => Some(self.slice(self.host_start..self.host_end)),
-            _ => None,
-        }
-    }
-
-    /// Return the port number for this URL, if any.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use url::Url;
-    /// # use url::ParseError;
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let url = Url::parse("https://example.com")?;
-    /// assert_eq!(url.port(), None);
-    ///
-    /// let url = Url::parse("ssh://example.com:22")?;
-    /// assert_eq!(url.port(), Some(22));
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    #[inline]
-    pub fn port(&self) -> Option<u16> {
-        self.port
-    }
-
-    /// Return the port number for this URL, or the default port number if it is known.
-    ///
-    /// This method only knows the default port number
-    /// of the `http`, `https`, `ws`, `wss`, `ftp`, and `gopher` schemes.
-    ///
-    /// For URLs in these schemes, this method always returns `Some(_)`.
-    /// For other schemes, it is the same as `Url::port()`.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use url::Url;
-    /// # use url::ParseError;
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let url = Url::parse("foo://example.com")?;
-    /// assert_eq!(url.port_or_known_default(), None);
-    ///
-    /// let url = Url::parse("foo://example.com:1456")?;
-    /// assert_eq!(url.port_or_known_default(), Some(1456));
-    ///
-    /// let url = Url::parse("https://example.com")?;
-    /// assert_eq!(url.port_or_known_default(), Some(443));
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    #[inline]
-    pub fn port_or_known_default(&self) -> Option<u16> {
-        self.port.or_else(|| parser::default_port(self.scheme()))
-    }
-
-    /// If the URL has a host, return something that implements `ToSocketAddrs`.
-    ///
-    /// If the URL has no port number and the scheme’s default port number is not known
-    /// (see `Url::port_or_known_default`),
-    /// the closure is called to obtain a port number.
-    /// Typically, this closure can match on the result `Url::scheme`
-    /// to have per-scheme default port numbers,
-    /// and panic for schemes it’s not prepared to handle.
-    /// For example:
-    ///
-    /// ```rust
-    /// # use url::Url;
-    /// # use std::net::TcpStream;
-    /// # use std::io;
-    /// fn connect(url: &Url) -> io::Result<TcpStream> {
-    ///     TcpStream::connect(url.with_default_port(default_port)?)
-    /// }
-    ///
-    /// fn default_port(url: &Url) -> Result<u16, ()> {
-    ///     match url.scheme() {
-    ///         "git" => Ok(9418),
-    ///         "git+ssh" => Ok(22),
-    ///         "git+https" => Ok(443),
-    ///         "git+http" => Ok(80),
-    ///         _ => Err(()),
-    ///     }
-    /// }
-    /// ```
-    pub fn with_default_port<F>(&self, f: F) -> io::Result<HostAndPort<&str>>
-    where F: FnOnce(&Url) -> Result<u16, ()> {
-        Ok(HostAndPort {
-            host: self.host()
-                      .ok_or(())
-                      .or_else(|()| io_error("URL has no host"))?,
-            port: self.port_or_known_default()
-                      .ok_or(())
-                      .or_else(|()| f(self))
-                      .or_else(|()| io_error("URL has no port number"))?
-        })
-    }
-
-    /// Return the path for this URL, as a percent-encoded ASCII string.
-    /// For cannot-be-a-base URLs, this is an arbitrary string that doesn’t start with '/'.
-    /// For other URLs, this starts with a '/' slash
-    /// and continues with slash-separated path segments.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// use url::{Url, ParseError};
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let url = Url::parse("https://example.com/api/versions?page=2")?;
-    /// assert_eq!(url.path(), "/api/versions");
-    ///
-    /// let url = Url::parse("https://example.com")?;
-    /// assert_eq!(url.path(), "/");
-    ///
-    /// let url = Url::parse("https://example.com/countries/việt nam")?;
-    /// assert_eq!(url.path(), "/countries/vi%E1%BB%87t%20nam");
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    pub fn path(&self) -> &str {
-        match (self.query_start, self.fragment_start) {
-            (None, None) => self.slice(self.path_start..),
-            (Some(next_component_start), _) |
-            (None, Some(next_component_start)) => {
-                self.slice(self.path_start..next_component_start)
-            }
-        }
-    }
-
-    /// Unless this URL is cannot-be-a-base,
-    /// return an iterator of '/' slash-separated path segments,
-    /// each as a percent-encoded ASCII string.
-    ///
-    /// Return `None` for cannot-be-a-base URLs.
-    ///
-    /// When `Some` is returned, the iterator always contains at least one string
-    /// (which may be empty).
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use url::Url;
-    /// # use std::error::Error;
-    ///
-    /// # fn run() -> Result<(), Box<Error>> {
-    /// let url = Url::parse("https://example.com/foo/bar")?;
-    /// let mut path_segments = url.path_segments().ok_or_else(|| "cannot be base")?;
-    /// assert_eq!(path_segments.next(), Some("foo"));
-    /// assert_eq!(path_segments.next(), Some("bar"));
-    /// assert_eq!(path_segments.next(), None);
-    ///
-    /// let url = Url::parse("https://example.com")?;
-    /// let mut path_segments = url.path_segments().ok_or_else(|| "cannot be base")?;
-    /// assert_eq!(path_segments.next(), Some(""));
-    /// assert_eq!(path_segments.next(), None);
-    ///
-    /// let url = Url::parse("data:text/plain,HelloWorld")?;
-    /// assert!(url.path_segments().is_none());
-    ///
-    /// let url = Url::parse("https://example.com/countries/việt nam")?;
-    /// let mut path_segments = url.path_segments().ok_or_else(|| "cannot be base")?;
-    /// assert_eq!(path_segments.next(), Some("countries"));
-    /// assert_eq!(path_segments.next(), Some("vi%E1%BB%87t%20nam"));
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    pub fn path_segments(&self) -> Option<str::Split<char>> {
-        let path = self.path();
-        if path.starts_with('/') {
-            Some(path[1..].split('/'))
-        } else {
-            None
-        }
-    }
-
-    /// Return this URL’s query string, if any, as a percent-encoded ASCII string.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// use url::Url;
-    /// # use url::ParseError;
-    ///
-    /// fn run() -> Result<(), ParseError> {
-    /// let url = Url::parse("https://example.com/products?page=2")?;
-    /// let query = url.query();
-    /// assert_eq!(query, Some("page=2"));
-    ///
-    /// let url = Url::parse("https://example.com/products")?;
-    /// let query = url.query();
-    /// assert!(query.is_none());
-    ///
-    /// let url = Url::parse("https://example.com/?country=español")?;
-    /// let query = url.query();
-    /// assert_eq!(query, Some("country=espa%C3%B1ol"));
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    pub fn query(&self) -> Option<&str> {
-        match (self.query_start, self.fragment_start) {
-            (None, _) => None,
-            (Some(query_start), None) => {
-                debug_assert!(self.byte_at(query_start) == b'?');
-                Some(self.slice(query_start + 1..))
-            }
-            (Some(query_start), Some(fragment_start)) => {
-                debug_assert!(self.byte_at(query_start) == b'?');
-                Some(self.slice(query_start + 1..fragment_start))
-            }
-        }
-    }
-
-    /// Parse the URL’s query string, if any, as `application/x-www-form-urlencoded`
-    /// and return an iterator of (key, value) pairs.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// use std::borrow::Cow;
-    ///
-    /// use url::Url;
-    /// # use url::ParseError;
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let url = Url::parse("https://example.com/products?page=2&sort=desc")?;
-    /// let mut pairs = url.query_pairs();
-    ///
-    /// assert_eq!(pairs.count(), 2);
-    ///
-    /// assert_eq!(pairs.next(), Some((Cow::Borrowed("page"), Cow::Borrowed("2"))));
-    /// assert_eq!(pairs.next(), Some((Cow::Borrowed("sort"), Cow::Borrowed("desc"))));
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    ///
-
-    #[inline]
-    pub fn query_pairs(&self) -> form_urlencoded::Parse {
-        form_urlencoded::parse(self.query().unwrap_or("").as_bytes())
-    }
-
-    /// Return this URL’s fragment identifier, if any.
-    ///
-    /// A fragment is the part of the URL after the `#` symbol.
-    /// The fragment is optional and, if present, contains a fragment identifier
-    /// that identifies a secondary resource, such as a section heading
-    /// of a document.
-    ///
-    /// In HTML, the fragment identifier is usually the id attribute of a an element
-    /// that is scrolled to on load. Browsers typically will not send the fragment portion
-    /// of a URL to the server.
-    ///
-    /// **Note:** the parser did *not* percent-encode this component,
-    /// but the input may have been percent-encoded already.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// use url::Url;
-    /// # use url::ParseError;
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let url = Url::parse("https://example.com/data.csv#row=4")?;
-    ///
-    /// assert_eq!(url.fragment(), Some("row=4"));
-    ///
-    /// let url = Url::parse("https://example.com/data.csv#cell=4,1-6,2")?;
-    ///
-    /// assert_eq!(url.fragment(), Some("cell=4,1-6,2"));
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    pub fn fragment(&self) -> Option<&str> {
-        self.fragment_start.map(|start| {
-            debug_assert!(self.byte_at(start) == b'#');
-            self.slice(start + 1..)
-        })
-    }
-
-    fn mutate<F: FnOnce(&mut Parser) -> R, R>(&mut self, f: F) -> R {
-        let mut parser = Parser::for_setter(mem::replace(&mut self.serialization, String::new()));
-        let result = f(&mut parser);
-        self.serialization = parser.serialization;
-        result
-    }
-
-    /// Change this URL’s fragment identifier.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// use url::Url;
-    /// # use url::ParseError;
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let mut url = Url::parse("https://example.com/data.csv")?;
-    /// assert_eq!(url.as_str(), "https://example.com/data.csv");
-
-    /// url.set_fragment(Some("cell=4,1-6,2"));
-    /// assert_eq!(url.as_str(), "https://example.com/data.csv#cell=4,1-6,2");  
-    /// assert_eq!(url.fragment(), Some("cell=4,1-6,2"));
-    ///
-    /// url.set_fragment(None);
-    /// assert_eq!(url.as_str(), "https://example.com/data.csv");    
-    /// assert!(url.fragment().is_none());
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    pub fn set_fragment(&mut self, fragment: Option<&str>) {
-        // Remove any previous fragment
-        if let Some(start) = self.fragment_start {
-            debug_assert!(self.byte_at(start) == b'#');
-            self.serialization.truncate(start as usize);
-        }
-        // Write the new one
-        if let Some(input) = fragment {
-            self.fragment_start = Some(to_u32(self.serialization.len()).unwrap());
-            self.serialization.push('#');
-            self.mutate(|parser| parser.parse_fragment(parser::Input::new(input)))
-        } else {
-            self.fragment_start = None
-        }
-    }
-
-    fn take_fragment(&mut self) -> Option<String> {
-        self.fragment_start.take().map(|start| {
-            debug_assert!(self.byte_at(start) == b'#');
-            let fragment = self.slice(start + 1..).to_owned();
-            self.serialization.truncate(start as usize);
-            fragment
-        })
-    }
-
-    fn restore_already_parsed_fragment(&mut self, fragment: Option<String>) {
-        if let Some(ref fragment) = fragment {
-            assert!(self.fragment_start.is_none());
-            self.fragment_start = Some(to_u32(self.serialization.len()).unwrap());
-            self.serialization.push('#');
-            self.serialization.push_str(fragment);
-        }
-    }
-
-    /// Change this URL’s query string.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// use url::Url;
-    /// # use url::ParseError;
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let mut url = Url::parse("https://example.com/products")?;
-    /// assert_eq!(url.as_str(), "https://example.com/products");
-    ///
-    /// url.set_query(Some("page=2"));
-    /// assert_eq!(url.as_str(), "https://example.com/products?page=2");    
-    /// assert_eq!(url.query(), Some("page=2"));
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    pub fn set_query(&mut self, query: Option<&str>) {
-        let fragment = self.take_fragment();
-
-        // Remove any previous query
-        if let Some(start) = self.query_start.take() {
-            debug_assert!(self.byte_at(start) == b'?');
-            self.serialization.truncate(start as usize);
-        }
-        // Write the new query, if any
-        if let Some(input) = query {
-            self.query_start = Some(to_u32(self.serialization.len()).unwrap());
-            self.serialization.push('?');
-            let scheme_end = self.scheme_end;
-            self.mutate(|parser| parser.parse_query(scheme_end, parser::Input::new(input)));
-        }
-
-        self.restore_already_parsed_fragment(fragment);
-    }
-
-    /// Manipulate this URL’s query string, viewed as a sequence of name/value pairs
-    /// in `application/x-www-form-urlencoded` syntax.
-    ///
-    /// The return value has a method-chaining API:
-    ///
-    /// ```rust
-    /// # use url::{Url, ParseError};
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let mut url = Url::parse("https://example.net?lang=fr#nav")?;
-    /// assert_eq!(url.query(), Some("lang=fr"));
-    ///
-    /// url.query_pairs_mut().append_pair("foo", "bar");
-    /// assert_eq!(url.query(), Some("lang=fr&foo=bar"));
-    /// assert_eq!(url.as_str(), "https://example.net/?lang=fr&foo=bar#nav");
-    ///
-    /// url.query_pairs_mut()
-    ///     .clear()
-    ///     .append_pair("foo", "bar & baz")
-    ///     .append_pair("saisons", "\u{00C9}t\u{00E9}+hiver");
-    /// assert_eq!(url.query(), Some("foo=bar+%26+baz&saisons=%C3%89t%C3%A9%2Bhiver"));
-    /// assert_eq!(url.as_str(),
-    ///            "https://example.net/?foo=bar+%26+baz&saisons=%C3%89t%C3%A9%2Bhiver#nav");
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    ///
-    /// Note: `url.query_pairs_mut().clear();` is equivalent to `url.set_query(Some(""))`,
-    /// not `url.set_query(None)`.
-    ///
-    /// The state of `Url` is unspecified if this return value is leaked without being dropped.
-    pub fn query_pairs_mut(&mut self) -> form_urlencoded::Serializer<UrlQuery> {
-        let fragment = self.take_fragment();
-
-        let query_start;
-        if let Some(start) = self.query_start {
-            debug_assert!(self.byte_at(start) == b'?');
-            query_start = start as usize;
-        } else {
-            query_start = self.serialization.len();
-            self.query_start = Some(to_u32(query_start).unwrap());
-            self.serialization.push('?');
-        }
-
-        let query = UrlQuery { url: self, fragment: fragment };
-        form_urlencoded::Serializer::for_suffix(query, query_start + "?".len())
-    }
-
-    fn take_after_path(&mut self) -> String {
-        match (self.query_start, self.fragment_start) {
-            (Some(i), _) | (None, Some(i)) => {
-                let after_path = self.slice(i..).to_owned();
-                self.serialization.truncate(i as usize);
-                after_path
-            },
-            (None, None) => String::new(),
-        }
-    }
-
-    /// Change this URL’s path.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// use url::Url;
-    /// # use url::ParseError;
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let mut url = Url::parse("https://example.com")?;
-    /// url.set_path("api/comments");
-    /// assert_eq!(url.as_str(), "https://example.com/api/comments");    
-    /// assert_eq!(url.path(), "/api/comments");
-    ///
-    /// let mut url = Url::parse("https://example.com/api")?;
-    /// url.set_path("data/report.csv");
-    /// assert_eq!(url.as_str(), "https://example.com/data/report.csv");    
-    /// assert_eq!(url.path(), "/data/report.csv");
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    pub fn set_path(&mut self, mut path: &str) {
-        let after_path = self.take_after_path();
-        let old_after_path_pos = to_u32(self.serialization.len()).unwrap();
-        let cannot_be_a_base = self.cannot_be_a_base();
-        let scheme_type = SchemeType::from(self.scheme());
-        self.serialization.truncate(self.path_start as usize);
-        self.mutate(|parser| {
-            if cannot_be_a_base {
-                if path.starts_with('/') {
-                    parser.serialization.push_str("%2F");
-                    path = &path[1..];
-                }
-                parser.parse_cannot_be_a_base_path(parser::Input::new(path));
-            } else {
-                let mut has_host = true;  // FIXME
-                parser.parse_path_start(scheme_type, &mut has_host, parser::Input::new(path));
-            }
-        });
-        self.restore_after_path(old_after_path_pos, &after_path);
-    }
-
-    /// Return an object with methods to manipulate this URL’s path segments.
-    ///
-    /// Return `Err(())` if this URL is cannot-be-a-base.
-    pub fn path_segments_mut(&mut self) -> Result<PathSegmentsMut, ()> {
-        if self.cannot_be_a_base() {
-            Err(())
-        } else {
-            Ok(path_segments::new(self))
-        }
-    }
-
-    fn restore_after_path(&mut self, old_after_path_position: u32, after_path: &str) {
-        let new_after_path_position = to_u32(self.serialization.len()).unwrap();
-        let adjust = |index: &mut u32| {
-            *index -= old_after_path_position;
-            *index += new_after_path_position;
-        };
-        if let Some(ref mut index) = self.query_start { adjust(index) }
-        if let Some(ref mut index) = self.fragment_start { adjust(index) }
-        self.serialization.push_str(after_path)
-    }
-
-    /// Change this URL’s port number.
-    ///
-    /// If this URL is cannot-be-a-base, does not have a host, or has the `file` scheme;
-    /// do nothing and return `Err`.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// use url::Url;
-    /// # use std::error::Error;
-    ///
-    /// # fn run() -> Result<(), Box<Error>> {
-    /// let mut url = Url::parse("ssh://example.net:2048/")?;
-    ///
-    /// url.set_port(Some(4096)).map_err(|_| "cannot be base")?;
-    /// assert_eq!(url.as_str(), "ssh://example.net:4096/");
-    ///
-    /// url.set_port(None).map_err(|_| "cannot be base")?;
-    /// assert_eq!(url.as_str(), "ssh://example.net/");
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    ///
-    /// Cannot set port for cannot-be-a-base URLs:
-    ///
-    /// ```
-    /// use url::Url;
-    /// # use url::ParseError;
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let mut url = Url::parse("mailto:rms@example.net")?;
-    ///
-    /// let result = url.set_port(Some(80));
-    /// assert!(result.is_err());
-    ///
-    /// let result = url.set_port(None);
-    /// assert!(result.is_err());
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    pub fn set_port(&mut self, mut port: Option<u16>) -> Result<(), ()> {
-        if !self.has_host() || self.scheme() == "file" {
-            return Err(())
-        }
-        if port.is_some() && port == parser::default_port(self.scheme()) {
-            port = None
-        }
-        self.set_port_internal(port);
-        Ok(())
-    }
-
-    fn set_port_internal(&mut self, port: Option<u16>) {
-        match (self.port, port) {
-            (None, None) => {}
-            (Some(_), None) => {
-                self.serialization.drain(self.host_end as usize .. self.path_start as usize);
-                let offset = self.path_start - self.host_end;
-                self.path_start = self.host_end;
-                if let Some(ref mut index) = self.query_start { *index -= offset }
-                if let Some(ref mut index) = self.fragment_start { *index -= offset }
-            }
-            (Some(old), Some(new)) if old == new => {}
-            (_, Some(new)) => {
-                let path_and_after = self.slice(self.path_start..).to_owned();
-                self.serialization.truncate(self.host_end as usize);
-                write!(&mut self.serialization, ":{}", new).unwrap();
-                let old_path_start = self.path_start;
-                let new_path_start = to_u32(self.serialization.len()).unwrap();
-                self.path_start = new_path_start;
-                let adjust = |index: &mut u32| {
-                    *index -= old_path_start;
-                    *index += new_path_start;
-                };
-                if let Some(ref mut index) = self.query_start { adjust(index) }
-                if let Some(ref mut index) = self.fragment_start { adjust(index) }
-                self.serialization.push_str(&path_and_after);
-            }
-        }
-        self.port = port;
-    }
-
-    /// Change this URL’s host.
-    ///
-    /// If this URL is cannot-be-a-base or there is an error parsing the given `host`,
-    /// do nothing and return `Err`.
-    ///
-    /// Removing the host (calling this with `None`)
-    /// will also remove any username, password, and port number.
-    ///
-    /// # Examples
-    ///
-    /// Change host:
-    ///
-    /// ```
-    /// use url::Url;
-    /// # use url::ParseError;
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let mut url = Url::parse("https://example.net")?;
-    /// let result = url.set_host(Some("rust-lang.org"));
-    /// assert!(result.is_ok());
-    /// assert_eq!(url.as_str(), "https://rust-lang.org/");
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    ///
-    /// Remove host:
-    ///
-    /// ```
-    /// use url::Url;
-    /// # use url::ParseError;
-    /// 
-    /// # fn run() -> Result<(), ParseError> {
-    /// let mut url = Url::parse("foo://example.net")?;
-    /// let result = url.set_host(None);
-    /// assert!(result.is_ok());
-    /// assert_eq!(url.as_str(), "foo:/");
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    ///
-    /// Cannot remove host for 'special' schemes (e.g. `http`):
-    ///
-    /// ```
-    /// use url::Url;
-    /// # use url::ParseError;
-    /// 
-    /// # fn run() -> Result<(), ParseError> {
-    /// let mut url = Url::parse("https://example.net")?;
-    /// let result = url.set_host(None);
-    /// assert!(result.is_err());
-    /// assert_eq!(url.as_str(), "https://example.net/");
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    ///
-    /// Cannot change or remove host for cannot-be-a-base URLs:
-    ///
-    /// ```
-    /// use url::Url;
-    /// # use url::ParseError;
-    /// 
-    /// # fn run() -> Result<(), ParseError> {
-    /// let mut url = Url::parse("mailto:rms@example.net")?;
-    ///
-    /// let result = url.set_host(Some("rust-lang.org"));
-    /// assert!(result.is_err());
-    /// assert_eq!(url.as_str(), "mailto:rms@example.net");
-    ///
-    /// let result = url.set_host(None);
-    /// assert!(result.is_err());
-    /// assert_eq!(url.as_str(), "mailto:rms@example.net");
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    pub fn set_host(&mut self, host: Option<&str>) -> Result<(), ParseError> {
-        if self.cannot_be_a_base() {
-            return Err(ParseError::SetHostOnCannotBeABaseUrl)
-        }
-
-        if let Some(host) = host {
-            if host == "" && SchemeType::from(self.scheme()).is_special() {
-                return Err(ParseError::EmptyHost);
-            }
-            self.set_host_internal(Host::parse(host)?, None)
-        } else if self.has_host() {
-            if SchemeType::from(self.scheme()).is_special() {
-                return Err(ParseError::EmptyHost)
-            }
-            debug_assert!(self.byte_at(self.scheme_end) == b':');
-            debug_assert!(self.byte_at(self.path_start) == b'/');
-            let new_path_start = self.scheme_end + 1;
-            self.serialization.drain(new_path_start as usize..self.path_start as usize);
-            let offset = self.path_start - new_path_start;
-            self.path_start = new_path_start;
-            self.username_end = new_path_start;
-            self.host_start = new_path_start;
-            self.host_end = new_path_start;
-            self.port = None;
-            if let Some(ref mut index) = self.query_start { *index -= offset }
-            if let Some(ref mut index) = self.fragment_start { *index -= offset }
-        }
-        Ok(())
-    }
-
-    /// opt_new_port: None means leave unchanged, Some(None) means remove any port number.
-    fn set_host_internal(&mut self, host: Host<String>, opt_new_port: Option<Option<u16>>) {
-        let old_suffix_pos = if opt_new_port.is_some() { self.path_start } else { self.host_end };
-        let suffix = self.slice(old_suffix_pos..).to_owned();
-        self.serialization.truncate(self.host_start as usize);
-        if !self.has_authority() {
-            debug_assert!(self.slice(self.scheme_end..self.host_start) == ":");
-            debug_assert!(self.username_end == self.host_start);
-            self.serialization.push('/');
-            self.serialization.push('/');
-            self.username_end += 2;
-            self.host_start += 2;
-        }
-        write!(&mut self.serialization, "{}", host).unwrap();
-        self.host_end = to_u32(self.serialization.len()).unwrap();
-        self.host = host.into();
-
-        if let Some(new_port) = opt_new_port {
-            self.port = new_port;
-            if let Some(port) = new_port {
-                write!(&mut self.serialization, ":{}", port).unwrap();
-            }
-        }
-        let new_suffix_pos = to_u32(self.serialization.len()).unwrap();
-        self.serialization.push_str(&suffix);
-
-        let adjust = |index: &mut u32| {
-            *index -= old_suffix_pos;
-            *index += new_suffix_pos;
-        };
-        adjust(&mut self.path_start);
-        if let Some(ref mut index) = self.query_start { adjust(index) }
-        if let Some(ref mut index) = self.fragment_start { adjust(index) }
-    }
-
-    /// Change this URL’s host to the given IP address.
-    ///
-    /// If this URL is cannot-be-a-base, do nothing and return `Err`.
-    ///
-    /// Compared to `Url::set_host`, this skips the host parser.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// use url::{Url, ParseError};
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let mut url = Url::parse("http://example.com")?;
-    /// url.set_ip_host("127.0.0.1".parse().unwrap());
-    /// assert_eq!(url.host_str(), Some("127.0.0.1"));
-    /// assert_eq!(url.as_str(), "http://127.0.0.1/");
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    ///
-    /// Cannot change URL's from mailto(cannot-be-base) to ip:
-    ///
-    /// ```rust
-    /// use url::{Url, ParseError};
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let mut url = Url::parse("mailto:rms@example.com")?;
-    /// let result = url.set_ip_host("127.0.0.1".parse().unwrap());
-    ///
-    /// assert_eq!(url.as_str(), "mailto:rms@example.com");
-    /// assert!(result.is_err());
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    ///
-    pub fn set_ip_host(&mut self, address: IpAddr) -> Result<(), ()> {
-        if self.cannot_be_a_base() {
-            return Err(())
-        }
-
-        let address = match address {
-            IpAddr::V4(address) => Host::Ipv4(address),
-            IpAddr::V6(address) => Host::Ipv6(address),
-        };
-        self.set_host_internal(address, None);
-        Ok(())
-    }
-
-    /// Change this URL’s password.
-    ///
-    /// If this URL is cannot-be-a-base or does not have a host, do nothing and return `Err`.
-    ///
-    /// # Examples
-    ///
-    /// ```rust
-    /// use url::{Url, ParseError};
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let mut url = Url::parse("mailto:rmz@example.com")?;
-    /// let result = url.set_password(Some("secret_password"));
-    /// assert!(result.is_err());
-    ///
-    /// let mut url = Url::parse("ftp://user1:secret1@example.com")?;
-    /// let result = url.set_password(Some("secret_password"));
-    /// assert_eq!(url.password(), Some("secret_password"));
-    ///
-    /// let mut url = Url::parse("ftp://user2:@example.com")?;
-    /// let result = url.set_password(Some("secret2"));
-    /// assert!(result.is_ok());
-    /// assert_eq!(url.password(), Some("secret2"));
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    pub fn set_password(&mut self, password: Option<&str>) -> Result<(), ()> {
-        if !self.has_host() {
-            return Err(())
-        }
-        if let Some(password) = password {
-            let host_and_after = self.slice(self.host_start..).to_owned();
-            self.serialization.truncate(self.username_end as usize);
-            self.serialization.push(':');
-            self.serialization.extend(utf8_percent_encode(password, USERINFO_ENCODE_SET));
-            self.serialization.push('@');
-
-            let old_host_start = self.host_start;
-            let new_host_start = to_u32(self.serialization.len()).unwrap();
-            let adjust = |index: &mut u32| {
-                *index -= old_host_start;
-                *index += new_host_start;
-            };
-            self.host_start = new_host_start;
-            adjust(&mut self.host_end);
-            adjust(&mut self.path_start);
-            if let Some(ref mut index) = self.query_start { adjust(index) }
-            if let Some(ref mut index) = self.fragment_start { adjust(index) }
-
-            self.serialization.push_str(&host_and_after);
-        } else if self.byte_at(self.username_end) == b':' {  // If there is a password to remove
-            let has_username_or_password = self.byte_at(self.host_start - 1) == b'@';
-            debug_assert!(has_username_or_password);
-            let username_start = self.scheme_end + 3;
-            let empty_username = username_start == self.username_end;
-            let start = self.username_end;  // Remove the ':'
-            let end = if empty_username {
-                self.host_start // Remove the '@' as well
-            } else {
-                self.host_start - 1  // Keep the '@' to separate the username from the host
-            };
-            self.serialization.drain(start as usize .. end as usize);
-            let offset = end - start;
-            self.host_start -= offset;
-            self.host_end -= offset;
-            self.path_start -= offset;
-            if let Some(ref mut index) = self.query_start { *index -= offset }
-            if let Some(ref mut index) = self.fragment_start { *index -= offset }
-        }
-        Ok(())
-    }
-
-    /// Change this URL’s username.
-    ///
-    /// If this URL is cannot-be-a-base or does not have a host, do nothing and return `Err`.
-    /// # Examples
-    ///
-    /// Cannot setup username from mailto(cannot-be-base)
-    ///
-    /// ```rust
-    /// use url::{Url, ParseError};
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let mut url = Url::parse("mailto:rmz@example.com")?;
-    /// let result = url.set_username("user1");
-    /// assert_eq!(url.as_str(), "mailto:rmz@example.com");
-    /// assert!(result.is_err());
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    ///
-    /// Setup username to user1
-    /// ```rust
-    /// use url::{Url, ParseError};
-    ///
-    /// # fn run() -> Result<(), ParseError> {
-    /// let mut url = Url::parse("ftp://:secre1@example.com")?;
-    /// let result = url.set_username("user1");
-    /// assert!(result.is_ok());
-    /// assert_eq!(url.username(), "user1");
-    /// assert_eq!(url.as_str(), "ftp://user1:secre1@example.com");
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    pub fn set_username(&mut self, username: &str) -> Result<(), ()> {
-        if !self.has_host() {
-            return Err(())
-        }
-        let username_start = self.scheme_end + 3;
-        debug_assert!(self.slice(self.scheme_end..username_start) == "://");
-        if self.slice(username_start..self.username_end) == username {
-            return Ok(())
-        }
-        let after_username = self.slice(self.username_end..).to_owned();
-        self.serialization.truncate(username_start as usize);
-        self.serialization.extend(utf8_percent_encode(username, USERINFO_ENCODE_SET));
-
-        let mut removed_bytes = self.username_end;
-        self.username_end = to_u32(self.serialization.len()).unwrap();
-        let mut added_bytes = self.username_end;
-
-        let new_username_is_empty = self.username_end == username_start;
-        match (new_username_is_empty, after_username.chars().next()) {
-            (true, Some('@')) => {
-                removed_bytes += 1;
-                self.serialization.push_str(&after_username[1..]);
-            }
-            (false, Some('@')) | (_, Some(':')) | (true, _) => {
-                self.serialization.push_str(&after_username);
-            }
-            (false, _) => {
-                added_bytes += 1;
-                self.serialization.push('@');
-                self.serialization.push_str(&after_username);
-            }
-        }
-
-        let adjust = |index: &mut u32| {
-            *index -= removed_bytes;
-            *index += added_bytes;
-        };
-        adjust(&mut self.host_start);
-        adjust(&mut self.host_end);
-        adjust(&mut self.path_start);
-        if let Some(ref mut index) = self.query_start { adjust(index) }
-        if let Some(ref mut index) = self.fragment_start { adjust(index) }
-        Ok(())
-    }
-
-    /// Change this URL’s scheme.
-    ///
-    /// Do nothing and return `Err` if:
-    ///
-    /// * The new scheme is not in `[a-zA-Z][a-zA-Z0-9+.-]+`
-    /// * This URL is cannot-be-a-base and the new scheme is one of
-    ///   `http`, `https`, `ws`, `wss`, `ftp`, or `gopher`
-    ///
-    /// # Examples
-    ///
-    /// Change the URL’s scheme from `https` to `foo`:
-    ///
-    /// ```
-    /// use url::Url;
-    /// # use url::ParseError;
-    /// 
-    /// # fn run() -> Result<(), ParseError> {
-    /// let mut url = Url::parse("https://example.net")?;
-    /// let result = url.set_scheme("foo");
-    /// assert_eq!(url.as_str(), "foo://example.net/");
-    /// assert!(result.is_ok());
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    ///
-    ///
-    /// Cannot change URL’s scheme from `https` to `foõ`:
-    ///
-    /// ```
-    /// use url::Url;
-    /// # use url::ParseError;
-    /// 
-    /// # fn run() -> Result<(), ParseError> {
-    /// let mut url = Url::parse("https://example.net")?;
-    /// let result = url.set_scheme("foõ");
-    /// assert_eq!(url.as_str(), "https://example.net/");
-    /// assert!(result.is_err());
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    ///
-    /// Cannot change URL’s scheme from `mailto` (cannot-be-a-base) to `https`:
-    ///
-    /// ```
-    /// use url::Url;
-    /// # use url::ParseError;
-    /// 
-    /// # fn run() -> Result<(), ParseError> {
-    /// let mut url = Url::parse("mailto:rms@example.net")?;
-    /// let result = url.set_scheme("https");
-    /// assert_eq!(url.as_str(), "mailto:rms@example.net");
-    /// assert!(result.is_err());
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    pub fn set_scheme(&mut self, scheme: &str) -> Result<(), ()> {
-        let mut parser = Parser::for_setter(String::new());
-        let remaining = parser.parse_scheme(parser::Input::new(scheme))?;
-        if !remaining.is_empty() ||
-                (!self.has_host() && SchemeType::from(&parser.serialization).is_special()) {
-            return Err(())
-        }
-        let old_scheme_end = self.scheme_end;
-        let new_scheme_end = to_u32(parser.serialization.len()).unwrap();
-        let adjust = |index: &mut u32| {
-            *index -= old_scheme_end;
-            *index += new_scheme_end;
-        };
-
-        self.scheme_end = new_scheme_end;
-        adjust(&mut self.username_end);
-        adjust(&mut self.host_start);
-        adjust(&mut self.host_end);
-        adjust(&mut self.path_start);
-        if let Some(ref mut index) = self.query_start { adjust(index) }
-        if let Some(ref mut index) = self.fragment_start { adjust(index) }
-
-        parser.serialization.push_str(self.slice(old_scheme_end..));
-        self.serialization = parser.serialization;
-        Ok(())
-    }
-
-    /// Convert a file name as `std::path::Path` into an URL in the `file` scheme.
-    ///
-    /// This returns `Err` if the given path is not absolute or,
-    /// on Windows, if the prefix is not a disk prefix (e.g. `C:`) or a UNC prefix (`\\`).
-    ///
-    /// # Examples
-    ///
-    /// On Unix-like platforms:
-    ///
-    /// ```
-    /// # if cfg!(unix) {
-    /// use url::Url;
-    /// 
-    /// # fn run() -> Result<(), ()> {
-    /// let url = Url::from_file_path("/tmp/foo.txt")?;
-    /// assert_eq!(url.as_str(), "file:///tmp/foo.txt");
-    ///
-    /// let url = Url::from_file_path("../foo.txt");
-    /// assert!(url.is_err());
-    ///
-    /// let url = Url::from_file_path("https://google.com/");
-    /// assert!(url.is_err());
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// # }
-    /// ```
-    pub fn from_file_path<P: AsRef<Path>>(path: P) -> Result<Url, ()> {
-        let mut serialization = "file://".to_owned();
-        let host_start = serialization.len() as u32;
-        let (host_end, host) = path_to_file_url_segments(path.as_ref(), &mut serialization)?;
-        Ok(Url {
-            serialization: serialization,
-            scheme_end: "file".len() as u32,
-            username_end: host_start,
-            host_start: host_start,
-            host_end: host_end,
-            host: host,
-            port: None,
-            path_start: host_end,
-            query_start: None,
-            fragment_start: None,
-        })
-    }
-
-    /// Convert a directory name as `std::path::Path` into an URL in the `file` scheme.
-    ///
-    /// This returns `Err` if the given path is not absolute or,
-    /// on Windows, if the prefix is not a disk prefix (e.g. `C:`) or a UNC prefix (`\\`).
-    ///
-    /// Compared to `from_file_path`, this ensure that URL’s the path has a trailing slash
-    /// so that the entire path is considered when using this URL as a base URL.
-    ///
-    /// For example:
-    ///
-    /// * `"index.html"` parsed with `Url::from_directory_path(Path::new("/var/www"))`
-    ///   as the base URL is `file:///var/www/index.html`
-    /// * `"index.html"` parsed with `Url::from_file_path(Path::new("/var/www"))`
-    ///   as the base URL is `file:///var/index.html`, which might not be what was intended.
-    ///
-    /// Note that `std::path` does not consider trailing slashes significant
-    /// and usually does not include them (e.g. in `Path::parent()`).
-    pub fn from_directory_path<P: AsRef<Path>>(path: P) -> Result<Url, ()> {
-        let mut url = Url::from_file_path(path)?;
-        if !url.serialization.ends_with('/') {
-            url.serialization.push('/')
-        }
-        Ok(url)
-    }
-
-    /// Serialize with Serde using the internal representation of the `Url` struct.
-    ///
-    /// The corresponding `deserialize_internal` method sacrifices some invariant-checking
-    /// for speed, compared to the `Deserialize` trait impl.
-    ///
-    /// This method is only available if the `serde` Cargo feature is enabled.
-    #[cfg(feature = "serde")]
-    #[deny(unused)]
-    pub fn serialize_internal<S>(&self, serializer: &mut S) -> Result<(), S::Error> where S: serde::Serializer {
-        use serde::Serialize;
-        // Destructuring first lets us ensure that adding or removing fields forces this method
-        // to be updated
-        let Url { ref serialization, ref scheme_end,
-                  ref username_end, ref host_start,
-                  ref host_end, ref host, ref port,
-                  ref path_start, ref query_start,
-                  ref fragment_start} = *self;
-        (serialization, scheme_end, username_end,
-         host_start, host_end, host, port, path_start,
-         query_start, fragment_start).serialize(serializer)
-    }
-
-    /// Serialize with Serde using the internal representation of the `Url` struct.
-    ///
-    /// The corresponding `deserialize_internal` method sacrifices some invariant-checking
-    /// for speed, compared to the `Deserialize` trait impl.
-    ///
-    /// This method is only available if the `serde` Cargo feature is enabled.
-    #[cfg(feature = "serde")]
-    #[deny(unused)]
-    pub fn deserialize_internal<D>(deserializer: &mut D) -> Result<Self, D::Error> where D: serde::Deserializer {
-        use serde::{Deserialize, Error};
-        let (serialization, scheme_end, username_end,
-             host_start, host_end, host, port, path_start,
-             query_start, fragment_start) = Deserialize::deserialize(deserializer)?;
-        let url = Url {
-            serialization: serialization,
-            scheme_end: scheme_end,
-            username_end: username_end,
-            host_start: host_start,
-            host_end: host_end,
-            host: host,
-            port: port,
-            path_start: path_start,
-            query_start: query_start,
-            fragment_start: fragment_start
-        };
-        if cfg!(debug_assertions) {
-            url.check_invariants().map_err(|ref reason| Error::invalid_value(&reason))?
-        }
-        Ok(url)
-    }
-
-
-    /// Assuming the URL is in the `file` scheme or similar,
-    /// convert its path to an absolute `std::path::Path`.
-    ///
-    /// **Note:** This does not actually check the URL’s `scheme`,
-    /// and may give nonsensical results for other schemes.
-    /// It is the user’s responsibility to check the URL’s scheme before calling this.
-    ///
-    /// ```
-    /// # use url::Url;
-    /// # let url = Url::parse("file:///etc/passwd").unwrap();
-    /// let path = url.to_file_path();
-    /// ```
-    ///
-    /// Returns `Err` if the host is neither empty nor `"localhost"` (except on Windows, where
-    /// `file:` URLs may have a non-local host),
-    /// or if `Path::new_opt()` returns `None`.
-    /// (That is, if the percent-decoded path contains a NUL byte or,
-    /// for a Windows path, is not UTF-8.)
-    #[inline]
-    pub fn to_file_path(&self) -> Result<PathBuf, ()> {
-        if let Some(segments) = self.path_segments() {
-            let host = match self.host() {
-                None | Some(Host::Domain("localhost")) => None,
-                Some(_) if cfg!(windows) && self.scheme() == "file" => {
-                    Some(&self.serialization[self.host_start as usize .. self.host_end as usize])
-                },
-                _ => return Err(())
-            };
-
-            return file_url_segments_to_pathbuf(host, segments);
-        }
-        Err(())
-    }
-
-    // Private helper methods:
-
-    #[inline]
-    fn slice<R>(&self, range: R) -> &str where R: RangeArg {
-        range.slice_of(&self.serialization)
-    }
-
-    #[inline]
-    fn byte_at(&self, i: u32) -> u8 {
-        self.serialization.as_bytes()[i as usize]
-    }
-}
-
-/// Return an error if `Url::host` or `Url::port_or_known_default` return `None`.
-impl ToSocketAddrs for Url {
-    type Iter = SocketAddrs;
-
-    fn to_socket_addrs(&self) -> io::Result<Self::Iter> {
-        self.with_default_port(|_| Err(()))?.to_socket_addrs()
-    }
-}
-
-/// Parse a string as an URL, without a base URL or encoding override.
-impl str::FromStr for Url {
-    type Err = ParseError;
-
-    #[inline]
-    fn from_str(input: &str) -> Result<Url, ::ParseError> {
-        Url::parse(input)
-    }
-}
-
-/// Display the serialization of this URL.
-impl fmt::Display for Url {
-    #[inline]
-    fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Display::fmt(&self.serialization, formatter)
-    }
-}
-
-/// Debug the serialization of this URL.
-impl fmt::Debug for Url {
-    #[inline]
-    fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
-        fmt::Debug::fmt(&self.serialization, formatter)
-    }
-}
-
-/// URLs compare like their serialization.
-impl Eq for Url {}
-
-/// URLs compare like their serialization.
-impl PartialEq for Url {
-    #[inline]
-    fn eq(&self, other: &Self) -> bool {
-        self.serialization == other.serialization
-    }
-}
-
-/// URLs compare like their serialization.
-impl Ord for Url {
-    #[inline]
-    fn cmp(&self, other: &Self) -> cmp::Ordering {
-        self.serialization.cmp(&other.serialization)
-    }
-}
-
-/// URLs compare like their serialization.
-impl PartialOrd for Url {
-    #[inline]
-    fn partial_cmp(&self, other: &Self) -> Option<cmp::Ordering> {
-        self.serialization.partial_cmp(&other.serialization)
-    }
-}
-
-/// URLs hash like their serialization.
-impl hash::Hash for Url {
-    #[inline]
-    fn hash<H>(&self, state: &mut H) where H: hash::Hasher {
-        hash::Hash::hash(&self.serialization, state)
-    }
-}
-
-/// Return the serialization of this URL.
-impl AsRef<str> for Url {
-    #[inline]
-    fn as_ref(&self) -> &str {
-        &self.serialization
-    }
-}
-
-trait RangeArg {
-    fn slice_of<'a>(&self, s: &'a str) -> &'a str;
-}
-
-impl RangeArg for Range<u32> {
-    #[inline]
-    fn slice_of<'a>(&self, s: &'a str) -> &'a str {
-        &s[self.start as usize .. self.end as usize]
-    }
-}
-
-impl RangeArg for RangeFrom<u32> {
-    #[inline]
-    fn slice_of<'a>(&self, s: &'a str) -> &'a str {
-        &s[self.start as usize ..]
-    }
-}
-
-impl RangeArg for RangeTo<u32> {
-    #[inline]
-    fn slice_of<'a>(&self, s: &'a str) -> &'a str {
-        &s[.. self.end as usize]
-    }
-}
-
-#[cfg(feature="rustc-serialize")]
-impl rustc_serialize::Encodable for Url {
-    fn encode<S: rustc_serialize::Encoder>(&self, encoder: &mut S) -> Result<(), S::Error> {
-        encoder.emit_str(self.as_str())
-    }
-}
-
-
-#[cfg(feature="rustc-serialize")]
-impl rustc_serialize::Decodable for Url {
-    fn decode<D: rustc_serialize::Decoder>(decoder: &mut D) -> Result<Url, D::Error> {
-        Url::parse(&*decoder.read_str()?).map_err(|error| {
-            decoder.error(&format!("URL parsing error: {}", error))
-        })
-    }
-}
-
-/// Serializes this URL into a `serde` stream.
-///
-/// This implementation is only available if the `serde` Cargo feature is enabled.
-#[cfg(feature="serde")]
-impl serde::Serialize for Url {
-    fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error> where S: serde::Serializer {
-        serializer.serialize_str(self.as_str())
-    }
-}
-
-/// Deserializes this URL from a `serde` stream.
-///
-/// This implementation is only available if the `serde` Cargo feature is enabled.
-#[cfg(feature="serde")]
-impl serde::Deserialize for Url {
-    fn deserialize<D>(deserializer: &mut D) -> Result<Url, D::Error> where D: serde::Deserializer {
-        let string_representation: String = serde::Deserialize::deserialize(deserializer)?;
-        Url::parse(&string_representation).map_err(|err| {
-            serde::Error::invalid_value(err.description())
-        })
-    }
-}
-
-#[cfg(any(unix, target_os = "redox"))]
-fn path_to_file_url_segments(path: &Path, serialization: &mut String)
-                             -> Result<(u32, HostInternal), ()> {
-    use std::os::unix::prelude::OsStrExt;
-    if !path.is_absolute() {
-        return Err(())
-    }
-    let host_end = to_u32(serialization.len()).unwrap();
-    let mut empty = true;
-    // skip the root component
-    for component in path.components().skip(1) {
-        empty = false;
-        serialization.push('/');
-        serialization.extend(percent_encode(
-            component.as_os_str().as_bytes(), PATH_SEGMENT_ENCODE_SET));
-    }
-    if empty {
-        // An URL’s path must not be empty.
-        serialization.push('/');
-    }
-    Ok((host_end, HostInternal::None))
-}
-
-#[cfg(windows)]
-fn path_to_file_url_segments(path: &Path, serialization: &mut String)
-                             -> Result<(u32, HostInternal), ()> {
-    path_to_file_url_segments_windows(path, serialization)
-}
-
-// Build this unconditionally to alleviate https://github.com/servo/rust-url/issues/102
-#[cfg_attr(not(windows), allow(dead_code))]
-fn path_to_file_url_segments_windows(path: &Path, serialization: &mut String)
-                                     -> Result<(u32, HostInternal), ()> {
-    use std::path::{Prefix, Component};
-    if !path.is_absolute() {
-        return Err(())
-    }
-    let mut components = path.components();
-
-    let host_end;
-    let host_internal;
-    match components.next() {
-        Some(Component::Prefix(ref p)) => match p.kind() {
-            Prefix::Disk(letter) | Prefix::VerbatimDisk(letter) => {
-                host_end = to_u32(serialization.len()).unwrap();
-                host_internal = HostInternal::None;
-                serialization.push('/');
-                serialization.push(letter as char);
-                serialization.push(':');
-            },
-            Prefix::UNC(server, share) | Prefix::VerbatimUNC(server, share) => {
-                let host = Host::parse(server.to_str().ok_or(())?).map_err(|_| ())?;
-                write!(serialization, "{}", host).unwrap();
-                host_end = to_u32(serialization.len()).unwrap();
-                host_internal = host.into();
-                serialization.push('/');
-                let share = share.to_str().ok_or(())?;
-                serialization.extend(percent_encode(share.as_bytes(), PATH_SEGMENT_ENCODE_SET));
-            },
-            _ => return Err(())
-        },
-
-        _ => return Err(())
-    }
-
-    for component in components {
-        if component == Component::RootDir { continue }
-        // FIXME: somehow work with non-unicode?
-        let component = component.as_os_str().to_str().ok_or(())?;
-        serialization.push('/');
-        serialization.extend(percent_encode(component.as_bytes(), PATH_SEGMENT_ENCODE_SET));
-    }
-    Ok((host_end, host_internal))
-}
-
-#[cfg(any(unix, target_os = "redox"))]
-fn file_url_segments_to_pathbuf(host: Option<&str>, segments: str::Split<char>) -> Result<PathBuf, ()> {
-    use std::ffi::OsStr;
-    use std::os::unix::prelude::OsStrExt;
-    use std::path::PathBuf;
-
-    if host.is_some() {
-        return Err(());
-    }
-
-    let mut bytes = Vec::new();
-    for segment in segments {
-        bytes.push(b'/');
-        bytes.extend(percent_decode(segment.as_bytes()));
-    }
-    let os_str = OsStr::from_bytes(&bytes);
-    let path = PathBuf::from(os_str);
-    debug_assert!(path.is_absolute(),
-                  "to_file_path() failed to produce an absolute Path");
-    Ok(path)
-}
-
-#[cfg(windows)]
-fn file_url_segments_to_pathbuf(host: Option<&str>, segments: str::Split<char>) -> Result<PathBuf, ()> {
-    file_url_segments_to_pathbuf_windows(host, segments)
-}
-
-// Build this unconditionally to alleviate https://github.com/servo/rust-url/issues/102
-#[cfg_attr(not(windows), allow(dead_code))]
-fn file_url_segments_to_pathbuf_windows(host: Option<&str>, mut segments: str::Split<char>) -> Result<PathBuf, ()> {
-
-    let mut string = if let Some(host) = host {
-        r"\\".to_owned() + host
-    } else {
-        let first = segments.next().ok_or(())?;
-
-        match first.len() {
-            2 => {
-                if !first.starts_with(parser::ascii_alpha) || first.as_bytes()[1] != b':' {
-                    return Err(())
-                }
-
-                first.to_owned()
-            },
-
-            4 => {
-                if !first.starts_with(parser::ascii_alpha) {
-                    return Err(())
-                }
-                let bytes = first.as_bytes();
-                if bytes[1] != b'%' || bytes[2] != b'3' || (bytes[3] != b'a' && bytes[3] != b'A') {
-                    return Err(())
-                }
-
-                first[0..1].to_owned() + ":"
-            },
-
-            _ => return Err(()),
-        }
-    };
-
-    for segment in segments {
-        string.push('\\');
-
-        // Currently non-unicode windows paths cannot be represented
-        match String::from_utf8(percent_decode(segment.as_bytes()).collect()) {
-            Ok(s) => string.push_str(&s),
-            Err(..) => return Err(()),
-        }
-    }
-    let path = PathBuf::from(string);
-    debug_assert!(path.is_absolute(),
-                  "to_file_path() failed to produce an absolute Path");
-    Ok(path)
-}
-
-fn io_error<T>(reason: &str) -> io::Result<T> {
-    Err(io::Error::new(io::ErrorKind::InvalidData, reason))
-}
-
-/// Implementation detail of `Url::query_pairs_mut`. Typically not used directly.
-#[derive(Debug)]
-pub struct UrlQuery<'a> {
-    url: &'a mut Url,
-    fragment: Option<String>,
-}
-
-impl<'a> Drop for UrlQuery<'a> {
-    fn drop(&mut self) {
-        self.url.restore_already_parsed_fragment(self.fragment.take())
-    }
-}
-
-
-/// Define a new struct
-/// that implements the [`EncodeSet`](percent_encoding/trait.EncodeSet.html) trait,
-/// for use in [`percent_decode()`](percent_encoding/fn.percent_encode.html)
-/// and related functions.
-///
-/// Parameters are characters to include in the set in addition to those of the base set.
-/// See [encode sets specification](http://url.spec.whatwg.org/#simple-encode-set).
-///
-/// Example
-/// =======
-///
-/// ```rust
-/// #[macro_use] extern crate url;
-/// use url::percent_encoding::{utf8_percent_encode, SIMPLE_ENCODE_SET};
-/// define_encode_set! {
-///     /// This encode set is used in the URL parser for query strings.
-///     pub QUERY_ENCODE_SET = [SIMPLE_ENCODE_SET] | {' ', '"', '#', '<', '>'}
-/// }
-/// # fn main() {
-/// assert_eq!(utf8_percent_encode("foo bar", QUERY_ENCODE_SET).collect::<String>(), "foo%20bar");
-/// # }
-/// ```
-#[macro_export]
-macro_rules! define_encode_set {
-    ($(#[$attr: meta])* pub $name: ident = [$base_set: expr] | {$($ch: pat),*}) => {
-        $(#[$attr])*
-        #[derive(Copy, Clone)]
-        #[allow(non_camel_case_types)]
-        pub struct $name;
-
-        impl $crate::percent_encoding::EncodeSet for $name {
-            #[inline]
-            fn contains(&self, byte: u8) -> bool {
-                match byte as char {
-                    $(
-                        $ch => true,
-                    )*
-                    _ => $base_set.contains(byte)
-                }
-            }
-        }
-    }
-}
deleted file mode 100644
--- a/third_party/rust/url-1.5.1/src/origin.rs
+++ /dev/null
@@ -1,130 +0,0 @@
-// Copyright 2016 The rust-url developers.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#[cfg(feature = "heapsize")] use heapsize::HeapSizeOf;
-use host::Host;
-use idna::domain_to_unicode;
-use parser::default_port;
-use std::sync::atomic::{AtomicUsize, ATOMIC_USIZE_INIT, Ordering};
-use Url;
-
-pub fn url_origin(url: &Url) -> Origin {
-    let scheme = url.scheme();
-    match scheme {
-        "blob" => {
-            let result = Url::parse(url.path());
-            match result {
-                Ok(ref url) => url_origin(url),
-                Err(_)  => Origin::new_opaque()
-            }
-        },
-        "ftp" | "gopher" | "http" | "https" | "ws" | "wss" => {
-            Origin::Tuple(scheme.to_owned(), url.host().unwrap().to_owned(),
-                url.port_or_known_default().unwrap())
-        },
-        // TODO: Figure out what to do if the scheme is a file
-        "file" => Origin::new_opaque(),
-        _ => Origin::new_opaque()
-    }
-}
-
-/// The origin of an URL
-///
-/// Two URLs with the same origin are considered
-/// to originate from the same entity and can therefore trust
-/// each other.
-///
-/// The origin is determined based on the scheme as follows:
-///
-/// - If the scheme is "blob" the origin is the origin of the
-///   URL contained in the path component. If parsing fails,
-///   it is an opaque origin.
-/// - If the scheme is "ftp", "gopher", "http", "https", "ws", or "wss",
-///   then the origin is a tuple of the scheme, host, and port.
-/// - If the scheme is anything else, the origin is opaque, meaning
-///   the URL does not have the same origin as any other URL.
-///
-/// For more information see https://url.spec.whatwg.org/#origin
-#[derive(PartialEq, Eq, Hash, Clone, Debug)]
-pub enum Origin {
-    /// A globally unique identifier
-    Opaque(OpaqueOrigin),
-
-    /// Consists of the URL's scheme, host and port
-    Tuple(String, Host<String>, u16)
-}
-
-#[cfg(feature = "heapsize")]
-impl HeapSizeOf for Origin {
-    fn heap_size_of_children(&self) -> usize {
-        match *self {
-            Origin::Tuple(ref scheme, ref host, _) => {
-                scheme.heap_size_of_children() +
-                host.heap_size_of_children()
-            },
-            _ => 0,
-        }
-    }
-}
-
-
-impl Origin {
-    /// Creates a new opaque origin that is only equal to itself.
-    pub fn new_opaque() -> Origin {
-        static COUNTER: AtomicUsize = ATOMIC_USIZE_INIT;
-        Origin::Opaque(OpaqueOrigin(COUNTER.fetch_add(1, Ordering::SeqCst)))
-    }
-
-    /// Return whether this origin is a (scheme, host, port) tuple
-    /// (as opposed to an opaque origin).
-    pub fn is_tuple(&self) -> bool {
-        matches!(*self, Origin::Tuple(..))
-    }
-
-    /// https://html.spec.whatwg.org/multipage/#ascii-serialisation-of-an-origin
-    pub fn ascii_serialization(&self) -> String {
-        match *self {
-            Origin::Opaque(_) => "null".to_owned(),
-            Origin::Tuple(ref scheme, ref host, port) => {
-                if default_port(scheme) == Some(port) {
-                    format!("{}://{}", scheme, host)
-                } else {
-                    format!("{}://{}:{}", scheme, host, port)
-                }
-            }
-        }
-    }
-
-    /// https://html.spec.whatwg.org/multipage/#unicode-serialisation-of-an-origin
-    pub fn unicode_serialization(&self) -> String {
-        match *self {
-            Origin::Opaque(_) => "null".to_owned(),
-            Origin::Tuple(ref scheme, ref host, port) => {
-                let host = match *host {
-                    Host::Domain(ref domain) => {
-                        let (domain, _errors) = domain_to_unicode(domain);
-                        Host::Domain(domain)
-                    }
-                    _ => host.clone()
-                };
-                if default_port(scheme) == Some(port) {
-                    format!("{}://{}", scheme, host)
-                } else {
-                    format!("{}://{}:{}", scheme, host, port)
-                }
-            }
-        }
-    }
-}
-
-/// Opaque identifier for URLs that have file or other schemes
-#[derive(Eq, PartialEq, Hash, Clone, Debug)]
-pub struct OpaqueOrigin(usize);
-
-#[cfg(feature = "heapsize")]
-known_heap_size!(0, OpaqueOrigin);
deleted file mode 100644
--- a/third_party/rust/url-1.5.1/src/parser.rs
+++ /dev/null
@@ -1,1182 +0,0 @@
-// Copyright 2013-2016 The rust-url developers.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::ascii::AsciiExt;
-use std::error::Error;
-use std::fmt::{self, Formatter, Write};
-use std::str;
-
-use Url;
-use encoding::EncodingOverride;
-use host::{Host, HostInternal};
-use percent_encoding::{
-    utf8_percent_encode, percent_encode,
-    SIMPLE_ENCODE_SET, DEFAULT_ENCODE_SET, USERINFO_ENCODE_SET, QUERY_ENCODE_SET,
-    PATH_SEGMENT_ENCODE_SET
-};
-
-pub type ParseResult<T> = Result<T, ParseError>;
-
-macro_rules! simple_enum_error {
-    ($($name: ident => $description: expr,)+) => {
-        /// Errors that can occur during parsing.
-        #[derive(PartialEq, Eq, Clone, Copy, Debug)]
-        pub enum ParseError {
-            $(
-                $name,
-            )+
-        }
-
-        impl Error for ParseError {
-            fn description(&self) -> &str {
-                match *self {
-                    $(
-                        ParseError::$name => $description,
-                    )+
-                }
-            }
-        }
-    }
-}
-
-simple_enum_error! {
-    EmptyHost => "empty host",
-    IdnaError => "invalid international domain name",
-    InvalidPort => "invalid port number",
-    InvalidIpv4Address => "invalid IPv4 address",
-    InvalidIpv6Address => "invalid IPv6 address",
-    InvalidDomainCharacter => "invalid domain character",
-    RelativeUrlWithoutBase => "relative URL without a base",
-    RelativeUrlWithCannotBeABaseBase => "relative URL with a cannot-be-a-base base",
-    SetHostOnCannotBeABaseUrl => "a cannot-be-a-base URL doesn’t have a host to set",
-    Overflow => "URLs more than 4 GB are not supported",
-}
-
-#[cfg(feature = "heapsize")]
-known_heap_size!(0, ParseError);
-
-impl fmt::Display for ParseError {
-    fn fmt(&self, fmt: &mut Formatter) -> fmt::Result {
-        self.description().fmt(fmt)
-    }
-}
-
-impl From<::idna::uts46::Errors> for ParseError {
-    fn from(_: ::idna::uts46::Errors) -> ParseError { ParseError::IdnaError }
-}
-
-#[derive(Copy, Clone)]
-pub enum SchemeType {
-    File,
-    SpecialNotFile,
-    NotSpecial,
-}
-
-impl SchemeType {
-    pub fn is_special(&self) -> bool {
-        !matches!(*self, SchemeType::NotSpecial)
-    }
-
-    pub fn is_file(&self) -> bool {
-        matches!(*self, SchemeType::File)
-    }
-
-    pub fn from(s: &str) -> Self {
-        match s {
-            "http" | "https" | "ws" | "wss" | "ftp" | "gopher" => SchemeType::SpecialNotFile,
-            "file" => SchemeType::File,
-            _ => SchemeType::NotSpecial,
-        }
-    }
-}
-
-pub fn default_port(scheme: &str) -> Option<u16> {
-    match scheme {
-        "http" | "ws" => Some(80),
-        "https" | "wss" => Some(443),
-        "ftp" => Some(21),
-        "gopher" => Some(70),
-        _ => None,
-    }
-}
-
-#[derive(Clone)]
-pub struct Input<'i> {
-    chars: str::Chars<'i>,
-}
-
-impl<'i> Input<'i> {
-    pub fn new(input: &'i str) -> Self {
-        Input::with_log(input, None)
-    }
-
-    pub fn with_log(original_input: &'i str, log_syntax_violation: Option<&Fn(&'static str)>)
-                    -> Self {
-        let input = original_input.trim_matches(c0_control_or_space);
-        if let Some(log) = log_syntax_violation {
-            if input.len() < original_input.len() {
-                log("leading or trailing control or space character are ignored in URLs")
-            }
-            if input.chars().any(|c| matches!(c, '\t' | '\n' | '\r')) {
-                log("tabs or newlines are ignored in URLs")
-            }
-        }
-        Input { chars: input.chars() }
-    }
-
-    #[inline]
-    pub fn is_empty(&self) -> bool {
-        self.clone().next().is_none()
-    }
-
-    #[inline]
-    fn starts_with<P: Pattern>(&self, p: P) -> bool {
-        p.split_prefix(&mut self.clone())
-    }
-
-    #[inline]
-    pub fn split_prefix<P: Pattern>(&self, p: P) -> Option<Self> {
-        let mut remaining = self.clone();
-        if p.split_prefix(&mut remaining) {
-            Some(remaining)
-        } else {
-            None
-        }
-    }
-
-    #[inline]
-    fn split_first(&self) -> (Option<char>, Self) {
-        let mut remaining = self.clone();
-        (remaining.next(), remaining)
-    }
-
-    #[inline]
-    fn count_matching<F: Fn(char) -> bool>(&self, f: F) -> (u32, Self) {
-        let mut count = 0;
-        let mut remaining = self.clone();
-        loop {
-            let mut input = remaining.clone();
-            if matches!(input.next(), Some(c) if f(c)) {
-                remaining = input;
-                count += 1;
-            } else {
-                return (count, remaining)
-            }
-        }
-    }
-
-    #[inline]
-    fn next_utf8(&mut self) -> Option<(char, &'i str)> {
-        loop {
-            let utf8 = self.chars.as_str();
-            match self.chars.next() {
-                Some(c) => {
-                    if !matches!(c, '\t' | '\n' | '\r') {
-                        return Some((c, &utf8[..c.len_utf8()]))
-                    }
-                }
-                None => return None
-            }
-        }
-    }
-}
-
-pub trait Pattern {
-    fn split_prefix<'i>(self, input: &mut Input<'i>) -> bool;
-}
-
-impl Pattern for char {
-    fn split_prefix<'i>(self, input: &mut Input<'i>) -> bool { input.next() == Some(self) }
-}
-
-impl<'a> Pattern for &'a str {
-    fn split_prefix<'i>(self, input: &mut Input<'i>) -> bool {
-        for c in self.chars() {
-            if input.next() != Some(c) {
-                return false
-            }
-        }
-        true
-    }
-}
-
-impl<F: FnMut(char) -> bool> Pattern for F {
-    fn split_prefix<'i>(self, input: &mut Input<'i>) -> bool { input.next().map_or(false, self) }
-}
-
-impl<'i> Iterator for Input<'i> {
-    type Item = char;
-    fn next(&mut self) -> Option<char> {
-        self.chars.by_ref().find(|&c| !matches!(c, '\t' | '\n' | '\r'))
-    }
-}
-
-pub struct Parser<'a> {
-    pub serialization: String,
-    pub base_url: Option<&'a Url>,
-    pub query_encoding_override: EncodingOverride,
-    pub log_syntax_violation: Option<&'a Fn(&'static str)>,
-    pub context: Context,
-}
-
-#[derive(PartialEq, Eq, Copy, Clone)]
-pub enum Context {
-    UrlParser,
-    Setter,
-    PathSegmentSetter,
-}
-
-impl<'a> Parser<'a> {
-    pub fn for_setter(serialization: String) -> Parser<'a> {
-        Parser {
-            serialization: serialization,
-            base_url: None,
-            query_encoding_override: EncodingOverride::utf8(),
-            log_syntax_violation: None,
-            context: Context::Setter,
-        }
-    }
-
-    fn syntax_violation(&self, reason: &'static str) {
-        if let Some(log) = self.log_syntax_violation {
-            log(reason)
-        }
-    }
-
-    fn syntax_violation_if<F: Fn() -> bool>(&self, reason: &'static str, test: F) {
-        // Skip test if not logging.
-        if let Some(log) = self.log_syntax_violation {
-            if test() {
-                log(reason)
-            }
-        }
-    }
-
-    /// https://url.spec.whatwg.org/#concept-basic-url-parser
-    pub fn parse_url(mut self, input: &str) -> ParseResult<Url> {
-        let input = Input::with_log(input, self.log_syntax_violation);
-        if let Ok(remaining) = self.parse_scheme(input.clone()) {
-            return self.parse_with_scheme(remaining)
-        }
-
-        // No-scheme state
-        if let Some(base_url) = self.base_url {
-            if input.starts_with('#') {
-                self.fragment_only(base_url, input)
-            } else if base_url.cannot_be_a_base() {
-                Err(ParseError::RelativeUrlWithCannotBeABaseBase)
-            } else {
-                let scheme_type = SchemeType::from(base_url.scheme());
-                if scheme_type.is_file() {
-                    self.parse_file(input, Some(base_url))
-                } else {
-                    self.parse_relative(input, scheme_type, base_url)
-                }
-            }
-        } else {
-            Err(ParseError::RelativeUrlWithoutBase)
-        }
-    }
-
-    pub fn parse_scheme<'i>(&mut self, mut input: Input<'i>) -> Result<Input<'i>, ()> {
-        if input.is_empty() || !input.starts_with(ascii_alpha) {
-            return Err(())
-        }
-        debug_assert!(self.serialization.is_empty());
-        while let Some(c) = input.next() {
-            match c {
-                'a'...'z' | 'A'...'Z' | '0'...'9' | '+' | '-' | '.' => {
-                    self.serialization.push(c.to_ascii_lowercase())
-                }
-                ':' => return Ok(input),
-                _ => {
-                    self.serialization.clear();
-                    return Err(())
-                }
-            }
-        }
-        // EOF before ':'
-        if self.context == Context::Setter {
-            Ok(input)
-        } else {
-            self.serialization.clear();
-            Err(())
-        }
-    }
-
-    fn parse_with_scheme(mut self, input: Input) -> ParseResult<Url> {
-        let scheme_end = to_u32(self.serialization.len())?;
-        let scheme_type = SchemeType::from(&self.serialization);
-        self.serialization.push(':');
-        match scheme_type {
-            SchemeType::File => {
-                self.syntax_violation_if("expected // after file:", || !input.starts_with("//"));
-                let base_file_url = self.base_url.and_then(|base| {
-                    if base.scheme() == "file" { Some(base) } else { None }
-                });
-                self.serialization.clear();
-                self.parse_file(input, base_file_url)
-            }
-            SchemeType::SpecialNotFile => {
-                // special relative or authority state
-                let (slashes_count, remaining) = input.count_matching(|c| matches!(c, '/' | '\\'));
-                if let Some(base_url) = self.base_url {
-                    if slashes_count < 2 &&
-                            base_url.scheme() == &self.serialization[..scheme_end as usize] {
-                        // "Cannot-be-a-base" URLs only happen with "not special" schemes.
-                        debug_assert!(!base_url.cannot_be_a_base());
-                        self.serialization.clear();
-                        return self.parse_relative(input, scheme_type, base_url)
-                    }
-                }
-                // special authority slashes state
-                self.syntax_violation_if("expected //", || {
-                    input.clone().take_while(|&c| matches!(c, '/' | '\\'))
-                    .collect::<String>() != "//"
-                });
-                self.after_double_slash(remaining, scheme_type, scheme_end)
-            }
-            SchemeType::NotSpecial => self.parse_non_special(input, scheme_type, scheme_end)
-        }
-    }
-
-    /// Scheme other than file, http, https, ws, ws, ftp, gopher.
-    fn parse_non_special(mut self, input: Input, scheme_type: SchemeType, scheme_end: u32)
-                         -> ParseResult<Url> {
-        // path or authority state (
-        if let Some(input) = input.split_prefix("//") {
-            return self.after_double_slash(input, scheme_type, scheme_end)
-        }
-        // Anarchist URL (no authority)
-        let path_start = to_u32(self.serialization.len())?;
-        let username_end = path_start;
-        let host_start = path_start;
-        let host_end = path_start;
-        let host = HostInternal::None;
-        let port = None;
-        let remaining = if let Some(input) = input.split_prefix('/') {
-            let path_start = self.serialization.len();
-            self.serialization.push('/');
-            self.parse_path(scheme_type, &mut false, path_start, input)
-        } else {
-            self.parse_cannot_be_a_base_path(input)
-        };
-        self.with_query_and_fragment(scheme_end, username_end, host_start,
-                                     host_end, host, port, path_start, remaining)
-    }
-
-    fn parse_file(mut self, input: Input, mut base_file_url: Option<&Url>) -> ParseResult<Url> {
-        // file state
-        debug_assert!(self.serialization.is_empty());
-        let (first_char, input_after_first_char) = input.split_first();
-        match first_char {
-            None => {
-                if let Some(base_url) = base_file_url {
-                    // Copy everything except the fragment
-                    let before_fragment = match base_url.fragment_start {
-                        Some(i) => &base_url.serialization[..i as usize],
-                        None => &*base_url.serialization,
-                    };
-                    self.serialization.push_str(before_fragment);
-                    Ok(Url {
-                        serialization: self.serialization,
-                        fragment_start: None,
-                        ..*base_url
-                    })
-                } else {
-                    self.serialization.push_str("file:///");
-                    let scheme_end = "file".len() as u32;
-                    let path_start = "file://".len() as u32;
-                    Ok(Url {
-                        serialization: self.serialization,
-                        scheme_end: scheme_end,
-                        username_end: path_start,
-                        host_start: path_start,
-                        host_end: path_start,
-                        host: HostInternal::None,
-                        port: None,
-                        path_start: path_start,
-                        query_start: None,
-                        fragment_start: None,
-                    })
-                }
-            },
-            Some('?') => {
-                if let Some(base_url) = base_file_url {
-                    // Copy everything up to the query string
-                    let before_query = match (base_url.query_start, base_url.fragment_start) {
-                        (None, None) => &*base_url.serialization,
-                        (Some(i), _) |
-                        (None, Some(i)) => base_url.slice(..i)
-                    };
-                    self.serialization.push_str(before_query);
-                    let (query_start, fragment_start) =
-                        self.parse_query_and_fragment(base_url.scheme_end, input)?;
-                    Ok(Url {
-                        serialization: self.serialization,
-                        query_start: query_start,
-                        fragment_start: fragment_start,
-                        ..*base_url
-                    })
-                } else {
-                    self.serialization.push_str("file:///");
-                    let scheme_end = "file".len() as u32;
-                    let path_start = "file://".len() as u32;
-                    let (query_start, fragment_start) =
-                        self.parse_query_and_fragment(scheme_end, input)?;
-                    Ok(Url {
-                        serialization: self.serialization,
-                        scheme_end: scheme_end,
-                        username_end: path_start,
-                        host_start: path_start,
-                        host_end: path_start,
-                        host: HostInternal::None,
-                        port: None,
-                        path_start: path_start,
-                        query_start: query_start,
-                        fragment_start: fragment_start,
-                    })
-                }
-            },
-            Some('#') => {
-                if let Some(base_url) = base_file_url {
-                    self.fragment_only(base_url, input)
-                } else {
-                    self.serialization.push_str("file:///");
-                    let scheme_end = "file".len() as u32;
-                    let path_start = "file://".len() as u32;
-                    let fragment_start = "file:///".len() as u32;
-                    self.parse_fragment(input_after_first_char);
-                    Ok(Url {
-                        serialization: self.serialization,
-                        scheme_end: scheme_end,
-                        username_end: path_start,
-                        host_start: path_start,
-                        host_end: path_start,
-                        host: HostInternal::None,
-                        port: None,
-                        path_start: path_start,
-                        query_start: None,
-                        fragment_start: Some(fragment_start),
-                    })
-                }
-            }
-            Some('/') | Some('\\') => {
-                self.syntax_violation_if("backslash", || first_char == Some('\\'));
-                // file slash state
-                let (next_char, input_after_next_char) = input_after_first_char.split_first();
-                self.syntax_violation_if("backslash", || next_char == Some('\\'));
-                if matches!(next_char, Some('/') | Some('\\')) {
-                    // file host state
-                    self.serialization.push_str("file://");
-                    let scheme_end = "file".len() as u32;
-                    let host_start = "file://".len() as u32;
-                    let (path_start, host, remaining) =
-                        self.parse_file_host(input_after_next_char)?;
-                    let host_end = to_u32(self.serialization.len())?;
-                    let mut has_host = !matches!(host, HostInternal::None);
-                    let remaining = if path_start {
-                        self.parse_path_start(SchemeType::File, &mut has_host, remaining)
-                    } else {
-                        let path_start = self.serialization.len();
-                        self.serialization.push('/');
-                        self.parse_path(SchemeType::File, &mut has_host, path_start, remaining)
-                    };
-                    // FIXME: deal with has_host
-                    let (query_start, fragment_start) =
-                        self.parse_query_and_fragment(scheme_end, remaining)?;
-                    Ok(Url {
-                        serialization: self.serialization,
-                        scheme_end: scheme_end,
-                        username_end: host_start,
-                        host_start: host_start,
-                        host_end: host_end,
-                        host: host,
-                        port: None,
-                        path_start: host_end,
-                        query_start: query_start,
-                        fragment_start: fragment_start,
-                    })
-                } else {
-                    self.serialization.push_str("file:///");
-                    let scheme_end = "file".len() as u32;
-                    let path_start = "file://".len();
-                    if let Some(base_url) = base_file_url {
-                        let first_segment = base_url.path_segments().unwrap().next().unwrap();
-                        // FIXME: *normalized* drive letter
-                        if is_windows_drive_letter(first_segment) {
-                            self.serialization.push_str(first_segment);
-                            self.serialization.push('/');
-                        }
-                    }
-                    let remaining = self.parse_path(
-                        SchemeType::File, &mut false, path_start, input_after_first_char);
-                    let (query_start, fragment_start) =
-                        self.parse_query_and_fragment(scheme_end, remaining)?;
-                    let path_start = path_start as u32;
-                    Ok(Url {
-                        serialization: self.serialization,
-                        scheme_end: scheme_end,
-                        username_end: path_start,
-                        host_start: path_start,
-                        host_end: path_start,
-                        host: HostInternal::None,
-                        port: None,
-                        path_start: path_start,
-                        query_start: query_start,
-                        fragment_start: fragment_start,
-                    })
-                }
-            }
-            _ => {
-                if starts_with_windows_drive_letter_segment(&input) {
-                    base_file_url = None;
-                }
-                if let Some(base_url) = base_file_url {
-                    let before_query = match (base_url.query_start, base_url.fragment_start) {
-                        (None, None) => &*base_url.serialization,
-                        (Some(i), _) |
-                        (None, Some(i)) => base_url.slice(..i)
-                    };
-                    self.serialization.push_str(before_query);
-                    self.pop_path(SchemeType::File, base_url.path_start as usize);
-                    let remaining = self.parse_path(
-                        SchemeType::File, &mut true, base_url.path_start as usize, input);
-                    self.with_query_and_fragment(
-                        base_url.scheme_end, base_url.username_end, base_url.host_start,
-                        base_url.host_end, base_url.host, base_url.port, base_url.path_start, remaining)
-                } else {
-                    self.serialization.push_str("file:///");
-                    let scheme_end = "file".len() as u32;
-                    let path_start = "file://".len();
-                    let remaining = self.parse_path(
-                        SchemeType::File, &mut false, path_start, input);
-                    let (query_start, fragment_start) =
-                        self.parse_query_and_fragment(scheme_end, remaining)?;
-                    let path_start = path_start as u32;
-                    Ok(Url {
-                        serialization: self.serialization,
-                        scheme_end: scheme_end,
-                        username_end: path_start,
-                        host_start: path_start,
-                        host_end: path_start,
-                        host: HostInternal::None,
-                        port: None,
-                        path_start: path_start,
-                        query_start: query_start,
-                        fragment_start: fragment_start,
-                    })
-                }
-            }
-        }
-    }
-
-    fn parse_relative(mut self, input: Input, scheme_type: SchemeType, base_url: &Url)
-                      -> ParseResult<Url> {
-        // relative state
-        debug_assert!(self.serialization.is_empty());
-        let (first_char, input_after_first_char) = input.split_first();
-        match first_char {
-            None => {
-                // Copy everything except the fragment
-                let before_fragment = match base_url.fragment_start {
-                    Some(i) => &base_url.serialization[..i as usize],
-                    None => &*base_url.serialization,
-                };
-                self.serialization.push_str(before_fragment);
-                Ok(Url {
-                    serialization: self.serialization,
-                    fragment_start: None,
-                    ..*base_url
-                })
-            },
-            Some('?') => {
-                // Copy everything up to the query string
-                let before_query = match (base_url.query_start, base_url.fragment_start) {
-                    (None, None) => &*base_url.serialization,
-                    (Some(i), _) |
-                    (None, Some(i)) => base_url.slice(..i)
-                };
-                self.serialization.push_str(before_query);
-                let (query_start, fragment_start) =
-                    self.parse_query_and_fragment(base_url.scheme_end, input)?;
-                Ok(Url {
-                    serialization: self.serialization,
-                    query_start: query_start,
-                    fragment_start: fragment_start,
-                    ..*base_url
-                })
-            },
-            Some('#') => self.fragment_only(base_url, input),
-            Some('/') | Some('\\') => {
-                let (slashes_count, remaining) = input.count_matching(|c| matches!(c, '/' | '\\'));
-                if slashes_count >= 2 {
-                    self.syntax_violation_if("expected //", || {
-                        input.clone().take_while(|&c| matches!(c, '/' | '\\'))
-                        .collect::<String>() != "//"
-                    });
-                    let scheme_end = base_url.scheme_end;
-                    debug_assert!(base_url.byte_at(scheme_end) == b':');
-                    self.serialization.push_str(base_url.slice(..scheme_end + 1));
-                    return self.after_double_slash(remaining, scheme_type, scheme_end)
-                }
-                let path_start = base_url.path_start;
-                debug_assert!(base_url.byte_at(path_start) == b'/');
-                self.serialization.push_str(base_url.slice(..path_start + 1));
-                let remaining = self.parse_path(
-                    scheme_type, &mut true, path_start as usize, input_after_first_char);
-                self.with_query_and_fragment(
-                    base_url.scheme_end, base_url.username_end, base_url.host_start,
-                    base_url.host_end, base_url.host, base_url.port, base_url.path_start, remaining)
-            }
-            _ => {
-                let before_query = match (base_url.query_start, base_url.fragment_start) {
-                    (None, None) => &*base_url.serialization,
-                    (Some(i), _) |
-                    (None, Some(i)) => base_url.slice(..i)
-                };
-                self.serialization.push_str(before_query);
-                // FIXME spec says just "remove last entry", not the "pop" algorithm
-                self.pop_path(scheme_type, base_url.path_start as usize);
-                let remaining = self.parse_path(
-                    scheme_type, &mut true, base_url.path_start as usize, input);
-                self.with_query_and_fragment(
-                    base_url.scheme_end, base_url.username_end, base_url.host_start,
-                    base_url.host_end, base_url.host, base_url.port, base_url.path_start, remaining)
-            }
-        }
-    }
-
-    fn after_double_slash(mut self, input: Input, scheme_type: SchemeType, scheme_end: u32)
-                          -> ParseResult<Url> {
-        self.serialization.push('/');
-        self.serialization.push('/');
-        // authority state
-        let (username_end, remaining) = self.parse_userinfo(input, scheme_type)?;
-        // host state
-        let host_start = to_u32(self.serialization.len())?;
-        let (host_end, host, port, remaining) =
-            self.parse_host_and_port(remaining, scheme_end, scheme_type)?;
-        // path state
-        let path_start = to_u32(self.serialization.len())?;
-        let remaining = self.parse_path_start(
-            scheme_type, &mut true, remaining);
-        self.with_query_and_fragment(scheme_end, username_end, host_start,
-                                     host_end, host, port, path_start, remaining)
-    }
-
-    /// Return (username_end, remaining)
-    fn parse_userinfo<'i>(&mut self, mut input: Input<'i>, scheme_type: SchemeType)
-                          -> ParseResult<(u32, Input<'i>)> {
-        let mut last_at = None;
-        let mut remaining = input.clone();
-        let mut char_count = 0;
-        while let Some(c) = remaining.next() {
-            match c {
-                '@' => {
-                    if last_at.is_some() {
-                        self.syntax_violation("unencoded @ sign in username or password")
-                    } else {
-                        self.syntax_violation(
-                            "embedding authentification information (username or password) \
-                            in an URL is not recommended")
-                    }
-                    last_at = Some((char_count, remaining.clone()))
-                },
-                '/' | '?' | '#' => break,
-                '\\' if scheme_type.is_special() => break,
-                _ => (),
-            }
-            char_count += 1;
-        }
-        let (mut userinfo_char_count, remaining) = match last_at {
-            None => return Ok((to_u32(self.serialization.len())?, input)),
-            Some((0, remaining)) => return Ok((to_u32(self.serialization.len())?, remaining)),
-            Some(x) => x
-        };
-
-        let mut username_end = None;
-        while userinfo_char_count > 0 {
-            let (c, utf8_c) = input.next_utf8().unwrap();
-            userinfo_char_count -= 1;
-            if c == ':' && username_end.is_none() {
-                // Start parsing password
-                username_end = Some(to_u32(self.serialization.len())?);
-                self.serialization.push(':');
-            } else {
-                self.check_url_code_point(c, &input);
-                self.serialization.extend(utf8_percent_encode(utf8_c, USERINFO_ENCODE_SET));
-            }
-        }
-        let username_end = match username_end {
-            Some(i) => i,
-            None => to_u32(self.serialization.len())?,
-        };
-        self.serialization.push('@');
-        Ok((username_end, remaining))
-    }
-
-    fn parse_host_and_port<'i>(&mut self, input: Input<'i>,
-                                   scheme_end: u32, scheme_type: SchemeType)
-                                   -> ParseResult<(u32, HostInternal, Option<u16>, Input<'i>)> {
-        let (host, remaining) = Parser::parse_host(input, scheme_type)?;
-        write!(&mut self.serialization, "{}", host).unwrap();
-        let host_end = to_u32(self.serialization.len())?;
-        let (port, remaining) = if let Some(remaining) = remaining.split_prefix(':') {
-            let scheme = || default_port(&self.serialization[..scheme_end as usize]);
-            Parser::parse_port(remaining, scheme, self.context)?
-        } else {
-            (None, remaining)
-        };
-        if let Some(port) = port {
-            write!(&mut self.serialization, ":{}", port).unwrap()
-        }
-        Ok((host_end, host.into(), port, remaining))
-    }
-
-    pub fn parse_host(mut input: Input, scheme_type: SchemeType)
-                             -> ParseResult<(Host<String>, Input)> {
-        // Undo the Input abstraction here to avoid allocating in the common case
-        // where the host part of the input does not contain any tab or newline
-        let input_str = input.chars.as_str();
-        let mut inside_square_brackets = false;
-        let mut has_ignored_chars = false;
-        let mut non_ignored_chars = 0;
-        let mut bytes = 0;
-        for c in input_str.chars() {
-            match c {
-                ':' if !inside_square_brackets => break,
-                '\\' if scheme_type.is_special() => break,
-                '/' | '?' | '#' => break,
-                '\t' | '\n' | '\r' => {
-                    has_ignored_chars = true;
-                }
-                '[' => {
-                    inside_square_brackets = true;
-                    non_ignored_chars += 1
-                }
-                ']' => {
-                    inside_square_brackets = false;
-                    non_ignored_chars += 1
-                }
-                _ => non_ignored_chars += 1
-            }
-            bytes += c.len_utf8();
-        }
-        let replaced: String;
-        let host_str;
-        {
-            let host_input = input.by_ref().take(non_ignored_chars);
-            if has_ignored_chars {
-                replaced = host_input.collect();
-                host_str = &*replaced
-            } else {
-                for _ in host_input {}
-                host_str = &input_str[..bytes]
-            }
-        }
-        if scheme_type.is_special() && host_str.is_empty() {
-            return Err(ParseError::EmptyHost)
-        }
-        let host = Host::parse(host_str)?;
-        Ok((host, input))
-    }
-
-    pub fn parse_file_host<'i>(&mut self, input: Input<'i>)
-                               -> ParseResult<(bool, HostInternal, Input<'i>)> {
-        // Undo the Input abstraction here to avoid allocating in the common case
-        // where the host part of the input does not contain any tab or newline
-        let input_str = input.chars.as_str();
-        let mut has_ignored_chars = false;
-        let mut non_ignored_chars = 0;
-        let mut bytes = 0;
-        for c in input_str.chars() {
-            match c {
-                '/' | '\\' | '?' | '#' => break,
-                '\t' | '\n' | '\r' => has_ignored_chars = true,
-                _ => non_ignored_chars += 1,
-            }
-            bytes += c.len_utf8();
-        }
-        let replaced: String;
-        let host_str;
-        let mut remaining = input.clone();
-        {
-            let host_input = remaining.by_ref().take(non_ignored_chars);
-            if has_ignored_chars {
-                replaced = host_input.collect();
-                host_str = &*replaced
-            } else {
-                for _ in host_input {}
-                host_str = &input_str[..bytes]
-            }
-        }
-        if is_windows_drive_letter(host_str) {
-            return Ok((false, HostInternal::None, input))
-        }
-        let host = if host_str.is_empty() {
-            HostInternal::None
-        } else {
-            match Host::parse(host_str)? {
-                Host::Domain(ref d) if d == "localhost" => HostInternal::None,
-                host => {
-                    write!(&mut self.serialization, "{}", host).unwrap();
-                    host.into()
-                }
-            }
-        };
-        Ok((true, host, remaining))
-    }
-
-    pub fn parse_port<P>(mut input: Input, default_port: P,
-                                context: Context)
-                                -> ParseResult<(Option<u16>, Input)>
-                                where P: Fn() -> Option<u16> {
-        let mut port: u32 = 0;
-        let mut has_any_digit = false;
-        while let (Some(c), remaining) = input.split_first() {
-            if let Some(digit) = c.to_digit(10) {
-                port = port * 10 + digit;
-                if port > ::std::u16::MAX as u32 {
-                    return Err(ParseError::InvalidPort)
-                }
-                has_any_digit = true;
-            } else if context == Context::UrlParser && !matches!(c, '/' | '\\' | '?' | '#') {
-                return Err(ParseError::InvalidPort)
-            } else {
-                break
-            }
-            input = remaining;
-        }
-        let mut opt_port = Some(port as u16);
-        if !has_any_digit || opt_port == default_port() {
-            opt_port = None;
-        }
-        Ok((opt_port, input))
-    }
-
-    pub fn parse_path_start<'i>(&mut self, scheme_type: SchemeType, has_host: &mut bool,
-                            mut input: Input<'i>)
-                            -> Input<'i> {
-        // Path start state
-        match input.split_first() {
-            (Some('/'), remaining) => input = remaining,
-            (Some('\\'), remaining) => if scheme_type.is_special() {
-                self.syntax_violation("backslash");
-                input = remaining
-            },
-            _ => {}
-        }
-        let path_start = self.serialization.len();
-        self.serialization.push('/');
-        self.parse_path(scheme_type, has_host, path_start, input)
-    }
-
-    pub fn parse_path<'i>(&mut self, scheme_type: SchemeType, has_host: &mut bool,
-                          path_start: usize, mut input: Input<'i>)
-                          -> Input<'i> {
-        // Relative path state
-        debug_assert!(self.serialization.ends_with('/'));
-        loop {
-            let segment_start = self.serialization.len();
-            let mut ends_with_slash = false;
-            loop {
-                let input_before_c = input.clone();
-                let (c, utf8_c) = if let Some(x) = input.next_utf8() { x } else { break };
-                match c {
-                    '/' if self.context != Context::PathSegmentSetter => {
-                        ends_with_slash = true;
-                        break
-                    },
-                    '\\' if self.context != Context::PathSegmentSetter &&
-                            scheme_type.is_special() => {
-                        self.syntax_violation("backslash");
-                        ends_with_slash = true;
-                        break
-                    },
-                    '?' | '#' if self.context == Context::UrlParser => {
-                        input = input_before_c;
-                        break
-                    },
-                    _ => {
-                        self.check_url_code_point(c, &input);
-                        if c == '%' {
-                            let after_percent_sign = input.clone();
-                            if matches!(input.next(), Some('2')) &&
-                                    matches!(input.next(), Some('E') | Some('e')) {
-                                self.serialization.push('.');
-                                continue
-                            }
-                            input = after_percent_sign
-                        }
-                        if self.context == Context::PathSegmentSetter {
-                            self.serialization.extend(utf8_percent_encode(
-                                utf8_c, PATH_SEGMENT_ENCODE_SET));
-                        } else {
-                            self.serialization.extend(utf8_percent_encode(
-                                utf8_c, DEFAULT_ENCODE_SET));
-                        }
-                    }
-                }
-            }
-            match &self.serialization[segment_start..] {
-                ".." => {
-                    debug_assert!(self.serialization.as_bytes()[segment_start - 1] == b'/');
-                    self.serialization.truncate(segment_start - 1);  // Truncate "/.."
-                    self.pop_path(scheme_type, path_start);
-                    if !self.serialization[path_start..].ends_with('/') {
-                        self.serialization.push('/')
-                    }
-                },
-                "." => {
-                    self.serialization.truncate(segment_start);
-                },
-                _ => {
-                    if scheme_type.is_file() && is_windows_drive_letter(
-                        &self.serialization[path_start + 1..]
-                    ) {
-                        if self.serialization.ends_with('|') {
-                            self.serialization.pop();
-                            self.serialization.push(':');
-                        }
-                        if *has_host {
-                            self.syntax_violation("file: with host and Windows drive letter");
-                            *has_host = false;  // FIXME account for this in callers
-                        }
-                    }
-                    if ends_with_slash {
-                        self.serialization.push('/')
-                    }
-                }
-            }
-            if !ends_with_slash {
-                break
-            }
-        }
-        input
-    }
-
-    /// https://url.spec.whatwg.org/#pop-a-urls-path
-    fn pop_path(&mut self, scheme_type: SchemeType, path_start: usize) {
-        if self.serialization.len() > path_start {
-            let slash_position = self.serialization[path_start..].rfind('/').unwrap();
-            // + 1 since rfind returns the position before the slash.
-            let segment_start = path_start + slash_position + 1;
-            // Don’t pop a Windows drive letter
-            // FIXME: *normalized* Windows drive letter
-            if !(
-                scheme_type.is_file() &&
-                is_windows_drive_letter(&self.serialization[segment_start..])
-            ) {
-                self.serialization.truncate(segment_start);
-            }
-        }
-
-    }
-
-    pub fn parse_cannot_be_a_base_path<'i>(&mut self, mut input: Input<'i>) -> Input<'i> {
-        loop {
-            let input_before_c = input.clone();
-            match input.next_utf8() {
-                Some(('?', _)) | Some(('#', _)) if self.context == Context::UrlParser => {
-                    return input_before_c
-                }
-                Some((c, utf8_c)) => {
-                    self.check_url_code_point(c, &input);
-                    self.serialization.extend(utf8_percent_encode(
-                        utf8_c, SIMPLE_ENCODE_SET));
-                }
-                None => return input
-            }
-        }
-    }
-
-    fn with_query_and_fragment(mut self, scheme_end: u32, username_end: u32,
-                               host_start: u32, host_end: u32, host: HostInternal,
-                               port: Option<u16>, path_start: u32, remaining: Input)
-                               -> ParseResult<Url> {
-        let (query_start, fragment_start) =
-            self.parse_query_and_fragment(scheme_end, remaining)?;
-        Ok(Url {
-            serialization: self.serialization,
-            scheme_end: scheme_end,
-            username_end: username_end,
-            host_start: host_start,
-            host_end: host_end,
-            host: host,
-            port: port,
-            path_start: path_start,
-            query_start: query_start,
-            fragment_start: fragment_start
-        })
-    }
-
-    /// Return (query_start, fragment_start)
-    fn parse_query_and_fragment(&mut self, scheme_end: u32, mut input: Input)
-                                -> ParseResult<(Option<u32>, Option<u32>)> {
-        let mut query_start = None;
-        match input.next() {
-            Some('#') => {}
-            Some('?') => {
-                query_start = Some(to_u32(self.serialization.len())?);
-                self.serialization.push('?');
-                let remaining = self.parse_query(scheme_end, input);
-                if let Some(remaining) = remaining {
-                    input = remaining
-                } else {
-                    return Ok((query_start, None))
-                }
-            }
-            None => return Ok((None, None)),
-            _ => panic!("Programming error. parse_query_and_fragment() called without ? or #")
-        }
-
-        let fragment_start = to_u32(self.serialization.len())?;
-        self.serialization.push('#');
-        self.parse_fragment(input);
-        Ok((query_start, Some(fragment_start)))
-    }
-
-    pub fn parse_query<'i>(&mut self, scheme_end: u32, mut input: Input<'i>)
-                           -> Option<Input<'i>> {
-        let mut query = String::new();  // FIXME: use a streaming decoder instead
-        let mut remaining = None;
-        while let Some(c) = input.next() {
-            if c == '#' && self.context == Context::UrlParser {
-                remaining = Some(input);
-                break
-            } else {
-                self.check_url_code_point(c, &input);
-                query.push(c);
-            }
-        }
-
-        let encoding = match &self.serialization[..scheme_end as usize] {
-            "http" | "https" | "file" | "ftp" | "gopher" => self.query_encoding_override,
-            _ => EncodingOverride::utf8(),
-        };
-        let query_bytes = encoding.encode(query.into());
-        self.serialization.extend(percent_encode(&query_bytes, QUERY_ENCODE_SET));
-        remaining
-    }
-
-    fn fragment_only(mut self, base_url: &Url, mut input: Input) -> ParseResult<Url> {
-        let before_fragment = match base_url.fragment_start {
-            Some(i) => base_url.slice(..i),
-            None => &*base_url.serialization,
-        };
-        debug_assert!(self.serialization.is_empty());
-        self.serialization.reserve(before_fragment.len() + input.chars.as_str().len());
-        self.serialization.push_str(before_fragment);
-        self.serialization.push('#');
-        let next = input.next();
-        debug_assert!(next == Some('#'));
-        self.parse_fragment(input);
-        Ok(Url {
-            serialization: self.serialization,
-            fragment_start: Some(to_u32(before_fragment.len())?),
-            ..*base_url
-        })
-    }
-
-    pub fn parse_fragment(&mut self, mut input: Input) {
-        while let Some((c, utf8_c)) = input.next_utf8() {
-            if c ==  '\0' {
-                self.syntax_violation("NULL characters are ignored in URL fragment identifiers")
-            } else {
-                self.check_url_code_point(c, &input);
-                self.serialization.extend(utf8_percent_encode(utf8_c,
-                                                              SIMPLE_ENCODE_SET));
-            }
-        }
-    }
-
-    fn check_url_code_point(&self, c: char, input: &Input) {
-        if let Some(log) = self.log_syntax_violation {
-            if c == '%' {
-                let mut input = input.clone();
-                if !matches!((input.next(), input.next()), (Some(a), Some(b))
-                             if is_ascii_hex_digit(a) && is_ascii_hex_digit(b)) {
-                    log("expected 2 hex digits after %")
-                }
-            } else if !is_url_code_point(c) {
-                log("non-URL code point")
-            }
-        }
-    }
-}
-
-#[inline]
-fn is_ascii_hex_digit(c: char) -> bool {
-    matches!(c, 'a'...'f' | 'A'...'F' | '0'...'9')
-}
-
-// Non URL code points:
-// U+0000 to U+0020 (space)
-// " # % < > [ \ ] ^ ` { | }
-// U+007F to U+009F
-// surrogates
-// U+FDD0 to U+FDEF
-// Last two of each plane: U+__FFFE to U+__FFFF for __ in 00 to 10 hex
-#[inline]
-fn is_url_code_point(c: char) -> bool {
-    matches!(c,
-        'a'...'z' |
-        'A'...'Z' |
-        '0'...'9' |
-        '!' | '$' | '&' | '\'' | '(' | ')' | '*' | '+' | ',' | '-' |
-        '.' | '/' | ':' | ';' | '=' | '?' | '@' | '_' | '~' |
-        '\u{A0}'...'\u{D7FF}' | '\u{E000}'...'\u{FDCF}' | '\u{FDF0}'...'\u{FFFD}' |
-        '\u{10000}'...'\u{1FFFD}' | '\u{20000}'...'\u{2FFFD}' |
-        '\u{30000}'...'\u{3FFFD}' | '\u{40000}'...'\u{4FFFD}' |
-        '\u{50000}'...'\u{5FFFD}' | '\u{60000}'...'\u{6FFFD}' |
-        '\u{70000}'...'\u{7FFFD}' | '\u{80000}'...'\u{8FFFD}' |
-        '\u{90000}'...'\u{9FFFD}' | '\u{A0000}'...'\u{AFFFD}' |
-        '\u{B0000}'...'\u{BFFFD}' | '\u{C0000}'...'\u{CFFFD}' |
-        '\u{D0000}'...'\u{DFFFD}' | '\u{E1000}'...'\u{EFFFD}' |
-        '\u{F0000}'...'\u{FFFFD}' | '\u{100000}'...'\u{10FFFD}')
-}
-
-/// https://url.spec.whatwg.org/#c0-controls-and-space
-#[inline]
-fn c0_control_or_space(ch: char) -> bool {
-    ch <= ' '  // U+0000 to U+0020
-}
-
-/// https://url.spec.whatwg.org/#ascii-alpha
-#[inline]
-pub fn ascii_alpha(ch: char) -> bool {
-    matches!(ch, 'a'...'z' | 'A'...'Z')
-}
-
-#[inline]
-pub fn to_u32(i: usize) -> ParseResult<u32> {
-    if i <= ::std::u32::MAX as usize {
-        Ok(i as u32)
-    } else {
-        Err(ParseError::Overflow)
-    }
-}
-
-/// Wether the scheme is file:, the path has a single segment, and that segment
-/// is a Windows drive letter
-fn is_windows_drive_letter(segment: &str) -> bool {
-    segment.len() == 2
-    && starts_with_windows_drive_letter(segment)
-}
-
-fn starts_with_windows_drive_letter(s: &str) -> bool {
-    ascii_alpha(s.as_bytes()[0] as char)
-    && matches!(s.as_bytes()[1], b':' | b'|')
-}
-
-fn starts_with_windows_drive_letter_segment(input: &Input) -> bool {
-    let mut input = input.clone();
-    matches!((input.next(), input.next(), input.next()), (Some(a), Some(b), Some(c))
-             if ascii_alpha(a) && matches!(b, ':' | '|') && matches!(c, '/' | '\\' | '?' | '#'))
-}
deleted file mode 100644
--- a/third_party/rust/url-1.5.1/src/path_segments.rs
+++ /dev/null
@@ -1,217 +0,0 @@
-// Copyright 2016 The rust-url developers.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use parser::{self, SchemeType, to_u32};
-use std::str;
-use Url;
-
-/// Exposes methods to manipulate the path of an URL that is not cannot-be-base.
-///
-/// The path always starts with a `/` slash, and is made of slash-separated segments.
-/// There is always at least one segment (which may be the empty string).
-///
-/// Examples:
-///
-/// ```rust
-/// use url::Url;
-/// # use std::error::Error;
-///
-/// # fn run() -> Result<(), Box<Error>> {
-/// let mut url = Url::parse("mailto:me@example.com")?;
-/// assert!(url.path_segments_mut().is_err());
-///
-/// let mut url = Url::parse("http://example.net/foo/index.html")?;
-/// url.path_segments_mut().map_err(|_| "cannot be base")?
-///     .pop().push("img").push("2/100%.png");
-/// assert_eq!(url.as_str(), "http://example.net/foo/img/2%2F100%25.png");
-/// # Ok(())
-/// # }
-/// # run().unwrap();
-/// ```
-#[derive(Debug)]
-pub struct PathSegmentsMut<'a> {
-    url: &'a mut Url,
-    after_first_slash: usize,
-    after_path: String,
-    old_after_path_position: u32,
-}
-
-// Not re-exported outside the crate
-pub fn new(url: &mut Url) -> PathSegmentsMut {
-    let after_path = url.take_after_path();
-    let old_after_path_position = to_u32(url.serialization.len()).unwrap();
-    debug_assert!(url.byte_at(url.path_start) == b'/');
-    PathSegmentsMut {
-        after_first_slash: url.path_start as usize + "/".len(),
-        url: url,
-        old_after_path_position: old_after_path_position,
-        after_path: after_path,
-    }
-}
-
-impl<'a> Drop for PathSegmentsMut<'a> {
-    fn drop(&mut self) {
-        self.url.restore_after_path(self.old_after_path_position, &self.after_path)
-    }
-}
-
-impl<'a> PathSegmentsMut<'a> {
-    /// Remove all segments in the path, leaving the minimal `url.path() == "/"`.
-    ///
-    /// Returns `&mut Self` so that method calls can be chained.
-    ///
-    /// Example:
-    ///
-    /// ```rust
-    /// use url::Url;
-    /// # use std::error::Error;
-    ///
-    /// # fn run() -> Result<(), Box<Error>> {
-    /// let mut url = Url::parse("https://github.com/servo/rust-url/")?;
-    /// url.path_segments_mut().map_err(|_| "cannot be base")?
-    ///     .clear().push("logout");
-    /// assert_eq!(url.as_str(), "https://github.com/logout");
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    pub fn clear(&mut self) -> &mut Self {
-        self.url.serialization.truncate(self.after_first_slash);
-        self
-    }
-
-    /// Remove the last segment of this URL’s path if it is empty,
-    /// except if these was only one segment to begin with.
-    ///
-    /// In other words, remove one path trailing slash, if any,
-    /// unless it is also the initial slash (so this does nothing if `url.path() == "/")`.
-    ///
-    /// Returns `&mut Self` so that method calls can be chained.
-    ///
-    /// Example:
-    ///
-    /// ```rust
-    /// use url::Url;
-    /// # use std::error::Error;
-    ///
-    /// # fn run() -> Result<(), Box<Error>> {
-    /// let mut url = Url::parse("https://github.com/servo/rust-url/")?;
-    /// url.path_segments_mut().map_err(|_| "cannot be base")?
-    ///     .push("pulls");
-    /// assert_eq!(url.as_str(), "https://github.com/servo/rust-url//pulls");
-    ///
-    /// let mut url = Url::parse("https://github.com/servo/rust-url/")?;
-    /// url.path_segments_mut().map_err(|_| "cannot be base")?
-    ///     .pop_if_empty().push("pulls");
-    /// assert_eq!(url.as_str(), "https://github.com/servo/rust-url/pulls");
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    pub fn pop_if_empty(&mut self) -> &mut Self {
-        if self.url.serialization[self.after_first_slash..].ends_with('/') {
-            self.url.serialization.pop();
-        }
-        self
-    }
-
-    /// Remove the last segment of this URL’s path.
-    ///
-    /// If the path only has one segment, make it empty such that `url.path() == "/"`.
-    ///
-    /// Returns `&mut Self` so that method calls can be chained.
-    pub fn pop(&mut self) -> &mut Self {
-        let last_slash = self.url.serialization[self.after_first_slash..].rfind('/').unwrap_or(0);
-        self.url.serialization.truncate(self.after_first_slash + last_slash);
-        self
-    }
-
-    /// Append the given segment at the end of this URL’s path.
-    ///
-    /// See the documentation for `.extend()`.
-    ///
-    /// Returns `&mut Self` so that method calls can be chained.
-    pub fn push(&mut self, segment: &str) -> &mut Self {
-        self.extend(Some(segment))
-    }
-
-    /// Append each segment from the given iterator at the end of this URL’s path.
-    ///
-    /// Each segment is percent-encoded like in `Url::parse` or `Url::join`,
-    /// except that `%` and `/` characters are also encoded (to `%25` and `%2F`).
-    /// This is unlike `Url::parse` where `%` is left as-is in case some of the input
-    /// is already percent-encoded, and `/` denotes a path segment separator.)
-    ///
-    /// Note that, in addition to slashes between new segments,
-    /// this always adds a slash between the existing path and the new segments
-    /// *except* if the existing path is `"/"`.
-    /// If the previous last segment was empty (if the path had a trailing slash)
-    /// the path after `.extend()` will contain two consecutive slashes.
-    /// If that is undesired, call `.pop_if_empty()` first.
-    ///
-    /// To obtain a behavior similar to `Url::join`, call `.pop()` unconditionally first.
-    ///
-    /// Returns `&mut Self` so that method calls can be chained.
-    ///
-    /// Example:
-    ///
-    /// ```rust
-    /// use url::Url;
-    /// # use std::error::Error;
-    ///
-    /// # fn run() -> Result<(), Box<Error>> {
-    /// let mut url = Url::parse("https://github.com/")?;
-    /// let org = "servo";
-    /// let repo = "rust-url";
-    /// let issue_number = "188";
-    /// url.path_segments_mut().map_err(|_| "cannot be base")?
-    ///     .extend(&[org, repo, "issues", issue_number]);
-    /// assert_eq!(url.as_str(), "https://github.com/servo/rust-url/issues/188");
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    ///
-    /// In order to make sure that parsing the serialization of an URL gives the same URL,
-    /// a segment is ignored if it is `"."` or `".."`:
-    ///
-    /// ```rust
-    /// use url::Url;
-    /// # use std::error::Error;
-    ///
-    /// # fn run() -> Result<(), Box<Error>> {
-    /// let mut url = Url::parse("https://github.com/servo")?;
-    /// url.path_segments_mut().map_err(|_| "cannot be base")?
-    ///     .extend(&["..", "rust-url", ".", "pulls"]);
-    /// assert_eq!(url.as_str(), "https://github.com/servo/rust-url/pulls");
-    /// # Ok(())
-    /// # }
-    /// # run().unwrap();
-    /// ```
-    pub fn extend<I>(&mut self, segments: I) -> &mut Self
-    where I: IntoIterator, I::Item: AsRef<str> {
-        let scheme_type = SchemeType::from(self.url.scheme());
-        let path_start = self.url.path_start as usize;
-        self.url.mutate(|parser| {
-            parser.context = parser::Context::PathSegmentSetter;
-            for segment in segments {
-                let segment = segment.as_ref();
-                if matches!(segment, "." | "..") {
-                    continue
-                }
-                if parser.serialization.len() > path_start + 1 {
-                    parser.serialization.push('/');
-                }
-                let mut has_host = true;  // FIXME account for this?
-                parser.parse_path(scheme_type, &mut has_host, path_start,
-                                  parser::Input::new(segment));
-            }
-        });
-        self
-    }
-}
deleted file mode 100644
--- a/third_party/rust/url-1.5.1/src/quirks.rs
+++ /dev/null
@@ -1,217 +0,0 @@
-// Copyright 2016 The rust-url developers.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! Getters and setters for URL components implemented per https://url.spec.whatwg.org/#api
-//!
-//! Unless you need to be interoperable with web browsers,
-//! you probably want to use `Url` method instead.
-
-use {Url, Position, Host, ParseError, idna};
-use parser::{Parser, SchemeType, default_port, Context, Input};
-
-/// https://url.spec.whatwg.org/#dom-url-domaintoascii
-pub fn domain_to_ascii(domain: &str) -> String {
-    match Host::parse(domain) {
-        Ok(Host::Domain(domain)) => domain,
-        _ => String::new(),
-    }
-}
-
-/// https://url.spec.whatwg.org/#dom-url-domaintounicode
-pub fn domain_to_unicode(domain: &str) -> String {
-    match Host::parse(domain) {
-        Ok(Host::Domain(ref domain)) => {
-            let (unicode, _errors) = idna::domain_to_unicode(domain);
-            unicode
-        }
-        _ => String::new(),
-    }
-}
-
-/// Getter for https://url.spec.whatwg.org/#dom-url-href
-pub fn href(url: &Url) -> &str {
-    url.as_str()
-}
-
-/// Setter for https://url.spec.whatwg.org/#dom-url-href
-pub fn set_href(url: &mut Url, value: &str) -> Result<(), ParseError> {
-    *url = Url::parse(value)?;
-    Ok(())
-}
-
-/// Getter for https://url.spec.whatwg.org/#dom-url-origin
-pub fn origin(url: &Url) -> String {
-    url.origin().unicode_serialization()
-}
-
-/// Getter for https://url.spec.whatwg.org/#dom-url-protocol
-#[inline]
-pub fn protocol(url: &Url) -> &str {
-    &url.as_str()[..url.scheme().len() + ":".len()]
-}
-
-/// Setter for https://url.spec.whatwg.org/#dom-url-protocol
-pub fn set_protocol(url: &mut Url, mut new_protocol: &str) -> Result<(), ()> {
-    // The scheme state in the spec ignores everything after the first `:`,
-    // but `set_scheme` errors if there is more.
-    if let Some(position) = new_protocol.find(':') {
-        new_protocol = &new_protocol[..position];
-    }
-    url.set_scheme(new_protocol)
-}
-
-/// Getter for https://url.spec.whatwg.org/#dom-url-username
-#[inline]
-pub fn username(url: &Url) -> &str {
-    url.username()
-}
-
-/// Setter for https://url.spec.whatwg.org/#dom-url-username
-pub fn set_username(url: &mut Url, new_username: &str) -> Result<(), ()> {
-    url.set_username(new_username)
-}
-
-/// Getter for https://url.spec.whatwg.org/#dom-url-password
-#[inline]
-pub fn password(url: &Url) -> &str {
-    url.password().unwrap_or("")
-}
-
-/// Setter for https://url.spec.whatwg.org/#dom-url-password
-pub fn set_password(url: &mut Url, new_password: &str) -> Result<(), ()> {
-    url.set_password(if new_password.is_empty() { None } else { Some(new_password) })
-}
-
-/// Getter for https://url.spec.whatwg.org/#dom-url-host
-#[inline]
-pub fn host(url: &Url) -> &str {
-    &url[Position::BeforeHost..Position::AfterPort]
-}
-
-/// Setter for https://url.spec.whatwg.org/#dom-url-host
-pub fn set_host(url: &mut Url, new_host: &str) -> Result<(), ()> {
-    if url.cannot_be_a_base() {
-        return Err(())
-    }
-    let host;
-    let opt_port;
-    {
-        let scheme = url.scheme();
-        let result = Parser::parse_host(Input::new(new_host), SchemeType::from(scheme));
-        match result {
-            Ok((h, remaining)) => {
-                host = h;
-                opt_port = if let Some(remaining) = remaining.split_prefix(':') {
-                    Parser::parse_port(remaining, || default_port(scheme), Context::Setter)
-                    .ok().map(|(port, _remaining)| port)
-                } else {
-                    None
-                };
-            }
-            Err(_) => return Err(())
-        }
-    }
-    url.set_host_internal(host, opt_port);
-    Ok(())
-}
-
-/// Getter for https://url.spec.whatwg.org/#dom-url-hostname
-#[inline]
-pub fn hostname(url: &Url) -> &str {
-    url.host_str().unwrap_or("")
-}
-
-/// Setter for https://url.spec.whatwg.org/#dom-url-hostname
-pub fn set_hostname(url: &mut Url, new_hostname: &str) -> Result<(), ()> {
-    if url.cannot_be_a_base() {
-        return Err(())
-    }
-    let result = Parser::parse_host(Input::new(new_hostname), SchemeType::from(url.scheme()));
-    if let Ok((host, _remaining)) = result {
-        url.set_host_internal(host, None);
-        Ok(())
-    } else {
-        Err(())
-    }
-}
-
-/// Getter for https://url.spec.whatwg.org/#dom-url-port
-#[inline]
-pub fn port(url: &Url) -> &str {
-    &url[Position::BeforePort..Position::AfterPort]
-}
-
-/// Setter for https://url.spec.whatwg.org/#dom-url-port
-pub fn set_port(url: &mut Url, new_port: &str) -> Result<(), ()> {
-    let result;
-    {
-        // has_host implies !cannot_be_a_base
-        let scheme = url.scheme();
-        if !url.has_host() || scheme == "file" {
-            return Err(())
-        }
-        result = Parser::parse_port(Input::new(new_port), || default_port(scheme), Context::Setter)
-    }
-    if let Ok((new_port, _remaining)) = result {
-        url.set_port_internal(new_port);
-        Ok(())
-    } else {
-        Err(())
-    }
-}
-
-/// Getter for https://url.spec.whatwg.org/#dom-url-pathname
-#[inline]
-pub fn pathname(url: &Url) -> &str {
-     url.path()
-}
-
-/// Setter for https://url.spec.whatwg.org/#dom-url-pathname
-pub fn set_pathname(url: &mut Url, new_pathname: &str) {
-    if !url.cannot_be_a_base() {
-        url.set_path(new_pathname)
-    }
-}
-
-/// Getter for https://url.spec.whatwg.org/#dom-url-search
-pub fn search(url: &Url) -> &str {
-    trim(&url[Position::AfterPath..Position::AfterQuery])
-}
-
-/// Setter for https://url.spec.whatwg.org/#dom-url-search
-pub fn set_search(url: &mut Url, new_search: &str) {
-    url.set_query(match new_search {
-        "" => None,
-        _ if new_search.starts_with('?') => Some(&new_search[1..]),
-        _ => Some(new_search),
-    })
-}
-
-/// Getter for https://url.spec.whatwg.org/#dom-url-hash
-pub fn hash(url: &Url) -> &str {
-    trim(&url[Position::AfterQuery..])
-}
-
-/// Setter for https://url.spec.whatwg.org/#dom-url-hash
-pub fn set_hash(url: &mut Url, new_hash: &str) {
-    if url.scheme() != "javascript" {
-        url.set_fragment(match new_hash {
-            "" => None,
-            _ if new_hash.starts_with('#') => Some(&new_hash[1..]),
-            _ => Some(new_hash),
-        })
-    }
-}
-
-fn trim(s: &str) -> &str {
-    if s.len() == 1 {
-        ""
-    } else {
-        s
-    }
-}
deleted file mode 100644
--- a/third_party/rust/url-1.5.1/src/slicing.rs
+++ /dev/null
@@ -1,182 +0,0 @@
-// Copyright 2016 The rust-url developers.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-use std::ops::{Range, RangeFrom, RangeTo, RangeFull, Index};
-use Url;
-
-impl Index<RangeFull> for Url {
-    type Output = str;
-    fn index(&self, _: RangeFull) -> &str {
-        &self.serialization
-    }
-}
-
-impl Index<RangeFrom<Position>> for Url {
-    type Output = str;
-    fn index(&self, range: RangeFrom<Position>) -> &str {
-        &self.serialization[self.index(range.start)..]
-    }
-}
-
-impl Index<RangeTo<Position>> for Url {
-    type Output = str;
-    fn index(&self, range: RangeTo<Position>) -> &str {
-        &self.serialization[..self.index(range.end)]
-    }
-}
-
-impl Index<Range<Position>> for Url {
-    type Output = str;
-    fn index(&self, range: Range<Position>) -> &str {
-        &self.serialization[self.index(range.start)..self.index(range.end)]
-    }
-}
-
-/// Indicates a position within a URL based on its components.
-///
-/// A range of positions can be used for slicing `Url`:
-///
-/// ```rust
-/// # use url::{Url, Position};
-/// # fn something(some_url: Url) {
-/// let serialization: &str = &some_url[..];
-/// let serialization_without_fragment: &str = &some_url[..Position::AfterQuery];
-/// let authority: &str = &some_url[Position::BeforeUsername..Position::AfterPort];
-/// let data_url_payload: &str = &some_url[Position::BeforePath..Position::AfterQuery];
-/// let scheme_relative: &str = &some_url[Position::BeforeUsername..];
-/// # }
-/// ```
-///
-/// In a pseudo-grammar (where `[`…`]?` makes a sub-sequence optional),
-/// URL components and delimiters that separate them are:
-///
-/// ```notrust
-/// url =
-///     scheme ":"
-///     [ "//" [ username [ ":" password ]? "@" ]? host [ ":" port ]? ]?
-///     path [ "?" query ]? [ "#" fragment ]?
-/// ```
-///
-/// When a given component is not present,
-/// its "before" and "after" position are the same
-/// (so that `&some_url[BeforeFoo..AfterFoo]` is the empty string)
-/// and component ordering is preserved
-/// (so that a missing query "is between" a path and a fragment).
-///
-/// The end of a component and the start of the next are either the same or separate
-/// by a delimiter.
-/// (Not that the initial `/` of a path is considered part of the path here, not a delimiter.)
-/// For example, `&url[..BeforeFragment]` would include a `#` delimiter (if present in `url`),
-/// so `&url[..AfterQuery]` might be desired instead.
-///
-/// `BeforeScheme` and `AfterFragment` are always the start and end of the entire URL,
-/// so `&url[BeforeScheme..X]` is the same as `&url[..X]`
-/// and `&url[X..AfterFragment]` is the same as `&url[X..]`.
-#[derive(Copy, Clone, Debug)]
-pub enum Position {
-    BeforeScheme,
-    AfterScheme,
-    BeforeUsername,
-    AfterUsername,
-    BeforePassword,
-    AfterPassword,
-    BeforeHost,
-    AfterHost,
-    BeforePort,
-    AfterPort,
-    BeforePath,
-    AfterPath,
-    BeforeQuery,
-    AfterQuery,
-    BeforeFragment,
-    AfterFragment
-}
-
-impl Url {
-    #[inline]
-    fn index(&self, position: Position) -> usize {
-        match position {
-            Position::BeforeScheme => 0,
-
-            Position::AfterScheme => self.scheme_end as usize,
-
-            Position::BeforeUsername => if self.has_authority() {
-                self.scheme_end as usize + "://".len()
-            } else {
-                debug_assert!(self.byte_at(self.scheme_end) == b':');
-                debug_assert!(self.scheme_end + ":".len() as u32 == self.username_end);
-                self.scheme_end as usize + ":".len()
-            },
-
-            Position::AfterUsername => self.username_end as usize,
-
-            Position::BeforePassword => if self.has_authority() &&
-                                           self.byte_at(self.username_end) == b':' {
-                self.username_end as usize + ":".len()
-            } else {
-                debug_assert!(self.username_end == self.host_start);
-                self.username_end as usize
-            },
-
-            Position::AfterPassword => if self.has_authority() &&
-                                          self.byte_at(self.username_end) == b':' {
-                debug_assert!(self.byte_at(self.host_start - "@".len() as u32) == b'@');
-                self.host_start as usize - "@".len()
-            } else {
-                debug_assert!(self.username_end == self.host_start);
-                self.host_start as usize
-            },
-
-            Position::BeforeHost => self.host_start as usize,
-
-            Position::AfterHost => self.host_end as usize,
-
-            Position::BeforePort => if self.port.is_some() {
-                debug_assert!(self.byte_at(self.host_end) == b':');
-                self.host_end as usize + ":".len()
-            } else {
-                self.host_end as usize
-            },
-
-            Position::AfterPort => self.path_start as usize,
-
-            Position::BeforePath => self.path_start as usize,
-
-            Position::AfterPath => match (self.query_start, self.fragment_start) {
-                (Some(q), _) => q as usize,
-                (None, Some(f)) => f as usize,
-                (None, None) => self.serialization.len(),
-            },
-
-            Position::BeforeQuery => match (self.query_start, self.fragment_start) {
-                (Some(q), _) => {
-                    debug_assert!(self.byte_at(q) == b'?');
-                    q as usize + "?".len()
-                }
-                (None, Some(f)) => f as usize,
-                (None, None) => self.serialization.len(),
-            },
-
-            Position::AfterQuery => match self.fragment_start {
-                None => self.serialization.len(),
-                Some(f) => f as usize,
-            },
-
-            Position::BeforeFragment => match self.fragment_start {
-                Some(f) => {
-                    debug_assert!(self.byte_at(f) == b'#');
-                    f as usize + "#".len()
-                }
-                None => self.serialization.len(),
-            },
-
-            Position::AfterFragment => self.serialization.len(),
-        }
-    }
-}
-
deleted file mode 100644
--- a/third_party/rust/url-1.5.1/tests/data.rs
+++ /dev/null
@@ -1,203 +0,0 @@
-// Copyright 2013-2014 The rust-url developers.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! Data-driven tests
-
-extern crate rustc_serialize;
-extern crate test;
-extern crate url;
-
-use rustc_serialize::json::{self, Json};
-use url::{Url, quirks};
-
-fn check_invariants(url: &Url) {
-    url.check_invariants().unwrap();
-    #[cfg(feature="serde")] {
-        extern crate serde_json;
-        let bytes = serde_json::to_vec(url).unwrap();
-        let new_url: Url = serde_json::from_slice(&bytes).unwrap();
-        assert_eq!(url, &new_url);
-    }
-}
-
-
-fn run_parsing(input: &str, base: &str, expected: Result<ExpectedAttributes, ()>) {
-    let base = match Url::parse(&base) {
-        Ok(base) => base,
-        Err(message) => panic!("Error parsing base {:?}: {}", base, message)
-    };
-    let (url, expected) = match (base.join(&input), expected) {
-        (Ok(url), Ok(expected)) => (url, expected),
-        (Err(_), Err(())) => return,
-        (Err(message), Ok(_)) => panic!("Error parsing URL {:?}: {}", input, message),
-        (Ok(_), Err(())) => panic!("Expected a parse error for URL {:?}", input),
-    };
-
-    check_invariants(&url);
-
-    macro_rules! assert_eq {
-        ($expected: expr, $got: expr) => {
-            {
-                let expected = $expected;
-                let got = $got;
-                assert!(expected == got, "{:?} != {} {:?} for URL {:?}",
-                        got, stringify!($expected), expected, url);
-            }
-        }
-    }
-
-    macro_rules! assert_attributes {
-        ($($attr: ident)+) => {
-            {
-                $(
-                    assert_eq!(expected.$attr, quirks::$attr(&url));
-                )+;
-            }
-        }
-    }
-
-    assert_attributes!(href protocol username password host hostname port pathname search hash);
-
-    if let Some(expected_origin) = expected.origin {
-        assert_eq!(expected_origin, quirks::origin(&url));
-    }
-}
-
-struct ExpectedAttributes {
-    href: String,
-    origin: Option<String>,
-    protocol: String,
-    username: String,
-    password: String,
-    host: String,
-    hostname: String,
-    port: String,
-    pathname: String,
-    search: String,
-    hash: String,
-}
-
-trait JsonExt {
-    fn take(&mut self, key: &str) -> Option<Json>;
-    fn object(self) -> json::Object;
-    fn string(self) -> String;
-    fn take_string(&mut self, key: &str) -> String;
-}
-
-impl JsonExt for Json {
-    fn take(&mut self, key: &str) -> Option<Json> {
-        self.as_object_mut().unwrap().remove(key)
-    }
-
-    fn object(self) -> json::Object {
-        if let Json::Object(o) = self { o } else { panic!("Not a Json::Object") }
-    }
-
-    fn string(self) -> String {
-        if let Json::String(s) = self { s } else { panic!("Not a Json::String") }
-    }
-
-    fn take_string(&mut self, key: &str) -> String {
-        self.take(key).unwrap().string()
-    }
-}
-
-fn collect_parsing<F: FnMut(String, test::TestFn)>(add_test: &mut F) {
-    // Copied form https://github.com/w3c/web-platform-tests/blob/master/url/
-    let mut json = Json::from_str(include_str!("urltestdata.json"))
-        .expect("JSON parse error in urltestdata.json");
-    for entry in json.as_array_mut().unwrap() {
-        if entry.is_string() {
-            continue  // ignore comments
-        }
-        let base = entry.take_string("base");
-        let input = entry.take_string("input");
-        let expected = if entry.find("failure").is_some() {
-            Err(())
-        } else {
-            Ok(ExpectedAttributes {
-                href: entry.take_string("href"),
-                origin: entry.take("origin").map(Json::string),
-                protocol: entry.take_string("protocol"),
-                username: entry.take_string("username"),
-                password: entry.take_string("password"),
-                host: entry.take_string("host"),
-                hostname: entry.take_string("hostname"),
-                port: entry.take_string("port"),
-                pathname: entry.take_string("pathname"),
-                search: entry.take_string("search"),
-                hash: entry.take_string("hash"),
-            })
-        };
-        add_test(format!("{:?} @ base {:?}", input, base),
-                 test::TestFn::dyn_test_fn(move || run_parsing(&input, &base, expected)));
-    }
-}
-
-fn collect_setters<F>(add_test: &mut F) where F: FnMut(String, test::TestFn) {
-    let mut json = Json::from_str(include_str!("setters_tests.json"))
-        .expect("JSON parse error in setters_tests.json");
-
-    macro_rules! setter {
-        ($attr: expr, $setter: ident) => {{
-            let mut tests = json.take($attr).unwrap();
-            for mut test in tests.as_array_mut().unwrap().drain(..) {
-                let comment = test.take("comment").map(Json::string).unwrap_or(String::new());
-                let href = test.take_string("href");
-                let new_value = test.take_string("new_value");
-                let name = format!("{:?}.{} = {:?} {}", href, $attr, new_value, comment);
-                let mut expected = test.take("expected").unwrap();
-                add_test(name, test::TestFn::dyn_test_fn(move || {
-                    let mut url = Url::parse(&href).unwrap();
-                    check_invariants(&url);
-                    let _ = quirks::$setter(&mut url, &new_value);
-                    assert_attributes!(url, expected,
-                        href protocol username password host hostname port pathname search hash);
-                    check_invariants(&url);
-                }))
-            }
-        }}
-    }
-    macro_rules! assert_attributes {
-        ($url: expr, $expected: expr, $($attr: ident)+) => {
-            $(
-                if let Some(value) = $expected.take(stringify!($attr)) {
-                    assert_eq!(quirks::$attr(&$url), value.string())
-                }
-            )+
-        }
-    }
-    setter!("protocol", set_protocol);
-    setter!("username", set_username);
-    setter!("password", set_password);
-    setter!("hostname", set_hostname);
-    setter!("host", set_host);
-    setter!("port", set_port);
-    setter!("pathname", set_pathname);
-    setter!("search", set_search);
-    setter!("hash", set_hash);
-}
-
-fn main() {
-    let mut tests = Vec::new();
-    {
-        let mut add_one = |name: String, run: test::TestFn| {
-            tests.push(test::TestDescAndFn {
-                desc: test::TestDesc {
-                    name: test::DynTestName(name),
-                    ignore: false,
-                    should_panic: test::ShouldPanic::No,
-                },
-                testfn: run,
-            })
-        };
-        collect_parsing(&mut add_one);
-        collect_setters(&mut add_one);
-    }
-    test::test_main(&std::env::args().collect::<Vec<_>>(), tests)
-}
deleted file mode 100644
--- a/third_party/rust/url-1.5.1/tests/setters_tests.json
+++ /dev/null
@@ -1,1148 +0,0 @@
-{
-    "comment": [
-        "## Tests for setters of https://url.spec.whatwg.org/#urlutils-members",
-        "",
-        "This file contains a JSON object.",
-        "Other than 'comment', each key is an attribute of the `URL` interface",
-        "defined in WHATWG’s URL Standard.",
-        "The values are arrays of test case objects for that attribute.",
-        "",
-        "To run a test case for the attribute `attr`:",
-        "",
-        "* Create a new `URL` object with the value for the 'href' key",
-        "  the constructor single parameter. (Without a base URL.)",
-        "  This must not throw.",
-        "* Set the attribute `attr` to (invoke its setter with)",
-        "  with the value of for 'new_value' key.",
-        "* The value for the 'expected' key is another object.",
-        "  For each `key` / `value` pair of that object,",
-        "  get the attribute `key` (invoke its getter).",
-        "  The returned string must be equal to `value`.",
-        "",
-        "Note: the 'href' setter is already covered by urltestdata.json."
-    ],
-    "protocol": [
-        {
-            "comment": "The empty string is not a valid scheme. Setter leaves the URL unchanged.",
-            "href": "a://example.net",
-            "new_value": "",
-            "expected": {
-                "href": "a://example.net/",
-                "protocol": "a:"
-            }
-        },
-        {
-            "href": "a://example.net",
-            "new_value": "b",
-            "expected": {
-                "href": "b://example.net/",
-                "protocol": "b:"
-            }
-        },
-        {
-            "comment": "Upper-case ASCII is lower-cased",
-            "href": "a://example.net",
-            "new_value": "B",
-            "expected": {
-                "href": "b://example.net/",
-                "protocol": "b:"
-            }
-        },
-        {
-            "comment": "Non-ASCII is rejected",
-            "href": "a://example.net",
-            "new_value": "é",
-            "expected": {
-                "href": "a://example.net/",
-                "protocol": "a:"
-            }
-        },
-        {
-            "comment": "No leading digit",
-            "href": "a://example.net",
-            "new_value": "0b",
-            "expected": {
-                "href": "a://example.net/",
-                "protocol": "a:"
-            }
-        },
-        {
-            "comment": "No leading punctuation",
-            "href": "a://example.net",
-            "new_value": "+b",
-            "expected": {
-                "href": "a://example.net/",
-                "protocol": "a:"
-            }
-        },
-        {
-            "href": "a://example.net",
-            "new_value": "bC0+-.",
-            "expected": {
-                "href": "bc0+-.://example.net/",
-                "protocol": "bc0+-.:"
-            }
-        },
-        {
-            "comment": "Only some punctuation is acceptable",
-            "href": "a://example.net",
-            "new_value": "b,c",
-            "expected": {
-                "href": "a://example.net/",
-                "protocol": "a:"
-            }
-        },
-        {
-            "comment": "Non-ASCII is rejected",
-            "href": "a://example.net",
-            "new_value": "bé",
-            "expected": {
-                "href": "a://example.net/",
-                "protocol": "a:"
-            }
-        },
-        {
-            "comment": "Spec deviation: from special scheme to not is not problematic. https://github.com/whatwg/url/issues/104",
-            "href": "http://example.net",
-            "new_value": "b",
-            "expected": {
-                "href": "b://example.net/",
-                "protocol": "b:"
-            }
-        },
-        {
-            "comment": "Cannot-be-a-base URL doesn’t have a host, but URL in a special scheme must.",
-            "href": "mailto:me@example.net",
-            "new_value": "http",
-            "expected": {
-                "href": "mailto:me@example.net",
-                "protocol": "mailto:"
-            }
-        },
-        {
-            "comment": "Spec deviation: from non-special scheme with a host to special is not problematic. https://github.com/whatwg/url/issues/104",
-            "href": "ssh://me@example.net",
-            "new_value": "http",
-            "expected": {
-                "href": "http://me@example.net/",
-                "protocol": "http:"
-            }
-        },
-        {
-            "comment": "Stuff after the first ':' is ignored",
-            "href": "http://example.net",
-            "new_value": "https:foo : bar",
-            "expected": {
-                "href": "https://example.net/",
-                "protocol": "https:"
-            }
-        },
-        {
-            "comment": "Stuff after the first ':' is ignored",
-            "href": "data:text/html,<p>Test",
-            "new_value": "view-source+data:foo : bar",
-            "expected": {
-                "href": "view-source+data:text/html,<p>Test",
-                "protocol": "view-source+data:"
-            }
-        }
-    ],
-    "username": [
-        {
-            "comment": "No host means no username",
-            "href": "file:///home/you/index.html",
-            "new_value": "me",
-            "expected": {
-                "href": "file:///home/you/index.html",
-                "username": ""
-            }
-        },
-        {
-            "comment": "No host means no username",
-            "href": "unix:/run/foo.socket",
-            "new_value": "me",
-            "expected": {
-                "href": "unix:/run/foo.socket",
-                "username": ""
-            }
-        },
-        {
-            "comment": "Cannot-be-a-base means no username",
-            "href": "mailto:you@example.net",
-            "new_value": "me",
-            "expected": {
-                "href": "mailto:you@example.net",
-                "username": ""
-            }
-        },
-        {
-            "href": "http://example.net",
-            "new_value": "me",
-            "expected": {
-                "href": "http://me@example.net/",
-                "username": "me"
-            }
-        },
-        {
-            "href": "http://:secret@example.net",
-            "new_value": "me",
-            "expected": {
-                "href": "http://me:secret@example.net/",
-                "username": "me"
-            }
-        },
-        {
-            "href": "http://me@example.net",
-            "new_value": "",
-            "expected": {
-                "href": "http://example.net/",
-                "username": ""
-            }
-        },
-        {
-            "href": "http://me:secret@example.net",
-            "new_value": "",
-            "expected": {
-                "href": "http://:secret@example.net/",
-                "username": ""
-            }
-        },
-        {
-            "comment": "UTF-8 percent encoding with the userinfo encode set.",
-            "href": "http://example.net",
-            "new_value": "\u0000\u0001\t\n\r\u001f !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé",
-            "expected": {
-                "href": "http://%00%01%09%0A%0D%1F%20!%22%23$%&'()*+,-.%2F09%3A%3B%3C%3D%3E%3F%40AZ%5B%5C%5D%5E_%60az%7B%7C%7D~%7F%C2%80%C2%81%C3%89%C3%A9@example.net/",
-                "username": "%00%01%09%0A%0D%1F%20!%22%23$%&'()*+,-.%2F09%3A%3B%3C%3D%3E%3F%40AZ%5B%5C%5D%5E_%60az%7B%7C%7D~%7F%C2%80%C2%81%C3%89%C3%A9"
-            }
-        },
-        {
-            "comment": "Bytes already percent-encoded are left as-is.",
-            "href": "http://example.net",
-            "new_value": "%c3%89té",
-            "expected": {
-                "href": "http://%c3%89t%C3%A9@example.net/",
-                "username": "%c3%89t%C3%A9"
-            }
-        }
-    ],
-    "password": [
-        {
-            "comment": "No host means no password",
-            "href": "file:///home/me/index.html",
-            "new_value": "secret",
-            "expected": {
-                "href": "file:///home/me/index.html",
-                "password": ""
-            }
-        },
-        {
-            "comment": "No host means no password",
-            "href": "unix:/run/foo.socket",
-            "new_value": "secret",
-            "expected": {
-                "href": "unix:/run/foo.socket",
-                "password": ""
-            }
-        },
-        {
-            "comment": "Cannot-be-a-base means no password",
-            "href": "mailto:me@example.net",
-            "new_value": "secret",
-            "expected": {
-                "href": "mailto:me@example.net",
-                "password": ""
-            }
-        },
-        {
-            "href": "http://example.net",
-            "new_value": "secret",
-            "expected": {
-                "href": "http://:secret@example.net/",
-                "password": "secret"
-            }
-        },
-        {
-            "href": "http://me@example.net",
-            "new_value": "secret",
-            "expected": {
-                "href": "http://me:secret@example.net/",
-                "password": "secret"
-            }
-        },
-        {
-            "href": "http://:secret@example.net",
-            "new_value": "",
-            "expected": {
-                "href": "http://example.net/",
-                "password": ""
-            }
-        },
-        {
-            "href": "http://me:secret@example.net",
-            "new_value": "",
-            "expected": {
-                "href": "http://me@example.net/",
-                "password": ""
-            }
-        },
-        {
-            "comment": "UTF-8 percent encoding with the userinfo encode set.",
-            "href": "http://example.net",
-            "new_value": "\u0000\u0001\t\n\r\u001f !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé",
-            "expected": {
-                "href": "http://:%00%01%09%0A%0D%1F%20!%22%23$%&'()*+,-.%2F09%3A%3B%3C%3D%3E%3F%40AZ%5B%5C%5D%5E_%60az%7B%7C%7D~%7F%C2%80%C2%81%C3%89%C3%A9@example.net/",
-                "password": "%00%01%09%0A%0D%1F%20!%22%23$%&'()*+,-.%2F09%3A%3B%3C%3D%3E%3F%40AZ%5B%5C%5D%5E_%60az%7B%7C%7D~%7F%C2%80%C2%81%C3%89%C3%A9"
-            }
-        },
-        {
-            "comment": "Bytes already percent-encoded are left as-is.",
-            "href": "http://example.net",
-            "new_value": "%c3%89té",
-            "expected": {
-                "href": "http://:%c3%89t%C3%A9@example.net/",
-                "password": "%c3%89t%C3%A9"
-            }
-        }
-    ],
-    "host": [
-        {
-            "comment": "Cannot-be-a-base means no host",
-            "href": "mailto:me@example.net",
-            "new_value": "example.com",
-            "expected": {
-                "href": "mailto:me@example.net",
-                "host": ""
-            }
-        },
-        {
-            "comment": "Cannot-be-a-base means no password",
-            "href": "data:text/plain,Stuff",
-            "new_value": "example.net",
-            "expected": {
-                "href": "data:text/plain,Stuff",
-                "host": ""
-            }
-        },
-        {
-            "href": "http://example.net",
-            "new_value": "example.com:8080",
-            "expected": {
-                "href": "http://example.com:8080/",
-                "host": "example.com:8080",
-                "hostname": "example.com",
-                "port": "8080"
-            }
-        },
-        {
-            "comment": "Port number is unchanged if not specified in the new value",
-            "href": "http://example.net:8080",
-            "new_value": "example.com",
-            "expected": {
-                "href": "http://example.com:8080/",
-                "host": "example.com:8080",
-                "hostname": "example.com",
-                "port": "8080"
-            }
-        },
-        {
-            "comment": "Port number is removed if empty in the new value: https://github.com/whatwg/url/pull/113",
-            "href": "http://example.net:8080",
-            "new_value": "example.com:",
-            "expected": {
-                "href": "http://example.com/",
-                "host": "example.com",
-                "hostname": "example.com",
-                "port": ""
-            }
-        },
-        {
-            "comment": "The empty host is not valid for special schemes",
-            "href": "http://example.net",
-            "new_value": "",
-            "expected": {
-                "href": "http://example.net/",
-                "host": "example.net"
-            }
-        },
-        {
-            "comment": "The empty host is OK for non-special schemes",
-            "href": "view-source+http://example.net/foo",
-            "new_value": "",
-            "expected": {
-                "href": "view-source+http:///foo",
-                "host": ""
-            }
-        },
-        {
-            "comment": "Path-only URLs can gain a host",
-            "href": "a:/foo",
-            "new_value": "example.net",
-            "expected": {
-                "href": "a://example.net/foo",
-                "host": "example.net"
-            }
-        },
-        {
-            "comment": "Path-only URLs can gain a host",
-            "href": "a:/foo",
-            "new_value": "example.net",
-            "expected": {
-                "href": "a://example.net/foo",
-                "host": "example.net"
-            }
-        },
-        {
-            "comment": "IPv4 address syntax is normalized",
-            "href": "http://example.net",
-            "new_value": "0x7F000001:8080",
-            "expected": {
-                "href": "http://127.0.0.1:8080/",
-                "host": "127.0.0.1:8080",
-                "hostname": "127.0.0.1",
-                "port": "8080"
-            }
-        },
-        {
-            "comment": "IPv6 address syntax is normalized",
-            "href": "http://example.net",
-            "new_value": "[::0:01]:2",
-            "expected": {
-                "href": "http://[::1]:2/",
-                "host": "[::1]:2",
-                "hostname": "[::1]",
-                "port": "2"
-            }
-        },
-        {
-            "comment": "Default port number is removed",
-            "href": "http://example.net",
-            "new_value": "example.com:80",
-            "expected": {
-                "href": "http://example.com/",
-                "host": "example.com",
-                "hostname": "example.com",
-                "port": ""
-            }
-        },
-        {
-            "comment": "Default port number is removed",
-            "href": "https://example.net",
-            "new_value": "example.com:443",
-            "expected": {
-                "href": "https://example.com/",
-                "host": "example.com",
-                "hostname": "example.com",
-                "port": ""
-            }
-        },
-        {
-            "comment": "Default port number is only removed for the relevant scheme",
-            "href": "https://example.net",
-            "new_value": "example.com:80",
-            "expected": {
-                "href": "https://example.com:80/",
-                "host": "example.com:80",
-                "hostname": "example.com",
-                "port": "80"
-            }
-        },
-        {
-            "comment": "Stuff after a / delimiter is ignored",
-            "href": "http://example.net/path",
-            "new_value": "example.com/stuff",
-            "expected": {
-                "href": "http://example.com/path",
-                "host": "example.com",
-                "hostname": "example.com",
-                "port": ""
-            }
-        },
-        {
-            "comment": "Stuff after a / delimiter is ignored",
-            "href": "http://example.net/path",
-            "new_value": "example.com:8080/stuff",
-            "expected": {
-                "href": "http://example.com:8080/path",
-                "host": "example.com:8080",
-                "hostname": "example.com",
-                "port": "8080"
-            }
-        },
-        {
-            "comment": "Stuff after a ? delimiter is ignored",
-            "href": "http://example.net/path",
-            "new_value": "example.com?stuff",
-            "expected": {
-                "href": "http://example.com/path",
-                "host": "example.com",
-                "hostname": "example.com",
-                "port": ""
-            }
-        },
-        {
-            "comment": "Stuff after a ? delimiter is ignored",
-            "href": "http://example.net/path",
-            "new_value": "example.com:8080?stuff",
-            "expected": {
-                "href": "http://example.com:8080/path",
-                "host": "example.com:8080",
-                "hostname": "example.com",
-                "port": "8080"
-            }
-        },
-        {
-            "comment": "Stuff after a # delimiter is ignored",
-            "href": "http://example.net/path",
-            "new_value": "example.com#stuff",
-            "expected": {
-                "href": "http://example.com/path",
-                "host": "example.com",
-                "hostname": "example.com",
-                "port": ""
-            }
-        },
-        {
-            "comment": "Stuff after a # delimiter is ignored",
-            "href": "http://example.net/path",
-            "new_value": "example.com:8080#stuff",
-            "expected": {
-                "href": "http://example.com:8080/path",
-                "host": "example.com:8080",
-                "hostname": "example.com",
-                "port": "8080"
-            }
-        },
-        {
-            "comment": "Stuff after a \\ delimiter is ignored for special schemes",
-            "href": "http://example.net/path",
-            "new_value": "example.com\\stuff",
-            "expected": {
-                "href": "http://example.com/path",
-                "host": "example.com",
-                "hostname": "example.com",
-                "port": ""
-            }
-        },
-        {
-            "comment": "Stuff after a \\ delimiter is ignored for special schemes",
-            "href": "http://example.net/path",
-            "new_value": "example.com:8080\\stuff",
-            "expected": {
-                "href": "http://example.com:8080/path",
-                "host": "example.com:8080",
-                "hostname": "example.com",
-                "port": "8080"
-            }
-        },
-        {
-            "comment": "\\ is not a delimiter for non-special schemes, and it’s invalid in a domain",
-            "href": "view-source+http://example.net/path",
-            "new_value": "example.com\\stuff",
-            "expected": {
-                "href": "view-source+http://example.net/path",
-                "host": "example.net",
-                "hostname": "example.net",
-                "port": ""
-            }
-        },
-        {
-            "comment": "Anything other than ASCII digit stops the port parser in a setter but is not an error",
-            "href": "view-source+http://example.net/path",
-            "new_value": "example.com:8080stuff2",
-            "expected": {
-                "href": "view-source+http://example.com:8080/path",
-                "host": "example.com:8080",
-                "hostname": "example.com",
-                "port": "8080"
-            }
-        },
-        {
-            "comment": "Anything other than ASCII digit stops the port parser in a setter but is not an error",
-            "href": "http://example.net/path",
-            "new_value": "example.com:8080stuff2",
-            "expected": {
-                "href": "http://example.com:8080/path",
-                "host": "example.com:8080",
-                "hostname": "example.com",
-                "port": "8080"
-            }
-        },
-        {
-            "comment": "Anything other than ASCII digit stops the port parser in a setter but is not an error",
-            "href": "http://example.net/path",
-            "new_value": "example.com:8080+2",
-            "expected": {
-                "href": "http://example.com:8080/path",
-                "host": "example.com:8080",
-                "hostname": "example.com",
-                "port": "8080"
-            }
-        },
-        {
-            "comment": "Port numbers are 16 bit integers",
-            "href": "http://example.net/path",
-            "new_value": "example.com:65535",
-            "expected": {
-                "href": "http://example.com:65535/path",
-                "host": "example.com:65535",
-                "hostname": "example.com",
-                "port": "65535"
-            }
-        },
-        {
-            "comment": "Port numbers are 16 bit integers, overflowing is an error. Hostname is still set, though.",
-            "href": "http://example.net/path",
-            "new_value": "example.com:65536",
-            "expected": {
-                "href": "http://example.com/path",
-                "host": "example.com",
-                "hostname": "example.com",
-                "port": ""
-            }
-        }
-    ],
-    "hostname": [
-        {
-            "comment": "Cannot-be-a-base means no host",
-            "href": "mailto:me@example.net",
-            "new_value": "example.com",
-            "expected": {
-                "href": "mailto:me@example.net",
-                "host": ""
-            }
-        },
-        {
-            "comment": "Cannot-be-a-base means no password",
-            "href": "data:text/plain,Stuff",
-            "new_value": "example.net",
-            "expected": {
-                "href": "data:text/plain,Stuff",
-                "host": ""
-            }
-        },
-        {
-            "href": "http://example.net:8080",
-            "new_value": "example.com",
-            "expected": {
-                "href": "http://example.com:8080/",
-                "host": "example.com:8080",
-                "hostname": "example.com",
-                "port": "8080"
-            }
-        },
-        {
-            "comment": "The empty host is not valid for special schemes",
-            "href": "http://example.net",
-            "new_value": "",
-            "expected": {
-                "href": "http://example.net/",
-                "host": "example.net"
-            }
-        },
-        {
-            "comment": "The empty host is OK for non-special schemes",
-            "href": "view-source+http://example.net/foo",
-            "new_value": "",
-            "expected": {
-                "href": "view-source+http:///foo",
-                "host": ""
-            }
-        },
-        {
-            "comment": "Path-only URLs can gain a host",
-            "href": "a:/foo",
-            "new_value": "example.net",
-            "expected": {
-                "href": "a://example.net/foo",
-                "host": "example.net"
-            }
-        },
-        {
-            "comment": "Path-only URLs can gain a host",
-            "href": "a:/foo",
-            "new_value": "example.net",
-            "expected": {
-                "href": "a://example.net/foo",
-                "host": "example.net"
-            }
-        },
-        {
-            "comment": "IPv4 address syntax is normalized",
-            "href": "http://example.net:8080",
-            "new_value": "0x7F000001",
-            "expected": {
-                "href": "http://127.0.0.1:8080/",
-                "host": "127.0.0.1:8080",
-                "hostname": "127.0.0.1",
-                "port": "8080"
-            }
-        },
-        {
-            "comment": "IPv6 address syntax is normalized",
-            "href": "http://example.net",
-            "new_value": "[::0:01]",
-            "expected": {
-                "href": "http://[::1]/",
-                "host": "[::1]",
-                "hostname": "[::1]",
-                "port": ""
-            }
-        },
-        {
-            "comment": "Stuff after a : delimiter is ignored",
-            "href": "http://example.net/path",
-            "new_value": "example.com:8080",
-            "expected": {
-                "href": "http://example.com/path",
-                "host": "example.com",
-                "hostname": "example.com",
-                "port": ""
-            }
-        },
-        {
-            "comment": "Stuff after a : delimiter is ignored",
-            "href": "http://example.net:8080/path",
-            "new_value": "example.com:",
-            "expected": {
-                "href": "http://example.com:8080/path",
-                "host": "example.com:8080",
-                "hostname": "example.com",
-                "port": "8080"
-            }
-        },
-        {
-            "comment": "Stuff after a / delimiter is ignored",
-            "href": "http://example.net/path",
-            "new_value": "example.com/stuff",
-            "expected": {
-                "href": "http://example.com/path",
-                "host": "example.com",
-                "hostname": "example.com",
-                "port": ""
-            }
-        },
-        {
-            "comment": "Stuff after a ? delimiter is ignored",
-            "href": "http://example.net/path",
-            "new_value": "example.com?stuff",
-            "expected": {
-                "href": "http://example.com/path",
-                "host": "example.com",
-                "hostname": "example.com",
-                "port": ""
-            }
-        },
-        {
-            "comment": "Stuff after a # delimiter is ignored",
-            "href": "http://example.net/path",
-            "new_value": "example.com#stuff",
-            "expected": {
-                "href": "http://example.com/path",
-                "host": "example.com",
-                "hostname": "example.com",
-                "port": ""
-            }
-        },
-        {
-            "comment": "Stuff after a \\ delimiter is ignored for special schemes",
-            "href": "http://example.net/path",
-            "new_value": "example.com\\stuff",
-            "expected": {
-                "href": "http://example.com/path",
-                "host": "example.com",
-                "hostname": "example.com",
-                "port": ""
-            }
-        },
-        {
-            "comment": "\\ is not a delimiter for non-special schemes, and it’s invalid in a domain",
-            "href": "view-source+http://example.net/path",
-            "new_value": "example.com\\stuff",
-            "expected": {
-                "href": "view-source+http://example.net/path",
-                "host": "example.net",
-                "hostname": "example.net",
-                "port": ""
-            }
-        }
-    ],
-    "port": [
-        {
-            "href": "http://example.net",
-            "new_value": "8080",
-            "expected": {
-                "href": "http://example.net:8080/",
-                "host": "example.net:8080",
-                "hostname": "example.net",
-                "port": "8080"
-            }
-        },
-        {
-            "comment": "Port number is removed if empty in the new value: https://github.com/whatwg/url/pull/113",
-            "href": "http://example.net:8080",
-            "new_value": "",
-            "expected": {
-                "href": "http://example.net/",
-                "host": "example.net",
-                "hostname": "example.net",
-                "port": ""
-            }
-        },
-        {
-            "comment": "Default port number is removed",
-            "href": "http://example.net:8080",
-            "new_value": "80",
-            "expected": {
-                "href": "http://example.net/",
-                "host": "example.net",
-                "hostname": "example.net",
-                "port": ""
-            }
-        },
-        {
-            "comment": "Default port number is removed",
-            "href": "https://example.net:4433",
-            "new_value": "443",
-            "expected": {
-                "href": "https://example.net/",
-                "host": "example.net",
-                "hostname": "example.net",
-                "port": ""
-            }
-        },
-        {
-            "comment": "Default port number is only removed for the relevant scheme",
-            "href": "https://example.net",
-            "new_value": "80",
-            "expected": {
-                "href": "https://example.net:80/",
-                "host": "example.net:80",
-                "hostname": "example.net",
-                "port": "80"
-            }
-        },
-        {
-            "comment": "Stuff after a / delimiter is ignored",
-            "href": "http://example.net/path",
-            "new_value": "8080/stuff",
-            "expected": {
-                "href": "http://example.net:8080/path",
-                "host": "example.net:8080",
-                "hostname": "example.net",
-                "port": "8080"
-            }
-        },
-        {
-            "comment": "Stuff after a ? delimiter is ignored",
-            "href": "http://example.net/path",
-            "new_value": "8080?stuff",
-            "expected": {
-                "href": "http://example.net:8080/path",
-                "host": "example.net:8080",
-                "hostname": "example.net",
-                "port": "8080"
-            }
-        },
-        {
-            "comment": "Stuff after a # delimiter is ignored",
-            "href": "http://example.net/path",
-            "new_value": "8080#stuff",
-            "expected": {
-                "href": "http://example.net:8080/path",
-                "host": "example.net:8080",
-                "hostname": "example.net",
-                "port": "8080"
-            }
-        },
-        {
-            "comment": "Stuff after a \\ delimiter is ignored for special schemes",
-            "href": "http://example.net/path",
-            "new_value": "8080\\stuff",
-            "expected": {
-                "href": "http://example.net:8080/path",
-                "host": "example.net:8080",
-                "hostname": "example.net",
-                "port": "8080"
-            }
-        },
-        {
-            "comment": "Anything other than ASCII digit stops the port parser in a setter but is not an error",
-            "href": "view-source+http://example.net/path",
-            "new_value": "8080stuff2",
-            "expected": {
-                "href": "view-source+http://example.net:8080/path",
-                "host": "example.net:8080",
-                "hostname": "example.net",
-                "port": "8080"
-            }
-        },
-        {
-            "comment": "Anything other than ASCII digit stops the port parser in a setter but is not an error",
-            "href": "http://example.net/path",
-            "new_value": "8080stuff2",
-            "expected": {
-                "href": "http://example.net:8080/path",
-                "host": "example.net:8080",
-                "hostname": "example.net",
-                "port": "8080"
-            }
-        },
-        {
-            "comment": "Anything other than ASCII digit stops the port parser in a setter but is not an error",
-            "href": "http://example.net/path",
-            "new_value": "8080+2",
-            "expected": {
-                "href": "http://example.net:8080/path",
-                "host": "example.net:8080",
-                "hostname": "example.net",
-                "port": "8080"
-            }
-        },
-        {
-            "comment": "Port numbers are 16 bit integers",
-            "href": "http://example.net/path",
-            "new_value": "65535",
-            "expected": {
-                "href": "http://example.net:65535/path",
-                "host": "example.net:65535",
-                "hostname": "example.net",
-                "port": "65535"
-            }
-        },
-        {
-            "comment": "Port numbers are 16 bit integers, overflowing is an error",
-            "href": "http://example.net:8080/path",
-            "new_value": "65536",
-            "expected": {
-                "href": "http://example.net:8080/path",
-                "host": "example.net:8080",
-                "hostname": "example.net",
-                "port": "8080"
-            }
-        }
-    ],
-    "pathname": [
-        {
-            "comment": "Cannot-be-a-base don’t have a path",
-            "href": "mailto:me@example.net",
-            "new_value": "/foo",
-            "expected": {
-                "href": "mailto:me@example.net",
-                "pathname": "me@example.net"
-            }
-        },
-        {
-            "href": "unix:/run/foo.socket?timeout=10",
-            "new_value": "/var/log/../run/bar.socket",
-            "expected": {
-                "href": "unix:/var/run/bar.socket?timeout=10",
-                "pathname": "/var/run/bar.socket"
-            }
-        },
-        {
-            "href": "https://example.net#nav",
-            "new_value": "home",
-            "expected": {
-                "href": "https://example.net/home#nav",
-                "pathname": "/home"
-            }
-        },
-        {
-            "href": "https://example.net#nav",
-            "new_value": "../home",
-            "expected": {
-                "href": "https://example.net/home#nav",
-                "pathname": "/home"
-            }
-        },
-        {
-            "comment": "\\ is a segment delimiter for 'special' URLs",
-            "href": "http://example.net/home?lang=fr#nav",
-            "new_value": "\\a\\%2E\\b\\%2e.\\c",
-            "expected": {
-                "href": "http://example.net/a/c?lang=fr#nav",
-                "pathname": "/a/c"
-            }
-        },
-        {
-            "comment": "\\ is *not* a segment delimiter for non-'special' URLs",
-            "href": "view-source+http://example.net/home?lang=fr#nav",
-            "new_value": "\\a\\%2E\\b\\%2e.\\c",
-            "expected": {
-                "href": "view-source+http://example.net/\\a\\.\\b\\..\\c?lang=fr#nav",
-                "pathname": "/\\a\\.\\b\\..\\c"
-            }
-        },
-        {
-            "comment": "UTF-8 percent encoding with the default encode set. Tabs and newlines are removed. Leading or training C0 controls and space are removed.",
-            "href": "a:/",
-            "new_value": "\u0000\u0001\t\n\r\u001f !\u0000\u0001\t\n\r\u001f !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé",
-            "expected": {
-                "href": "a:/!%00%01%1F%20!%22%23$%&'()*+,-./09:;%3C=%3E%3F@AZ[\\]^_%60az%7B|%7D~%7F%C2%80%C2%81%C3%89%C3%A9",
-                "pathname": "/!%00%01%1F%20!%22%23$%&'()*+,-./09:;%3C=%3E%3F@AZ[\\]^_%60az%7B|%7D~%7F%C2%80%C2%81%C3%89%C3%A9"
-            }
-        },
-        {
-            "comment": "Bytes already percent-encoded are left as-is, except %2E.",
-            "href": "http://example.net",
-            "new_value": "%2e%2E%c3%89té",
-            "expected": {
-                "href": "http://example.net/..%c3%89t%C3%A9",
-                "pathname": "/..%c3%89t%C3%A9"
-            }
-        }
-    ],
-    "search": [
-        {
-            "href": "https://example.net#nav",
-            "new_value": "lang=fr",
-            "expected": {
-                "href": "https://example.net/?lang=fr#nav",
-                "search": "?lang=fr"
-            }
-        },
-        {
-            "href": "https://example.net?lang=en-US#nav",
-            "new_value": "lang=fr",
-            "expected": {
-                "href": "https://example.net/?lang=fr#nav",
-                "search": "?lang=fr"
-            }
-        },
-        {
-            "href": "https://example.net?lang=en-US#nav",
-            "new_value": "?lang=fr",
-            "expected": {
-                "href": "https://example.net/?lang=fr#nav",
-                "search": "?lang=fr"
-            }
-        },
-        {
-            "href": "https://example.net?lang=en-US#nav",
-            "new_value": "??lang=fr",
-            "expected": {
-                "href": "https://example.net/??lang=fr#nav",
-                "search": "??lang=fr"
-            }
-        },
-        {
-            "href": "https://example.net?lang=en-US#nav",
-            "new_value": "?",
-            "expected": {
-                "href": "https://example.net/?#nav",
-                "search": ""
-            }
-        },
-        {
-            "href": "https://example.net?lang=en-US#nav",
-            "new_value": "",
-            "expected": {
-                "href": "https://example.net/#nav",
-                "search": ""
-            }
-        },
-        {
-            "href": "https://example.net?lang=en-US",
-            "new_value": "",
-            "expected": {
-                "href": "https://example.net/",
-                "search": ""
-            }
-        },
-        {
-            "href": "https://example.net",
-            "new_value": "",
-            "expected": {
-                "href": "https://example.net/",
-                "search": ""
-            }
-        },
-        {
-            "comment": "UTF-8 percent encoding with the query encode set. Tabs and newlines are removed. Leading or training C0 controls and space are removed.",
-            "href": "a:/",
-            "new_value": "\u0000\u0001\t\n\r\u001f !\u0000\u0001\t\n\r\u001f !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé",
-            "expected": {
-                "href": "a:/?!%00%01%1F%20!%22%23$%&'()*+,-./09:;%3C=%3E?@AZ[\\]^_`az{|}~%7F%C2%80%C2%81%C3%89%C3%A9",
-                "search": "?!%00%01%1F%20!%22%23$%&'()*+,-./09:;%3C=%3E?@AZ[\\]^_`az{|}~%7F%C2%80%C2%81%C3%89%C3%A9"
-            }
-        },
-        {
-            "comment": "Bytes already percent-encoded are left as-is",
-            "href": "http://example.net",
-            "new_value": "%c3%89té",
-            "expected": {
-                "href": "http://example.net/?%c3%89t%C3%A9",
-                "search": "?%c3%89t%C3%A9"
-            }
-        }
-    ],
-    "hash": [
-        {
-            "href": "https://example.net",
-            "new_value": "main",
-            "expected": {
-                "href": "https://example.net/#main",
-                "hash": "#main"
-            }
-        },
-        {
-            "href": "https://example.net#nav",
-            "new_value": "main",
-            "expected": {
-                "href": "https://example.net/#main",
-                "hash": "#main"
-            }
-        },
-        {
-            "href": "https://example.net?lang=en-US",
-            "new_value": "##nav",
-            "expected": {
-                "href": "https://example.net/?lang=en-US##nav",
-                "hash": "##nav"
-            }
-        },
-        {
-            "href": "https://example.net?lang=en-US#nav",
-            "new_value": "#main",
-            "expected": {
-                "href": "https://example.net/?lang=en-US#main",
-                "hash": "#main"
-            }
-        },
-        {
-            "href": "https://example.net?lang=en-US#nav",
-            "new_value": "#",
-            "expected": {
-                "href": "https://example.net/?lang=en-US#",
-                "hash": ""
-            }
-        },
-        {
-            "href": "https://example.net?lang=en-US#nav",
-            "new_value": "",
-            "expected": {
-                "href": "https://example.net/?lang=en-US",
-                "hash": ""
-            }
-        },
-        {
-            "comment": "Simple percent-encoding; nuls, tabs, and newlines are removed",
-            "href": "a:/",
-            "new_value": "\u0000\u0001\t\n\r\u001f !\u0000\u0001\t\n\r\u001f !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé",
-            "expected": {
-                "href": "a:/#!%01%1F !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~%7F%C2%80%C2%81%C3%89%C3%A9",
-                "hash": "#!%01%1F !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~%7F%C2%80%C2%81%C3%89%C3%A9"
-            }
-        },
-        {
-            "comment": "Bytes already percent-encoded are left as-is",
-            "href": "http://example.net",
-            "new_value": "%c3%89té",
-            "expected": {
-                "href": "http://example.net/#%c3%89t%C3%A9",
-                "hash": "#%c3%89t%C3%A9"
-            }
-        }
-    ]
-}
deleted file mode 100644
--- a/third_party/rust/url-1.5.1/tests/unit.rs
+++ /dev/null
@@ -1,480 +0,0 @@
-// Copyright 2013-2014 The rust-url developers.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-//! Unit tests
-
-#[macro_use]
-extern crate url;
-
-use std::borrow::Cow;
-use std::net::{Ipv4Addr, Ipv6Addr};
-use std::path::{Path, PathBuf};
-use url::{Host, HostAndPort, Url, form_urlencoded};
-
-#[test]
-fn size() {
-    use std::mem::size_of;
-    assert_eq!(size_of::<Url>(), size_of::<Option<Url>>());
-}
-
-macro_rules! assert_from_file_path {
-    ($path: expr) => { assert_from_file_path!($path, $path) };
-    ($path: expr, $url_path: expr) => {{
-        let url = Url::from_file_path(Path::new($path)).unwrap();
-        assert_eq!(url.host(), None);
-        assert_eq!(url.path(), $url_path);
-        assert_eq!(url.to_file_path(), Ok(PathBuf::from($path)));
-    }};
-}
-
-
-
-#[test]
-fn new_file_paths() {
-    if cfg!(unix) {
-        assert_eq!(Url::from_file_path(Path::new("relative")), Err(()));
-        assert_eq!(Url::from_file_path(Path::new("../relative")), Err(()));
-    }
-    if cfg!(windows) {
-        assert_eq!(Url::from_file_path(Path::new("relative")), Err(()));
-        assert_eq!(Url::from_file_path(Path::new(r"..\relative")), Err(()));
-        assert_eq!(Url::from_file_path(Path::new(r"\drive-relative")), Err(()));
-        assert_eq!(Url::from_file_path(Path::new(r"\\ucn\")), Err(()));
-    }
-
-    if cfg!(unix) {
-        assert_from_file_path!("/foo/bar");
-        assert_from_file_path!("/foo/ba\0r", "/foo/ba%00r");
-        assert_from_file_path!("/foo/ba%00r", "/foo/ba%2500r");
-    }
-}
-
-#[test]
-#[cfg(unix)]
-fn new_path_bad_utf8() {
-    use std::ffi::OsStr;
-    use std::os::unix::prelude::*;
-
-    let url = Url::from_file_path(Path::new(OsStr::from_bytes(b"/foo/ba\x80r"))).unwrap();
-    let os_str = OsStr::from_bytes(b"/foo/ba\x80r");
-    assert_eq!(url.to_file_path(), Ok(PathBuf::from(os_str)));
-}
-
-#[test]
-fn new_path_windows_fun() {
-    if cfg!(windows) {
-        assert_from_file_path!(r"C:\foo\bar", "/C:/foo/bar");
-        assert_from_file_path!("C:\\foo\\ba\0r", "/C:/foo/ba%00r");
-
-        // Invalid UTF-8
-        assert!(Url::parse("file:///C:/foo/ba%80r").unwrap().to_file_path().is_err());
-
-        // test windows canonicalized path
-        let path = PathBuf::from(r"\\?\C:\foo\bar");
-        assert!(Url::from_file_path(path).is_ok());
-
-        // Percent-encoded drive letter
-        let url = Url::parse("file:///C%3A/foo/bar").unwrap();
-        assert_eq!(url.to_file_path(), Ok(PathBuf::from(r"C:\foo\bar")));
-    }
-}
-
-
-#[test]
-fn new_directory_paths() {
-    if cfg!(unix) {
-        assert_eq!(Url::from_directory_path(Path::new("relative")), Err(()));
-        assert_eq!(Url::from_directory_path(Path::new("../relative")), Err(()));
-
-        let url = Url::from_directory_path(Path::new("/foo/bar")).unwrap();
-        assert_eq!(url.host(), None);
-        assert_eq!(url.path(), "/foo/bar/");
-    }
-    if cfg!(windows) {
-        assert_eq!(Url::from_directory_path(Path::new("relative")), Err(()));
-        assert_eq!(Url::from_directory_path(Path::new(r"..\relative")), Err(()));
-        assert_eq!(Url::from_directory_path(Path::new(r"\drive-relative")), Err(()));
-        assert_eq!(Url::from_directory_path(Path::new(r"\\ucn\")), Err(()));
-
-        let url = Url::from_directory_path(Path::new(r"C:\foo\bar")).unwrap();
-        assert_eq!(url.host(), None);
-        assert_eq!(url.path(), "/C:/foo/bar/");
-    }
-}
-
-#[test]
-fn from_str() {
-    assert!("http://testing.com/this".parse::<Url>().is_ok());
-}
-
-#[test]
-fn parse_with_params() {
-    let url = Url::parse_with_params("http://testing.com/this?dont=clobberme",
-                                     &[("lang", "rust")]).unwrap();
-
-    assert_eq!(url.as_str(), "http://testing.com/this?dont=clobberme&lang=rust");
-}
-
-#[test]
-fn issue_124() {
-    let url: Url = "file:a".parse().unwrap();
-    assert_eq!(url.path(), "/a");
-    let url: Url = "file:...".parse().unwrap();
-    assert_eq!(url.path(), "/...");
-    let url: Url = "file:..".parse().unwrap();
-    assert_eq!(url.path(), "/");
-}
-
-#[test]
-fn test_equality() {
-    use std::hash::{Hash, Hasher};
-    use std::collections::hash_map::DefaultHasher;
-
-    fn check_eq(a: &Url, b: &Url) {
-        assert_eq!(a, b);
-
-        let mut h1 = DefaultHasher::new();
-        a.hash(&mut h1);
-        let mut h2 = DefaultHasher::new();
-        b.hash(&mut h2);
-        assert_eq!(h1.finish(), h2.finish());
-    }
-
-    fn url(s: &str) -> Url {
-        let rv = s.parse().unwrap();
-        check_eq(&rv, &rv);
-        rv
-    }
-
-    // Doesn't care if default port is given.
-    let a: Url = url("https://example.com/");
-    let b: Url = url("https://example.com:443/");
-    check_eq(&a, &b);
-
-    // Different ports
-    let a: Url = url("http://example.com/");
-    let b: Url = url("http://example.com:8080/");
-    assert!(a != b, "{:?} != {:?}", a, b);
-
-    // Different scheme
-    let a: Url = url("http://example.com/");
-    let b: Url = url("https://example.com/");
-    assert_ne!(a, b);
-
-    // Different host
-    let a: Url = url("http://foo.com/");
-    let b: Url = url("http://bar.com/");
-    assert_ne!(a, b);
-
-    // Missing path, automatically substituted. Semantically the same.
-    let a: Url = url("http://foo.com");
-    let b: Url = url("http://foo.com/");
-    check_eq(&a, &b);
-}
-
-#[test]
-fn host() {
-    fn assert_host(input: &str, host: Host<&str>) {
-        assert_eq!(Url::parse(input).unwrap().host(), Some(host));
-    }
-    assert_host("http://www.mozilla.org", Host::Domain("www.mozilla.org"));
-    assert_host("http://1.35.33.49", Host::Ipv4(Ipv4Addr::new(1, 35, 33, 49)));
-    assert_host("http://[2001:0db8:85a3:08d3:1319:8a2e:0370:7344]", Host::Ipv6(Ipv6Addr::new(
-        0x2001, 0x0db8, 0x85a3, 0x08d3, 0x1319, 0x8a2e, 0x0370, 0x7344)));
-    assert_host("http://1.35.+33.49", Host::Domain("1.35.+33.49"));
-    assert_host("http://[::]", Host::Ipv6(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0)));
-    assert_host("http://[::1]", Host::Ipv6(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1)));
-    assert_host("http://0x1.0X23.0x21.061", Host::Ipv4(Ipv4Addr::new(1, 35, 33, 49)));
-    assert_host("http://0x1232131", Host::Ipv4(Ipv4Addr::new(1, 35, 33, 49)));
-    assert_host("http://111", Host::Ipv4(Ipv4Addr::new(0, 0, 0, 111)));
-    assert_host("http://2..2.3", Host::Domain("2..2.3"));
-    assert!(Url::parse("http://42.0x1232131").is_err());
-    assert!(Url::parse("http://192.168.0.257").is_err());
-}
-
-#[test]
-fn host_serialization() {
-    // libstd’s `Display for Ipv6Addr` serializes 0:0:0:0:0:0:_:_ and 0:0:0:0:0:ffff:_:_
-    // using IPv4-like syntax, as suggested in https://tools.ietf.org/html/rfc5952#section-4
-    // but https://url.spec.whatwg.org/#concept-ipv6-serializer specifies not to.
-
-    // Not [::0.0.0.2] / [::ffff:0.0.0.2]
-    assert_eq!(Url::parse("http://[0::2]").unwrap().host_str(), Some("[::2]"));
-    assert_eq!(Url::parse("http://[0::ffff:0:2]").unwrap().host_str(), Some("[::ffff:0:2]"));
-}
-
-#[test]
-fn test_idna() {
-    assert!("http://goșu.ro".parse::<Url>().is_ok());
-    assert_eq!(Url::parse("http://☃.net/").unwrap().host(), Some(Host::Domain("xn--n3h.net")));
-    assert!("https://r2---sn-huoa-cvhl.googlevideo.com/crossdomain.xml".parse::<Url>().is_ok());
-}
-
-#[test]
-fn test_serialization() {
-    let data = [
-        ("http://example.com/", "http://example.com/"),
-        ("http://addslash.com", "http://addslash.com/"),
-        ("http://@emptyuser.com/", "http://emptyuser.com/"),
-        ("http://:@emptypass.com/", "http://:@emptypass.com/"),
-        ("http://user@user.com/", "http://user@user.com/"),
-        ("http://user:pass@userpass.com/", "http://user:pass@userpass.com/"),
-        ("http://slashquery.com/path/?q=something", "http://slashquery.com/path/?q=something"),
-        ("http://noslashquery.com/path?q=something", "http://noslashquery.com/path?q=something")
-    ];
-    for &(input, result) in &data {
-        let url = Url::parse(input).unwrap();
-        assert_eq!(url.as_str(), result);
-    }
-}
-
-#[test]
-fn test_form_urlencoded() {
-    let pairs: &[(Cow<str>, Cow<str>)] = &[
-        ("foo".into(), "é&".into()),
-        ("bar".into(), "".into()),
-        ("foo".into(), "#".into())
-    ];
-    let encoded = form_urlencoded::Serializer::new(String::new()).extend_pairs(pairs).finish();
-    assert_eq!(encoded, "foo=%C3%A9%26&bar=&foo=%23");
-    assert_eq!(form_urlencoded::parse(encoded.as_bytes()).collect::<Vec<_>>(), pairs.to_vec());
-}
-
-#[test]
-fn test_form_serialize() {
-    let encoded = form_urlencoded::Serializer::new(String::new())
-        .append_pair("foo", "é&")
-        .append_pair("bar", "")
-        .append_pair("foo", "#")
-        .finish();
-    assert_eq!(encoded, "foo=%C3%A9%26&bar=&foo=%23");
-}
-
-#[test]
-fn host_and_port_display() {
-    assert_eq!(
-        format!(
-            "{}",
-            HostAndPort{ host: Host::Domain("www.mozilla.org"), port: 80}
-        ),
-        "www.mozilla.org:80"
-    );
-    assert_eq!(
-        format!(
-            "{}",
-            HostAndPort::<String>{ host: Host::Ipv4(Ipv4Addr::new(1, 35, 33, 49)), port: 65535 }
-        ),
-        "1.35.33.49:65535"
-    );
-    assert_eq!(
-        format!(
-            "{}",
-            HostAndPort::<String>{
-                host: Host::Ipv6(Ipv6Addr::new(
-                    0x2001, 0x0db8, 0x85a3, 0x08d3, 0x1319, 0x8a2e, 0x0370, 0x7344
-                )),
-                port: 1337
-            })
-        ,
-        "[2001:db8:85a3:8d3:1319:8a2e:370:7344]:1337"
-    )
-}
-
-#[test]
-/// https://github.com/servo/rust-url/issues/25
-fn issue_25() {
-    let filename = if cfg!(windows) { r"C:\run\pg.sock" } else { "/run/pg.sock" };
-    let mut url = Url::from_file_path(filename).unwrap();
-    url.check_invariants().unwrap();
-    url.set_scheme("postgres").unwrap();
-    url.check_invariants().unwrap();
-    url.set_host(Some("")).unwrap();
-    url.check_invariants().unwrap();
-    url.set_username("me").unwrap();
-    url.check_invariants().unwrap();
-    let expected = format!("postgres://me@/{}run/pg.sock", if cfg!(windows) { "C:/" } else { "" });
-    assert_eq!(url.as_str(), expected);
-}
-
-#[test]
-/// https://github.com/servo/rust-url/issues/61
-fn issue_61() {
-    let mut url = Url::parse("http://mozilla.org").unwrap();
-    url.set_scheme("https").unwrap();
-    assert_eq!(url.port(), None);
-    assert_eq!(url.port_or_known_default(), Some(443));
-    url.check_invariants().unwrap();
-}
-
-#[test]
-#[cfg(not(windows))]
-/// https://github.com/servo/rust-url/issues/197
-fn issue_197() {
-    let mut url = Url::from_file_path("/").expect("Failed to parse path");
-    url.check_invariants().unwrap();
-    assert_eq!(url, Url::parse("file:///").expect("Failed to parse path + protocol"));
-    url.path_segments_mut().expect("path_segments_mut").pop_if_empty();
-}
-
-#[test]
-fn issue_241() {
-    Url::parse("mailto:").unwrap().cannot_be_a_base();
-}
-
-#[test]
-/// https://github.com/servo/rust-url/issues/222
-fn append_trailing_slash() {
-    let mut url: Url = "http://localhost:6767/foo/bar?a=b".parse().unwrap();
-    url.check_invariants().unwrap();
-    url.path_segments_mut().unwrap().push("");
-    url.check_invariants().unwrap();
-    assert_eq!(url.to_string(), "http://localhost:6767/foo/bar/?a=b");
-}
-
-#[test]
-/// https://github.com/servo/rust-url/issues/227
-fn extend_query_pairs_then_mutate() {
-    let mut url: Url = "http://localhost:6767/foo/bar".parse().unwrap();
-    url.query_pairs_mut().extend_pairs(vec![ ("auth", "my-token") ].into_iter());
-    url.check_invariants().unwrap();
-    assert_eq!(url.to_string(), "http://localhost:6767/foo/bar?auth=my-token");
-    url.path_segments_mut().unwrap().push("some_other_path");
-    url.check_invariants().unwrap();
-    assert_eq!(url.to_string(), "http://localhost:6767/foo/bar/some_other_path?auth=my-token");
-}
-
-#[test]
-/// https://github.com/servo/rust-url/issues/222
-fn append_empty_segment_then_mutate() {
-    let mut url: Url = "http://localhost:6767/foo/bar?a=b".parse().unwrap();
-    url.check_invariants().unwrap();
-    url.path_segments_mut().unwrap().push("").pop();
-    url.check_invariants().unwrap();
-    assert_eq!(url.to_string(), "http://localhost:6767/foo/bar?a=b");
-}
-
-#[test]
-/// https://github.com/servo/rust-url/issues/243
-fn test_set_host() {
-    let mut url = Url::parse("https://example.net/hello").unwrap();
-    url.set_host(Some("foo.com")).unwrap();
-    assert_eq!(url.as_str(), "https://foo.com/hello");
-    assert!(url.set_host(None).is_err());
-    assert_eq!(url.as_str(), "https://foo.com/hello");
-    assert!(url.set_host(Some("")).is_err());
-    assert_eq!(url.as_str(), "https://foo.com/hello");
-
-    let mut url = Url::parse("foobar://example.net/hello").unwrap();
-    url.set_host(None).unwrap();
-    assert_eq!(url.as_str(), "foobar:/hello");
-}
-
-#[test]
-// https://github.com/servo/rust-url/issues/166
-fn test_leading_dots() {
-    assert_eq!(Host::parse(".org").unwrap(), Host::Domain(".org".to_owned()));
-    assert_eq!(Url::parse("file://./foo").unwrap().domain(), Some("."));
-}
-
-// This is testing that the macro produces buildable code when invoked
-// inside both a module and a function
-#[test]
-fn define_encode_set_scopes() {
-    use url::percent_encoding::{utf8_percent_encode, SIMPLE_ENCODE_SET};
-
-    define_encode_set! {
-        /// This encode set is used in the URL parser for query strings.
-        pub QUERY_ENCODE_SET = [SIMPLE_ENCODE_SET] | {' ', '"', '#', '<', '>'}
-    }
-
-    assert_eq!(utf8_percent_encode("foo bar", QUERY_ENCODE_SET).collect::<String>(), "foo%20bar");
-
-    mod m {
-        use url::percent_encoding::{utf8_percent_encode, SIMPLE_ENCODE_SET};
-
-        define_encode_set! {
-            /// This encode set is used in the URL parser for query strings.
-            pub QUERY_ENCODE_SET = [SIMPLE_ENCODE_SET] | {' ', '"', '#', '<', '>'}
-        }
-
-        pub fn test() {
-            assert_eq!(utf8_percent_encode("foo bar", QUERY_ENCODE_SET).collect::<String>(), "foo%20bar");
-        }
-    }
-
-    m::test();
-}
-
-#[test]
-/// https://github.com/servo/rust-url/issues/302
-fn test_origin_hash() {
-    use std::hash::{Hash,Hasher};
-    use std::collections::hash_map::DefaultHasher;
-
-    fn hash<T: Hash>(value: &T) -> u64 {
-        let mut hasher = DefaultHasher::new();
-        value.hash(&mut hasher);
-        hasher.finish()
-    }
-
-    let origin = &Url::parse("http://example.net/").unwrap().origin();
-
-    let origins_to_compare = [
-        Url::parse("http://example.net:80/").unwrap().origin(),
-        Url::parse("http://example.net:81/").unwrap().origin(),
-        Url::parse("http://example.net").unwrap().origin(),
-        Url::parse("http://example.net/hello").unwrap().origin(),
-        Url::parse("https://example.net").unwrap().origin(),
-        Url::parse("ftp://example.net").unwrap().origin(),
-        Url::parse("file://example.net").unwrap().origin(),
-        Url::parse("http://user@example.net/").unwrap().origin(),
-        Url::parse("http://user:pass@example.net/").unwrap().origin(),
-    ];
-
-    for origin_to_compare in &origins_to_compare {
-        if origin == origin_to_compare {
-            assert_eq!(hash(origin), hash(origin_to_compare));
-        } else {
-            assert_ne!(hash(origin), hash(origin_to_compare));
-        }
-    }
-
-    let opaque_origin = Url::parse("file://example.net").unwrap().origin();
-    let same_opaque_origin = Url::parse("file://example.net").unwrap().origin();
-    let other_opaque_origin = Url::parse("file://other").unwrap().origin();
-
-    assert_ne!(hash(&opaque_origin), hash(&same_opaque_origin));
-    assert_ne!(hash(&opaque_origin), hash(&other_opaque_origin));
-}
-
-#[test]
-fn test_windows_unc_path() {
-    if !cfg!(windows) {
-        return
-    }
-
-    let url = Url::from_file_path(Path::new(r"\\host\share\path\file.txt")).unwrap();
-    assert_eq!(url.as_str(), "file://host/share/path/file.txt");
-
-    let url = Url::from_file_path(Path::new(r"\\höst\share\path\file.txt")).unwrap();
-    assert_eq!(url.as_str(), "file://xn--hst-sna/share/path/file.txt");
-
-    let url = Url::from_file_path(Path::new(r"\\192.168.0.1\share\path\file.txt")).unwrap();
-    assert_eq!(url.host(), Some(Host::Ipv4(Ipv4Addr::new(192, 168, 0, 1))));
-
-    let path = url.to_file_path().unwrap();
-    assert_eq!(path.to_str(), Some(r"\\192.168.0.1\share\path\file.txt"));
-
-    // Another way to write these:
-    let url = Url::from_file_path(Path::new(r"\\?\UNC\host\share\path\file.txt")).unwrap();
-    assert_eq!(url.as_str(), "file://host/share/path/file.txt");
-
-    // Paths starting with "\\.\" (Local Device Paths) are intentionally not supported.
-    let url = Url::from_file_path(Path::new(r"\\.\some\path\file.txt"));
-    assert!(url.is_err());
-}
deleted file mode 100644
--- a/third_party/rust/url-1.5.1/tests/urltestdata.json
+++ /dev/null
@@ -1,4445 +0,0 @@
-[
-  "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/segments.js",
-  {
-    "input": "http://example\t.\norg",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://user:pass@foo:21/bar;par?b#c",
-    "base": "http://example.org/foo/bar",
-    "href": "http://user:pass@foo:21/bar;par?b#c",
-    "origin": "http://foo:21",
-    "protocol": "http:",
-    "username": "user",
-    "password": "pass",
-    "host": "foo:21",
-    "hostname": "foo",
-    "port": "21",
-    "pathname": "/bar;par",
-    "search": "?b",
-    "hash": "#c"
-  },
-  {
-    "input": "http:foo.com",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/foo.com",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/foo.com",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "\t   :foo.com   \n",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/:foo.com",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/:foo.com",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": " foo.com  ",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/foo.com",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/foo.com",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "a:\t foo.com",
-    "base": "http://example.org/foo/bar",
-    "href": "a: foo.com",
-    "origin": "null",
-    "protocol": "a:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": " foo.com",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://f:21/ b ? d # e ",
-    "base": "http://example.org/foo/bar",
-    "href": "http://f:21/%20b%20?%20d%20# e",
-    "origin": "http://f:21",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "f:21",
-    "hostname": "f",
-    "port": "21",
-    "pathname": "/%20b%20",
-    "search": "?%20d%20",
-    "hash": "# e"
-  },
-  {
-    "input": "http://f:/c",
-    "base": "http://example.org/foo/bar",
-    "href": "http://f/c",
-    "origin": "http://f",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "f",
-    "hostname": "f",
-    "port": "",
-    "pathname": "/c",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://f:0/c",
-    "base": "http://example.org/foo/bar",
-    "href": "http://f:0/c",
-    "origin": "http://f:0",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "f:0",
-    "hostname": "f",
-    "port": "0",
-    "pathname": "/c",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://f:00000000000000/c",
-    "base": "http://example.org/foo/bar",
-    "href": "http://f:0/c",
-    "origin": "http://f:0",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "f:0",
-    "hostname": "f",
-    "port": "0",
-    "pathname": "/c",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://f:00000000000000000000080/c",
-    "base": "http://example.org/foo/bar",
-    "href": "http://f/c",
-    "origin": "http://f",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "f",
-    "hostname": "f",
-    "port": "",
-    "pathname": "/c",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://f:b/c",
-    "base": "http://example.org/foo/bar",
-    "failure": true
-  },
-  {
-    "input": "http://f: /c",
-    "base": "http://example.org/foo/bar",
-    "failure": true
-  },
-  {
-    "input": "http://f:\n/c",
-    "base": "http://example.org/foo/bar",
-    "href": "http://f/c",
-    "origin": "http://f",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "f",
-    "hostname": "f",
-    "port": "",
-    "pathname": "/c",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://f:fifty-two/c",
-    "base": "http://example.org/foo/bar",
-    "failure": true
-  },
-  {
-    "input": "http://f:999999/c",
-    "base": "http://example.org/foo/bar",
-    "failure": true
-  },
-  {
-    "input": "http://f: 21 / b ? d # e ",
-    "base": "http://example.org/foo/bar",
-    "failure": true
-  },
-  {
-    "input": "",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/bar",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/bar",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "  \t",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/bar",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/bar",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": ":foo.com/",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/:foo.com/",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/:foo.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": ":foo.com\\",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/:foo.com/",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/:foo.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": ":",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/:",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/:",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": ":a",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/:a",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/:a",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": ":/",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/:/",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/:/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": ":\\",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/:/",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/:/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": ":#",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/:#",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/:",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "#",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/bar#",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/bar",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "#/",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/bar#/",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/bar",
-    "search": "",
-    "hash": "#/"
-  },
-  {
-    "input": "#\\",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/bar#\\",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/bar",
-    "search": "",
-    "hash": "#\\"
-  },
-  {
-    "input": "#;?",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/bar#;?",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/bar",
-    "search": "",
-    "hash": "#;?"
-  },
-  {
-    "input": "?",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/bar?",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/bar",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "/",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": ":23",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/:23",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/:23",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "/:23",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/:23",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/:23",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "::",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/::",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/::",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "::23",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/::23",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/::23",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "foo://",
-    "base": "http://example.org/foo/bar",
-    "href": "foo:///",
-    "origin": "null",
-    "protocol": "foo:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://a:b@c:29/d",
-    "base": "http://example.org/foo/bar",
-    "href": "http://a:b@c:29/d",
-    "origin": "http://c:29",
-    "protocol": "http:",
-    "username": "a",
-    "password": "b",
-    "host": "c:29",
-    "hostname": "c",
-    "port": "29",
-    "pathname": "/d",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http::@c:29",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/:@c:29",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/:@c:29",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://&a:foo(b]c@d:2/",
-    "base": "http://example.org/foo/bar",
-    "href": "http://&a:foo(b%5Dc@d:2/",
-    "origin": "http://d:2",
-    "protocol": "http:",
-    "username": "&a",
-    "password": "foo(b%5Dc",
-    "host": "d:2",
-    "hostname": "d",
-    "port": "2",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://::@c@d:2",
-    "base": "http://example.org/foo/bar",
-    "href": "http://:%3A%40c@d:2/",
-    "origin": "http://d:2",
-    "protocol": "http:",
-    "username": "",
-    "password": "%3A%40c",
-    "host": "d:2",
-    "hostname": "d",
-    "port": "2",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://foo.com:b@d/",
-    "base": "http://example.org/foo/bar",
-    "href": "http://foo.com:b@d/",
-    "origin": "http://d",
-    "protocol": "http:",
-    "username": "foo.com",
-    "password": "b",
-    "host": "d",
-    "hostname": "d",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://foo.com/\\@",
-    "base": "http://example.org/foo/bar",
-    "href": "http://foo.com//@",
-    "origin": "http://foo.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "foo.com",
-    "hostname": "foo.com",
-    "port": "",
-    "pathname": "//@",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http:\\\\foo.com\\",
-    "base": "http://example.org/foo/bar",
-    "href": "http://foo.com/",
-    "origin": "http://foo.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "foo.com",
-    "hostname": "foo.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http:\\\\a\\b:c\\d@foo.com\\",
-    "base": "http://example.org/foo/bar",
-    "href": "http://a/b:c/d@foo.com/",
-    "origin": "http://a",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "a",
-    "hostname": "a",
-    "port": "",
-    "pathname": "/b:c/d@foo.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "foo:/",
-    "base": "http://example.org/foo/bar",
-    "href": "foo:/",
-    "origin": "null",
-    "protocol": "foo:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "foo:/bar.com/",
-    "base": "http://example.org/foo/bar",
-    "href": "foo:/bar.com/",
-    "origin": "null",
-    "protocol": "foo:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/bar.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "foo://///////",
-    "base": "http://example.org/foo/bar",
-    "href": "foo://///////",
-    "origin": "null",
-    "protocol": "foo:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "///////",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "foo://///////bar.com/",
-    "base": "http://example.org/foo/bar",
-    "href": "foo://///////bar.com/",
-    "origin": "null",
-    "protocol": "foo:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "///////bar.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "foo:////://///",
-    "base": "http://example.org/foo/bar",
-    "href": "foo:////://///",
-    "origin": "null",
-    "protocol": "foo:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "//://///",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "c:/foo",
-    "base": "http://example.org/foo/bar",
-    "href": "c:/foo",
-    "origin": "null",
-    "protocol": "c:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/foo",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "//foo/bar",
-    "base": "http://example.org/foo/bar",
-    "href": "http://foo/bar",
-    "origin": "http://foo",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "foo",
-    "hostname": "foo",
-    "port": "",
-    "pathname": "/bar",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://foo/path;a??e#f#g",
-    "base": "http://example.org/foo/bar",
-    "href": "http://foo/path;a??e#f#g",
-    "origin": "http://foo",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "foo",
-    "hostname": "foo",
-    "port": "",
-    "pathname": "/path;a",
-    "search": "??e",
-    "hash": "#f#g"
-  },
-  {
-    "input": "http://foo/abcd?efgh?ijkl",
-    "base": "http://example.org/foo/bar",
-    "href": "http://foo/abcd?efgh?ijkl",
-    "origin": "http://foo",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "foo",
-    "hostname": "foo",
-    "port": "",
-    "pathname": "/abcd",
-    "search": "?efgh?ijkl",
-    "hash": ""
-  },
-  {
-    "input": "http://foo/abcd#foo?bar",
-    "base": "http://example.org/foo/bar",
-    "href": "http://foo/abcd#foo?bar",
-    "origin": "http://foo",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "foo",
-    "hostname": "foo",
-    "port": "",
-    "pathname": "/abcd",
-    "search": "",
-    "hash": "#foo?bar"
-  },
-  {
-    "input": "[61:24:74]:98",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/[61:24:74]:98",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/[61:24:74]:98",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http:[61:27]/:foo",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/[61:27]/:foo",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/[61:27]/:foo",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://[1::2]:3:4",
-    "base": "http://example.org/foo/bar",
-    "failure": true
-  },
-  {
-    "input": "http://2001::1",
-    "base": "http://example.org/foo/bar",
-    "failure": true
-  },
-  {
-    "input": "http://2001::1]",
-    "base": "http://example.org/foo/bar",
-    "failure": true
-  },
-  {
-    "input": "http://2001::1]:80",
-    "base": "http://example.org/foo/bar",
-    "failure": true
-  },
-  {
-    "input": "http://[2001::1]",
-    "base": "http://example.org/foo/bar",
-    "href": "http://[2001::1]/",
-    "origin": "http://[2001::1]",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "[2001::1]",
-    "hostname": "[2001::1]",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://[::127.0.0.1]",
-    "base": "http://example.org/foo/bar",
-    "href": "http://[::7f00:1]/",
-    "origin": "http://[::7f00:1]",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "[::7f00:1]",
-    "hostname": "[::7f00:1]",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://[0:0:0:0:0:0:13.1.68.3]",
-    "base": "http://example.org/foo/bar",
-    "href": "http://[::d01:4403]/",
-    "origin": "http://[::d01:4403]",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "[::d01:4403]",
-    "hostname": "[::d01:4403]",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://[2001::1]:80",
-    "base": "http://example.org/foo/bar",
-    "href": "http://[2001::1]/",
-    "origin": "http://[2001::1]",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "[2001::1]",
-    "hostname": "[2001::1]",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http:/example.com/",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/example.com/",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/example.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "ftp:/example.com/",
-    "base": "http://example.org/foo/bar",
-    "href": "ftp://example.com/",
-    "origin": "ftp://example.com",
-    "protocol": "ftp:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "https:/example.com/",
-    "base": "http://example.org/foo/bar",
-    "href": "https://example.com/",
-    "origin": "https://example.com",
-    "protocol": "https:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "madeupscheme:/example.com/",
-    "base": "http://example.org/foo/bar",
-    "href": "madeupscheme:/example.com/",
-    "origin": "null",
-    "protocol": "madeupscheme:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/example.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "file:/example.com/",
-    "base": "http://example.org/foo/bar",
-    "href": "file:///example.com/",
-    "protocol": "file:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/example.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "ftps:/example.com/",
-    "base": "http://example.org/foo/bar",
-    "href": "ftps:/example.com/",
-    "origin": "null",
-    "protocol": "ftps:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/example.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "gopher:/example.com/",
-    "base": "http://example.org/foo/bar",
-    "href": "gopher://example.com/",
-    "origin": "gopher://example.com",
-    "protocol": "gopher:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "ws:/example.com/",
-    "base": "http://example.org/foo/bar",
-    "href": "ws://example.com/",
-    "origin": "ws://example.com",
-    "protocol": "ws:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "wss:/example.com/",
-    "base": "http://example.org/foo/bar",
-    "href": "wss://example.com/",
-    "origin": "wss://example.com",
-    "protocol": "wss:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "data:/example.com/",
-    "base": "http://example.org/foo/bar",
-    "href": "data:/example.com/",
-    "origin": "null",
-    "protocol": "data:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/example.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "javascript:/example.com/",
-    "base": "http://example.org/foo/bar",
-    "href": "javascript:/example.com/",
-    "origin": "null",
-    "protocol": "javascript:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/example.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "mailto:/example.com/",
-    "base": "http://example.org/foo/bar",
-    "href": "mailto:/example.com/",
-    "origin": "null",
-    "protocol": "mailto:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/example.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http:example.com/",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/example.com/",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/example.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "ftp:example.com/",
-    "base": "http://example.org/foo/bar",
-    "href": "ftp://example.com/",
-    "origin": "ftp://example.com",
-    "protocol": "ftp:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "https:example.com/",
-    "base": "http://example.org/foo/bar",
-    "href": "https://example.com/",
-    "origin": "https://example.com",
-    "protocol": "https:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "madeupscheme:example.com/",
-    "base": "http://example.org/foo/bar",
-    "href": "madeupscheme:example.com/",
-    "origin": "null",
-    "protocol": "madeupscheme:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "example.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "ftps:example.com/",
-    "base": "http://example.org/foo/bar",
-    "href": "ftps:example.com/",
-    "origin": "null",
-    "protocol": "ftps:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "example.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "gopher:example.com/",
-    "base": "http://example.org/foo/bar",
-    "href": "gopher://example.com/",
-    "origin": "gopher://example.com",
-    "protocol": "gopher:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "ws:example.com/",
-    "base": "http://example.org/foo/bar",
-    "href": "ws://example.com/",
-    "origin": "ws://example.com",
-    "protocol": "ws:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "wss:example.com/",
-    "base": "http://example.org/foo/bar",
-    "href": "wss://example.com/",
-    "origin": "wss://example.com",
-    "protocol": "wss:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "data:example.com/",
-    "base": "http://example.org/foo/bar",
-    "href": "data:example.com/",
-    "origin": "null",
-    "protocol": "data:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "example.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "javascript:example.com/",
-    "base": "http://example.org/foo/bar",
-    "href": "javascript:example.com/",
-    "origin": "null",
-    "protocol": "javascript:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "example.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "mailto:example.com/",
-    "base": "http://example.org/foo/bar",
-    "href": "mailto:example.com/",
-    "origin": "null",
-    "protocol": "mailto:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "example.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "/a/b/c",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/a/b/c",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/a/b/c",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "/a/ /c",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/a/%20/c",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/a/%20/c",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "/a%2fc",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/a%2fc",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/a%2fc",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "/a/%2f/c",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/a/%2f/c",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/a/%2f/c",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "#β",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/bar#%CE%B2",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/bar",
-    "search": "",
-    "hash": "#%CE%B2"
-  },
-  {
-    "input": "data:text/html,test#test",
-    "base": "http://example.org/foo/bar",
-    "href": "data:text/html,test#test",
-    "origin": "null",
-    "protocol": "data:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "text/html,test",
-    "search": "",
-    "hash": "#test"
-  },
-  {
-    "input": "tel:1234567890",
-    "base": "http://example.org/foo/bar",
-    "href": "tel:1234567890",
-    "origin": "null",
-    "protocol": "tel:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "1234567890",
-    "search": "",
-    "hash": ""
-  },
-  "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/file.html",
-  {
-    "input": "file:c:\\foo\\bar.html",
-    "base": "file:///tmp/mock/path",
-    "href": "file:///c:/foo/bar.html",
-    "protocol": "file:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/c:/foo/bar.html",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "  File:c|////foo\\bar.html",
-    "base": "file:///tmp/mock/path",
-    "href": "file:///c:////foo/bar.html",
-    "protocol": "file:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/c:////foo/bar.html",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "C|/foo/bar",
-    "base": "file:///tmp/mock/path",
-    "href": "file:///C:/foo/bar",
-    "protocol": "file:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/C:/foo/bar",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "/C|\\foo\\bar",
-    "base": "file:///tmp/mock/path",
-    "href": "file:///C:/foo/bar",
-    "protocol": "file:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/C:/foo/bar",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "//C|/foo/bar",
-    "base": "file:///tmp/mock/path",
-    "href": "file:///C:/foo/bar",
-    "protocol": "file:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/C:/foo/bar",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "//server/file",
-    "base": "file:///tmp/mock/path",
-    "href": "file://server/file",
-    "protocol": "file:",
-    "username": "",
-    "password": "",
-    "host": "server",
-    "hostname": "server",
-    "port": "",
-    "pathname": "/file",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "\\\\server\\file",
-    "base": "file:///tmp/mock/path",
-    "href": "file://server/file",
-    "protocol": "file:",
-    "username": "",
-    "password": "",
-    "host": "server",
-    "hostname": "server",
-    "port": "",
-    "pathname": "/file",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "/\\server/file",
-    "base": "file:///tmp/mock/path",
-    "href": "file://server/file",
-    "protocol": "file:",
-    "username": "",
-    "password": "",
-    "host": "server",
-    "hostname": "server",
-    "port": "",
-    "pathname": "/file",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "file:///foo/bar.txt",
-    "base": "file:///tmp/mock/path",
-    "href": "file:///foo/bar.txt",
-    "protocol": "file:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/foo/bar.txt",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "file:///home/me",
-    "base": "file:///tmp/mock/path",
-    "href": "file:///home/me",
-    "protocol": "file:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/home/me",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "//",
-    "base": "file:///tmp/mock/path",
-    "href": "file:///",
-    "protocol": "file:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "///",
-    "base": "file:///tmp/mock/path",
-    "href": "file:///",
-    "protocol": "file:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "///test",
-    "base": "file:///tmp/mock/path",
-    "href": "file:///test",
-    "protocol": "file:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/test",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "file://test",
-    "base": "file:///tmp/mock/path",
-    "href": "file://test/",
-    "protocol": "file:",
-    "username": "",
-    "password": "",
-    "host": "test",
-    "hostname": "test",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "file://localhost",
-    "base": "file:///tmp/mock/path",
-    "href": "file:///",
-    "protocol": "file:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "file://localhost/",
-    "base": "file:///tmp/mock/path",
-    "href": "file:///",
-    "protocol": "file:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "file://localhost/test",
-    "base": "file:///tmp/mock/path",
-    "href": "file:///test",
-    "protocol": "file:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/test",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "test",
-    "base": "file:///tmp/mock/path",
-    "href": "file:///tmp/mock/test",
-    "protocol": "file:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/tmp/mock/test",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "file:test",
-    "base": "file:///tmp/mock/path",
-    "href": "file:///tmp/mock/test",
-    "protocol": "file:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/tmp/mock/test",
-    "search": "",
-    "hash": ""
-  },
-  "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/path.js",
-  {
-    "input": "http://example.com/././foo",
-    "base": "about:blank",
-    "href": "http://example.com/foo",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/foo",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/./.foo",
-    "base": "about:blank",
-    "href": "http://example.com/.foo",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/.foo",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/foo/.",
-    "base": "about:blank",
-    "href": "http://example.com/foo/",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/foo/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/foo/./",
-    "base": "about:blank",
-    "href": "http://example.com/foo/",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/foo/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/foo/bar/..",
-    "base": "about:blank",
-    "href": "http://example.com/foo/",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/foo/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/foo/bar/../",
-    "base": "about:blank",
-    "href": "http://example.com/foo/",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/foo/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/foo/..bar",
-    "base": "about:blank",
-    "href": "http://example.com/foo/..bar",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/foo/..bar",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/foo/bar/../ton",
-    "base": "about:blank",
-    "href": "http://example.com/foo/ton",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/foo/ton",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/foo/bar/../ton/../../a",
-    "base": "about:blank",
-    "href": "http://example.com/a",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/a",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/foo/../../..",
-    "base": "about:blank",
-    "href": "http://example.com/",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/foo/../../../ton",
-    "base": "about:blank",
-    "href": "http://example.com/ton",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/ton",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/foo/%2e",
-    "base": "about:blank",
-    "href": "http://example.com/foo/",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/foo/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/foo/%2e%2",
-    "base": "about:blank",
-    "href": "http://example.com/foo/.%2",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/foo/.%2",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar",
-    "base": "about:blank",
-    "href": "http://example.com/..bar",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/..bar",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com////../..",
-    "base": "about:blank",
-    "href": "http://example.com//",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "//",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/foo/bar//../..",
-    "base": "about:blank",
-    "href": "http://example.com/foo/",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/foo/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/foo/bar//..",
-    "base": "about:blank",
-    "href": "http://example.com/foo/bar/",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/foo/bar/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/foo",
-    "base": "about:blank",
-    "href": "http://example.com/foo",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/foo",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/%20foo",
-    "base": "about:blank",
-    "href": "http://example.com/%20foo",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/%20foo",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/foo%",
-    "base": "about:blank",
-    "href": "http://example.com/foo%",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/foo%",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/foo%2",
-    "base": "about:blank",
-    "href": "http://example.com/foo%2",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/foo%2",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/foo%2zbar",
-    "base": "about:blank",
-    "href": "http://example.com/foo%2zbar",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/foo%2zbar",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/foo%2©zbar",
-    "base": "about:blank",
-    "href": "http://example.com/foo%2%C3%82%C2%A9zbar",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/foo%2%C3%82%C2%A9zbar",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/foo%41%7a",
-    "base": "about:blank",
-    "href": "http://example.com/foo%41%7a",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/foo%41%7a",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/foo\t\u0091%91",
-    "base": "about:blank",
-    "href": "http://example.com/foo%C2%91%91",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/foo%C2%91%91",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/foo%00%51",
-    "base": "about:blank",
-    "href": "http://example.com/foo%00%51",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/foo%00%51",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/(%28:%3A%29)",
-    "base": "about:blank",
-    "href": "http://example.com/(%28:%3A%29)",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/(%28:%3A%29)",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/%3A%3a%3C%3c",
-    "base": "about:blank",
-    "href": "http://example.com/%3A%3a%3C%3c",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/%3A%3a%3C%3c",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/foo\tbar",
-    "base": "about:blank",
-    "href": "http://example.com/foobar",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/foobar",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com\\\\foo\\\\bar",
-    "base": "about:blank",
-    "href": "http://example.com//foo//bar",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "//foo//bar",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd",
-    "base": "about:blank",
-    "href": "http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/%7Ffp3%3Eju%3Dduvgw%3Dd",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/@asdf%40",
-    "base": "about:blank",
-    "href": "http://example.com/@asdf%40",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/@asdf%40",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/你好你好",
-    "base": "about:blank",
-    "href": "http://example.com/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/‥/foo",
-    "base": "about:blank",
-    "href": "http://example.com/%E2%80%A5/foo",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/%E2%80%A5/foo",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com//foo",
-    "base": "about:blank",
-    "href": "http://example.com/%EF%BB%BF/foo",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/%EF%BB%BF/foo",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example.com/‮/foo/‭/bar",
-    "base": "about:blank",
-    "href": "http://example.com/%E2%80%AE/foo/%E2%80%AD/bar",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/%E2%80%AE/foo/%E2%80%AD/bar",
-    "search": "",
-    "hash": ""
-  },
-  "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/relative.js",
-  {
-    "input": "http://www.google.com/foo?bar=baz#",
-    "base": "about:blank",
-    "href": "http://www.google.com/foo?bar=baz#",
-    "origin": "http://www.google.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "www.google.com",
-    "hostname": "www.google.com",
-    "port": "",
-    "pathname": "/foo",
-    "search": "?bar=baz",
-    "hash": ""
-  },
-  {
-    "input": "http://www.google.com/foo?bar=baz# »",
-    "base": "about:blank",
-    "href": "http://www.google.com/foo?bar=baz# %C2%BB",
-    "origin": "http://www.google.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "www.google.com",
-    "hostname": "www.google.com",
-    "port": "",
-    "pathname": "/foo",
-    "search": "?bar=baz",
-    "hash": "# %C2%BB"
-  },
-  {
-    "input": "data:test# »",
-    "base": "about:blank",
-    "href": "data:test# %C2%BB",
-    "origin": "null",
-    "protocol": "data:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "test",
-    "search": "",
-    "hash": "# %C2%BB"
-  },
-  {
-    "input": "http://[www.google.com]/",
-    "base": "about:blank",
-    "failure": true
-  },
-  {
-    "input": "http://www.google.com",
-    "base": "about:blank",
-    "href": "http://www.google.com/",
-    "origin": "http://www.google.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "www.google.com",
-    "hostname": "www.google.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://192.0x00A80001",
-    "base": "about:blank",
-    "href": "http://192.168.0.1/",
-    "origin": "http://192.168.0.1",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "192.168.0.1",
-    "hostname": "192.168.0.1",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://www/foo%2Ehtml",
-    "base": "about:blank",
-    "href": "http://www/foo.html",
-    "origin": "http://www",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "www",
-    "hostname": "www",
-    "port": "",
-    "pathname": "/foo.html",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://www/foo/%2E/html",
-    "base": "about:blank",
-    "href": "http://www/foo/html",
-    "origin": "http://www",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "www",
-    "hostname": "www",
-    "port": "",
-    "pathname": "/foo/html",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://user:pass@/",
-    "base": "about:blank",
-    "failure": true
-  },
-  {
-    "input": "http://%25DOMAIN:foobar@foodomain.com/",
-    "base": "about:blank",
-    "href": "http://%25DOMAIN:foobar@foodomain.com/",
-    "origin": "http://foodomain.com",
-    "protocol": "http:",
-    "username": "%25DOMAIN",
-    "password": "foobar",
-    "host": "foodomain.com",
-    "hostname": "foodomain.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http:\\\\www.google.com\\foo",
-    "base": "about:blank",
-    "href": "http://www.google.com/foo",
-    "origin": "http://www.google.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "www.google.com",
-    "hostname": "www.google.com",
-    "port": "",
-    "pathname": "/foo",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://foo:80/",
-    "base": "about:blank",
-    "href": "http://foo/",
-    "origin": "http://foo",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "foo",
-    "hostname": "foo",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://foo:81/",
-    "base": "about:blank",
-    "href": "http://foo:81/",
-    "origin": "http://foo:81",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "foo:81",
-    "hostname": "foo",
-    "port": "81",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "httpa://foo:80/",
-    "base": "about:blank",
-    "href": "httpa://foo:80/",
-    "origin": "null",
-    "protocol": "httpa:",
-    "username": "",
-    "password": "",
-    "host": "foo:80",
-    "hostname": "foo",
-    "port": "80",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://foo:-80/",
-    "base": "about:blank",
-    "failure": true
-  },
-  {
-    "input": "https://foo:443/",
-    "base": "about:blank",
-    "href": "https://foo/",
-    "origin": "https://foo",
-    "protocol": "https:",
-    "username": "",
-    "password": "",
-    "host": "foo",
-    "hostname": "foo",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "https://foo:80/",
-    "base": "about:blank",
-    "href": "https://foo:80/",
-    "origin": "https://foo:80",
-    "protocol": "https:",
-    "username": "",
-    "password": "",
-    "host": "foo:80",
-    "hostname": "foo",
-    "port": "80",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "ftp://foo:21/",
-    "base": "about:blank",
-    "href": "ftp://foo/",
-    "origin": "ftp://foo",
-    "protocol": "ftp:",
-    "username": "",
-    "password": "",
-    "host": "foo",
-    "hostname": "foo",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "ftp://foo:80/",
-    "base": "about:blank",
-    "href": "ftp://foo:80/",
-    "origin": "ftp://foo:80",
-    "protocol": "ftp:",
-    "username": "",
-    "password": "",
-    "host": "foo:80",
-    "hostname": "foo",
-    "port": "80",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "gopher://foo:70/",
-    "base": "about:blank",
-    "href": "gopher://foo/",
-    "origin": "gopher://foo",
-    "protocol": "gopher:",
-    "username": "",
-    "password": "",
-    "host": "foo",
-    "hostname": "foo",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "gopher://foo:443/",
-    "base": "about:blank",
-    "href": "gopher://foo:443/",
-    "origin": "gopher://foo:443",
-    "protocol": "gopher:",
-    "username": "",
-    "password": "",
-    "host": "foo:443",
-    "hostname": "foo",
-    "port": "443",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "ws://foo:80/",
-    "base": "about:blank",
-    "href": "ws://foo/",
-    "origin": "ws://foo",
-    "protocol": "ws:",
-    "username": "",
-    "password": "",
-    "host": "foo",
-    "hostname": "foo",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "ws://foo:81/",
-    "base": "about:blank",
-    "href": "ws://foo:81/",
-    "origin": "ws://foo:81",
-    "protocol": "ws:",
-    "username": "",
-    "password": "",
-    "host": "foo:81",
-    "hostname": "foo",
-    "port": "81",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "ws://foo:443/",
-    "base": "about:blank",
-    "href": "ws://foo:443/",
-    "origin": "ws://foo:443",
-    "protocol": "ws:",
-    "username": "",
-    "password": "",
-    "host": "foo:443",
-    "hostname": "foo",
-    "port": "443",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "ws://foo:815/",
-    "base": "about:blank",
-    "href": "ws://foo:815/",
-    "origin": "ws://foo:815",
-    "protocol": "ws:",
-    "username": "",
-    "password": "",
-    "host": "foo:815",
-    "hostname": "foo",
-    "port": "815",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "wss://foo:80/",
-    "base": "about:blank",
-    "href": "wss://foo:80/",
-    "origin": "wss://foo:80",
-    "protocol": "wss:",
-    "username": "",
-    "password": "",
-    "host": "foo:80",
-    "hostname": "foo",
-    "port": "80",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "wss://foo:81/",
-    "base": "about:blank",
-    "href": "wss://foo:81/",
-    "origin": "wss://foo:81",
-    "protocol": "wss:",
-    "username": "",
-    "password": "",
-    "host": "foo:81",
-    "hostname": "foo",
-    "port": "81",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "wss://foo:443/",
-    "base": "about:blank",
-    "href": "wss://foo/",
-    "origin": "wss://foo",
-    "protocol": "wss:",
-    "username": "",
-    "password": "",
-    "host": "foo",
-    "hostname": "foo",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "wss://foo:815/",
-    "base": "about:blank",
-    "href": "wss://foo:815/",
-    "origin": "wss://foo:815",
-    "protocol": "wss:",
-    "username": "",
-    "password": "",
-    "host": "foo:815",
-    "hostname": "foo",
-    "port": "815",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http:/example.com/",
-    "base": "about:blank",
-    "href": "http://example.com/",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "ftp:/example.com/",
-    "base": "about:blank",
-    "href": "ftp://example.com/",
-    "origin": "ftp://example.com",
-    "protocol": "ftp:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "https:/example.com/",
-    "base": "about:blank",
-    "href": "https://example.com/",
-    "origin": "https://example.com",
-    "protocol": "https:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "madeupscheme:/example.com/",
-    "base": "about:blank",
-    "href": "madeupscheme:/example.com/",
-    "origin": "null",
-    "protocol": "madeupscheme:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/example.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "file:/example.com/",
-    "base": "about:blank",
-    "href": "file:///example.com/",
-    "protocol": "file:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/example.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "ftps:/example.com/",
-    "base": "about:blank",
-    "href": "ftps:/example.com/",
-    "origin": "null",
-    "protocol": "ftps:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/example.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "gopher:/example.com/",
-    "base": "about:blank",
-    "href": "gopher://example.com/",
-    "origin": "gopher://example.com",
-    "protocol": "gopher:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "ws:/example.com/",
-    "base": "about:blank",
-    "href": "ws://example.com/",
-    "origin": "ws://example.com",
-    "protocol": "ws:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "wss:/example.com/",
-    "base": "about:blank",
-    "href": "wss://example.com/",
-    "origin": "wss://example.com",
-    "protocol": "wss:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "data:/example.com/",
-    "base": "about:blank",
-    "href": "data:/example.com/",
-    "origin": "null",
-    "protocol": "data:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/example.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "javascript:/example.com/",
-    "base": "about:blank",
-    "href": "javascript:/example.com/",
-    "origin": "null",
-    "protocol": "javascript:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/example.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "mailto:/example.com/",
-    "base": "about:blank",
-    "href": "mailto:/example.com/",
-    "origin": "null",
-    "protocol": "mailto:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/example.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http:example.com/",
-    "base": "about:blank",
-    "href": "http://example.com/",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "ftp:example.com/",
-    "base": "about:blank",
-    "href": "ftp://example.com/",
-    "origin": "ftp://example.com",
-    "protocol": "ftp:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "https:example.com/",
-    "base": "about:blank",
-    "href": "https://example.com/",
-    "origin": "https://example.com",
-    "protocol": "https:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "madeupscheme:example.com/",
-    "base": "about:blank",
-    "href": "madeupscheme:example.com/",
-    "origin": "null",
-    "protocol": "madeupscheme:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "example.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "ftps:example.com/",
-    "base": "about:blank",
-    "href": "ftps:example.com/",
-    "origin": "null",
-    "protocol": "ftps:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "example.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "gopher:example.com/",
-    "base": "about:blank",
-    "href": "gopher://example.com/",
-    "origin": "gopher://example.com",
-    "protocol": "gopher:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "ws:example.com/",
-    "base": "about:blank",
-    "href": "ws://example.com/",
-    "origin": "ws://example.com",
-    "protocol": "ws:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "wss:example.com/",
-    "base": "about:blank",
-    "href": "wss://example.com/",
-    "origin": "wss://example.com",
-    "protocol": "wss:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "data:example.com/",
-    "base": "about:blank",
-    "href": "data:example.com/",
-    "origin": "null",
-    "protocol": "data:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "example.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "javascript:example.com/",
-    "base": "about:blank",
-    "href": "javascript:example.com/",
-    "origin": "null",
-    "protocol": "javascript:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "example.com/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "mailto:example.com/",
-    "base": "about:blank",
-    "href": "mailto:example.com/",
-    "origin": "null",
-    "protocol": "mailto:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "example.com/",
-    "search": "",
-    "hash": ""
-  },
-  "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/segments-userinfo-vs-host.html",
-  {
-    "input": "http:@www.example.com",
-    "base": "about:blank",
-    "href": "http://www.example.com/",
-    "origin": "http://www.example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "www.example.com",
-    "hostname": "www.example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http:/@www.example.com",
-    "base": "about:blank",
-    "href": "http://www.example.com/",
-    "origin": "http://www.example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "www.example.com",
-    "hostname": "www.example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://@www.example.com",
-    "base": "about:blank",
-    "href": "http://www.example.com/",
-    "origin": "http://www.example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "www.example.com",
-    "hostname": "www.example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http:a:b@www.example.com",
-    "base": "about:blank",
-    "href": "http://a:b@www.example.com/",
-    "origin": "http://www.example.com",
-    "protocol": "http:",
-    "username": "a",
-    "password": "b",
-    "host": "www.example.com",
-    "hostname": "www.example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http:/a:b@www.example.com",
-    "base": "about:blank",
-    "href": "http://a:b@www.example.com/",
-    "origin": "http://www.example.com",
-    "protocol": "http:",
-    "username": "a",
-    "password": "b",
-    "host": "www.example.com",
-    "hostname": "www.example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://a:b@www.example.com",
-    "base": "about:blank",
-    "href": "http://a:b@www.example.com/",
-    "origin": "http://www.example.com",
-    "protocol": "http:",
-    "username": "a",
-    "password": "b",
-    "host": "www.example.com",
-    "hostname": "www.example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://@pple.com",
-    "base": "about:blank",
-    "href": "http://pple.com/",
-    "origin": "http://pple.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "pple.com",
-    "hostname": "pple.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http::b@www.example.com",
-    "base": "about:blank",
-    "href": "http://:b@www.example.com/",
-    "origin": "http://www.example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "b",
-    "host": "www.example.com",
-    "hostname": "www.example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http:/:b@www.example.com",
-    "base": "about:blank",
-    "href": "http://:b@www.example.com/",
-    "origin": "http://www.example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "b",
-    "host": "www.example.com",
-    "hostname": "www.example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://:b@www.example.com",
-    "base": "about:blank",
-    "href": "http://:b@www.example.com/",
-    "origin": "http://www.example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "b",
-    "host": "www.example.com",
-    "hostname": "www.example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http:/:@/www.example.com",
-    "base": "about:blank",
-    "failure": true
-  },
-  {
-    "input": "http://user@/www.example.com",
-    "base": "about:blank",
-    "failure": true
-  },
-  {
-    "input": "http:@/www.example.com",
-    "base": "about:blank",
-    "failure": true
-  },
-  {
-    "input": "http:/@/www.example.com",
-    "base": "about:blank",
-    "failure": true
-  },
-  {
-    "input": "http://@/www.example.com",
-    "base": "about:blank",
-    "failure": true
-  },
-  {
-    "input": "https:@/www.example.com",
-    "base": "about:blank",
-    "failure": true
-  },
-  {
-    "input": "http:a:b@/www.example.com",
-    "base": "about:blank",
-    "failure": true
-  },
-  {
-    "input": "http:/a:b@/www.example.com",
-    "base": "about:blank",
-    "failure": true
-  },
-  {
-    "input": "http://a:b@/www.example.com",
-    "base": "about:blank",
-    "failure": true
-  },
-  {
-    "input": "http::@/www.example.com",
-    "base": "about:blank",
-    "failure": true
-  },
-  {
-    "input": "http:a:@www.example.com",
-    "base": "about:blank",
-    "href": "http://a:@www.example.com/",
-    "origin": "http://www.example.com",
-    "protocol": "http:",
-    "username": "a",
-    "password": "",
-    "host": "www.example.com",
-    "hostname": "www.example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http:/a:@www.example.com",
-    "base": "about:blank",
-    "href": "http://a:@www.example.com/",
-    "origin": "http://www.example.com",
-    "protocol": "http:",
-    "username": "a",
-    "password": "",
-    "host": "www.example.com",
-    "hostname": "www.example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://a:@www.example.com",
-    "base": "about:blank",
-    "href": "http://a:@www.example.com/",
-    "origin": "http://www.example.com",
-    "protocol": "http:",
-    "username": "a",
-    "password": "",
-    "host": "www.example.com",
-    "hostname": "www.example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://www.@pple.com",
-    "base": "about:blank",
-    "href": "http://www.@pple.com/",
-    "origin": "http://pple.com",
-    "protocol": "http:",
-    "username": "www.",
-    "password": "",
-    "host": "pple.com",
-    "hostname": "pple.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http:@:www.example.com",
-    "base": "about:blank",
-    "failure": true
-  },
-  {
-    "input": "http:/@:www.example.com",
-    "base": "about:blank",
-    "failure": true
-  },
-  {
-    "input": "http://@:www.example.com",
-    "base": "about:blank",
-    "failure": true
-  },
-  {
-    "input": "http://:@www.example.com",
-    "base": "about:blank",
-    "href": "http://:@www.example.com/",
-    "origin": "http://www.example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "www.example.com",
-    "hostname": "www.example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  "# Others",
-  {
-    "input": "/",
-    "base": "http://www.example.com/test",
-    "href": "http://www.example.com/",
-    "origin": "http://www.example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "www.example.com",
-    "hostname": "www.example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "/test.txt",
-    "base": "http://www.example.com/test",
-    "href": "http://www.example.com/test.txt",
-    "origin": "http://www.example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "www.example.com",
-    "hostname": "www.example.com",
-    "port": "",
-    "pathname": "/test.txt",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": ".",
-    "base": "http://www.example.com/test",
-    "href": "http://www.example.com/",
-    "origin": "http://www.example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "www.example.com",
-    "hostname": "www.example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "..",
-    "base": "http://www.example.com/test",
-    "href": "http://www.example.com/",
-    "origin": "http://www.example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "www.example.com",
-    "hostname": "www.example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "test.txt",
-    "base": "http://www.example.com/test",
-    "href": "http://www.example.com/test.txt",
-    "origin": "http://www.example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "www.example.com",
-    "hostname": "www.example.com",
-    "port": "",
-    "pathname": "/test.txt",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "./test.txt",
-    "base": "http://www.example.com/test",
-    "href": "http://www.example.com/test.txt",
-    "origin": "http://www.example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "www.example.com",
-    "hostname": "www.example.com",
-    "port": "",
-    "pathname": "/test.txt",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "../test.txt",
-    "base": "http://www.example.com/test",
-    "href": "http://www.example.com/test.txt",
-    "origin": "http://www.example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "www.example.com",
-    "hostname": "www.example.com",
-    "port": "",
-    "pathname": "/test.txt",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "../aaa/test.txt",
-    "base": "http://www.example.com/test",
-    "href": "http://www.example.com/aaa/test.txt",
-    "origin": "http://www.example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "www.example.com",
-    "hostname": "www.example.com",
-    "port": "",
-    "pathname": "/aaa/test.txt",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "../../test.txt",
-    "base": "http://www.example.com/test",
-    "href": "http://www.example.com/test.txt",
-    "origin": "http://www.example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "www.example.com",
-    "hostname": "www.example.com",
-    "port": "",
-    "pathname": "/test.txt",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "中/test.txt",
-    "base": "http://www.example.com/test",
-    "href": "http://www.example.com/%E4%B8%AD/test.txt",
-    "origin": "http://www.example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "www.example.com",
-    "hostname": "www.example.com",
-    "port": "",
-    "pathname": "/%E4%B8%AD/test.txt",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://www.example2.com",
-    "base": "http://www.example.com/test",
-    "href": "http://www.example2.com/",
-    "origin": "http://www.example2.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "www.example2.com",
-    "hostname": "www.example2.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "//www.example2.com",
-    "base": "http://www.example.com/test",
-    "href": "http://www.example2.com/",
-    "origin": "http://www.example2.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "www.example2.com",
-    "hostname": "www.example2.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "file:...",
-    "base": "http://www.example.com/test",
-    "href": "file:///...",
-    "protocol": "file:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/...",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "file:..",
-    "base": "http://www.example.com/test",
-    "href": "file:///",
-    "protocol": "file:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "file:a",
-    "base": "http://www.example.com/test",
-    "href": "file:///a",
-    "protocol": "file:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/a",
-    "search": "",
-    "hash": ""
-  },
-  "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/host.html",
-  "Basic canonicalization, uppercase should be converted to lowercase",
-  {
-    "input": "http://ExAmPlE.CoM",
-    "base": "http://other.com/",
-    "href": "http://example.com/",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://example example.com",
-    "base": "http://other.com/",
-    "failure": true
-  },
-  {
-    "input": "http://Goo%20 goo%7C|.com",
-    "base": "http://other.com/",
-    "failure": true
-  },
-  {
-    "input": "http://[]",
-    "base": "http://other.com/",
-    "failure": true
-  },
-  {
-    "input": "http://[:]",
-    "base": "http://other.com/",
-    "failure": true
-  },
-  "U+3000 is mapped to U+0020 (space) which is disallowed",
-  {
-    "input": "http://GOO\u00a0\u3000goo.com",
-    "base": "http://other.com/",
-    "failure": true
-  },
-  "Other types of space (no-break, zero-width, zero-width-no-break) are name-prepped away to nothing. U+200B, U+2060, and U+FEFF, are ignored",
-  {
-    "input": "http://GOO\u200b\u2060\ufeffgoo.com",
-    "base": "http://other.com/",
-    "href": "http://googoo.com/",
-    "origin": "http://googoo.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "googoo.com",
-    "hostname": "googoo.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  "Ideographic full stop (full-width period for Chinese, etc.) should be treated as a dot. U+3002 is mapped to U+002E (dot)",
-  {
-    "input": "http://www.foo。bar.com",
-    "base": "http://other.com/",
-    "href": "http://www.foo.bar.com/",
-    "origin": "http://www.foo.bar.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "www.foo.bar.com",
-    "hostname": "www.foo.bar.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  "Invalid unicode characters should fail... U+FDD0 is disallowed; %ef%b7%90 is U+FDD0",
-  {
-    "input": "http://\ufdd0zyx.com",
-    "base": "http://other.com/",
-    "failure": true
-  },
-  "This is the same as previous but escaped",
-  {
-    "input": "http://%ef%b7%90zyx.com",
-    "base": "http://other.com/",
-    "failure": true
-  },
-  "Test name prepping, fullwidth input should be converted to ASCII and NOT IDN-ized. This is 'Go' in fullwidth UTF-8/UTF-16.",
-  {
-    "input": "http://Go.com",
-    "base": "http://other.com/",
-    "href": "http://go.com/",
-    "origin": "http://go.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "go.com",
-    "hostname": "go.com",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  "URL spec forbids the following. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24257",
-  {
-    "input": "http://%41.com",
-    "base": "http://other.com/",
-    "failure": true
-  },
-  {
-    "input": "http://%ef%bc%85%ef%bc%94%ef%bc%91.com",
-    "base": "http://other.com/",
-    "failure": true
-  },
-  "...%00 in fullwidth should fail (also as escaped UTF-8 input)",
-  {
-    "input": "http://%00.com",
-    "base": "http://other.com/",
-    "failure": true
-  },
-  {
-    "input": "http://%ef%bc%85%ef%bc%90%ef%bc%90.com",
-    "base": "http://other.com/",
-    "failure": true
-  },
-  "Basic IDN support, UTF-8 and UTF-16 input should be converted to IDN",
-  {
-    "input": "http://你好你好",
-    "base": "http://other.com/",
-    "href": "http://xn--6qqa088eba/",
-    "origin": "http://你好你好",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "xn--6qqa088eba",
-    "hostname": "xn--6qqa088eba",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  "Invalid escaped characters should fail and the percents should be escaped. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24191",
-  {
-    "input": "http://%zz%66%a.com",
-    "base": "http://other.com/",
-    "failure": true
-  },
-  "If we get an invalid character that has been escaped.",
-  {
-    "input": "http://%25",
-    "base": "http://other.com/",
-    "failure": true
-  },
-  {
-    "input": "http://hello%00",
-    "base": "http://other.com/",
-    "failure": true
-  },
-  "Escaped numbers should be treated like IP addresses if they are.",
-  {
-    "input": "http://%30%78%63%30%2e%30%32%35%30.01",
-    "base": "http://other.com/",
-    "href": "http://192.168.0.1/",
-    "origin": "http://192.168.0.1",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "192.168.0.1",
-    "hostname": "192.168.0.1",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://%30%78%63%30%2e%30%32%35%30.01%2e",
-    "base": "http://other.com/",
-    "href": "http://192.168.0.1/",
-    "origin": "http://192.168.0.1",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "192.168.0.1",
-    "hostname": "192.168.0.1",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://192.168.0.257",
-    "base": "http://other.com/",
-    "failure": true
-  },
-  "Invalid escaping should trigger the regular host error handling",
-  {
-    "input": "http://%3g%78%63%30%2e%30%32%35%30%2E.01",
-    "base": "http://other.com/",
-    "failure": true
-  },
-  "Something that isn't exactly an IP should get treated as a host and spaces escaped",
-  {
-    "input": "http://192.168.0.1 hello",
-    "base": "http://other.com/",
-    "failure": true
-  },
-  "Fullwidth and escaped UTF-8 fullwidth should still be treated as IP",
-  {
-    "input": "http://0Xc0.0250.01",
-    "base": "http://other.com/",
-    "href": "http://192.168.0.1/",
-    "origin": "http://192.168.0.1",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "192.168.0.1",
-    "hostname": "192.168.0.1",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  "Broken IPv6",
-  {
-    "input": "http://[google.com]",
-    "base": "http://other.com/",
-    "failure": true
-  },
-  "Misc Unicode",
-  {
-    "input": "http://foo:💩@example.com/bar",
-    "base": "http://other.com/",
-    "href": "http://foo:%F0%9F%92%A9@example.com/bar",
-    "origin": "http://example.com",
-    "protocol": "http:",
-    "username": "foo",
-    "password": "%F0%9F%92%A9",
-    "host": "example.com",
-    "hostname": "example.com",
-    "port": "",
-    "pathname": "/bar",
-    "search": "",
-    "hash": ""
-  },
-  "# resolving a fragment against any scheme succeeds",
-  {
-    "input": "#",
-    "base": "test:test",
-    "href": "test:test#",
-    "origin": "null",
-    "protocol": "test:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "test",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "#x",
-    "base": "mailto:x@x.com",
-    "href": "mailto:x@x.com#x",
-    "origin": "null",
-    "protocol": "mailto:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "x@x.com",
-    "search": "",
-    "hash": "#x"
-  },
-  {
-    "input": "#x",
-    "base": "data:,",
-    "href": "data:,#x",
-    "origin": "null",
-    "protocol": "data:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": ",",
-    "search": "",
-    "hash": "#x"
-  },
-  {
-    "input": "#x",
-    "base": "about:blank",
-    "href": "about:blank#x",
-    "origin": "null",
-    "protocol": "about:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "blank",
-    "search": "",
-    "hash": "#x"
-  },
-  {
-    "input": "#",
-    "base": "test:test?test",
-    "href": "test:test?test#",
-    "origin": "null",
-    "protocol": "test:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "test",
-    "search": "?test",
-    "hash": ""
-  },
-  "# multiple @ in authority state",
-  {
-    "input": "https://@test@test@example:800/",
-    "base": "http://doesnotmatter/",
-    "href": "https://%40test%40test@example:800/",
-    "origin": "https://example:800",
-    "protocol": "https:",
-    "username": "%40test%40test",
-    "password": "",
-    "host": "example:800",
-    "hostname": "example",
-    "port": "800",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "https://@@@example",
-    "base": "http://doesnotmatter/",
-    "href": "https://%40%40@example/",
-    "origin": "https://example",
-    "protocol": "https:",
-    "username": "%40%40",
-    "password": "",
-    "host": "example",
-    "hostname": "example",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  "non-az-09 characters",
-  {
-    "input": "http://`{}:`{}@h/`{}?`{}",
-    "base": "http://doesnotmatter/",
-    "href": "http://%60%7B%7D:%60%7B%7D@h/%60%7B%7D?`{}",
-    "origin": "http://h",
-    "protocol": "http:",
-    "username": "%60%7B%7D",
-    "password": "%60%7B%7D",
-    "host": "h",
-    "hostname": "h",
-    "port": "",
-    "pathname": "/%60%7B%7D",
-    "search": "?`{}",
-    "hash": ""
-  },
-  "# Credentials in base",
-  {
-    "input": "/some/path",
-    "base": "http://user@example.org/smth",
-    "href": "http://user@example.org/some/path",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "user",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/some/path",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "",
-    "base": "http://user:pass@example.org:21/smth",
-    "href": "http://user:pass@example.org:21/smth",
-    "origin": "http://example.org:21",
-    "protocol": "http:",
-    "username": "user",
-    "password": "pass",
-    "host": "example.org:21",
-    "hostname": "example.org",
-    "port": "21",
-    "pathname": "/smth",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "/some/path",
-    "base": "http://user:pass@example.org:21/smth",
-    "href": "http://user:pass@example.org:21/some/path",
-    "origin": "http://example.org:21",
-    "protocol": "http:",
-    "username": "user",
-    "password": "pass",
-    "host": "example.org:21",
-    "hostname": "example.org",
-    "port": "21",
-    "pathname": "/some/path",
-    "search": "",
-    "hash": ""
-  },
-  "# a set of tests designed by zcorpan for relative URLs with unknown schemes",
-  {
-    "input": "i",
-    "base": "sc:sd",
-    "failure": true
-  },
-  {
-    "input": "i",
-    "base": "sc:sd/sd",
-    "failure": true
-  },
-  {
-    "input": "i",
-    "base": "sc:/pa/pa",
-    "href": "sc:/pa/i",
-    "origin": "null",
-    "protocol": "sc:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/pa/i",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "i",
-    "base": "sc://ho/pa",
-    "href": "sc://ho/i",
-    "origin": "null",
-    "protocol": "sc:",
-    "username": "",
-    "password": "",
-    "host": "ho",
-    "hostname": "ho",
-    "port": "",
-    "pathname": "/i",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "i",
-    "base": "sc:///pa/pa",
-    "href": "sc:///pa/i",
-    "origin": "null",
-    "protocol": "sc:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/pa/i",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "../i",
-    "base": "sc:sd",
-    "failure": true
-  },
-  {
-    "input": "../i",
-    "base": "sc:sd/sd",
-    "failure": true
-  },
-  {
-    "input": "../i",
-    "base": "sc:/pa/pa",
-    "href": "sc:/i",
-    "origin": "null",
-    "protocol": "sc:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/i",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "../i",
-    "base": "sc://ho/pa",
-    "href": "sc://ho/i",
-    "origin": "null",
-    "protocol": "sc:",
-    "username": "",
-    "password": "",
-    "host": "ho",
-    "hostname": "ho",
-    "port": "",
-    "pathname": "/i",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "../i",
-    "base": "sc:///pa/pa",
-    "href": "sc:///i",
-    "origin": "null",
-    "protocol": "sc:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/i",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "/i",
-    "base": "sc:sd",
-    "failure": true
-  },
-  {
-    "input": "/i",
-    "base": "sc:sd/sd",
-    "failure": true
-  },
-  {
-    "input": "/i",
-    "base": "sc:/pa/pa",
-    "href": "sc:/i",
-    "origin": "null",
-    "protocol": "sc:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/i",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "/i",
-    "base": "sc://ho/pa",
-    "href": "sc://ho/i",
-    "origin": "null",
-    "protocol": "sc:",
-    "username": "",
-    "password": "",
-    "host": "ho",
-    "hostname": "ho",
-    "port": "",
-    "pathname": "/i",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "/i",
-    "base": "sc:///pa/pa",
-    "href": "sc:///i",
-    "origin": "null",
-    "protocol": "sc:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/i",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "?i",
-    "base": "sc:sd",
-    "failure": true
-  },
-  {
-    "input": "?i",
-    "base": "sc:sd/sd",
-    "failure": true
-  },
-  {
-    "input": "?i",
-    "base": "sc:/pa/pa",
-    "href": "sc:/pa/pa?i",
-    "origin": "null",
-    "protocol": "sc:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/pa/pa",
-    "search": "?i",
-    "hash": ""
-  },
-  {
-    "input": "?i",
-    "base": "sc://ho/pa",
-    "href": "sc://ho/pa?i",
-    "origin": "null",
-    "protocol": "sc:",
-    "username": "",
-    "password": "",
-    "host": "ho",
-    "hostname": "ho",
-    "port": "",
-    "pathname": "/pa",
-    "search": "?i",
-    "hash": ""
-  },
-  {
-    "input": "?i",
-    "base": "sc:///pa/pa",
-    "href": "sc:///pa/pa?i",
-    "origin": "null",
-    "protocol": "sc:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/pa/pa",
-    "search": "?i",
-    "hash": ""
-  },
-  {
-    "input": "#i",
-    "base": "sc:sd",
-    "href": "sc:sd#i",
-    "origin": "null",
-    "protocol": "sc:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "sd",
-    "search": "",
-    "hash": "#i"
-  },
-  {
-    "input": "#i",
-    "base": "sc:sd/sd",
-    "href": "sc:sd/sd#i",
-    "origin": "null",
-    "protocol": "sc:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "sd/sd",
-    "search": "",
-    "hash": "#i"
-  },
-  {
-    "input": "#i",
-    "base": "sc:/pa/pa",
-    "href": "sc:/pa/pa#i",
-    "origin": "null",
-    "protocol": "sc:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/pa/pa",
-    "search": "",
-    "hash": "#i"
-  },
-  {
-    "input": "#i",
-    "base": "sc://ho/pa",
-    "href": "sc://ho/pa#i",
-    "origin": "null",
-    "protocol": "sc:",
-    "username": "",
-    "password": "",
-    "host": "ho",
-    "hostname": "ho",
-    "port": "",
-    "pathname": "/pa",
-    "search": "",
-    "hash": "#i"
-  },
-  {
-    "input": "#i",
-    "base": "sc:///pa/pa",
-    "href": "sc:///pa/pa#i",
-    "origin": "null",
-    "protocol": "sc:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/pa/pa",
-    "search": "",
-    "hash": "#i"
-  },
-  "# make sure that relative URL logic works on known typically non-relative schemes too",
-  {
-    "input": "about:/../",
-    "base": "about:blank",
-    "href": "about:/",
-    "origin": "null",
-    "protocol": "about:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "data:/../",
-    "base": "about:blank",
-    "href": "data:/",
-    "origin": "null",
-    "protocol": "data:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "javascript:/../",
-    "base": "about:blank",
-    "href": "javascript:/",
-    "origin": "null",
-    "protocol": "javascript:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "mailto:/../",
-    "base": "about:blank",
-    "href": "mailto:/",
-    "origin": "null",
-    "protocol": "mailto:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  "# unknown schemes and non-ASCII domains",
-  {
-    "input": "sc://ñ.test/",
-    "base": "about:blank",
-    "href": "sc://xn--ida.test/",
-    "origin": "null",
-    "protocol": "sc:",
-    "username": "",
-    "password": "",
-    "host": "xn--ida.test",
-    "hostname": "xn--ida.test",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "hash": ""
-  },
-  "# unknown schemes and backslashes",
-  {
-    "input": "sc:\\../",
-    "base": "about:blank",
-    "href": "sc:\\../",
-    "origin": "null",
-    "protocol": "sc:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "\\../",
-    "search": "",
-    "hash": ""
-  },
-  "# unknown scheme with path looking like a password",
-  {
-    "input": "sc::a@example.net",
-    "base": "about:blank",
-    "href": "sc::a@example.net",
-    "origin": "null",
-    "protocol": "sc:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": ":a@example.net",
-    "search": "",
-    "hash": ""
-  },
-  "# tests from jsdom/whatwg-url designed for code coverage",
-  {
-    "input": "http://127.0.0.1:10100/relative_import.html",
-    "base": "about:blank",
-    "href": "http://127.0.0.1:10100/relative_import.html",
-    "origin": "http://127.0.0.1:10100",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "127.0.0.1:10100",
-    "hostname": "127.0.0.1",
-    "port": "10100",
-    "pathname": "/relative_import.html",
-    "search": "",
-    "hash": ""
-  },
-  {
-    "input": "http://facebook.com/?foo=%7B%22abc%22",
-    "base": "about:blank",
-    "href": "http://facebook.com/?foo=%7B%22abc%22",
-    "origin": "http://facebook.com",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "facebook.com",
-    "hostname": "facebook.com",
-    "port": "",
-    "pathname": "/",
-    "search": "?foo=%7B%22abc%22",
-    "hash": ""
-  },
-  {
-    "input": "https://localhost:3000/jqueryui@1.2.3",
-    "base": "about:blank",
-    "href": "https://localhost:3000/jqueryui@1.2.3",
-    "origin": "https://localhost:3000",
-    "protocol": "https:",
-    "username": "",
-    "password": "",
-    "host": "localhost:3000",
-    "hostname": "localhost",
-    "port": "3000",
-    "pathname": "/jqueryui@1.2.3",
-    "search": "",
-    "hash": ""
-  },
-  "# tab/LF/CR",
-  {
-    "input": "h\tt\nt\rp://h\to\ns\rt:9\t0\n0\r0/p\ta\nt\rh?q\tu\ne\rry#f\tr\na\rg",
-    "base": "about:blank",
-    "href": "http://host:9000/path?query#frag",
-    "origin": "http://host:9000",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "host:9000",
-    "hostname": "host",
-    "port": "9000",
-    "pathname": "/path",
-    "search": "?query",
-    "hash": "#frag"
-  },
-  "# Stringification of URL.searchParams",
-  {
-    "input": "?a=b&c=d",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/bar?a=b&c=d",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/bar",
-    "search": "?a=b&c=d",
-    "searchParams": "a=b&c=d",
-    "hash": ""
-  },
-  {
-    "input": "??a=b&c=d",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/bar??a=b&c=d",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/bar",
-    "search": "??a=b&c=d",
-    "searchParams": "%3Fa=b&c=d",
-    "hash": ""
-  },
-  "# Scheme only",
-  {
-    "input": "http:",
-    "base": "http://example.org/foo/bar",
-    "href": "http://example.org/foo/bar",
-    "origin": "http://example.org",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "example.org",
-    "hostname": "example.org",
-    "port": "",
-    "pathname": "/foo/bar",
-    "search": "",
-    "searchParams": "",
-    "hash": ""
-  },
-  {
-    "input": "http:",
-    "base": "https://example.org/foo/bar",
-    "failure": true
-  },
-  {
-    "input": "sc:",
-    "base": "https://example.org/foo/bar",
-    "href": "sc:",
-    "origin": "null",
-    "protocol": "sc:",
-    "username": "",
-    "password": "",
-    "host": "",
-    "hostname": "",
-    "port": "",
-    "pathname": "",
-    "search": "",
-    "searchParams": "",
-    "hash": ""
-  },
-  "# Percent encoding of fragments",
-  {
-    "input": "http://foo.bar/baz?qux#foo\bbar",
-    "base": "about:blank",
-    "href": "http://foo.bar/baz?qux#foo%08bar",
-    "origin": "http://foo.bar",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "foo.bar",
-    "hostname": "foo.bar",
-    "port": "",
-    "pathname": "/baz",
-    "search": "?qux",
-    "searchParams": "",
-    "hash": "#foo%08bar"
-  },
-  "# IPv6 compression and serialization",
-  {
-    "input": "http://[fe80:cd00::1257:0:211e:729c]/",
-    "base": "about:blank",
-    "href": "http://[fe80:cd00::1257:0:211e:729c]/",
-    "origin": "http://[fe80:cd00::1257:0:211e:729c]",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "[fe80:cd00::1257:0:211e:729c]",
-    "hostname": "[fe80:cd00::1257:0:211e:729c]",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "searchParams": "",
-    "hash": ""
-  },
-  "# IPv6 compression and serialization: Compress sequences of two or more zeroes",
-  {
-    "input": "http://[fe80:cd00:0:0:1257:0:211e:729c]/",
-    "base": "about:blank",
-    "href": "http://[fe80:cd00::1257:0:211e:729c]/",
-    "origin": "http://[fe80:cd00::1257:0:211e:729c]",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "[fe80:cd00::1257:0:211e:729c]",
-    "hostname": "[fe80:cd00::1257:0:211e:729c]",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "searchParams": "",
-    "hash": ""
-  },
-  "# IPv6 compression and serialization: Compress longest sequence of zeroes",
-  {
-    "input": "http://[fe80:0:0:1257:0:0:0:cd00]/",
-    "base": "about:blank",
-    "href": "http://[fe80:0:0:1257::cd00]/",
-    "origin": "http://[fe80:0:0:1257::cd00]",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "[fe80:0:0:1257::cd00]",
-    "hostname": "[fe80:0:0:1257::cd00]",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "searchParams": "",
-    "hash": ""
-  },
-  "# IPv6 compression and serialization: Do not compress lone zeroes",
-  {
-    "input": "http://[fe80:cd00:0:cde:1257:0:211e:729c]/",
-    "base": "about:blank",
-    "href": "http://[fe80:cd00:0:cde:1257:0:211e:729c]/",
-    "origin": "http://[fe80:cd00:0:cde:1257:0:211e:729c]",
-    "protocol": "http:",
-    "username": "",
-    "password": "",
-    "host": "[fe80:cd00:0:cde:1257:0:211e:729c]",
-    "hostname": "[fe80:cd00:0:cde:1257:0:211e:729c]",
-    "port": "",
-    "pathname": "/",
-    "search": "",
-    "searchParams": "",
-    "hash": ""
-  }
-]
--- a/third_party/rust/url/.cargo-checksum.json
+++ b/third_party/rust/url/.cargo-checksum.json
@@ -1,1 +1,1 @@
-{"files":{".travis.yml":"890af214187ffcba4732acb2d1af30d7adb9aade0679e9fdb06baae363240b8e","Cargo.toml":"52e8e0a7014d3b0c654491184e9fc82f8c61ba7f51332e2b6a787330be42a301","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"20c7855c364d57ea4c97889a5e8d98470a9952dade37bd9248b9a54431670e5e","Makefile":"bffd75d34654b2955d4f005f1a5e85c821c90becf1a8a52cbe10121972f43148","README.md":"eb3f4694003f408cbe3c7f3e9fbbc71241defb940cc55a816981f0f0f144c8eb","UPGRADING.md":"fbcc2d39bdf17db0745793db6626fcd5c909dddd4ce13b27566cfabece22c368","appveyor.yml":"c78486dbfbe6ebbf3d808afb9a19f7ec18c4704ce451c6305f0716999b70a1a6","docs/.nojekyll":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","docs/404.html":"f61e6271c1ea1aa113b64b356e994595fa548f0433f89948d747503ad22195cd","docs/index.html":"f61e6271c1ea1aa113b64b356e994595fa548f0433f89948d747503ad22195cd","github.png":"b432fd855efe7c430fe6a57ccf83935c1996f03a7cdc8d6e1b34154b8c43f6ec","rust-url-todo":"1192cee7b6cedf2133d97dc6074b593a1d19b0ee13fff6f28d6329855044e575","src/encoding.rs":"f3e109ca8ec5a9130da50cdfb3003530aedb6dd5a440f0790d76b71f6981119c","src/form_urlencoded.rs":"320418526c4564a4469581d426e7467bcefe504eecd098e1eb90a2663a75fd80","src/host.rs":"4c74946777d76e9b307604f8e24a3485fd0856b664450194e8b429e262cf410d","src/lib.rs":"894cc76c31357fb588292e990a87f4e951043e32ea3d9f38fddc145302d0b318","src/origin.rs":"6e4821eb9600a32ef54d05c8e1a7937f6d9b4dd1e3bda7f36c7988f6a2bef78b","src/parser.rs":"e379c9eb51cff977b9cef368ab64bcff7626e885b859772ab1bc76c9193e9fde","src/path_segments.rs":"7bd3142eaa568863ef44e2255c181239141f9eeee337f889b9ffaaeab4ca669d","src/quirks.rs":"fe6095104cf583053ab35d8a2a093a8581da083641e32d1c5acfe322a26c4bde","src/slicing.rs":"4e539886b23945a92094625f3e531a4bff40daa44240b5d19ee8577478c4f7fe","tests/data.rs":"50a110e475b1717fdaff6524be7d8916cb41a45461e0715f632ff54d0ce28886","tests/setters_tests.json":"ebcbdb52e9a4b5a565f8806d52ebc610d46a34df883e10b0be080d026468ff73","tests/unit.rs":"c0305ca991b2c03815aac2e69ef1c1792b087df92272a6196eb698b27625321f","tests/urltestdata.json":"df87028e1eaea4ef70cf1c1faaed2584e81a46b8b6cd90f50d47b77726ece41c"},"package":"fa35e768d4daf1d85733418a49fb42e10d7f633e394fccab4ab7aba897053fe2"}
\ No newline at end of file
+{"files":{".travis.yml":"890af214187ffcba4732acb2d1af30d7adb9aade0679e9fdb06baae363240b8e","Cargo.toml":"ec586106c4d0625919a3591fe3ae915043e82c8bfdd1c9e747171ba5e21047e1","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"20c7855c364d57ea4c97889a5e8d98470a9952dade37bd9248b9a54431670e5e","Makefile":"bffd75d34654b2955d4f005f1a5e85c821c90becf1a8a52cbe10121972f43148","README.md":"eb3f4694003f408cbe3c7f3e9fbbc71241defb940cc55a816981f0f0f144c8eb","UPGRADING.md":"fbcc2d39bdf17db0745793db6626fcd5c909dddd4ce13b27566cfabece22c368","appveyor.yml":"c78486dbfbe6ebbf3d808afb9a19f7ec18c4704ce451c6305f0716999b70a1a6","docs/.nojekyll":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","docs/404.html":"f61e6271c1ea1aa113b64b356e994595fa548f0433f89948d747503ad22195cd","docs/index.html":"f61e6271c1ea1aa113b64b356e994595fa548f0433f89948d747503ad22195cd","github.png":"b432fd855efe7c430fe6a57ccf83935c1996f03a7cdc8d6e1b34154b8c43f6ec","rust-url-todo":"1192cee7b6cedf2133d97dc6074b593a1d19b0ee13fff6f28d6329855044e575","src/encoding.rs":"f3e109ca8ec5a9130da50cdfb3003530aedb6dd5a440f0790d76b71f6981119c","src/form_urlencoded.rs":"7ccaef7148e4bc2577154c50f8705db3a055b641269e24c22770f06222321e1e","src/host.rs":"281165d732ea87b6f01a98f7c68ffcb284c41f84b3ab6ed674fb8e57022d1019","src/lib.rs":"bd156e8bcfbd44f0cd52c8b394e03ec63fea012c0bf5ca554521352714838605","src/origin.rs":"7071dcc1070ccfae84cdcd43586b84a9706e35a9a099ff4dde128da0909bd0bc","src/parser.rs":"9d30868f0900586fec6f122a0322598a08116ab0b4c4d8caf5c35a720381a73a","src/path_segments.rs":"7bd3142eaa568863ef44e2255c181239141f9eeee337f889b9ffaaeab4ca669d","src/quirks.rs":"1231f965e22bb3632c22993e2a8d4c7470bcb4a8de25d049f31784303f0def03","src/slicing.rs":"4e539886b23945a92094625f3e531a4bff40daa44240b5d19ee8577478c4f7fe","tests/data.rs":"c333766897f6492fb6583ab5c8a511973b7a55f58ca550799432343da64d5ca7","tests/setters_tests.json":"ebcbdb52e9a4b5a565f8806d52ebc610d46a34df883e10b0be080d026468ff73","tests/unit.rs":"c2f206f433be619414d761d358a2a4a5a46cfe8a4fea5339adec5e9937d78de2","tests/urltestdata.json":"430c74aa3a31afaa57a92805544e00825f4dffe2def98c1e3c212c3db80268af"},"package":"eeb819346883532a271eb626deb43c4a1bb4c4dd47c519bd78137c3e72a4fe27"}
\ No newline at end of file
--- a/third_party/rust/url/Cargo.toml
+++ b/third_party/rust/url/Cargo.toml
@@ -1,74 +1,49 @@
-# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
-#
-# When uploading crates to the registry Cargo will automatically
-# "normalize" Cargo.toml files for maximal compatibility
-# with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g. crates.io) dependencies
-#
-# If you believe there's an error in this file please file an
-# issue against the rust-lang/cargo repository. If you're
-# editing this file be aware that the upstream Cargo.toml
-# will likely look very different (and much more reasonable)
+[package]
 
-[package]
 name = "url"
-version = "1.6.0"
+# When updating version, also modify html_root_url in the lib.rs
+version = "1.5.1"
 authors = ["The rust-url developers"]
+
 description = "URL library for Rust, based on the WHATWG URL Standard"
 documentation = "https://docs.rs/url"
+repository = "https://github.com/servo/rust-url"
 readme = "README.md"
 keywords = ["url", "parser"]
 categories = ["parser-implementations", "web-programming", "encoding"]
 license = "MIT/Apache-2.0"
-repository = "https://github.com/servo/rust-url"
 
-[lib]
-test = false
+[badges]
+travis-ci = { repository = "servo/rust-url" }
+appveyor = { repository = "servo/rust-url" }
+
+[workspace]
+members = [".", "idna", "percent_encoding", "url_serde"]
 
 [[test]]
 name = "unit"
 
 [[test]]
 name = "data"
 harness = false
-[dependencies.rustc-serialize]
-version = "0.3"
-optional = true
 
-[dependencies.matches]
-version = "0.1"
-
-[dependencies.serde]
-version = ">=0.6.1, <0.9"
-optional = true
-
-[dependencies.percent-encoding]
-version = "1.0.0"
+[lib]
+test = false
 
-[dependencies.encoding]
-version = "0.2"
-optional = true
-
-[dependencies.idna]
-version = "0.1.0"
-
-[dependencies.heapsize]
-version = ">=0.4.1, <0.5"
-optional = true
-[dev-dependencies.rustc-test]
-version = "0.2"
-
-[dev-dependencies.rustc-serialize]
-version = "0.3"
-
-[dev-dependencies.serde_json]
-version = ">=0.6.1, <0.9"
+[dev-dependencies]
+rustc-test = "0.1"
+rustc-serialize = "0.3"
+serde_json = ">=0.6.1, <0.9"
 
 [features]
+query_encoding = ["encoding"]
 heap_size = ["heapsize"]
-query_encoding = ["encoding"]
-[badges.travis-ci]
-repository = "servo/rust-url"
 
-[badges.appveyor]
-repository = "Manishearth/rust-url"
+[dependencies]
+encoding = {version = "0.2", optional = true}
+heapsize = {version = ">=0.1.1, <0.5", optional = true}
+idna = { version = "0.1.0", path = "./idna" }
+matches = "0.1"
+percent-encoding = { version = "1.0.0", path = "./percent_encoding" }
+rustc-serialize = {version = "0.3", optional = true}
+serde = {version = ">=0.6.1, <0.9", optional = true}
--- a/third_party/rust/url/src/form_urlencoded.rs
+++ b/third_party/rust/url/src/form_urlencoded.rs
@@ -11,17 +11,16 @@
 //! as used by HTML forms.
 //!
 //! Converts between a string (such as an URL’s query string)
 //! and a sequence of (name, value) pairs.
 
 use encoding::EncodingOverride;
 use percent_encoding::{percent_encode_byte, percent_decode};
 use std::borrow::{Borrow, Cow};
-use std::fmt;
 use std::str;
 
 
 /// Convert a byte string in the `application/x-www-form-urlencoded` syntax
 /// into a iterator of (name, value) pairs.
 ///
 /// Use `parse(input.as_bytes())` to parse a `&str` string.
 ///
@@ -212,25 +211,16 @@ impl<'a> Iterator for ByteSerialize<'a> 
 
 /// The [`application/x-www-form-urlencoded` serializer](
 /// https://url.spec.whatwg.org/#concept-urlencoded-serializer).
 #[derive(Debug)]
 pub struct Serializer<T: Target> {
     target: Option<T>,
     start_position: usize,
     encoding: EncodingOverride,
-    custom_encoding: Option<SilentDebug<Box<FnMut(&str) -> Cow<[u8]>>>>,
-}
-
-struct SilentDebug<T>(T);
-
-impl<T> fmt::Debug for SilentDebug<T> {
-    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.write_str("…")
-    }
 }
 
 pub trait Target {
     fn as_mut_string(&mut self) -> &mut String;
     fn finish(self) -> Self::Finished;
     type Finished;
 }
 
@@ -277,17 +267,16 @@ impl<T: Target> Serializer<T> {
     /// If that suffix is non-empty,
     /// its content is assumed to already be in `application/x-www-form-urlencoded` syntax.
     pub fn for_suffix(mut target: T, start_position: usize) -> Self {
         &target.as_mut_string()[start_position..];  // Panic if out of bounds
         Serializer {
             target: Some(target),
             start_position: start_position,
             encoding: EncodingOverride::utf8(),
-            custom_encoding: None,
         }
     }
 
     /// Remove any existing name/value pair.
     ///
     /// Panics if called after `.finish()`.
     pub fn clear(&mut self) -> &mut Self {
         string(&mut self.target).truncate(self.start_position);
@@ -296,62 +285,50 @@ impl<T: Target> Serializer<T> {
 
     /// Set the character encoding to be used for names and values before percent-encoding.
     #[cfg(feature = "query_encoding")]
     pub fn encoding_override(&mut self, new: Option<::encoding::EncodingRef>) -> &mut Self {
         self.encoding = EncodingOverride::from_opt_encoding(new).to_output_encoding();
         self
     }
 
-    /// Set the character encoding to be used for names and values before percent-encoding.
-    pub fn custom_encoding_override<F>(&mut self, encode: F) -> &mut Self
-        where F: FnMut(&str) -> Cow<[u8]> + 'static
-    {
-        self.custom_encoding = Some(SilentDebug(Box::new(encode)));
-        self
-    }
-
     /// Serialize and append a name/value pair.
     ///
     /// Panics if called after `.finish()`.
     pub fn append_pair(&mut self, name: &str, value: &str) -> &mut Self {
-        append_pair(string(&mut self.target), self.start_position, self.encoding,
-                    &mut self.custom_encoding, name, value);
+        append_pair(string(&mut self.target), self.start_position, self.encoding, name, value);
         self
     }
 
     /// Serialize and append a number of name/value pairs.
     ///
     /// This simply calls `append_pair` repeatedly.
     /// This can be more convenient, so the user doesn’t need to introduce a block
     /// to limit the scope of `Serializer`’s borrow of its string.
     ///
     /// Panics if called after `.finish()`.
     pub fn extend_pairs<I, K, V>(&mut self, iter: I) -> &mut Self
     where I: IntoIterator, I::Item: Borrow<(K, V)>, K: AsRef<str>, V: AsRef<str> {
         {
             let string = string(&mut self.target);
             for pair in iter {
                 let &(ref k, ref v) = pair.borrow();
-                append_pair(string, self.start_position, self.encoding,
-                            &mut self.custom_encoding, k.as_ref(), v.as_ref());
+                append_pair(string, self.start_position, self.encoding, k.as_ref(), v.as_ref());
             }
         }
         self
     }
 
     /// Add a name/value pair whose name is `_charset_`
     /// and whose value is the character encoding’s name.
     /// (See the `encoding_override()` method.)
     ///
     /// Panics if called after `.finish()`.
     #[cfg(feature = "query_encoding")]
     pub fn append_charset(&mut self) -> &mut Self {
-        assert!(self.custom_encoding.is_none(),
-                "Cannot use both custom_encoding_override() and append_charset()");
         {
             let string = string(&mut self.target);
             append_separator_if_needed(string, self.start_position);
             string.push_str("_charset_=");
             string.push_str(self.encoding.name());
         }
         self
     }
@@ -379,25 +356,14 @@ fn append_separator_if_needed(string: &m
     }
 }
 
 fn string<T: Target>(target: &mut Option<T>) -> &mut String {
     target.as_mut().expect("url::form_urlencoded::Serializer finished").as_mut_string()
 }
 
 fn append_pair(string: &mut String, start_position: usize, encoding: EncodingOverride,
-               custom_encoding: &mut Option<SilentDebug<Box<FnMut(&str) -> Cow<[u8]>>>>,
                name: &str, value: &str) {
     append_separator_if_needed(string, start_position);
-    append_encoded(name, string, encoding, custom_encoding);
+    string.extend(byte_serialize(&encoding.encode(name.into())));
     string.push('=');
-    append_encoded(value, string, encoding, custom_encoding);
+    string.extend(byte_serialize(&encoding.encode(value.into())));
 }
-
-fn append_encoded(s: &str, string: &mut String, encoding: EncodingOverride,
-               custom_encoding: &mut Option<SilentDebug<Box<FnMut(&str) -> Cow<[u8]>>>>) {
-    let bytes = if let Some(SilentDebug(ref mut custom)) = *custom_encoding {
-        custom(s)
-    } else {
-        encoding.encode(s.into())
-    };
-    string.extend(byte_serialize(&bytes));
-}
--- a/third_party/rust/url/src/host.rs
+++ b/third_party/rust/url/src/host.rs
@@ -132,17 +132,17 @@ impl<'a> Host<&'a str> {
             Host::Ipv6(address) => Host::Ipv6(address),
         }
     }
 }
 
 impl Host<String> {
     /// Parse a host: either an IPv6 address in [] square brackets, or a domain.
     ///
-    /// <https://url.spec.whatwg.org/#host-parsing>
+    /// https://url.spec.whatwg.org/#host-parsing
     pub fn parse(input: &str) -> Result<Self, ParseError> {
         if input.starts_with('[') {
             if !input.ends_with(']') {
                 return Err(ParseError::InvalidIpv6Address)
             }
             return parse_ipv6addr(&input[1..input.len() - 1]).map(Host::Ipv6)
         }
         let domain = percent_decode(input.as_bytes()).decode_utf8_lossy();
@@ -304,17 +304,17 @@ fn longest_zero_sequence(pieces: &[u16; 
     // step 3: ignore lone zeroes
     if longest_length < 2 {
         (-1, -2)
     } else {
         (longest, longest + longest_length)
     }
 }
 
-/// <https://url.spec.whatwg.org/#ipv4-number-parser>
+/// https://url.spec.whatwg.org/#ipv4-number-parser
 fn parse_ipv4number(mut input: &str) -> Result<u32, ()> {
     let mut r = 10;
     if input.starts_with("0x") || input.starts_with("0X") {
         input = &input[2..];
         r = 16;
     } else if input.len() >= 2 && input.starts_with('0') {
         input = &input[1..];
         r = 8;
@@ -326,17 +326,17 @@ fn parse_ipv4number(mut input: &str) -> 
         return Err(())
     }
     match u32::from_str_radix(input, r) {
         Ok(number) => Ok(number),
         Err(_) => Err(()),
     }
 }
 
-/// <https://url.spec.whatwg.org/#concept-ipv4-parser>
+/// https://url.spec.whatwg.org/#concept-ipv4-parser
 fn parse_ipv4addr(input: &str) -> ParseResult<Option<Ipv4Addr>> {
     if input.is_empty() {
         return Ok(None)
     }
     let mut parts: Vec<&str> = input.split('.').collect();
     if parts.last() == Some(&"") {
         parts.pop();
     }
@@ -363,17 +363,17 @@ fn parse_ipv4addr(input: &str) -> ParseR
         return Err(ParseError::InvalidIpv4Address);
     }
     for (counter, n) in numbers.iter().enumerate() {
         ipv4 += n << (8 * (3 - counter as u32))
     }
     Ok(Some(Ipv4Addr::from(ipv4)))
 }
 
-/// <https://url.spec.whatwg.org/#concept-ipv6-parser>
+/// https://url.spec.whatwg.org/#concept-ipv6-parser
 fn parse_ipv6addr(input: &str) -> ParseResult<Ipv6Addr> {
     let input = input.as_bytes();
     let len = input.len();
     let mut is_ip_v4 = false;
     let mut pieces = [0, 0, 0, 0, 0, 0, 0, 0];
     let mut piece_pointer = 0;
     let mut compress_pointer = None;
     let mut i = 0;
@@ -418,19 +418,16 @@ fn parse_ipv6addr(input: &str) -> ParseR
         }
         if i < len {
             match input[i] {
                 b'.' => {
                     if i == start {
                         return Err(ParseError::InvalidIpv6Address)
                     }
                     i = start;
-                    if piece_pointer > 6 {
-                        return Err(ParseError::InvalidIpv6Address)
-                    }
                     is_ip_v4 = true;
                 },
                 b':' => {
                     i += 1;
                     if i == len {
                         return Err(ParseError::InvalidIpv6Address)
                     }
                 },
@@ -443,66 +440,54 @@ fn parse_ipv6addr(input: &str) -> ParseR
         pieces[piece_pointer] = value;
         piece_pointer += 1;
     }
 
     if is_ip_v4 {
         if piece_pointer > 6 {
             return Err(ParseError::InvalidIpv6Address)
         }
-        let mut numbers_seen = 0;
+        let mut dots_seen = 0;
         while i < len {
-            if numbers_seen > 0 {
-                if numbers_seen < 4 && (i < len && input[i] == b'.') {
-                    i += 1
-                } else {
-                    return Err(ParseError::InvalidIpv6Address)
-                }
-            }
-
-            let mut ipv4_piece = None;
+            let mut value = None;
             while i < len {
                 let digit = match input[i] {
                     c @ b'0' ... b'9' => c - b'0',
                     _ => break
                 };
-                match ipv4_piece {
-                    None => ipv4_piece = Some(digit as u16),
+                match value {
+                    None => value = Some(digit as u16),
                     Some(0) => return Err(ParseError::InvalidIpv6Address),  // No leading zero
                     Some(ref mut v) => {
                         *v = *v * 10 + digit as u16;
                         if *v > 255 {
                             return Err(ParseError::InvalidIpv6Address)
                         }
                     }
                 }
                 i += 1;
             }
-
-            pieces[piece_pointer] = if let Some(v) = ipv4_piece {
+            if dots_seen < 3 && !(i < len && input[i] == b'.') {
+                return Err(ParseError::InvalidIpv6Address)
+            }
+            pieces[piece_pointer] = if let Some(v) = value {
                 pieces[piece_pointer] * 0x100 + v
             } else {
                 return Err(ParseError::InvalidIpv6Address)
             };
-            numbers_seen += 1;
-
-            if numbers_seen == 2 || numbers_seen == 4 {
+            if dots_seen == 1 || dots_seen == 3 {
                 piece_pointer += 1;
             }
-        }
-
-        if numbers_seen != 4 {
-            return Err(ParseError::InvalidIpv6Address)
+            i += 1;
+            if dots_seen == 3 && i < len {
+                return Err(ParseError::InvalidIpv6Address)
+            }
+            dots_seen += 1;
         }
     }
-
-    if i < len {
-        return Err(ParseError::InvalidIpv6Address)
-    }
-
     match compress_pointer {
         Some(compress_pointer) => {
             let mut swaps = piece_pointer - compress_pointer;
             piece_pointer = 7;
             while swaps > 0 {
                 pieces.swap(piece_pointer, compress_pointer + swaps - 1);
                 swaps -= 1;
                 piece_pointer -= 1;
--- a/third_party/rust/url/src/lib.rs
+++ b/third_party/rust/url/src/lib.rs
@@ -99,17 +99,17 @@ use url::Url;
 let this_document = Url::parse("http://servo.github.io/rust-url/url/index.html")?;
 let css_url = this_document.join("../main.css")?;
 assert_eq!(css_url.as_str(), "http://servo.github.io/rust-url/main.css");
 # Ok(())
 # }
 # run().unwrap();
 */
 
-#![doc(html_root_url = "https://docs.rs/url/1.6.0")]
+#![doc(html_root_url = "https://docs.rs/url/1.5.1")]
 
 #[cfg(feature="rustc-serialize")] extern crate rustc_serialize;
 #[macro_use] extern crate matches;
 #[cfg(feature="serde")] extern crate serde;
 #[cfg(feature="heapsize")] #[macro_use] extern crate heapsize;
 
 pub extern crate idna;
 pub extern crate percent_encoding;
@@ -247,23 +247,16 @@ impl Url {
     /// # use url::ParseError;
     ///
     /// # fn run() -> Result<(), ParseError> {
     /// let url = Url::parse("https://example.net")?;
     /// # Ok(())
     /// # }
     /// # run().unwrap();
     /// ```
-    /// 
-    /// # Errors
-    ///
-    /// If the function can not parse an absolute URL from the given string,
-    /// a [`ParseError`] variant will be returned.
-    ///
-    /// [`ParseError`]: enum.ParseError.html
     #[inline]
     pub fn parse(input: &str) -> Result<Url, ::ParseError> {
         Url::options().parse(input)
     }
 
     /// Parse an absolute URL from a string and add params to its query string.
     ///
     /// Existing params are not removed.
@@ -276,23 +269,16 @@ impl Url {
     ///
     /// # fn run() -> Result<(), ParseError> {
     /// let url = Url::parse_with_params("https://example.net?dont=clobberme",
     ///                                  &[("lang", "rust"), ("browser", "servo")])?;
     /// # Ok(())
     /// # }
     /// # run().unwrap();
     /// ```
-    ///
-    /// # Errors
-    ///
-    /// If the function can not parse an absolute URL from the given string,
-    /// a [`ParseError`] variant will be returned.
-    ///
-    /// [`ParseError`]: enum.ParseError.html
     #[inline]
     pub fn parse_with_params<I, K, V>(input: &str, iter: I) -> Result<Url, ::ParseError>
         where I: IntoIterator,
               I::Item: Borrow<(K, V)>,
               K: AsRef<str>,
               V: AsRef<str>
     {
         let mut url = Url::options().parse(input);
@@ -323,23 +309,16 @@ impl Url {
     ///
     /// let base = Url::parse("https://example.net/a/b/")?;
     /// let url = base.join("c.png")?;
     /// assert_eq!(url.as_str(), "https://example.net/a/b/c.png");
     /// # Ok(())
     /// # }
     /// # run().unwrap();
     /// ```
-    ///
-    /// # Errors
-    ///
-    /// If the function can not parse an URL from the given string 
-    /// with this URL as the base URL, a [`ParseError`] variant will be returned.
-    ///
-    /// [`ParseError`]: enum.ParseError.html
     #[inline]
     pub fn join(&self, input: &str) -> Result<Url, ::ParseError> {
         Url::options().base_url(Some(self)).parse(input)
     }
 
     /// Return a default `ParseOptions` that can fully configure the URL parser.
     ///
     /// # Examples
@@ -516,17 +495,17 @@ impl Url {
                 (self.host_str(), other.host_str()) == (None, Some("")));
         assert_eq!(self.port, other.port);
         assert_eq!(self.path_start, other.path_start);
         assert_eq!(self.query_start, other.query_start);
         assert_eq!(self.fragment_start, other.fragment_start);
         Ok(())
     }
 
-    /// Return the origin of this URL (<https://url.spec.whatwg.org/#origin>)
+    /// Return the origin of this URL (https://url.spec.whatwg.org/#origin)
     ///
     /// Note: this returns an opaque origin for `file:` URLs, which causes
     /// `url.origin() != url.origin()`.
     ///
     /// # Examples
     ///
     /// URL with `ftp` scheme:
     ///
@@ -1464,16 +1443,19 @@ impl Url {
                 self.serialization.push_str(&path_and_after);
             }
         }
         self.port = port;
     }
 
     /// Change this URL’s host.
     ///
+    /// If this URL is cannot-be-a-base or there is an error parsing the given `host`,
+    /// do nothing and return `Err`.
+    ///
     /// Removing the host (calling this with `None`)
     /// will also remove any username, password, and port number.
     ///
     /// # Examples
     ///
     /// Change host:
     ///
     /// ```
@@ -1537,23 +1519,16 @@ impl Url {
     ///
     /// let result = url.set_host(None);
     /// assert!(result.is_err());
     /// assert_eq!(url.as_str(), "mailto:rms@example.net");
     /// # Ok(())
     /// # }
     /// # run().unwrap();
     /// ```
-    ///
-    /// # Errors
-    ///
-    /// If this URL is cannot-be-a-base or there is an error parsing the given `host`,
-    /// a [`ParseError`] variant will be returned.
-    ///
-    /// [`ParseError`]: enum.ParseError.html
     pub fn set_host(&mut self, host: Option<&str>) -> Result<(), ParseError> {
         if self.cannot_be_a_base() {
             return Err(ParseError::SetHostOnCannotBeABaseUrl)
         }
 
         if let Some(host) = host {
             if host == "" && SchemeType::from(self.scheme()).is_special() {
                 return Err(ParseError::EmptyHost);
@@ -1752,26 +1727,25 @@ impl Url {
     /// assert_eq!(url.as_str(), "mailto:rmz@example.com");
     /// assert!(result.is_err());
     /// # Ok(())
     /// # }
     /// # run().unwrap();
     /// ```
     ///
     /// Setup username to user1
-    ///
     /// ```rust
     /// use url::{Url, ParseError};
     ///
     /// # fn run() -> Result<(), ParseError> {
-    /// let mut url = Url::parse("ftp://:secre1@example.com/")?;
+    /// let mut url = Url::parse("ftp://:secre1@example.com")?;
     /// let result = url.set_username("user1");
     /// assert!(result.is_ok());
     /// assert_eq!(url.username(), "user1");
-    /// assert_eq!(url.as_str(), "ftp://user1:secre1@example.com/");
+    /// assert_eq!(url.as_str(), "ftp://user1:secre1@example.com");
     /// # Ok(())
     /// # }
     /// # run().unwrap();
     /// ```
     pub fn set_username(&mut self, username: &str) -> Result<(), ()> {
         if !self.has_host() {
             return Err(())
         }
--- a/third_party/rust/url/src/origin.rs
+++ b/third_party/rust/url/src/origin.rs
@@ -44,17 +44,17 @@ pub fn url_origin(url: &Url) -> Origin {
 /// - If the scheme is "blob" the origin is the origin of the
 ///   URL contained in the path component. If parsing fails,
 ///   it is an opaque origin.
 /// - If the scheme is "ftp", "gopher", "http", "https", "ws", or "wss",
 ///   then the origin is a tuple of the scheme, host, and port.
 /// - If the scheme is anything else, the origin is opaque, meaning
 ///   the URL does not have the same origin as any other URL.
 ///
-/// For more information see <https://url.spec.whatwg.org/#origin>
+/// For more information see https://url.spec.whatwg.org/#origin
 #[derive(PartialEq, Eq, Hash, Clone, Debug)]
 pub enum Origin {
     /// A globally unique identifier
     Opaque(OpaqueOrigin),
 
     /// Consists of the URL's scheme, host and port
     Tuple(String, Host<String>, u16)
 }
@@ -81,31 +81,31 @@ impl Origin {
     }
 
     /// Return whether this origin is a (scheme, host, port) tuple
     /// (as opposed to an opaque origin).
     pub fn is_tuple(&self) -> bool {
         matches!(*self, Origin::Tuple(..))
     }
 
-    /// <https://html.spec.whatwg.org/multipage/#ascii-serialisation-of-an-origin>
+    /// https://html.spec.whatwg.org/multipage/#ascii-serialisation-of-an-origin
     pub fn ascii_serialization(&self) -> String {
         match *self {
             Origin::Opaque(_) => "null".to_owned(),
             Origin::Tuple(ref scheme, ref host, port) => {
                 if default_port(scheme) == Some(port) {
                     format!("{}://{}", scheme, host)
                 } else {
                     format!("{}://{}:{}", scheme, host, port)
                 }
             }
         }
     }
 
-    /// <https://html.spec.whatwg.org/multipage/#unicode-serialisation-of-an-origin>
+    /// https://html.spec.whatwg.org/multipage/#unicode-serialisation-of-an-origin
     pub fn unicode_serialization(&self) -> String {
         match *self {
             Origin::Opaque(_) => "null".to_owned(),
             Origin::Tuple(ref scheme, ref host, port) => {
                 let host = match *host {
                     Host::Domain(ref domain) => {
                         let (domain, _errors) = domain_to_unicode(domain);
                         Host::Domain(domain)
--- a/third_party/rust/url/src/parser.rs
+++ b/third_party/rust/url/src/parser.rs
@@ -678,17 +678,17 @@ impl<'a> Parser<'a> {
         let mut char_count = 0;
         while let Some(c) = remaining.next() {
             match c {
                 '@' => {
                     if last_at.is_some() {
                         self.syntax_violation("unencoded @ sign in username or password")
                     } else {
                         self.syntax_violation(
-                            "embedding authentication information (username or password) \
+                            "embedding authentification information (username or password) \
                             in an URL is not recommended")
                     }
                     last_at = Some((char_count, remaining.clone()))
                 },
                 '/' | '?' | '#' => break,
                 '\\' if scheme_type.is_special() => break,
                 _ => (),
             }
--- a/third_party/rust/url/src/quirks.rs
+++ b/third_party/rust/url/src/quirks.rs
@@ -41,17 +41,17 @@ pub fn href(url: &Url) -> &str {
 /// Setter for https://url.spec.whatwg.org/#dom-url-href
 pub fn set_href(url: &mut Url, value: &str) -> Result<(), ParseError> {
     *url = Url::parse(value)?;
     Ok(())
 }
 
 /// Getter for https://url.spec.whatwg.org/#dom-url-origin
 pub fn origin(url: &Url) -> String {
-    url.origin().ascii_serialization()
+    url.origin().unicode_serialization()
 }
 
 /// Getter for https://url.spec.whatwg.org/#dom-url-protocol
 #[inline]
 pub fn protocol(url: &Url) -> &str {
     &url.as_str()[..url.scheme().len() + ":".len()]
 }
 
--- a/third_party/rust/url/tests/data.rs
+++ b/third_party/rust/url/tests/data.rs
@@ -183,17 +183,21 @@ fn collect_setters<F>(add_test: &mut F) 
     setter!("hash", set_hash);
 }
 
 fn main() {
     let mut tests = Vec::new();
     {
         let mut add_one = |name: String, run: test::TestFn| {
             tests.push(test::TestDescAndFn {
-                desc: test::TestDesc::new(test::DynTestName(name)),
+                desc: test::TestDesc {
+                    name: test::DynTestName(name),
+                    ignore: false,
+                    should_panic: test::ShouldPanic::No,
+                },
                 testfn: run,
             })
         };
         collect_parsing(&mut add_one);
         collect_setters(&mut add_one);
     }
     test::test_main(&std::env::args().collect::<Vec<_>>(), tests)
 }
--- a/third_party/rust/url/tests/unit.rs
+++ b/third_party/rust/url/tests/unit.rs
@@ -6,17 +6,16 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
 //! Unit tests
 
 #[macro_use]
 extern crate url;
 
-use std::ascii::AsciiExt;
 use std::borrow::Cow;
 use std::net::{Ipv4Addr, Ipv6Addr};
 use std::path::{Path, PathBuf};
 use url::{Host, HostAndPort, Url, form_urlencoded};
 
 #[test]
 fn size() {
     use std::mem::size_of;
@@ -252,25 +251,16 @@ fn test_form_serialize() {
         .append_pair("foo", "é&")
         .append_pair("bar", "")
         .append_pair("foo", "#")
         .finish();
     assert_eq!(encoded, "foo=%C3%A9%26&bar=&foo=%23");
 }
 
 #[test]
-fn form_urlencoded_custom_encoding_override() {
-    let encoded = form_urlencoded::Serializer::new(String::new())
-        .custom_encoding_override(|s| s.as_bytes().to_ascii_uppercase().into())
-        .append_pair("foo", "bar")
-        .finish();
-    assert_eq!(encoded, "FOO=BAR");
-}
-
-#[test]
 fn host_and_port_display() {
     assert_eq!(
         format!(
             "{}",
             HostAndPort{ host: Host::Domain("www.mozilla.org"), port: 80}
         ),
         "www.mozilla.org:80"
     );
--- a/third_party/rust/url/tests/urltestdata.json
+++ b/third_party/rust/url/tests/urltestdata.json
@@ -3531,17 +3531,17 @@
     "base": "http://other.com/",
     "failure": true
   },
   "Basic IDN support, UTF-8 and UTF-16 input should be converted to IDN",
   {
     "input": "http://你好你好",
     "base": "http://other.com/",
     "href": "http://xn--6qqa088eba/",
-    "origin": "http://xn--6qqa088eba",
+    "origin": "http://你好你好",
     "protocol": "http:",
     "username": "",
     "password": "",
     "host": "xn--6qqa088eba",
     "hostname": "xn--6qqa088eba",
     "port": "",
     "pathname": "/",
     "search": "",
@@ -3629,36 +3629,16 @@
     "hash": ""
   },
   "Broken IPv6",
   {
     "input": "http://[google.com]",
     "base": "http://other.com/",
     "failure": true
   },
-  {
-    "input": "http://[::1.2.3.4x]",
-    "base": "http://other.com/",
-    "failure": true
-  },
-  {
-    "input": "http://[::1.2.3.]",
-    "base": "http://other.com/",
-    "failure": true
-  },
-  {
-    "input": "http://[::1.2.]",
-    "base": "http://other.com/",
-    "failure": true
-  },
-  {
-    "input": "http://[::1.]",
-    "base": "http://other.com/",
-    "failure": true
-  },
   "Misc Unicode",
   {
     "input": "http://foo:💩@example.com/bar",
     "base": "http://other.com/",
     "href": "http://foo:%F0%9F%92%A9@example.com/bar",
     "origin": "http://example.com",
     "protocol": "http:",
     "username": "foo",
deleted file mode 100644
--- a/third_party/rust/version_check/.cargo-checksum.json
+++ /dev/null
@@ -1,1 +0,0 @@
-{"files":{"Cargo.toml":"dad6a4a872650afdecb540fa006f1a62527578ae2c7460e41ea6fd553dd317d4","LICENSE":"ce1f970284c4ab06e90671a984086692dc44da3e2b8ee86444d79b6f77bcf9e7","README.md":"27659fafbe25cb1a91dcfe30c6fd8c001ef9faea08b241f644b0b701e5ff3835","src/lib.rs":"8d73765fea27c9171502c57707801b4afd3fd355cad087a84f523677d2444978"},"package":"6b772017e347561807c1aa192438c5fd74242a670a6cffacc40f2defd1dc069d"}
\ No newline at end of file
deleted file mode 100644
--- a/third_party/rust/version_check/Cargo.toml
+++ /dev/null
@@ -1,24 +0,0 @@
-# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
-#
-# When uploading crates to the registry Cargo will automatically
-# "normalize" Cargo.toml files for maximal compatibility
-# with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g. crates.io) dependencies
-#
-# If you believe there's an error in this file please file an
-# issue against the rust-lang/cargo repository. If you're
-# editing this file be aware that the upstream Cargo.toml
-# will likely look very different (and much more reasonable)
-
-[package]
-name = "version_check"
-version = "0.1.3"
-authors = ["Sergio Benitez <sb@sergio.bz>"]
-description = "Tiny crate to check the version of the installed/running rustc."
-documentation = "https://docs.rs/version_check/"
-readme = "README.md"
-keywords = ["version", "rustc", "minimum", "check"]
-license = "MIT"
-repository = "https://github.com/SergioBenitez/version_check"
-
-[dependencies]
deleted file mode 100644
--- a/third_party/rust/version_check/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-The MIT License (MIT)
-Copyright (c) 2017 Sergio Benitez
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
deleted file mode 100644
--- a/third_party/rust/version_check/README.md
+++ /dev/null
@@ -1,64 +0,0 @@
-# version\_check
-
-This tiny crate checks that the running or installed `rustc` meets some version
-requirements. The version is queried by calling the Rust compiler with
-`--version`. The path to the compiler is determined first via the `RUSTC`
-environment variable. If it is not set, then `rustc` is used. If that fails, no
-determination is made, and calls return `None`.
-
-## Usage
-
-Add to your `Cargo.toml` file:
-
-```toml
-[dependencies]
-version_check = "0.1"
-```
-
-## Examples
-
-Check that the running compiler is a nightly release:
-
-```rust
-extern crate version_check;
-
-match version_check::is_nightly() {
-    Some(true) => "running a nightly",
-    Some(false) => "not nightly",
-    None => "couldn't figure it out"
-};
-```
-
-Check that the running compiler is at least version `1.13.0`:
-
-```rust
-extern crate version_check;
-
-match version_check::is_min_version("1.13.0") {
-    Some((true, version)) => format!("Yes! It's: {}", version),
-    Some((false, version)) => format!("No! {} is too old!", version),
-    None => "couldn't figure it out".into()
-};
-```
-
-Check that the running compiler was released on or after `2016-12-18`:
-
-```rust
-extern crate version_check;
-
-match version_check::is_min_date("2016-12-18") {
-    Some((true, date)) => format!("Yes! It's: {}", date),
-    Some((false, date)) => format!("No! {} is too long ago!", date),
-    None => "couldn't figure it out".into()
-};
-```
-
-## Alternatives
-
-This crate is dead simple with no dependencies. If you need something more and
-don't care about panicking if the version cannot be obtained or adding
-dependencies, see [rustc_version](https://crates.io/crates/rustc_version).
-
-## License
-
-MIT. Have fun!
deleted file mode 100644
--- a/third_party/rust/version_check/src/lib.rs
+++ /dev/null
@@ -1,246 +0,0 @@
-//! This tiny crate checks that the running or installed `rustc` meets some
-//! version requirements. The version is queried by calling the Rust compiler
-//! with `--version`. The path to the compiler is determined first via the
-//! `RUSTC` environment variable. If it is not set, then `rustc` is used. If
-//! that fails, no determination is made, and calls return `None`.
-//!
-//! # Example
-//!
-//! Check that the running compiler is a nightly release:
-//!
-//! ```rust
-//! extern crate version_check;
-//!
-//! match version_check::is_nightly() {
-//!     Some(true) => "running a nightly",
-//!     Some(false) => "not nightly",
-//!     None => "couldn't figure it out"
-//! };
-//! ```
-//!
-//! Check that the running compiler is at least version `1.13.0`:
-//!
-//! ```rust
-//! extern crate version_check;
-//!
-//! match version_check::is_min_version("1.13.0") {
-//!     Some((true, version)) => format!("Yes! It's: {}", version),
-//!     Some((false, version)) => format!("No! {} is too old!", version),
-//!     None => "couldn't figure it out".into()
-//! };
-//! ```
-//!
-//! Check that the running compiler was released on or after `2016-12-18`:
-//!
-//! ```rust
-//! extern crate version_check;
-//!
-//! match version_check::is_min_date("2016-12-18") {
-//!     Some((true, date)) => format!("Yes! It's: {}", date),
-//!     Some((false, date)) => format!("No! {} is too long ago!", date),
-//!     None => "couldn't figure it out".into()
-//! };
-//! ```
-//!
-//! # Alternatives
-//!
-//! This crate is dead simple with no dependencies. If you need something more
-//! and don't care about panicking if the version cannot be obtained or adding
-//! dependencies, see [rustc_version](https://crates.io/crates/rustc_version).
-
-use std::env;
-use std::process::Command;
-
-// Convert a string of %Y-%m-%d to a single u32 maintaining ordering.
-fn str_to_ymd(ymd: &str) -> Option<u32> {
-    let ymd: Vec<u32> = ymd.split("-").filter_map(|s| s.parse::<u32>().ok()).collect();
-    if ymd.len() != 3 {
-        return None
-    }
-
-    let (y, m, d) = (ymd[0], ymd[1], ymd[2]);
-    Some((y << 9) | (m << 5) | d)
-}
-
-// Convert a string with prefix major-minor-patch to a single u64 maintaining
-// ordering. Assumes none of the components are > 1048576.
-fn str_to_mmp(mmp: &str) -> Option<u64> {
-    let mut mmp: Vec<u16> = mmp.split('-')
-        .nth(0)
-        .unwrap_or("")
-        .split('.')
-        .filter_map(|s| s.parse::<u16>().ok())
-        .collect();
-
-    if mmp.is_empty() {
-        return None
-    }
-
-    while mmp.len() < 3 {
-        mmp.push(0);
-    }
-
-    let (maj, min, patch) = (mmp[0] as u64, mmp[1] as u64, mmp[2] as u64);
-    Some((maj << 32) | (min << 16) | patch)
-}
-
-/// Returns (version, date) as available.
-fn version_and_date_from_rustc_version(s: &str) -> (Option<String>, Option<String>) {
-    let mut components = s.split(" ");
-    let version = components.nth(1);
-    let date = components.nth(1).map(|s| s.trim_right().trim_right_matches(")"));
-    (version.map(|s| s.to_string()), date.map(|s| s.to_string()))
-}
-
-/// Returns (version, date) as available.
-fn get_version_and_date() -> Option<(Option<String>, Option<String>)> {
-    env::var("RUSTC").ok()
-        .and_then(|rustc| Command::new(rustc).arg("--version").output().ok())
-        .or_else(|| Command::new("rustc").arg("--version").output().ok())
-        .and_then(|output| String::from_utf8(output.stdout).ok())
-        .map(|s| version_and_date_from_rustc_version(&s))
-}
-
-/// Checks that the running or installed `rustc` was released no earlier than
-/// some date.
-///
-/// The format of `min_date` must be YYYY-MM-DD. For instance: `2016-12-20` or
-/// `2017-01-09`.
-///
-/// If the date cannot be retrieved or parsed, or if `min_date` could not be
-/// parsed, returns `None`. Otherwise returns a tuple where the first value is
-/// `true` if the installed `rustc` is at least from `min_data` and the second
-/// value is the date (in YYYY-MM-DD) of the installed `rustc`.
-pub fn is_min_date(min_date: &str) -> Option<(bool, String)> {
-    if let Some((_, Some(actual_date_str))) = get_version_and_date() {
-        str_to_ymd(&actual_date_str)
-            .and_then(|actual| str_to_ymd(min_date).map(|min| (min, actual)))
-            .map(|(min, actual)| (actual >= min, actual_date_str))
-    } else {
-        None
-    }
-}
-
-/// Checks that the running or installed `rustc` is at least some minimum
-/// version.
-///
-/// The format of `min_version` is a semantic version: `1.3.0`, `1.15.0-beta`,
-/// `1.14.0`, `1.16.0-nightly`, etc.
-///
-/// If the version cannot be retrieved or parsed, or if `min_version` could not
-/// be parsed, returns `None`. Otherwise returns a tuple where the first value
-/// is `true` if the installed `rustc` is at least `min_version` and the second
-/// value is the version (semantic) of the installed `rustc`.
-pub fn is_min_version(min_version: &str) -> Option<(bool, String)> {
-    if let Some((Some(actual_version_str), _)) = get_version_and_date() {
-        str_to_mmp(&actual_version_str)
-            .and_then(|actual| str_to_mmp(min_version).map(|min| (min, actual)))
-            .map(|(min, actual)| (actual >= min, actual_version_str))
-    } else {
-        None
-    }
-}
-
-fn version_channel_is(channel: &str) -> Option<bool> {
-    get_version_and_date()
-        .and_then(|(version_str_opt, _)|  version_str_opt)
-        .map(|version_str| version_str.contains(channel))
-}
-
-/// Determines whether the running or installed `rustc` is on the nightly
-/// channel.
-///
-/// If the version could not be determined, returns `None`. Otherwise returns
-/// `Some(true)` if the running version is a nightly release, and `Some(false)`
-/// otherwise.
-pub fn is_nightly() -> Option<bool> {
-    version_channel_is("nightly")
-}
-
-/// Determines whether the running or installed `rustc` is on the beta channel.
-///
-/// If the version could not be determined, returns `None`. Otherwise returns
-/// `Some(true)` if the running version is a beta release, and `Some(false)`
-/// otherwise.
-pub fn is_beta() -> Option<bool> {
-    version_channel_is("beta")
-}
-
-/// Determines whether the running or installed `rustc` is on the dev channel.
-///
-/// If the version could not be determined, returns `None`. Otherwise returns
-/// `Some(true)` if the running version is a dev release, and `Some(false)`
-/// otherwise.
-pub fn is_dev() -> Option<bool> {
-    version_channel_is("dev")
-}
-
-/// Determines whether the running or installed `rustc` supports feature flags.
-/// In other words, if the channel is either "nightly" or "dev".
-///
-/// If the version could not be determined, returns `None`. Otherwise returns
-/// `Some(true)` if the running version supports features, and `Some(false)`
-/// otherwise.
-pub fn supports_features() -> Option<bool> {
-    match is_nightly() {
-        b@Some(true) => b,
-        _ => is_dev()
-    }
-}
-
-#[cfg(test)]
-mod tests {
-    use super::version_and_date_from_rustc_version;
-    use super::str_to_mmp;
-
-    macro_rules! check_mmp {
-        ($string:expr => ($x:expr, $y:expr, $z:expr)) => (
-            if let Some(mmp) = str_to_mmp($string) {
-                let expected = $x << 32 | $y << 16 | $z;
-                if mmp != expected {
-                    panic!("{} didn't parse as {}.{}.{}.", $string, $x, $y, $z);
-                }
-            } else {
-                panic!("{} didn't parse for mmp testing.", $string);
-            }
-        )
-    }
-
-    macro_rules! check_version {
-        ($s:expr => ($x:expr, $y:expr, $z:expr)) => (
-            if let (Some(version_str), _) = version_and_date_from_rustc_version($s) {
-                check_mmp!(&version_str => ($x, $y, $z));
-            } else {
-                panic!("{} didn't parse for version testing.", $s);
-            }
-        )
-    }
-
-    #[test]
-    fn test_str_to_mmp() {
-        check_mmp!("1.18.0" => (1, 18, 0));
-        check_mmp!("1.19.0" => (1, 19, 0));
-        check_mmp!("1.19.0-nightly" => (1, 19, 0));
-        check_mmp!("1.12.2349" => (1, 12, 2349));
-        check_mmp!("0.12" => (0, 12, 0));
-        check_mmp!("1.12.5" => (1, 12, 5));
-        check_mmp!("1.12" => (1, 12, 0));
-        check_mmp!("1" => (1, 0, 0));
-    }
-
-    #[test]
-    fn test_version_parse() {
-        check_version!("rustc 1.18.0" => (1, 18, 0));
-        check_version!("rustc 1.8.0" => (1, 8, 0));
-        check_version!("rustc 1.20.0-nightly" => (1, 20, 0));
-        check_version!("rustc 1.20" => (1, 20, 0));
-        check_version!("rustc 1.3" => (1, 3, 0));
-        check_version!("rustc 1" => (1, 0, 0));
-        check_version!("rustc 1.2.5.6" => (1, 2, 5));
-        check_version!("rustc 1.5.1-beta" => (1, 5, 1));
-        check_version!("rustc 1.20.0-nightly (d84693b93 2017-07-09)" => (1, 20, 0));
-        check_version!("rustc 1.20.0 (d84693b93 2017-07-09)" => (1, 20, 0));
-        check_version!("rustc 1.20.0 (2017-07-09)" => (1, 20, 0));
-        check_version!("rustc 1.20.0-dev (2017-07-09)" => (1, 20, 0));
-    }
-}