Add support for arm-unknown-linux-musleabi{,hf} targets.
These targets will be similar to the x86_64-unknown-linux-musl
target, in that they'll use MUSL libc to allow fully static binaries
to be generated. To remain consistent with the naming of existing
ARM targets, as well as with the standard naming of MUSL toolchains,
we'll use `musleabi` and `musleabihf` as the target environment
names (analogous to `gnueabi` and `gnueabihf`).
Most of these changes just extend the special casing for x86_64 MUSL
targets to the ARM ones as well.
These targets will be similar to the x86_64-unknown-linux-musl
target, in that they'll use MUSL libc to allow fully static binaries
to be generated. To remain consistent with the naming of existing
ARM targets, as well as with the standard naming of MUSL toolchains,
we'll use `musleabi` and `musleabihf` as the target environment
names (analogous to `gnueabi` and `gnueabihf`).
Most of these changes just extend the special casing for x86_64 MUSL
targets to the ARM ones as well.
Use now available link name "signal" instead of "bsd_signal"
On android, the `bsd_signal` is gone, the `signal` is available.
While this is the most obvious solution, I am not sure of a few things:
- How are we going to keep compatibility with older NDKs where `signal` does not exist;
- Was something dependent on this being different on android and thus would break (for example, the rust compiler uses this function, so it may break somewhere).
Fixes#236.
There are many constants defined by langinfo, but we have the
new types, locale_t and nl_item.
We also have several functions, not all of which exist for every
platform:
nl_langinfo
nl_langinfo_l
newlocale
duplocale
freelocale
uselocale
querylocale
Link to libraries when disabling `use_std`
This crate currently relies on libraries being linked to come from libstd, but
if `use_std` is disabled that's not true! In that case we need to pull in the
libraries ourselves.
Closesrust-lang/rust#32661
This crate currently relies on libraries being linked to come from libstd, but
if `use_std` is disabled that's not true! In that case we need to pull in the
libraries ourselves.
Closesrust-lang/rust#32661
On non-musl Linux, strerror_r should be linked to __xpg_strerror_r
Currently `libc::strerror_r()` wrongly returns a `c_char` pointer as a large `c_int`.
Also exclude `MS_RMT_MASK` from `libc-test`.
It was updated recently, so the test is known to fail depending on the
libc version of the test environment.
Signed-off-by: NODA, Kai <nodakai@gmail.com>
unix: Add openpty(3) and forkpty(3) for non-Apple platforms
The functions were added for Apple in #202. Adding them to other
platforms was pending an amendment to RFC 1291 to expand the scope of
libc to include libutil. The amendment was merged as
https://github.com/rust-lang/rfcs/pull/1529
The functions were added for Apple in #202. Adding them to other
platforms was pending an amendment to RFC 1291 to expand the scope of
libc to include libutil. The amendment was merged as
https://github.com/rust-lang/rfcs/pull/1529
Linux-likes have more locale categories than the BSDs (except for
musl). We define the common set of categories at the
src/unix/notbsd/mod.rs level, and leave the rest to the
platform-specific modules.