aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/include/generic-glibc
AgeCommit message (Collapse)Author
2025-09-24glibc: guard inet-fortified.hKyle Schwarz
2025-07-31glibc: update headers to 2.42Alex Rønne Petersen
2025-07-16fix glibc version for single_threaded.h (2.32 instead of 2.35)DubbleClick
2025-06-24add glibc versioning for a number of headers (#24237)Marc
* getrandom was added in glibc 2.25 https://sourceware.org/bugzilla/show_bug.cgi?id=17252 * copy_file_range was added in glibc 2.27 https://sourceware.org/git/?p=glibc.git;a=commit;h=bad7a0c81f501fbbcc79af9eaa4b8254441c4a1f * threads.h should not exist for glibc < 2.28 * single_threaded.h should not exist for glibc < 2.35 * Apply suggestions from code review Co-authored-by: Alex Rønne Petersen <alex@alexrp.com> * 2.35 instead of 35 * before 2.35 instead of 2.34 and before --------- Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
2025-03-13glibc: fix uninitialized memory in __pthread_cond_s for <=2.40TCROC
* https://sourceware.org/bugzilla/show_bug.cgi?id=32786 * https://inbox.sourceware.org/libc-alpha/87zfhpfqsm.fsf@oldenburg.str.redhat.com
2025-02-14glibc: don't redirect fts to fts64 before glibc 2.23Hugo Beauzée-Luyssen
2025-02-10Merge pull request #22695 from alexrp/glibc-2-41Andrew Kelley
glibc 2.41
2025-02-08generic glibc: guard memfd_create & mlock2 declarationsHugo Beauzée-Luyssen
They were introduced in glibc 2.27
2025-02-06generic glibc: guard pidfd_spawn(p) declarationsHugo Beauzée-Luyssen
2025-02-06generic glibc: guard pidfd function declarationsHugo Beauzée-Luyssen
They were introduced in 2.36 & 2.39
2025-02-06generic glibc: guard definitions of functions introduced in 2.36Hugo Beauzée-Luyssen
2025-02-06generic glibc: guard statx declarationHugo Beauzée-Luyssen
It was added in glibc 2.28
2025-02-06generic glibc: guard close_range declarationHugo Beauzée-Luyssen
It is only available starting from glibc 2.34
2025-01-31glibc: Update header files to 2.41.Alex Rønne Petersen
2024-09-01lib: guard definition of `strl{cat,cpy}` against glibc version when ↵Federico Di Pierro
_FORTIFY_SOURCE is enabled. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-08-08Update glibc headers to 2.40.Alex Rønne Petersen
2024-07-03glibc headers: arc4random* functions added in glibc 2.36Pat Tullmann
Here's the glibc v2.36 announcment noting the addition of arc4random, arc4random_buf and arc4random_uniform: https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;h=8420a65cd06874ee09518366b8fba746a557212a;hb=6f4e0fcfa2d2b0915816a3a3a1d48b4763a7dee2 Tested with the testcase from the bug. I get a compile-time error when building against older glibc (instead of a linker error), and no errors (as before) when compiling against v2.36 or later. And the glibc_compat regression tests pass. Fix #20426
2024-06-05glibc: use __GLIBC_USE_DEPRECATED_SCANF for glibc versions < 2.7Markus F.X.J. Oberhumer
2024-06-05glibc: move __GLIBC__ version defines to the top of the fileMarkus F.X.J. Oberhumer
2024-06-05glibc: strlcpy and strlcat arrived in glibc 2.38Pat Tullmann
So only expose these in generic-glibc/string.h if Zig is building a v2.38 (or later) glibc stub. Announcement of 2.38 that notes strlcpy and strlcat: https://lists.gnu.org/archive/html/info-gnu/2023-07/msg00010.html
2024-06-05glibc headers: reallocarray added to glibc in v2.26Pat Tullmann
Here's the glibc commit that adds reallocarray to glibc: https://sourceware.org/git/?p=glibc.git;a=commit;h=2e0bbbfbf95fc9e22692e93658a6fbdd2d4554da The reallocarray symbol is declared in both stdlib.h and malloc.h. Fix #17607
2024-06-05glibc patch: add backwards compatibility for strtol-family functionsXavier Bouchoux
following suit from b40943e253c079ec3de1b149dd2ef0ccc3da38a4, add a version guard in addition to the ISOC2X check.
2024-06-05glibc patch: add a few dn_* functionsMotiejus Jakštys
This is necessary to build glib.
2024-06-05glibc patch: add backwards compatibility for some symbolsMotiejus Jakštys
- `fcntl` was renamed to `fcntl64` in glibc 2.28 (see #9485) - `res_{,n}{search,query,querydomain}` became "their own" symbols since glibc 2.34: they were prefixed with `__` before. This PR makes it possible to use `fcntl` with glibc 2.27 or older and the `res_*` functions with glibc 2.33 or older. These patches will become redundant with universal-headers and can be dropped. But we have to do with what we have now.
2024-06-05glibc patch: version-gate _DYNAMIC_STACK_SIZE_SOURCEAndrew Kelley
This is a patch to glibc features.h which makes _DYNAMIC_STACK_SIZE_SOURCE undefined unless the version is >= 2.34. This feature was introduced with glibc 2.34 and without this patch, code built against these headers but then run on an older glibc will end up making a call to sysconf() that returns -1 for the value of SIGSTKSZ and MINSIGSTKSZ.
2024-06-05glibc patch: don't hardcode __GLIBC_MINOR__Andrew Kelley
Instead Zig passes it based on the target.
2024-06-05update glibc headers to 2.39Andrew Kelley
2024-01-25glibc: use __GLIBC_USE_DEPRECATED_SCANF for glibc versions < 2.7Markus F.X.J. Oberhumer
2024-01-25glibc: move __GLIBC__ version defines to the top of the fileMarkus F.X.J. Oberhumer
2024-01-04glibc: strlcpy and strlcat arrived in glibc 2.38Pat Tullmann
So only expose these in generic-glibc/string.h if Zig is building a v2.38 (or later) glibc stub. Announcement of 2.38 that notes strlcpy and strlcat: https://lists.gnu.org/archive/html/info-gnu/2023-07/msg00010.html
2023-10-20glibc headers: reallocarray added to glibc in v2.26Pat Tullmann
Here's the glibc commit that adds reallocarray to glibc: https://sourceware.org/git/?p=glibc.git;a=commit;h=2e0bbbfbf95fc9e22692e93658a6fbdd2d4554da The reallocarray symbol is declared in both stdlib.h and malloc.h. Fix #17607
2023-10-16glibc patch: add backwards compatibility for strtol-family functionsXavier Bouchoux
following suit from b40943e253c079ec3de1b149dd2ef0ccc3da38a4, add a version guard in addition to the ISOC2X check.
2023-10-13glibc patch: add a few dn_* functionsMotiejus Jakštys
This is necessary to build glib.
2023-10-13glibc patch: add backwards compatibility for some symbolsMotiejus Jakštys
- `fcntl` was renamed to `fcntl64` in glibc 2.28 (see #9485) - `res_{,n}{search,query,querydomain}` became "their own" symbols since glibc 2.34: they were prefixed with `__` before. This PR makes it possible to use `fcntl` with glibc 2.27 or older and the `res_*` functions with glibc 2.33 or older. These patches will become redundant with universal-headers and can be dropped. But we have to do with what we have now.
2023-10-13glibc patch: version-gate _DYNAMIC_STACK_SIZE_SOURCEAndrew Kelley
This is a patch to glibc features.h which makes _DYNAMIC_STACK_SIZE_SOURCE undefined unless the version is >= 2.34. This feature was introduced with glibc 2.34 and without this patch, code built against these headers but then run on an older glibc will end up making a call to sysconf() that returns -1 for the value of SIGSTKSZ and MINSIGSTKSZ.
2023-10-13glibc patch: don't hardcode __GLIBC_MINOR__Andrew Kelley
Instead Zig passes it based on the target.
2023-10-13update glibc headers to 2.38Andrew Kelley
2023-05-04glibc hacks: also add a few dn_* functionsMotiejus Jakštys
2023-03-28glibc: add backwards compatibility for some symbolsMotiejus Jakštys
- `fcntl` was renamed to `fcntl64` in glibc 2.28 (see #9485) - `res_{,n}{search,query,querydomain}` became "their own" symbols since glibc 2.34: they were prefixed with `__` before. This PR makes it possible to use `fcntl` with glibc 2.27 or older and the `res_*` functions with glibc 2.33 or older. These patches will become redundant with universal-headers and can be dropped. But we have to do with what we have now. Closes #9485
2022-01-28glibc: version-gate _DYNAMIC_STACK_SIZE_SOURCEAndrew Kelley
This is a patch to glibc features.h which makes _DYNAMIC_STACK_SIZE_SOURCE undefined unless the version is >= 2.34. This feature was introduced with glibc 2.34 and without this patch, code built against these headers but then run on an older glibc will end up making a call to sysconf() that returns -1 for the value of SIGSTKSZ and MINSIGSTKSZ. Closes #10713
2022-01-19glibc: fix passing of __GNU_MINOR__Daniel Saier
This was originally introduced in 4d48948b526337947ef59a83f7dbc81b70aa5723 but broken immediately afterwards in c8af00c66e8b6f62e4dd6ac4d86a3de03e9ea354.
2021-12-16glibc: fix inconsistency of powerpc ABI mappingAndrew Kelley
See the commit message of 5b6d26e97bb97d79782f3c77b02a997e361a1497 for an explanation. This is the same thing but for powerpc instead of mips.
2021-12-15glibc: fix inconsistency of mips ABI mappingAndrew Kelley
Before this commit, glibc headers did the following mapping: * (zig) mipsel-linux-gnu => (glibc) mipsel-linux-gnu * (zig) mipsel-linux-gnu-soft => (glibc) (none) * (zig) mips-linux-gnu => (glibc) mips-linux-gnu * (zig) mips-linux-gnu-soft => (glibc) (none) While the glibc ABI stubs used the (zig) gnueabi and gnueabihf ABIs, and the stage2 available_libcs array listed: * (zig) mipsel-linux-gnu * (zig) mips-linux-gnu The problem is the mismatch between the ABI component of the headers and the stubs. This commit makes the following clarifications: * (zig) mips-linux-gnueabi means soft-float * (zig) mipsel-linux-gnueabi means soft-float * (zig) mips-linux-gnueabihf means hard-float * (zig) mipsel-linux-gnueabihf means hard-float Consequently, the glibc headers now do this mapping: * (zig) mips-linux-gnueabihf => (glibc) mips-linux-gnu * (zig) mipsel-linux-gnueabihf => (glibc) mipsel-linux-gnu * (zig) mips-linux-gnueabi => (glibc) mips-linux-gnu-soft * (zig) mipsel-linux-gnueabi => (glibc) mipsel-linux-gnu-soft The glibc ABI stubs are unchanged, and the stage2 available_libcs array's 2 entries are modified and it gains 2 more: * (zig) mipsel-linux-gnueabi * (zig) mipsel-linux-gnueabihf * (zig) mips-linux-gnueabi * (zig) mips-linux-gnueabihf Now everything is consistent. Zig no longer recognizes a `mips-linux-gnu` triple; one must use `mips-linux-gnueabi` (soft float) or `mips-linux-gnueabihf` (hard float).
2021-12-15glibc: add missing riscv stubs headersAndrew Kelley
2021-12-15glibc: pass -D__GLIBC_MINOR__=XXAndrew Kelley
instead of hard-coding it. This means that C code has accurate glibc version information in the preprocessor.
2021-12-15update glibc headers to 2.34Andrew Kelley
closes #10308
2021-08-16add m68k glibc (2.33) headersAndrew Kelley
2021-04-04glibc: update headers to 2.33Andrew Kelley
This introduces csky support.
2020-08-30update glibc headers to 2.32Andrew Kelley
2020-08-24Revert "Merge pull request #6137 from Jan200101/update/glibc-2.32"Andrew Kelley
This reverts commit bb9c3118ed5fdc16b8e2d9882375005c2a62d0cc, reversing changes made to 7015d84e0ca6f02fede45621571084df98dda712. This is missing quite a few headers