Files
Bruno Haible 299d6d5f9a random: Fix test compilation failure on Cygwin 1.5.25.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_DECL_INITSTATE,
HAVE_DECL_SETSTATE.
* m4/random.m4 (gl_FUNC_RANDOM): Test whether initstate and setstate are
declared.
* modules/stdlib (Makefile.am): Substitute HAVE_DECL_INITSTATE,
HAVE_DECL_SETSTATE.
* lib/stdlib.in.h (initstate): Declare also if HAVE_DECL_INITSTATE is 0.
(setstate): Declare also if HAVE_DECL_SETSTATE is 0.
* doc/posix-functions/initstate.texi: Mention the Cygwin 1.5.x problem.
* doc/posix-functions/random.texi: Likewise.
* doc/posix-functions/setstate.texi: Likewise.
* doc/posix-functions/srandom.texi: Likewise.
2017-08-17 14:17:58 +02:00

31 lines
734 B
Plaintext

# random.m4 serial 2
dnl Copyright (C) 2012-2017 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
AC_CHECK_DECLS_ONCE([initstate])
if test $ac_cv_have_decl_initstate = no; then
HAVE_DECL_INITSTATE=0
fi
AC_CHECK_DECLS_ONCE([setstate])
if test $ac_cv_have_decl_setstate = no; then
HAVE_DECL_SETSTATE=0
fi
])
# Prerequisites of lib/random.c.
AC_DEFUN([gl_PREREQ_RANDOM], [
:
])