| #
a98e5d78
|
| 03-Dec-2025 |
Konstantin Belousov <kib@FreeBSD.org> |
libc/string: add strdupa(3) and strndupa(3)
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D54066
|
| #
415a0ce0
|
| 20-Mar-2025 |
Stephen Hurd <shurd@FreeBSD.org> |
Revert Make newly POSIX functions visible
Summary: This reverts commit d7efac1be1441c122f7fb9de51a409172f21326c. This reverts commit 9d0eea9422d075c8a6924b33161d2d5abfb4072a.
Some ports (specifical
Revert Make newly POSIX functions visible
Summary: This reverts commit d7efac1be1441c122f7fb9de51a409172f21326c. This reverts commit 9d0eea9422d075c8a6924b33161d2d5abfb4072a.
Some ports (specifically Python) define __BSD_VISIBLE themselves, so the change from __BSD_VISIBLE to __POSIX_VISIBLE >= 202405 makes them fail.
Reported by: jrtc27, cperciva
show more ...
|
| #
9d0eea94
|
| 19-Mar-2025 |
Stephen Hurd <shurd@FreeBSD.org> |
Make newly POSIX functions visible
Some of the POSIX 202405L functions are already in the system, make them visible when appropriate.
Reviewed by: imp MFC after: 1 week Differential Revision: https
Make newly POSIX functions visible
Some of the POSIX 202405L functions are already in the system, make them visible when appropriate.
Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47859
show more ...
|
| #
59677aec
|
| 01-Dec-2024 |
Stephen Hurd <shurd@FreeBSD.org> |
Expose POSIX functions incorporated into C23
C23 has incoporated a small number of POSIX functions, so these should be exposed for C23, regardless of POSIX.
Reviewed by: imp, emaste Differential Re
Expose POSIX functions incorporated into C23
C23 has incoporated a small number of POSIX functions, so these should be exposed for C23, regardless of POSIX.
Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D47856
show more ...
|
| #
007871c3
|
| 25-Oct-2024 |
Robert Clausecker <fuz@FreeBSD.org> |
lib/libc/string: add memset_explicit() for compliance with C23
Patterned after explicit_bzero, visible from C23 onwards.
Reviewed by: emaste, kevans Differential Revision: https://reviews.freebsd.o
lib/libc/string: add memset_explicit() for compliance with C23
Patterned after explicit_bzero, visible from C23 onwards.
Reviewed by: emaste, kevans Differential Revision: https://reviews.freebsd.org/D47286
show more ...
|
| #
0c47b9c2
|
| 16-Jul-2024 |
Kyle Evans <kevans@FreeBSD.org> |
include: ssp: don't shadow the mempcpy builtin
GCC emits a warning about shadowing a builtin with our mempcpy declaration, so switch it to using the same model as memcpy() and use the apparently-exi
include: ssp: don't shadow the mempcpy builtin
GCC emits a warning about shadowing a builtin with our mempcpy declaration, so switch it to using the same model as memcpy() and use the apparently-existing __builtin___mempcpy_chk().
Reviewed by: kib (earlier version), markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45976
show more ...
|
| #
cf8e5289
|
| 13-Jul-2024 |
Kyle Evans <kevans@FreeBSD.org> |
include: ssp: round out fortification of current set of headers
ssp/ssp.h needed some improvements: - `len` isn't always a size_t, it may need casted - In some cases we may want to use a len that
include: ssp: round out fortification of current set of headers
ssp/ssp.h needed some improvements: - `len` isn't always a size_t, it may need casted - In some cases we may want to use a len that isn't specified as a parameter (e.g., L_ctermid), so __ssp_redirect() should be more flexible. - In other cases we may want additional checking, so pull all of the declaration bits out of __ssp_redirect_raw() so that some functions can implement the body themselves.
strlcat/strlcpy should be the last of the fortified functions that get their own __*_chk symbols, and these cases are only done to be consistent with the rest of the str*() set.
Reviewed by: markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45679
show more ...
|
| #
5af6fbd7
|
| 14-May-2024 |
Kyle Evans <kevans@FreeBSD.org> |
ssp: appease -Wgnu-statement-expression-from-macro-expansion
It's a stupid warning, but some ports enable it by default and were already defining _FORTIFY_SOURCE, thus exposing the new macros immedi
ssp: appease -Wgnu-statement-expression-from-macro-expansion
It's a stupid warning, but some ports enable it by default and were already defining _FORTIFY_SOURCE, thus exposing the new macros immediately. This at least fixes the libfido2 build, perhaps others as well.
While we're here, fix a fresh build of stand w/ FORTIFY_SOURCE enabled by not pulling in the ssp headers if _STANDALONE is defined. We do not have runtime support in libsa as of the time of writing.
Reported by: netchild Sponsored by: Stormshield Sponsored by: Klara, Inc.
show more ...
|
| #
9bfd3b40
|
| 13-May-2024 |
Kyle Evans <kevans@FreeBSD.org> |
Add a build knob for _FORTIFY_SOURCE
In the future, we will Default to _FORTIFY_SOURCE=2 if SSP is enabled, otherwise default to _FORTIFY_SOURCE=0. For now we default it to 0 unconditionally to eas
Add a build knob for _FORTIFY_SOURCE
In the future, we will Default to _FORTIFY_SOURCE=2 if SSP is enabled, otherwise default to _FORTIFY_SOURCE=0. For now we default it to 0 unconditionally to ease bisect across older versions without the new symbols, and we'll put out a call for testing.
include/*.h include their ssp/*.h equivalents as needed based on the knob. Programs and users are allowed to override FORTIFY_SOURCE in their Makefiles or src.conf/make.conf to force it off.
Reviewed by: des, markj Relnotes: yes Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D32308
show more ...
|
| #
5a1d1441
|
| 23-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
include: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a pe
include: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script.
Sponsored by: Netflix
show more ...
|
| #
42b38843
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .h pattern
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
|
| #
05c9a015
|
| 24-Aug-2022 |
Aymeric Wibo <obiwac@gmail.com> |
libc: Add strverscmp(3) and versionsort(3)
Add a strverscmp(3) function to libc, a GNU extension I implemented by reading its glibc manual page. It orders strings following a much more natural order
libc: Add strverscmp(3) and versionsort(3)
Add a strverscmp(3) function to libc, a GNU extension I implemented by reading its glibc manual page. It orders strings following a much more natural ordering (e.g. "ent1 < ent2 < ent10" as opposed to "ent1 < ent10 < ent2" with strcmp(3)'s lexicographic ordering).
Also add versionsort(3) for use as scandir(3)'s compar argument.
Update manual page for scandir(3) and add one for strverscmp(3).
Reviewed by: pstef, gbe, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D35807
show more ...
|
| #
ee37f64c
|
| 14-Jul-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
libc: add mempcpy(3) and wmempcpy(3)
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D31180
|
| #
849dcdb1
|
| 25-Jun-2021 |
Alfonso Gregory <gfunni234@gmail.com> |
Change strmode argument type to mode_t
Finally, we have the correct function definition for strmode. NetBSD/OpenBSD did this many years ago. This code is weird sign extension safe.
Reviewed by: im
Change strmode argument type to mode_t
Finally, we have the correct function definition for strmode. NetBSD/OpenBSD did this many years ago. This code is weird sign extension safe.
Reviewed by: imp@ Pull Request: https://github.com/freebsd/freebsd-src/pull/493
show more ...
|
| #
65bf3043
|
| 17-Dec-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
Change POSIX compliance level for visibility of strerror_l(3).
Third-party code tests for strerror_l(3) without specifying _POSIX_SOURCE, and then expects that the function is prototyped with _POSIX
Change POSIX compliance level for visibility of strerror_l(3).
Third-party code tests for strerror_l(3) without specifying _POSIX_SOURCE, and then expects that the function is prototyped with _POSIX_SOURCE set to 200112.
Reported and tested by: antoine Sponsored by: The FreeBSD Foundation MFC after: 13 days
show more ...
|
| #
11478453
|
| 20-Aug-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Vendor import of stripped libc++ trunk r366426 (just before the release_90 branch point):
https://llvm.org/svn/llvm-project/libcxx/trunk@366426
|
| #
a98e5d78
|
| 03-Dec-2025 |
Konstantin Belousov <kib@FreeBSD.org> |
libc/string: add strdupa(3) and strndupa(3)
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D54066
|
| #
415a0ce0
|
| 20-Mar-2025 |
Stephen Hurd <shurd@FreeBSD.org> |
Revert Make newly POSIX functions visible
Summary: This reverts commit d7efac1be1441c122f7fb9de51a409172f21326c. This reverts commit 9d0eea9422d075c8a6924b33161d2d5abfb4072a.
Some ports (specifical
Revert Make newly POSIX functions visible
Summary: This reverts commit d7efac1be1441c122f7fb9de51a409172f21326c. This reverts commit 9d0eea9422d075c8a6924b33161d2d5abfb4072a.
Some ports (specifically Python) define __BSD_VISIBLE themselves, so the change from __BSD_VISIBLE to __POSIX_VISIBLE >= 202405 makes them fail.
Reported by: jrtc27, cperciva
show more ...
|
| #
9d0eea94
|
| 19-Mar-2025 |
Stephen Hurd <shurd@FreeBSD.org> |
Make newly POSIX functions visible
Some of the POSIX 202405L functions are already in the system, make them visible when appropriate.
Reviewed by: imp MFC after: 1 week Differential Revision: https
Make newly POSIX functions visible
Some of the POSIX 202405L functions are already in the system, make them visible when appropriate.
Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D47859
show more ...
|
| #
59677aec
|
| 01-Dec-2024 |
Stephen Hurd <shurd@FreeBSD.org> |
Expose POSIX functions incorporated into C23
C23 has incoporated a small number of POSIX functions, so these should be exposed for C23, regardless of POSIX.
Reviewed by: imp, emaste Differential Re
Expose POSIX functions incorporated into C23
C23 has incoporated a small number of POSIX functions, so these should be exposed for C23, regardless of POSIX.
Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D47856
show more ...
|
| #
007871c3
|
| 25-Oct-2024 |
Robert Clausecker <fuz@FreeBSD.org> |
lib/libc/string: add memset_explicit() for compliance with C23
Patterned after explicit_bzero, visible from C23 onwards.
Reviewed by: emaste, kevans Differential Revision: https://reviews.freebsd.o
lib/libc/string: add memset_explicit() for compliance with C23
Patterned after explicit_bzero, visible from C23 onwards.
Reviewed by: emaste, kevans Differential Revision: https://reviews.freebsd.org/D47286
show more ...
|
| #
0c47b9c2
|
| 16-Jul-2024 |
Kyle Evans <kevans@FreeBSD.org> |
include: ssp: don't shadow the mempcpy builtin
GCC emits a warning about shadowing a builtin with our mempcpy declaration, so switch it to using the same model as memcpy() and use the apparently-exi
include: ssp: don't shadow the mempcpy builtin
GCC emits a warning about shadowing a builtin with our mempcpy declaration, so switch it to using the same model as memcpy() and use the apparently-existing __builtin___mempcpy_chk().
Reviewed by: kib (earlier version), markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45976
show more ...
|
| #
cf8e5289
|
| 13-Jul-2024 |
Kyle Evans <kevans@FreeBSD.org> |
include: ssp: round out fortification of current set of headers
ssp/ssp.h needed some improvements: - `len` isn't always a size_t, it may need casted - In some cases we may want to use a len that
include: ssp: round out fortification of current set of headers
ssp/ssp.h needed some improvements: - `len` isn't always a size_t, it may need casted - In some cases we may want to use a len that isn't specified as a parameter (e.g., L_ctermid), so __ssp_redirect() should be more flexible. - In other cases we may want additional checking, so pull all of the declaration bits out of __ssp_redirect_raw() so that some functions can implement the body themselves.
strlcat/strlcpy should be the last of the fortified functions that get their own __*_chk symbols, and these cases are only done to be consistent with the rest of the str*() set.
Reviewed by: markj Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D45679
show more ...
|
| #
5af6fbd7
|
| 14-May-2024 |
Kyle Evans <kevans@FreeBSD.org> |
ssp: appease -Wgnu-statement-expression-from-macro-expansion
It's a stupid warning, but some ports enable it by default and were already defining _FORTIFY_SOURCE, thus exposing the new macros immedi
ssp: appease -Wgnu-statement-expression-from-macro-expansion
It's a stupid warning, but some ports enable it by default and were already defining _FORTIFY_SOURCE, thus exposing the new macros immediately. This at least fixes the libfido2 build, perhaps others as well.
While we're here, fix a fresh build of stand w/ FORTIFY_SOURCE enabled by not pulling in the ssp headers if _STANDALONE is defined. We do not have runtime support in libsa as of the time of writing.
Reported by: netchild Sponsored by: Stormshield Sponsored by: Klara, Inc.
show more ...
|
| #
9bfd3b40
|
| 13-May-2024 |
Kyle Evans <kevans@FreeBSD.org> |
Add a build knob for _FORTIFY_SOURCE
In the future, we will Default to _FORTIFY_SOURCE=2 if SSP is enabled, otherwise default to _FORTIFY_SOURCE=0. For now we default it to 0 unconditionally to eas
Add a build knob for _FORTIFY_SOURCE
In the future, we will Default to _FORTIFY_SOURCE=2 if SSP is enabled, otherwise default to _FORTIFY_SOURCE=0. For now we default it to 0 unconditionally to ease bisect across older versions without the new symbols, and we'll put out a call for testing.
include/*.h include their ssp/*.h equivalents as needed based on the knob. Programs and users are allowed to override FORTIFY_SOURCE in their Makefiles or src.conf/make.conf to force it off.
Reviewed by: des, markj Relnotes: yes Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D32308
show more ...
|