X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fstdlib_h.m4;h=77344bda860c4d50ebfc1db5687c27384b354e5a;hb=062cad2d07081f9a60adbb90fc1184a435a1a93f;hp=cf41ec0fc0824fe58b7ccc21cf03233ed7837ba6;hpb=b2e2010c7c902235b5efb5bd3c6529f61b093aa4;p=gnulib.git diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4 index cf41ec0fc..77344bda8 100644 --- a/m4/stdlib_h.m4 +++ b/m4/stdlib_h.m4 @@ -1,4 +1,4 @@ -# stdlib_h.m4 serial 21 +# stdlib_h.m4 serial 23 dnl Copyright (C) 2007-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -22,6 +22,20 @@ AC_DEFUN([gl_STDLIB_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 + dnl guaranteed by C89. + gl_WARN_ON_USE_PREPARE([[#include +#if HAVE_SYS_LOADAVG_H +# include +#endif +#if HAVE_RANDOM_H +# include +#endif + ]], [atoll canonicalize_file_name getloadavg getsubopt mkdtemp + mkostemp mkostemps mkstemp mkstemps random_r initstat_r srandom_r + setstate_r realpath rpmatch setenv strtod strtoll strtoull unsetenv]) ]) AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], @@ -29,6 +43,8 @@ AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1 + dnl Define it also as a C macro, for the benefit of the unit tests. + gl_MODULE_INDICATOR([$1]) ]) AC_DEFUN([gl_STDLIB_H_DEFAULTS],