3 dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 AC_DEFUN([gl_FUNC_RANDOM_R],
10 AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
11 AC_REQUIRE([AC_CANONICAL_HOST])
13 AC_CHECK_HEADERS([random.h], [], [], [AC_INCLUDES_DEFAULT])
14 if test $ac_cv_header_random_h = no; then
18 AC_CHECK_TYPES([struct random_data],
19 [], [HAVE_STRUCT_RANDOM_DATA=0],
26 dnl On AIX and OSF/1, these functions exist, but with different declarations.
27 dnl Override them all.
33 AC_CHECK_FUNCS([random_r])
34 if test $ac_cv_func_random_r = no; then
41 # Prerequisites of lib/random_r.c.
42 AC_DEFUN([gl_PREREQ_RANDOM_R], [