Commit graph

123 commits

Author SHA1 Message Date
Guillaume Gomez 1e7e5f303b Upgrade crate version to 0.2.86 2021-02-08 09:36:13 +01:00
Amanieu d'Antras cb8339ee17 Bump to 0.2.85 2021-02-02 04:42:59 +00:00
Thiébaud Weksteen 71d3bf109e Bump to 0.2.84 2021-01-28 14:37:30 +01:00
Sébastien Marie 0e09138dc2 Bump to 0.2.83 2021-01-18 15:55:29 +00:00
Sam Balana 11577ea7c4
Bump to 0.2.82
Allow developers to start using ip_mreqn in Fuchsia.
2020-12-28 11:28:13 -08:00
Yuki Okushi 6ea4b3134d Prepare to release 0.2.81 2020-12-07 02:24:35 +09:00
Yuki Okushi 2854518a62 Release 0.2.80 2020-10-26 04:18:54 +09:00
Josh Triplett 1818abfb31 libc 0.2.79 2020-10-04 22:08:59 -07:00
Josh Triplett e3312f5a5c libc 0.2.78 2020-09-30 20:59:54 -07:00
Daniil Bondarev 5abf641f31 Bump up to 0.2.77 2020-08-24 21:28:06 -07:00
Yuki Okushi d806e942a8
Bump up to 0.2.76 2020-08-20 15:50:24 +09:00
Josh Triplett e1e8c4e0ea libc 0.2.75 2020-08-18 17:38:31 -07:00
Glenn Hope c323e1010e
Bump version to 0.2.74
This includes changes which will allow us to successfully build `libstd` for the PSP.
2020-07-27 16:36:19 -07:00
Jake Goulding 21cbd9c3be Bump to 0.2.73
This incorporates the changes needed to cross-compile `rustc` for the
aarch64-apple-darwin target.
2020-07-19 08:35:26 -04:00
Andrew Walbran 04caf38005 Bump version ready to import into Android tree. 2020-07-02 17:33:23 +01:00
Jeremy Soller 6ad21fb13a
Bump version to 0.2.71 2020-05-21 14:42:33 -06:00
Tom Eccles 88cfeb1a4c Bump version to 0.2.70 2020-05-12 10:58:51 +01:00
Alexander Batischev 8e9422095b Bump version to 0.2.69 2020-04-13 17:46:54 +03:00
Andre Nathan 80e4b5e59a Bump version to 0.2.68 2020-03-13 08:30:38 -03:00
Yuki Okushi b1a1aa2b0e
Update badges metadata on Cargo.toml 2020-03-11 03:45:33 +09:00
Noah Gold e4494e49d7 Bump to 0.2.67.
Includes bindings for the libc function gmtime_s.
2020-02-20 10:02:14 -08:00
gnzlbg 4f11029a68 Bump patch version to 0.2.66 2019-11-29 13:21:20 +01:00
bors d742eedf90 Auto merge of #1536 - Aaron1011:feature/const-fn, r=gnzlbg
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.
2019-11-18 19:37:32 +00:00
Aaron Hill 5dfc2c8285
Add support for declaring 'const fn'
Add a new feature to enable this, since `const extern fn`
support is unstable
2019-10-27 20:59:38 -04:00
gnzlbg 13d4a5da2e Bump patch version to 0.2.65 2019-10-18 10:16:58 +02:00
gnzlbg 1dd09fbbe6 Update Cargo.toml to 0.2.64 2019-08-20 15:00:05 +02:00
Wang Xuerui 435cdeeec8
Bump version to 0.2.63 2019-08-17 10:25:51 +08:00
gnzlbg eb9f523e65 Update minor patch version to 0.2.62 2019-08-14 17:34:45 +02:00
bors d279176458 Auto merge of #1458 - jackpot51:patch-1, r=gnzlbg
Bump version to 0.2.61

