History log of /freebsd/lib/libc/tests/stdlib/Makefile (Results 1 – 25 of 62)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# d59c7ea2 22-Aug-2026 Faraz Vahedi <kfv@FreeBSD.org>

libc: Implement bsearch_s(), document bsearch_b(), and add unit tests

- Implement bsearch_s() as per §K.3.6.3.2 in C23, first specified
in C11. It behaves identically to bsearch(), except the cal

libc: Implement bsearch_s(), document bsearch_b(), and add unit tests

- Implement bsearch_s() as per §K.3.6.3.2 in C23, first specified
in C11. It behaves identically to bsearch(), except the callback
is called with a third argument, context, which is passed through
from the caller, and it also performs runtime constraint checking
on its arguments.
- Document bsearch_b(), bsearch_s(), and add history section
- Add rudimentary unit tests for bsearch(), bsearch_b(), and bsearch_s()

Reviewed by: dteske, fuz
Approved by: dteske (mentor), fuz (mentor)
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D58876

show more ...


Revision tags: release/15.1.0-p2, release/15.0.0-p12, release/14.4.0-p8, release/15.0.0-p11, release/14.3.0-p16, release/14.4.0-p7, release/15.1.0-p1
# f68d7bfc 27-Jun-2026 Faraz Vahedi <kfv@kfv.io>

libc: Add strfromd, strfromf, and strfroml per C23

strfromd(), strfromf(), and strfroml() are implemented directly
in terms of gdtoa. If a non-conforming format string is passed,
the string "EDOOFU

libc: Add strfromd, strfromf, and strfroml per C23

strfromd(), strfromf(), and strfroml() are implemented directly
in terms of gdtoa. If a non-conforming format string is passed,
the string "EDOOFUS" is returned and errno set to EDOOFUS as an
extension.

Reviewed by: fuz
MFC after: 1 month
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2301
Signed-off-by: Faraz Vahedi <kfv@kfv.io>

show more ...


# 255538cd 15-Jun-2026 Piotr Kubaj <pkubaj@FreeBSD.org>

powerpc64le: switch long double to IEEE binary128

Change powerpc64le's long double from 64-bit double to IEEE 754
binary128 (quad, 113-bit mantissa), matching aarch64 and riscv64.

Gated on FreeBSD

powerpc64le: switch long double to IEEE binary128

Change powerpc64le's long double from 64-bit double to IEEE 754
binary128 (quad, 113-bit mantissa), matching aarch64 and riscv64.

Gated on FreeBSD 16 and powerpc64le only.

Differential Revision: https://reviews.freebsd.org/D57388
Reviewed by: adrian
Relnotes: yes

show more ...


Revision tags: release/15.1.0, release/15.0.0-p10, release/14.4.0-p6, release/14.3.0-p15, release/14.4.0-p5, release/14.3.0-p14, release/15.0.0-p9, release/14.4.0-p4, release/14.3.0-p13, release/13.5.0-p14, release/15.0.0-p8, release/14.4.0-p3, release/14.3.0-p12, release/13.5.0-p13, release/15.0.0-p7, release/13.5.0-p12, release/14.3.0-p11, release/14.4.0-p2, release/15.0.0-p6, release/13.5.0-p11, release/14.3.0-p10, release/14.4.0-p1, release/15.0.0-p5, release/14.4.0
# 7a1ade51 25-Feb-2026 Dag-Erling Smørgrav <des@FreeBSD.org>

system(3): Write our own tests

Replace the somewhat perfunctory NetBSD tests with our own.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: bnovkov, kevans
Differential Revision: https://re

system(3): Write our own tests

Replace the somewhat perfunctory NetBSD tests with our own.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: bnovkov, kevans
Differential Revision: https://reviews.freebsd.org/D55482

show more ...


Revision tags: release/13.5.0-p10, release/14.3.0-p9, release/15.0.0-p4, release/15.0.0-p3, release/13.5.0-p9, release/15.0.0-p2, release/14.3.0-p8, release/15.0.0-p1, release/13.5.0-p8, release/14.3.0-p7, release/15.0.0, release/14.3.0-p6, release/13.5.0-p7, release/13.5.0-p6, release/14.3.0-p5, release/13.5.0-p5, release/14.2.0-p7, release/14.3.0-p4, release/14.3.0-p3, release/14.2.0-p6, release/13.5.0-p4
# 5205b32d 15-Aug-2025 Dag-Erling Smørgrav <des@FreeBSD.org>

