diff options
author | jmmv <jmmv> | 2004-04-01 18:34:27 +0000 |
---|---|---|
committer | jmmv <jmmv> | 2004-04-01 18:34:27 +0000 |
commit | e4e442b74e6a8a3fb1fb71d066e4264fc9bef68c (patch) | |
tree | 97b8ac7cc383cf6d221c10c4b58c58500b881684 /devel | |
parent | 8feb7b03c115902dc576f0ec1a84be3d4d5a1789 (diff) | |
download | pkgsrc-e4e442b74e6a8a3fb1fb71d066e4264fc9bef68c.tar.gz |
Update to 2.5.2:
- plenty of code cleanups
- removed the dependency on libgnome, only glib required now
- Linux 2.6 support, NetBSD support and better FreeBSD support
- Make the block size available for filesystem statistics
Diffstat (limited to 'devel')
-rw-r--r-- | devel/libgtop2/Makefile | 8 | ||||
-rw-r--r-- | devel/libgtop2/PLIST | 40 | ||||
-rw-r--r-- | devel/libgtop2/buildlink3.mk | 4 | ||||
-rw-r--r-- | devel/libgtop2/distinfo | 25 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-aa | 11 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-ab | 76 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-ac | 18 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-ad | 17 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-ae | 81 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-af | 38 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-ag | 109 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-ah | 96 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-ai | 22 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-aj | 13 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-ak | 102 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-al | 189 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-am | 92 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-an | 89 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-ao | 83 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-ap | 19 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-aq | 32 |
21 files changed, 27 insertions, 1137 deletions
diff --git a/devel/libgtop2/Makefile b/devel/libgtop2/Makefile index 7253ce92758..2c456e71e38 100644 --- a/devel/libgtop2/Makefile +++ b/devel/libgtop2/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.26 2004/03/19 22:55:30 kristerw Exp $ +# $NetBSD: Makefile,v 1.27 2004/04/01 18:34:27 jmmv Exp $ -DISTNAME= libgtop-2.0.8 +DISTNAME= libgtop-2.5.2 PKGNAME= ${DISTNAME:S/-/2-/} CATEGORIES= devel gnome -MASTER_SITES= ${MASTER_SITE_GNOME:=sources/libgtop/2.0/} +MASTER_SITES= ${MASTER_SITE_GNOME:=sources/libgtop/2.5/} EXTRACT_SUFX= .tar.bz2 MAINTAINER= tech-pkg@NetBSD.org @@ -14,6 +14,7 @@ BUILD_USES_MSGFMT= YES NOT_FOR_PLATFORM= SunOS-*-* OSVERSION_SPECIFIC= YES +USE_MSGFMT_PLURALS= YES .include "../../mk/bsd.prefs.mk" @@ -65,6 +66,7 @@ post-install: .include "../../devel/gettext-lib/buildlink3.mk" .include "../../devel/glib2/buildlink3.mk" +.include "../../devel/libgnome/buildlink3.mk" .include "../../devel/pkgconfig/buildlink3.mk" .include "../../devel/popt/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/devel/libgtop2/PLIST b/devel/libgtop2/PLIST index 0890115a42c..0df03f84c8e 100644 --- a/devel/libgtop2/PLIST +++ b/devel/libgtop2/PLIST @@ -1,7 +1,6 @@ -@comment $NetBSD: PLIST,v 1.5 2004/03/12 22:30:36 minskim Exp $ +@comment $NetBSD: PLIST,v 1.6 2004/04/01 18:34:27 jmmv Exp $ bin/libgtop_daemon2 ${LIBGTOP_SERVER}bin/libgtop_server2 -include/gnome/gnomesupport.h include/libgtop-2.0/glibtop.h include/libgtop-2.0/glibtop/close.h include/libgtop-2.0/glibtop/command.h @@ -42,46 +41,14 @@ include/libgtop-2.0/glibtop/union.h include/libgtop-2.0/glibtop/uptime.h include/libgtop-2.0/glibtop/version.h include/libgtop-2.0/glibtop/write.h -include/libgtop-2.0/glibtop/xmalloc.h include/libgtop-2.0/glibtop_machine.h include/libgtop-2.0/glibtop_server.h ${LIBGTOP_SERVER}include/libgtop-2.0/glibtop_suid.h -lib/libgnomesupport-2.0.a -lib/libgnomesupport-2.0.la -lib/libgnomesupport-2.0.so -lib/libgnomesupport-2.0.so.0 -lib/libgnomesupport-2.0.so.0.0 lib/libgtop-2.0.a lib/libgtop-2.0.la lib/libgtop-2.0.so -lib/libgtop-2.0.so.0 -lib/libgtop-2.0.so.0.8 -lib/libgtop_common-2.0.a -lib/libgtop_common-2.0.la -lib/libgtop_common-2.0.so -lib/libgtop_common-2.0.so.0 -lib/libgtop_common-2.0.so.0.8 -lib/libgtop_names-2.0.a -lib/libgtop_names-2.0.la -lib/libgtop_names-2.0.so -lib/libgtop_names-2.0.so.0 -lib/libgtop_names-2.0.so.0.8 -lib/libgtop_suid_common-2.0.a -lib/libgtop_suid_common-2.0.la -lib/libgtop_suid_common-2.0.so -lib/libgtop_suid_common-2.0.so.0 -lib/libgtop_suid_common-2.0.so.0.8 -lib/libgtop_sysdeps-2.0.a -lib/libgtop_sysdeps-2.0.la -lib/libgtop_sysdeps-2.0.so -lib/libgtop_sysdeps-2.0.so.0 -lib/libgtop_sysdeps-2.0.so.0.8 -${LIBGTOP_SERVER}lib/libgtop_sysdeps_suid-2.0.a -${LIBGTOP_SERVER}lib/libgtop_sysdeps_suid-2.0.la -${LIBGTOP_SERVER}lib/libgtop_sysdeps_suid-2.0.so -${LIBGTOP_SERVER}lib/libgtop_sysdeps_suid-2.0.so.0 -${LIBGTOP_SERVER}lib/libgtop_sysdeps_suid-2.0.so.0.8 -lib/pkgconfig/gnome-support-2.0.pc +lib/libgtop-2.0.so.3 +lib/libgtop-2.0.so.3.0 lib/pkgconfig/libgtop-2.0.pc ${PKGLOCALEDIR}/locale/am/LC_MESSAGES/libgtop-2.0.mo ${PKGLOCALEDIR}/locale/ar/LC_MESSAGES/libgtop-2.0.mo @@ -104,6 +71,7 @@ ${PKGLOCALEDIR}/locale/ga/LC_MESSAGES/libgtop-2.0.mo ${PKGLOCALEDIR}/locale/gl/LC_MESSAGES/libgtop-2.0.mo ${PKGLOCALEDIR}/locale/he/LC_MESSAGES/libgtop-2.0.mo ${PKGLOCALEDIR}/locale/hi/LC_MESSAGES/libgtop-2.0.mo +${PKGLOCALEDIR}/locale/hr/LC_MESSAGES/libgtop-2.0.mo ${PKGLOCALEDIR}/locale/hu/LC_MESSAGES/libgtop-2.0.mo ${PKGLOCALEDIR}/locale/id/LC_MESSAGES/libgtop-2.0.mo ${PKGLOCALEDIR}/locale/it/LC_MESSAGES/libgtop-2.0.mo diff --git a/devel/libgtop2/buildlink3.mk b/devel/libgtop2/buildlink3.mk index d140646089e..876bd6ba79f 100644 --- a/devel/libgtop2/buildlink3.mk +++ b/devel/libgtop2/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.5 2004/03/18 09:12:10 jlam Exp $ +# $NetBSD: buildlink3.mk,v 1.6 2004/04/01 18:34:27 jmmv Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ LIBGTOP2_BUILDLINK3_MK:= ${LIBGTOP2_BUILDLINK3_MK}+ @@ -11,7 +11,7 @@ BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nlibgtop2} BUILDLINK_PACKAGES+= libgtop2 .if !empty(LIBGTOP2_BUILDLINK3_MK:M+) -BUILDLINK_DEPENDS.libgtop2+= libgtop2>=2.0.0nb4 +BUILDLINK_DEPENDS.libgtop2+= libgtop2>=2.5.2 BUILDLINK_PKGSRCDIR.libgtop2?= ../../devel/libgtop2 .endif # LIBGTOP2_BUILDLINK3_MK diff --git a/devel/libgtop2/distinfo b/devel/libgtop2/distinfo index 51370090475..f1d2fc5dd32 100644 --- a/devel/libgtop2/distinfo +++ b/devel/libgtop2/distinfo @@ -1,21 +1,6 @@ -$NetBSD: distinfo,v 1.9 2004/03/19 22:55:30 kristerw Exp $ +$NetBSD: distinfo,v 1.10 2004/04/01 18:34:27 jmmv Exp $ -SHA1 (libgtop-2.0.8.tar.bz2) = 32f6f3b94a42a9cd53ad9715d3922debcf3ebbba -Size (libgtop-2.0.8.tar.bz2) = 916084 bytes -SHA1 (patch-aa) = b01ba86612ed2613034bfbfdc878ce5178eede6b -SHA1 (patch-ab) = 83d16a720eaaa113bf714fa8d60fcb9acf11c988 -SHA1 (patch-ac) = 644bfe717bdcc993a668a3d075acda8ef39571d8 -SHA1 (patch-ad) = 9522d20b1467b73678003d5c0f98dcac7d312893 -SHA1 (patch-ae) = cf277165382c17d938593934b59d8035175fd8d0 -SHA1 (patch-af) = 0374fc36c418871e929fbb3c53ab4979e780e8d5 -SHA1 (patch-ag) = 7d46fc3b996e39e8532d2e20a47587a54e37b654 -SHA1 (patch-ah) = 29cfc8b7f98610efb2b6013367c06f0e09a32312 -SHA1 (patch-ai) = 07a83340eb9d6a36a3f5b2db33eb50c74fbc4777 -SHA1 (patch-aj) = 0a0ca01be2a33a1a3b9f17e1d52db1a1b7502177 -SHA1 (patch-ak) = 95170aa2786c5313f859b2381031be9bc7f7cd76 -SHA1 (patch-al) = e18c0d13a3aeb6a4357147e32c9cc650a5e2a1ad -SHA1 (patch-am) = cc12e383f36e7f3c0f25fd3a3ea2e0ceff04d43c -SHA1 (patch-an) = 5ea04c27db91067733ab75d4ce4959446031cb91 -SHA1 (patch-ao) = f54754a2bdcce99a0d953186aee6d2bcbc5d7bae -SHA1 (patch-ap) = c47c57d77424d18a3184a0625e0d953745d929fe -SHA1 (patch-aq) = 8efdb60a0bf66b6d0614620a0523238b41e72b8b +SHA1 (libgtop-2.5.2.tar.bz2) = 0ef139ccfd7a6a11b9f94c17e3a9d382ded1dad3 +Size (libgtop-2.5.2.tar.bz2) = 935545 bytes +SHA1 (patch-aa) = 5ebb407abdaedb77ed02c01adbaba70113b333b6 +SHA1 (patch-al) = 4fad51ee02aa13c8f53d8716fb230bef2f282d4d diff --git a/devel/libgtop2/patches/patch-aa b/devel/libgtop2/patches/patch-aa index c1a44d5e561..a33f3a6ccc2 100644 --- a/devel/libgtop2/patches/patch-aa +++ b/devel/libgtop2/patches/patch-aa @@ -1,4 +1,4 @@ -$NetBSD: patch-aa,v 1.3 2003/12/13 20:27:42 xtraeme Exp $ +$NetBSD: patch-aa,v 1.4 2004/04/01 18:34:27 jmmv Exp $ --- configure.orig 2003-12-13 08:32:17.000000000 +0100 +++ configure 2003-12-13 08:33:16.000000000 +0100 @@ -18,12 +18,3 @@ $NetBSD: patch-aa,v 1.3 2003/12/13 20:27:42 xtraeme Exp $ ;; aix*) libgtop_sysdeps_dir=aix -@@ -30160,7 +30160,7 @@ - - - if test x$libgtop_need_server = xyes ; then -- sysdeps_suid_lib="\$(top_builddir)/sysdeps/\$(sysdeps_dir)/libgtop_sysdeps_suid-2.0.la" -+ sysdeps_suid_lib="\$(top_builddir)/sysdeps/\$(sysdeps_dir)/libgtop_sysdeps_suid-2.0.la \$(top_builddir)/sysdeps/common/libgtop_suid_common-2.0.la" - server_programs='libgtop_server2' - else - sysdeps_suid_lib= diff --git a/devel/libgtop2/patches/patch-ab b/devel/libgtop2/patches/patch-ab deleted file mode 100644 index f04f9d88a5d..00000000000 --- a/devel/libgtop2/patches/patch-ab +++ /dev/null @@ -1,76 +0,0 @@ -$NetBSD: patch-ab,v 1.2 2003/12/13 20:27:42 xtraeme Exp $ - ---- sysdeps/freebsd/procsignal.c.orig Sat Sep 6 00:25:33 2003 -+++ sysdeps/freebsd/procsignal.c Sat Sep 6 00:30:38 2003 -@@ -67,11 +67,30 @@ - return; - } - -+#if defined(__FreeBSD__) && (__FreeBSD_version >= 500013) -+ -+#define XXX_P_SIGLIST ki_siglist -+#define XXX_P_SIGMASK ki_sigmask -+#define XXX_P_SIGIGNORE ki_sigignore -+#define XXX_P_SIGCATCH ki_sigcatch -+ -+#else -+ -+#define XXX_P_SIGLIST kp_proc.p_siglist -+#define XXX_P_SIGMASK kp_proc.p_sigmask -+#define XXX_P_SIGIGNORE kp_proc.p_sigignore -+#define XXX_P_SIGCATCH kp_proc.p_sigcatch -+ -+#endif -+ -+ - /* signal: mask of pending signals. - * pinfo [0].kp_proc.p_siglist - */ --#if (defined(__NetBSD__) && (NSIG > 32)) || (__FreeBSD_version >= 400011) -- buf->signal [0] = pinfo [0].kp_proc.p_siglist.__bits[0]; -+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 105150000) -+ buf->signal [0] = pinfo [0].kp_proc.p_sigctx.ps_siglist.__bits[0]; -+#elif (defined(__NetBSD__) && (NSIG > 32)) || defined(__FreeBSD__) && (__FreeBSD_version >= 400011) -+ buf->signal [0] = pinfo [0].XXX_P_SIGLIST.__bits[0]; - #else - buf->signal [0] = pinfo [0].kp_proc.p_siglist; - #endif -@@ -79,8 +98,10 @@ - /* blocked: mask of blocked signals. - * pinfo [0].kp_proc.p_sigmask - */ --#if (defined(__NetBSD__) && (NSIG > 32)) || (__FreeBSD_version >= 400011) -- buf->blocked [0] = pinfo [0].kp_proc.p_sigmask.__bits[0]; -+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 105150000) -+ buf->blocked [0] = pinfo [0].kp_proc.p_sigctx.ps_sigmask.__bits[0]; -+#elif (defined(__NetBSD__) && (NSIG > 32)) || defined(__FreeBSD__) && (__FreeBSD_version >= 400011) -+ buf->blocked [0] = pinfo [0].XXX_P_SIGMASK.__bits[0]; - #else - buf->blocked [0] = pinfo [0].kp_proc.p_sigmask; - #endif -@@ -88,8 +109,10 @@ - /* sigignore: mask of ignored signals. - * pinfo [0].kp_proc.p_sigignore - */ --#if (defined(__NetBSD__) && (NSIG > 32)) || (__FreeBSD_version >= 400011) -- buf->sigignore [0] = pinfo [0].kp_proc.p_sigignore.__bits[0]; -+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 105150000) -+ buf->sigignore [0] = pinfo [0].kp_proc.p_sigctx.ps_sigignore.__bits[0]; -+#elif (defined(__NetBSD__) && (NSIG > 32)) || defined(__FreeBSD__) && (__FreeBSD_version >= 400011) -+ buf->sigignore [0] = pinfo [0].XXX_P_SIGIGNORE.__bits[0]; - #else - buf->sigignore [0] = pinfo [0].kp_proc.p_sigignore; - #endif -@@ -97,8 +120,10 @@ - /* sigcatch: mask of caught signals. - * pinfo [0].kp_proc.p_sigcatch - */ --#if (defined(__NetBSD__) && (NSIG > 32)) || (__FreeBSD_version >= 400011) -- buf->sigcatch [0] = pinfo [0].kp_proc.p_sigcatch.__bits[0]; -+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 105150000) -+ buf->sigcatch [0] = pinfo [0].kp_proc.p_sigctx.ps_sigcatch.__bits[0]; -+#elif (defined(__NetBSD__) && (NSIG > 32)) || defined(__FreeBSD__) && (__FreeBSD_version >= 400011) -+ buf->sigcatch [0] = pinfo [0].XXX_P_SIGCATCH.__bits[0]; - #else - buf->sigcatch [0] = pinfo [0].kp_proc.p_sigcatch; - #endif diff --git a/devel/libgtop2/patches/patch-ac b/devel/libgtop2/patches/patch-ac deleted file mode 100644 index f737be05293..00000000000 --- a/devel/libgtop2/patches/patch-ac +++ /dev/null @@ -1,18 +0,0 @@ -$NetBSD: patch-ac,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ - ---- include/glibtop/procstate.h.orig Tue Feb 23 06:43:11 1999 -+++ include/glibtop/procstate.h Sun Aug 29 19:50:34 1999 -@@ -36,6 +36,13 @@ - - #define GLIBTOP_MAX_PROC_STATE 4 - -+#define GLIBTOP_PROCESS_RUNNING 1 -+#define GLIBTOP_PROCESS_INTERRUPTIBLE 2 -+#define GLIBTOP_PROCESS_UNINTERRUPTIBLE 4 -+#define GLIBTOP_PROCESS_ZOMBIE 8 -+#define GLIBTOP_PROCESS_STOPPED 16 -+#define GLIBTOP_PROCESS_SWAPPING 32 -+ - typedef struct _glibtop_proc_state glibtop_proc_state; - - /* Name and status */ diff --git a/devel/libgtop2/patches/patch-ad b/devel/libgtop2/patches/patch-ad deleted file mode 100644 index 28c5fe5caa8..00000000000 --- a/devel/libgtop2/patches/patch-ad +++ /dev/null @@ -1,17 +0,0 @@ -$NetBSD: patch-ad,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ - ---- sysdeps/freebsd/procargs.c.orig Thu May 27 16:04:01 1999 -+++ sysdeps/freebsd/procargs.c Sat Jun 3 23:18:52 2000 -@@ -83,9 +83,9 @@ - - args = kvm_getargv (server->machine.kd, pinfo, max_len); - if (args == NULL) { -- glibtop_suid_leave (server); -- glibtop_warn_io_r (server, "kvm_getargv (%d)", pid); -- return NULL; -+ static char *dummy = NULL; -+ -+ args = &dummy; - } - - glibtop_suid_leave (server); diff --git a/devel/libgtop2/patches/patch-ae b/devel/libgtop2/patches/patch-ae deleted file mode 100644 index ebb8c19fd85..00000000000 --- a/devel/libgtop2/patches/patch-ae +++ /dev/null @@ -1,81 +0,0 @@ -$NetBSD: patch-ae,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ - ---- sysdeps/freebsd/cpu.c.orig Sun Feb 13 16:47:58 2000 -+++ sysdeps/freebsd/cpu.c -@@ -27,11 +27,16 @@ - - #include <glibtop_suid.h> - -+#ifdef __NetBSD__ -+#include <sys/sched.h> -+#endif -+ - static const unsigned long _glibtop_sysdeps_cpu = - (1L << GLIBTOP_CPU_TOTAL) + (1L << GLIBTOP_CPU_USER) + - (1L << GLIBTOP_CPU_NICE) + (1L << GLIBTOP_CPU_SYS) + - (1L << GLIBTOP_CPU_IDLE) + (1L << GLIBTOP_CPU_FREQUENCY); - -+#ifndef KERN_CP_TIME - /* nlist structure for kernel access */ - static struct nlist nlst [] = { - #ifdef __bsdi__ -@@ -41,21 +46,27 @@ - #endif - { 0 } - }; -+#endif - - /* MIB array for sysctl */ - static int mib_length=2; - static int mib [] = { CTL_KERN, KERN_CLOCKRATE }; -+#ifdef KERN_CP_TIME -+static int mib2 [] = { CTL_KERN, KERN_CP_TIME }; -+#endif - - /* Init function. */ - - void - glibtop_init_cpu_p (glibtop *server) - { -+#ifndef KERN_CP_TIME - if (kvm_nlist (server->machine.kd, nlst) < 0) { - glibtop_warn_io_r (server, "kvm_nlist (cpu)"); - return; - } - -+#endif - /* Set this only if kvm_nlist () succeeded. */ - server->sysdeps.cpu = _glibtop_sysdeps_cpu; - } -@@ -65,7 +76,11 @@ - void - glibtop_get_cpu_p (glibtop *server, glibtop_cpu *buf) - { -+#ifdef KERN_CP_TIME -+ u_int64_t cpts [CPUSTATES]; -+#else - long cpts [CPUSTATES]; -+#endif - /* sysctl vars*/ - struct clockinfo ci; - size_t length; -@@ -78,11 +93,19 @@ - if (server->sysdeps.cpu == 0) - return; - -+#ifdef KERN_CP_TIME -+ length = sizeof (cpts); -+ if (sysctl (mib2, mib_length, cpts, &length, NULL, 0)) { -+ glibtop_warn_io_r (server, "sysctl"); -+ return; -+ } -+#else - if (kvm_read (server->machine.kd, nlst [0].n_value, - &cpts, sizeof (cpts)) != sizeof (cpts)) { - glibtop_warn_io_r (server, "kvm_read (cp_time)"); - return; - } -+#endif - - /* Get the clockrate data */ - length = sizeof (struct clockinfo); diff --git a/devel/libgtop2/patches/patch-af b/devel/libgtop2/patches/patch-af deleted file mode 100644 index 4a4e1b3ba6e..00000000000 --- a/devel/libgtop2/patches/patch-af +++ /dev/null @@ -1,38 +0,0 @@ -$NetBSD: patch-af,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ - ---- sysdeps/freebsd/uptime.c.orig Thu May 27 16:04:16 1999 -+++ sysdeps/freebsd/uptime.c -@@ -49,6 +49,27 @@ - void - glibtop_get_uptime_p (glibtop *server, glibtop_uptime *buf) - { -+#ifdef __NetBSD__ -+ time_t now; -+ time_t uptime; -+ int mib[2]; -+ struct timeval boottime; -+ size_t size; -+ -+ mib[0] = CTL_KERN; -+ mib[1] = KERN_BOOTTIME; -+ size = sizeof(boottime); -+ if (sysctl(mib, 2, &boottime, &size, NULL, 0) != -1 && -+ boottime.tv_sec != 0) { -+ time(&now); -+ buf->uptime = now - boottime.tv_sec; -+ /* XXX: don't know a useful value to put here. */ -+ buf->idletime = 0; -+ buf->flags = _glibtop_sysdeps_uptime; -+ } -+#else -+ buf->flags = _glibtop_sysdeps_uptime; -+ - glibtop_cpu cpu; - - glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_UPTIME), 0); -@@ -70,4 +91,5 @@ - buf->idletime = (double) cpu.idle / (double) cpu.frequency; - - buf->flags = _glibtop_sysdeps_uptime; -+#endif - } diff --git a/devel/libgtop2/patches/patch-ag b/devel/libgtop2/patches/patch-ag deleted file mode 100644 index e0727e310fd..00000000000 --- a/devel/libgtop2/patches/patch-ag +++ /dev/null @@ -1,109 +0,0 @@ -$NetBSD: patch-ag,v 1.2 2003/12/13 20:27:42 xtraeme Exp $ - ---- sysdeps/freebsd/procmem.c.orig Sat Sep 6 00:18:49 2003 -+++ sysdeps/freebsd/procmem.c Sat Sep 6 00:22:45 2003 -@@ -31,8 +31,12 @@ - #include <sys/param.h> - #include <sys/proc.h> - #include <sys/resource.h> -+#ifdef __NetBSD__ && (__NetBSD_Version__ >= 105020000) -+#include <uvm/uvm_extern.h> -+#else - #include <vm/vm_object.h> - #include <vm/vm_map.h> -+#endif - - #include <sys/vnode.h> - #include <ufs/ufs/quota.h> -@@ -43,9 +47,14 @@ - #include <sys/user.h> - #endif - #include <sys/sysctl.h> -+#ifdef __NetBSD__ && (__NetBSD_Version__ >= 105020000) -+#include <uvm/uvm.h> -+#else - #include <vm/vm.h> -+#endif - --#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) -+#if defined(__NetBSD__) && \ -+ (__NetBSD_Version__ >= 104000000) && (__NetBSD_Version__ < 105020000) - /* Fixme ... */ - #undef _KERNEL - #define _UVM_UVM_AMAP_I_H_ 1 -@@ -113,7 +122,6 @@ - struct vmspace *vms, vmspace; - #if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) - struct vnode vnode; -- struct inode inode; - #else - struct vm_object object; - #endif -@@ -136,9 +144,24 @@ - glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid); - return; - } -+#if defined(__FreeBSD__) && (__FreeBSD_version >= 500013) -+ -+#define XXX_P_VMSPACE ki_vmspace -+ -+ buf->rss_rlim = pinfo [0].ki_rssize; -+ -+ buf->vsize = buf->size = (u_int64_t) pagetok -+ (pinfo [0].ki_tsize + pinfo [0].ki_dsize + pinfo[0].ki_ssize) -+ << LOG1024; -+ buf->resident = buf->rss = (u_int64_t) pagetok -+ (pinfo [0].ki_rssize) << LOG1024; -+ -+#else -+ -+#define XXX_P_VMSPACE kp_proc.p_vmspace - - if (kvm_read (server->machine.kd, -- (unsigned long) pinfo [0].kp_proc.p_limit, -+ (unsigned long) pinfo [0].XXX_P_VMSPACE, - (char *) &plimit, sizeof (plimit)) != sizeof (plimit)) { - glibtop_warn_io_r (server, "kvm_read (plimit)"); - return; -@@ -154,11 +177,12 @@ - - buf->resident = buf->rss = (u_int64_t) pagetok - (vms->vm_rssize) << LOG1024; -+#endif - - /* Now we get the shared memory. */ - - if (kvm_read (server->machine.kd, -- (unsigned long) pinfo [0].kp_proc.p_vmspace, -+ (unsigned long) pinfo [0].XXX_P_VMSPACE, - (char *) &vmspace, sizeof (vmspace)) != sizeof (vmspace)) { - glibtop_warn_io_r (server, "kvm_read (vmspace)"); - return; -@@ -233,17 +257,26 @@ - /* If the object is of type vnode, add its size */ - - #if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) -+#if defined(UVM_VNODE_VALID) - if (!vnode.v_uvm.u_flags & UVM_VNODE_VALID) - continue; -- -+#endif - if ((vnode.v_type != VREG) || (vnode.v_tag != VT_UFS) || - !vnode.v_data) continue; -+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 105250000) -+ /* Reference count must be at least two. */ -+ if (vnode.v_usecount <= 1) -+ continue; -+ -+ buf->share += pagetok (vnode.v_uobj.uo_npages) << LOG1024; -+#else - - /* Reference count must be at least two. */ - if (vnode.v_uvm.u_obj.uo_refs <= 1) - continue; - - buf->share += pagetok (vnode.v_uvm.u_obj.uo_npages) << LOG1024; -+#endif /* __NetBSD_Version__ >= 105250000 */ - #endif - - #ifdef __FreeBSD__ diff --git a/devel/libgtop2/patches/patch-ah b/devel/libgtop2/patches/patch-ah deleted file mode 100644 index d32061129ae..00000000000 --- a/devel/libgtop2/patches/patch-ah +++ /dev/null @@ -1,96 +0,0 @@ -$NetBSD: patch-ah,v 1.2 2003/12/13 20:27:42 xtraeme Exp $ - ---- sysdeps/freebsd/procmap.c.orig 2003-09-07 00:45:14.000000000 +0200 -+++ sysdeps/freebsd/procmap.c 2003-09-07 00:51:01.000000000 +0200 -@@ -32,9 +32,21 @@ - #include <sys/param.h> - #include <sys/proc.h> - #include <sys/resource.h> -+#if defined(__NetBSD__) && (__NetBSD_Version__ < 105020000) - #include <vm/vm_object.h> - #include <vm/vm_prot.h> - #include <vm/vm_map.h> -+#elif defined(__NetBSD__) && (__NetBSD_Version__ >= 105020000) -+#include <uvm/uvm_extern.h> -+#else -+#include <vm/vm_object.h> -+#include <vm/vm_map.h> -+#if (__FreeBSD_version >= 400011) -+#include <vm/vm.h> -+#else -+#include <vm/vm_prot.h> -+#endif -+#endif - - #include <sys/vnode.h> - #include <sys/mount.h> -@@ -46,7 +58,9 @@ - #include <sys/user.h> - #endif - #include <sys/sysctl.h> -+#if !defined(__NetBSD__) || (__NetBSD_Version__ < 105020000) - #include <vm/vm.h> -+#endif - - #if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) - /* Fixme ... */ -@@ -91,8 +105,9 @@ - glibtop_map_entry *maps; - #if defined __FreeBSD__ - struct vnode vnode; -+#if __FreeBSD_version >= 500039 - struct inode inode; -- struct mount mount; -+#endif - #endif - int count, i = 0; - int update = 0; -@@ -114,7 +129,11 @@ - /* Now we get the memory maps. */ - - if (kvm_read (server->machine.kd, -+#if defined(__FreeBSD__) && (__FreeBSD_version >= 500013) -+ (unsigned long) pinfo [0].ki_vmspace, -+#else - (unsigned long) pinfo [0].kp_proc.p_vmspace, -+#endif - (char *) &vmspace, sizeof (vmspace)) != sizeof (vmspace)) - glibtop_error_io_r (server, "kvm_read (vmspace)"); - -@@ -214,9 +233,10 @@ - #endif - - #if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) -+#if defined(UVM_VNODE_VALID) - if (!vnode.v_uvm.u_flags & UVM_VNODE_VALID) - continue; -- -+#endif - if ((vnode.v_type != VREG) || (vnode.v_tag != VT_UFS) || - !vnode.v_data) continue; - -@@ -244,6 +264,15 @@ - &vnode, sizeof (vnode)) != sizeof (vnode)) - glibtop_error_io_r (server, "kvm_read (vnode)"); - -+#if defined(__FreeBSD__) && (__FreeBSD_version >= 500039) -+ switch (vnode.v_type) { -+ case VREG: -+ maps [i-1].inode = vnode.v_cachedid; -+ maps [i-1].device = vnode.v_cachedfs; -+ default: -+ continue; -+ } -+#else - if ((vnode.v_type != VREG) || (vnode.v_tag != VT_UFS) || - !vnode.v_data) continue; - -@@ -256,7 +285,7 @@ - (unsigned long) vnode.v_mount, - &mount, sizeof (mount)) != sizeof (mount)) - glibtop_error_io_r (server, "kvm_read (mount)"); -- -+#endif - maps [i-1].inode = inode.i_number; - maps [i-1].device = inode.i_dev; - #endif diff --git a/devel/libgtop2/patches/patch-ai b/devel/libgtop2/patches/patch-ai deleted file mode 100644 index 52aa28ceccb..00000000000 --- a/devel/libgtop2/patches/patch-ai +++ /dev/null @@ -1,22 +0,0 @@ -$NetBSD: patch-ai,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ - ---- sysdeps/freebsd/mem.c.orig Sun Feb 13 10:47:58 2000 -+++ sysdeps/freebsd/mem.c Sat Jul 29 22:32:44 2000 -@@ -29,7 +29,9 @@ - - #include <sys/sysctl.h> - #include <sys/vmmeter.h> -+#if defined(__NetBSD__) && (__NetBSD_Version__ < 105020000) - #include <vm/vm_param.h> -+#endif - - #if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) - #include <uvm/uvm_extern.h> -@@ -74,7 +76,6 @@ - }; - - /* MIB array for sysctl */ --static int mib_length=2; - #ifdef __bsdi__ - static int mib [] = { CTL_VM, VM_TOTAL }; - #else diff --git a/devel/libgtop2/patches/patch-aj b/devel/libgtop2/patches/patch-aj deleted file mode 100644 index 8db1c0f3a5a..00000000000 --- a/devel/libgtop2/patches/patch-aj +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-aj,v 1.3 2003/12/13 20:27:42 xtraeme Exp $ - ---- src/daemon/Makefile.in.orig Mon Apr 29 12:05:45 2002 -+++ src/daemon/Makefile.in Mon Apr 29 12:12:14 2002 -@@ -92,7 +92,7 @@ - LIBGTOP_GUILE_NAMES_LIBS = @LIBGTOP_GUILE_NAMES_LIBS@ - LIBGTOP_INCS = @LIBGTOP_INCS@ - LIBGTOP_INTERFACE_AGE = @LIBGTOP_INTERFACE_AGE@ --LIBGTOP_LIBS = @LIBGTOP_LIBS@ -+LIBGTOP_LIBS = - LIBGTOP_MAJOR_VERSION = @LIBGTOP_MAJOR_VERSION@ - LIBGTOP_MICRO_VERSION = @LIBGTOP_MICRO_VERSION@ - LIBGTOP_MINOR_VERSION = @LIBGTOP_MINOR_VERSION@ diff --git a/devel/libgtop2/patches/patch-ak b/devel/libgtop2/patches/patch-ak deleted file mode 100644 index 6b563f7b8d0..00000000000 --- a/devel/libgtop2/patches/patch-ak +++ /dev/null @@ -1,102 +0,0 @@ -$NetBSD: patch-ak,v 1.3 2003/12/13 20:27:42 xtraeme Exp $ - ---- sysdeps/freebsd/proctime.c.orig Sat Sep 6 20:51:34 2003 -+++ sysdeps/freebsd/proctime.c Sat Sep 6 20:57:26 2003 -@@ -57,6 +57,8 @@ - * system, and interrupt time usage. - */ - -+#ifndef __FreeBSD__ -+ - static void - calcru(p, up, sp, ip) - struct proc *p; -@@ -66,9 +68,7 @@ - { - quad_t totusec; - u_quad_t u, st, ut, it, tot; --#if (__FreeBSD_version < 300003) - long sec, usec; --#endif - struct timeval tv; - - st = p->p_sticks; -@@ -117,6 +117,8 @@ - } - } - -+#endif /* !__FreeBSD__ */ -+ - /* Provides detailed information about a process. */ - - void -@@ -142,7 +144,7 @@ - /* It does not work for the swapper task. */ - if (pid == 0) return; - --#if !(defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)) -+#if (defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)) - if (server->sysdeps.proc_time == 0) - return; - -@@ -157,7 +159,9 @@ - if ((pinfo == NULL) || (count != 1)) - glibtop_error_io_r (server, "kvm_getprocs (%d)", pid); - --#if (defined __FreeBSD__) && (__FreeBSD_version >= 300003) -+#if defined(__FreeBSD__) && (__FreeBSD_version >= 500013) -+ buf->rtime = pinfo [0].ki_runtime; -+#elif (defined __FreeBSD__) && (__FreeBSD_version <= 500013) - buf->rtime = pinfo [0].kp_proc.p_runtime; - #else - buf->rtime = tv2sec (pinfo [0].kp_proc.p_rtime); -@@ -192,8 +196,40 @@ - - buf->flags |= _glibtop_sysdeps_proc_time_user; - #else -+#if defined(__FreeBSD__) && (__FreeBSD_version >= 500013) -+#if __FreeBSD_version >= 500016 -+ if ((pinfo [0].ki_flag & PS_INMEM)) { -+#else -+ if ((pinfo [0].ki_flag & P_INMEM)) { -+#endif -+ buf->utime = pinfo [0].ki_runtime; -+ buf->stime = 0; /* XXX */ -+ buf->cutime = tv2sec (pinfo [0].ki_childtime); -+ buf->cstime = 0; /* XXX */ -+ buf->start_time = tv2sec (pinfo [0].ki_start); -+ buf->flags = _glibtop_sysdeps_proc_time_user; -+ } -+ - glibtop_suid_enter (server); - -+#elif (__FreeBSD_version <= 500013) -+ -+ if ((pinfo [0].kp_proc.p_flag & P_INMEM) && -+ kvm_uread (server->machine.kd, &(pinfo [0]).kp_proc, -+ (unsigned long) &u_addr->u_stats, -+ (char *) &pstats, sizeof (pstats)) == sizeof (pstats)) -+ { -+ -+ buf->utime = tv2sec (pinfo[0].kp_eproc.e_stats.p_ru.ru_utime); -+ buf->stime = tv2sec (pinfo[0].kp_eproc.e_stats.p_ru.ru_stime); -+ buf->cutime = tv2sec (pinfo[0].kp_eproc.e_stats.p_cru.ru_utime); -+ buf->cstime = tv2sec (pinfo[0].kp_eproc.e_stats.p_cru.ru_stime); -+ buf->start_time = tv2sec (pinfo[0].kp_eproc.e_stats.p_start); -+ buf->flags = _glibtop_sysdeps_proc_time_user; -+ glibtop_suid_leave (server); -+ } -+#else -+ - if ((pinfo [0].kp_proc.p_flag & P_INMEM) && - kvm_uread (server->machine.kd, &(pinfo [0]).kp_proc, - (unsigned long) &u_addr->u_stats, -@@ -222,7 +258,7 @@ - - buf->flags = _glibtop_sysdeps_proc_time_user; - } -- -+#endif - glibtop_suid_leave (server); - #endif - } diff --git a/devel/libgtop2/patches/patch-al b/devel/libgtop2/patches/patch-al index d19748e85cd..c8f3f471aad 100644 --- a/devel/libgtop2/patches/patch-al +++ b/devel/libgtop2/patches/patch-al @@ -1,183 +1,14 @@ -$NetBSD: patch-al,v 1.4 2004/03/19 22:55:30 kristerw Exp $ +$NetBSD: patch-al,v 1.5 2004/04/01 18:34:27 jmmv Exp $ ---- sysdeps/freebsd/prockernel.c.orig 2003-10-19 18:55:32.000000000 +0200 -+++ sysdeps/freebsd/prockernel.c 2004-03-19 23:39:38.000000000 +0100 -@@ -34,12 +34,9 @@ - #if (!defined __OpenBSD__) && (!defined __bsdi__) - #include <sys/user.h> - #endif --#if !defined(__bsdi__) && !(defined(__FreeBSD__) && defined(__alpha__)) -+#if !defined(__bsdi__) && !(defined(__FreeBSD__) && defined(__alpha__)) && !defined(__NetBSD__) - #include <machine/pcb.h> - #endif --#if defined(__FreeBSD__) && !defined(__alpha__) --#include <machine/tss.h> --#endif - - #include <unistd.h> - #include <fcntl.h> -@@ -48,6 +45,23 @@ - #include <osreldate.h> - #endif - -+#ifdef __NetBSD__ -+#include <machine/vmparam.h> -+#include <machine/pmap.h> -+#ifdef __arm32__ -+#define KERNBASE KERNEL_BASE -+#endif -+#endif -+ -+#ifdef __NetBSD__ -+#include <machine/vmparam.h> -+#include <machine/pmap.h> -+#ifdef __arm32__ -+#define KERNBASE KERNEL_BASE -+#endif -+#endif -+ -+ - static const unsigned long _glibtop_sysdeps_proc_kernel_pstats = - (1L << GLIBTOP_PROC_KERNEL_MIN_FLT) + - (1L << GLIBTOP_PROC_KERNEL_MAJ_FLT) + -@@ -78,9 +92,11 @@ - pid_t pid) - { - struct kinfo_proc *pinfo; -+#ifndef __FreeBSD__ - struct user *u_addr = (struct user *)USRSTACK; - struct pstats pstats; - struct pcb pcb; -+#endif - int count; - - char filename [BUFSIZ]; -@@ -101,17 +117,36 @@ - if ((pinfo == NULL) || (count != 1)) - glibtop_error_io_r (server, "kvm_getprocs (%d)", pid); - -- buf->nwchan = (unsigned long) pinfo [0].kp_proc.p_wchan &~ KERNBASE; -+#if defined(__FreeBSD__) && (__FreeBSD_version >= 500013) -+ -+#define XXX_P_WCHAN ki_wchan -+#define XXX_P_WMESG ki_wmesg -+#define XXX_E_WMESG ki_wmesg -+ -+#else -+ -+#define XXX_P_WCHAN kp_proc.p_wchan -+#define XXX_P_WMESG kp_proc.p_wmesg -+#define XXX_E_WMESG kp_eproc.e_wmesg -+ -+#endif -+ -+#if !defined(__NetBSD__) || !defined(SACTIVE) -+ buf->nwchan = (unsigned long) pinfo [0].XXX_P_WCHAN &~ KERNBASE; -+ - buf->flags |= (1L << GLIBTOP_PROC_KERNEL_NWCHAN); - -- if (pinfo [0].kp_proc.p_wchan && pinfo [0].kp_proc.p_wmesg) { -- strncpy (buf->wchan, pinfo [0].kp_eproc.e_wmesg, -+ if (pinfo [0].XXX_P_WCHAN && pinfo [0].XXX_P_WMESG) { -+ strncpy (buf->wchan, pinfo [0].XXX_E_WMESG, - sizeof (buf->wchan) - 1); - buf->wchan [sizeof (buf->wchan) - 1] = 0; - buf->flags |= (1L << GLIBTOP_PROC_KERNEL_WCHAN); - } else { - buf->wchan [0] = 0; - } -+#endif -+ -+#ifndef __FreeBSD__ - - /* Taken from `saveuser ()' in `/usr/src/bin/ps/ps.c'. */ - -@@ -129,8 +164,17 @@ - - glibtop_suid_enter (server); - -+#if !defined(__NetBSD__) || !defined(SACTIVE) -+#ifdef __NetBSD__ -+ /* On NetBSD, there is no kvm_uread(), and kvm_read() always reads -+ * from kernel memory. */ -+ -+ if (kvm_read (server->machine.kd, -+#else -+ - if ((pinfo [0].kp_proc.p_flag & P_INMEM) && - kvm_uread (server->machine.kd, &(pinfo [0]).kp_proc, -+#endif - (unsigned long) &u_addr->u_stats, - (char *) &pstats, sizeof (pstats)) == sizeof (pstats)) - { -@@ -149,8 +193,12 @@ - buf->flags |= _glibtop_sysdeps_proc_kernel_pstats; - } - -+#ifdef __NetBSD__ -+ if (kvm_read (server->machine.kd, -+#else - if ((pinfo [0].kp_proc.p_flag & P_INMEM) && - kvm_uread (server->machine.kd, &(pinfo [0]).kp_proc, -+#endif - (unsigned long) &u_addr->u_pcb, - (char *) &pcb, sizeof (pcb)) == sizeof (pcb)) - { -@@ -167,18 +215,55 @@ - /*xxx FreeBSD/Alpha? */ - #endif - #else -+#ifdef __i386__ - buf->kstk_esp = (u_int64_t) pcb.pcb_tss.tss_esp0; - #ifdef __bsdi__ - buf->kstk_eip = (u_int64_t) pcb.pcb_tss.tss_eip; - #else - buf->kstk_eip = (u_int64_t) pcb.pcb_tss.__tss_eip; - #endif -- -+#else -+#if defined(__NetBSD__) -+#if defined(__m68k__) -+ buf->kstk_esp = (u_int64_t) pcb.pcb_usp; -+ buf->kstk_eip = (u_int64_t) 0; +--- sysdeps/freebsd/prockernel.c.orig 2004-03-11 03:23:52.000000000 +0100 ++++ sysdeps/freebsd/prockernel.c +@@ -228,6 +228,9 @@ glibtop_get_proc_kernel_p (glibtop *serv + #if defined(__m68k__) + buf->kstk_esp = (u_int64_t) pcb.pcb_usp; + buf->kstk_eip = (u_int64_t) 0; +#elif defined(__x86_64__) + buf->kstk_esp = (u_int64_t) pcb.pcb_usersp; + buf->kstk_eip = (u_int64_t) 0; -+#elif (defined(__arm32__) || defined(__powerpc__)) -+ buf->kstk_esp = (u_int64_t) pcb.pcb_sp; -+ buf->kstk_eip = (u_int64_t) 0; -+#elif defined(__mipsel__) -+ buf->kstk_esp = (u_int64_t) pcb.pcb_context[8]; -+ buf->kstk_eip = (u_int64_t) 0; -+#elif defined(__sparc__) -+ buf->kstk_esp = (u_int64_t) pcb.pcb_sp; -+ buf->kstk_eip = (u_int64_t) pcb.pcb_pc; -+#elif defined(__alpha__) -+ buf->kstk_esp = (u_int64_t) pcb.pcb_context[9]; -+ buf->kstk_eip = (u_int64_t) pcb.pcb_context[8]; -+#else -+ /* provide some defaults for other platforms */ -+ buf->kstk_esp = (u_int64_t) 0; -+ buf->kstk_eip = (u_int64_t) 0; -+#endif /* ${MACHINE_ARCH} */ -+#endif /* __NetBSD__ */ - buf->flags |= _glibtop_sysdeps_proc_kernel_pcb; - #endif -+#endif - } -- -+#endif - /* Taken from `wchan ()' in `/usr/src/bin/ps/print.c'. */ - - glibtop_suid_leave (server); -+ -+#else -+ /* XXX: the code here was, quite frankly, junk, and almost -+ * certainly wrong - remove it all, leave these fields -+ * unpopulated, and give up until such time as the right -+ * code is produced for both FreeBSD 4.x and 5.x -+ */ -+ return; -+#endif /* __FreeBSD__ */ -+ - } + #elif (defined(__arm32__) || defined(__powerpc__)) + buf->kstk_esp = (u_int64_t) pcb.pcb_sp; + buf->kstk_eip = (u_int64_t) 0; diff --git a/devel/libgtop2/patches/patch-am b/devel/libgtop2/patches/patch-am deleted file mode 100644 index b4b3b507d57..00000000000 --- a/devel/libgtop2/patches/patch-am +++ /dev/null @@ -1,92 +0,0 @@ -$NetBSD: patch-am,v 1.3 2003/12/13 20:27:42 xtraeme Exp $ - ---- sysdeps/freebsd/procstate.c.orig Fri Sep 5 23:39:12 2003 -+++ sysdeps/freebsd/procstate.c Fri Sep 5 23:45:03 2003 -@@ -37,11 +37,7 @@ - (1L << GLIBTOP_PROC_STATE_GID); - - static const unsigned long _glibtop_sysdeps_proc_state_new = --#if LIBGTOP_VERSION_CODE >= 1001000 --(1L << GLIBTOP_PROC_STATE_RUID) + (1L << GLIBTOP_PROC_STATE_RGID); --#else - 0; --#endif - - /* Init function. */ - -@@ -76,32 +72,47 @@ - return; - } - -- strncpy (buf->cmd, pinfo [0].kp_proc.p_comm, sizeof (buf->cmd)-1); -- buf->cmd [sizeof (buf->cmd)-1] = 0; -+#if defined(__FreeBSD__) && (__FreeBSD_version >= 500013) -+#define XXX_P_COMM ki_comm -+#define XXX_P_SVUID ki_svuid -+#define XXX_P_SVGID ki_svgid -+#define XXX_P_RUID ki_ruid -+#define XXX_P_RGID ki_rgid -+#define XXX_P_STAT ki_stat - -- buf->uid = pinfo [0].kp_eproc.e_pcred.p_svuid; -- buf->gid = pinfo [0].kp_eproc.e_pcred.p_svgid; -+#else -+#define XXX_P_COMM kp_proc.p_comm -+#define XXX_P_SVUID kp_eproc.e_pcred.p_svuid -+#define XXX_P_SVGID kp_eproc.e_pcred.p_svgid -+#define XXX_P_RUID kp_eproc.e_pcred.p_ruid -+#define XXX_P_RGID kp_eproc.e_pcred.p_rgid -+#define XXX_P_STAT kp_proc.p_stat - --#if LIBGTOP_VERSION_CODE >= 1001000 -- buf->ruid = pinfo [0].kp_eproc.e_pcred.p_ruid; -- buf->rgid = pinfo [0].kp_eproc.e_pcred.p_rgid; - #endif - -+ strncpy (buf->cmd, pinfo [0].XXX_P_COMM, sizeof (buf->cmd)-1); -+ buf->cmd [sizeof (buf->cmd)-1] = 0; -+ -+ buf->uid = pinfo [0].XXX_P_SVUID; -+ buf->gid = pinfo [0].XXX_P_SVGID; -+ - /* Set the flags for the data we're about to return*/ - buf->flags = _glibtop_sysdeps_proc_state | - _glibtop_sysdeps_proc_state_new; - - #if LIBGTOP_VERSION_CODE >= 1001000 -- switch (pinfo [0].kp_proc.p_stat) { -+ switch (pinfo [0].XXX_P_STAT) { - case SIDL: - buf->state = 0; - break; - case SRUN: - buf->state = GLIBTOP_PROCESS_RUNNING; - break; -+#ifdef SSLEEP - case SSLEEP: - buf->state = GLIBTOP_PROCESS_INTERRUPTIBLE; - break; -+#endif - case SSTOP: - buf->state = GLIBTOP_PROCESS_STOPPED; - break; -@@ -112,16 +123,18 @@ - return; - } - #else -- switch (pinfo [0].kp_proc.p_stat) { -+ switch (pinfo [0].XXX_P_STAT) { - case SIDL: - buf->state = 'S'; - break; - case SRUN: - buf->state = 'R'; - break; -+#ifdef SSLEEP - case SSLEEP: - buf->state = 'S'; - break; -+#endif - case SSTOP: - buf->state = 'T'; - break; diff --git a/devel/libgtop2/patches/patch-an b/devel/libgtop2/patches/patch-an deleted file mode 100644 index b551a957081..00000000000 --- a/devel/libgtop2/patches/patch-an +++ /dev/null @@ -1,89 +0,0 @@ -$NetBSD: patch-an,v 1.3 2003/12/13 20:27:42 xtraeme Exp $ - ---- sysdeps/freebsd/procuid.c.orig Fri Sep 5 23:46:58 2003 -+++ sysdeps/freebsd/procuid.c Fri Sep 5 23:51:37 2003 -@@ -35,15 +35,7 @@ - (1L << GLIBTOP_PROC_UID_NICE); - - static const unsigned long _glibtop_sysdeps_proc_uid_groups = --#if LIBGTOP_VERSION_CODE >= 1001000 --#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) --(1L << GLIBTOP_PROC_UID_NGROUPS) + (1L << GLIBTOP_PROC_UID_GROUPS); --#else --0L; --#endif --#else /* LIBGTOP_VERSION_CODE < 1001000 */ - 0L; --#endif - - /* Init function. */ - -@@ -84,24 +76,57 @@ - return; - } - -- buf->uid = pinfo [0].kp_eproc.e_pcred.p_ruid; -- buf->euid = pinfo [0].kp_eproc.e_pcred.p_svuid; -- buf->gid = pinfo [0].kp_eproc.e_pcred.p_rgid; -- buf->egid = pinfo [0].kp_eproc.e_pcred.p_svgid; -- -- buf->ppid = pinfo [0].kp_eproc.e_ppid; -- buf->pgrp = pinfo [0].kp_eproc.e_pgid; -- buf->tpgid = pinfo [0].kp_eproc.e_tpgid; -+#if defined(__FreeBSD__) && (__FreeBSD_version >= 500013) -+ -+#define XXX_P_RUID ki_ruid -+#define XXX_P_SVUID ki_svuid -+#define XXX_P_RGID ki_rgid -+#define XXX_P_SVGID ki_svgid -+#define XXX_E_PPID ki_ppid -+#define XXX_E_PGID ki_pgid -+#define XXX_E_TPGID ki_tpgid -+#define XXX_P_NICE ki_nice -+#if __FreeBSD_version >= 500013 -+#define XXX_P_PRIORITY ki_pri.pri_user -+#else -+#define XXX_P_PRIORITY ki_priority -+#endif -+#else -+ -+#define XXX_P_RUID kp_eproc.e_pcred.p_ruid -+#define XXX_P_SVUID kp_eproc.e_pcred.p_svuid -+#define XXX_P_RGID kp_eproc.e_pcred.p_rgid -+#define XXX_P_SVGID kp_eproc.e_pcred.p_svgid -+#define XXX_E_PPID kp_eproc.e_ppid -+#define XXX_E_PGID kp_eproc.e_pgid -+#define XXX_E_TPGID kp_eproc.e_tpgid -+#define XXX_P_NICE kp_proc.p_nice -+#define XXX_P_PRIORITY kp_proc.p_priority -+ -+#endif - -- buf->nice = pinfo [0].kp_proc.p_nice; -- buf->priority = pinfo [0].kp_proc.p_priority; -+ buf->uid = pinfo [0].XXX_P_RUID; -+ buf->euid = pinfo [0].XXX_P_SVUID; -+ buf->gid = pinfo [0].XXX_P_RGID; -+ buf->egid = pinfo [0].XXX_P_SVGID; -+ -+ buf->ppid = pinfo [0].XXX_E_PPID; -+ buf->pgrp = pinfo [0].XXX_E_PGID; -+ buf->tpgid = pinfo [0].XXX_E_TPGID; -+ -+ buf->nice = pinfo [0].XXX_P_NICE; -+#if defined(__NetBSD__) && defined(SACTIVE) -+ buf->priority = 0; -+#else -+ buf->priority = pinfo [0].XXX_P_PRIORITY; -+#endif - - /* Set the flags for the data we're about to return*/ - buf->flags = _glibtop_sysdeps_proc_uid; - - /* Use LibGTop conditionals here so we can more easily merge this - * code into the LIBGTOP_STABLE_1_0 branch. */ --#if LIBGTOP_VERSION_CODE >= 1001000 -+#if 0 - /* This probably also works with other versions, but not yet - * tested. Please remove the conditional if this is true. */ - #if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) diff --git a/devel/libgtop2/patches/patch-ao b/devel/libgtop2/patches/patch-ao deleted file mode 100644 index 9497fe7dd58..00000000000 --- a/devel/libgtop2/patches/patch-ao +++ /dev/null @@ -1,83 +0,0 @@ -$NetBSD: patch-ao,v 1.2 2003/12/13 20:27:42 xtraeme Exp $ - ---- sysdeps/freebsd/netload.c.orig Mon Oct 20 01:55:32 2003 -+++ sysdeps/freebsd/netload.c Fri Nov 14 23:09:15 2003 -@@ -83,6 +83,7 @@ - u_long ifnetaddr, ifnetfound, ifaddraddr; - struct sockaddr *sa; - char tname [16]; -+ char temp [16]; - - union { - struct ifaddr ifa; -@@ -109,10 +110,13 @@ - sizeof (ifnet)) != sizeof (ifnet)) - glibtop_error_io_r (server, "kvm_read (ifnetaddr)"); - --#if defined(__FreeBSD__) || defined(__bsdi__) -+#if (defined(__FreeBSD__) && (__FreeBSD_version < 501113)) || defined(__bsdi__) - if (kvm_read (server->machine.kd, (u_long) ifnet.if_name, - tname, 16) != 16) - glibtop_error_io_r (server, "kvm_read (if_name)"); -+ snprintf(temp, (15 - strlen(tname)), "%d", ifnet.if_unit); -+ strcat(tname, temp); -+ tname [15] = 0; - #else - strncpy (tname, ifnet.if_xname, 16); - tname [15] = 0; -@@ -140,39 +144,39 @@ - sin = (struct sockaddr_in *)sa; - - if (ifnet.if_flags & IFF_UP) -- buf->if_flags |= GLIBTOP_IF_FLAGS_UP; -+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_UP); - if (ifnet.if_flags & IFF_BROADCAST) -- buf->if_flags |= GLIBTOP_IF_FLAGS_BROADCAST; -+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_BROADCAST); - if (ifnet.if_flags & IFF_DEBUG) -- buf->if_flags |= GLIBTOP_IF_FLAGS_DEBUG; -+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_DEBUG); - if (ifnet.if_flags & IFF_LOOPBACK) -- buf->if_flags |= GLIBTOP_IF_FLAGS_LOOPBACK; -+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LOOPBACK); - if (ifnet.if_flags & IFF_POINTOPOINT) -- buf->if_flags |= GLIBTOP_IF_FLAGS_POINTOPOINT; -+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_POINTOPOINT); - if (ifnet.if_flags & IFF_RUNNING) -- buf->if_flags |= GLIBTOP_IF_FLAGS_RUNNING; -+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_RUNNING); - if (ifnet.if_flags & IFF_NOARP) -- buf->if_flags |= GLIBTOP_IF_FLAGS_NOARP; -+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_NOARP); - if (ifnet.if_flags & IFF_PROMISC) -- buf->if_flags |= GLIBTOP_IF_FLAGS_PROMISC; -+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_PROMISC); - if (ifnet.if_flags & IFF_ALLMULTI) -- buf->if_flags |= GLIBTOP_IF_FLAGS_ALLMULTI; -+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_ALLMULTI); - if (ifnet.if_flags & IFF_OACTIVE) -- buf->if_flags |= GLIBTOP_IF_FLAGS_OACTIVE; -+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_OACTIVE); - if (ifnet.if_flags & IFF_SIMPLEX) -- buf->if_flags |= GLIBTOP_IF_FLAGS_SIMPLEX; -+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_SIMPLEX); - if (ifnet.if_flags & IFF_LINK0) -- buf->if_flags |= GLIBTOP_IF_FLAGS_LINK0; -+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LINK0); - if (ifnet.if_flags & IFF_LINK1) -- buf->if_flags |= GLIBTOP_IF_FLAGS_LINK1; -+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LINK1); - if (ifnet.if_flags & IFF_LINK2) -- buf->if_flags |= GLIBTOP_IF_FLAGS_LINK2; -+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_LINK2); - #ifdef __FreeBSD__ - if (ifnet.if_flags & IFF_ALTPHYS) -- buf->if_flags |= GLIBTOP_IF_FLAGS_ALTPHYS; -+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_ALTPHYS); - #endif - if (ifnet.if_flags & IFF_MULTICAST) -- buf->if_flags |= GLIBTOP_IF_FLAGS_MULTICAST; -+ buf->if_flags |= (1L << GLIBTOP_IF_FLAGS_MULTICAST); - - #if !defined(__bsdi__) - /* Commenting out to "fix" #13345. */ diff --git a/devel/libgtop2/patches/patch-ap b/devel/libgtop2/patches/patch-ap deleted file mode 100644 index 1fdab167621..00000000000 --- a/devel/libgtop2/patches/patch-ap +++ /dev/null @@ -1,19 +0,0 @@ -$NetBSD: patch-ap,v 1.1 2003/01/21 20:08:10 rh Exp $ - ---- sysdeps/freebsd/glibtop_machine.h.orig Tue Jun 11 07:34:42 2002 -+++ sysdeps/freebsd/glibtop_machine.h -@@ -39,6 +39,14 @@ - #include <osreldate.h> - #endif - -+#ifdef __NetBSD__ -+#include <sys/proc.h> -+ -+#ifndef SRUN -+#define SRUN SACTIVE -+#endif -+#endif -+ - BEGIN_LIBGTOP_DECLS - - typedef struct _glibtop_machine glibtop_machine; diff --git a/devel/libgtop2/patches/patch-aq b/devel/libgtop2/patches/patch-aq deleted file mode 100644 index e4f5000d44b..00000000000 --- a/devel/libgtop2/patches/patch-aq +++ /dev/null @@ -1,32 +0,0 @@ -$NetBSD: patch-aq,v 1.1 2003/12/13 20:27:42 xtraeme Exp $ - ---- sysdeps/freebsd/proclist.c.orig Fri Sep 5 23:30:45 2003 -+++ sysdeps/freebsd/proclist.c Fri Sep 5 23:35:54 2003 -@@ -86,13 +86,24 @@ - pids = glibtop_realloc_r (server, pids, count * sizeof (unsigned)); - /* Copy the pids over to this chain */ - for (i=j=0; i < count; i++) { -+#if defined(__FreeBSD__) && (__FreeBSD_version >= 500013) -+#define XXX_P_STAT ki_stat -+#define XXX_P_RUID ki_ruid -+#define XXX_P_PID ki_pid -+ -+#else -+#define XXX_P_STAT kp_proc.p_stat -+#define XXX_P_RUID kp_eproc.e_pcred.p_ruid -+#define XXX_P_PID kp_proc.p_pid -+ -+#endif - if ((real_which & GLIBTOP_EXCLUDE_IDLE) && -- (pinfo[i].kp_proc.p_stat != SRUN)) -+ (pinfo[i].XXX_P_STAT != SRUN)) - continue; - else if ((real_which & GLIBTOP_EXCLUDE_SYSTEM) && -- (pinfo[i].kp_eproc.e_pcred.p_ruid == 0)) -+ (pinfo[i].XXX_P_RUID == 0)) - continue; -- pids [j++] = (unsigned) pinfo[i].kp_proc.p_pid; -+ pids [j++] = (unsigned) pinfo[i].XXX_P_PID; - } /* end for */ - /* Set the fields in buf */ - buf->number = j; |