bug-gnulib
[Top][All Lists]
Advanced

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

Re: getloadavg on IRIX


From: Paul Eggert
Subject: Re: getloadavg on IRIX
Date: Thu, 17 Feb 2011 19:13:19 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7

On 02/17/2011 04:22 PM, Bruno Haible wrote:
> I think ldav_off should be changed to
>    'ptrdiff_t'.

Thanks for catching that.  I pushed this:

* lib/getloadavg.c (getloadavg) [sgi]: Make ldav_off of type ptrdiff_t.
It was 'int', but this doesn't match the IRIX 6.5 manual.
Suggested by Bruno Haible in
<http://lists.gnu.org/archive/html/bug-gnulib/2011-02/msg00207.html>.
diff --git a/lib/getloadavg.c b/lib/getloadavg.c
index 28e2ea0..16a9964 100644
--- a/lib/getloadavg.c
+++ b/lib/getloadavg.c
@@ -948,9 +948,7 @@ getloadavg (double loadavg[], int nelem)
           }
 #   endif /* !SUNOS_5 */
 #  else  /* sgi */
-      int ldav_off;
-
-      ldav_off = sysmp (MP_KERNADDR, MPKA_AVENRUN);
+      ptrdiff_t ldav_off = sysmp (MP_KERNADDR, MPKA_AVENRUN);
       if (ldav_off != -1)
         offset = (long int) ldav_off & 0x7fffffff;
 #  endif /* sgi */



reply via email to

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