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.
Pull sockaddr_nl up a layer as it is present for Android
The addition of sockaddr_nl seems to be a fairly recent
addition to bionic, although it would appear that its lack
of presence in previous versions is more of an oversight than
anything else.
831c8a5249/libc/kernel/uapi/linux/netlink.h (L54)
The addition of sockaddr_nl seems to be a fairly recent
addition to bionic, although it would appear that its lack
of presence in previous versions is more of an oversight than
anything else.
831c8a5249/libc/kernel/uapi/linux/netlink.h (L54)
This change is motivated by failures to build nix under Android.
Signed-off-by: Paul Osborne <osbpau@gmail.com>
Make cfg_if uses more explicit and consistent
This commit changes most uses of cfg_if as follows:
- fallthrough `else` usage is avoided for architecture or OS specific
items
- a comment is added in the final `else` clause to signal intent someone
modifying
It is safer to omit items than include ones for the wrong platform or
architecture.
This commit changes most uses of cfg_if as follows:
- fallthrough `else` usage is avoided for architecture or OS specific
items
- a comment is added in the final `else` clause to signal intent someone
modifying
It is safer to omit items than include ones for the wrong platform or
architecture.