changeset 14362:bc129fa0fad0

* 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>.
author Paul Eggert <eggert@cs.ucla.edu>
date Thu, 17 Feb 2011 19:11:43 -0800
parents 1fc4c0ca8391
children d937d219a168
files ChangeLog lib/getloadavg.c
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-02-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+	* 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>.
+
 2011-02-17  Bruno Haible  <bruno@clisp.org>
 
 	havelib: Fix comments.
--- a/lib/getloadavg.c
+++ b/lib/getloadavg.c
@@ -948,9 +948,7 @@
           }
 #   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 */