aboutsummaryrefslogtreecommitdiffhomepage
path: root/fallback.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-06-15 20:53:15 +1000
committerGravatar axel <axel@liljencrantz.se>2006-06-15 20:53:15 +1000
commitd677b468db0cb9fd9dce3f26e285234eb45f5946 (patch)
treecdab0f90d838f70428e5bc60eb8bad94b097d849 /fallback.c
parent4e38d3bc8c291108da216006f65a4297d3e72360 (diff)
Provide fallback implementation of lrand48_r
darcs-hash:20060615105315-ac50b-155e1836d0bdc8f398776a816898718066adcdce.gz
Diffstat (limited to 'fallback.c')
-rw-r--r--fallback.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/fallback.c b/fallback.c
index 3024ae2c..1ed4a477 100644
--- a/fallback.c
+++ b/fallback.c
@@ -1005,3 +1005,18 @@ int del_curterm(TERMINAL *oterm)
#endif
+#ifndef HAVE_LRAND48_R
+
+int lrand48_r(struct drand48_data *buffer, long int *result)
+{
+ *result = rand_r( &buffer->seed );
+ return 0;
+}
+
+int srand48_r(long int seedval, struct drand48_data *buffer)
+{
+ buffer->seed = (int)seedval;
+ return 0;
+}
+
+#endif