libc: Drop incorrect qsort optimization

As pointed out in the PR and the article linked below, the switch to
insertion sort in the BSD qsort code is based on a misunderstanding of
Knuth's TAOCP and

libc: Drop incorrect qsort optimization

As pointed out in the PR and the article linked below, the switch to
insertion sort in the BSD qsort code is based on a misunderstanding of
Knuth's TAOCP and is actually a pessimization. As demonstrated by the
added test, it is trivially easy to construct pathological input which
results in quadratic runtime. Without that misguided optimization, the
same input runs in nearly linearithmic time.

https://www.raygard.net/2022/02/26/Re-engineering-a-qsort-part-3

PR: 287089
MFC after: 1 week
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D51907

show more ...


Revision tags: release/13.5.0-p3, release/14.2.0-p5, release/14.3.0-p2, release/14.3.0-p1, release/14.2.0-p4, release/13.5.0-p2, release/14.3.0
# 873420ca 27-Apr-2025 Dag-Erling Smørgrav <des@FreeBSD.org>

libc: Add getenv_r() function.

This is a calque of the NetBSD function of the same name.

MFC after: never
Relontes: yes
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://

libc: Add getenv_r() function.

This is a calque of the NetBSD function of the same name.

MFC after: never
Relontes: yes
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D49979

show more ...


# 12668ead 22-Apr-2025 Dag-Erling Smørgrav <des@FreeBSD.org>

bsd.compiler.mk: Add a blocks compiler feature.

Sponsored by: Klara, Inc.
Reviewed by: jrtc27
Differential Revision: https://reviews.freebsd.org/D49963


# f0ac5e91 22-Apr-2025 Dag-Erling Smørgrav <des@FreeBSD.org>

fts: Add blocks support.

This adds an `fts_open_b()` variant of `fts_open()` which takes a block
instead of a function pointer.

This was inspired by, and is intended to be compatible with, Apple's

fts: Add blocks support.

This adds an `fts_open_b()` variant of `fts_open()` which takes a block
instead of a function pointer.

This was inspired by, and is intended to be compatible with, Apple's
implementation; however, although our FTS and theirs share a common
ancestor, they have diverged significantly. That and the fact that
we still target compilers which don't support blocks means Apple's
implementation was not directly reusable.

This is the second use case for blocks in FreeBSD (the first being
`qsort_b()`, which we use here). This suggest we might want to add
a `COMPILER_FEATURE` for blocks to avoid hardcoding any further
`COMPILER_TYPE` checks.

MFC after: never
Relnotes: yes
Sponsored by: Klara, Inc.
Reviewed by: kevans, theraven, imp
Differential Revision: https://reviews.freebsd.org/D49877

show more ...


# 6527682a 11-Apr-2025 John Baldwin <jhb@FreeBSD.org>

src: Use gnu++17 as the default C++ standard

Previously the compiler's default C++ standard was used unlike C where
bsd.sys.mk explicitly sets a default language version. Setting an
explicit defaul

src: Use gnu++17 as the default C++ standard

Previously the compiler's default C++ standard was used unlike C where
bsd.sys.mk explicitly sets a default language version. Setting an
explicit default version will give a more uniform experience across
different compilers and compiler versions.

gnu++17 was chosen to match the default C standard. It is well
supported by a wide range of clang (5+) and GCC (9+) versions.

gnu++17 is also the default C++ standard in recent versions of clang
(16+) and GCC (11+). As a result, many of the explicit CXXSTD
settings in Makefiles had the effect of lowering the C++ standard
instead of raising it as was originally intended and are removed.

Note that the remaining explicit CXXSTD settings for atf and liblutok
explicitly lower the standard to C++11 due to use of the deprecated
auto_ptr<> template which is removed in later versions.

Reviewed by: imp, asomers, dim, emaste
Differential Revision: https://reviews.freebsd.org/D49223

show more ...


Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3
# ee9ce107 05-Apr-2025 Kyle Evans <kevans@FreeBSD.org>

