2c888e5302
* The display can now be lozenge-shaped (the way a real lava lamp is). This is controlled by the "lozenge" resource. * FreeBSD now drops setgid privileges. * Fixed bugs in handling .lavapsrc files. * In some cases lavaps would go into infinite blob growth or shrinkage. * Process control (nice, renice, kill) added. * Some of the "halo" around lozenge windows fixed. * Dependence on an external ``whoami'' program removed. * Process name added to proc menu. * Handling of window decorations (the ``halo'' bug) mostly cleaned up. * Shaped windows can now be disabled completely. * Fix for the "infinite growth on start" bug that occurred if no geometry was specified.
38 lines
932 B
Text
38 lines
932 B
Text
$NetBSD: patch-aa,v 1.3 2000/10/15 02:33:15 jlam Exp $
|
|
|
|
--- process_scan_freebsd.cc.orig Tue Jun 6 16:25:25 2000
|
|
+++ process_scan_freebsd.cc Wed Sep 6 05:16:59 2000
|
|
@@ -39,6 +39,7 @@
|
|
#include <sys/user.h>
|
|
#include <fcntl.h>
|
|
#include <kvm.h>
|
|
+#include <unistd.h>
|
|
}
|
|
|
|
#include "process_scan.hh"
|
|
@@ -116,7 +117,7 @@
|
|
ENTRY_TRACE(__FILE__,__LINE__);
|
|
static int pages_per_kb = 0;
|
|
if (!pages_per_kb)
|
|
- pages_per_kb = getpagesize() / 1024;
|
|
+ pages_per_kb = sysconf(_SC_PAGESIZE) / 1024;
|
|
return pages * pages_per_kb;
|
|
}
|
|
|
|
@@ -250,6 +251,16 @@
|
|
// xxx: skip p_iticks
|
|
|
|
int size, resident;
|
|
+
|
|
+#ifdef __NetBSD__
|
|
+# ifndef UPAGES
|
|
+# ifdef USPACE
|
|
+# define UPAGES ( USPACE / sysconf(_SC_PAGESIZE) )
|
|
+# else /* !USPACE */
|
|
+# error No UPAGES, no USPACE, no fun!
|
|
+# endif /* USPACE */
|
|
+# endif /* !UPAGES */
|
|
+#endif /* __NetBSD__ */
|
|
|
|
#if __FreeBSD__ < 3
|
|
size = UPAGES + cur_kp_->kp_eproc.e_vm.vm_tsize
|