LemonBoy
ce65533985
std: Properly fix the TLS alignment problem
...
ad05509 introduced a fix for the wrong problem, the logic to align the
start of main_thread_tls_buffer was already there but was flawed.
Fix it for good and avoid wasting too many bytes for alignment purposes.
2020-12-18 14:22:30 -05:00
Andrew Kelley
ad05509930
std: align(16) main_thread_tls_buffer
...
Before this change, thread local variables were landmines if LLVM
decided to optimize any writes to them using vector instructions.
2020-12-17 22:58:56 -07:00
Tau
9b86dde7b9
Add baudrate constants
...
This adds the missing baudrate constants for linux where I've used them
directly.
2020-12-17 19:17:10 +02:00
Luuk de Gram
d73f46b57c
Fix StackFallbackAllocator
2020-12-17 19:09:29 +02:00
Dmitry Atamanov
e16997a66c
Add process_madvise to Linux syscalls ( #7450 )
2020-12-17 18:58:09 +02:00
data-man
d877eb0e8d
Fix typo in math.order
2020-12-16 12:14:44 +02:00
luna
0c33624a45
create SendToError ( #7417 )
...
* add SendToError
* remove error catch
* add missing SendToError entries
* add mappings to new errors for posix
* map windows sendto() errors
2020-12-15 14:56:42 -05:00
Sébastien Marie
8bf5a3a5c1
openbsd: correct few structs
...
- addrinfo: addr and canonname are switched (wrong layout)
- addrinfo, Flock, msghdr struct: use proper c_xxx type instead of fixed size. it should help using struct on all architectures supported by openbsd
2020-12-15 14:49:42 -05:00
data-man
8591f30b0d
Add missed Linux syscalls
2020-12-14 18:22:28 +02:00
Jakub Konka
91e8be385c
Merge pull request #7411 from LemonBoy/sigaction-smoke
...
std: Improve sigaction interface
2020-12-14 17:16:55 +01:00
LemonBoy
a471a57560
std: Fix formatting of type values
...
Closes #7429
2020-12-13 23:21:23 -05:00
LemonBoy
d9e9390550
Fix compilation error on OpenBSD
2020-12-13 20:36:47 +01:00
LemonBoy
bb72b0e800
Fix compilation error on FreeBSD
2020-12-13 20:36:34 +01:00
LemonBoy
97ba3d9a66
std: Drop struct prefixes in FreeBSD siginfo
...
I'm not sure this prefix-free style is a good idea, but let's roll with
it for the moment.
2020-12-13 19:45:11 +01:00
Alex Cameron
7515922907
Fix Sigaction struct on FreeBSD.
2020-12-13 19:37:13 +01:00
LemonBoy
3a759fdb17
Disable sigaction test on i386 because of #7427
2020-12-13 19:35:40 +01:00
LemonBoy
3375a580be
std: Update more siginfo bits for BSDs
2020-12-13 19:28:38 +01:00
LemonBoy
fc70db5ab5
std: Fixes for siginfo test on macos
...
Xnu's sigaction() only supports fetching a limited set of sa_flags, test
SA_SIGINFO instead of SA_RESETHAND as that's supported everywhere.
Add another check to make sure SA_RESETHAND works.
Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2020-12-13 19:17:04 +01:00
Isaac Freund
078a64f8d9
std.CrossTarget: add isNativeAbi()
2020-12-13 00:40:35 +01:00
LemonBoy
629cc6cf28
std: Further siginfo refinements
...
* Define siginfo and sigaction for Darwin
* Define sigaction/handler union for maximum libc compatibility
* Minor correction to some type definitions
2020-12-12 16:44:10 +01:00
LemonBoy
1d9b28403a
std: Correct check in signal test
...
Ooops.
2020-12-12 15:34:26 +01:00
LemonBoy
beae3cea17
std: Improve sigaction interface
...
Add a smoke test to prevent regressions.
2020-12-12 13:57:25 +01:00
Andrew Kelley
d569e37cb5
std.fs.path.extension: different behavior for ending dot
...
extension("a.") now returns "." instead of "".
This matches both Python and Node.js standard library behavior as well
as my personal opinion on how this function should be defined.
Apologies for missing this in the code review.
2020-12-11 18:20:57 -07:00
Andrew Kelley
52bc1442d6
std.fs.path.extension: add additional API guarantee
...
Added:
The returned slice is guaranteed to have its pointer
within the start and end pointer address range of `path`,
even if it is length zero.
2020-12-11 17:41:34 -07:00
Andrew Kelley
1852dc7e13
Merge pull request #7098 from MasterQ32/std.fs.path.extension
...
Implements std.fs.path.extension
2020-12-11 19:32:21 -05:00
LemonBoy
fa6449dac0
zig fmt: Fix alignment of initializer elements
...
Resetting `column_counter` is not needed as the effective column number
is calculated by taking that value modulo `row_size`.
Closes #7289
2020-12-11 02:34:44 -05:00
antlilja
26399b5249
Added global-cache argument to build system + removed extra args.
...
* Field global_cache_root was added to Builder struct along with
mandatory argument for build_runner.zig. Logic for using the custom
global cache was also added.
* The arguments --cache-dir and --global-cache-dir are no longer passed
directly through to build_runner.zig and are instead only passed through the
mandatory cache_root and global_cache_root arguments.
2020-12-10 18:06:19 -05:00
Andrew Kelley
a3de27ef3b
Merge pull request #7372 from LemonBoy/atomicint
...
Improvements for std.atomic.{Int,Bool}
2020-12-10 16:13:36 -05:00
Andrew Kelley
5a5389128d
Merge pull request #7369 from jorangreef/io_uring_timeout
...
Add io_uring TIMEOUT and TIMEOUT_REMOVE operations:
2020-12-10 15:45:38 -05:00
Vexu
afc21a2f1c
make std.json.unescapeString pub
2020-12-10 21:19:41 +02:00
Joran Dirk Greef
b5a9fd9f98
Skip timeout_remove test where not supported by the kernel
2020-12-10 11:34:20 +02:00
LemonBoy
88e3a7d6dc
std: Fix misuse of atomic.Int
2020-12-10 09:23:48 +01:00
LemonBoy
5e91cc2fe3
std: Validate the atomic ordering parameter in atomic.Int
2020-12-10 09:23:48 +01:00
LemonBoy
5844511408
std: prevent instantiation of atomic.Int with non-integral types
2020-12-10 09:23:48 +01:00
LemonBoy
ef7db9717e
std: introduce meta.traits.is{Integral,Float}
2020-12-10 09:23:48 +01:00
Jakub Konka
23c1b7faee
Merge pull request #7368 from kubkon/macho-trie-cleanup
...
stage2: MachO export trie cleanup
2020-12-10 08:32:59 +01:00
Joran Dirk Greef
dd3eac2eb1
Debug CI io_uring unsupported op
2020-12-10 08:36:33 +02:00
Andrew Kelley
6e636064e6
MoveFileEx can return ACCESS_DENIED
...
I observed this on Windows 10, trying to use MoveFileEx with
MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH
to overwrite a running executable.
2020-12-09 15:03:17 -07:00
Jakub Konka
4c3e6c5bff
macho: cleanup export trie generation and parsing
...
Now, ExportTrie is becoming usable for larger linking contexts such
as linking in multiple object files, or relinking dylibs, etc.
2020-12-09 20:36:58 +01:00
Andrew Kelley
f291194834
Merge pull request #7362 from Vexu/std
...
zig fmt improvement and small miscellaneous fixes
2020-12-09 14:29:15 -05:00
Andrew Kelley
5ff0f364a5
Merge pull request #7366 from LemonBoy/fix-7346
...
Some compiler-rt fixes
2020-12-09 14:19:58 -05:00
Joran Dirk Greef
349d32dc2c
Add io_uring TIMEOUT and TIMEOUT_REMOVE operations:
...
ring.timeout() to queue a IORING_OP_TIMEOUT operation
ring.timeout_remove() to queue a IORING_OP_TIMEOUT_REMOVE operation
io_uring_prep_timeout() to prep a IORING_OP_TIMEOUT sqe
io_uring_prep_timeout_remove() to prep a IORING_OP_TIMEOUT_REMOVE sqe
2020-12-09 19:06:28 +02:00
LemonBoy
6f220bb7ca
std: explicitly cast indices to usize
...
This is needed for platforms where usize=u16, eg. MSP430.
2020-12-09 16:48:41 +01:00
LemonBoy
afd491c07e
compiler-rt: Fix compilation of clzsi for armv6 targets
2020-12-09 16:48:02 +01:00
LemonBoy
518168edb2
compiler-rt: Avoid exposing atomic builtins when not supported
...
Let's a void any kind of compilation/LLVM errors for niche targets such
as AVR/MSP430 or ARM v6m. By not exporting any atomic builtin anymore
the user is free to provide their own implementation (that disable the
IRQs) or to provide the --single-threaded switch and forget about this.
2020-12-09 16:33:53 +01:00
Vexu
7e30e83900
small fixes and zig fmt
2020-12-09 13:54:26 +02:00
Vexu
be71994fb1
zig fmt: improve var decl initializer formatting
2020-12-09 13:47:22 +02:00
Andrew Kelley
4592fd26b9
add std.testing.expectStringEndsWith
2020-12-08 21:59:24 -07:00
xackus
21550bb7cd
std.json: unreachable -> expect in tests
2020-12-08 19:16:17 -05:00
antlilja
c796c4528e
Add option to override default stack size in build system.
2020-12-08 16:18:16 -05:00