aboutsummaryrefslogtreecommitdiff
path: root/lib/std/os
AgeCommit message (Collapse)Author
2025-11-20system specific errnorpkak
2025-11-19std.os.linux.IoUring: disable `bind/listen/connect` on s390xAlex Rønne Petersen
https://github.com/ziglang/zig/issues/25956
2025-11-15windows: Make readLinkW APIs output WTF-16, reduce stack usage of callersRyan Liptak
- Affects the following functions: + `std.fs.Dir.readLinkW` + `std.os.windows.ReadLink` + `std.os.windows.ntToWin32Namespace` + `std.posix.readlinkW` + `std.posix.readlinkatW` Each of these functions (except `ntToWin32Namespace`) took WTF-16 as input and would output WTF-8, which makes optimal buffer re-use difficult at callsites and could force unnecessary WTF-16 <-> WTF-8 conversion during an intermediate step. The functions have been updated to output WTF-16, and also allow for the path and the output to re-use the same buffer (i.e. in-place modification), which can reduce the stack usage at callsites. For example, all of `std.fs.Dir.readLink`/`readLinkZ`/`std.posix.readlink`/`readlinkZ`/`readlinkat`/`readlinkatZ` have had their stack usage reduced by one PathSpace struct (64 KiB) when targeting Windows. The new `ntToWin32Namespace` takes an output buffer and returns a slice from that instead of returning a PathSpace, which is necessary to make the above possible.
2025-11-15windows.ReadLink: Use OpenFile now that `.filter = .any` existsRyan Liptak
The reasoning in the comment deleted by this commit no longer applies, since that same benefit can be obtained by using OpenFile with `.filter = .any`. Also removes a stray debug.print
2025-11-09posix: reduce the number of assumptions made by `dl_iterate_phdr`Jacob Young
Not yet fully compatible with the new linker, but still progress. Closes #25786
2025-10-31std.os.windows: eliminate forwarder function in kernel32 (#25766)qilme
#1840 kernel32.AddVectoredExceptionHandler -> ntdll.RtlAddVectoredExceptionHandler kernel32.RemoveVectoredExceptionHandler -> ntdll.RtlRemoveVectoredExceptionHandler kernel32.ExitProcess -> ntdll.RtlExitUserProcess kernel32.InitializeCriticalSection -> ntdll.RtlInitializeCriticalSection kernel32.EnterCriticalSection -> ntdll.RtlEnterCriticalSection kernel32.LeaveCriticalSection -> ntdll.RtlLeaveCriticalSection kernel32.DeleteCriticalSection -> ntdll.RtlDeleteCriticalSection kernel32.TryAcquireSRWLockExclusive -> ntdll.RtlTryAcquireSRWLockExclusive kernel32.AcquireSRWLockExclusive -> ntdll.RtlAcquireSRWLockExclusive kernel32.ReleaseSRWLockExclusive -> ntdll.RtlReleaseSRWLockExclusive kernel32.WakeConditionVariable -> ntdll.RtlWakeConditionVariable kernel32.WakeAllConditionVariable -> ntdll.RtlWakeAllConditionVariable kernel32.HeapReAlloc -> ntdll.RtlReAllocateHeap kernel32.HeapAlloc -> ntdll.RtlAllocateHeap
2025-10-30Merge pull request #25763 from mrjbq7/cancelledJohn Benediktsson
rename Cancelled to Canceled
2025-10-29Merge pull request #25592 from ziglang/init-std.IoAndrew Kelley
std: Introduce `Io` Interface
2025-10-29std.os.linux: fix restore for powerpc/powerpc64Alex Rønne Petersen
sigreturn and rt_sigreturn are distinct syscalls on PowerPC.
2025-10-29std.os.linux.IoUring: disable failing testAndrew Kelley
tracked by https://github.com/ziglang/zig/issues/25734
2025-10-29std.os.linux.s390x: fix restore functionAndrew Kelley
2025-10-29std.os.linux.x86: fix signal restore functionAndrew Kelley
After handling any signal on x86, it would previously segfault.
2025-10-29std: fix definition of ws2_32.GetAddrInfoExWAndrew Kelley
There was a missing parameter.
2025-10-29std: make signal numbers into an enumAndrew Kelley
fixes start logic for checking whether IO/POLL exist
2025-10-29std.Io.Threaded: fix openSelfExe for WindowsAndrew Kelley
missing a call to wToPrefixedFileW
2025-10-29std.os.linux.IoUring: use linux msghdrAndrew Kelley
it disagrees with posix msghdr
2025-10-29std.Io.Threaded: delete Windows implementation of if_nametoindexAndrew Kelley
Microsoft documentation says "The if_nametoindex function is implemented for portability of applications with Unix environments, but the ConvertInterface functions are preferred." This was also the only dependency on iphlpapi.
2025-10-29std.Io.Threaded: implement netLookup for WindowsAndrew Kelley
2025-10-29std.os.windows.ws2_32: remove 'A' variantsAndrew Kelley
2025-10-29std.Io.Threaded: fix compilation failures on WindowsAndrew Kelley
2025-10-29std.Io.Threaded: implement netAccept for WindowsAndrew Kelley
2025-10-29std.Io.Threaded: implement netListen for WindowsAndrew Kelley
2025-10-29std.Io.Threaded: implement dirAccess for WindowsAndrew Kelley
2025-10-29std: fix compilation errors on WindowsAndrew Kelley
2025-10-29std: move some windows path checking logicAndrew Kelley
2025-10-29std.fs: use BadPathName rather than InvalidWtf8 on WindowsAndrew Kelley
2025-10-29fix miscellaneous compilation errorsAndrew Kelley
- ILSEQ -> error.BadPathName - implement dirStatPath for WASI
2025-10-29std: move DNS record enum to a better namespaceAndrew Kelley
2025-10-29std: fix macos compilation errorsAndrew Kelley
2025-10-29std: fix some Io compilation errorsAndrew Kelley
2025-10-29std: updating to std.Io interfaceAndrew Kelley
got the build runner compiling
2025-10-29std: fix msghdr and cmsghdr when using musl libcAndrew Kelley
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.
2025-10-29std.Io: implement netSendAndrew Kelley
2025-10-29std.os.linux: remove unnecessary warnings from sendmmsgAndrew Kelley
The one about INT_MAX is self-evident from the type system. The one about kernel having bad types doesn't seem accurate as I checked the source code and it uses size_t for all the appropriate types, matching the libc struct definition for msghdr and msghdr_const.
2025-10-29std.os.linux: remove sendmmsg workaroundAndrew Kelley
This "fix" is too opinionated to belong here. Better instead to document the pitfalls.
2025-10-27fix: make `compiler_rt` and `std.Io.Writer` compile on 16-bit platforms.GasInfinity
2025-10-23std.os.linux.tls: add hppa supportAlex Rønne Petersen
Turns out Linux on PA-RISC does system calls in a pretty fascinating way; see arch/parisc/kernel/syscall.S for details.
2025-10-23std.os.linux.tls: add sh supportAlex Rønne Petersen
2025-10-23std.os.linux.tls: add microblaze supportAlex Rønne Petersen
Implemented according to glibc because I'm pretty sure musl gets it wrong.
2025-10-23std.os.linux.tls: add alpha supportAlex Rønne Petersen
2025-10-23std.Target: add arceb and xtensaeb Cpu.Arch tagsAlex Rønne Petersen
2025-10-19std.os.linux: add pivot_root syscallWim de With
2025-10-19std.os.linux: add setns syscallWim de With
2025-10-18std.os.linux: add or1k arch bitsAlex Rønne Petersen
2025-10-18std.os.linux.tls: implement or1k supportAlex Rønne Petersen
2025-10-18Merge pull request #25622 from alexrp/inline-asm-fixesAlex Rønne Petersen
`std`: some miscellaneous inline asm fixes for mips, mips64, mipsn32, and x32
2025-10-18Merge pull request #25614 from squeek502/windows-rename-deleteAlex Rønne Petersen
windows: Always try using POSIX_SEMANTICS/etc for rename/delete
2025-10-18std.os.linux: remove syscall7() on mips64/mipsn32Alex Rønne Petersen
I'm not sure why this was here, but this is only a thing on O32, not N32/N64.
2025-10-18std.os.linux: fix some issues in x32 inline asmAlex Rønne Petersen
ref https://github.com/ziglang/zig/issues/22189
2025-10-18std.os.linux: fix some issues in mipsn32 inline asmAlex Rønne Petersen
ref https://github.com/ziglang/zig/issues/22189