pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/libgtop2 Fix argument passing between the lib...
details: https://anonhg.NetBSD.org/pkgsrc/rev/12049d11aef2
branches: trunk
changeset: 472811:12049d11aef2
user: jmmv <jmmv%pkgsrc.org@localhost>
date: Mon Apr 12 15:53:42 2004 +0000
description:
Fix argument passing between the library and the server as the code can't
rely on how the compiler passes parameters to functions. This hopefully
solves several problems: in concrete, one exposed by gnome-system-monitor
when selecting the "My Processes" view (as the function returing the list
takes two arguments, and the second one was beeing passed incorrectly).
Bump PKGREVISION to 1.
diffstat:
sysutils/libgtop2/Makefile | 3 +-
sysutils/libgtop2/distinfo | 3 +-
sysutils/libgtop2/patches/patch-ab | 58 ++++++++++++++++++++++++++++++++++++++
3 files changed, 62 insertions(+), 2 deletions(-)
diffs (86 lines):
diff -r 4528de029716 -r 12049d11aef2 sysutils/libgtop2/Makefile
--- a/sysutils/libgtop2/Makefile Mon Apr 12 15:33:05 2004 +0000
+++ b/sysutils/libgtop2/Makefile Mon Apr 12 15:53:42 2004 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.4 2004/04/09 03:47:39 minskim Exp $
+# $NetBSD: Makefile,v 1.5 2004/04/12 15:53:42 jmmv Exp $
DISTNAME= libgtop-2.6.0
PKGNAME= ${DISTNAME:S/-/2-/}
+PKGREVISION= 1
CATEGORIES= sysutils gnome
MASTER_SITES= ${MASTER_SITE_GNOME:=sources/libgtop/2.6/}
EXTRACT_SUFX= .tar.bz2
diff -r 4528de029716 -r 12049d11aef2 sysutils/libgtop2/distinfo
--- a/sysutils/libgtop2/distinfo Mon Apr 12 15:33:05 2004 +0000
+++ b/sysutils/libgtop2/distinfo Mon Apr 12 15:53:42 2004 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.2 2004/04/07 11:39:48 jmmv Exp $
+$NetBSD: distinfo,v 1.3 2004/04/12 15:53:42 jmmv Exp $
SHA1 (libgtop-2.6.0.tar.bz2) = e6c61a3f7d458b8afa6c9361e71bbdadeafe7e3b
Size (libgtop-2.6.0.tar.bz2) = 946822 bytes
SHA1 (patch-aa) = 5ebb407abdaedb77ed02c01adbaba70113b333b6
+SHA1 (patch-ab) = a8eebfb379887dfc338d7422a70821511b79f94e
diff -r 4528de029716 -r 12049d11aef2 sysutils/libgtop2/patches/patch-ab
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/libgtop2/patches/patch-ab Mon Apr 12 15:53:42 2004 +0000
@@ -0,0 +1,58 @@
+$NetBSD: patch-ab,v 1.1 2004/04/12 15:53:42 jmmv Exp $
+
+--- lib/lib.pl.orig 2004-03-04 15:16:46.000000000 +0100
++++ lib/lib.pl
+@@ -106,6 +106,8 @@ sub output {
+
+ if ($param_def eq 'string') {
+ $call_param = ', ' . $line_fields[5];
++ $param_buf = '';
++ $buf_set = '';
+ $param_decl = ",\n " . $space . ' const char *' .
+
+ $line_fields[5];
+@@ -127,6 +130,17 @@ sub output {
+ $list =~ s/^.*\(//;
+ $list =~ s/\)$//;
+ $count = (@fields = split(/,/, $list, 9999));
++
++ if ($count > 0) {
++ $param_buf = "\n\tstruct {\n";
++ $buf_set = '';
++ for ($field = 1; $field <= $count; $field++) {
++ $param_buf .= "\t\t$convert{$type} buf_$fields[$field];\n";
++ $buf_set .= "\tparam_buf.buf_$fields[$field] = $fields[$field];\n";
++ }
++ $param_buf .= "\t} param_buf;";
++ }
++
+ for ($field = 1; $field <= $count; $field++) {
+ if ($param_decl eq '') {
+ $param_decl = ",\n " . $space . ' ';
+@@ -139,9 +153,7 @@ sub output {
+ $fields[$field];
+ $call_param = $call_param . ', ' . $fields[$field];
+ if ($send_ptr eq '') {
+- $send_ptr = "\n\tconst void *send_ptr = &" .
+-
+- $fields[$field] . ';';
++ $send_ptr = "\n\tconst void *send_ptr = ¶m_buf;";
+ }
+ if ($send_size eq '') {
+ $send_size = "\n\tconst size_t send_size =\n\t\t";
+@@ -167,11 +179,13 @@ sub output {
+
+ $feature . ' *buf' . $param_decl . ')';
+
+- print '{' . $send_ptr . '' . $send_size;
++ print "{" . $param_buf;
++
++ print $send_ptr . '' . $send_size;
+ if ($retval !~ /^void$/) {
+ print "\t" . $retval . ' retval = (' . $retval . ') 0;';
+ }
+- print '';
++ print $buf_set;
+
+ print "\tglibtop_init_r (&server, (1 << GLIBTOP_SYSDEPS_" .
+
Home |
Main Index |
Thread Index |
Old Index