diff options
author | rh <rh@pkgsrc.org> | 2003-01-21 20:08:09 +0000 |
---|---|---|
committer | rh <rh@pkgsrc.org> | 2003-01-21 20:08:09 +0000 |
commit | 7362e711aa7dd9c791d83c41a39c092fcf0659f9 (patch) | |
tree | 5c3e892dbf135427d7b90a429609d9ca63700f05 /devel/libgtop2 | |
parent | 7c11693a0be13fe88edcdce37fa491daab69fd67 (diff) | |
download | pkgsrc-7362e711aa7dd9c791d83c41a39c092fcf0659f9.tar.gz |
Make this compile with native threads by applying similar patches to those
committed by tron for libgtop.
Bump PKGREVISION.
Diffstat (limited to 'devel/libgtop2')
-rw-r--r-- | devel/libgtop2/distinfo | 9 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-al | 44 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-am | 34 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-an | 15 | ||||
-rw-r--r-- | devel/libgtop2/patches/patch-ap | 19 |
5 files changed, 102 insertions, 19 deletions
diff --git a/devel/libgtop2/distinfo b/devel/libgtop2/distinfo index c5e699dc030..8def38d50d4 100644 --- a/devel/libgtop2/distinfo +++ b/devel/libgtop2/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.3 2003/01/11 11:22:30 jmmv Exp $ +$NetBSD: distinfo,v 1.4 2003/01/21 20:08:09 rh Exp $ SHA1 (libgtop-2.0.0.tar.bz2) = 9178e5cede22ae5a8928677b195fe585b84b3b86 Size (libgtop-2.0.0.tar.bz2) = 690581 bytes @@ -13,7 +13,8 @@ SHA1 (patch-ah) = 93ebb47710f1c4cc70406a92503bdc4a5bfa50d2 SHA1 (patch-ai) = 07a83340eb9d6a36a3f5b2db33eb50c74fbc4777 SHA1 (patch-aj) = ca1fd2efe97a7bada35bdb99bc0ac3ed72981a11 SHA1 (patch-ak) = cf39190646a4fd618b8ef94647a4cf3c48a9e98b -SHA1 (patch-al) = e771b022a5c2176138c5f49561ac64a15ce11809 -SHA1 (patch-am) = f5971bf6a72a830b95923ce163c75ab5ef548221 -SHA1 (patch-an) = ab91ae30daa7b7bd5f4f31d610ea0f5991d92ad6 +SHA1 (patch-al) = 6f3613fab44bbf27e5a60fdab35d26b93a04de47 +SHA1 (patch-am) = a1fd84155a76246276e952f5288636d2f086b3e7 +SHA1 (patch-an) = 2db9a77b2b021ecd6e0f8c82cebf0455ae6ce501 SHA1 (patch-ao) = 8a3d4b50c00363527a00e3dba9ff4292ae777907 +SHA1 (patch-ap) = c47c57d77424d18a3184a0625e0d953745d929fe diff --git a/devel/libgtop2/patches/patch-al b/devel/libgtop2/patches/patch-al index bd9ec2b1ca6..4e95f2761e7 100644 --- a/devel/libgtop2/patches/patch-al +++ b/devel/libgtop2/patches/patch-al @@ -1,7 +1,7 @@ -$NetBSD: patch-al,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ +$NetBSD: patch-al,v 1.2 2003/01/21 20:08:09 rh Exp $ ---- sysdeps/freebsd/prockernel.c.orig Sat Oct 16 20:31:43 1999 -+++ sysdeps/freebsd/prockernel.c Fri Aug 10 12:38:19 2001 +--- sysdeps/freebsd/prockernel.c.orig Tue Jun 11 07:34:42 2002 ++++ sysdeps/freebsd/prockernel.c @@ -34,7 +34,7 @@ #if (!defined __OpenBSD__) && (!defined __bsdi__) #include <sys/user.h> @@ -11,7 +11,7 @@ $NetBSD: patch-al,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ #include <machine/pcb.h> #endif #if defined(__FreeBSD__) && !defined(__alpha__) -@@ -48,6 +48,14 @@ +@@ -48,6 +48,22 @@ #include <osreldate.h> #endif @@ -23,13 +23,38 @@ $NetBSD: patch-al,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ +#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) + -@@ -129,8 +137,15 @@ +@@ -101,6 +117,7 @@ glibtop_get_proc_kernel_p (glibtop *serv + if ((pinfo == NULL) || (count != 1)) + glibtop_error_io_r (server, "kvm_getprocs (%d)", pid); + ++#if !defined(__NetBSD__) || !defined(SACTIVE) + buf->nwchan = (unsigned long) pinfo [0].kp_proc.p_wchan &~ KERNBASE; + buf->flags |= (1L << GLIBTOP_PROC_KERNEL_NWCHAN); + +@@ -112,6 +129,7 @@ glibtop_get_proc_kernel_p (glibtop *serv + } else { + buf->wchan [0] = 0; + } ++#endif + + /* Taken from `saveuser ()' in `/usr/src/bin/ps/ps.c'. */ + +@@ -129,8 +147,16 @@ glibtop_get_proc_kernel_p (glibtop *serv 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. */ @@ -42,7 +67,7 @@ $NetBSD: patch-al,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ (unsigned long) &u_addr->u_stats, (char *) &pstats, sizeof (pstats)) == sizeof (pstats)) { -@@ -149,8 +164,12 @@ +@@ -149,8 +175,12 @@ glibtop_get_proc_kernel_p (glibtop *serv buf->flags |= _glibtop_sysdeps_proc_kernel_pstats; } @@ -55,7 +80,7 @@ $NetBSD: patch-al,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ (unsigned long) &u_addr->u_pcb, (char *) &pcb, sizeof (pcb)) == sizeof (pcb)) { -@@ -167,14 +186,39 @@ +@@ -167,16 +197,42 @@ glibtop_get_proc_kernel_p (glibtop *serv /*xxx FreeBSD/Alpha? */ #endif #else @@ -91,7 +116,10 @@ $NetBSD: patch-al,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ +#endif /* __NetBSD__ */ buf->flags |= _glibtop_sysdeps_proc_kernel_pcb; -+#endif #endif ++#endif } ++#endif + + /* Taken from `wchan ()' in `/usr/src/bin/ps/print.c'. */ diff --git a/devel/libgtop2/patches/patch-am b/devel/libgtop2/patches/patch-am index d77548b7f37..ea05da91cc5 100644 --- a/devel/libgtop2/patches/patch-am +++ b/devel/libgtop2/patches/patch-am @@ -1,4 +1,4 @@ -$NetBSD: patch-am,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ +$NetBSD: patch-am,v 1.2 2003/01/21 20:08:10 rh Exp $ --- sysdeps/freebsd/procstate.c.orig Tue Jun 11 07:34:42 2002 +++ sysdeps/freebsd/procstate.c @@ -14,15 +14,39 @@ $NetBSD: patch-am,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ /* Init function. */ -@@ -81,11 +77,6 @@ glibtop_get_proc_state_p (glibtop *serve - +@@ -82,11 +78,6 @@ glibtop_get_proc_state_p (glibtop *serve buf->uid = pinfo [0].kp_eproc.e_pcred.p_svuid; buf->gid = pinfo [0].kp_eproc.e_pcred.p_svgid; -- + -#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 - +- /* Set the flags for the data we're about to return*/ buf->flags = _glibtop_sysdeps_proc_state | + _glibtop_sysdeps_proc_state_new; +@@ -99,9 +90,11 @@ glibtop_get_proc_state_p (glibtop *serve + 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; +@@ -119,9 +112,11 @@ glibtop_get_proc_state_p (glibtop *serve + 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 index bcf6b1af459..15c8cc150a0 100644 --- a/devel/libgtop2/patches/patch-an +++ b/devel/libgtop2/patches/patch-an @@ -1,4 +1,4 @@ -$NetBSD: patch-an,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ +$NetBSD: patch-an,v 1.2 2003/01/21 20:08:10 rh Exp $ --- sysdeps/freebsd/procuid.c.orig Tue Jun 11 07:34:42 2002 +++ sysdeps/freebsd/procuid.c @@ -18,7 +18,18 @@ $NetBSD: patch-an,v 1.1.1.1 2002/11/04 02:56:17 rh Exp $ /* Init function. */ -@@ -101,7 +93,7 @@ glibtop_get_proc_uid_p (glibtop *server, +@@ -94,14 +86,18 @@ glibtop_get_proc_uid_p (glibtop *server, + buf->tpgid = pinfo [0].kp_eproc.e_tpgid; + + buf->nice = pinfo [0].kp_proc.p_nice; ++#if defined(__NetBSD__) && defined(SACTIVE) ++ buf->priority = 0; ++#else + buf->priority = pinfo [0].kp_proc.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. */ diff --git a/devel/libgtop2/patches/patch-ap b/devel/libgtop2/patches/patch-ap new file mode 100644 index 00000000000..1fdab167621 --- /dev/null +++ b/devel/libgtop2/patches/patch-ap @@ -0,0 +1,19 @@ +$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; |