aboutsummaryrefslogtreecommitdiff
path: root/lib/std/c/emscripten.zig
AgeCommit message (Collapse)Author
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: make all dirent structs externIsaac Freund
Using structs with unspecified layout on the ABI boundry can't end well.
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.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-09-22Added basic support for wasm32-emscripten targetAven Bross
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-05-25std.Thread: refining stack size from platform minimum, changes more ↵David CARLIER
targetted towards platform like Linux/musl (#15791)
2021-08-24remove redundant license headers from zig standard libraryAndrew Kelley
We already have a LICENSE file that covers the Zig Standard Library. We no longer need to remind everyone that the license is MIT in every single file. Previously this was introduced to clarify the situation for a fork of Zig that made Zig's LICENSE file harder to find, and replaced it with their own license that required annual payments to their company. However that fork now appears to be dead. So there is no need to reinforce the copyright notice in every single file.
2021-01-14organize std lib concurrency primitives and add RwLockAndrew Kelley
* move concurrency primitives that always operate on kernel threads to the std.Thread namespace * remove std.SpinLock. Nobody should use this in a non-freestanding environment; the other primitives are always preferable. In freestanding, it will be necessary to put custom spin logic in there, so there are no use cases for a std lib version. * move some std lib files to the top level fields convention * add std.Thread.spinLoopHint * add std.Thread.Condition * add std.Thread.Semaphore * new implementation of std.Thread.Mutex for Windows and non-pthreads Linux * add std.Thread.RwLock Implementations provided by @kprotty
2020-12-31Year++Frank Denis
2020-08-20add license header to all std lib filesAndrew Kelley
add SPDX license identifier copyright ownership is zig contributors
2019-11-08fixups and zig fmtAndrew Kelley