Luna
5f7b97e84c
add AddressFamilyNotSupported to SendError
2020-12-07 16:40:03 -05:00
Isaac Freund
92ec24f77c
std/os: remove unneeded error from accept errorset
...
POSIX compliant fnctl cannot return EPERM when getting/setting the given
flags. See the specification here:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html
2020-11-30 20:00:26 -08:00
Alexandros Naskos
f7d0a32045
Switched OBJECT_NAME_INVALID handling to unreachable in faccessatW
2020-11-30 18:08:27 -07:00
Alexandros Naskos
beb9d33d6d
Disallow absolute paths passed as system libraries
...
Added OBJECT_NAME_INVALID handling in faccessatW
2020-11-30 18:08:27 -07:00
Jonathan Marler
b587a42233
add std.os.shutdown function for sockets
2020-11-30 11:25:03 -08:00
Jonathan Marler
48660371a2
std.meta: add assumeSentinel
2020-11-29 10:36:02 -08:00
LemonBoy
f8ddc3d873
std: Fix file locking logic for BSD targets
2020-11-23 18:00:05 +01:00
LemonBoy
3e22077d46
Fix the ELF base calculation
...
Find the effective ELF load address in dl_iterate_phdr by computing the
difference between the in-memory phdr and its p_vaddr specified in the
ELF file.
This makes the dl_iterate_phdr test pass and restores the stack traces.
2020-11-23 15:06:07 +01:00
Žiga Željko
2fbe9519ac
std: add support for ppoll
2020-11-21 14:06:04 -08:00
Tadeo Kondrak
25ec2dbc1e
Add builtin.Signedness, use it instead of is_signed
2020-11-19 18:59:21 +02:00
Jakub Konka
663e112773
std: add chdir smoke test
2020-11-18 15:37:44 +01:00
Lee Cannon
64feae3ac3
Move utf8->utf16 up one level into os.zig
2020-11-18 15:37:44 +01:00
Lee Cannon
dbbe709dc7
use else in err switch
2020-11-18 15:37:44 +01:00
Lee Cannon
32c998e03c
Switch to RtlSetCurrentDirectory_U
2020-11-18 15:37:44 +01:00
Lee Cannon
80b1e82b1b
Implement chdir and chdirZ for Windows
2020-11-18 15:37:44 +01:00
g-w1
a0226ab05b
std: openDirAbsolute and accessAbsolute ( #7082 )
...
* add more abosolutes
* added wrong files
* adding 2 tests and changing the function signatures because of lazy analysis not checking them
* fix a bug that got uncovered by lazy eval
* Add compile error when using WASI with openDirAbsolute and accessAbsolute
* typo
2020-11-18 08:42:35 +01:00
Andrew Kelley
c9551652b0
Merge pull request #6978 from LemonBoy/statshit
...
Decouple kernel and libc stat definitions
2020-11-05 17:27:22 -05:00
LemonBoy
0e95fa455c
std: Split kernel&libc definitions of stat struct
...
There's no guarantee for the kernel definition to be ABI compatible with
the libc one (and vice versa).
There's also no guarantee of ABI compatibility between musl/glibc.
Fun, isn't it?
2020-11-05 09:38:50 +01:00
daurnimator
b90fb1e96b
std: add PR enum for the prctl opcode
2020-11-04 22:32:57 +11:00
daurnimator
02252f3f07
std: workaround #280 in prctl
2020-11-04 22:23:59 +11:00
xackus
6418284680
std: add {set,get}rlimit bits and improve test
2020-11-01 15:47:46 -05:00
LemonBoy
7f46672193
More fixups for Windows targets
...
* Use closeSocket on sockets instead of plain old close, the latter
doesn't work on them.
* Use winsocket2 everywhere, mingw has no BSD sockets.
2020-10-28 10:03:23 +01:00
LemonBoy
8044ed4c66
std: Add basic smoke test for net functionality
2020-10-27 21:52:47 +01:00
Andrew Kelley
569f7ce49e
Merge branch 'improve-windows-networking'
...
of https://github.com/BarabasGitHub/zig into
BarabasGitHub-improve-windows-networking
Conflicts:
lib/std/os.zig
This commit resolves conflicts with the changes to std.os which removed
the EAGAIN error handling interactions with the event loop. The solution
to the conflict was to apply EAGAIN => return error.WouldBlock into the
improved windows networking branch.
2020-10-22 16:59:15 -07:00
Frank Denis
6ddb05d996
Darwin has arc4random(), too
2020-10-18 18:24:36 +02:00
Nathan Bourgeois
e55244c4c6
BYOS support for system.isatty(fd: fd_t); ( #6686 )
2020-10-17 21:13:10 -04:00
Andrew Kelley
03f7cffce9
Merge branch 'openbsd-minimal' of https://github.com/semarie/zig into semarie-openbsd-minimal
2020-10-17 17:34:43 -07:00
Sebastien Marie
35a7247a2c
Merge branch 'master' into openbsd-minimal
2020-10-17 17:38:23 +02:00
Jan Prudil
aadccc4206
Make std.meta.Int accept a signedness parameter
2020-10-17 14:09:59 +02:00
Andrew Kelley
5c16022c81
rename WaitpidRet to WaitPidResult
2020-10-16 18:14:39 -07:00
stf
3921cb0d8d
std.os.waitpid: also return pid of child
...
closes #6581
2020-10-16 17:26:50 -07:00
Vignesh Rajagopalan
2ab0c7391a
Rename .macosx to .macos
2020-10-12 18:56:25 -04:00
Sébastien Marie
4c4211ea8e
merge netbsd and openbsd cases
2020-10-11 10:22:28 +00:00
Sébastien Marie
f33a610c84
add minimal openbsd support
2020-10-11 08:23:36 +00:00
Andrew Kelley
76a195473d
Merge pull request #6516 from LemonBoy/fastfilecopy
...
std: Make file copy ops use zero-copy mechanisms
2020-10-08 20:14:47 -04:00
LemonBoy
03762da2af
New review round
2020-10-07 11:13:26 +02:00
LemonBoy
1f7ec0de70
Address review comments & fix compilation errors
2020-10-06 11:57:23 +02:00
LemonBoy
a419a1aabc
Move copy_file to fs namespace
...
Now it is a private API.
Also handle short writes in copy_file_range fallback implementation.
2020-10-06 09:38:59 +02:00
xackus
1b4296831a
simplify api and add smoke test
2020-10-04 23:57:49 +02:00
xackus
4ec26be424
implement {get, set}rlimit for linux
2020-10-04 23:56:10 +02:00
LemonBoy
8b4f5f039d
Alternative strategy to avoid calling stat()
...
This is an optimization as it avoids an extra syscall, but it's also a
workaround for fstat being not available on Windows.
2020-10-03 19:51:22 +02:00
LemonBoy
0f248e0988
std: Make file copy ops use zero-copy mechanisms
...
Use copy_file_range on Linux (if available), fcopyfile on Darwin,
sendfile on *BSDs (and on Linux kernels without copy_file_range).
2020-10-03 12:31:17 +02:00
Loris Cro
a2074c1ec3
fix symlink path not being resolved in darwin
...
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-10-02 17:06:29 +02:00
Loris Cro
8d01133bd0
update doc comments
...
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-25 18:42:24 +02:00
Loris Cro
c196c27af8
recvfrom
...
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 22:06:41 +02:00
Loris Cro
419aea54cb
sendto
...
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 22:06:41 +02:00
Loris Cro
7fec5b3def
pwritev
...
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 22:06:41 +02:00
Loris Cro
7a07c62a07
pwrite
...
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 22:06:21 +02:00
Loris Cro
18f6629bd8
writev
...
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 22:06:03 +02:00
Loris Cro
9075f8e5a1
write
...
Signed-off-by: Loris Cro <kappaloris@gmail.com>
2020-09-24 22:05:41 +02:00