This commit adds the functions:-
- syslog
- openlog
- closelog
- setlogmask
It adds LOG_* constants.
It adds the CODE struct used by the #define definitions prioritynames and facilitynames.
It does not add:-
- the function vsyslog; this is an extension to POSIX and uses va_list macros;
- the #defines prioritynames and facilitynames, as usage is not common
- rust functions mirroring the macros:-
- LOG_PRI
- LOG_MAKEPRI
- LOG_MASK
- LOG_UPTO
- LOG_FAC
* CODE is included in case a third-party unsafe C function returns or takes it.
OS X: add various process status tests defined by wait.h
Adds the various process test macros specified in the wait(2) manpage on OS X. ```WCOREDUMP``` is implemented BSD-wide as it seems to be the only macro whose definition is constant across the BSDs.
linux: Add prlimit(2) and prlimit64(2)
As with `getrlimit` and `setrlimit`, the glibc wrappers have a non-`int`
for the `resource` argument, eg:
extern int prlimit (__pid_t __pid, enum __rlimit_resource __resource,
const struct rlimit *__new_limit,
struct rlimit *__old_limit) __THROW;
As with `getrlimit` and `setrlimit`, the glibc wrappers have a non-`int`
for the `resource` argument, eg:
extern int prlimit (__pid_t __pid, enum __rlimit_resource __resource,
const struct rlimit *__new_limit,
struct rlimit *__old_limit) __THROW;
notbsd: Deduplicate definitions
A bunch of definitions were duplicated across, eg, android and linux.
This commit pulls these up to higher levels where they can be shared.
in order to advise contributors to locally test their patches.
Also update ctest to include a fix on rerun-if-changed so that human
developers doing trial & error can properly test their latest code.
Signed-off-by: NODA, Kai <nodakai@gmail.com>
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>