Hash :
137dda35
Author :
Date :
2018-06-21T11:25:02
random, random_r: merge from glibc * lib/random.c, lib/random_r.c: Include libc-config.h if !_LIBC, not config.h unilaterally. * lib/random.c: Do not include stdint.h or time.h; not needed. Include libc-lock.h if _LIBC, and define substitute macros otherwise. (unsafe_state): Rename from generator. All uses changed. Use C99-style initializers. (__random, __srandom, __initstate, __setstate): Rename from non-underscored version, but define it to non-underscored version on Gnulib. Add a lock. * lib/random_r.c (__srandom_r, __initstate_r, __setstate_r, __random_r): Likewise. Do not include <stdint.h>; not needed since stdlib.h defines int32_t. (weak_alias, __set_errno) [!_LIBC]: Remove; now done by libc-config. (__srandom_r): Use int32_t instead of long int where int32_t will do. (__random_r): Use uint32 to fix glibc bug 17343. * modules/random, modules/random_r (Depends-on): Add libc-config. Depend on stdint only if $HAVE_RANDOM = 0.
Description:
global random number generator
Files:
lib/random.c
m4/random.m4
Depends-on:
libc-config [test $HAVE_RANDOM = 0]
stdlib
stdint [test $HAVE_RANDOM = 0]
random_r [test $HAVE_RANDOM = 0]
configure.ac:
gl_FUNC_RANDOM
if test $HAVE_RANDOM = 0; then
AC_LIBOBJ([random])
gl_PREREQ_RANDOM
fi
gl_STDLIB_MODULE_INDICATOR([random])
Makefile.am:
Include:
<stdlib.h>
License:
LGPL
Maintainer:
glibc