summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-02-08 12:24:48 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2011-02-08 12:28:28 -0800
commit4f8c7a6e29f65cb71eca3092f712c71d580ba936 (patch)
tree75b93575763c6a3b294d3727b60b8384c4b0ba7b /m4
parent6a047cd32e392aab4efd1c0dc6d8d56482d65138 (diff)
downloadgnulib-4f8c7a6e29f65cb71eca3092f712c71d580ba936.tar.gz
stdlib: don't depend on stdint
* lib/stdlib.in.h: Don't include <stdint.h> merely because GNULIB_POSIXCHECK is defined. GNULIB_POSIXCHECK seems to be independent of whether stdint.h is needed. * m4/random_r.m4 (gl_FUNC_RANDOM_R): Check for struct random_data here, instead of ... * m4/stdlib_h.m4 (gl_STDLIB_H): ... here. Applications that need struct random_data should be using the random_r module, not just the stdlib module (which wouldn't make sense: what package needs just struct random_data without also needing random_r?). * modules/stdlib (Depends-on): Remove stdint.
Diffstat (limited to 'm4')
-rw-r--r--m4/random_r.m411
-rw-r--r--m4/stdlib_h.m49
2 files changed, 11 insertions, 9 deletions
diff --git a/m4/random_r.m4 b/m4/random_r.m4
index 8dd24f0dd3..81ede1fa09 100644
--- a/m4/random_r.m4
+++ b/m4/random_r.m4
@@ -1,4 +1,4 @@
-# serial 1
+# serial 2
dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -7,6 +7,15 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_RANDOM_R],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+
+ AC_CHECK_TYPES([struct random_data],
+ [], [HAVE_STRUCT_RANDOM_DATA=0],
+ [[#include <stdlib.h>
+ #if HAVE_RANDOM_H
+ # include <random.h>
+ #endif
+ ]])
+
AC_CHECK_FUNCS([random_r])
if test $ac_cv_func_random_r = no; then
HAVE_RANDOM_R=0
diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4
index a71468f13c..28eb1a0e53 100644
--- a/m4/stdlib_h.m4
+++ b/m4/stdlib_h.m4
@@ -1,4 +1,4 @@
-# stdlib_h.m4 serial 34
+# stdlib_h.m4 serial 35
dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -15,13 +15,6 @@ AC_DEFUN([gl_STDLIB_H],
HAVE_RANDOM_H=0
fi
AC_SUBST([HAVE_RANDOM_H])
- AC_CHECK_TYPES([struct random_data],
- [], [HAVE_STRUCT_RANDOM_DATA=0],
- [[#include <stdlib.h>
- #if HAVE_RANDOM_H
- # include <random.h>
- #endif
- ]])
dnl Check for declarations of anything we want to poison if the
dnl corresponding gnulib module is not in use, and which is not