aboutsummaryrefslogtreecommitdiff
path: root/lib/std/os
AgeCommit message (Collapse)Author
2020-05-30Fix WSARecvFrom signatureAlexandros Naskos
The lpFromLen should be a pointer.
2020-05-29more windows network support, including dnsJonathan Marler
2020-05-25fix pwrite on 32-bit linuxAndrew Kelley
2020-05-25fix regression in std.os.windows.fromSysTimeAndrew Kelley
2020-05-24(breaking) std.time fixups and API changesAndrew Kelley
Remove the constants that assume a base unit in favor of explicit x_per_y constants. nanosecond calendar timestamps now use i128 for the type. This affects fs.File.Stat, std.time.nanoTimestamp, and fs.File.updateTimes. calendar timestamps are now signed, because the value can be less than the epoch (the user can set their computer time to whatever they wish). implement std.os.clock_gettime for Windows when clock id is CLOCK_CALENDAR.
2020-05-24os/bits/freebsd auditJethro Nederhof
2020-05-24FreeBSD: missing networking constantsJethro Nederhof
2020-05-22Add poll definitions for DarwinGreg Anders
2020-05-18Integrate getTestDir with tmpDir logicJakub Konka
2020-05-18Make mode_t a 0-byte type in WASIJakub Konka
2020-05-18Add/fix missing WASI functionality to pass libstd testsJakub Konka
This rather large commit adds/fixes missing WASI functionality in `libstd` needed to pass the `libstd` tests. As such, now by default tests targeting `wasm32-wasi` target are enabled in `test/tests.zig` module. However, they can be disabled by passing the `-Dskip-wasi=true` flag when invoking the `zig build test` command. When the flag is set to `false`, i.e., when WASI tests are included, `wasmtime` with `--dir=.` is used as the default testing command. Since the majority of `libstd` tests were relying on `fs.cwd()` call to get current working directory handle wrapped in `Dir` struct, in order to make the tests WASI-friendly, `fs.cwd()` call was replaced with `testing.getTestDir()` function which resolved to either `fs.cwd()` for non-WASI targets, or tries to fetch the preopen list from the WASI runtime and extract a preopen for '.' path. The summary of changes introduced by this commit: * implement `Dir.makeDir` and `Dir.openDir` targeting WASI * implement `Dir.deleteFile` and `Dir.deleteDir` targeting WASI * fix `os.close` and map errors in `unlinkat` * move WASI-specific `mkdirat` and `unlinkat` from `std.fs.wasi` to `std.os` module * implement `lseek_{SET, CUR, END}` targeting WASI * implement `futimens` targeting WASI * implement `ftruncate` targeting WASI * implement `readv`, `writev`, `pread{v}`, `pwrite{v}` targeting WASI * make sure ANSI escape codes are _not_ used in stderr or stdout in WASI, as WASI always sanitizes stderr, and sanitizes stdout if fd is a TTY * fix specifying WASI rights when opening/creating files/dirs * tweak `AtomicFile` to be WASI-compatible * implement `os.renameatWasi` for WASI-compliant `os.renameat` function * implement sleep() targeting WASI * fix `process.getEnvMap` targeting WASI
2020-05-17linux: remove duplicated fieldsVincent Rischmann
2020-05-08std: fix RTLD_ constants on OSXdaurnimator
2020-05-07Merge pull request #5268 from tadeokondrak/remove-callconv-redundant-syntaxAndrew Kelley
Remove syntax redundant with callconv
2020-05-07Removed GetModuleHandleA from user32Jens Goldberg
GetModuleHandleA is an kernel32 function and already defined there, it doesn't belong in user32.
2020-05-07Removed duplicate WM_ACTIVATEJens Goldberg
2020-05-05zig fmtTadeo Kondrak
2020-05-02solve the problem with Darwin shims in std.os insteadAndrew Kelley
* implement SOCK_NONBLOCK and SOCK_CLOEXEC Darwin shims in std.os * revert changes to std.net * remove os.accept and rename os.accept4 to os.accept
2020-05-02Merge remote-tracking branch 'origin/master' into FireFox317-windows-evented-ioAndrew Kelley
2020-05-02Get evented io code paths to build on macOS (#5233)Chris Heyes
* Get evented io code paths to build on macOS * Use mode_t instead of usize where appropriate
2020-05-02fix regressions in windows std lib testsAndrew Kelley
2020-05-02std.event.Loop: promote the fs thread to be available for all OS'sAndrew Kelley
2020-05-01cleanup and fixes. behavior tests passing with evented I/OAndrew Kelley
2020-05-01Merge branch 'windows-evented-io' of https://github.com/FireFox317/zig into ↵Andrew Kelley
FireFox317-windows-evented-io
2020-05-01Added socket bits for DarwinCato Auestad
2020-04-30Fast-forward std.os.bits.wasi to match preview1 snapshot ABIJakub Konka
`wasi_snapshot_preview1` introduced a couple of ABI changes. This commit fast-forwards the types and consts defined in `std.os.bits.wasi` to match those changes.
2020-04-30Update WASI snapshot to preview1Jakub Konka
This commit updates the WASI imports to use `wasi_snapshot_preview1` instead of the old `wasi_unstable`. There are some minor ABI differences between the two, however, the main motivator for using the latest "stable" snapshot (aka preview1) is that, at least in Wasmtime, there has been a lot of improvement work put into preview1 and unfortunately I might add, the improvements were not (in full) backported to `wasi_unstable` snapshot. Also, this commit removes the optional bound on the pointer to `environ_get` syscall.
2020-04-28std.meta.IntType -> std.meta.IntTadeo Kondrak
2020-04-28@OpaqueType -> @Type(.Opaque)Tadeo Kondrak
2020-04-27std: support `/` in Windows pathsAndrew Kelley
2020-04-24Add mips support to standard libraryTimon Kruiper
2020-04-22std: Implement progress for WindowsLemonBoy
Use the Win32 API instead of using the VT escape sequences.
2020-04-18update std lib to decls being disallowed between fieldsVexu
2020-04-15translate-c cleanup and zig fmtVexu
2020-04-14Added gdi32.zig and More user32 definitionsJakub
2020-04-12fix file protocol structure definitions (#5015)Heppoko
2020-04-12std: add some basic windows user32 definitionsdaurnimator
2020-04-10Merge pull request #4711 from leroycep/feature-file-locksAndrew Kelley
Add lock option to File.OpenFlags and File.CreateFlags
2020-04-07Add lock_nonblocking flag for creating or opening filesLeRoyce Pearson
Also, make windows share delete access. Rationale: this is how it works on Unix systems, mostly because locks are (usually) advisory on Unix.
2020-04-07Fix file locking on windowsLeRoyce Pearson
The share_access bitfield was being ORed with what was supposed to be parts of the default value, meaning that the share_access would be more permissive than expected.
2020-04-07Add missing constants for DragonFlyMichael Neumann
2020-04-02Add LOCK_* constants to BSD `os/bits`LeRoyce Pearson
2020-04-02Use `flock` instead of `fcntl` to lock filesLeRoyce Pearson
`flock` locks based on the file handle, instead of the process id. This brings the file locking on unix based systems closer to file locking on Windows.
2020-04-02Merge branch 'master' into feature-file-locksLeRoyce Pearson
2020-04-01Workaround for #4789LemonBoy
2020-04-01std: Fix more NetBSD bitsLemonBoy
Fix some more libc definitions.
2020-03-31std: linux syscall numbers are now an extensible enumdaurnimator
2020-03-30std lib API deprecations for the upcoming 0.6.0 releaseAndrew Kelley
See #3811
2020-03-30std: fix compile error since WinsockError was changeddaurnimator
2020-03-30std: add some missing errnos on linuxdaurnimator