Commit graph

9 commits

Author SHA1 Message Date
Andrew Kelley
96bd268c8c zig libc: simplify implementation
- use symbol export helper
- move all declarations from common.zig into c.zig
- correct documentation
- delete dead code
2026-02-11 07:58:11 +01:00
GasInfinity
e10a325410
feat(libzigc): implement the drand48 family
* also remove their musl implementation
2026-01-14 13:14:33 +01:00
GasInfinity
ad3828db45
feat(libzigc): use common rand implementations
* also remove their musl implementation
2026-01-14 12:47:58 +01:00
GasInfinity
8e69ab8a31 fix(libzigc): negative bases are also invalid 2026-01-13 05:58:13 +01:00
GasInfinity
514f6e589c feat(libzigc): use common integer ato* and strto* implementations
* also removes their musl implementation
2026-01-12 00:55:11 +01:00
GasInfinity
7f6eab2704 feat(libzigc): add nan, nanf, nanl and bsearch
* also remove musl implementation
2026-01-09 00:26:20 +01:00
GasInfinity
335c0fcba1 feat(libzigc): add div, ldiv, lldiv and imaxdiv
* also remove musl implementation
2026-01-07 21:53:40 +01:00
GasInfinity
fa625e878f feat(libzigc): add qsort
* also remove musl implementation
2026-01-07 00:06:57 +01:00
David
55848363fd
libc: implement common abs for various integer sizes (#23893)
* libc: implement common `abs` for various integer sizes

* libc: move imaxabs to inttypes.zig and don't use cInclude

* libc: delete `fabs` c implementations because already implemented in compiler_rt

* libc: export functions depending on the target libc

Previously all the functions that were exported were handled equally,
though some may exist and some not inside the same file. Moving the
checks inside the file allows handling different functions differently

* remove empty ifs in inttypes

Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>

* remove empty ifs in stdlib

Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>

* libc: use `@abs` for the absolute value calculation

---------

Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
2025-05-21 00:57:38 +02:00