Skip to content

Commit 751b509

Browse files
committed
Add libc 0.2.172
1 parent 03ae573 commit 751b509

File tree

195 files changed

+129756
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

195 files changed

+129756
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"git": {
3+
"sha1": "a5eab581f9c9c03f29e3edd4a4d4f850d748f2e9"
4+
},
5+
"path_in_vcs": ""
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Format macro bodies
2+
50f26e08e146b7e9c7d1af9614486eba327d1e31
3+
4+
# Automated changes related to the 2021 edition upgrade
5+
643182f7da26cedb09349b8bb3735c2e58ba24e6
6+
108310db03e7db35ef48a902d9ce9a88ab8f9b77
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
target
2+
Cargo.lock
3+
*~
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
[workspace]
2+
git_release_name = "{{ version }}"
3+
git_tag_name = "{{ version }}"
4+
5+
[changelog]
6+
body = """
7+
## [{{ version | trim_start_matches(pat="v") }}]\
8+
{%- if release_link -%}\
9+
({{ release_link }})\
10+
{% endif %} \
11+
- {{ timestamp | date(format="%Y-%m-%d") }}
12+
{% for group, commits in commits | group_by(attribute="group") %}
13+
### {{ group | upper_first }}
14+
{% for commit in commits %}
15+
- {% if commit.scope -%}{{ commit.scope | upper_first }}: {% endif %}
16+
{%- if commit.breaking %}[**breaking**] {% endif %}
17+
{{- commit.message }}
18+
{%- if commit.links %} ([{{ commit.links.1.text }}]({{ commit.links.1.href }})){% endif -%}
19+
{% endfor %}
20+
{% endfor %}
21+
{%- if github -%}
22+
{% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
23+
## New Contributors ❤️
24+
{% endif %}\
25+
{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
26+
* @{{ contributor.username }} made their first contribution
27+
{%- if contributor.pr_number %} in \
28+
[#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \
29+
{%- endif %}
30+
{%- endfor -%}
31+
{%- endif %}
32+
"""
33+
34+
commit_parsers = [
35+
{ message = '(?i)^(\w+: )?feat', group = "added" },
36+
{ message = '(?i)^(\w+: )?add', group = "added" },
37+
{ message = '(?i)^(\w+: )?change', group = "changed" },
38+
{ message = '(?i)^(\w+: )?cleanup', group = "cleanup" },
39+
{ message = '(?i)^(\w+: )?deprecate', group = "deprecated" },
40+
{ message = '(?i)^(\w+: )?remove', group = "removed" },
41+
{ message = '(?i)^(\w+: )?fix', group = "fixed" },
42+
{ message = '(?i)^(\w+: )?fix', group = "fixed" },
43+
{ message = '^.*', group = "other" },
44+
]
45+
46+
link_parsers = [
47+
# Extract backport patterns
48+
{ pattern = '\(backport <.*/(\d+)>\)', text = "#$1", href = "https://github.com/rust-lang/libc/pull/$1"}
49+
]

collector/compile-benchmarks/libc-0.2.172/CHANGELOG.md

