diff options
author | pav <pav@FreeBSD.org> | 2004-05-18 04:39:11 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2004-05-18 04:39:11 +0800 |
commit | 41bb87a6cc09f7d30947db7a36f8b46a2b41180c (patch) | |
tree | ef91f483f25dc1e81f900b557b3067297eecb520 /sysutils | |
parent | 27df00733e36bf6c2fa09dd95c29dfbbdea6258f (diff) | |
download | freebsd-ports-gnome-41bb87a6cc09f7d30947db7a36f8b46a2b41180c.tar.gz freebsd-ports-gnome-41bb87a6cc09f7d30947db7a36f8b46a2b41180c.tar.zst freebsd-ports-gnome-41bb87a6cc09f7d30947db7a36f8b46a2b41180c.zip |
- Fixes for 64-bit platforms
PR: ports/66018
Submitted by: Andrew Belashov <bel@orel.ru>
Approved by: maintainer timeout (14 days)
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/wmmon/Makefile | 1 | ||||
-rw-r--r-- | sysutils/wmmon/files/patch-af | 76 |
2 files changed, 77 insertions, 0 deletions
diff --git a/sysutils/wmmon/Makefile b/sysutils/wmmon/Makefile index 95d935483548..1d6dbd089d00 100644 --- a/sysutils/wmmon/Makefile +++ b/sysutils/wmmon/Makefile @@ -7,6 +7,7 @@ PORTNAME= wmmon PORTVERSION= 1.0b2 +PORTREVISION= 1 CATEGORIES= sysutils windowmaker MASTER_SITES= http://linux.tucows.com/files/x11/dock/ diff --git a/sysutils/wmmon/files/patch-af b/sysutils/wmmon/files/patch-af new file mode 100644 index 000000000000..2c5c66e21430 --- /dev/null +++ b/sysutils/wmmon/files/patch-af @@ -0,0 +1,76 @@ +--- wmmon.c.orig Tue Apr 27 11:22:29 2004 ++++ wmmon.c Tue Apr 27 11:22:03 2004 +@@ -186,8 +186,8 @@ + /* functions */ + void usage(void); + void printversion(void); +-void DrawStats(int *, int, int, int, int); +-void DrawStats_io(int *, int, int, int, int); ++void DrawStats(long *, int, int, int, int); ++void DrawStats_io(long *, int, int, int, int); + + #if defined(__FreeBSD__) || defined(__NetBSD__) + int swapmode( long *retavail, long *retfree); +@@ -255,7 +255,7 @@ + typedef struct { + + char name[5]; /* "cpu0..cpuz", eventually.. :) */ +- int his[55]; ++ long his[55]; + int hisaddcnt; + long rt_stat; + long statlast; +@@ -900,7 +900,11 @@ + void get_statistics(char *devname, long *is, long *ds, long *idle) { + + int i; ++#if defined(__FreeBSD__) ++ double averun[1]; ++#else + long averun[3]; ++#endif + long cp_time[CPUSTATES]; + long maxdiskio=0; + +@@ -915,8 +919,13 @@ + if (kvm_nlist(kvmd, nl) >= 0) { + if (nl[0].n_type != 0) { + if ((kvm_read(kvmd, nl[N_CP_TIME].n_value, (char *)&cp_time, sizeof(cp_time))==sizeof(cp_time)) && ++#if defined(__FreeBSD__) ++ (kvm_getloadavg(kvmd, averun, 1)==1)) { ++ *is = (long) (100 * averun[0]); ++#else + (kvm_read(kvmd, nl[N_AVERUN].n_value, (char *)&averun, sizeof(averun))==sizeof(averun))) { + *is = (long) (100 * ((double)averun[0] / FSCALE)); ++#endif + + for (i = 0; i < CPUSTATES; i++) { + if (i != CP_IDLE) *ds += cp_time[i]; +@@ -1188,11 +1197,11 @@ + |* DrawStats *| + \*******************************************************************************/ + +-void DrawStats(int *his, int num, int size, int x_left, int y_bottom) { ++void DrawStats(long *his, int num, int size, int x_left, int y_bottom) { + + int pixels_per_byte; + int j,k; +- int *p; ++ long *p; + int d; + + /* printf ("size = %d, num = %d\n", size, num); */ +@@ -1235,11 +1244,11 @@ + |* DrawStats_io *| + \*******************************************************************************/ + +-void DrawStats_io(int *his, int num, int size, int x_left, int y_bottom) { ++void DrawStats_io(long *his, int num, int size, int x_left, int y_bottom) { + + float pixels_per_byte; + int j,k; +- int *p; ++ long *p; + int d; + + static int global_io_scale = 1; |