# HG changeset patch # User Paul Eggert # Date 1297196688 28800 # Node ID 289c9659c1c47a1862ec736376afa38df69b06df # Parent dd51e283d6cdf692cb9ac7f3795ba06df79a8104 stdlib: don't depend on stdint * lib/stdlib.in.h: Don't include 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. diff -r dd51e283d6cd -r 289c9659c1c4 ChangeLog --- a/ChangeLog Tue Feb 08 12:23:29 2011 -0800 +++ b/ChangeLog Tue Feb 08 12:24:48 2011 -0800 @@ -1,5 +1,17 @@ 2011-02-08 Paul Eggert + stdlib: don't depend on stdint + * lib/stdlib.in.h: Don't include 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. + getloadavg: don't depend on c-strtod, cloexec, fcntl-safer See the thread rooted at . diff -r dd51e283d6cd -r 289c9659c1c4 lib/stdlib.in.h --- a/lib/stdlib.in.h Tue Feb 08 12:23:29 2011 -0800 +++ b/lib/stdlib.in.h Tue Feb 08 12:24:48 2011 -0800 @@ -55,8 +55,7 @@ # include #endif -#if !@HAVE_STRUCT_RANDOM_DATA@ || (@GNULIB_RANDOM_R@ && !@HAVE_RANDOM_R@) \ - || defined GNULIB_POSIXCHECK +#if !@HAVE_STRUCT_RANDOM_DATA@ || (@GNULIB_RANDOM_R@ && !@HAVE_RANDOM_R@) # include #endif diff -r dd51e283d6cd -r 289c9659c1c4 m4/random_r.m4 --- a/m4/random_r.m4 Tue Feb 08 12:23:29 2011 -0800 +++ b/m4/random_r.m4 Tue Feb 08 12:24:48 2011 -0800 @@ -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 @@ AC_DEFUN([gl_FUNC_RANDOM_R], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + + AC_CHECK_TYPES([struct random_data], + [], [HAVE_STRUCT_RANDOM_DATA=0], + [[#include + #if HAVE_RANDOM_H + # include + #endif + ]]) + AC_CHECK_FUNCS([random_r]) if test $ac_cv_func_random_r = no; then HAVE_RANDOM_R=0 diff -r dd51e283d6cd -r 289c9659c1c4 m4/stdlib_h.m4 --- a/m4/stdlib_h.m4 Tue Feb 08 12:23:29 2011 -0800 +++ b/m4/stdlib_h.m4 Tue Feb 08 12:24:48 2011 -0800 @@ -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 @@ HAVE_RANDOM_H=0 fi AC_SUBST([HAVE_RANDOM_H]) - AC_CHECK_TYPES([struct random_data], - [], [HAVE_STRUCT_RANDOM_DATA=0], - [[#include - #if HAVE_RANDOM_H - # include - #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 diff -r dd51e283d6cd -r 289c9659c1c4 modules/stdlib --- a/modules/stdlib Tue Feb 08 12:23:29 2011 -0800 +++ b/modules/stdlib Tue Feb 08 12:24:48 2011 -0800 @@ -10,7 +10,6 @@ c++defs include_next stddef -stdint unistd warn-on-use