39 Commits

Author SHA1 Message Date
daurnimator
648f94c027 std: add some definitions for netlink sockets 2020-03-09 13:02:38 -04:00
Vexu
538d9a5dd8
remove uses of @ArgType and @IntType 2020-02-24 23:39:03 +02:00
LemonBoy
9d41ff335c std: Make TCSA enum ABI-compliant 2020-02-05 20:37:00 +01:00
nofmal
a697de3eac Add basic linux termios implementation 2020-02-04 14:09:57 -05:00
daurnimator
ab46713fa6 std: update for linux 5.5 release 2020-01-31 10:18:17 -05:00
LemonBoy
fa52c9e36e Small cleanups 2020-01-19 00:11:45 +01:00
LemonBoy
c1f3766f1c Correct dlpi_name field type 2020-01-14 21:15:33 +01:00
Andrew Kelley
fee9318b17
std.os.getrusage: add C extern fn and reserved field
* add reserved field to match musl struct definition so that
   it will work with musl libc.
 * add libc getrusage so that it will work with libc

what's not done in this branch is:
 * test coverage. See #1629, which should also aim to provide
   general test coverage for the std lib.
 * rusage struct bits for non-linux operating systems
2020-01-05 16:57:14 -05:00
data-man
2f6b045fb1
Add std.os.getrusage 2020-01-05 16:52:36 -05:00
Luna
997812e8fb
os: add memfd_create
currently only linux is supported
2019-12-31 15:58:03 -05:00
daurnimator
9577ff1c90
std: use simpler sigset_t definition 2019-12-22 20:20:53 +11:00
Vexu
bfb15f1c9f fix casts 2019-12-05 15:47:06 -05:00
LemonBoy
e1e06e6766 linux-i386 support 2019-11-30 16:13:33 +01:00
Andrew Kelley
bdf3680be1
zig fmt 2019-11-25 13:53:13 -05:00
Andrew Kelley
5a98dd42b3
Merge pull request #3728 from ziglang/null-terminated-pointers
sentinel-terminated pointers
2019-11-25 02:20:08 -05:00
daurnimator
69b780647a std: update for linux 5.4 2019-11-25 02:07:23 -05:00
Andrew Kelley
29e438fd1f
more sentinel-terminated pointers std lib integration
See #3767
2019-11-25 00:43:36 -05:00
Andrew Kelley
e0db54e89d
update the codebase to use @as 2019-11-08 15:57:24 -05:00
Andrew Kelley
2723ffc2b2
fixups and zig fmt 2019-11-08 01:52:23 -05:00
Andrew Kelley
081c62fc00
fix regression in std.os.dirent64 on linux 2019-10-31 13:56:15 -04:00
Tse
00382f6dae DragonFlyBSD tidyup 2019-10-31 13:53:32 -04:00
Andrew Kelley
61d5a0bf48
Merge branch 'std.net' 2019-10-30 21:30:16 -04:00
Tse
33cc204481 DragonFlyBSD support 2019-10-30 21:21:58 -04:00
Andrew Kelley
7b7ba51642
fix os.sockaddr being a union instead of a struct 2019-10-30 20:57:20 -04:00
Andrew Kelley
c52ee6efca
canonicalize std.os IPPROTO constants 2019-10-30 20:41:28 -04:00
Andrew Kelley
0de862e8ba
make std.net more portable
* Delete `std.net.TmpWinAddr`. I don't think that was ever meant to
   be a real thing.
 * Delete `std.net.OsAddress`. This abstraction was not helpful.
 * Rename `std.net.Address` to `std.net.IpAddress`. It is now an extern
   union of IPv4 and IPv6 addresses.
 * Move `std.net.parseIp4` and `std.net.parseIp6` to the
   `std.net.IpAddress` namespace. They now return `IpAddress` instead of
   `u32` and `std.net.Ip6Addr`, which is deleted.
 * Add `std.net.IpAddress.parse` which accepts a port and parses either
   an IPv4 or IPv6 address.
 * Add `std.net.IpAddress.parseExpectingFamily` which additionally
   accepts a `family` parameter.
 * `std.net.IpAddress.initIp4` and `std.net.IpAddress.initIp6` are
   improved to directly take the address fields instead of a weird
   in-between type.
 * `std.net.IpAddress.port` is renamed to `std.net.IpAddress.getPort`.
 * Added `std.net.IpAddress.setPort`.
 * `os.sockaddr` struct on all targets is improved to match the
   corresponding system struct. Previously I had made it a union of
   sockaddr_in, sockaddr_in6, and sockaddr_un. The new abstraction for
   this is now `std.net.IpAddress`.
 * `os.sockaddr` and related bits are added for Windows.
 * `os.sockaddr` and related bits now have the `zero` fields default
   to zero initialization, and `len` fields default to the correct size.
   This is enough to abstract the differences across targets, and so
   no more switch on the target OS is needed in `std.net.IpAddress`.
 * Add the missing `os.sockaddr_un` on FreeBSD and NetBSD.
 * `std.net.IpAddress.initPosix` now takes a pointer to `os.sockaddr`.
2019-10-30 20:22:05 -04:00
Andrew Kelley
67058b9b70
basic DNS address resolution for linux without libc 2019-10-29 02:19:22 -04:00
Andrew Kelley
d5865f5319
move libc/linux bits around 2019-10-28 15:29:50 -04:00
Andrew Kelley
f4c244b3d0
partial no-libc implementation of std.net.getAddressList 2019-10-28 15:29:50 -04:00
Andrew Kelley
4b80e376e3
std.net.getAddressList 2019-10-28 15:29:50 -04:00
Andrew Kelley
5181970807
improve docs and field names of Statx struct 2019-10-16 17:24:42 -04:00
LemonBoy
40fc7a1fda Add support for the statx syscall 2019-10-12 20:51:51 +02:00
LemonBoy
17f2af10b5 Correct signal bits for MIPS
Also enable the segfault handler for all the supported architectures
beside MIPS.
2019-10-01 13:58:58 -04:00
Andrew Kelley
23a82b5ffd
fix mipsel regression in previous commit
I think that should actually be a compile error, it's a usingnamespace
that depends on itself. This workaround is fine for now.
2019-09-26 21:38:04 -04:00
Andrew Kelley
ebe79329a2
fix some linux declarations not getting exposed 2019-09-26 18:49:37 -04:00
LemonBoy
a94372231c Errno changes for MIPS 2019-09-26 18:07:39 +02:00
LemonBoy
a9be62f085 Fix wrong IOCTL value 2019-09-26 11:49:49 +02:00
LemonBoy
4ebcf64864 Initial support for mipsel architecture¬ 2019-09-26 09:31:55 +02:00
Andrew Kelley
ed36dbbd9c
mv std/ lib/
that's all this commit does. further commits will fix cli flags and
such.

see #2221
2019-09-25 23:35:41 -04:00