opnsense-src/lib/libc/tests/stdlib
Ed Schouten af3c78886f 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
2022-09-30 15:26:30 -07:00
..
dynthr_mod libc/tests/stdlib/dynthr_mod/dynthr_mod.c: mark dummy as used 2021-11-29 17:39:51 +02:00
clearenv_test.c libc: fix the test 2021-11-08 12:35:03 +01:00
cxa_thread_atexit_nothr_test.cc Add __cxa_thread_atexit(3) API implementation. 2016-08-06 13:32:40 +00:00
cxa_thread_atexit_test.cc Add __cxa_thread_atexit(3) API implementation. 2016-08-06 13:32:40 +00:00
dynthr_test.c libc/tests: Add test case for jemalloc/libthr bug fixed in r343566 2019-01-31 02:49:24 +00:00
heapsort_test.c Integrate tools/regression/lib/libc/stdlib into the FreeBSD test suite 2015-11-08 07:03:17 +00:00
Makefile Alter the prototype of qsort_r(3) to match POSIX, which adopted the 2022-09-30 15:26:30 -07:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
mergesort_test.c Integrate tools/regression/lib/libc/stdlib into the FreeBSD test suite 2015-11-08 07:03:17 +00:00
qsort_b_test.c libc: add test case for qsort_b(3) 2022-09-06 23:11:46 -07:00
qsort_r_compat_test.c Alter the prototype of qsort_r(3) to match POSIX, which adopted the 2022-09-30 15:26:30 -07:00
qsort_r_test.c Alter the prototype of qsort_r(3) to match POSIX, which adopted the 2022-09-30 15:26:30 -07:00
qsort_s_test.c Add qsort_s(3). Apart from the constraints, it also makes it easier 2020-01-20 11:40:07 +00:00
qsort_test.c Integrate tools/regression/lib/libc/stdlib into the FreeBSD test suite 2015-11-08 07:03:17 +00:00
set_constraint_handler_s_test.c Implement the memset_s(3) function as specified by the C11 ISO/IEC 2017-03-30 04:57:26 +00:00
strfmon_test.c Allow multi-byte thousands separators in strfmon(3) 2018-12-19 22:57:47 +00:00
test-sort.h Integrate tools/regression/lib/libc/stdlib into the FreeBSD test suite 2015-11-08 07:03:17 +00:00
tsearch_test.c tsearch_test: Test twalk & add some determinism. 2017-06-06 03:40:45 +00:00