Files
Faraz Vahedi d59c7ea270 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
2026-08-22 18:31:27 +03:30

152 lines
1.5 KiB
Plaintext

FBSD_1.0 {
_Exit;
a64l;
abort;
abs;
atexit;
__cxa_atexit;
__cxa_finalize;
atof;
atoi;
atol;
atoll;
bsearch;
div;
__isthreaded;
exit;
getenv;
opterr;
optind;
optopt;
optreset;
optarg;
getopt;
getopt_long;
getopt_long_only;
suboptarg;
getsubopt;
grantpt;
ptsname;
unlockpt;
hcreate;
hdestroy;
hsearch;
heapsort;
imaxabs;
imaxdiv;
insque;
l64a;
l64a_r;
labs;
ldiv;
llabs;
lldiv;
lsearch;
lfind;
mergesort;
putenv;
qsort;
radixsort;
sradixsort;
rand_r;
srandom;
srandomdev;
initstate;
setstate;
random;
reallocf;
realpath;
remque;
setenv;
unsetenv;
strfmon;
strtoimax;
strtol;
strtoll;
strtonum;
strtoq;
strtoul;
strtoull;
strtoumax;
strtouq;
system;
tdelete;
tfind;
tsearch;
twalk;
};
FBSD_1.3 {
at_quick_exit;
atof_l;
atoi_l;
atol_l;
atoll_l;
quick_exit;
strtod_l;
strtof_l;
strtoimax_l;
strtol_l;
strtold_l;
strtoll_l;
strtoul_l;
strtoull_l;
strtoumax_l;
};
FBSD_1.4 {
atexit_b;
bsearch_b;
heapsort_b;
mergesort_b;
qsort_b;
hcreate_r;
hdestroy_r;
hsearch_r;
reallocarray;
};
FBSD_1.5 {
__cxa_thread_atexit;
__cxa_thread_atexit_impl;
abort_handler_s;
ignore_handler_s;
set_constraint_handler_s;
};
FBSD_1.6 {
ptsname_r;
qsort_s;
rand;
srand;
};
FBSD_1.7 {
clearenv;
qsort_r;
secure_getenv;
};
FBSD_1.8 {
getenv_r;
};
FBSD_1.9 {
bsearch_s;
memalignment;
recallocarray;
strfromd;
strfromf;
strfroml;
strtonumx;
tdestroy;
};
FBSDprivate_1.0 {
__system;
_system;
__libc_system;
__cxa_thread_call_dtors;
__libc_atexit;
};