Commit Graph

2739 Commits

Author SHA1 Message Date
Vitaly _Vi Shukela
486de2ba2b
Ignore IP_ORIGDSTADDR in test for FreeBSD for now. 2019-02-14 02:37:01 +03:00
bors
9a9e2e05c9 Auto merge of #1258 - gnzlbg:docs, r=gnzlbg
Re-enable debug output in dox.sh and remove unused variable in runtest
2019-02-13 19:37:39 +00:00
bors
6153363964 Auto merge of #1253 - gnzlbg:update-ctest, r=gnzlbg
Always use the latest ctest
2019-02-13 18:01:43 +00:00
gnzlbg
a423d87417 Re-enable debug output in dox.sh and remove unused variable in runtest 2019-02-13 18:04:10 +01:00
Vitaly _Vi Shukela
3e3b60e986
Add IP_ORIGDSTADDR and others on FreeBSD.
A follow-up from #1252.

CC @asomers.

r? @gnzlbg.
2019-02-13 19:54:48 +03:00
bors
d7952a55ac Auto merge of #1255 - gnzlbg:android_fail, r=gnzlbg
Temporarily allow Android build jobs to fail

These are still too brittle for some reason.
2019-02-13 16:44:11 +00:00
bors
66d96b98ea Auto merge of #1254 - gnzlbg:dox_cleanup, r=gnzlbg
Clean up documentation generation
2019-02-13 15:47:08 +00:00
Vincent Dagonneau
c4922c368a Moved inotify declarations up so that it works on android too. 2019-02-13 16:31:43 +01:00
gnzlbg
65a00c3915 Temporarily allow Android build jobs to fail 2019-02-13 16:15:21 +01:00
gnzlbg
597d612164 Bump libc version 2019-02-13 14:48:50 +01:00
gnzlbg
83298283c7 Generate a proper landing page for the master docs 2019-02-13 14:48:50 +01:00
gnzlbg
7ac0fe53eb Cleanup dox mess 2019-02-13 14:48:50 +01:00
bors
a8a817a028 Auto merge of #1252 - vi:ORIGDSTADDR, r=gnzlbg
Add IP[V6]_[RECV]ORIGDSTADDR for Linux and Android
2019-02-13 10:27:58 +00:00
gnzlbg
c1e0a3f3b1 Always use the latest ctest 2019-02-12 18:34:56 +01:00
bors
810b8c6a84 Auto merge of #1251 - jasonbking:solarish-sq, r=gnzlbg
Add support for illumos target

