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.
Also move F_DUPFD_CLOEXEC up a level as it is available on Android.
This commit leaves file sealing related fcntls and bitflag constants
out, as they are defined in `linux/fcntl.h` rather than `fcntl.h`. They
can be included once an approach for verification has been figured out.
See #235 for more detail.