Improve newlib constants
This is necessary to set socket options on the Nintendo Switch, which uses a socket implementation directly ported from FreeBSD. Reopened from #1334 because I accidentally closed that.
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 .
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 .