| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes:
* Add kqueue1 to NetBSD
* Add Android items from "sys/system_properties.h"
* Add new header to the android header files list
* Add dl_iterate_phdr to Android
* Update dl_phdr_info definition to more closely match header files
* linux: add syncfs(2)
* Add macos clonefile functions
* Add RLIM_NLIMITS constant as alias of RLIMIT_NLIMITS on linux_like
* Add RLIM_NLIMITS on android
* Unified Linux TCP socket options
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Allow developers to start using ip_mreqn in Fuchsia.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
This includes changes which will allow us to successfully build `libstd` for the PSP.
|
|
|
|
|
| |
This incorporates the changes needed to cross-compile `rustc` for the
aarch64-apple-darwin target.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Includes bindings for the libc function gmtime_s.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add support for making functions `const`
PR https://github.com/rust-lang/rust/pull/64906 adds the ability to write `const extern fn` and `const unsafe extern fn`, which will allow manys functions in `libc` to become `const`.
This is particuarly useful for functions which correspond to C macros (e.g. `CMSG_SPACE`). In C, these macros are constant expressions, allowing them to be used when declaring arrays. However, since the corresponding `libc` functions are not `const`, writing equivalent Rust code is impossible. Users must either perform an unecessary heap allocation, or pull in `bindgen` to evaluate the macro for specific values (e.g. `CMSG_SPACE(1)`).
However, the syntax `const extern fn` is not currently parsed by rust. To allow libc to use this without breaking backwards compatibility (i.e. bumping the minimum Rust version), I've taken the following approach:
1. A new off-by-default feature `extern-const-fn` is added to `libc`.
2. The internal `f!` macro has two versions, selected at compile-time by a `cfg_if`. When `extern-const-fn` is enabled, the declared `f!` macro passes through the `const` keyword from the macro user to the final definition (`pub const unsafe extern fn foo`. When `extern-const-fn` is disabled, the `const` keyword passed by the macro user is discarded, resulting in a plain `pub extern const fn` being declared.
Unfortunately, I couldn't manage to get `macro_rules` to accept a normal `const` token in the proper place (after `pub`). I had to resort to placing it in curly brackets:
```rust
pub {const} fn foo(val: u8) -> i8 {
}
```
The `f!` macro then translates this to a function definition with `const` in the proper position.
I'd appreciate it if someone who's more familiar with `macro_rules!` could see if I missed a way to get the desired syntax.
|
| |
| |
| |
| |
| | |
Add a new feature to enable this, since `const extern fn`
support is unstable
|
|/ |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| | |
Bump version to 0.2.61
Releasing a version now will allow Redox compilation to work again, as it will include #1438
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Related to #657 .
|
| |
|
| |
|
|
|
|
|
|
|
| |
This adds more WASI support, and in particular adds support for WASI
being a target_os rather than a target_env, which relates to this PR:
https://github.com/rust-lang/rust/pull/60117
|
| |
|
| |
|