4c9fe04250
rand(3)'s standard C API is extremely limiting, but we can do better than the historical 32-bit state Park-Miller LCG we've shipped since 2001: r73156. The justification provided at the time for not using random(3) was that rand_r(3) could not be made to use the same algorithm. That is still true. However, the irrelevance of rand_r(3) is increasingly obvious. Since that time, POSIX has marked the interface obsolescent. rand_r(3) never became part of the standard C library. If not for API compatibility reasons, I would just remove rand_r(3) entirely. So, I do not believe it is a problem for rand_r(3) and rand(3) to diverge. The 12 ABI is maintained with compatibility definitions, but this revision does subtly change the API of rand(3). The sequences of pseudorandom numbers produced in programs built against new versions of libc will differ from programs built against prior versions of libc. Reviewed by: kevans, markm MFC after: no Relnotes: yes Differential Revision: https://reviews.freebsd.org/D23290
137 lines
1.4 KiB
Plaintext
137 lines
1.4 KiB
Plaintext
/*
|
|
* $FreeBSD$
|
|
*/
|
|
|
|
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_r;
|
|
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;
|
|
strtoq_l;
|
|
strtoul_l;
|
|
strtoull_l;
|
|
strtoumax_l;
|
|
strtouq_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 {
|
|
qsort_s;
|
|
rand;
|
|
srand;
|
|
};
|
|
|
|
FBSDprivate_1.0 {
|
|
__system;
|
|
_system;
|
|
__libc_system;
|
|
__cxa_thread_call_dtors;
|
|
__libc_atexit;
|
|
};
|