This fixes issue #1318 - on Solarish systems __posix_readdir_r is only
defined for 32-bit Solarish targets. Since rust doesn't currently support 32-bit Solarish targets, the line is both unnecessary and wrong.
As found with the latest fd binary, removing the line fixed the fd build (and fd then works as expected).
redox: support crt-static
This reuses the code from musl to add support to Redox for crt-static.
Linking to `m` is also unnecessary as it is included in `c`
Add mq_getfd_np() on FreeBSD and fix mqd_t on DragonFlyBSD
[`mq_getfd_np()` was added in FreeBSD 11](https://svnweb.freebsd.org/base/stable/11/include/mqueue.h?revision=306905&view=markup). I'm already using it in my [posixmq crate](https://github.com/tormol/posixmq) for mio/kqueue integration, and I've tested it both in virtualbox and on Cirrus-CI.
[`mqd_t` in an `int` on DragonFlyBSD](e7ab884bd4/sys/sys/types.h (L139)) even though it's a pointer on FreeBSD, because [DragonflyBSD's implementation is based on NetBSD](f2df0f7ca6). The definitions for `mq_attr` are already separate and correct.
Does fixing this count as a breaking change? I think the current definition will work in most cases, because IIRC the calling convention means that `mqd_t` is always passed via registers, the upper 32 bits might just contain garbage.
I've *not* tested this change on DragonFlyBSD.
I want to add mq symbols for solarish, but is the CDDL license compatible with Apache-2.0 and MIT?
Add intial support for wasm32-unknown-wasi
This target is [being proposed][LINK] int he rust-lang/rust repository
and this is intended to get coupled with that proposal. The definitions
here all match the upstream reference-sysroot definitions and the
functions all match the reference sysroot as well. The linkage here is
described more in detail on the Rust PR itself, but in general it's
similar to musl.
Automatic verification has been implemented in the same manner as other
targets, and it's been used locally to develop this PR and catch errors
in the bindings already written (also to help match the evolving sysroot
of wasi). The verification isn't hooked up to CI yet though because
there is no wasi target distributed via rustup just yet, but once that's
done I'll file a follow-up PR to execute verification on CI.
[LINK]: https://github.com/rust-lang/rust/pull/59464
This target is [being proposed][LINK] int he rust-lang/rust repository
and this is intended to get coupled with that proposal. The definitions
here all match the upstream reference-sysroot definitions and the
functions all match the reference sysroot as well. The linkage here is
described more in detail on the Rust PR itself, but in general it's
similar to musl.
Automatic verification has been implemented in the same manner as other
targets, and it's been used locally to develop this PR and catch errors
in the bindings already written (also to help match the evolving sysroot
of wasi). The verification isn't hooked up to CI yet though because
there is no wasi target distributed via rustup just yet, but once that's
done I'll file a follow-up PR to execute verification on CI.
[LINK]:
Add essential target_vendor check for sgx
As discussed in issue [57231](https://github.com/rust-lang/rust/issues/57231), the current `sgx` branch only works for Fortanix's sgx platform. So the `target_vendor` should be checked here.
Signed-off-by: Yu Ding <dingelish@gmail.com>
add HermitCore support even if it doesn't have a UNIX interface
Currently, we redefine the interface between the HermitCore kernel (https://hermitcore.org) and Rust’s standard library. In the future, it will not depend on a POSIX-compatible C library. Consequently, we add the support of HermitCore if the "unix" environment isn’t set. It will be great to integrate this patch because it would simplify our development. The classical interface is still supported and part of the subdirectory "unix".