X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fstdlib_h.m4;h=77344bda860c4d50ebfc1db5687c27384b354e5a;hb=062cad2d07081f9a60adbb90fc1184a435a1a93f;hp=4556ac04c5a2bab487d29d240f378a43d9e19f08;hpb=964a52336aad0cf4a4d6c08c128560c87742c921;p=gnulib.git diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4 index 4556ac04c..77344bda8 100644 --- a/m4/stdlib_h.m4 +++ b/m4/stdlib_h.m4 @@ -1,5 +1,5 @@ -# stdlib_h.m4 serial 21 -dnl Copyright (C) 2007-2009 Free Software Foundation, Inc. +# 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, dnl with or without modifications, as long as this notice is preserved. @@ -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], @@ -80,6 +96,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH]) + REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV]) REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD]) - VOID_UNSETENV=0; AC_SUBST([VOID_UNSETENV]) + REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV]) ])