Releasing a version now will allow Redox compilation to work again, as it will include #1438
2019-08-12 09:13:34 +00:00
Jeremy Soller 063d7ac340
Bump version to 0.2.61 2019-08-06 16:41:01 -06:00
gnzlbg 9f153e971a Patch mingw libraries for windows gnu targets 2019-07-27 13:25:22 +02:00
gnzlbg c8aa8ec72d Bump patch version to 0.2.60 2019-07-15 10:51:47 +02:00
gnzlbg 84c984ddb0 Bump patch version 2019-07-08 09:27:45 +02:00
gnzlbg 5f7600c137 Bump patch version to 0.2.58 2019-06-02 10:32:35 +02:00
gnzlbg e07cd949b0 Bump patch version to 0.2.57 2019-05-31 15:22:58 +02:00
gnzlbg 558d892c43 Bump libc version to 0.2.56 2019-05-28 18:19:35 +02:00
gnzlbg 4ac26afa83 Deprecate use_std cargo feature: use std instead .
Related to #657 .
2019-05-24 13:22:03 +02:00
Jeremy Soller 81dcf4c0ef
Bump version to 0.2.55 2019-05-16 06:53:06 -06:00
gnzlbg 3231740da4 Bump patch version to 0.2.54 2019-05-02 18:33:25 +02:00
Dan Gohman 6ec8c23e5e Bump to 0.2.53
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
2019-04-26 00:21:50 -07:00
Jeremy Soller 7454238394
Bump to 0.2.52 2019-04-19 17:38:03 -06:00
Alex Crichton c8d6d546aa Bump to 0.2.51 2019-03-28 06:31:54 -07:00
leo60228 e2785de85d Bump libc version 2019-03-04 18:03:29 -05:00
gnzlbg 597d612164 Bump libc version 2019-02-13 14:48:50 +01:00
gnzlbg a17a91cdbf Fix build on all platforms
This PR fixes the build on all platforms and all Rust version down to the
minimum Rust version supported by libc: Rust 1.13.0.

The `build.rs` is extended with logic to detect the newer Rust features used by
`libc` since Rust 1.13.0:

* Rust 1.19.0: `untagged_unions`. APIs using untagged unions are gated on
  `cfg(libc_unions)` and not available on older Rust versions.

* Rust 1.25.0: `repr(align)`. Because `repr(align)` cannot be parsed by older
  Rust versions, all uses of `repr(align)` are split into `align.rs` and
  `no_align.rs` modules, which are gated on the `cfg(libc_align)` at the top
  level. These modules sometimes contain macros that are expanded at the top
  level to avoid privacy issues (`pub(crate)` is not available in older Rust
  versions). Closes #1242 .

* Rust : `const` `mem::size_of`. These uses are worked around with hardcoded
  constants on older Rust versions.

Also, `repr(packed)` structs cannot automatically `derive()` some traits like
`Debug`. These have been moved into `s_no_extra_traits!` and the lint of missing
`Debug` implementations on public items is silenced for these. We can manually
implement the `extra_traits` for these in a follow up PR. This is tracked
in #1243. Also, `extra_traits` does not enable `align` manually anymore.

Since `f64::to_bits` is not available in older Rust versions, its usage
has been replaced with a `transmute` to an `u64` which is what that method
does under the hood.

Closes #1232 .
2019-02-07 13:44:32 +01:00
Bryant Mairs 868a85d05d Implement PartialEq,Eq for all types 2019-02-02 13:06:58 -08:00
gnzlbg 9148ae9023 Bump to 0.2.48 2019-01-23 14:14:01 +01:00
Jeremy Soller 84d3147354
Bump version to 0.2.47 2019-01-14 08:07:57 -07:00
John Paul Adrian Glaubitz 11d1a181d2 Bump version to 0.2.46 2019-01-02 21:00:19 +01:00
Alex Crichton dfb9579acc Fix build on x86_64-unknown-cloudabi, bump version 2018-12-09 19:32:01 -08:00