summaryrefslogtreecommitdiff
path: root/m4/random.m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2012-01-14 15:15:28 +0100
committerBruno Haible <bruno@clisp.org>2012-01-14 15:24:19 +0100
commite2ee61c4fa5854e218eaeedef1dcedf26e965fba (patch)
tree0b083ba3a5020b1ecdafd5d46fa01780ffd4fce5 /m4/random.m4
parent9801c60a5d48b29b062fbdef8459f36137961b24 (diff)
downloadgnulib-e2ee61c4fa5854e218eaeedef1dcedf26e965fba.tar.gz
New module 'random'.
* lib/stdlib.in.h (random, srandom, initstate, setstate): New declarations. * lib/random.c: New file, based on glibc/stdlib/random.c. * m4/random.m4: New file. * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_RANDOM, HAVE_RANDOM. * modules/stdlib (Makefile.am): Substitute GNULIB_RANDOM, HAVE_RANDOM. * modules/random: New file. * config/srclist.txt: Add an entry for random.c. * doc/posix-functions/random.texi: Mention the 'random' module. * doc/posix-functions/initstate.texi: Likewise. * doc/posix-functions/setstate.texi: Likewise. * doc/posix-functions/srandom.texi: Likewise.
Diffstat (limited to 'm4/random.m4')
-rw-r--r--m4/random.m420
1 files changed, 20 insertions, 0 deletions
diff --git a/m4/random.m4 b/m4/random.m4
new file mode 100644
index 0000000000..c5fd0a7f54
--- /dev/null
+++ b/m4/random.m4
@@ -0,0 +1,20 @@
+# random.m4 serial 1
+dnl Copyright (C) 2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_RANDOM],
+[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+
+ AC_CHECK_FUNCS([random])
+ if test $ac_cv_func_random = no; then
+ HAVE_RANDOM=0
+ fi
+])
+
+# Prerequisites of lib/random.c.
+AC_DEFUN([gl_PREREQ_RANDOM], [
+ :
+])