diff options
author | axel <axel@liljencrantz.se> | 2006-06-15 20:53:15 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-06-15 20:53:15 +1000 |
commit | d677b468db0cb9fd9dce3f26e285234eb45f5946 (patch) | |
tree | cdab0f90d838f70428e5bc60eb8bad94b097d849 /fallback.h | |
parent | 4e38d3bc8c291108da216006f65a4297d3e72360 (diff) |
Provide fallback implementation of lrand48_r
darcs-hash:20060615105315-ac50b-155e1836d0bdc8f398776a816898718066adcdce.gz
Diffstat (limited to 'fallback.h')
-rw-r--r-- | fallback.h | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -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 + |