Stephen Gregoratto
ed4303fe59
IoUring: Handle OPNOTSUPP for symlinkat test
2026-05-23 06:15:24 +02:00
Stephen Gregoratto
e1fc46fb6d
Linux: Add proper constants for Alpha
2026-05-23 06:15:24 +02:00
Stephen Gregoratto
a9b7df4ca2
Linux: Map Alpha getx*id to their regularly named versions
...
These syscalls also store the value of `euid/egid/ppid` in `r20`, but
are otherwise the same.
2026-05-23 06:15:24 +02:00
Mai-Lapyst
7534ac7367
Adding more support for DEC Alpha to std
...
This adds support to std, primarily for linux, to support the Alpha architecture.
closes #30940
closes #30926
2026-05-23 06:15:24 +02:00
xtex
8fe6d5a48e
std.os.linux: move HWCAP bits to linux.zig
...
Change-Id: Ic06feeeec9d04b540cf4efc931df4f4b7e327c5f
2026-05-22 21:15:33 +02:00
xtex
34c2b5e9d1
std.os.linux: add LoongArch HWCAP bits
...
See also arch/loongarch/include/uapi/asm/hwcap.h in Linux kernel.
SC.Q was added in kernel v7.0.
Change-Id: Ib4ddd451ab16d52b2578f8b97c9c3365286719cd
Signed-off-by: xtex <xtex@astrafall.org >
2026-05-22 21:15:32 +02:00
Jari Vetoniemi
52c5223bca
std.os.linux: local variable for timeout in poll
...
The linux syscall ppoll modifies its second argument, thus using
`@constCast` here is not correct.
2026-05-07 05:45:20 +02:00
ahwayakchih
0ec456c785
Add missing BPF.TAX and BPF.TXA declarations
...
As described in #32112 , two instructions were missing from bpf.zig. They're declared in `linux/filter.h` (not in `linux/bpf.h`).
2026-05-07 05:38:45 +02:00
Andrew Kelley
cd23f7a814
Merge pull request 'std.meta: Remove Int/Tuple in favor of @Int/@Tuple' ( #35188 ) from linus/zig:deprecated-std-meta into master
...
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/35188
Reviewed-by: Andrew Kelley <andrew@ziglang.org >
2026-05-06 19:35:40 +02:00
Andrew Kelley
3d56df1716
Merge pull request 'std.fmt, std.mem.Allocator: Remove bufPrintZ()/dupeZ() in favor of bufPrintSentinel()/dupeSentinel()' ( #35190 ) from linus/zig:deprecated-std-fmt-mem into master
...
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/35190
Reviewed-by: Andrew Kelley <andrew@ziglang.org >
2026-05-06 19:34:52 +02:00
jeffkdev
73d20ecd6a
emscripten: Use SIG for sigaction types
2026-05-06 15:46:31 +02:00
jeffkdev
4402a7477a
Add emscripten_num_logical_cores()
2026-05-05 08:14:03 -04:00
Linus Groh
fcc0a5a913
std.mem.Allocator: Remove dupeZ() in favor of dupeSentinel()
2026-05-03 21:42:16 +01:00
Linus Groh
991f56fd6b
std.meta: Remove Int in favor of @Int
2026-05-03 21:42:06 +01:00
Matthew Lugg
fdac89d6cd
remove uses of array multiplication
...
In preparation for its removal as accepted in
https://github.com/ziglang/zig/issues/24738 .
2026-04-30 08:57:51 +01:00
Alex Rønne Petersen
bd12a5a6e1
std: re-enable a bunch of tests that now pass
...
closes https://github.com/ziglang/zig/issues/21893
closes https://github.com/ziglang/zig/issues/23806
closes https://github.com/ziglang/zig/issues/23807
closes https://github.com/ziglang/zig/issues/24191
closes https://codeberg.org/ziglang/zig/issues/30220
2026-04-25 21:54:48 +02:00
Alex Rønne Petersen
7c3d4642ae
std.os.windows: update PF feature flags from winnt.h
2026-04-25 21:54:48 +02:00
Sertonix
5cc281e723
std.os.linux: avoid invalid asm error with gcc on x86
...
Even though these registry mentions are supposed to be in a comment they
seem to still be interpreted by gcc.
Alternatively one could try to make zig not include comments in assembly
blocks when generating C code.
In function 'os_linux_x86_syscall6__6685',
inlined from 'os_linux_copy_file_range__4300' at zig2.c:396643:7,
inlined from 'link_MappedFile_copyFileRange__14079.isra' at zig2.c:289222:10:
zig2.c:396692:2: error: invalid 'asm': operand number missing after %-letter
396692 | __asm volatile(" push %[args56]\n push %%ebp\n mov 4(%%esp), %%ebp\n mov %%edi, 4(%%esp)\n // The saved %edi and %ebp are on the stack, and %ebp points to `args56`.\n // Prepare the last two args, syscall, then pop the saved %ebp and %edi.\n mov (%%ebp), %%edi\n mov 4(%%ebp), %%ebp\n int $0x80\n pop %%ebp\n pop %%edi": [ret]"=r"(t5): [number]"r"(t6), [arg1]"r"(t7), [arg2]"r"(t8), [arg3]"r"(t9), [arg4]"r"(t10), [args56]"rm"(t2): "memory");
| ^~~~~
zig2.c:396692:2: error: invalid 'asm': operand number missing after %-letter
zig2.c:396692:2: error: invalid 'asm': operand number missing after %-letter
zig2.c:396692:2: error: invalid 'asm': operand number missing after %-letter
zig2.c:396692:2: error: invalid 'asm': operand number missing after %-letter
2026-04-24 07:33:22 +02:00
Alex Rønne Petersen
b985404569
std.os.linux: update syscalls to 7.0
2026-04-22 08:37:56 +02:00
Alex Rønne Petersen
8bf72740e3
std.os.linux.IoUring: disable tests on PowerPC
...
https://codeberg.org/ziglang/zig/issues/31562
2026-04-22 08:27:51 +02:00
Andrew Kelley
4e2147d14e
Merge pull request 'Fix uefi (un)installMultipleProtocolInterfaces' ( #31934 ) from mrosowski/zig:uefi-fix-install-multiple into master
...
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31934
Reviewed-by: linus <mail@linusgroh.de >
2026-04-20 07:05:35 +02:00
Meghan Denny
9636d76b6d
std.os.linux: getdents accepts a c_uint length ( #31825 )
...
https://github.com/torvalds/linux/blob/e774d5f1bc27a85f858bce7688509e866f8e8a4e/include/linux/syscalls.h#L1100-L1102
https://github.com/torvalds/linux/blob/e774d5f1bc27a85f858bce7688509e866f8e8a4e/include/linux/syscalls.h#L477-L479
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31825
Reviewed-by: Andrew Kelley <andrew@ziglang.org >
Co-authored-by: Meghan Denny <hello@nektro.net >
Co-committed-by: Meghan Denny <hello@nektro.net >
2026-04-18 07:34:32 +02:00
David Senoner
21914c7c01
ziglibc: migrate tee linux syscall ( #31911 )
...
Add the Linux syscall wrapper for `tee`.
Migrate the `tee` syscall from musl libc to zig libc.
langref: note `ssize_t` and `isize` are ABI compatible
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31911
Reviewed-by: Andrew Kelley <andrew@ziglang.org >
Co-authored-by: David Senoner <seda18@rolmail.net >
Co-committed-by: David Senoner <seda18@rolmail.net >
2026-04-18 07:30:43 +02:00
Mikołaj Rosowski
7020c9e4a9
std.os.uefi: pass null terminator in (un)installMultipleProtocolInterfaces
2026-04-17 22:33:17 +02:00
Mikołaj Rosowski
0473ddb1a7
std.os.uefi: fix _(un)installMultipleProtocolInterface signatures
2026-04-17 22:33:17 +02:00
Mikołaj Rosowski
a3a1dd1d91
std.os.uefi: use uefi callconv for _(un)installMultipleProtocolInterfaces
2026-04-17 22:33:17 +02:00
Mikołaj Rosowski
1d7c8108b1
std.os.uefi: fix comptime idx
2026-04-17 22:33:17 +02:00
Alex Rønne Petersen
6315c1a190
std.os.linux: remove vfork()
...
It's a bad API with better alternatives on Linux, and is near-impossible to use
safely in Zig code.
closes https://codeberg.org/ziglang/zig/issues/31882
2026-04-16 16:00:21 +02:00
Alex Rønne Petersen
67023fc4bd
std.os.linux: fix syscall argument width for mipsn32 and x32
...
This required a thorough audit of every syscall wrapper in std.os.linux, so
while I was here, I fixed some minor arch-specific bugs, improved some types,
simplified some casts, and deleted some dead code.
Note that lseek() in particular is still broken for n32 and x32 after this
commit; this wrapper will require some special-casing in the arch bits due to
its unusual return type width.
closes https://github.com/ziglang/zig/issues/22464
closes https://codeberg.org/ziglang/zig/issues/31597
2026-04-16 16:00:21 +02:00
Alex Rønne Petersen
ab2f9ca503
std.os.linux: csky and xtensa also use aligned register pairs
2026-04-16 16:00:21 +02:00
Alex Rønne Petersen
deb9b58cbc
std.os.linux.loongarch32: remove a leftover FIXME comment
2026-04-16 16:00:21 +02:00
Carl Åstholm
046002d1a5
Correct std.os.emscripten.W.STOPSIG return type
2026-04-15 11:53:58 +02:00
krystiann
8578b07faa
std.os.linux: add arc arch bits
2026-04-14 12:51:44 +02:00
David Gonzalez Martin
37a20d3984
Allow the user to override unexpected error trace
...
This is the only bit left in the standard library where stack trace writing
code is pulled to the binary even if the user doesn't want it
2026-04-13 19:58:01 +02:00
Alex Rønne Petersen
d6f43caadf
Merge pull request 'audit: handle process.Child.Term exhaustively and give useful exit information on process exit' ( #31018 ) from murtaza/zig:child.term-audit into master
...
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31018
Reviewed-by: Alex Rønne Petersen <alex@alexrp.com >
2026-04-11 00:59:11 +02:00
Carl Åstholm
e2a6c74c9a
Remove Emscripten stack protector exports
...
Emscripten already supports SSP and exports the relevant
symbols since version 3.1.64 (2024-07-22).
2026-04-07 22:20:04 +02:00
murtaza
4a1383d987
process.Child: use std.posix.SIG instead of u32 for Child.Term stopped field
2026-04-07 10:27:21 +02:00
Brandon Black
bb9f97e085
std.os.linux: add set_tid_address
2026-03-31 14:47:22 -05:00
Alex Rønne Petersen
558a5c7913
std.c: audit some time types for non-Linux OSs
...
Some initial work towards https://codeberg.org/ziglang/zig/issues/31414 .
Conclusion from this: Only x86-freebsd, x86-haiku, and x86-illumos remain time32
and are currently unfixable. I don't think the upstreams for any of these
targets actually care about them anymore (probably why they weren't migrated to
time64), so this is not a particularly big concern.
I split UTIME constants out from timespec because they were causing unreasonable
code duplication by being there.
2026-03-24 09:42:32 +01:00
Jacob Young
83c7aba127
windows: trigger automatic fetching of root certificates
2026-03-20 19:23:48 +01:00
Jacob Young
3c8b96df6d
windows: use enums for boolean types
2026-03-20 02:25:16 +01:00
Alex Rønne Petersen
30de1678a6
Merge pull request 'basic loongarch32-linux support' ( #31587 ) from alexrp/zig:loongarch32 into master
...
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31587
2026-03-20 02:04:25 +01:00
Alex Rønne Petersen
a62d8e3323
std.os.linux: add loongarch32 arch bits
...
closes https://codeberg.org/ziglang/zig/issues/30948
2026-03-19 19:53:03 +01:00
Jacob Young
9ac1386c10
std.Io.Threaded: windows networking without ws2_32
2026-03-18 20:13:59 -04:00
inf
c38e6ed686
feat: remove kernel32.CreateThread, implement ntdll.NtCreateThreadEx inside WindowsThreadImpl ( #31519 )
...
Co-authored-by: Ryan Liptak <squeek502@hotmail.com >
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31519
Reviewed-by: Ryan Liptak <squeek502@noreply.codeberg.org >
Co-authored-by: inf <infirms@protonmail.com >
Co-committed-by: inf <infirms@protonmail.com >
2026-03-17 23:06:55 +01:00
Andrew Kelley
d6402955d9
kernel32: another one bytes the dust
2026-03-14 06:06:03 +01:00
Matthew Lugg
5d71e30518
std: remove another kernel32 dependency
...
We can directly access this path string from the PEB (albeit with some
weirdness around addressing) and that ends up making the downstream code
simpler and more efficient. (Almost like the kernel32 API isn't very
good!)
2026-03-13 20:56:00 +01:00
Pablo Alessandro Santos Hugen
627f03af9d
std.os.linux: add explicit backing type to packed structs in extern types
2026-03-12 22:33:03 +01:00
kanpura
eff332fd04
std.os.uefi.protocol: do not reference errors via the error set(uefi.Status.Error)
...
closes #31456
2026-03-12 15:19:29 +01:00
Andrew Kelley
3069917384
std.Io.Threaded: use AlertableSyscall for ws2_32 operations
...
closes #30865
2026-03-11 22:46:13 +01:00