pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/sysutils/xfce4-systemload-plugin Fix compilation probl...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/922bf4b3c76c
branches:  trunk
changeset: 499802:922bf4b3c76c
user:      martti <martti%pkgsrc.org@localhost>
date:      Tue Sep 27 12:49:08 2005 +0000

description:
Fix compilation problems on NetBSD 1.6.2

diffstat:

 sysutils/xfce4-systemload-plugin/distinfo         |   4 +-
 sysutils/xfce4-systemload-plugin/patches/patch-aa |  66 +++++++++++++---------
 2 files changed, 42 insertions(+), 28 deletions(-)

diffs (98 lines):

diff -r e50f5bc709a2 -r 922bf4b3c76c sysutils/xfce4-systemload-plugin/distinfo
--- a/sysutils/xfce4-systemload-plugin/distinfo Tue Sep 27 12:49:04 2005 +0000
+++ b/sysutils/xfce4-systemload-plugin/distinfo Tue Sep 27 12:49:08 2005 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.5 2005/09/14 11:55:57 martti Exp $
+$NetBSD: distinfo,v 1.6 2005/09/27 12:49:08 martti Exp $
 
 SHA1 (xfce4-systemload-plugin-0.3.6.tar.gz) = ed477e9c8499b8e34031658237586a83bc12cef4
 RMD160 (xfce4-systemload-plugin-0.3.6.tar.gz) = a7b3f28326262eeb5aa66d5cd966474ac0a4554b
 Size (xfce4-systemload-plugin-0.3.6.tar.gz) = 229985 bytes
-SHA1 (patch-aa) = 8424fead4e2450b55ca607f652a24e1b66c549bf
+SHA1 (patch-aa) = 8889a9dcf8f10fd4e6f8597d849efc838c202b56
diff -r e50f5bc709a2 -r 922bf4b3c76c sysutils/xfce4-systemload-plugin/patches/patch-aa
--- a/sysutils/xfce4-systemload-plugin/patches/patch-aa Tue Sep 27 12:49:04 2005 +0000
+++ b/sysutils/xfce4-systemload-plugin/patches/patch-aa Tue Sep 27 12:49:08 2005 +0000
@@ -1,42 +1,56 @@
-$NetBSD: patch-aa,v 1.1 2005/09/14 11:55:57 martti Exp $
+$NetBSD: patch-aa,v 1.2 2005/09/27 12:49:08 martti Exp $
 
 --- panel-plugin/memswap.c.orig        2003-11-06 02:39:52.000000000 +0200
-+++ panel-plugin/memswap.c     2005-09-14 11:47:37.000000000 +0300
-@@ -284,7 +284,17 @@
++++ panel-plugin/memswap.c     2005-09-27 12:39:16.000000000 +0300
+@@ -284,7 +284,24 @@
  
  #define ARRLEN(X) (sizeof(X)/sizeof(X[0]))
      {
 -        static int mib[]={ CTL_HW, HW_PHYSMEM };
-+      static int mib[2];
-+      /* 64-bit datatype */
-+      if(sizeof(size_t) == 8) {
-+              mib[0] = CTL_HW;
-+              mib[1] = HW_PHYSMEM64;
-+      }
-+      /* assume 32-bit datatype */
-+      else {
-+              mib[0] = CTL_HW;
-+              mib[1] = HW_PHYSMEM;
-+      }
++        static int mib[2];
++
++#ifdef HW_PHYSMEM64
++        /* 64-bit datatype */
++        if (sizeof(size_t) == 8) {
++                mib[0] = CTL_HW;
++                mib[1] = HW_PHYSMEM64;
++        }
++        /* assume 32-bit datatype */
++        else {
++                mib[0] = CTL_HW;
++                mib[1] = HW_PHYSMEM;
++        }
++#else
++        mib[0] = CTL_HW;
++        mib[1] = HW_PHYSMEM;
++#endif
++
          len = sizeof(MTotal);
          sysctl(mib, ARRLEN(mib), &MTotal, &len, NULL, 0);
          MTotal >>= 10;
-@@ -395,7 +405,17 @@
+@@ -395,7 +412,24 @@
  
  #define ARRLEN(X) (sizeof(X)/sizeof(X[0]))
      {
 -        static int mib[]={ CTL_HW, HW_PHYSMEM };
-+      static int mib[2];
-+      /* 64-bit datatype */
-+      if(sizeof(size_t) == 8) {
-+              mib[0] = CTL_HW;
-+              mib[1] = HW_PHYSMEM64;
-+      }
-+      /* assume 32-bit datatype */
-+      else {
-+              mib[0] = CTL_HW;
-+              mib[1] = HW_PHYSMEM;
-+      }
++        static int mib[2];
++
++#ifdef HW_PHYSMEM64
++        /* 64-bit datatype */
++        if (sizeof(size_t) == 8) {
++                mib[0] = CTL_HW;
++                mib[1] = HW_PHYSMEM64;
++        }
++        /* assume 32-bit datatype */
++        else {
++                mib[0] = CTL_HW;
++                mib[1] = HW_PHYSMEM;
++        }
++#else
++        mib[0] = CTL_HW;
++        mib[1] = HW_PHYSMEM;
++#endif
++
          len = sizeof(MTotal);
          sysctl(mib, ARRLEN(mib), &MTotal, &len, NULL, 0);
          MTotal >>= 10;



Home | Main Index | Thread Index | Old Index