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.