freebsd-dev/lib/libproc
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
..
tests Do a sweep and remove most WARNS=6 settings 2020-10-01 01:10:51 +00:00
_libproc.h lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
libproc.h Add an envp argument to proc_create(). 2017-12-03 16:50:16 +00:00
Makefile libproc: replace home grown crc32 with zlib implementation. 2022-07-10 16:31:35 -07:00
Makefile.depend Update Makefile.depend files 2019-12-11 17:37:53 +00:00
Makefile.depend.options Add Makefile.depend.options 2019-12-11 17:37:37 +00:00
Makefile.inc Remove WARNS inherited fine by ../Makefile.inc. 2016-02-26 22:14:23 +00:00
proc_bkpt.c Merge OpenZFS support in to HEAD. 2020-08-25 02:21:27 +00:00
proc_create.c Use a global extern declaration to appease gcc. 2017-12-06 17:52:01 +00:00
proc_regs.c mips: hide regnum definitions behind _KERNEL/_WANT_MIPS_REGNUM 2019-08-22 21:43:21 +00:00
proc_rtld.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
proc_sym.c Alter the prototype of qsort_r(3) to match POSIX, which adopted the 2022-09-30 15:26:30 -07:00
proc_util.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00