Andrew Kelley
e1f4f44dff
std: improve non-libc dynamic library loading
...
this is a cherry-pick of
5076f2d4f6918946616504d22907c9f80601caf8
from the llvm10 branch
2020-02-05 18:10:26 -05:00
nofmal
a697de3eac
Add basic linux termios implementation
2020-02-04 14:09:57 -05:00
daurnimator
b9f720365c
Turn win32 errors into a non-exhaustive enum
2020-01-31 22:33:55 +11:00
daurnimator
7cf0b02ab4
NTSTATUS is a non-exhaustive enum
2020-01-31 22:33:17 +11:00
LemonBoy
1ba4554855
Correct dl_iterate_phdr address
...
The base should be zero so that p_vaddr + dlpi_addr = p_vaddr
2020-01-29 12:05:36 -05:00
Andrew Kelley
7b73c7fe12
Merge branch 'std-utf16-sentinel-terminated' of https://github.com/daurnimator/zig
2020-01-07 16:13:34 -05:00
Colin Svingen
4e6ad8efd9
Removes proc_raise from WASI implementation
2020-01-06 14:04:55 -05:00
data-man
2f6b045fb1
Add std.os.getrusage
2020-01-05 16:52:36 -05:00
Andrew Kelley
0c8ec369f0
std.os.memfd_create: add error.SystemOutdated
2019-12-31 17:57:20 -05:00
Andrew Kelley
8186211404
improvements to memfd_create
...
* move test from std/io/test.zig to std/os/test.zig
* do glibc version check, and make direct system call if
glibc is too old
* disable test when not linking libc, to avoid not working
with outdated qemu version on the CI server. see #4019
2019-12-31 16:34:14 -05:00
Luna
f0cbf63e1a
os: use system for memfd_create
...
- os: update flags type for memfd_create
2019-12-31 15:58:03 -05:00
Luna
997812e8fb
os: add memfd_create
...
currently only linux is supported
2019-12-31 15:58:03 -05:00
Andrew Kelley
99f6f8ead9
update setsockopt error set according to POSIX
...
In the code review I accidentally encouraged Luna to remove some
handling of errors that are possible according to POSIX, but I think how
Luna had it before was better, so I fixed it, and now the branch should
be good to merge.
2019-12-30 19:35:05 -05:00
Luna
22f6297157
std.os: update error set for setsockopt
2019-12-30 19:26:30 -05:00
Luna
5efc0ea89e
std.os: make setsockopt receive a slice as option
2019-12-30 19:26:30 -05:00
Luna
0e67568bca
net: fix Options
...
- os: fix typos on setsockopt
2019-12-30 19:26:30 -05:00
Luna
4a4d2c0d80
os: add setsockopt
...
- net: use os.setsockopt()
2019-12-30 19:26:29 -05:00
daurnimator
2662e50d27
std: sentinel terminated pointers for utf16 apis
2019-12-29 10:35:05 +11:00
daurnimator
59348240d7
std: use wrappers from raise() rather than raw syscalls
2019-12-22 20:20:58 +11:00
daurnimator
c31afc3736
std: remove high level linux sigprocmask wrappers
2019-12-22 20:20:58 +11:00
Andrew Kelley
26f3c2d061
fix std.mem.addNullByte and implement sentinel slicing
...
see #3770
2019-12-20 18:28:56 -05:00
Christine Dodrill
b37acc4d68
allow custom OS entrypoint
...
Also:
* Expose `std.start.callMain`.
* Other fixes added to fix issues found in development.
2019-12-12 16:00:23 -05:00
Robin Voetter
4b4fbe3887
Replace @typeOf with @TypeOf in all zig source
...
This change was mostly made with `zig fmt` and this also modified some whitespace. Note that in some files, `zig fmt` produced incorrect code, so the change was made manually.
2019-12-10 11:09:41 -05:00
Andrew Kelley
8b2622cdd5
std.fmt.format: tuple parameter instead of var args
2019-12-08 22:53:51 -05:00
Andrew Kelley
ad214c7aa0
bring your own OS layer in the std lib
...
closes #3784
2019-12-02 15:02:17 -05:00
Andrew Kelley
dcbd5ad155
remove upstream support for Zen hobby OS
...
The new plan to support hobby operating systems is #3784 .
And what kind of name is "Zen" anyway? There's already a
[Zen programming language](http://zenlang.sourceforge.net/ )
and that's just confusing.
2019-12-02 12:01:49 -05:00
Andrew Kelley
b36c07a95a
Merge remote-tracking branch 'origin/master' into remove-array-type-coercion
2019-12-01 09:56:01 -05:00
Andrew Kelley
034ccb4e4e
add missing error code handling on Windows
2019-11-30 16:58:32 -05:00
Andrew Kelley
413f9a5cfc
move std.fs.Dir.cwd
to std.fs.cwd
...
update to non-deprecated std.fs APIs throughout the codebase
Related: #3811
2019-11-30 15:35:27 -05:00
Andrew Kelley
b220be7a33
more test regression fixes
2019-11-29 23:04:19 -05:00
Andrew Kelley
d87b13f2f7
fix windows std lib regressions
2019-11-29 21:55:27 -05:00
Andrew Kelley
4261fa3c49
move logic to the appropriate layers; add new compile error
2019-11-25 18:46:17 -05:00
Andrew Kelley
659c1bdeee
Merge branch 'wasi-run-tests' of https://github.com/fengb/zig into fengb-wasi-run-tests
2019-11-25 17:53:26 -05:00
Andrew Kelley
bdf3680be1
zig fmt
2019-11-25 13:53:13 -05:00
Andrew Kelley
29e438fd1f
more sentinel-terminated pointers std lib integration
...
See #3767
2019-11-25 00:43:36 -05:00
Andrew Kelley
15d415e10b
make std.mem.toSlice use null terminated pointers
...
and fix the fallout
2019-11-24 21:21:05 -05:00
Andrew Kelley
47f06be369
string literals are now null terminated
...
this also deletes C string literals from the language, and then makes
the std lib changes and compiler changes necessary to get the behavior
tests and std lib tests passing again.
2019-11-21 20:43:41 -05:00
Benjamin Feng
b88bb93af3
WASI isatty
2019-11-19 20:17:00 -06:00
Andrew Kelley
3cf5c2c62b
fix regressed tests and update docs to use "type coercion"
2019-11-08 15:57:25 -05:00
Andrew Kelley
e0db54e89d
update the codebase to use @as
2019-11-08 15:57:24 -05:00
Andrew Kelley
2723ffc2b2
fixups and zig fmt
2019-11-08 01:52:23 -05:00
Andrew Kelley
fbbcf2f30d
Merge branch 'adaptive_lock' of https://github.com/kprotty/zig into kprotty-adaptive_lock
2019-11-08 01:21:22 -05:00
kprotty
bb4abfdc78
Use system
instead of builtin.link_libc
2019-11-07 16:36:33 -06:00
kprotty
12e68cbeb6
pthread_sched_yield -> sched_yield
2019-11-07 16:33:25 -06:00
kprotty
b535e86cc0
move SpinLock definitions around
2019-11-07 15:32:20 -06:00
Andrew Kelley
6c17282062
std.os.read can fail with ConnectionResetByPeer
2019-11-04 14:40:30 -05:00
Luna
2e0dd5733f
add FileNotFound to os.ConnectError error set
2019-11-02 15:49:15 -04:00
Luna
d535bf2c7d
add FileNotFound error to os.connect
2019-11-02 15:49:15 -04:00
Andrew Kelley
f749bf0942
std.os: fix sendto, poll, recvfrom when linking libc
...
Thank you to Brendan Hansknecht for this patch.
2019-11-02 15:15:56 -04:00
Andrew Kelley
61d5a0bf48
Merge branch 'std.net'
2019-10-30 21:30:16 -04:00