aboutsummaryrefslogtreecommitdiff
path: root/lib/std/os
AgeCommit message (Collapse)Author
2020-09-06improved compile error messageMatt Knight
2020-09-06removed redundant pseudo insnMatt Knight
2020-09-06implemented and testing op codes for instructions documented in the ↵Matt Knight
unofficial bpf insn reference
2020-09-05Merge pull request #6246 from Vexu/fieldVeikka Tuominen
Remove deprecated fields on `type`
2020-09-03Merge pull request #6243 from ifreund/uid-gid-cleanupAndrew Kelley
std: clean up usage of uid_t/gid_t, add seteuid/setegid to std.os
2020-09-03update uses of deprecated type field accessVexu
2020-09-03std: ensure seteuid/setegid do not change saved idIsaac Freund
2020-09-03std: fix linux uid_t, use uid_t/gid_t in std.osIsaac Freund
- correct uid_t from i32 to u32 on linux - define uid_t and gid_t for OSes missing definitions - use uid_t/gid_t instead of plain u32s throughout std.os
2020-09-03os.send(to) and os.recv(from) functions made to work on windows.Bas van den Berg
2020-09-03Split the sync tests into sync and fsyncJens Goldberg
2020-09-03Add C declarations and tests for the sync functionsJens Goldberg
2020-09-02Add the sync functionsAransentin
2020-09-02Made some changes and additions to the networking to make it work on windows.Bas van den Berg
2020-08-30handle lack of privilege to create symbolic links on windowsSahnvour
2020-08-29fix SimpleTextInputProtocolwozeparrot
2020-08-22Bpf: move under os/linux instead of bits (#6126)Matthew Knight
* moved bpf syscall, added some bpf instructions and tests * had to move bpf out of bits so that a freestanding target could import it * removed line * fixed imports
2020-08-21fixed bpf namespaceMatt Knight
2020-08-21decided to split up loading of 64-bit immediatesMatt Knight
2020-08-21moved bpf syscall, added some bpf instructions and testsMatt Knight
2020-08-20add UTIME_NOW and UTIME_OMIT constants for use in utimensat/futimensheidezomp
copied from lib/libc/include/generic-musl/sys/stat.h
2020-08-20add license header to all std lib filesAndrew Kelley
add SPDX license identifier copyright ownership is zig contributors
2020-08-19windows: match the same error code for EBADFAndrew Kelley
2020-08-19Add handler for INVALID_HANDLE to prevent infinite loop when stderr is not ↵StrangeBug
available.
2020-08-17added bpf() syscall and some supporting structs (#6061)Matthew Knight
* added bpf syscall and some supporting structs * moved bpf to bits and added flags
2020-08-17std: signalfd: fix the types of things; add testAndrew Kelley
2020-08-17rename signalfd4 to signalfdLuna
2020-08-11copy_file_range linux syscall (#6010)Maciej Walczak
2020-08-10Convert prefix from u8 to u16 programmaticallyJakub Konka
2020-08-10Validate DOS path before returningJakub Konka
And some other minor refactors which address more review comments.
2020-08-09Address some review commentsJakub Konka
2020-08-07Fix alignment issueJakub Konka
2020-08-07Redo GetFinalPathNameByHandle using DeviceIoControlJakub Konka
This commit reimagines `std.os.windows.GetFinalPathNameByHandle` using `DeviceIoControl` to query the OS mount manager for the DOS (symlink) paths for the given NT volume name. In particular, it uses `IOCTL_MOUNTMGR_QUERY_POINTS` ioctl opcode to query the manager for the available moount points.
2020-08-06Add docsJakub Konka
2020-08-06Use NtQueryInformationFile unless unavailableJakub Konka
Favour newer API which uses `NtQueryInformationFile` with class flags `FileNormalizedNameInformation` and `FileVolumeNameInformation` instead of lower-level `NtQueryObject`. `NtQueryObject` is still used as a fallback in case the former are unavailable.
2020-08-06Initial draft of GetFinalPathNameByHandleJakub Konka
This commit proposes an initial draft of `GetPathNameByHandle` function which wraps NT syscalls and strives to emulate (currently only partially) the `kernel32.GetFinalPathNameByHandleW` function.
2020-08-04std.os tests: improve robustness of "symlink with relative paths"Andrew Kelley
2020-08-04zig fmtAndrew Kelley
2020-07-31Add prelim `openW` and `openatW`Jakub Konka
Added POSIX functions targeting Windows pass `open` and `openat` smoke tests.
2020-07-31Add some os.open and os.openat smoke testsJakub Konka
2020-07-31Use NtCreateFile directly in ReadLinkJakub Konka
This shaves off one syscall (we use one instead of two if we were to use `windows.OpenFile` wrapper). Clean up flag generation in `OpenFile`. Hopefully, we're in a much better place to *almost* support `openW` and `openatW`.
2020-07-31Move delete file logic into windows.DeleteFile fnJakub Konka
This way, we can remove more `kernel32` calls such as `RemoveDirectoryW` or `DeleteFileW`, and use `std.os.windows.DeleteFile` instead which is purely NT-based.
2020-07-31Refactor internal Win routines to reuse OpenFileJakub Konka
This covers mainly `ReadLink` and `CreateSymolicLink` functions.
2020-07-31Remove CreateDirectoryW and CreateFileW callsJakub Konka
Replace them with `std.os.windows.OpenFile` instead. To allow creation/opening of directories, `std.os.windows.OpenFileOptions` now features a `.expect_dir: bool` member which is meant to emualate POSIX's `O_DIRECTORY` flag.
2020-07-29Split DeviceIoControl path into two fn call pathsJakub Konka
As discussed in the previous commit, it would be better to avoid function pointers to syscalls and explicitly split the control path into two function calls instead. This commit addresses that for `std.os.windows.DeviceIoControl`.
2020-07-29Add Zig wrapper for kernel32.DeviceIoControlJakub Konka
This commit adds a Zig wrapper for `kernel32.DeviceIoControl` which applies ReactOS logic for deciding whether to use `ntdll.NtDeviceIoControlFile` or `ntdll.NtFsControlFile` based on the value of passed `IO_CONTROL_CODE`. The decision logic is based on the logic found in ReactOS found in the following [link]. Thanks to Daurnimator for finding this bit in ReactOS! [link]: https://doxygen.reactos.org/d3/d74/deviceio_8c.html
2020-07-27Replace DeviceIoControl with FsControlFileJakub Konka
This commit replaces `windows.DeviceIoControl` with `windows.FsControlFile` which is a wrapper around the NT-based syscall `ntdll.NtFsControlFile`.
2020-07-22Add signalfd support (#5322)luna
* add signalfd_siginfo to linux bits * Cast sigaddset's shift value to u5 * linux: add signalfd4 * os: add signalfd
2020-07-22Enable std.os.symlinkat tests on WindowsJakub Konka
2020-07-22Draft out ReadLinkW using NT primitivesJakub Konka
2020-07-22Finish drafting CreateSymolicLink using NT callsJakub Konka