Frank Denis
ad9655db3a
Fix Gimli for big-endian targets
2020-11-02 13:38:20 -05:00
Andrew Kelley
061ff11b2b
Merge pull request #6927 from LemonBoy/mipsbe-std
...
Fixes for stdlib for mips BE targets
2020-11-02 13:37:24 -05:00
Alex Cameron
ecdd636605
Fix file descriptor leak in fs.openFileZ.
2020-11-02 13:28:29 -05:00
Isaac Freund
50ba018223
std/ascii: add spaces array
...
This may be combined with std.mem.trim to form a proper replacement for
the now deprecated std.fmt.trimWhitespace().
2020-11-02 13:20:58 -05:00
LemonBoy
dc872a221d
std: Fix syscall stubs passing 64bit offsets for BE targets
2020-11-02 12:11:07 +01:00
LemonBoy
76e9a4ae83
std: Fix std.unicode test cases for BE targets
2020-11-02 11:48:06 +01:00
LemonBoy
02efc2236a
std: Fix json utf{8,16} decoding on BE targets
...
Byteswap some values when LE ordering is required.
2020-11-02 11:46:50 +01:00
LemonBoy
307496fcd7
std: Re-enable ArrayHashMap test for mips targets
2020-11-02 11:46:07 +01:00
Andrew Kelley
909aae8153
Merge pull request #6792 from koachan/sparc64-linux
...
Initial sparc64-linux bringup
2020-11-01 22:14:56 -05:00
Andrew Kelley
af60931a48
Merge pull request #6888 from jcmoyer/issues/6874
...
Update std.fmt docs and add test for null terminated slices with embedded null bytes
2020-11-01 18:30:09 -05:00
LemonBoy
445d808bae
std: Fix early overflow in time calculation
...
Closes #6867
2020-11-01 17:06:14 -05:00
LemonBoy
0d6a7088dc
stage1: Implement Add/Mul reduction operators
2020-11-01 14:30:31 -07:00
LemonBoy
6f3d6c1f45
std: Fix expectWithinEpsilon with negative values
2020-11-01 14:30:31 -07:00
Jakub Konka
d530e7f9c7
Make std.fmt.bufPrintIntToSlice public
...
Deprecate `std.fmt.trim` and `std.fmt.isWhiteSpace` in favour of
`std.mem` alternatives.
Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>
2020-11-01 15:48:50 -05:00
xackus
6418284680
std: add {set,get}rlimit bits and improve test
2020-11-01 15:47:46 -05:00
frmdstryr
36f1788762
Add missing arg
2020-11-01 15:40:42 -05:00
Frank Denis
c387f1340f
std/crypto: make Hkdf functions public
2020-11-01 18:27:11 +02:00
J.C. Moyer
788900c35c
Add test for null terminated slices with embedded null bytes
2020-10-30 23:58:23 -04:00
J.C. Moyer
b38dea37c7
Update doc comments to reflect current behavior
2020-10-30 23:58:23 -04:00
Travis
bb6e39e274
remove extra space in .** error message
2020-10-30 21:26:05 +02:00
Andrew Kelley
e59f44712d
Merge pull request #6875 from jorangreef/mips_syscalls
...
Add more mips syscall numbers
2020-10-30 13:31:12 -04:00
Veikka Tuominen
80dd432137
Merge pull request #6858 from travv0/no-star-after-dot-star
...
don't allow a token starting with an asterisk directly following .*
2020-10-30 16:08:04 +02:00
Joran Dirk Greef
ab1ed93ad9
Add close_range, faccessat2 and process_madvise
2020-10-30 12:39:01 +02:00
Joran Dirk Greef
9423ed1671
Add more mips syscall numbers
...
As per: lib/libc/musl/arch/mips/bits/syscall.h.in
...and as promised: https://github.com/ziglang/zig/pull/6356#issuecomment-696023349
Thanks @daurnimator again for the help with #6356 .
2020-10-30 11:53:45 +02:00
Koakuma
891c6ddd5f
Select stat struct type based on whether we are linking with libc
2020-10-30 11:46:33 +07:00
Andrew Kelley
aaff66b8ed
Merge pull request #6866 from LemonBoy/fix-zlib
...
Fix zlib EOB condition
2020-10-29 18:23:36 -04:00
Andrew Kelley
a41c0b63bb
Merge pull request #6356 from jorangreef/io_uring
...
std: add io_uring library
2020-10-29 18:20:38 -04:00
Travis
f51ccf0d1f
panic when empty string passed as dest_rel_path to addInstallFileWithDir
...
causes the creation of a file instead of the directory that's meant to
be created
2020-10-29 15:22:39 -04:00
Frank Denis
26793453a7
std/crypto/blake2b: allow the initial output length to be set
...
BLAKE2 includes the expected output length in the initial state.
This length is actually distinct from the actual output length
used at finalization.
BLAKE2b-256/128 is thus not the same as BLAKE2b-128.
This behavior can be a little bit surprising, and has been "fixed"
in BLAKE3.
In order to support this, we may want to provide an option to set the
length used for domain separation.
In Zig, there is another reason to allow this: we assume that the
output length is defined at comptime.
But BLAKE2 doesn't have a fixed output length. For an output length that
is not known at comptime, we can't take the full block size and
truncate it due to the reason above.
What we can do now is set that length as an option to get the correct
initial state, and truncate the output if necessary.
2020-10-29 15:18:37 -04:00
wozeparrot
32e65c3f96
make addBuildOption append type ( #6801 )
...
* add addBuildOption test
2020-10-29 15:16:47 -04:00
Andrew Kelley
3a0e8c2b45
Merge pull request #6838 from LemonBoy/netstuff
...
std: Add basic smoke test for net functionality
2020-10-29 15:10:29 -04:00
Andrew Kelley
844eb932f4
Merge pull request #6841 from ifreund/fix-event-loop
...
std/event: fix poll error set handling
2020-10-29 14:41:18 -04:00
Frank Denis
e59dd7eecf
std/crypto/x25519: return encoded points directly + ed->mont map
...
Leverage result location semantics for X25519 like we do everywhere
else in 25519/*
Also add the edwards25519->curve25519 map by the way since many
applications seem to use this to share the same key pair for encryption
and signature.
2020-10-29 14:39:58 -04:00
Frank Denis
5764c550ed
std/crypto: vectorize Salsa20
...
20% faster on x86_64, slower on aarch64 as usual :/
2020-10-29 14:34:58 -04:00
Jakub Konka
17575019a0
Set page size to 16KB for aarch64 macos
...
With this tweak, `test-std` pass on Apple Silicon + BigSur.
2020-10-29 14:21:43 -04:00
Frank Denis
bb3dfd2708
std/math: add support for vectors to rotl()/rotr()
2020-10-29 14:17:46 -04:00
Vexu
a63fd34c50
return a valid node even if invalid deref was used
2020-10-29 19:20:15 +02:00
Travis
d7f9128b5d
add error message to zig side of tokenizing/parsing
2020-10-29 12:03:45 -05:00
Travis
960b5b518f
updated zig tokenizer to handle .*** and added tests
2020-10-29 12:03:45 -05:00
LemonBoy
20fba0933f
std/deflate: Avoid reading past end of stream
...
Use a conservative (and slower) approach in the Huffman decoder fast
path.
Closes #6847
2020-10-29 17:16:03 +01:00
Koakuma
5125eb77bd
Use the *_stat type as self
2020-10-29 21:37:45 +07:00
Veikka Tuominen
85dd5746bd
Merge pull request #6678 from s-ol/doc-type-aware
...
generated docs improvements: add vector, fntype, anytype type-printing; bool, function value-printing
2020-10-29 15:19:02 +02:00
LemonBoy
fe6cc0c3ba
std: Better handling of type values in expectEqual
2020-10-29 15:13:44 +02:00
LemonBoy
88eb3ae8e5
std: Better handling of type values in expectEqual
2020-10-29 11:10:21 +01:00
s-ol
6e96352b90
docs: link to functions in getValueText and getCallHtml
2020-10-29 00:10:22 +01:00
Frank Denis
0adc144f88
std/crypto: adjust aesni parallelism to CPU models
...
Intel keeps changing the latency & throughput of the aes* and clmul
instructions every time they release a new model.
Adjust `optimal_parallel_blocks` accordingly, keeping 8 as a safe
default for unknown data.
2020-10-28 21:44:00 +02:00
Frank Denis
ea45897fcc
PascalCase *box names, remove unneeded comptime & parenthesis
...
Also rename (salsa20|chacha20)Internal() to a better name.
And sort reexported crypto.* names
2020-10-28 21:43:15 +02:00
Jakub Konka
4f50958407
Clean up exporting of symbols on Darwin
2020-10-28 10:36:19 +01: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
Jakub Konka
bda9a159aa
Apple Silicon: no fstat$INODE64 symbol found
...
It seems that Apple has finally got rid of the 32bit versions of
`fstat` and `fstatat`, and instead, only 64bit versions are available
on BigSur and Apple Silicon.
The tweak in this commit is required to make Zig stage1 compile on
BigSur + aarch64.
2020-10-27 22:47:53 +01:00