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
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
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
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
xackus
4ec26be424
implement {get, set}rlimit for linux
2020-10-04 23:56:10 +02:00
Isaac Freund
b6f4601545
std: add securebits definitions for linux
2020-09-11 22:32:23 +02:00
Isaac Freund
7b961a876b
std: add prctl definition for linux
2020-09-11 22:32:22 +02:00
Andrew Kelley
800c5de2ae
update the stack trace test case for lines added to start.zig
2020-09-10 14:40:33 -07:00
Andrew Kelley
2315331d23
Merge pull request #5527 from shawnanastasio/ppc64le
...
Implement support for powerpc64{,le}
2020-09-10 15:56:27 -04:00
Bas van den Berg
127fa80090
implement poll for windows with WSAPoll (only available on vista and higher)
2020-09-10 20:20:27 +02:00
Jens Goldberg
5bf3e54018
Add the Linux TCP socket options
2020-09-08 13:00:07 -04:00
Bas
4a6ca735d9
Merge branch 'master' into improve-windows-networking
2020-09-08 11:56:59 +02:00
Veikka Tuominen
41bbadbb9a
Merge pull request #6246 from Vexu/field
...
Remove deprecated fields on `type`
2020-09-05 13:58:02 +03:00
Vexu
1df0f3ac24
update uses of deprecated type field access
2020-09-03 18:10:40 +03:00
Isaac Freund
e8a2aecd2f
std: fix linux uid_t, use uid_t/gid_t in std.os
...
- correct uid_t from i32 to u32 on linux
- define uid_t and gid_t for OSes missing definitions
- use uid_t/gid_t instead of plain u32s throughout std.os
2020-09-03 15:08:37 +02:00
Bas van den Berg
d80554cedf
Made some changes and additions to the networking to make it work on windows.
2020-09-02 23:53:29 +02:00
Matthew Knight
0fa3cfdb4a
Bpf: move under os/linux instead of bits ( #6126 )
...
* moved bpf syscall, added some bpf instructions and tests
* had to move bpf out of bits so that a freestanding target could import it
* removed line
* fixed imports
2020-08-22 15:08:01 -04:00
Matt Knight
80fabe1850
fixed bpf namespace
2020-08-21 11:40:35 -07:00
Matt Knight
bc1536f4bf
decided to split up loading of 64-bit immediates
2020-08-21 11:40:35 -07:00
Matt Knight
7f1378909b
moved bpf syscall, added some bpf instructions and tests
2020-08-21 11:40:35 -07:00
heidezomp
1ca49b92c6
add UTIME_NOW and UTIME_OMIT constants for use in utimensat/futimens
...
copied from lib/libc/include/generic-musl/sys/stat.h
2020-08-20 17:02:58 -04:00
Andrew Kelley
4a69b11e74
add license header to all std lib files
...
add SPDX license identifier
copyright ownership is zig contributors
2020-08-20 16:07:04 -04:00
Matthew Knight
d605af511a
added bpf() syscall and some supporting structs ( #6061 )
...
* added bpf syscall and some supporting structs
* moved bpf to bits and added flags
2020-08-17 22:17:04 -04:00
Andrew Kelley
d159ba9295
zig fmt
2020-08-04 23:04:20 -07:00
Jakub Konka
4d9eff4bdb
Add prelim openW
and openatW
...
Added POSIX functions targeting Windows pass `open` and `openat`
smoke tests.
2020-07-31 16:41:25 +02:00
luna
a6626802f9
Add signalfd support ( #5322 )
...
* add signalfd_siginfo to linux bits
* Cast sigaddset's shift value to u5
* linux: add signalfd4
* os: add signalfd
2020-07-22 17:26:27 -04:00
Shawn Anastasio
ec0d775524
Implement std.os for powerpc64{,le}
2020-07-01 16:10:49 -05:00
Andrew Kelley
7fd937fef4
cleanups
...
* improve docs
* add TODO comments for things that don't have open issues
* remove redundant namespacing of struct fields
* guard against ioctl returning EINTR
* remove the general std.os.ioctl function in favor of the specific
ioctl_SIOCGIFINDEX function. This allows us to have a more precise
error set, and more type-safe API.
2020-06-02 15:28:46 -04:00
Luna
aebf28eba3
Make ifru fields sentinel-terminated
2020-06-02 14:56:06 -04:00
Luna
c60daa255f
Replace C types in declarations
2020-06-02 14:56:06 -04:00
Luna
10ea2db5cb
Replace C shorts by integer types
2020-06-02 14:56:06 -04:00
Luna
cb649b769c
Fix ifreq definition
2020-06-02 14:56:06 -04:00
Luna
2c641c93da
Only resolve scope id when needed
2020-06-02 14:56:06 -04:00
Luna
9c200035f3
Add some interface structs to linux bits
2020-06-02 14:56:06 -04:00
Andrew Kelley
c6764fd254
Merge pull request #5475 from marler8997/windowsDns
...
support name resolution on windows
2020-06-01 15:33:05 -04:00
Jonathan Marler
58fb5b29b6
more windows network fixes
...
* support posix SOCK_NONBLOCK and SOCK_CLOEXEC flags on windows
* fix bugs in os.socket and os.connect to return at the correct place
2020-05-31 10:07:51 -06:00
Vincent Rischmann
636d3ba780
linux: fix IOSQE_BIT decl and io_uring_sqe flags
2020-05-30 16:05:46 +02:00
Jonathan Marler
2eaab1e65e
more windows network support, including dns
2020-05-29 22:38:48 -06:00
Andrew Kelley
53d011fa1a
(breaking) std.time fixups and API changes
...
Remove the constants that assume a base unit in favor of explicit
x_per_y constants.
nanosecond calendar timestamps now use i128 for the type. This affects
fs.File.Stat, std.time.nanoTimestamp, and fs.File.updateTimes.
calendar timestamps are now signed, because the value can be less than
the epoch (the user can set their computer time to whatever they wish).
implement std.os.clock_gettime for Windows when clock id is
CLOCK_CALENDAR.
2020-05-24 21:40:08 -04:00
Jethro Nederhof
f83fd47b14
os/bits/freebsd audit
2020-05-24 10:08:43 +10:00
Jethro Nederhof
b504169fef
FreeBSD: missing networking constants
2020-05-24 10:08:43 +10:00
Greg Anders
64955deb72
Add poll definitions for Darwin
2020-05-22 13:21:34 -04:00
Jakub Konka
fae4af9e1c
Make mode_t a 0-byte type in WASI
2020-05-18 17:09:52 +02:00