summaryrefslogtreecommitdiff
path: root/libc/stdlib
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-12-09 20:54:50 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-12-09 20:54:50 +0000
commit56605ce86443e1b0ee44c220774b144d843c6810 (patch)
tree753415799cad3deba940b3725611178c5bf0d00f /libc/stdlib
parentef449071ebc74473f11923c444273dbdc8293b97 (diff)
hidden initstate_r and use
Diffstat (limited to 'libc/stdlib')
-rw-r--r--libc/stdlib/random.c1
-rw-r--r--libc/stdlib/random_r.c7
2 files changed, 3 insertions, 5 deletions
diff --git a/libc/stdlib/random.c b/libc/stdlib/random.c
index d40420740..eb146098a 100644
--- a/libc/stdlib/random.c
+++ b/libc/stdlib/random.c
@@ -25,6 +25,7 @@
#define random_r __random_r
#define srandom_r __srandom_r
#define setstate_r __setstate_r
+#define initstate_r __initstate_r
#define _GNU_SOURCE
#include <features.h>
diff --git a/libc/stdlib/random_r.c b/libc/stdlib/random_r.c
index 0733bf900..b10f29519 100644
--- a/libc/stdlib/random_r.c
+++ b/libc/stdlib/random_r.c
@@ -258,11 +258,7 @@ strong_alias(__srandom_r,srandom_r)
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 initstate_r (seed, arg_state, n, buf)
- unsigned int seed;
- char *arg_state;
- size_t n;
- struct random_data *buf;
+int attribute_hidden __initstate_r (unsigned int seed, char *arg_state, size_t n, struct random_data *buf)
{
int type;
int degree;
@@ -310,6 +306,7 @@ fail:
__set_errno (EINVAL);
return -1;
}
+strong_alias(__initstate_r,initstate_r)
/* Restore the state from the given state array.
Note: It is important that we also remember the locations of the pointers