Re: Libgtop compile fail
- From: Gleef <dzol virtual-yellow com>
- To: Martin Baulig <martin home-of-linux org>
- cc: gnome-list gnome org
- Subject: Re: Libgtop compile fail
- Date: Tue, 29 Dec 1998 09:33:34 -0500 (EST)
On 28 Dec 1998, Martin Baulig wrote:
[snip]
> Just update your LibGTop - it should work now.
That part works great now, thanks. Next problem:
gcc -DHAVE_CONFIG_H -I. -I. -I../.. -D_IN_LIBGTOP -D_GNU_SOURCE
-DGLIBTOP_NAMES -I../.. -I../.. -I../../sysdeps/linux -I../../include
-I../../intl -I/opt/gnome/include -DNEED_GNOMESUPPORT_H
-I/opt/gnome/lib/gnome-libs/include -I/opt/gnome/lib/glib/include
-I/usr/X11R6/include -I/opt/gnome/lib/glib/include -I/opt/gnome/include
-O6 -mpentium -g -Wall -Wno-unused -Wmissing-prototypes
-Wmissing-declarations -Wpointer-arith -I/usr/X11R6/include
-DGLIBTOP_GUILE -DGLIBTOP_GUILE_NAMES -I/usr/local/include
-DGTOPLOCALEDIR=\"/opt/gnome/share/locale\" -DLIBGTOP_VERSION=\"0.99.0\"
-DLIBGTOP_SERVER_VERSION=\"3\"
-DLIBGTOP_SERVER=\"/opt/gnome/bin/libgtop_server\" -Wall -W -O6 -mpentium
-g -Wall -Wno-unused -Wmissing-prototypes -Wmissing-declarations
-Wpointer-arith -Wp,-MD,.deps/mountlist.p -c -fPIC -DPIC mountlist.c
mountlist.c:52: macro `strstr' used without args
make[2]: *** [mountlist.lo] Error 1
make[2]: Leaving directory `/net/src/gnome/libgtop/sysdeps/common'
It looks like, since strstr is defined in string.h, earlier in the file,
it is interpreting the strstr prototype as an improperly worded instance
of the functions. It works with the following patch:
Index: sysdeps/common/mountlist.c
===================================================================
RCS file: /cvs/gnome/libgtop/sysdeps/common/mountlist.c,v
retrieving revision 1.10
diff -u -r1.10 mountlist.c
--- sysdeps/common/mountlist.c 1998/11/20 14:35:29 1.10
+++ sysdeps/common/mountlist.c 1998/12/29 14:35:54
@@ -32,6 +32,7 @@
#include <string.h>
#else
#include <strings.h>
+char *strstr ();
#endif
#include <glibtop.h>
@@ -49,7 +50,6 @@
#define xstrdup(p1) glibtop_strdup_r (NULL, p1)
#define xfree(p1) glibtop_free_r (NULL, p1)
-char *strstr ();
void error ();
#ifdef HAVE_SYS_PARAM_H
***************************************************************************
After this patch, it compiles perfectly for me. Thank you very much.
-Gleef
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]