Joran Dirk Greef
8fd88fdb31
linux: add fallocate()
2020-10-31 13:39:33 +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
a41c0b63bb
Merge pull request #6356 from jorangreef/io_uring
...
std: add io_uring library
2020-10-29 18:20:38 -04:00
Koakuma
5125eb77bd
Use the *_stat type as self
2020-10-29 21:37:45 +07:00
johnLate
23c28c72b7
std.os.linux.accept/accept4: allow null for addr and len
...
std.os.accept already wants to allow null, which matches `man 3p accept`:
> address Either a null pointer, or a pointer to a sockaddr structure
> where the address of the connecting socket shall be re‐
> turned.
>
> address_len Either a null pointer, if address is a null pointer, or a
> pointer to a socklen_t object which on input specifies the
> length of the supplied sockaddr structure, and on output
> specifies the length of the stored address.
Fixes ziglang#6832.
2020-10-27 21:52:47 +01:00
LemonBoy
8044ed4c66
std: Add basic smoke test for net functionality
2020-10-27 21:52:47 +01:00
Frank Denis
74a1175d9d
std/*: add missing MIT license headers
2020-10-26 17:41:29 +01:00
Sébastien Marie
2a0a11aa66
openbsd: make dl_phdr_info cross arches
...
introduce Addr and Half definition to std.elf, and use them for dl_phdr_info
2020-10-25 20:46:28 -04:00
Koakuma
cbc8750502
Separate libc stat and kernel stat definitions
2020-10-25 23:52:08 +07:00
Koakuma
3ce9428e3d
Various formatting fixes
2020-10-25 21:53:16 +07:00
Koakuma
1a362ea5b0
Fix sparc64 bits definitions
2020-10-25 21:38:39 +07:00
Koakuma
785153d756
Fix SA_* constants for sparc64
2020-10-25 20:39:32 +07:00
Koakuma
f018201009
Predict error-less path on syscalls
2020-10-25 20:07:18 +07:00
Koakuma
2e7a4758b3
Add back ppc input/output/clobber definitions
...
Accidentally removed when rebasing, this adds it back.
2020-10-25 13:39:22 +07:00
Koakuma
1d3abb761d
"zig fmt" on lib/std/os/linux.zig
2020-10-25 13:38:08 +07:00
Koakuma
e7369ada93
Fix boolean operator in if clause
2020-10-24 21:33:40 +07:00
Koakuma
73e62f22ec
Fix sigaction(2) call on sparc64
2020-10-24 20:05:37 +07:00
Koakuma
cdbf66e36e
Add sparc64-specific values for the various SA_ and SIG_ constants
2020-10-24 20:05:34 +07:00
Koakuma
268516d5d9
Fix constants
2020-10-24 20:04:18 +07:00
Koakuma
238f253de9
Move comptime out
2020-10-24 20:03:41 +07:00
Koakuma
300cfbf252
Add TLS implementation for sparc64
2020-10-24 20:03:40 +07:00
Koakuma
6146f81c6e
Add pipe(2) support
2020-10-24 20:03:37 +07:00
Koakuma
dba009fd21
Account for the delay slot
2020-10-24 20:01:32 +07:00
Koakuma
c29da84c0e
Add sp loading
2020-10-24 20:01:29 +07:00
Koakuma
23433fb317
Fix register naming
2020-10-24 19:59:05 +07:00
Koakuma
de06b0a635
Add sparc64 linux bits
2020-10-24 19:59:04 +07:00
Koakuma
e5a11020cc
Add sparc64 syscall interface
2020-10-24 19:59:04 +07: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
Andrew Kelley
e02655798f
Merge pull request #6743 from LemonBoy/someppc64stuff
...
Some ppc64 stuff
2020-10-22 17:39:26 -04:00
LemonBoy
0c355bef9e
std: Slim down the error code path in initStaticTLS
...
Calling @panic made the executable ~30x times bigger, use a simple
`abort()` and let the user figure out what went wrong.
Supporting ARMv6 (and earlier?) platforms is not a priority.
Closes #6676
2020-10-21 23:35:06 -04:00
LemonBoy
96fe971051
std: Minor changes to startup code
...
* Smaller startup sequence for ppc64
* Terminate the frame-pointer chain when executing _start
* Make the stack traces work on ppc64
* Make the stack traces coloured on ppc64, some ioctls numbers are
different and the whole set of constants should be audited.
2020-10-19 15:15:43 +02:00
Andrew Kelley
05b1a7414e
code cleanups
...
* in selfExePath, return errors instead of defaulting to bogus data
* less invasive edits to the logic of link/Elf.zig
* less indentation
2020-10-17 17:52:09 -07: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
d87bd3d8af
fixups regarding windows wide strings
...
* remove GetModuleHandleA from kernel32.zig. use of A functions
considered harmful.
* make it a compile error to expose WinMain instead of wWinMain. same
thing.
* start code declares wWinMainCRTStartup instead of WinMainCRTStartup
when it has the choice.
2020-10-15 19:37:55 -07:00
Andrew Kelley
c7c38e7279
Merge branch '5002-fix-entrypoint-with-winmain' of https://github.com/AnthonyYoManz/zig into AnthonyYoManz-5002-fix-entrypoint-with-winmain
2020-10-15 18:22:12 -07:00
Andrew Kelley
a66449c1ed
Merge pull request #6616 from fengb/darwin-rusage
...
Darwin rusage
2020-10-15 20:49:54 -04:00
Vignesh Rajagopalan
2ab0c7391a
Rename .macosx to .macos
2020-10-12 18:56:25 -04:00
Sébastien Marie
f33a610c84
add minimal openbsd support
2020-10-11 08:23:36 +00:00
Benjamin Feng
9de0f15b8e
Rename ix_rss -> ixrss
2020-10-08 15:31:36 -05:00
Benjamin Feng
fd3f676cdb
Pull in Darwin definitions for rusage
2020-10-08 15:19:52 -05:00
Tadeo Kondrak
2b4b03d301
Update zig files for opaque type syntax
2020-10-06 22:08:25 -06:00
Joran Dirk Greef
e9ba12f456
Test the range of user_data bits
2020-10-05 09:36:07 +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
Joran Dirk Greef
9be2941091
Split openat/close test into two separate tests
...
If an older kernel fails the `openat` test because of `AT_FDCWD`
then we don't want to skip the `close` test.
2020-10-04 17:48:05 +02:00
Joran Dirk Greef
958ff087f2
Use const wherever possible
2020-10-04 16:57:04 +02:00