X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fsys_resource_h.m4;h=f0650991dbd22391ea85add31ef605aab18bee70;hb=cd56634a4a8179fd5a4419fbb3e27211b042ab1c;hp=cb6a03568ee3eb17a428347c4a1358a92856b114;hpb=ab2b3f6d0f52f0509361cbe7e5d61565cac00508;p=gnulib.git diff --git a/m4/sys_resource_h.m4 b/m4/sys_resource_h.m4 index cb6a03568..f0650991d 100644 --- a/m4/sys_resource_h.m4 +++ b/m4/sys_resource_h.m4 @@ -1,5 +1,5 @@ -# sys_resource_h.m4 serial 1 -dnl Copyright (C) 2012 Free Software Foundation, Inc. +# sys_resource_h.m4 serial 2 +dnl Copyright (C) 2012-2014 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. @@ -15,6 +15,19 @@ AC_DEFUN([gl_HEADER_SYS_RESOURCE], HAVE_SYS_RESOURCE_H=0 fi AC_SUBST([HAVE_SYS_RESOURCE_H]) + + dnl Check for declarations of anything we want to poison if the + dnl corresponding gnulib module is not in use. + gl_WARN_ON_USE_PREPARE([[ +#if HAVE_SYS_RESOURCE_H +/* At least FreeBSD 5.0 needs extra headers before + will compile. */ +# include +# include +# include +#endif + ]], + [getrusage]) ]) AC_DEFUN([gl_SYS_RESOURCE_MODULE_INDICATOR], @@ -28,4 +41,7 @@ AC_DEFUN([gl_SYS_RESOURCE_MODULE_INDICATOR], AC_DEFUN([gl_SYS_RESOURCE_H_DEFAULTS], [ + GNULIB_GETRUSAGE=0; AC_SUBST([GNULIB_GETRUSAGE]) + dnl Assume proper GNU behavior unless another module says otherwise. + HAVE_GETRUSAGE=1; AC_SUBST([HAVE_GETRUSAGE]) ])