libc: tests: add some tests for __cxa_atexit handling

This adds a basic test that __cxa_atexit works, and also adds some tests
for __cxa_atexit handlers registered in the middle of __cxa_finalize.

libc: tests: add some tests for __cxa_atexit handling

This adds a basic test that __cxa_atexit works, and also adds some tests
for __cxa_atexit handlers registered in the middle of __cxa_finalize.

PR: 285870

show more ...


Revision tags: release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0
# c0946aee 07-Aug-2024 Mark Johnston <markj@FreeBSD.org>

libc tests: Add some test cases for recursive exiting

Derived from tests posted by kib in D46108. I made one of them use a
pthread barrier instead of sleeping.

Reviewed by: kib
MFC after: 2 weeks

libc tests: Add some test cases for recursive exiting

Derived from tests posted by kib in D46108. I made one of them use a
pthread barrier instead of sleeping.

Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D46176

show more ...


# 5132e16e 29-Jul-2024 Mark Johnston <markj@FreeBSD.org>

libc tests: Rename the quick_exit test file, fix style

Call it libc_exit_test instead of exit_test because the NetBSD test
suite already has a file with the latter name. This is in preparation
for

libc tests: Rename the quick_exit test file, fix style

Call it libc_exit_test instead of exit_test because the NetBSD test
suite already has a file with the latter name. This is in preparation
for adding other exit()-related tests.

MFC after: 2 weeks

show more ...


# 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, release/13.3.0, release/14.0.0
# c7dd4601 26-Sep-2023 Dag-Erling Smørgrav <des@FreeBSD.org>

libc: Add a rudimentary test for quick_exit(3).

Sponsored by: Klara, Inc.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D41937


# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


Revision tags: release/13.2.0, release/12.4.0
# ab929323 04-Oct-2022 John Baldwin <jhb@FreeBSD.org>

qsort_b_test: Only build on clang.

GCC doesn't support -fblocks.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D36809


# 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 ...


# c65e42db 07-Sep-2022 Xin LI <delphij@FreeBSD.org>

libc: add test case for qsort_b(3)

Reviewed by: markj
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D36463


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 ...


Revision tags: release/13.0.0
# c1a3d7f2 19-Jan-2021 Alex Richardson <arichardson@FreeBSD.org>

Remove remaining uses of ${COMPILER_FEATURES:Mc++11}

All supported compilers have C++11 support so these checks can be replaced
with MK_CXX guards.
See also https://bugs.freebsd.org/bugzilla/show_bu

Remove remaining uses of ${COMPILER_FEATURES:Mc++11}

All supported compilers have C++11 support so these checks can be replaced
with MK_CXX guards.
See also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252759

PR: 252759
Reviewed By: emaste
Differential Revision: https://reviews.freebsd.org/D28234

show more ...


Revision tags: release/12.2.0
# 2d143336 24-Jun-2020 Mitchell Horne <mhorne@FreeBSD.org>

Enable long double tests on RISC-V

Some of the NetBSD contributed tests are gated behind the
__HAVE_LONG_DOUBLE flag. This flag seems to be defined only for
platforms whose long double is larger tha

Enable long double tests on RISC-V

Some of the NetBSD contributed tests are gated behind the
__HAVE_LONG_DOUBLE flag. This flag seems to be defined only for
platforms whose long double is larger than their double. I could not
find this explicitly documented anywhere, but it is implied by the
definitions in NetBSD's sys/arch/${arch}/include/math.h headers, and the
following assertion from the UBSAN code:

#ifdef __HAVE_LONG_DOUBLE
long double LD;
ASSERT(sizeof(LD) > sizeof(uint64_t));
#endif

RISC-V has 128-bit long doubles, so enable the tests on this platform,
and update the comments to better explain the purpose of this flag.

Reviewed by: ngie
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D25419

show more ...


Revision tags: release/11.4.0
# 53d2936c 20-Jan-2020 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r356848 through r356919.


# 6507380f 20-Jan-2020 Edward Tomasz Napierala <trasz@FreeBSD.org>

Add qsort_r(3) regression test.

MFC after: 2 weeks
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D23206


# 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 ...


Revision tags: release/12.1.0
# c5c3ba6b 03-Sep-2019 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r351317 through r351731.


123