libc: reimplement swab in Zig (#31130)

This PR replaces the bundled musl swab() implementation with zig's one.

Contributes towards #30978.

It looks like there are not test cases for swab() in test-libc.

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31130
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
Co-authored-by: Ivel <ivel.santos@proton.me>
Co-committed-by: Ivel <ivel.santos@proton.me>
fa3228ae42Ivel committed on 2/5/2026, 7:21:41 PM· committed by Andrew Kelleyparentc77e714
4 files changedLine totals unavailable