summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorchristos <christos>2006-10-28 02:15:12 +0000
committerchristos <christos>2006-10-28 02:15:12 +0000
commit6edb5548c9772e83fac6c29595b201a350ce4718 (patch)
tree8918317c71a0fbe38b6f483f70a70c4f3a395e07 /sysutils
parent8307d23a8fbd672718f4376b0229858cc8718398 (diff)
downloadpkgsrc-6edb5548c9772e83fac6c29595b201a350ce4718.tar.gz
- don't use kmem to get uvmexp; use sysctl
- don't define UVM, it is done in the top level Makefile
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/xosview/distinfo5
-rw-r--r--sysutils/xosview/patches/patch-aa19
-rw-r--r--sysutils/xosview/patches/patch-ab29
3 files changed, 37 insertions, 16 deletions
diff --git a/sysutils/xosview/distinfo b/sysutils/xosview/distinfo
index 48bc8c53b58..0e40f548acd 100644
--- a/sysutils/xosview/distinfo
+++ b/sysutils/xosview/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.18 2006/06/05 20:20:26 christos Exp $
+$NetBSD: distinfo,v 1.19 2006/10/28 02:15:12 christos Exp $
SHA1 (xosview-1.8.3.tar.gz) = 420fd0620ff9fb9ba83fc833eeb8b872414e377e
RMD160 (xosview-1.8.3.tar.gz) = 595e812dee686ccaa5d95eb537782679d752271b
Size (xosview-1.8.3.tar.gz) = 259793 bytes
-SHA1 (patch-aa) = 5a97b1a82b511d856c93dc07ed1e2d25d8556427
+SHA1 (patch-aa) = c51d8b0b033943911869aa2d262804eeeec9c109
+SHA1 (patch-ab) = 274b83fd3488af8e0c4ce0184b8c78f4f6ef87df
diff --git a/sysutils/xosview/patches/patch-aa b/sysutils/xosview/patches/patch-aa
index 1686744a36f..f3c615d82e6 100644
--- a/sysutils/xosview/patches/patch-aa
+++ b/sysutils/xosview/patches/patch-aa
@@ -1,17 +1,8 @@
-$NetBSD: patch-aa,v 1.14 2006/06/05 20:20:26 christos Exp $
+$NetBSD: patch-aa,v 1.15 2006/10/28 02:15:12 christos Exp $
--- bsd/kernel.cc.orig 2006-02-18 02:36:06.000000000 -0500
-+++ bsd/kernel.cc 2006-06-05 16:17:01.000000000 -0400
-@@ -21,6 +21,8 @@
- /* NetBSD pulls in stdio.h via one of the other includes, but
- * the other BSDs don't. */
- # include <stdio.h>
-+#else
-+# define UVM
- #endif
-
- #include <fcntl.h>
-@@ -115,6 +117,13 @@
++++ bsd/kernel.cc 2006-10-27 22:12:37.000000000 -0400
+@@ -115,6 +115,13 @@
// in __NetBSD_Version__ for us if needed.
#if defined(XOSVIEW_NETBSD) && defined(__NetBSD_Version__) && (__NetBSD_Version__ >= 106010000)
#define NETBSD_1_6A
@@ -25,7 +16,7 @@ $NetBSD: patch-aa,v 1.14 2006/06/05 20:20:26 christos Exp $
#endif
#include "general.h"
-@@ -773,13 +782,12 @@
+@@ -773,13 +780,12 @@
#ifdef NETBSD_1_6A
// Do a sysctl with a NULL data pointer to get the size that would
// have been returned, and use that to figure out # drives.
@@ -41,7 +32,7 @@ $NetBSD: patch-aa,v 1.14 2006/06/05 20:20:26 christos Exp $
return 1;
#endif
return ValidSymbol(DISKLIST_SYM_INDEX);
-@@ -816,19 +824,29 @@
+@@ -816,19 +822,29 @@
#else
#if defined(NETBSD_1_6A)
// Use the new sysctl to do this for us.
diff --git a/sysutils/xosview/patches/patch-ab b/sysutils/xosview/patches/patch-ab
new file mode 100644
index 00000000000..1f0be74f021
--- /dev/null
+++ b/sysutils/xosview/patches/patch-ab
@@ -0,0 +1,29 @@
+$NetBSD: patch-ab,v 1.12 2006/10/28 02:15:12 christos Exp $
+
+--- bsd/memmeter.cc.orig 2002-07-13 23:48:45.000000000 -0400
++++ bsd/memmeter.cc 2006-10-27 22:09:54.000000000 -0400
+@@ -77,7 +77,7 @@
+ struct vmtotal meminfo;
+ int params[] = {CTL_VM, VM_METER};
+ size_t meminfosize = sizeof (struct vmtotal);
+- sysctl (params, 2, &meminfo, &meminfosize, NULL, NULL);
++ sysctl (params, 2, &meminfo, &meminfosize, NULL, 0);
+ /* Note that the numbers are in terms of 4K pages. */
+
+ total_ = 4096*(meminfo.t_free+meminfo.t_rm);
+@@ -91,8 +91,15 @@
+ * this, and later we'll add all the common fields to this. */
+ total_ = 0.0;
+ #if defined(UVM) && (defined(XOSVIEW_NETBSD) || defined(XOSVIEW_OPENBSD))
++#ifdef VM_UVMEXP2
++ int params[] = {CTL_VM, VM_UVMEXP2};
++ struct uvmexp_sysctl kvm_uvm_exp;
++ size_t kvm_uvm_exp_size = sizeof (kvm_uvm_exp);
++ sysctl (params, 2, &kvm_uvm_exp, &kvm_uvm_exp_size, NULL, 0);
++#else
+ struct uvmexp kvm_uvm_exp;
+ BSDGetUVMPageStats(&kvm_uvm_exp);
++#endif
+ int pgsize = kvm_uvm_exp.pagesize;
+ fields_[0] = kvm_uvm_exp.active*pgsize;
+ fields_[1] = kvm_uvm_exp.inactive*pgsize;