aboutsummaryrefslogtreecommitdiff
path: root/lib/std/c/freebsd.zig
AgeCommit message (Collapse)Author
2025-10-04make freebsd copy_file_range return type signedrpkak
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-20std.Target: Remove `kfreebsd` OS specifier.Alex Rønne Petersen
kFreeBSD is dead. https://lists.debian.org/debian-devel/2023/07/msg00176.html
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-07-03[std.c] Add eventfd and dup3 functions to FreeBSDcryptocode
The eventfd system call and dup3 library call have been available since FreeBSD 13 and 10 respectively, and are thus available in all [FreeBSD releases not deemed EOL](<https://endoflife.date/freebsd>) The lack of these were discovered when porting a terminal emulator to FreeBSD. It would be nice to have them included in Zig's stdlib.
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-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-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-07-31Revert "std: add FreeBSD's procctl api."Andrew Kelley
This reverts commit 2e2d37917d4227d6ab9c8e43b3619bc47ce56417.
2023-07-31Revert "std: add kinfo_vmentry for FreeBSD"Andrew Kelley
This reverts commit 4a0508e56c06456c367c57a7565b9f757f2ff663.
2023-07-31Revert "std: add shm_create_largepage for FreeBSD, completing MFD* constants."Andrew Kelley
This reverts commit 7b908e173fa6034dc92e6b73c4264dc44706bd32.
2023-07-31Revert "std: freebsd update proposal"Andrew Kelley
This reverts commit 2568da2f41d3403b2cd91bbb84862c86932b63e6.
2023-07-31Revert "std: adding freebsd's elf_aux_info api"Andrew Kelley
This reverts commit 83970b6d916a1526869aba2680d5017d495df12a.
2023-07-31Revert "os: expand sched_getaffinity wrapper and update freebsd's cpuset api ↵Andrew Kelley
flags." This reverts commit dbdafb6cc503ce5820713dfa79cc956438b7957a.
2023-07-31Revert "std: enriching malloc api on freebsd."Andrew Kelley
This reverts commit 9140249d2993d9d9f4c92b2892db421e1e0fb7ae.
2023-07-31Revert "std: add accept_filter struct to make use of SO_ACCEPTFILTER socket ↵Andrew Kelley
option" This reverts commit 1d322fe5102368f80fd4d00dcbbe3dca9e6306f8.
2023-07-31Revert "std: mcontext layout for x86 and fixing few x86_64 fields types for"Andrew Kelley
This reverts commit 9691cded95afa53f17bfc50edc371d4fe673b56a.
2023-07-31Revert "std: adding FreeBSD's sched wrappers"Andrew Kelley
This reverts commit 9ef615104acb0f7cfed8f871404679a7df5571fe.
2023-07-31Revert "std: adding sigevent to supported platforms."Andrew Kelley
This reverts commit 23c4f55a612842d8544a9dfe604a9caf1ca39697.
2023-07-31Revert "std.c: adding mincore for freebsd"Andrew Kelley
This reverts commit 8d88dcdc61c61e3410138f4402482131f5074a80.
2023-07-31Revert "std.c: freebsd add procctl exclusive x86_64 flags"Andrew Kelley
This reverts commit 3fb93fc8f2d3e755492a495fa69f65ae6615cab6.
2023-07-31Revert "std.c: add essential freebsd's capsicum api subset."Andrew Kelley
This reverts commit 6ae19fa48d7853430ba45f2de90550cd48cf5b4c.
2023-07-31Revert "std.c: adding freebsd's CPU_COUNT macro portage."Andrew Kelley
This reverts commit b9841750f91604020268549fc5e2c6b10c1f8477.
2023-07-31Revert "std.c: adding freebsd's kinfo_proc type."Andrew Kelley
This reverts commit 3dd0afe787e1cab4db41e685e67ce5594e92f7ef.
2023-07-31Revert "std.c: adding freebsd's domainset api"Andrew Kelley
This reverts commit e8f76b452bf86481069c2eeeb02d46161ea79a08.
2023-07-31Revert "std.c: adding freebsd's domainset_t bitset"Andrew Kelley
This reverts commit 10a7cf58c1530e004e5ccb1a81f02aa86ab51dd1.
2023-07-31Revert "std.c: add freebsd's kinfo_vmobject"Andrew Kelley
This reverts commit 52606572309f843c043123c1f2771829e45b4b5d.
2023-07-31Revert "std.c: adding freebsd's ioctl base operands."Andrew Kelley
This reverts commit cd7e2bf57a4da6965df9a2d8662a9b95f63cf595.
2023-07-31Revert "std.os: implementing sched_setaffinity wrapper for freebsd"Andrew Kelley
This reverts commit 05268bb9677ef0545cca6c788169b2707842dc8d.
2023-07-31Revert "std.c: add rfork for freebsd"Andrew Kelley
This reverts commit 2952fb97588fa2eb711bf84b479e959b60542192.
2023-07-31Revert "std.c: add ptrace for freebsd support."Andrew Kelley
This reverts commit b754068fbc7492962953068d31386d4c04e37ae5.
2023-07-31Revert "std.c: fix freebsd's CPU_ISSET call"Andrew Kelley
This reverts commit 768965788ecb9a0a70b4363f9472471bb0bbe5ec.
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.os: fix uname usage."Andrew Kelley
This reverts commit 138f1253deb48434af707ec5e9124e889520be08.
2023-07-31Revert "std.c: exposing timer api"Andrew Kelley
This reverts commit 54ea0bbcdddc9e13ed98415d8883f03d59392509.
2023-07-31Revert "std.c: freebsd fix typo for PROC.PROCCTL_MD_MIN constant."Andrew Kelley
This reverts commit e9dd0a22f0d93683f97db747be53d8d2d21c3543.
2023-07-31Revert "std.c: fix few capcisum api calls, following-up on 6ae19fa."Andrew Kelley
This reverts commit 72dd22f262353fa7d37c89c7d163e97a162abb9b.
2023-07-31Revert "std.c: few freebsd's kinfo api fixes."Andrew Kelley
This reverts commit d07149c56d202c3503c4f5505e8b003b3e161145.
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-25std.c: few freebsd's kinfo api fixes.David CARLIER
following up on 4a0508e and 3dd0afe. - kinfo_vmentry, removing kve_ prefix. - kinfo_getproc, returns one entry at most.
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-24std.c: fix few capcisum api calls, following-up on 6ae19fa.David CARLIER
only variadic calls are prefixed with underscores. ref: https://github.com/freebsd/freebsd-src/blob/59833b089e78463a561706fc03777249766aea01/sys/sys/capsicum.h#L326