Jacob Young
5a41704f7e
cbe: rewrite CType
...
Closes #14904
2024-03-30 20:50:48 -04:00
Jacob Young
77ff6bc656
haiku: fix poll definitions
2024-03-27 01:55:42 -04:00
Jacob Young
2dd74cd312
haiku: debitrot
2024-03-23 18:11:32 +01:00
Andrew Kelley
8c94950c24
fix compilation failures found by CI
2024-03-19 16:18:18 -07:00
Andrew Kelley
cd62005f19
extract std.posix from std.os
...
closes #5019
2024-03-19 11:45:09 -07:00
Jacob Young
d10c52c194
AstGen: disallow alignment on function types
...
A pointer type already has an alignment, so this information does not
need to be duplicated on the function type. This already has precedence
with addrspace which is already disallowed on function types for this
reason. Also fixes `@TypeOf(&func)` to have the correct addrspace and
alignment.
2024-03-17 03:06:17 +01:00
Michael Dusan
d7cf25f5ca
bsd: debitrot std.c
...
- follow-up to f4bf061d8a8
- updated std.fs.Dir to use properly named symbols
2024-03-15 02:28:50 -04:00
Michael Dusan
cf4a2099e1
dragonfly: debitrot std.c
2024-03-15 02:28:50 -04:00
Michael Dusan
6724a524d4
bsd: add missing os.IFNAMESIZE
...
- based on system API value IF_NAMESIZE
- unblocks `zig test lib/std/std.zig`
2024-03-14 18:54:25 -07:00
Tristan Ross
9d70d614ae
std.builtin: make link mode fields lowercase
2024-03-11 07:09:10 -07:00
mlugg
508a8739e2
std.c.openbsd: remove nop usingnamespace
...
I have no idea why this was even here...
Eliminates one more usage of `usingnamespace` from the standard library.
5 remain.
2024-03-08 08:02:45 +00:00
Michael Dusan
2ff64c7cb2
std.os.termios: add/fix std.c.TCSA for BSDs
2024-02-15 02:40:11 -05:00
Michael Dusan
7e83e7d9a8
bsd: debitrot type-safe std.c.O
...
Minor changes as per 7680c5330cb mostly about pipe2() flags.
closes #18927
2024-02-14 19:26:12 -08:00
Tim Culverhouse
bec8511728
std.os: export T struct and winsize struct
...
Export the T struct and winsize struct for targets which have it defined
in std.c. This struct defines libc constants for ioctl syscalls.
2024-02-14 17:53:37 -08:00
Andrew Kelley
ae107cf71b
std.os.speed_t: add type safety
...
and collect the missing flag bits from all the operating systems.
2024-02-12 21:49:09 -07:00
Andrew Kelley
a280ff2767
std.os.termios: add type safety to lflag field
...
This creates `tc_cflag_t` even though such a type is not defined by
libc.
I also collected the missing flag bits from all the operating systems.
2024-02-12 21:21:45 -07:00
Andrew Kelley
e97fa8b038
std.os.termios: add type safety to cflag field
...
This creates `tc_cflag_t` even though such a type is not defined by
libc.
I also collected the missing flag bits from all the operating systems.
2024-02-12 18:24:07 -07:00
Andrew Kelley
20abc0caee
std.os.termios: add type safety to oflag field
...
This creates `tc_oflag_t` even though such a type is not defined by
libc.
I also collected the missing flag bits from all the operating systems.
2024-02-12 17:28:09 -07:00
Andrew Kelley
47643cc5cc
std.os.termios: add type safety to iflag field
...
This creates `tc_iflag_t` even though such a type is not defined by
libc.
I also collected the missing flag bits from all the operating systems.
2024-02-12 16:43:51 -07:00
Andrew Kelley
0c88f927f1
std.os.termios: consolidate and correct
2024-02-12 16:21:21 -07:00
Andrew Kelley
9a64318554
std.c.NCSS: consolidate and correct
2024-02-12 15:52:13 -07:00
Andrew Kelley
5258c3caad
std: add type safety to cc_t
2024-02-12 15:41:38 -07:00
Andrew Kelley
7680c5330c
some API work on std.c, std.os, std.os.wasi
...
* std.c: consolidate some definitions, making them share code. For
example, freebsd, dragonfly, and openbsd can all share the same
`pthread_mutex_t` definition.
* add type safety to std.c.O
- this caught a bug where mode flags were incorrectly passed as the
open flags.
* 3 fewer uses of usingnamespace keyword
* as per convention, remove purposeless field prefixes from struct field
names even if they have those prefixes in the corresponding C code.
* fix incorrect wasi libc Stat definition
* remove C definitions from incorrectly being in std.os.wasi
* make std.os.wasi definitions type safe
* go through wasi native APIs even when linking libc because the libc
APIs are problematic and wasteful
* don't expose WASI definitions in std.posix
* remove std.os.wasi.rights_t.ALL: this is a footgun. should it be all
future rights too? or only all current rights known? both are
the wrong answer.
2024-02-11 13:38:55 -07:00
Andrew Kelley
a60f219660
std.c.MAP: use a packed struct
...
Same as previous commit, but for the libc interface.
2024-02-06 22:06:01 -07:00
Veikka Tuominen
74010fecc7
translate-c: use Aro's tokenizer
2023-11-25 12:28:19 +02:00
Andrew Kelley
7733894761
Merge pull request #17341 from rzezeski/illumos-updates
...
Illumos/Solaris updates
2023-10-03 11:04:41 -07:00
xdBronch
c9c3ee704c
correctly detect apple a15 and a16 chips
2023-10-03 00:36:59 -07:00
Ryan Zezeski
c17ebdca6a
solaris: fix path component max
2023-09-30 11:38:56 -06:00
Ryan Zezeski
f0724229d6
solaris: add missing registers
2023-09-30 11:38:56 -06:00
Aven Bross
6c54ed73f7
Added basic support for wasm32-emscripten target
2023-09-22 12:49:03 -07:00
Linus Groh
c097209792
std.c.linux: Add getpw{nam,uid}()
2023-09-08 21:46:05 +03:00
Michael Dusan
e1216686f3
dragonfly: std.c: more decls
...
- add ucontext_t, mcontext_t
- add pthread_rwlock_t
2023-08-15 17:29:35 -04:00
Michael Dusan
4532ff2780
netbsd: std.c: fix pthread_rwlock_t
...
- make .owner field optional
2023-08-15 17:29:35 -04:00
Michael Dusan
25542c3443
netbsd: std.c.REG: populate indexes for x86_64
2023-08-15 17:20:04 -04:00
Andrew Kelley
04d5e07d40
std.c.openbsd: remove "msg_" prefixes from structs
...
Reapplies 8f14431bc883898aaf78cc985e2d90716187e882 which was reverted in
95e2605d30c15963c4d6bc9e39751031b0f52007.
2023-07-31 11:57:48 -07:00
Andrew Kelley
479fd2f721
std.c.openbsd: add PTHREAD_STACK_MIN
...
@semarie audited this definition.
2023-07-31 11:54:27 -07:00
Andrew Kelley
b1bde35651
std.c.openbsd: add ucontext_t for aarch64
...
Reapplies 1585ed637d101ed16adb6b9ebdfa465299bfdb13 which was reverted in
f3adbe249b0dfad91318916142a33619232a968f.
I removed use of `usingnamespace` in this commit.
@semarie audited this struct definition.
2023-07-31 11:51:08 -07:00
Andrew Kelley
235b9fc28a
Revert "std: add FreeBSD's procctl api."
...
This reverts commit 2e2d37917d4227d6ab9c8e43b3619bc47ce56417.
2023-07-31 11:24:21 -07:00
Andrew Kelley
99c70ec24f
Revert "std: add kinfo_vmentry for FreeBSD"
...
This reverts commit 4a0508e56c06456c367c57a7565b9f757f2ff663.
2023-07-31 11:24:14 -07:00
Andrew Kelley
68134e56cb
Revert "std add getrandom to solato solaris based systems"
...
This reverts commit 56d800ff7e65897d8ff9ede8e8194af4d08f0df5.
2023-07-31 11:24:09 -07:00
Andrew Kelley
a18a116bda
Revert "std: add shm_create_largepage for FreeBSD, completing MFD* constants."
...
This reverts commit 7b908e173fa6034dc92e6b73c4264dc44706bd32.
2023-07-31 11:24:04 -07:00
Andrew Kelley
c0ac1411db
Revert "std: freebsd update proposal"
...
This reverts commit 2568da2f41d3403b2cd91bbb84862c86932b63e6.
2023-07-31 11:23:56 -07:00
Andrew Kelley
26777d98fe
Revert "std: adding freebsd's elf_aux_info api"
...
This reverts commit 83970b6d916a1526869aba2680d5017d495df12a.
2023-07-31 11:23:49 -07:00
Andrew Kelley
b5df1bfcdb
Revert "os: expand sched_getaffinity wrapper and update freebsd's cpuset api flags."
...
This reverts commit dbdafb6cc503ce5820713dfa79cc956438b7957a.
2023-07-31 11:23:38 -07:00
Andrew Kelley
14353590f2
Revert "std: adding netbsd's pthread to cpu affinity api"
...
This reverts commit 3f259d35502ed5a8bdb6bbc22f9adb39d610b006.
2023-07-31 11:23:33 -07:00
Andrew Kelley
a2439e161b
Revert "std: enriching malloc api on freebsd."
...
This reverts commit 9140249d2993d9d9f4c92b2892db421e1e0fb7ae.
2023-07-31 11:21:50 -07:00
Andrew Kelley
c7f2a7ea82
Revert "std: add a subset of the macOs's libproc api."
...
This reverts commit 7b0e015eb42272d84396f44fc904ab79f38dd696.
2023-07-31 11:20:57 -07:00
Andrew Kelley
aa5808c26c
Revert "std: add accept_filter struct to make use of SO_ACCEPTFILTER socket option"
...
This reverts commit 1d322fe5102368f80fd4d00dcbbe3dca9e6306f8.
2023-07-31 11:20:53 -07:00
Andrew Kelley
62deaaacd5
Revert "std: mcontext layout for x86 and fixing few x86_64 fields types for"
...
This reverts commit 9691cded95afa53f17bfc50edc371d4fe673b56a.
2023-07-31 11:20:49 -07:00
Andrew Kelley
963b2a2a4d
Revert "std: adding FreeBSD's sched wrappers"
...
This reverts commit 9ef615104acb0f7cfed8f871404679a7df5571fe.
2023-07-31 11:20:44 -07:00