This change adds support for an illumos os target to libc.  Similar to the BSDs, there is a large deal of overlap (given the common history), so the 'solaris' directory was renamed to 'solarish' (it's the closest thing to an official term to refer to things descending from Solaris as well as Solaris).  There were also a number of missing definitions (as well as a couple missing functions) that have proved necessary for building a number of rust programs on illumos or Solaris.

Portions contributed by @papertigers .
2019-02-12 15:52:52 +00:00
bors
d6977c827e Auto merge of #1250 - gnzlbg:removeppc, r=gnzlbg
Do not allow rustup to fail

Currently if rustup fails to download something the build will continue until that something is needed. This makes the job fail early and clearly.
2019-02-12 09:31:10 +00:00
Jason King
821fd8a9dd Fix style 2019-02-12 02:28:17 +00:00
Vitaly _Vi Shukela
4d0694ce0b
Add IP[V6]_[RECV]ORIGDSTADDR for Linux and Android 2019-02-12 04:20:31 +03:00
Jason King
0b488bf94b Only disable rustfmt style checl 2019-02-12 00:32:58 +00:00
Jason King
4ec33ade65 Disable rustfmt bot due to rust-lang/rustfmt#3341 2019-02-12 00:13:48 +00:00
Jason King
9638d0dee0 Rename solaris dir to solarish to indicate it's including both Solaris
and Solaris-derived distributions (i.e. illumos).  In addition, a number
of missing definitions (and compatability functions) that have been
found necessary to run a number of rust binaries on illumos have been
added.

Portions were contributed by Mike Zeller <mike@mikezeller.net>
2019-02-11 21:38:30 +00:00
gnzlbg
4a56c47a17 Increase the number of retries for curl 2019-02-09 18:22:35 +01:00
gnzlbg
d42ef14eba Retry rustup target add 3 times 2019-02-09 17:54:52 +01:00
gnzlbg
a7674aa428 Do not allow rustup to fail 2019-02-09 13:59:29 +01:00
bors
34f1c30de2 Auto merge of #1241 - semarie:openbsd-rfc2235, r=gnzlbg
unbreak openbsd after #1217
2019-02-09 10:43:10 +00:00
bors
ed160db4b3 Auto merge of #1249 - arnavb:patch-1, r=gnzlbg
Fix license badge
2019-02-09 08:23:45 +00:00
Sébastien Marie
c408759161 unbreak openbsd after #1217 2019-02-09 07:15:18 +01:00
Arnav Borborah
152fd7e6d2
Fix license badge 2019-02-08 20:22:24 -05:00
David Holroyd
d3c0eec149 Remove struct which is now a duplicate 2019-02-08 23:18:16 +00:00
David Holroyd
d6310d63b3 Qualify type name 2019-02-08 23:18:16 +00:00
David Holroyd
250aa2496a openbsd doesn't have mmsghdr either! 2019-02-08 23:18:02 +00:00
David Holroyd
d676d6e97a dragonflybsd lacks sendmmsg()/recvmsg() 2019-02-08 23:05:01 +00:00
Benjamin Saunders
b59eb6b423 Expose IPV6_FLOW* on Linux 2019-02-08 12:50:25 -08:00
David Holroyd
80f1b51ac0 openbsd lacks sendmmsg()/recvmmsg() 2019-02-08 19:14:06 +00:00
David Holroyd
b8b510b734 freebsd timespec is const 2019-02-08 19:14:06 +00:00
David Holroyd
ad1bd7eb85 Match the freebsd types 2019-02-08 19:14:06 +00:00
David Holroyd
c6f899c3c1 Remove duplicate definition 2019-02-08 19:14:06 +00:00
David Holroyd
d26c2ab8c2 timespec pointer also const on andriod 2019-02-08 19:14:06 +00:00
David Holroyd
a4c25a99e4 Push definitions down a level to avoid macos
I guess the previous lint failure was about avoiding #[cfg], and doing
this instead.
2019-02-08 19:14:06 +00:00
David Holroyd
91639b6bc8 Use cfg_attr like other items 2019-02-08 19:14:06 +00:00
David Holroyd
eff3d81138 Fix wrong C type name 2019-02-08 19:14:06 +00:00
David Holroyd
4036d6cb98 mmsghdr pointer is const in android I think 2019-02-08 19:14:06 +00:00
David Holroyd
8fe9d252b0 Qualify type names 2019-02-08 19:14:06 +00:00
David Holroyd
0b14c2cfaf Not available on macos I think 2019-02-08 19:14:06 +00:00
David Holroyd
bc224d976b Hoist {send,recv}mmsg() to test target support
Will likely alter this after seeing CI results across platforms.
2019-02-08 19:14:06 +00:00
bors
ff97bdb074 Auto merge of #1247 - gnzlbg:build_all_platforms, r=gnzlbg
Build all platforms

cc @alexcrichton this needs a more thorough review. It turns out libc failed to build on a lot of older Rust versions for various reasons and platforms, so it took a while to fix the build on all of them.
2019-02-08 17:45:38 +00:00
gnzlbg
5c796c5897 Align Rust-version support table of the README 2019-02-07 20:06:50 +01:00
gnzlbg
ca12725dbf Document platform support in the README 2019-02-07 13:44:32 +01:00
gnzlbg
a17a91cdbf Fix build on all platforms
This PR fixes the build on all platforms and all Rust version down to the
minimum Rust version supported by libc: Rust 1.13.0.

The `build.rs` is extended with logic to detect the newer Rust features used by
`libc` since Rust 1.13.0:

* Rust 1.19.0: `untagged_unions`. APIs using untagged unions are gated on
  `cfg(libc_unions)` and not available on older Rust versions.

* Rust 1.25.0: `repr(align)`. Because `repr(align)` cannot be parsed by older
  Rust versions, all uses of `repr(align)` are split into `align.rs` and
  `no_align.rs` modules, which are gated on the `cfg(libc_align)` at the top
  level. These modules sometimes contain macros that are expanded at the top
  level to avoid privacy issues (`pub(crate)` is not available in older Rust
  versions). Closes #1242 .

* Rust : `const` `mem::size_of`. These uses are worked around with hardcoded
  constants on older Rust versions.

Also, `repr(packed)` structs cannot automatically `derive()` some traits like
`Debug`. These have been moved into `s_no_extra_traits!` and the lint of missing
`Debug` implementations on public items is silenced for these. We can manually
implement the `extra_traits` for these in a follow up PR. This is tracked
in #1243. Also, `extra_traits` does not enable `align` manually anymore.

Since `f64::to_bits` is not available in older Rust versions, its usage
has been replaced with a `transmute` to an `u64` which is what that method
does under the hood.

Closes #1232 .
2019-02-07 13:44:32 +01:00
gnzlbg
8f1acf4643 Build all platforms in CI
This commit adds a `ci/build.sh` script that checks that libc builds correctly
for some common configurations (`--no-default-features`, `default`,
`extra_traits`) on most targets supported by Rust since Rust 1.13.0 (the oldest
Rust version that libc supports).

The build matrix is refactored into two stages.

The first stage is called `tools-and-build-and-tier1` and it aims to discover
issues quickly by running the documentation and linter builds, as well as
checking that the library builds correctly on all targets in all supported
channels and "problematic" Rust versions; Rust versions adding major new
features like `repr(align)`, `union`, etc. This first stage also runs
libc-test for the tier-1 targets on linux and osx. These builds finish
quickly because no emulation is necessary.

The second stage is called `tier2` and it runs libc-test for all other targets
for which we are currently able to do so.

Closes #1229 .
2019-02-07 13:44:32 +01:00