aboutsummaryrefslogtreecommitdiff
path: root/lib/std/c/netbsd.zig
AgeCommit message (Collapse)Author
2025-09-17Merge pull request #25195 from blblack/netdefsAndrew Kelley
std: Add several sockopt-related constants and structs
2025-09-13std.posix.ptrace: support more platforms more correctlyJustus Klausecker
2025-09-09std: add IP, IPV6, IPTOS sockopt constantsBrandon Black
Because these lists are very long in several cases and quite varied, I opted to place them in the existing c/foo.zig files. There are many other sets of network-related constants like this to add over time across all the OSes. For now I picked these because I needed a few constants from each of these namespaces for my own project, so I tried to flesh out these namespaces completely as best I could, at least for basic sockopt purposes. Note windows has some of these already defined in ws2_32 as individual constants rather than contained in a namespacing struct. I'm not sure what to do with that in the long run (break it and namespace them?), but this doesn't change the status quo for windows in any case.
2024-07-19std.c reorganizationAndrew Kelley
It is now composed of these main sections: * Declarations that are shared among all operating systems. * Declarations that have the same name, but different type signatures depending on the operating system. Often multiple operating systems share the same type signatures however. * Declarations that are specific to a single operating system. - These are imported one per line so you can see where they come from, protected by a comptime block to prevent accessing the wrong one. Closes #19352 by changing the convention to making types `void` and functions `{}`, so that it becomes possible to update `@hasDecl` sites to use `@TypeOf(f) != void` or `T != void`. Happily, this ended up removing some duplicate logic and update some bitrotted feature detection checks. A handful of types have been modified to gain namespacing and type safety. This is a breaking change. Oh, and the last usage of `usingnamespace` site is eliminated.
2024-06-17std: fix pthread_{get,set}name_np return type ABIIsaac Freund
I believe this was accidentally broken when the E enum for errno values was introduces. These functions are quite the special case in that they return the error value directly rather than returning -1 and passing the error value through the errno variable. In any case, using a u16 as the return type at the ABI boundary where a c_int is expected is asking for trouble.
2024-03-30cbe: rewrite `CType`Jacob Young
Closes #14904
2024-03-23haiku: debitrotJacob Young
2024-03-19extract std.posix from std.osAndrew Kelley
closes #5019
2024-03-17AstGen: disallow alignment on function typesJacob Young
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-15bsd: debitrot std.cMichael Dusan
- follow-up to f4bf061d8a8 - updated std.fs.Dir to use properly named symbols
2024-03-14bsd: add missing os.IFNAMESIZEMichael Dusan
- based on system API value IF_NAMESIZE - unblocks `zig test lib/std/std.zig`
2024-02-15std.os.termios: add/fix std.c.TCSA for BSDsMichael Dusan
2024-02-14bsd: debitrot type-safe std.c.OMichael Dusan
Minor changes as per 7680c5330cb mostly about pipe2() flags. closes #18927
2024-02-12std.os.speed_t: add type safetyAndrew Kelley
and collect the missing flag bits from all the operating systems.
2024-02-12std.os.termios: add type safety to cflag fieldAndrew Kelley
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-12std.os.termios: add type safety to oflag fieldAndrew Kelley
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-12std.os.termios: add type safety to iflag fieldAndrew Kelley
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-12std.os.termios: consolidate and correctAndrew Kelley
2024-02-12std.c.NCSS: consolidate and correctAndrew Kelley
2024-02-12std: add type safety to cc_tAndrew Kelley
2024-02-11some API work on std.c, std.os, std.os.wasiAndrew Kelley
* 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-06std.c.MAP: use a packed structAndrew Kelley
Same as previous commit, but for the libc interface.
2023-08-15netbsd: std.c: fix pthread_rwlock_tMichael Dusan
- make .owner field optional
2023-08-15netbsd: std.c.REG: populate indexes for x86_64Michael Dusan
2023-07-31Revert "std: adding netbsd's pthread to cpu affinity api"Andrew Kelley
This reverts commit 3f259d35502ed5a8bdb6bbc22f9adb39d610b006.
2023-07-31Revert "std: adding sigevent to supported platforms."Andrew Kelley
This reverts commit 23c4f55a612842d8544a9dfe604a9caf1ca39697.
2023-07-31Revert "std.c:complete further more netbsd's mmap flags"Andrew Kelley
This reverts commit 4f248e1b519b001cee67e461068245c142d38e73.
2023-07-31Revert "std.c: add netbsd's accept_filter_data for ACCEPT_FILTER sock opt."Andrew Kelley
This reverts commit b677b3627818edc24828f36f8269a3c3843703a1.
2023-07-31Revert "std.c: adding ptrace for netbsd."Andrew Kelley
This reverts commit ccfb0d408d5ffb40f77a8ad1fb57f0bb854583ad.
2023-07-31Revert "std.Thread: refining stack size from platform minimum, changes more ↵Andrew Kelley
targetted towards platform like Linux/musl (#15791)" This reverts commit 41502c6aa53a3da31b276c23c4db74db7d04796b.
2023-07-31Revert "std.c: exposing timer api"Andrew Kelley
This reverts commit 54ea0bbcdddc9e13ed98415d8883f03d59392509.
2023-07-31Revert "std.c: update netbsd/openbsd mman constants"Andrew Kelley
This reverts commit 64f0059cd33b571d6cf91df45f4cb2e0af9c0742.
2023-07-31Revert "std.c: msghdr* struct removing prefixes to match linux."Andrew Kelley
This reverts commit 8f14431bc883898aaf78cc985e2d90716187e882.
2023-07-01std.c: msghdr* struct removing prefixes to match linux.David CARLIER
2023-06-24all: migrate code to new cast builtin syntaxmlugg
Most of this migration was performed automatically with `zig fmt`. There were a few exceptions which I had to manually fix: * `@alignCast` and `@addrSpaceCast` cannot be automatically rewritten * `@truncate`'s fixup is incorrect for vectors * Test cases are not formatted, and their error locations change
2023-06-22std.c: update netbsd/openbsd mman constantsDavid CARLIER
2023-06-19all: zig fmt and rename "@XToY" to "@YFromX"Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-06-18std.c: exposing timer apiDavid CARLIER
2023-05-25std.Thread: refining stack size from platform minimum, changes more ↵David CARLIER
targetted towards platform like Linux/musl (#15791)
2023-05-20std.c: adding ptrace for netbsd.David CARLIER
2023-05-16std.c: add netbsd's accept_filter_data for ACCEPT_FILTER sock opt.David CARLIER
2023-04-30std.c:complete further more netbsd's mmap flagsDavid CARLIER
2023-04-23std: adding sigevent to supported platforms.David CARLIER
2023-04-22std: adding netbsd's pthread to cpu affinity apiDavid CARLIER
2023-04-06Add NetBSD termios constants to std.c.netbsdNikita Ronja
2023-01-28netbsd: use versioned __msync13 from libcMichael Dusan
The system linker shows warning when `msync` is linked instead of `__msync13`: "warning: reference to compatibility msync(); include <sys/mman.h> for correct reference" closes #14422
2023-01-18netbsd: add mcontext_t for aarch64Michael Dusan
- test `lib/std/std.zig` passes - stack traces work
2023-01-03Merge pull request #13980 from ziglang/std.netAndrew Kelley
networking: delete std.x; add std.crypto.tls and std.http.Client
2023-01-02netbsd: getFdPath: F_GETPATH implementationMichael Dusan
2023-01-02std.fs: add NAME_MAX for openbsd and netbsdMichael Dusan