rear pointers can't wrap on the same call by not testing the rear
pointer if the front one has wrapped. Returns a 31-bit random number. */
-int attribute_hidden __random_r(struct random_data *buf, int32_t *result)
+int random_r(struct random_data *buf, int32_t *result)
{
int32_t *state;
__set_errno (EINVAL);
return -1;
}
-strong_alias(__random_r,random_r)
+libc_hidden_proto(random_r)
+libc_hidden_def(random_r)
/* Initialize the random number generator based on the given seed. If the
type is the trivial no-state-information type, just remember the seed.
information a given number of times to get rid of any initial dependencies
introduced by the L.C.R.N.G. Note that the initialization of randtbl[]
for default usage relies on values produced by this routine. */
-int attribute_hidden __srandom_r (unsigned int seed, struct random_data *buf)
+int srandom_r (unsigned int seed, struct random_data *buf)
{
int type;
int32_t *state;
while (--kc >= 0)
{
int32_t discard;
- (void) __random_r (buf, &discard);
+ (void) random_r (buf, &discard);
}
done:
fail:
return -1;
}
-strong_alias(__srandom_r,srandom_r)
+libc_hidden_proto(srandom_r)
+libc_hidden_def(srandom_r)
/* Initialize the state information in the given array of N bytes for
future random number generation. Based on the number of bytes we
Note: The first thing we do is save the current state, if any, just like
setstate so that it doesn't matter when initstate is called.
Returns a pointer to the old state. */
-int attribute_hidden __initstate_r (unsigned int seed, char *arg_state, size_t n, struct random_data *buf)
+int initstate_r (unsigned int seed, char *arg_state, size_t n, struct random_data *buf)
{
int type;
int degree;
buf->state = state;
- __srandom_r (seed, buf);
+ srandom_r (seed, buf);
state[-1] = TYPE_0;
if (type != TYPE_0)
__set_errno (EINVAL);
return -1;
}
-strong_alias(__initstate_r,initstate_r)
+libc_hidden_proto(initstate_r)
+libc_hidden_def(initstate_r)
/* Restore the state from the given state array.
Note: It is important that we also remember the locations of the pointers
to the order in which things are done, it is OK to call setstate with the
same state as the current state
Returns a pointer to the old state information. */
-int attribute_hidden __setstate_r (char *arg_state, struct random_data *buf)
+int setstate_r (char *arg_state, struct random_data *buf)
{
int32_t *new_state = 1 + (int32_t *) arg_state;
int type;
__set_errno (EINVAL);
return -1;
}
-strong_alias(__setstate_r,setstate_r)
+libc_hidden_proto(setstate_r)
+libc_hidden_def(setstate_r)