| Age | Commit message (Collapse) | Author |
|
The lpFromLen should be a pointer.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
Remove syntax redundant with callconv
|
|
GetModuleHandleA is an kernel32 function and already defined there, it doesn't belong in user32.
|
|
|
|
|
|
* 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
|
|
|
|
* Get evented io code paths to build on macOS
* Use mode_t instead of usize where appropriate
|
|
|
|
|
|
|
|
FireFox317-windows-evented-io
|
|
|
|
`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.
|
|
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.
|
|
|
|
|
|
|
|
|
|
Use the Win32 API instead of using the VT escape sequences.
|
|
|
|
|
|
|
|
|
|
|
|
Add lock option to File.OpenFlags and File.CreateFlags
|
|
Also, make windows share delete access. Rationale: this is how it works
on Unix systems, mostly because locks are (usually) advisory on Unix.
|
|
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.
|
|
|
|
|
|
`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.
|
|
|
|
|
|
Fix some more libc definitions.
|
|
|
|
See #3811
|
|
|
|
|