Re: Arguments in 'glibtop_get_proclist_s'
- From: Junichi Saito <j saito wanadoo fr>
- To: Martin Baulig <martin home-of-linux org>
- cc: Gnome Mailing List <gnome-list gnome org>
- Subject: Re: Arguments in 'glibtop_get_proclist_s'
- Date: Tue, 1 Sep 1998 08:10:44 +0000 (Europe/Paris)
On Tue, 1 Sep 1998, Martin Baulig wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>
>On Mon, 31 Aug 1998, Junichi Saito wrote:
>
>> I have been having a compile error with 'glibtop_get_proclist_s' in
>> libgtop/sysdeps/linux/proclist.c for a while. There seems to be a
>> confilict between the function in question and that of proclist.h.
>
>This is the correct function prototype (so the one in proclist.h is
>correct):
>
>extern unsigned *glibtop_get_proclist_s __P((glibtop *, glibtop_proclist
>*, int64_t, int64_t));
>
>> Not knowing enough what to do, I simply delete two argnuments from the
>> function in proclist.c and consequently those of the same function in a
>> generated file ( lib/lib.c ).
>
>Just do it the opposite way around: add the two missing paramters to
>'glibtop_get_proclist_s' in libgtop/sysdeps/linux/proclist.c.
>
>This is the correct fix for your problem - and I already applied it
>to CVS some time ago (revision 1.7 is current):
>
>diff -u -r1.6 -r1.7
>- --- proclist.c 1998/08/07 10:01:44 1.6
>+++ proclist.c 1998/08/12 20:16:18 1.7
>@@ -57,7 +57,8 @@
> * On error, NULL is returned and buf->flags is zero. */
>
> unsigned *
>- -glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf)
>+glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
>+ int64_t which, int64_t arg)
> {
> DIR *proc;
> struct dirent *entry;
>
>> Although the module compiles this way, I would like to know a more
>> official and elegant solution.
>
>Just apply the patch above or fetch it again from cvs.
>
>Martin
>
>- -----------------------------------------------------------------
> Martin Baulig - Angewandte Mathematik - Universitaet Trier
>
> baulig@castor.uni-trier.de, http://www.home-of-linux.org/
> Key: 1024-bit key with ID C8178435 created 1997/01/24
> ID: 67 C1 84 A0 47 F5 11 C5 5F 68 4C 84 99 05 C3 92
> Finger me for public key or fetch finger.txt from the url above
>- ------------------------------------------------------------------
>
>
>-----BEGIN PGP SIGNATURE-----
>Version: 2.6.3i
>Charset: noconv
>
>iQCVAwUBNetMVYA8K7jIF4Q1AQHV4wP9EbSxotKm84CN2u4g+1RrBq4XgB2bk4pz
>IUVDDfF4nqUafJM/IB4hlf2PZFsh9WL+piSpBQ9sgsIxWv61YF/2UWlmWm8lBnQp
>T5qKzmGfVhQL8haNuFSp1KR9DIz+yk4wLo8aalcIPs4fauEdmitrqppTlIPRAR3U
>R2uj4wZOozI=
>=fg5k
>-----END PGP SIGNATURE-----
>
Probably I don't understand well. The compiler complaints about too many
arguments at libgtop/sysdeps/linux/proclist.c and stops, because in
libgtop/include/glibtop/proclist.h the function is defined as :
extern unsigned *glibtop_get_proclist_s __P((glibtop *, glibtop_proclist
*));
while in libgtop/sysdeps/linux/proclist.c, it is defined as
unsigned *
glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,int64_t
which, int64_t arg)
I just updated libgtop tree yesterday (8/31) from anoncvs.
Another question about Linux table. There is a patch for the kernel 2.0.x,
but not for 2.1.x. Dose this mean we don't need patch 2.1.x kernels or
similar modifications are necessary also, anyway?
junichi > /dev/null 2>&1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]