Andrew Kelley
67154d233e
Merge pull request #8686 from Vexu/try
...
Allow tests to fail
2021-05-08 17:29:44 -04:00
Andrew Kelley
b6bb0ee1ac
Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen
...
Conflicts:
* lib/std/os/linux/tls.zig
* test/behavior/align.zig
* test/behavior/atomics.zig
* test/behavior/vector.zig
2021-05-08 10:53:22 -07:00
Veikka Tuominen
fd77f2cfed
std: update usage of std.testing
2021-05-08 15:15:30 +03:00
Michael Dusan
84d5cc31c5
fix test to restore cwd after chdir
...
- `../zig-cache/tmp` is no longer created by subsequent test(s)
2021-05-07 01:04:38 -04:00
Andrew Kelley
530e67cb86
Merge pull request #8683 from LemonBoy/thumblinux
...
Initial bringup for Linux/Thumb2
2021-05-06 12:50:34 -04:00
Andrew Kelley
fc40d23723
Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen
...
Conflicts:
* build.zig
* lib/std/array_list.zig
* lib/std/c/ast.zig
* lib/std/c/parse.zig
* lib/std/os/bits/linux.zig
2021-05-05 10:48:22 -07:00
LemonBoy
afbcb6209d
std: Initial bringup for Linux on Thumb2
...
There are some small problems here and there, mostly due to the pointers
having the lsb set and disrupting the fn alignment tests and the
`@FrameSize` implementation.
2021-05-04 18:52:53 +02:00
lithdew
96fe49ef62
std/os/bits/windows: add timeval extern struct
2021-05-03 14:49:10 +09:00
lithdew
16fc1b904c
std/os/linux/bits: correct socket option codes for ppc/ppc64
2021-05-03 14:49:10 +09:00
lithdew
cc6714a929
std/os/bits: add timeval struct for riscv64 linux
2021-05-03 14:49:10 +09:00
lithdew
13068da43e
x/os, x/net: re-approach Address, rename namespace TCP -> tcp
...
Address comments from @ifreund and @MasterQ32 to address unsafeness and
ergonomics of the `Address` API.
Rename the `TCP` namespace to `tcp` as it does not contain any
top-level fields.
Fix missing reference to `sockaddr` which was identified by @kprotty in
os/bits/linux/arm64.zig.
2021-05-03 14:49:10 +09:00
lithdew
2ab588049e
x/os, x/net: layout tcp, ipv4/ipv6, and socket abstractions
...
The `Socket` abstraction was refactored to only comprise of methods that
can be generically used/applied to all socket domains and protocols.
A more comprehensive IPv4/IPv6 module derived from @LemonBoy's earlier
work was implemented under `std.x.os.IPv4` and `std.x.os.IPv6`. Using
this module, one can then combine them together into a union for example
in order to optimize memory usage when dealing with socket addresses.
A `TCP.Client` and `TCP.Listener` abstraction is introduced that is one
layer over the `Socket` abstraction, which isolates methods that can
only be applied to a "client socket" and a "listening socket". All prior
tests from the `Socket` abstraction, which all previously operated
assuming the socket is operating via. TCP/IP, were moved. All TCP socket
options were also moved into the `TCP.Client` and `TCP.Listener`
abstractions respectively away from the `Socket` abstraction.
Some additional socket options from @LemonBoy's prior PR for Darwin were
also moved in (i.e. SIGNOPIPE).
2021-05-03 14:49:10 +09:00
Andrew Kelley
d788181a3b
fix typo
...
Co-authored-by: Maciej Walczak <14938807+xackus@users.noreply.github.com>
2021-05-01 18:07:26 -04:00
LemonBoy
718b43504e
std: Fix pwrite/pread syscalls on SPARC targets
2021-05-01 15:46:28 +02:00
LemonBoy
69a9c1488d
std: Add signal numbers for SPARC
2021-05-01 12:25:40 +02:00
LemonBoy
527053a4e4
std: Import correct errno defs for SPARC
...
Taken from Linux arch/sparc/include/uapi/asm/errno.h
2021-05-01 11:03:59 +02:00
Andrew Kelley
4307436b99
move behavior tests from test/stage1/ to test/
...
And fix test cases to make them pass. This is in preparation for
starting to pass behavior tests with self-hosted.
2021-04-29 15:54:04 -07:00
Andrew Kelley
df24ce52b1
Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen
...
In particular I wanted to take advantage of the new hex float parsing
code.
2021-04-28 14:57:38 -07:00
Andrew Kelley
95b42f9e6b
Merge pull request #8604 from hoanga/haiku-support-sysdefs
...
further haiku support system definitions
2021-04-26 16:12:23 -04:00
Andrew Kelley
528a83dd6b
Merge pull request #8618 from LemonBoy/mini-stuff
...
Two small patches
2021-04-26 14:32:45 -04:00
LemonBoy
dc29d86649
std: Fix wrong alignOf expression
...
Mostly harmless but conceptually wrong, luckily it hasn't tripped any
safety check.
2021-04-25 19:12:49 +02:00
lithdew
98706c9686
x: fmt source code
2021-04-25 21:15:02 +09:00
Andrew Kelley
e86cee258c
Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen
...
In particular I wanted the change that makes `suspend;` illegal in the
parser.
2021-04-24 10:44:41 -07:00
Matt Knight
8530b6b724
fix import path
2021-04-24 13:35:55 -04:00
Al Hoang
762d4a959c
update haiku system constants
2021-04-23 23:40:42 -05:00
Andrew Kelley
93d1c2d6d4
std: fix compile errors caught by stage2 AstGen
...
Follow-up from 507a8096d2
2021-04-22 19:32:57 -07:00
Andrew Kelley
8dd7378013
delete packed enums from the language
...
No need for any such thing. Instead, provide an integer tag type for the
enum.
2021-04-22 19:21:50 -07:00
Andrew Kelley
507a8096d2
std: fix compile errors caught by stage2 AstGen
...
* `comptime const` is redundant
* don't use `extern enum`; specify a tag type.
`extern enum` is only when you need tags to alias. But aliasing tags
is a smell. I will be making a proposal shortly to remove `extern enum`
from the language.
* there is no such thing as `packed enum`.
* instead of `catch |_|`, omit the capture entirely.
* unused function definition with missing parameter name
* using `try` outside of a function or test
2021-04-22 18:07:46 -07:00
LemonBoy
e4f9a3041a
std: Use stat definition with 32bit *time fields
...
We're not ready for Y38K yet.
2021-04-21 16:31:30 +02:00
LemonBoy
d82eb8dd40
std: Split syscall parameters for PowerPC targets
2021-04-21 16:31:29 +02:00
Hubert Jasudowicz
d605f02756
std: Add process_vm_readv/writev wrappers
2021-04-19 16:12:28 +02:00
Hubert Jasudowicz
5134fb72ef
std: Add pidfd wrappers
2021-04-17 01:13:16 +02:00
Manuel Floruß
2cd49d20e8
Fix std.os.windows.user32.messageBoxW
...
Arguments to `selectSymbol` were passed in the wrong order.
2021-04-16 13:01:25 -04:00
Mahdi Khanalizadeh
d1a41feddc
linux: fix number of arguments for tgkill syscall
2021-04-16 17:09:15 +02:00
Andrew Kelley
429cd2b5dd
std: change @import("builtin") to std.builtin
2021-04-15 19:06:39 -07:00
Andrew Kelley
04b8354702
freebsd: disable failing test
...
See #8538
2021-04-15 00:59:40 -07:00
Andrew Kelley
c5e662d860
Merge pull request #8497 from LemonBoy/some-ppc-fixes
...
Improve Improve PowerPC support
2021-04-11 18:59:31 -07:00
LemonBoy
9bebdc77d6
std: Fix TLS definitions for 32bit PowerPC targets
...
Correct some silly errors and add the missing piece to set the thread
pointer (r2).
2021-04-11 21:26:22 +02:00
Benjamin Feng
2e85eb2bf8
Rename time32 syscalls to match rest of stdlib
2021-04-10 22:47:22 -05:00
Benjamin Feng
df910b33f4
Add ppc Linux bits
2021-04-10 22:47:22 -05:00
Michael Dusan
341dc03b63
netbsd: minor fixes to allow stage1 to build
2021-04-07 16:26:21 -07:00
Michael Dusan
2871d32be7
test: fix std.time timing tests to skip on failure
2021-04-07 08:33:32 -04:00
Vincent Rischmann
5ce4524027
os/bits/linux: add IPv6 socket options
2021-04-04 20:43:41 +03:00
Michael Dusan
cc435dab2f
test: fix io_uring timing test to skip on failure
2021-04-02 07:12:09 -04:00
Sreehari S
5c28b8cd11
boot_services: implement locateDevicePath
2021-03-25 16:45:43 +02:00
Carlos Zúñiga
187af14599
Fixed typo in user32
...
Use CreateWindowExW instead of RegisterClassExW as the type of pfnCreateWindowExW.
2021-03-22 10:43:04 +02:00
LemonBoy
867ae506e3
std: Add syscall7 stub for Linux/MIPS
...
Some syscalls such as fadvise require an extra argument to comply with
the register pair alignment imposed by the ABI.
Wacky, isn't it?
2021-03-19 13:03:55 -07:00
LemonBoy
27d07c6c4d
std: Replace testing fns for floating-point values
...
Beside handling NaNs and other non-numeric values better we finally
offer the same pair of testing predicates in math and testing.
2021-03-14 17:23:47 -04:00
Isaac Freund
b83ef595a5
std/linux: sync io_uring library with liburing
...
liburing commit: 1bafb3ce5f
As stated in the liburing commit message, this fixes a regression,
reverting code that was added specutively to avoid a syscall in some
cases.
2021-03-12 22:22:06 +01:00
Vincent Rischmann
3dd8396a55
os/linux: fix IO_Uring.timeout
...
According to the io_uring PDF (https://kernel.dk/io_uring.pdf ) the
timeout struct must be 64 bits on both 32 and 64 bit architectures.
2021-03-02 14:13:11 +02:00