diff --git a/ChangeLog b/ChangeLog index a1422669..dc022a52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,26 @@ -1998-08-24 Martin Baulig +1998-08-25 Martin Baulig + + * src/daemon/ChangeLog: New file. + + * sysdeps/sun4/ChangeLog: New file. + + * sysdeps/stub/ChangeLog: New file. + + * configure.in: Added check for `-lsocket'. + (LIBGTOP_INCS): Added $(SUPPORTINCS). + (INCLUDES): Added $(SUPPORTINCS). + (LIBGTOP_EXTRA_LIBS): Added $(LIBSUPPORT). + + * acconfig.h: Added `NEED_DECLARATION_GETHOSTNAME', + `NEED_DECLARATION_SETREUID', `NEED_DECLARATION_SETREGID' + and `NEED_DECLARATION_GETPAGESIZE'. + + * includue/glibtop/global.h (): Include this. + + * lib/init.c (_init_server): Declared `static'. + + * lib/read_data.c: Added cast to `const void *' in calls to + `recv' and `read' to avoid compiler warnings. * configure.in (INCLUDES): No longer using installed header files. diff --git a/acconfig.h b/acconfig.h index e8ec4702..5e54b5af 100644 --- a/acconfig.h +++ b/acconfig.h @@ -1,3 +1,18 @@ + +/* Define if gethostname () must be declared. */ +#undef NEED_DECLARATION_GETHOSTNAME + +/* Define if setreuid () must be declared. */ +#undef NEED_DECLARATION_SETREUID + +/* Define if setregid () must be declared. */ +#undef NEED_DECLARATION_SETREGID + +/* Define if getpagesize () must be declared. */ +#undef NEED_DECLARATION_GETPAGESIZE + +@TOP@ + #undef ENABLE_NLS #undef HAVE_CATGETS #undef HAVE_GETTEXT diff --git a/configure.in b/configure.in index f20c936b..3ba85b62 100644 --- a/configure.in +++ b/configure.in @@ -59,6 +59,9 @@ GNOME_LIBGTOP_TYPES GNOME_CHECK_GUILE +dnl For Solaris +AC_CHECK_LIB(socket, socket) + AC_ARG_WITH(libgtop-guile, [ --with-libgtop-guile Build the libgtop guile interface (default=yes)], [build_guile="$withval"], [build_guile=yes]) @@ -177,17 +180,20 @@ GNOME_FILEUTILS_CHECKS AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]],AC_DEFINE(GNOME_ENABLE_DEBUG),) -dnl If you want to use libgtop without gnome, uncomment the following paragraph: -dnl LIBSUPPORT= -dnl SUPPORTINCS= -dnl if test "$need_gnome_support" = yes; then -dnl LIBSUPPORT='$(top_builddir)/support/libgnomesupport.la' -dnl SUPPORTINCS='-I$(top_srcdir)/support' -dnl fi -dnl AC_SUBST(LIBSUPPORT) -dnl AC_SUBST(SUPPORTINCS) +LIBSUPPORT= +SUPPORTINCS= +if test "$need_gnome_support" = yes; then + if test "x$gnome_found" = xyes ; then + LIBSUPPORT="$GNOME_LIBDIR -lgnomesupport" + SUPPORTINCS="$GNOME_INCLUDEDIR" + else + LIBSUPPORT='$(top_builddir)/support/libgnomesupport.la' + SUPPORTINCS='-DNEED_GNOMESUPPORT_H -I$(top_builddir)/support -I$(top_srcdir)/support' + fi +fi -dnl Some ugly hack; if '-lgnomesupport' is part of $GNOME_LIBS, we include it here. +dnl Some ugly hack; if '-lgnomesupport' is part of $GNOME_LIBS, +dnl we include it here. echo "$GNOME_LIBS" | grep -q -e '-lgnomesupport' if test $? = 0 ; then LIBSUPPORT="$GNOME_LIBDIR -lgnomesupport" @@ -204,6 +210,9 @@ if test x$build_inodedb = xyes ; then LIBGTOP_INCS="$LIBGTOP_INCS -DGLIBTOP_INODEDB" fi +LIBGTOP_INCS="$LIBGTOP_INCS $SUPPORTINCS" +LIBGTOP_EXTRA_LIBS="$LIBGTOP_LIBS $LIBSUPPORT" + LIBGTOP_GUILE_LIBS="$LIBGTOP_LIBS" LIBGTOP_GUILE_INCS="$LIBGTOP_INCS" LIBGTOP_BINDIR='$(bindir)' @@ -256,7 +265,7 @@ else guile_def="" fi -INCLUDES="-D_IN_LIBGTOP -D_GNU_SOURCE -DGLIBTOP_NAMES -I\$(top_builddir) -I\$(top_srcdir) -I\$(top_srcdir)/sysdeps/$sysdeps_dir -I\$(top_srcdir)/include -I\$(top_srcdir)/intl $CFLAGS $guile_def "'-DGTOPLOCALEDIR=\"$(datadir)/locale\" -DLIBGTOP_VERSION=\"'"$LIBGTOP_VERSION"'\" -DLIBGTOP_SERVER_VERSION=\"'"$LIBGTOP_SERVER_VERSION"'\" -DLIBGTOP_SERVER=\"'"$LIBGTOP_SERVER"'\"' +INCLUDES="-D_IN_LIBGTOP -D_GNU_SOURCE -DGLIBTOP_NAMES -I\$(top_builddir) -I\$(top_srcdir) -I\$(top_srcdir)/sysdeps/$sysdeps_dir -I\$(top_srcdir)/include -I\$(top_srcdir)/intl $SUPPORTINCS -W -Wall -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith $CFLAGS $guile_def "'-DGTOPLOCALEDIR=\"$(datadir)/locale\" -DLIBGTOP_VERSION=\"'"$LIBGTOP_VERSION"'\" -DLIBGTOP_SERVER_VERSION=\"'"$LIBGTOP_SERVER_VERSION"'\" -DLIBGTOP_SERVER=\"'"$LIBGTOP_SERVER"'\"' AC_SUBST(INCLUDES) @@ -273,18 +282,6 @@ AC_SUBST(LIBGTOP_GUILE_NAMES_INCS) AC_SUBST(LIBGTOP_BINDIR) AC_SUBST(LIBGTOP_SERVER) -LIBSUPPORT= -SUPPORTINCS= -if test "$need_gnome_support" = yes; then - if test "x$gnome_found" = xyes ; then - LIBSUPPORT="$GNOME_LIBDIR -lgnomesupport" - SUPPORTINCS="$GNOME_INCLUDEDIR" - else - LIBSUPPORT='$(top_builddir)/support/libgnomesupport.la' - SUPPORTINCS='-DNEED_GNOMESUPPORT_H -I$(top_builddir)/support -I$(top_srcdir)/support' - fi -fi - if test x$libgtop_need_server = xyes ; then sysdeps_suid_lib="\$(top_builddir)/sysdeps/\$(sysdeps_dir)/libgtop_sysdeps_suid.la" server_programs='libgtop_server' diff --git a/include/glibtop/global.h b/include/glibtop/global.h index e4c1d180..dbd4ab04 100644 --- a/include/glibtop/global.h +++ b/include/glibtop/global.h @@ -62,6 +62,10 @@ # endif #endif +#ifdef NEED_GNOMESUPPORT_H +#include +#endif + #ifdef WITHOUT_GUILE #undef GLIBTOP_GUILE #undef GLIBTOP_GUILE_NAMES diff --git a/lib/init.c b/lib/init.c index c5d3b6d6..4c494717 100644 --- a/lib/init.c +++ b/lib/init.c @@ -31,7 +31,7 @@ static glibtop _glibtop_global_server; glibtop *glibtop_global_server = &_glibtop_global_server; -void +static void _init_server (glibtop *server, const unsigned features) { char *command, *temp; diff --git a/lib/read_data.c b/lib/read_data.c index f7ac86c9..713b4756 100644 --- a/lib/read_data.c +++ b/lib/read_data.c @@ -27,7 +27,7 @@ void * glibtop_read_data_l (glibtop *server) { - size_t size; + size_t size; void *ptr; int ret; @@ -38,9 +38,9 @@ glibtop_read_data_l (glibtop *server) #endif if (server->socket) { - ret = recv (server->socket, &size, sizeof (size_t), 0); + ret = recv (server->socket, (void *)&size, sizeof (size_t), 0); } else { - ret = read (server->input [0], &size, sizeof (size_t)); + ret = read (server->input [0], (void *)&size, sizeof (size_t)); } if (ret < 0)