c62ff2800b
It serves no useful purpose and wasn't as popular as its equally meritless cousin, srandomdev(3). Setting aside the problems with rand(3) in general, the problem with this interface is that the seed isn't shared with the caller (other than by attacking the output of the generator, which is trivial, but not a hallmark of pleasant API design). The (arguable) utility of rand(3) or random(3) is as a semi-fast simulation generator which produces consistent results from a given seed. These are mutually at odd. Furthermore, sometimes people got the mistaken impression that a high quality random seed meant a weak generator like rand(3) or random(3) could be used for things like cryptographic key generation. This is absolutely not so. The API was never part of a standard and was not widely used in tree. Existing in-tree uses have all been removed. Possible replacement in out of tree codebases: char buf[3]; time_t t; time(t); strftime(buf, sizeof(buf), "%S", gmtime(&t)); srand(atoi(buf)); Relnotes: yes
133 lines
1.3 KiB
Plaintext
133 lines
1.3 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;
|
|
rand;
|
|
srand;
|
|
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;
|
|
};
|
|
|
|
FBSDprivate_1.0 {
|
|
__system;
|
|
_system;
|
|
__libc_system;
|
|
__cxa_thread_call_dtors;
|
|
__libc_atexit;
|
|
};
|