Re: Patches for Solaris and separate compilation



On 20 Aug 1998, David [ISO-8859-1] Kågedal wrote:

> To: gnome-list@gnome.org
> Subject: Patches for Solaris and separate compilation
> From: "David [ISO-8859-1] Kågedal" <davidk@lysator.liu.se>
> 
> Here are a set of diffs that I had to apply to the GNOME sources to
> compile on a Solaris 2.6 system, using a separate build directory.  I
> wrote a small comment to each diff.
> 
> [...]
> 
> The compiler complained about a mismatch between int and pid_t.

I think it is in lib/lib.c - correct ?

> 
> Index: libgtop/include/glibtop/mountlist.h
> ===================================================================
> RCS file: /cvs/gnome/libgtop/include/glibtop/mountlist.h,v
> retrieving revision 1.6
> diff -u -r1.6 mountlist.h
> --- mountlist.h	1998/08/10 16:57:29	1.6
> +++ mountlist.h	1998/08/20 15:28:52
> @@ -57,7 +57,7 @@
>  
>  #define glibtop_get_mountlist_r		glibtop_get_mountlist_s
>  
> -extern glibtop_mountentry *glibtop_get_mountlist_l __P((glibtop *, glibtop_mountlist *, int));
> +extern glibtop_mountentry *glibtop_get_mountlist_l __P((glibtop *, glibtop_mountlist *, pid_t));

This is wrong:

You are trying to use `pid_t' as the third argument of 
`glibtop_get_mountlist_l ()' but that's just an integer
value either 0 or 1 telling whether information about all
filesystems (including /proc and automounted ones) should
be retrieved.

But you found a real error - the declaration of
`glibtop_get_mountlist_l ()' in the (automatically generated)
`lib/libc.' is wrong - it must have an `int' as its third parameter
not a `pid_t'.

Thanks for the bug report.


> Index: libgtop/sysdeps/stub/proclist.c
> ===================================================================
> RCS file: /cvs/gnome/libgtop/sysdeps/stub/proclist.c,v
> retrieving revision 1.3
> diff -u -r1.3 proclist.c
> --- proclist.c	1998/07/13 22:31:50	1.3
> +++ proclist.c	1998/08/20 15:28:56
> @@ -32,7 +32,8 @@
>   *   each buf->size big. The total size is stored in buf->total. */
>  
>  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)

Correct.

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
------------------------------------------------------------------

PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]