diff options
author | Bruno Haible <bruno@clisp.org> | 2012-01-14 15:15:28 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2012-01-14 15:24:19 +0100 |
commit | e2ee61c4fa5854e218eaeedef1dcedf26e965fba (patch) | |
tree | 0b083ba3a5020b1ecdafd5d46fa01780ffd4fce5 /m4/random.m4 | |
parent | 9801c60a5d48b29b062fbdef8459f36137961b24 (diff) | |
download | gnulib-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.m4 | 20 |
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], [ + : +]) |