bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getloadavg is broken


From: Jim Meyering
Subject: Re: getloadavg is broken
Date: Sat, 28 May 2011 22:27:40 +0200

Bruno Haible wrote:
> Eric Blake wrote:
>> Looks sane to me.
>
> Thanks for the review. Jim is silent about it for 4 days. So I'm committing 
> the
> patch now:
>
>
> 2011-05-28  Bruno Haible  <address@hidden>
>
>       getloadavg: Remove an unreliable safety check.
>       * m4/getloadavg.m4 (gl_GETLOADAVG): Drop argument. Remove test whether
>       getloadavg.c is in place.
>       * modules/getloadavg (configure.ac): Drop argument of gl_GETLOADAVG.
>       Reported by Sam Steingold <address@hidden>.

Thanks for applying that.

I've finally investigated it.
At first I was dubious, because it used to be required.
However, I've just found that Paul's big change:

    commit 83ca5b985b375b6445d54d99e523508f075a497e
    Author: Paul Eggert <address@hidden>
    Date:   Tue Feb 15 13:18:20 2011 -0800

        getloadavg: set errno

        * lib/getloadavg.c: Set errno when returning -1.  If no other
        error number looks appropriate, set it to ENOSYS if the getloadavg
        looks like it can't possibly ever work, ENOTSUP otherwise.
        Suggested by Bruno Haible in
        <http://lists.gnu.org/archive/html/bug-gnulib/2011-02/msg00187.html>.

        getloadavg: trim unused parts and speed up 'configure'
        ...

removed the code that used to perform an unusual compile-time test:
using using the getloadavg.c from somewhere under $top_srcdir.
*That* was the sole reason for the macro argument you've just removed.
So your removal was correct and welcome.  Thank you.

The code that Paul removed was probably used only by coreutils,
and even that was only because I had patched the modules file
with this:

  $ cat gl/modules/getloadavg.diff
  diff --git a/modules/getloadavg b/modules/getloadavg
  index 2fbeb40..b79aaca 100644
  --- a/modules/getloadavg
  +++ b/modules/getloadavg
  @@ -16,7 +16,7 @@ stdbool
   fcntl-safer

   configure.ac:
  -gl_GETLOADAVG([$gl_source_base])
  +gl_GETLOADAVG([lib])
   gl_STDLIB_MODULE_INDICATOR([getloadavg])

   Makefile.am:

I will remove that patch file, since it's been useless since February
and would fail to apply with the latest gnulib.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]