mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
glibc and linux kernel use size_t for some field lengths while POSIX and musl use int. This bug would have caused breakage the first time someone tried to call sendmsg on a 64-bit big endian system when linking musl libc. my opinion: * msghdr.iovlen: kernel and glibc have it right. This field should definitely be size_t. With int, the padding bytes are wasted for no reason. * msghdr.controllen: POSIX and musl have it right. 4 bytes is plenty for the length, and it saves 4 bytes next to flags. * cmsghdr.len: POSIX and musl have it right. 4 bytes is plenty for the length, and it saves 4 bytes since the other fields are also 32-bits each. |
||
|---|---|---|
| .. | ||
| linux | ||
| plan9 | ||
| uefi | ||
| windows | ||
| emscripten.zig | ||
| freebsd.zig | ||
| linux.zig | ||
| plan9.zig | ||
| uefi.zig | ||
| wasi.zig | ||
| windows.zig | ||