summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-10-26 11:04:17 +0100
committerSimon Josefsson <simon@josefsson.org>2008-10-26 11:04:17 +0100
commitfd3784cec9020789823de5d21dac19f3061ba0fd (patch)
tree5ec71114dc4e9ac49856c444d9ce65892cea45e7 /lib
parentc231865128c6a323e87cbf0ba904a2078f21faf7 (diff)
downloadgnulib-fd3784cec9020789823de5d21dac19f3061ba0fd.tar.gz
stdlib: Provide struct random_data.
* m4/stdlib_h.m4: Check for struct random_data. Initialize and substitute HAVE_STRUCT_RANDOM_DATA. * lib/stdlib.in.h [!HAVE_STRUCT_RANDOM_DATA]: Provide struct random_data. * modules/stdlib (Makefile.am): Substitute HAVE_STRUCT_RANDOM_DATA.
Diffstat (limited to 'lib')
-rw-r--r--lib/stdlib.in.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index 8d0add62c4..f6ebe253c8 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -41,10 +41,23 @@
# include <sys/loadavg.h>
#endif
-#if @GNULIB_RANDOM_R@
+#if @GNULIB_RANDOM_R@ || !@HAVE_STRUCT_RANDOM_DATA@
# include <stdint.h>
#endif
+#if !@HAVE_STRUCT_RANDOM_DATA@
+struct random_data
+{
+ int32_t *fptr; /* Front pointer. */
+ int32_t *rptr; /* Rear pointer. */
+ int32_t *state; /* Array of state values. */
+ int rand_type; /* Type of random number generator. */
+ int rand_deg; /* Degree of random number generator. */
+ int rand_sep; /* Distance between front and rear. */
+ int32_t *end_ptr; /* Pointer behind state table. */
+};
+#endif
+
/* The definition of GL_LINK_WARNING is copied here. */