freebsd-dev/sys/compat
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
..
freebsd32 freebsd32: Make sendmsg match native ABI for unpadded final control message 2022-09-15 17:16:22 +01:00
ia32 Retire sv_transtrap 2022-05-20 14:54:03 +03:00
lindebugfs linuxkpi: drm-kmod debugfs support 2022-09-20 19:41:10 +02:00
linprocfs linprocfs: Decode SGX CPU feature in cpuinfo 2022-06-29 10:37:52 +03:00
linsysfs linsysfs: plug set-but-not-used vars. 2022-03-31 23:49:26 +03:00
linux Add getsock 2022-09-10 19:47:47 +00:00
linuxkpi Alter the prototype of qsort_r(3) to match POSIX, which adopted the 2022-09-30 15:26:30 -07:00
x86bios pmap_unmapdev/bios: Accept a pointer instead of a vm_offset_t. 2022-09-22 15:08:52 -07:00