Prepare for being included via crates.io into std
This commit prepares the `libc` crate to be included directly into the
standard library via crates.io. More details about this can be found on
rust-lang/rust#56092, but the main idea is that this crate now depends
on core/compiler-builtins explicitly (but off-by-default).
The main caveat here is that this activates `no_core` when building as
part of libstd, which means that it needs to explicitly have an `iter`
and `option` module for the expansion of `for` loops to work.
This commit prepares the `libc` crate to be included directly into the
standard library via crates.io. More details about this can be found on
rust-lang/rust#56092, but the main idea is that this crate now depends
on core/compiler-builtins explicitly (but off-by-default).
The main caveat here is that this activates `no_core` when building as
part of libstd, which means that it needs to explicitly have an `iter`
and `option` module for the expansion of `for` loops to work.
Factor out platforms for which libc is empty
This change shouldn't change any functionality. It just separates the platforms for which `libc` is currently empty (only `wasm32-unknown-unknown`), from those for which it isn't. This is a non-functional change.
Use OR in the license field
According to [The Manifest Format](https://doc.rust-lang.org/cargo/reference/manifest.html):
>Multiple licenses can be separated with a `/`, although that usage is deprecated. Instead, use a license expression with AND and OR operators to get more explicit semantics.
Linux 4.18 added support for SIGSYS info in signalfd. Add the new
fields to signalfd_siginfo.
While the kernel has support for these new fields now, no libc has
shipped a release with the new signalfd fields.
Add F_RDLCK/F_WRLCK/F_UNLCK to several platforms
These are used by the flock wrapper in rustc_data_structures. The constants were already present in x86_64-linux-gnu and BSD (since 4928bd9869).
Currently the `flock` wrapper in `rustc_data_structures` does not work on several 32-bit musl targets, because they expect the `LARGEFILE64` version of the `F_SETLK`/`F_SETLKW` constants. This PR is a prerequisite to converting that code to use the `libc` types and constants, instead of (inaccurately) duplicating them, since `libc` already provides architecture-specific definitions of the relevant constants.