pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/x11/kdebase3 force 64bit arithmetic for computation of...
details: https://anonhg.NetBSD.org/pkgsrc/rev/ae9578b680bb
branches: trunk
changeset: 470982:ae9578b680bb
user: jdolecek <jdolecek%pkgsrc.org@localhost>
date: Sun Mar 14 18:30:31 2004 +0000
description:
force 64bit arithmetic for computation of memory sizes in kcontrol
info module; this fixes int overflow e.g. when having 4G of swap
also add support for CACHED_MEM, count that as sum of cached file
and exec data (for NetBSD 1.6+)
bump pkg revision for this change
diffstat:
x11/kdebase3/Makefile | 3 +-
x11/kdebase3/distinfo | 3 +-
x11/kdebase3/patches/patch-fh | 49 +++++++++++++++++++++++++++++++++++++++++++
3 files changed, 53 insertions(+), 2 deletions(-)
diffs (79 lines):
diff -r b017bec8b919 -r ae9578b680bb x11/kdebase3/Makefile
--- a/x11/kdebase3/Makefile Sun Mar 14 16:32:16 2004 +0000
+++ b/x11/kdebase3/Makefile Sun Mar 14 18:30:31 2004 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.44 2004/03/14 00:38:19 wiz Exp $
+# $NetBSD: Makefile,v 1.45 2004/03/14 18:30:31 jdolecek Exp $
DISTNAME= kdebase-${_KDE_VERSION}
+PKGREVISION= 1
CATEGORIES= x11
COMMENT= Base modules for the KDE 3 integrated X11 desktop
diff -r b017bec8b919 -r ae9578b680bb x11/kdebase3/distinfo
--- a/x11/kdebase3/distinfo Sun Mar 14 16:32:16 2004 +0000
+++ b/x11/kdebase3/distinfo Sun Mar 14 18:30:31 2004 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.43 2004/03/09 11:33:09 markd Exp $
+$NetBSD: distinfo,v 1.44 2004/03/14 18:30:31 jdolecek Exp $
SHA1 (kdebase-3.2.1.tar.bz2) = 84c8d1f3f0f48870790a66a5c1f4cff981161277
Size (kdebase-3.2.1.tar.bz2) = 17131336 bytes
@@ -24,3 +24,4 @@
SHA1 (patch-fe) = 3da89e7228d5246e98a244d7f52d9052c3dbcfa2
SHA1 (patch-ff) = a027ccd5f578d41560e970aa54fca9b5760da0ac
SHA1 (patch-fg) = 31219a3d9b45f143dc76ffebd75bbb9b140fcdfa
+SHA1 (patch-fh) = 2c3488b20c9ae2710227bd790684b1b7abcc0578
diff -r b017bec8b919 -r ae9578b680bb x11/kdebase3/patches/patch-fh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/kdebase3/patches/patch-fh Sun Mar 14 18:30:31 2004 +0000
@@ -0,0 +1,49 @@
+$NetBSD: patch-fh,v 1.1 2004/03/14 18:30:31 jdolecek Exp $
+
+--- kcontrol/info/memory_netbsd.cpp.orig 2004-03-14 19:16:08.000000000 +0100
++++ kcontrol/info/memory_netbsd.cpp 2004-03-14 19:16:39.000000000 +0100
+@@ -26,7 +26,7 @@
+ struct uvmexp uvmexp;
+ #else
+ struct swapent *swaplist;
+- int nswap, rnswap, totalswap, freeswap, usedswap;
++ int64_t nswap, rnswap, totalswap, freeswap, usedswap;
+ #endif
+
+ /* memory */
+@@ -38,9 +38,6 @@
+ else
+ Memory_Info[TOTAL_MEM] = memory;
+
+-#warning "FIXME: Memory_Info[CACHED_MEM]"
+- Memory_Info[CACHED_MEM] = NO_MEMORY_INFO; // cached memory in ram
+-
+ #ifdef UVM
+ mib[0] = CTL_VM;
+ mib[1] = VM_UVMEXP;
+@@ -51,13 +48,19 @@
+ Memory_Info[INACTIVE_MEM] = NO_MEMORY_INFO;
+ Memory_Info[SWAP_MEM] = NO_MEMORY_INFO;
+ Memory_Info[FREESWAP_MEM] = NO_MEMORY_INFO;
++ Memory_Info[CACHED_MEM] = NO_MEMORY_INFO;
+ } else {
+- Memory_Info[FREE_MEM] = MEMORY(uvmexp.free * uvmexp.pagesize);
+- Memory_Info[ACTIVE_MEM] = MEMORY(uvmexp.active * uvmexp.pagesize);
+- Memory_Info[INACTIVE_MEM] = MEMORY(uvmexp.inactive * uvmexp.pagesize);
+- Memory_Info[SWAP_MEM] = MEMORY(uvmexp.swpages * uvmexp.pagesize);
+- Memory_Info[FREESWAP_MEM] = MEMORY((uvmexp.swpages - uvmexp.swpginuse) *
+- uvmexp.pagesize);
++ t_memsize pgsz = uvmexp.pagesize;
++ Memory_Info[FREE_MEM] = MEMORY(pgsz * uvmexp.free);
++ Memory_Info[ACTIVE_MEM] = MEMORY(pgsz * uvmexp.active);
++ Memory_Info[INACTIVE_MEM] = MEMORY(pgsz * uvmexp.inactive);
++ Memory_Info[SWAP_MEM] = MEMORY(pgsz * uvmexp.swpages);
++ Memory_Info[FREESWAP_MEM] = MEMORY(pgsz * (uvmexp.swpages - uvmexp.swpginuse));
++#if __NetBSD_Version__ > 106000000
++ Memory_Info[CACHED_MEM] = MEMORY(pgsz * (uvmexp.filepages + uvmexp.execpages));
++#else
++ Memory_Info[CACHED_MEM] = NO_MEMORY_INFO;
++#endif
+ }
+ #else
+ Memory_Info[FREE_MEM] = NO_MEMORY_INFO;
Home |
Main Index |
Thread Index |
Old Index