Skip to content

Introduce common bzero libc implementation. #23812

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 10, 2025

Conversation

kada49
Copy link
Contributor

@kada49 kada49 commented May 6, 2025

I implemented this according to this comment.
Should contribute to closing #2879 .

First contribution so I start with an easy one (I hope).

Co-authored-by: Linus Groh <mail@linusgroh.de>
@alexrp
Copy link
Member

alexrp commented May 6, 2025

You'll need to import the new file here:

zig/lib/c.zig

Lines 17 to 20 in 8ec86e4

if (builtin.target.isMuslLibC() or builtin.target.isWasiLibC()) {
// Files specific to musl and wasi-libc.
_ = @import("c/string.zig");
}

kada49 added 2 commits May 6, 2025 20:01
- import common implementation when musl or wasi is included
- don't use `c_builtins`, use `@memset`
Co-authored-by: Veikka Tuominen <git@vexu.eu>
@alexrp alexrp merged commit 2c241b2 into ziglang:master May 10, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants