Skip to content

Commit ac9b6c4

Browse files
authored
Merge pull request #4073 from tgross35/backport-rutabega
[0.2] Backports
2 parents ad61e61 + 5d234d2 commit ac9b6c4

File tree

4 files changed

+51
-20
lines changed

4 files changed

+51
-20
lines changed

CONTRIBUTING.md

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,43 @@
33
Welcome! If you are reading this document, it means you are interested in
44
contributing to the `libc` crate.
55

6-
## v0.2 changes
6+
## v1.0 Roadmap
77

8-
If you want to add your changes to v0.2, please submit them to the `libc-0.2`
9-
branch. If you want to add any breaking changes, it should be submitted to the
10-
main branch, which has changes for v0.3. We will support and make a new release
11-
for v0.2 until we make the first release of v0.3.
8+
`libc` has two active branches: `main` and `libc-0.2`. `main` is for active
9+
development of the upcoming v1.0 release, and should be the target of all pull
10+
requests. `libc-0.2` is for updates to the currently released version.
11+
12+
If a pull request to `main` is a good candidate for inclusion in an `0.2.x`
13+
release, include `@rustbot label stable-nominated` in a comment to propose this.
14+
Good candidates will usually meet the following:
15+
16+
1. The included changes are non-breaking.
17+
2. The change applies cleanly to both branches.
18+
3. There is a usecase that justifies inclusion in a stable release (all
19+
additions should always have a usecase, hopefully).
20+
21+
Once a `stable-nominated` PR targeting `main` has merged, it can be cherry
22+
picked to the `libc-0.2` branch. A maintainer will likely do these cherry picks
23+
in a batch.
24+
25+
Alternatively, you can start this process yourself by creating a new branch
26+
based on `libc-0.2` and running `git cherry-pick -xe commit-sha-on-main`
27+
(`git
28+
cherry-pick -xe start-sha^..end-sha` if a range of commits is needed).
29+
`git` will automatically add the "cherry picked from commit" note, but try to
30+
add a backport note so the original PR gets crosslinked:
31+
32+
```
33+
# ... original commit message ...
34+
35+
(backport <https://github.com/rust-lang/libc/pull/1234>) # add manually
36+
(cherry picked from commit 104b6a4ae31c726814c36318dc718470cc96e167) # added by git
37+
```
38+
39+
Once the cherry-pick is complete, open a PR targeting `libc-0.2`.
40+
41+
See the [tracking issue](https://github.com/rust-lang/libc/issues/3248) for
42+
details.
1243

1344
## Adding an API
1445

@@ -51,7 +82,7 @@ With that in mind, the steps for adding a new API are:
5182
5. Wait for a merge!
5283

5384
<sup>1</sup>: Note that this list has nothing to do with any Unix or Posix
54-
standard, it's just a list shared between all OSs that declare `#[cfg(unix)]`.
85+
standard, it's just a list shared among all OSs that declare `#[cfg(unix)]`.
5586

5687
## Test before you commit
5788

@@ -79,13 +110,12 @@ are:
79110
- The `note` field should have a reason to deprecate and a tracking issue to
80111
call for comments (e.g., "We consider removing this as the upstream removed
81112
it. If you're using it, please comment on #XXX").
82-
83113
2. If we don't see any concerns for a while, do the change actually.
84114

85115
## Supported target policy
86116

87117
When Rust removes a support for a target, the libc crate also may remove the
88-
support anytime.
118+
support at any time.
89119

90120
## Releasing your change to crates.io
91121

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,16 @@ More detailed information about the design of this library can be found in its
2020
[rfc]: https://github.com/rust-lang/rfcs/blob/HEAD/text/1291-promote-libc.md
2121
[windows-sys]: https://docs.rs/windows-sys
2222

23-
## v0.3 Roadmap
23+
## v1.0 Roadmap
2424

25-
The main branch is now for v0.3 which has some breaking changes.
25+
Currently, `libc` has two active branches: `main` for the upcoming v1.0 release,
26+
and `libc-0.2` for the currently published version. By default all pull requests
27+
should target `main`; once reviewed, they can be cherry picked to the `libc-0.2`
28+
branch if needed.
2629

27-
For v0.2, please submit PRs to the `libc-0.2` branch instead. We will stop
28-
making new v0.2 releases once we release v0.3 on crates.io.
30+
We will stop making new v0.2 releases once v1.0 is released.
2931

30-
See the [tracking issue](https://github.com/rust-lang/libc/issues/3248) for
32+
See the section in [CONTRIBUTING.md](CONTRIBUTING.md#v10-roadmap) for more
3133
details.
3234

3335
## Usage
@@ -51,14 +53,13 @@ libc = "0.2"
5153
use Rust >= 1.62, this feature is implicitly enabled. Otherwise it requires a
5254
nightly rustc.
5355

54-
* **deprecated**: `use_std` is deprecated, and is equivalent to `std`.
55-
5656
## Rust version support
5757

5858
The minimum supported Rust toolchain version is currently **Rust 1.63**.
5959

6060
Increases to the MSRV are allowed to change without a major (i.e. semver-
61-
breaking) release in order to avoid a ripple effect in the ecosystem.
61+
breaking) release in order to avoid a ripple effect in the ecosystem. A policy
62+
for when this may change is a work in progress.
6263

6364
`libc` may continue to compile with Rust versions older than the current MSRV
6465
but this is not guaranteed.

src/teeos/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub type ssize_t = isize;
4848

4949
pub type pid_t = c_int;
5050

51-
// aarch64 specifc
51+
// aarch64 specific
5252
pub type c_char = u8;
5353

5454
pub type wchar_t = u32;
@@ -61,9 +61,9 @@ pub type c_ulong = u64;
6161
pub struct _CLongDouble(pub u128);
6262

6363
// long double in C means A float point value, which has 128bit length.
64-
// but some bit maybe not used, so the really length of long double could be 80(x86) or 128(power pc/IEEE)
64+
// but some bit maybe not used, so the real length of long double could be 80(x86) or 128(power pc/IEEE)
6565
// this is different from f128(not stable and not included default) in Rust, so we use u128 for FFI(Rust to C).
66-
// this is unstable and will couse to memfault/data abort.
66+
// this is unstable and will cause to memfault/data abort.
6767
pub type c_longdouble = _CLongDouble;
6868

6969
pub type pthread_t = c_ulong;

src/unix/haiku/native.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,7 @@ extern "C" {
13001300
pub fn find_path_for_path_etc(
13011301
path: *const ::c_char,
13021302
dependency: *const ::c_char,
1303-
architectur: *const ::c_char,
1303+
architecture: *const ::c_char,
13041304
baseDirectory: path_base_directory,
13051305
subPath: *const ::c_char,
13061306
flags: u32,

0 commit comments

Comments
 (0)