From 3220cf3bcbcd3dd5d8e505a7503a0252ac1b191c Mon Sep 17 00:00:00 2001 From: martin Date: Fri, 10 Nov 2006 10:07:20 +0000 Subject: Adapt to recent struct uvmexp changes. --- sysutils/xuvmstat/distinfo | 7 ++-- sysutils/xuvmstat/patches/patch-aa | 67 +++++++++++++++++++++++++------------- sysutils/xuvmstat/patches/patch-ab | 22 +++++++++++++ sysutils/xuvmstat/patches/patch-ac | 22 +++++++++++++ sysutils/xuvmstat/patches/patch-ad | 13 ++++++++ 5 files changed, 107 insertions(+), 24 deletions(-) create mode 100644 sysutils/xuvmstat/patches/patch-ab create mode 100644 sysutils/xuvmstat/patches/patch-ac create mode 100644 sysutils/xuvmstat/patches/patch-ad (limited to 'sysutils/xuvmstat') diff --git a/sysutils/xuvmstat/distinfo b/sysutils/xuvmstat/distinfo index a0102ae91f4..58130942080 100644 --- a/sysutils/xuvmstat/distinfo +++ b/sysutils/xuvmstat/distinfo @@ -1,6 +1,9 @@ -$NetBSD: distinfo,v 1.7 2006/06/02 09:52:31 martin Exp $ +$NetBSD: distinfo,v 1.8 2006/11/10 10:07:20 martin Exp $ SHA1 (xuvmstat20050909.tar.gz) = b8118b1b11c260683ff14fe2200e9ee584f6b7c5 RMD160 (xuvmstat20050909.tar.gz) = 6400ee7e396c410bf22ef9673b27b909f2a29a68 Size (xuvmstat20050909.tar.gz) = 7661 bytes -SHA1 (patch-aa) = bbc7cf4b0fe8b8ae1f79519ff19b4e31467bd0de +SHA1 (patch-aa) = 96cd66b0614087827aa1e8e34ddec778ad71509c +SHA1 (patch-ab) = d68a14dc0a465b1f6e6a3b422f41f677c03b20b6 +SHA1 (patch-ac) = c08d6a7034e7911edd8c7080ad5913e68c601e54 +SHA1 (patch-ad) = a5acb667b1c30afac025ef815a45b0e94f664bd9 diff --git a/sysutils/xuvmstat/patches/patch-aa b/sysutils/xuvmstat/patches/patch-aa index 76d0b40d7b5..44e63e90442 100644 --- a/sysutils/xuvmstat/patches/patch-aa +++ b/sysutils/xuvmstat/patches/patch-aa @@ -1,17 +1,24 @@ -$NetBSD: patch-aa,v 1.7 2006/06/02 09:52:31 martin Exp $ +$NetBSD: patch-aa,v 1.8 2006/11/10 10:07:20 martin Exp $ ---- xuvmstat.c.orig 2006-06-02 11:45:59.000000000 +0200 -+++ xuvmstat.c 2006-06-02 11:46:59.000000000 +0200 -@@ -46,7 +46,7 @@ void redraw __P((struct xdpy *, Window, +--- xuvmstat.c.orig 2005-09-09 15:38:48.000000000 +0200 ++++ xuvmstat.c 2006-11-10 10:52:11.000000000 +0100 +@@ -40,13 +40,13 @@ + + #include "libcdcx.h" + +-void get_uvmexp __P((struct uvmexp *)); ++void get_uvmexp __P((struct uvmexp_sysctl *)); + void redraw __P((struct xdpy *, Window, GC, int)); + u_long black, white, red, green, blue, magenta, orange, purple; XFontStruct *fnt_fixed, *fnt_8x13bold; -struct uvmexp cexp, oexp; /* current, old */ -+struct uvmexp curexp, oexp; /* current, old */ ++struct uvmexp_sysctl curexp, oexp; /* current, old */ struct timeval tv, otv; struct graph *gp_faults, *gp_traps, *gp_intrs, *gp_ctx; -@@ -100,7 +100,7 @@ char **argv; +@@ -100,7 +100,7 @@ XMapRaised(xdpy.dpy, win); XFlush(xdpy.dpy); @@ -20,7 +27,7 @@ $NetBSD: patch-aa,v 1.7 2006/06/02 09:52:31 martin Exp $ gettimeofday(&tv, NULL); get_uvmexp(&oexp); gettimeofday(&otv, NULL); -@@ -135,8 +135,8 @@ char **argv; +@@ -135,8 +135,8 @@ if (retval == 0) { timeradd(&now, &incr, &ping); otv = tv; @@ -31,7 +38,7 @@ $NetBSD: patch-aa,v 1.7 2006/06/02 09:52:31 martin Exp $ gettimeofday(&tv, NULL); /* NEW GRAPH DATA HERE */ -@@ -186,7 +186,7 @@ int was_timeout; +@@ -186,7 +186,7 @@ XSetFont(xdpy->dpy, gc, fnt_fixed->fid); snprintf(buf, sizeof(buf),"The UVM system manages %d %d-byte pages", @@ -40,7 +47,7 @@ $NetBSD: patch-aa,v 1.7 2006/06/02 09:52:31 martin Exp $ XDrawImageString(xdpy->dpy, win, gc, 5, get_fontheight(fnt_fixed) + y, buf, strlen(buf)); y += get_fontheight(fnt_fixed) + 5; -@@ -205,12 +205,12 @@ int was_timeout; +@@ -205,12 +205,12 @@ colors[4] = purple; } @@ -59,7 +66,7 @@ $NetBSD: patch-aa,v 1.7 2006/06/02 09:52:31 martin Exp $ vals, colors, white); } -@@ -229,12 +229,12 @@ int was_timeout; +@@ -229,12 +229,12 @@ colors[4] = purple; } @@ -78,7 +85,7 @@ $NetBSD: patch-aa,v 1.7 2006/06/02 09:52:31 martin Exp $ vals, colors, white); } -@@ -245,11 +245,11 @@ int was_timeout; +@@ -245,11 +245,11 @@ u_long vals[3]; u_long colors[3]; @@ -94,7 +101,7 @@ $NetBSD: patch-aa,v 1.7 2006/06/02 09:52:31 martin Exp $ vals, colors, white); } -@@ -260,10 +260,10 @@ int was_timeout; +@@ -260,10 +260,10 @@ u_long vals[2]; u_long colors[2]; @@ -108,7 +115,7 @@ $NetBSD: patch-aa,v 1.7 2006/06/02 09:52:31 martin Exp $ vals, colors, white); } -@@ -274,10 +274,10 @@ int was_timeout; +@@ -274,10 +274,10 @@ u_long vals[2]; u_long colors[2]; @@ -122,8 +129,12 @@ $NetBSD: patch-aa,v 1.7 2006/06/02 09:52:31 martin Exp $ vals, colors, white); } -@@ -292,12 +292,12 @@ int was_timeout; - static int *before[6], *after[6]; +@@ -289,15 +289,15 @@ + if (init == 0) { + static char *names[] = { "faults", "anon", "ancow", "obj", + "copy", "zero" }; +- static int *before[6], *after[6]; ++ static int64_t *before[6], *after[6]; static u_long color[6]; init = 1; - before[0] = &oexp.faults; after[0] = &cexp.faults; color[0] = black; @@ -141,8 +152,12 @@ $NetBSD: patch-aa,v 1.7 2006/06/02 09:52:31 martin Exp $ gp_faults = create_graph(6, "FAULTS", names, before, after, color, white); } -@@ -314,7 +314,7 @@ int was_timeout; - static int *before[1], *after[1]; +@@ -311,10 +311,10 @@ + + if (init == 0) { + static char *names[] = { "traps" }; +- static int *before[1], *after[1]; ++ static int64_t *before[1], *after[1]; static u_long color[1]; init = 1; - before[0] = &oexp.traps; after[0] = &cexp.traps; color[0] = black; @@ -150,8 +165,12 @@ $NetBSD: patch-aa,v 1.7 2006/06/02 09:52:31 martin Exp $ gp_traps = create_graph(1, "TRAPS", names, before, after, color, white); } -@@ -333,9 +333,9 @@ int was_timeout; - static int *before[3], *after[3]; +@@ -330,12 +330,12 @@ + + if (init == 0) { + static char *names[] = { "intrs", "soft", "syscall" }; +- static int *before[3], *after[3]; ++ static int64_t *before[3], *after[3]; static u_long color[3]; init = 1; - before[0] = &oexp.intrs; after[0] = &cexp.intrs; color[0] = black; @@ -163,8 +182,12 @@ $NetBSD: patch-aa,v 1.7 2006/06/02 09:52:31 martin Exp $ gp_intrs = create_graph(3, "INTRS", names, before, after, color, white); } -@@ -352,9 +352,9 @@ int was_timeout; - static int *before[3], *after[3]; +@@ -349,12 +349,12 @@ + + if (init == 0) { + static char *names[] = { "cswtch", "swin", "swout" }; +- static int *before[3], *after[3]; ++ static int64_t *before[3], *after[3]; static u_long color[3]; init = 1; - before[0] = &oexp.swtch; after[0] = &cexp.swtch; color[0] = black; @@ -176,7 +199,7 @@ $NetBSD: patch-aa,v 1.7 2006/06/02 09:52:31 martin Exp $ gp_ctx = create_graph(3, "SWITCH/SWAP", names, before, after, color, white); } -@@ -373,25 +373,25 @@ int was_timeout; +@@ -373,25 +373,25 @@ y += get_fontheight(fnt_fixed) + 5; snprintf(buf, sizeof(buf), " woke=%d, revs=%d, swout=%d", diff --git a/sysutils/xuvmstat/patches/patch-ab b/sysutils/xuvmstat/patches/patch-ab new file mode 100644 index 00000000000..f56cb8cae9f --- /dev/null +++ b/sysutils/xuvmstat/patches/patch-ab @@ -0,0 +1,22 @@ +$NetBSD: patch-ab,v 1.3 2006/11/10 10:07:20 martin Exp $ + +--- libcdcx.h.orig 2005-09-09 15:38:48.000000000 +0200 ++++ libcdcx.h 2006-11-10 11:01:26.000000000 +0100 +@@ -21,7 +21,7 @@ + int nlines; + char *title; + char **names; +- int **before, **after; ++ int64_t **before, **after; + u_long *colors; + u_long backcolor; + int nslot, ptr; +@@ -36,7 +36,7 @@ + + u_long create_color __P((struct xdpy *, Colormap, char *, u_long)); + XFontStruct *create_font __P((struct xdpy *, char *, char *)); +-struct graph *create_graph __P((int, char *, char **, int **, int **, u_long *, ++struct graph *create_graph __P((int, char *, char **, int64_t **, int64_t **, u_long *, + u_long)); + int draw_barbox __P((struct xdpy *, Window, GC, XFontStruct *, + int, int, int, int, int, char **, u_long *, u_long *, diff --git a/sysutils/xuvmstat/patches/patch-ac b/sysutils/xuvmstat/patches/patch-ac new file mode 100644 index 00000000000..02cd821af41 --- /dev/null +++ b/sysutils/xuvmstat/patches/patch-ac @@ -0,0 +1,22 @@ +$NetBSD: patch-ac,v 1.3 2006/11/10 10:07:20 martin Exp $ + +--- get_uvmexp.c.orig 2001-02-19 15:23:55.000000000 +0100 ++++ get_uvmexp.c 2006-11-10 10:49:30.000000000 +0100 +@@ -28,14 +28,14 @@ + + void get_uvmexp(uvmexp) + +-struct uvmexp *uvmexp; ++struct uvmexp_sysctl *uvmexp; + + { + int mib[2]; + size_t len; + mib[0] = CTL_VM; +- mib[1] = VM_UVMEXP; ++ mib[1] = VM_UVMEXP2; + len = sizeof(*uvmexp); + if (sysctl(mib, 2, uvmexp, &len, NULL, 0) < 0) +- err(1, "sysctl: CTL_VM.VM_UVMEXP"); ++ err(1, "sysctl: CTL_VM.VM_UVMEXP2"); + } diff --git a/sysutils/xuvmstat/patches/patch-ad b/sysutils/xuvmstat/patches/patch-ad new file mode 100644 index 00000000000..ab7cdb8ca9f --- /dev/null +++ b/sysutils/xuvmstat/patches/patch-ad @@ -0,0 +1,13 @@ +$NetBSD: patch-ad,v 1.1 2006/11/10 10:07:20 martin Exp $ + +--- libcdcx.c.orig 2005-09-09 15:38:48.000000000 +0200 ++++ libcdcx.c 2006-11-10 10:58:23.000000000 +0100 +@@ -285,7 +285,7 @@ + int nlines; + char *title; + char **names; +-int **before, **after; ++int64_t **before, **after; + u_long *colors; + u_long backcolor; + -- cgit v1.2.3