#
e9ac4169 |
| 15-Jul-2024 |
Warner Losh <imp@FreeBSD.org> |
Remove residual blank line at start of Makefile
This is a residual of the $FreeBSD$ removal.
MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
|
Revision tags: release/14.1.0 |
|
#
7e8e73fe |
| 05-Mar-2024 |
Brooks Davis <brooks@FreeBSD.org> |
libc: actually build bsearch_b
Fixes: 46cdc14062f7 Add support for some block functions ...
Reviewed by: theraven Differential Revision: https://reviews.freebsd.org/D44189
|
Revision tags: release/13.3.0 |
|
#
dc36d6f9 |
| 23-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
lib: 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 s
lib: 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 ...
|
Revision tags: release/14.0.0 |
|
#
dc41de36 |
| 18-Oct-2023 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
libc: Fix missing or misspelled MLINKS.
Differential Revision: https://reviews.freebsd.org/D42192
|
#
c5f49ece |
| 16-Aug-2023 |
Brooks Davis <brooks@FreeBSD.org> |
libc: regoranize malloc build
Create a stdlib/malloc to hold the definition of the malloc interface (e.g., the Symbol.map file) and make jemalloc a subdirectory. This will make it easier to integra
libc: regoranize malloc build
Create a stdlib/malloc to hold the definition of the malloc interface (e.g., the Symbol.map file) and make jemalloc a subdirectory. This will make it easier to integrate alternative allocators such as snmalloc while making it clear that the current jemalloc symbols are the FreeBSD API/ABI (for better or worse).
Suggested by: jrtc27 Reviewed by: jrtc27, emaste Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D41457
show more ...
|
#
4c757938 |
| 16-Aug-2023 |
Brooks Davis <brooks@FreeBSD.org> |
libc: include malloc via stdlib/Makefile.inc
There's a hierarchy here and we should use it.
Improves: cbeacb7c46f3a3650e5dbefa9a1a18bc9943a8cc
Reviewed by: jrtc27, jhb, emaste Sponsored by: DARPA
libc: include malloc via stdlib/Makefile.inc
There's a hierarchy here and we should use it.
Improves: cbeacb7c46f3a3650e5dbefa9a1a18bc9943a8cc
Reviewed by: jrtc27, jhb, emaste Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D41456
show more ...
|
#
d0b2dbfa |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
|
#
bb8e8e23 |
| 20-Apr-2023 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Revert "libc: Implement bsort(3) a bitonic type of sorting algorithm."
Some points for the future: - libc is not the right place for sorting algorithms. Probably libutil is better suited for thi
Revert "libc: Implement bsort(3) a bitonic type of sorting algorithm."
Some points for the future: - libc is not the right place for sorting algorithms. Probably libutil is better suited for this purpose or a dedicated libsort. Should move all sorting algorithms away from libc eventually. - CheriBSD uses capabilities for memory access, and could benefit from a standard memswap() function. - Do something about qsort() in FreeBSD's libc like: - Mark it deprecated on FreeBSD, as a first step, due to missing limits on CPU time. - Audit the use of qsort() in the FreeBSD base system and consider swapping to other existing sorting algorithms.
Discussed with: brooks@
Differential Revision: https://reviews.freebsd.org/D36493
This reverts commit a7469c9c0a504a5e6e9b89e148cd78df5e67ff7f. This reverts commit 7d65a450cdcc7cc743f2ecd114ba3428a21c0033. This reverts commit 8dcf3a82c54cb216df3213a013047907636a01da.
show more ...
|
Revision tags: release/13.2.0, release/12.4.0 |
|
#
8dcf3a82 |
| 08-Sep-2022 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
libc: Implement bsort(3) a bitonic type of sorting algorithm.
The bsort(3) algorithm works by swapping objects, similarly to qsort(3), and does not require any significant amount of additional memor
libc: Implement bsort(3) a bitonic type of sorting algorithm.
The bsort(3) algorithm works by swapping objects, similarly to qsort(3), and does not require any significant amount of additional memory.
The bsort(3) algorithm doesn't suffer from the processing time issues known the plague the qsort(3) family of algorithms, and is bounded by a complexity of O(log2(N) * log2(N) * N), where N is the number of elements in the sorting array. The additional complexity compared to mergesort(3) is a fair tradeoff in situations where no memory may be allocated.
The bsort(3) APIs are identical to those of qsort(3), allowing for easy drop-in and testing.
The design of the bsort(3) algorithm allows for future parallell CPU execution when sorting arrays. The current version of the bsort(3) algorithm is single threaded. This is possible because fixed areas of the sorting data is compared at a time, and can easily be divided among different CPU's to sort large arrays faster.
Reviewed by: gbe@, delphij@, pauamma_gundo.com (manpages) Sponsored by: NVIDIA Networking Differential Revision: https://reviews.freebsd.org/D36493
show more ...
|
#
adeca214 |
| 13-Mar-2023 |
lucy <seafork@disroot.org> |
Add GNU glibc compatible secure_getenv
Add mostly glibc and msl compatible secure_getenv. Return NULL if issetugid() indicates the process is tainted, otherwise getenv(x). The rational behind this
Add GNU glibc compatible secure_getenv
Add mostly glibc and msl compatible secure_getenv. Return NULL if issetugid() indicates the process is tainted, otherwise getenv(x). The rational behind this is the fact that many Linux applications use this function instead of getenv() as it's widely consider a, "best practice".
Reviewed by: imp, mjg (feedback) Pull Request: https://github.com/freebsd/freebsd-src/pull/686 Signed-off-by: Lucy Marsh <seafork@disroot.org>
show more ...
|
#
af3c7888 |
| 01-Oct-2022 |
Ed Schouten <ed@FreeBSD.org> |
Alter the prototype of qsort_r(3) to match POSIX, which adopted the glibc-based interface.
Unfortunately, the glibc maintainers, despite knowing the existence of the FreeBSD qsort_r(3) interface in
Alter the prototype of qsort_r(3) to match POSIX, which adopted the glibc-based interface.
Unfortunately, the glibc maintainers, despite knowing the existence of the FreeBSD qsort_r(3) interface in 2004 and refused to add the same interface to glibc based on grounds of the lack of standardization and portability concerns, has decided it was a good idea to introduce their own qsort_r(3) interface in 2007 as a GNU extension with a slightly different and incompatible interface.
With the adoption of their interface as POSIX standard, let's switch to the same prototype, there is no need to remain incompatible.
C++ and C applications written for the historical FreeBSD interface get source level compatibility when building in C++ mode, or when building with a C compiler with C11 generics support, provided that the caller passes a fifth parameter of qsort_r() that exactly matches the historical FreeBSD comparator function pointer type and does not redefine the historical qsort_r(3) prototype in their source code.
Symbol versioning is used to keep old binaries working.
MFC: never Relnotes: yes Reviewed by: cem, imp, hps, pauamma Differential revision: https://reviews.freebsd.org/D17083
show more ...
|
Revision tags: release/13.1.0, release/12.3.0 |
|
#
597b0267 |
| 07-Nov-2021 |
Mariusz Zaborski <oshogbo@FreeBSD.org> |
libc: add clearenv function
The clearenv(3) function allows us to clear all environment variable in one shot. This may be useful for security programs that want to control the environment or what va
libc: add clearenv function
The clearenv(3) function allows us to clear all environment variable in one shot. This may be useful for security programs that want to control the environment or what variables are passed to new spawned programs.
Reviewed by: scf, markj (secteam), 0mp (manpages) Differential Revision: https://reviews.freebsd.org/D28223
show more ...
|
#
7f8f79a5 |
| 23-Jul-2021 |
Conrad Meyer <cem@FreeBSD.org> |
libc qsort(3): Eliminate ambiguous sign comparison
The left side of the MIN() expression is the (signed) result of pointer subtraction (ptrdiff_t). The right hand side is the also the (signed) resu
libc qsort(3): Eliminate ambiguous sign comparison
The left side of the MIN() expression is the (signed) result of pointer subtraction (ptrdiff_t). The right hand side is the also the (signed) result of pointer subtraction, additionally subtracting the element size ('es'), which is unsigned size_t. This coerces the right-hand expression into an unsigned value. MIN(signed, unsigned) triggers -Wsign-compare.
Sorting elements of size greater than SSIZE_MAX is nonsensical, so we can instead treat the element size as ssize_t, leaving the right-hand result the same signedness as the left.
Reviewed by: arichardson, kib Differential Revision: https://reviews.freebsd.org/D31292
show more ...
|
Revision tags: release/13.0.0, release/12.2.0 |
|
#
3e7224df |
| 17-Oct-2020 |
Xin LI <delphij@FreeBSD.org> |
Implement ptsname_r.
MFC after: 2 weeks PR: 250062 Reviewed by: jilles, 0mp, Ray <i maskray me> Differential Revision: https://reviews.freebsd.org/D26647
|
Revision tags: release/11.4.0 |
|
#
53d2936c |
| 20-Jan-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r356848 through r356919.
|
#
0d2fabfc |
| 20-Jan-2020 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
Add qsort_s(3). Apart from the constraints, it also makes it easier to port software written for Linux variant of qsort_r(3).
Reviewed by: kib, arichardson MFC after: 2 weeks Relnotes: yes Sponsore
Add qsort_s(3). Apart from the constraints, it also makes it easier to port software written for Linux variant of qsort_r(3).
Reviewed by: kib, arichardson MFC after: 2 weeks Relnotes: yes Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D23174
show more ...
|
#
c62ff280 |
| 14-Dec-2019 |
Conrad Meyer <cem@FreeBSD.org> |
Deprecate sranddev(3) API
It serves no useful purpose and wasn't as popular as its equally meritless cousin, srandomdev(3).
Setting aside the problems with rand(3) in general, the problem with this
Deprecate sranddev(3) API
It serves no useful purpose and wasn't as popular as its equally meritless cousin, srandomdev(3).
Setting aside the problems with rand(3) in general, the problem with this interface is that the seed isn't shared with the caller (other than by attacking the output of the generator, which is trivial, but not a hallmark of pleasant API design). The (arguable) utility of rand(3) or random(3) is as a semi-fast simulation generator which produces consistent results from a given seed. These are mutually at odd. Furthermore, sometimes people got the mistaken impression that a high quality random seed meant a weak generator like rand(3) or random(3) could be used for things like cryptographic key generation. This is absolutely not so.
The API was never part of a standard and was not widely used in tree. Existing in-tree uses have all been removed.
Possible replacement in out of tree codebases:
char buf[3]; time_t t;
time(t); strftime(buf, sizeof(buf), "%S", gmtime(&t)); srand(atoi(buf));
Relnotes: yes
show more ...
|
Revision tags: release/12.1.0, release/11.3.0, release/12.0.0 |
|
#
7847e041 |
| 24-Aug-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r338026 through r338297, and resolve conflicts.
|
#
540cc17f |
| 19-Aug-2018 |
Konstantin Belousov <kib@FreeBSD.org> |
Provide set_constraint_handler_s(3) man page.
Mention abort_handler_s(3) and ignore_handler_s(3), provide cross-reference from memset(3).
Submitted by: Yuri Pankov <yuripv@yuripv.net> MFC after: 3
Provide set_constraint_handler_s(3) man page.
Mention abort_handler_s(3) and ignore_handler_s(3), provide cross-reference from memset(3).
Submitted by: Yuri Pankov <yuripv@yuripv.net> MFC after: 3 days Differential revision: https://reviews.freebsd.org/D16797
show more ...
|
#
d3ee4763 |
| 19-Aug-2018 |
Konstantin Belousov <kib@FreeBSD.org> |
Use tab for indent.
Submitted by: Yuri Pankov <yuripv@yuripv.net> MFC after: 3 days
|
Revision tags: release/11.2.0 |
|
#
5fe6063d |
| 31-Jan-2018 |
Warner Losh <imp@FreeBSD.org> |
Move strtold wrapper from strtol.c to its own strtold.c. This code was written by theraven@ (David Chisnall) entirely, there's no original Berkeley code left here so just copy his copyright over.
|
Revision tags: release/10.4.0, release/11.1.0 |
|
#
9851b340 |
| 30-Mar-2017 |
Konstantin Belousov <kib@FreeBSD.org> |
Implement the memset_s(3) function as specified by the C11 ISO/IEC 9899:2011 Appendix K 3.7.4.1.
Other needed supporting types, defines and constraint_handler infrastructure is added as specified in
Implement the memset_s(3) function as specified by the C11 ISO/IEC 9899:2011 Appendix K 3.7.4.1.
Other needed supporting types, defines and constraint_handler infrastructure is added as specified in the C11 spec.
Submitted by: Tom Rix <trix@juniper.net> Sponsored by: Juniper Networks Discussed with: ed MFC after: 3 weeks Differential revision: https://reviews.freebsd.org/D9903 Differential revision: https://reviews.freebsd.org/D10161
show more ...
|
#
69415bc5 |
| 08-Jan-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r311546 through r311683.
|
#
b7c7684a |
| 07-Jan-2017 |
Konstantin Belousov <kib@FreeBSD.org> |
Export __cxa_thread_atexit_impl as an alias for __cxa_thread_atexit.
libstdc++ before gcc r244057 expected that libc provided __cxa_thread_atexit_impl, and libstdc++ implemented __cxa_thread_atexit,
Export __cxa_thread_atexit_impl as an alias for __cxa_thread_atexit.
libstdc++ before gcc r244057 expected that libc provided __cxa_thread_atexit_impl, and libstdc++ implemented __cxa_thread_atexit, by forwarding the calls to _impl. Mentioned gcc revision checks for __cxa_thread_atexit in libc and does not provide the symbol from libstdc++ if found.
This change helps older gcc, in particular, all released versions which implement thread_local, by consolidating the implementation into libc. For that versions, if configured with the current libc, the __cxa_thread_atexit is exported from libstdc++ as a trivial wrapper around libc::__cxa_thread_atexit_impl.
The __cxa_thread_atexit implementation is put into separate source file to allow for static linking with older libstdc++.a.
gcc bugzilla: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78968 Reported by: Hannes Hauswedell <h2+fbsdports@fsfe.org> PR: 215709 Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
show more ...
|
Revision tags: release/11.0.1, release/11.0.0 |
|
#
93badfa1 |
| 16-Sep-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r305687 through r305890.
|