aboutsummaryrefslogtreecommitdiffhomepage
path: root/fallback.h
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.h
parent4e38d3bc8c291108da216006f65a4297d3e72360 (diff)
Provide fallback implementation of lrand48_r
darcs-hash:20060615105315-ac50b-155e1836d0bdc8f398776a816898718066adcdce.gz
Diffstat (limited to 'fallback.h')
-rw-r--r--fallback.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/fallback.h b/fallback.h
index d54477e5..7a245f47 100644
--- a/fallback.h
+++ b/fallback.h
@@ -292,4 +292,27 @@ size_t wcslcpy( wchar_t *dst, const wchar_t *src, size_t siz );
int del_curterm(TERMINAL *oterm);
#endif
+#ifndef HAVE_LRAND48_R
+
+/**
+ Datastructure for the lrand48_r fallback implementation.
+*/
+struct drand48_data
+{
+ unsigned int seed;
+}
+ ;
+
+/**
+ Fallback implementation of lrand48_r. Internally uses rand_r, so it is pretty weak.
+*/
+int lrand48_r(struct drand48_data *buffer, long int *result);
+/**
+ Fallback implementation of srand48_r
+*/
+int srand48_r(long int seedval, struct drand48_data *buffer);
+
#endif
+
+#endif
+