Lines changed: 563 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# Contributing to `libc`
2+
3+
Welcome! If you are reading this document, it means you are interested in
4+
contributing to the `libc` crate.
5+
6+
## v1.0 Roadmap
7+
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.
43+
44+
## Adding an API
45+
46+
Want to use an API which currently isn't bound in `libc`? It's quite easy to add
47+
one!
48+
49+
The internal structure of this crate is designed to minimize the number of
50+
`#[cfg]` attributes in order to easily be able to add new items which apply to
51+
all platforms in the future. As a result, the crate is organized hierarchically
52+
based on platform. Each module has a number of `#[cfg]`'d children, but only one
53+
is ever actually compiled. Each module then reexports all the contents of its
54+
children.
55+
56+
This means that for each platform that libc supports, the path from a leaf
57+
module to the root will contain all bindings for the platform in question.
58+
Consequently, this indicates where an API should be added! Adding an API at a
59+
particular level in the hierarchy means that it is supported on all the child
60+
platforms of that level. For example, when adding a Unix API it should be added
61+
to `src/unix/mod.rs`, but when adding a Linux-only API it should be added to
62+
`src/unix/linux_like/linux/mod.rs`.
63+
64+
If you're not 100% sure at what level of the hierarchy an API should be added
65+
at, fear not! This crate has CI support which tests any binding against all
66+
platforms supported, so you'll see failures if an API is added at the wrong
67+
level or has different signatures across platforms.
68+
69+
New symbol(s) (i.e. functions, constants etc.) should also be added to the
70+
symbols list(s) found in the `libc-test/semver` directory. These lists keep
71+
track of what symbols are public in the libc crate and ensures they remain
72+
available between changes to the crate. If the new symbol(s) are available on
73+
all supported Unixes it should be added to `unix.txt` list<sup>1</sup>,
74+
otherwise they should be added to the OS specific list(s).
75+
76+
With that in mind, the steps for adding a new API are:
77+
78+
1. Determine where in the module hierarchy your API should be added.
79+
2. Add the API, including adding new symbol(s) to the semver lists.
80+
3. Send a PR to this repo.
81+
4. Wait for CI to pass, fixing errors.
82+
5. Wait for a merge!
83+
84+
<sup>1</sup>: Note that this list has nothing to do with any Unix or Posix
85+
standard, it's just a list shared among all OSs that declare `#[cfg(unix)]`.
86+
87+
## Test before you commit
88+
89+
We have two automated tests running on
90+
[GitHub Actions](https://github.com/rust-lang/libc/actions):
91+
92+
1. [`libc-test`](https://github.com/gnzlbg/ctest)
93+
- `cd libc-test && cargo test`
94+
- Use the `skip_*()` functions in `build.rs` if you really need a workaround.
95+
2. Style checker
96+
- [`./ci/style.sh`](https://github.com/rust-lang/libc/blob/main/ci/style.sh)
97+
98+
## Breaking change policy
99+
100+
Sometimes an upstream adds a breaking change to their API e.g. removing outdated
101+
items, changing the type signature, etc. And we probably should follow that
102+
change to build the `libc` crate successfully. It's annoying to do the
103+
equivalent of semver-major versioning for each such change. Instead, we mark the
104+
item as deprecated and do the actual change after a certain period. The steps
105+
are:
106+
107+
1. Add `#[deprecated(since = "", note="")]` attribute to the item.
108+
- The `since` field should have a next version of `libc` (e.g., if the current
109+
version is `0.2.1`, it should be `0.2.2`).
110+
- The `note` field should have a reason to deprecate and a tracking issue to
111+
call for comments (e.g., "We consider removing this as the upstream removed
112+
it. If you're using it, please comment on #XXX").
113+
2. If we don't see any concerns for a while, do the change actually.
114+
115+
## Supported target policy
116+
117+
When Rust removes a support for a target, the libc crate also may remove the
118+
support at any time.
119+
120+
## Releasing your change to crates.io
121+
122+
This repository uses [release-plz] to handle releases. Once your pull request
123+
has been merged, a maintainer just needs to verify the generated changelog, then
124+
merge the bot's release PR. This will automatically publish to crates.io!
125+
126+
[release-plz]: https://github.com/MarcoIeni/release-plz

collector/compile-benchmarks/libc-0.2.172/Cargo.lock

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
2+
#
3+
# When uploading crates to the registry Cargo will automatically
4+
# "normalize" Cargo.toml files for maximal compatibility
5+
# with all versions of Cargo and also rewrite `path` dependencies
6+
# to registry (e.g., crates.io) dependencies.
7+
#
8+
# If you are reading this file be aware that the original Cargo.toml
9+
# will likely look very different (and much more reasonable).
10+
# See Cargo.toml.orig for the original contents.
11+
12+
[package]
13+
edition = "2021"
14+
rust-version = "1.63"
15+
name = "libc"
16+
version = "0.2.172"
17+
authors = ["The Rust Project Developers"]
18+
build = "build.rs"
19+
exclude = [
20+
"/ci/*",
21+
"/.github/*",
22+
"/.cirrus.yml",
23+
"/triagebot.toml",
24+
]
25+
autolib = false
26+
autobins = false
27+
autoexamples = false
28+
autotests = false
29+
autobenches = false
30+
description = """
31+
Raw FFI bindings to platform libraries like libc.
32+
"""
33+
homepage = "https://github.com/rust-lang/libc"
34+
documentation = "https://docs.rs/libc/"
35+
readme = "README.md"
36+
keywords = [
37+
"libc",
38+
"ffi",
39+
"bindings",
40+
"operating",
41+
"system",
42+
]
43+
categories = [
44+
"external-ffi-bindings",
45+
"no-std",
46+
"os",
47+
]
48+
license = "MIT OR Apache-2.0"
49+
repository = "https://github.com/rust-lang/libc"
50+
51+
[package.metadata.docs.rs]
52+
cargo-args = ["-Zbuild-std=core"]
53+
default-target = "x86_64-unknown-linux-gnu"
54+
features = ["extra_traits"]
55+
targets = [
56+
"aarch64-apple-darwin",
57+
"aarch64-apple-ios",
58+
"aarch64-linux-android",
59+
"aarch64-pc-windows-msvc",
60+
"aarch64-unknown-freebsd",
61+
"aarch64-unknown-fuchsia",
62+
"aarch64-unknown-hermit",
63+
"aarch64-unknown-linux-gnu",
64+
"aarch64-unknown-linux-musl",
65+
"aarch64-unknown-netbsd",
66+
"aarch64-unknown-openbsd",
67+
"aarch64-wrs-vxworks",
68+
"arm-linux-androideabi",
69+
"arm-unknown-linux-gnueabi",
70+
"arm-unknown-linux-gnueabihf",
71+
"arm-unknown-linux-musleabi",
72+
"arm-unknown-linux-musleabihf",
73+
"armebv7r-none-eabi",
74+
"armebv7r-none-eabihf",
75+
"armv5te-unknown-linux-gnueabi",
76+
"armv5te-unknown-linux-musleabi",
77+
"armv7-linux-androideabi",
78+
"armv7-unknown-linux-gnueabihf",
79+
"armv7-unknown-linux-musleabihf",
80+
"armv7-wrs-vxworks-eabihf",
81+
"armv7r-none-eabi",
82+
"armv7r-none-eabihf",
83+
"i586-unknown-linux-gnu",
84+
"i586-unknown-linux-musl",
85+
"i686-linux-android",
86+
"i686-pc-windows-gnu",
87+
"i686-pc-windows-msvc",
88+
"i686-pc-windows-msvc",
89+
"i686-unknown-freebsd",
90+
"i686-unknown-haiku",
91+
"i686-unknown-linux-gnu",
92+
"i686-unknown-linux-musl",
93+
"i686-unknown-netbsd",
94+
"i686-unknown-openbsd",
95+
"i686-wrs-vxworks",
96+
"mips-unknown-linux-gnu",
97+
"mips-unknown-linux-musl",
98+
"mips64-unknown-linux-gnuabi64",
99+
"mips64-unknown-linux-muslabi64",
100+
"mips64el-unknown-linux-gnuabi64",
101+
"mips64el-unknown-linux-muslabi64",
102+
"mipsel-sony-psp",
103+
"mipsel-unknown-linux-gnu",
104+
"mipsel-unknown-linux-musl",
105+
"nvptx64-nvidia-cuda",
106+
"powerpc-unknown-linux-gnu",
107+
"powerpc-unknown-linux-gnuspe",
108+
"powerpc-unknown-netbsd",
109+
"powerpc-wrs-vxworks",
110+
"powerpc-wrs-vxworks-spe",
111+
"powerpc64-unknown-freebsd",
112+
"powerpc64-unknown-linux-gnu",
113+
"powerpc64-wrs-vxworks",
114+
"powerpc64le-unknown-linux-gnu",
115+
"riscv32gc-unknown-linux-gnu",
116+
"riscv32i-unknown-none-elf",
117+
"riscv32imac-unknown-none-elf",
118+
"riscv32imc-unknown-none-elf",
119+
"riscv32-wrs-vxworks",
120+
"riscv64gc-unknown-freebsd",
121+
"riscv64gc-unknown-hermit",
122+
"riscv64gc-unknown-linux-gnu",
123+
"riscv64gc-unknown-linux-musl",
124+
"riscv64gc-unknown-none-elf",
125+
"riscv64imac-unknown-none-elf",
126+
"riscv64-wrs-vxworks",
127+
"s390x-unknown-linux-gnu",
128+
"s390x-unknown-linux-musl",
129+
"sparc-unknown-linux-gnu",
130+
"sparc64-unknown-linux-gnu",
131+
"sparc64-unknown-netbsd",
132+
"sparcv9-sun-solaris",
133+
"thumbv6m-none-eabi",
134+
"thumbv7em-none-eabi",
135+
"thumbv7em-none-eabihf",
136+
"thumbv7m-none-eabi",
137+
"thumbv7neon-linux-androideabi",
138+
"thumbv7neon-unknown-linux-gnueabihf",
139+
"wasm32-unknown-emscripten",
140+
"wasm32-unknown-unknown",
141+
"x86_64-apple-darwin",
142+
"x86_64-apple-ios",
143+
"x86_64-fortanix-unknown-sgx",
144+
"x86_64-linux-android",
145+
"x86_64-pc-solaris",
146+
"x86_64-pc-windows-gnu",
147+
"x86_64-pc-windows-msvc",
148+
"x86_64-unknown-dragonfly",
149+
"x86_64-unknown-freebsd",
150+
"x86_64-unknown-fuchsia",
151+
"x86_64-unknown-haiku",
152+
"x86_64-unknown-hermit",
153+
"x86_64-unknown-illumos",
154+
"x86_64-unknown-l4re-uclibc",
155+
"x86_64-unknown-linux-gnu",
156+
"x86_64-unknown-linux-gnux32",
157+
"x86_64-unknown-linux-musl",
158+
"x86_64-unknown-netbsd",
159+
"x86_64-unknown-openbsd",
160+
"x86_64-unknown-redox",
161+
"x86_64-wrs-vxworks",
162+
]
163+
164+
[features]
165+
align = []
166+
const-extern-fn = []
167+
default = ["std"]
168+
extra_traits = []
169+
rustc-dep-of-std = [
170+
"align",
171+
"rustc-std-workspace-core",
172+
]
173+
std = []
174+
use_std = ["std"]
175+
176+
[lib]
177+
name = "libc"
178+
path = "src/lib.rs"
179+
180+
[[test]]
181+
name = "const_fn"
182+
path = "tests/const_fn.rs"
183+
184+
[dependencies.rustc-std-workspace-core]
185+
version = "1.0.0"
186+
optional = true

0 commit comments

Comments
 (0)