diff --git a/ChangeLog b/ChangeLog index 715416e7..27427760 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,36 @@ +2004-03-04 Bastien Nocera + + * configure.in: + * include/libgtop-i18n.h: + * lib/lib.pl: + * lib/read.c: + * lib/read_data.c: + * lib/write.c: + * sysdeps/names/cpu.c: + * sysdeps/names/fsusage.c: + * sysdeps/names/loadavg.c: + * sysdeps/names/mem.c: + * sysdeps/names/mountlist.c: + * sysdeps/names/msg_limits.c: + * sysdeps/names/netload.c: + * sysdeps/names/ppp.c: + * sysdeps/names/procargs.c: + * sysdeps/names/prockernel.c: + * sysdeps/names/proclist.c: + * sysdeps/names/procmap.c: + * sysdeps/names/procmem.c: + * sysdeps/names/procsegment.c: + * sysdeps/names/procsignal.c: + * sysdeps/names/procstate.c: + * sysdeps/names/proctime.c: + * sysdeps/names/procuid.c: + * sysdeps/names/sem_limits.c: + * sysdeps/names/shm_limits.c: + * sysdeps/names/swap.c: + * sysdeps/names/sysdeps.c: + * sysdeps/names/uptime.c: remove dependency on libgnome, + check for linux/isdn.h for distros using the 2.6 kernel headers + 2004-02-07 Kevin Vandersloot * configure.in: release 2.5.1 diff --git a/configure.in b/configure.in index e76b473f..6af6dc68 100644 --- a/configure.in +++ b/configure.in @@ -91,11 +91,6 @@ export cross_compiling AM_PROG_LIBTOOL -dnl Let the user enable compiler warnings -dnl GNOME_COMPILE_WARNINGS - -dnl GNOME_INIT_HOOK(gnome_found=yes) - AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = xyes) GNOME_LIBGTOP_SYSDEPS @@ -141,11 +136,17 @@ AC_SUBST(smp_examples) GLIB_REQUIRED=2.0.0 -PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED libgnome-2.0) +PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED) AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) -dnl (1.2.0,,AC_MSG_ERROR(GLIB >= 1.2.0 is required for LibGTop)) +AC_CHECK_HEADER(popt.h,[POPT=yes],[POPT=no]) +AC_MSG_CHECKING(for popt.h) +if test x$POPT = xyes ; then + AC_MSG_RESULT(yes) +else + AC_MSG_ERROR([libgtop requires the popt development libraries]) +fi dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST @@ -179,6 +180,12 @@ AC_CHECK_FUNCS(dlerror,,) LIBS="$oLIBS" AC_SUBST(DL_LIB) +dnl Linux +AC_CHECK_HEADER(linux/isdn.h,[HAVE_ISDN_H=yes],[HAVE_ISDN_H=no]) +if test x$HAVE_ISDN_H = xyes ; then + AC_DEFINE(HAVE_ISDN_H, 1, [defined if you have linux/isdn.h]) +fi + dnl AIX AH_TEMPLATE(HAVE_VMGETINFO, [Define to 1 if you have the 'vmgetinfo' function in libperfstat]) AC_CHECK_LIB(perfstat, vmgetinfo, AC_DEFINE(HAVE_VMGETINFO)) @@ -337,6 +344,16 @@ machine_incs="-I\$(top_srcdir)/sysdeps/$sysdeps_dir" AC_SUBST(machine_incs) +if test "$GCC" = "yes" ; then + CFLAGS="\ + -Wall \ + -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \ + -Wnested-externs -Wpointer-arith \ + -Wcast-align -Wsign-compare \ + -fno-strict-aliasing \ + $CFLAGS" +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 $GLIB_CFLAGS $CFLAGS $X_CFLAGS "'-DGTOPLOCALEDIR=\"$(datadir)/locale\" -DLIBGTOP_VERSION=\"'"$LIBGTOP_VERSION"'\" -DLIBGTOP_SERVER_VERSION=\"'"$LIBGTOP_SERVER_VERSION"'\" -DLIBGTOP_VERSION_CODE='$LIBGTOP_VERSION_CODE' -DLIBGTOP_SERVER=\"'"$LIBGTOP_SERVER"'\"' AC_SUBST(INCLUDES) diff --git a/examples/ChangeLog b/examples/ChangeLog index 075e4664..275d7503 100644 --- a/examples/ChangeLog +++ b/examples/ChangeLog @@ -1,3 +1,7 @@ +2004-03-04 Bastien Nocera + + * smp.c: use libgtop-i18n.h + 2003-10-21 Bastien Nocera * Makefile.am: diff --git a/examples/smp.c b/examples/smp.c index 46036c37..9d8891d8 100644 --- a/examples/smp.c +++ b/examples/smp.c @@ -29,7 +29,7 @@ #include #include -#include +#include "libgtop-i18n.h" int main (int argc, char *argv []) diff --git a/include/libgtop-i18n.h b/include/libgtop-i18n.h new file mode 100644 index 00000000..646ba31c --- /dev/null +++ b/include/libgtop-i18n.h @@ -0,0 +1,11 @@ + +#include + +#include +#define _(String) gettext (String) +#ifdef gettext_noop +# define N_(String) gettext_noop (String) +#else +# define N_(String) (String) +#endif + diff --git a/lib/lib.pl b/lib/lib.pl index 2322aeae..749bd872 100755 --- a/lib/lib.pl +++ b/lib/lib.pl @@ -27,7 +27,7 @@ print '#include '; print ''; print '#include '; print '#include '; -print '#include '; +print '#include "libgtop-i18n.h"'; print ''; print '#include '; diff --git a/lib/read.c b/lib/read.c index 33aa6104..34b83398 100644 --- a/lib/read.c +++ b/lib/read.c @@ -23,7 +23,7 @@ #include #include -#include +#include "libgtop-i18n.h" /* Reads some data from server. */ diff --git a/lib/read_data.c b/lib/read_data.c index 3a9754b1..88b215b8 100644 --- a/lib/read_data.c +++ b/lib/read_data.c @@ -24,7 +24,7 @@ #include #include -#include +#include "libgtop-i18n.h" /* Reads some data from server. */ diff --git a/lib/write.c b/lib/write.c index a33a5aac..68416f1e 100644 --- a/lib/write.c +++ b/lib/write.c @@ -24,7 +24,7 @@ #include #include -#include +#include "libgtop-i18n.h" /* Writes some data to server. */ diff --git a/src/daemon/ChangeLog b/src/daemon/ChangeLog index 161233d5..9eb1e571 100644 --- a/src/daemon/ChangeLog +++ b/src/daemon/ChangeLog @@ -1,3 +1,9 @@ +2004-03-04 Bastien Nocera + + * Makefile.am: + * gnuserv.c: link explicitely to popt and use libgtop-i18n.h + instead of libgnome + 2003-10-20 Bastien Nocera * Makefile.am: diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am index f55090ef..11c310d5 100644 --- a/src/daemon/Makefile.am +++ b/src/daemon/Makefile.am @@ -38,12 +38,13 @@ libgtop_daemon2_LDADD = $(top_builddir)/lib/libgtop-2.0.la \ $(top_builddir)/sysdeps/common/libgtop_common-2.0.la \ $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps-2.0.la \ @sysdeps_suid_lib@ \ - $(suid_sysdeps) $(suid_common)\ - $(LIBGTOP_LIBS)\ + $(suid_sysdeps) $(suid_common) \ + $(LIBGTOP_LIBS) \ + -lpopt \ @libs_xauth@ libgtop_server2_SOURCES = server.c slave.c io.c version.c daemon.h -libgtop_server2_LDADD = $(GLIB_LIBS) $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps_suid-2.0.la \ +libgtop_server2_LDADD = $(GLIB_LIBS) -lpopt $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps_suid-2.0.la \ $(top_builddir)/sysdeps/common/libgtop_suid_common-2.0.la EXTRA_DIST = server_config.h.in server_config.pl diff --git a/src/daemon/gnuserv.c b/src/daemon/gnuserv.c index ada70048..febdcd6f 100644 --- a/src/daemon/gnuserv.c +++ b/src/daemon/gnuserv.c @@ -31,7 +31,7 @@ #include -#include +#include "libgtop-i18n.h" #include #include #include diff --git a/sysdeps/linux/ChangeLog b/sysdeps/linux/ChangeLog index d69e3eb9..5be66700 100644 --- a/sysdeps/linux/ChangeLog +++ b/sysdeps/linux/ChangeLog @@ -1,3 +1,8 @@ +2004-03-04 Bastien Nocera + + * ppp.c: use a config.h define instead of copying the values in + the file (Closes: #126504) + 2004-02-02 Sebastien Bacher * sysdeps/linux/mem.c: (glibtop_get_mem_s): patch from diff --git a/sysdeps/linux/ppp.c b/sysdeps/linux/ppp.c index 49b08222..7148aaa3 100644 --- a/sysdeps/linux/ppp.c +++ b/sysdeps/linux/ppp.c @@ -33,12 +33,12 @@ #include -#ifndef ISDN_MAX_CHANNELS +#ifdef HAVE_ISDN_H +#include +#else #define ISDN_MAX_CHANNELS 64 -#endif -#ifndef IIOCGETCPS #define IIOCGETCPS _IO('I',21) -#endif +#endif /* HAVE_ISDN_H */ static const unsigned long _glibtop_sysdeps_ppp = (1L << GLIBTOP_PPP_STATE) + (1L << GLIBTOP_PPP_BYTES_IN) + diff --git a/sysdeps/names/cpu.c b/sysdeps/names/cpu.c index 6c385ce1..2ae5b452 100644 --- a/sysdeps/names/cpu.c +++ b/sysdeps/names/cpu.c @@ -22,7 +22,7 @@ */ #include -#include +#include "libgtop-i18n.h" const char *glibtop_names_cpu [GLIBTOP_MAX_CPU] = { diff --git a/sysdeps/names/fsusage.c b/sysdeps/names/fsusage.c index b679508a..10a63bc3 100644 --- a/sysdeps/names/fsusage.c +++ b/sysdeps/names/fsusage.c @@ -22,7 +22,7 @@ */ #include -#include +#include "libgtop-i18n.h" const char *glibtop_names_fsusage [GLIBTOP_MAX_FSUSAGE] = { diff --git a/sysdeps/names/loadavg.c b/sysdeps/names/loadavg.c index c954072f..ba14d81c 100644 --- a/sysdeps/names/loadavg.c +++ b/sysdeps/names/loadavg.c @@ -22,7 +22,7 @@ */ #include -#include +#include "libgtop-i18n.h" const char *glibtop_names_loadavg [GLIBTOP_MAX_LOADAVG] = { diff --git a/sysdeps/names/mem.c b/sysdeps/names/mem.c index c1aba5a2..dc20fd02 100644 --- a/sysdeps/names/mem.c +++ b/sysdeps/names/mem.c @@ -22,7 +22,7 @@ */ #include -#include +#include "libgtop-i18n.h" const char *glibtop_names_mem [GLIBTOP_MAX_MEM] = { diff --git a/sysdeps/names/mountlist.c b/sysdeps/names/mountlist.c index 67af18d6..bbf8ef32 100644 --- a/sysdeps/names/mountlist.c +++ b/sysdeps/names/mountlist.c @@ -22,7 +22,7 @@ */ #include -#include +#include "libgtop-i18n.h" const char *glibtop_names_mountlist [GLIBTOP_MAX_MOUNTLIST] = { diff --git a/sysdeps/names/msg_limits.c b/sysdeps/names/msg_limits.c index 19eb920b..786188ed 100644 --- a/sysdeps/names/msg_limits.c +++ b/sysdeps/names/msg_limits.c @@ -22,7 +22,7 @@ */ #include -#include +#include "libgtop-i18n.h" const char *glibtop_names_msg_limits [GLIBTOP_MAX_MSG_LIMITS] = { diff --git a/sysdeps/names/netinfo.c b/sysdeps/names/netinfo.c index 62cb4ae5..abaf4693 100644 --- a/sysdeps/names/netinfo.c +++ b/sysdeps/names/netinfo.c @@ -24,7 +24,7 @@ */ #include -#include +#include "libgtop-i18n.h" const char *glibtop_names_netinfo[GLIBTOP_MAX_NETINFO] = { diff --git a/sysdeps/names/netload.c b/sysdeps/names/netload.c index e7c19c68..f87d4645 100644 --- a/sysdeps/names/netload.c +++ b/sysdeps/names/netload.c @@ -22,7 +22,7 @@ */ #include -#include +#include "libgtop-i18n.h" const char *glibtop_names_netload [GLIBTOP_MAX_NETLOAD] = { diff --git a/sysdeps/names/ppp.c b/sysdeps/names/ppp.c index d37094fd..e73d3555 100644 --- a/sysdeps/names/ppp.c +++ b/sysdeps/names/ppp.c @@ -22,7 +22,7 @@ */ #include -#include +#include "libgtop-i18n.h" const char *glibtop_names_ppp [GLIBTOP_MAX_PPP] = { diff --git a/sysdeps/names/procargs.c b/sysdeps/names/procargs.c index a411d6cc..f2b27be5 100644 --- a/sysdeps/names/procargs.c +++ b/sysdeps/names/procargs.c @@ -22,7 +22,7 @@ */ #include -#include +#include "libgtop-i18n.h" const char *glibtop_names_proc_args [GLIBTOP_MAX_PROC_ARGS] = { diff --git a/sysdeps/names/proccwd.c b/sysdeps/names/proccwd.c index 992a92d0..2cb110b8 100644 --- a/sysdeps/names/proccwd.c +++ b/sysdeps/names/proccwd.c @@ -25,7 +25,7 @@ #include #include -#include +#include "libgtop-i18n.h" const char *glibtop_names_proc_cwd[GLIBTOP_MAX_PROC_CWD] = { diff --git a/sysdeps/names/prockernel.c b/sysdeps/names/prockernel.c index 1f5bc71b..c9efe51f 100644 --- a/sysdeps/names/prockernel.c +++ b/sysdeps/names/prockernel.c @@ -23,7 +23,7 @@ #include #include -#include +#include "libgtop-i18n.h" const char *glibtop_names_proc_kernel [GLIBTOP_MAX_PROC_KERNEL] = { diff --git a/sysdeps/names/proclist.c b/sysdeps/names/proclist.c index 284cb57d..687e1fb6 100644 --- a/sysdeps/names/proclist.c +++ b/sysdeps/names/proclist.c @@ -22,7 +22,7 @@ */ #include -#include +#include "libgtop-i18n.h" const char *glibtop_names_proclist [GLIBTOP_MAX_PROCLIST] = { diff --git a/sysdeps/names/procmap.c b/sysdeps/names/procmap.c index d9f54ada..e7c556be 100644 --- a/sysdeps/names/procmap.c +++ b/sysdeps/names/procmap.c @@ -22,7 +22,7 @@ */ #include -#include +#include "libgtop-i18n.h" const char *glibtop_names_proc_map [GLIBTOP_MAX_PROC_MAP] = { diff --git a/sysdeps/names/procmem.c b/sysdeps/names/procmem.c index 33543961..53c18fdd 100644 --- a/sysdeps/names/procmem.c +++ b/sysdeps/names/procmem.c @@ -23,7 +23,7 @@ #include #include -#include +#include "libgtop-i18n.h" #define GLIBTOP_PROC_MEM_SIZE 0 #define GLIBTOP_PROC_MEM_VSIZE 1 diff --git a/sysdeps/names/procsegment.c b/sysdeps/names/procsegment.c index 5524f3bf..99adadb5 100644 --- a/sysdeps/names/procsegment.c +++ b/sysdeps/names/procsegment.c @@ -23,7 +23,7 @@ #include #include -#include +#include "libgtop-i18n.h" const char *glibtop_names_proc_segment [GLIBTOP_MAX_PROC_SEGMENT] = { diff --git a/sysdeps/names/procsignal.c b/sysdeps/names/procsignal.c index bcae7427..d5c9e85e 100644 --- a/sysdeps/names/procsignal.c +++ b/sysdeps/names/procsignal.c @@ -23,7 +23,7 @@ #include #include -#include +#include "libgtop-i18n.h" const char *glibtop_names_proc_signal [GLIBTOP_MAX_PROC_SIGNAL] = { diff --git a/sysdeps/names/procstate.c b/sysdeps/names/procstate.c index ece3997e..17f02aa4 100644 --- a/sysdeps/names/procstate.c +++ b/sysdeps/names/procstate.c @@ -23,7 +23,7 @@ #include #include -#include +#include "libgtop-i18n.h" const char *glibtop_names_proc_state [GLIBTOP_MAX_PROC_STATE] = { diff --git a/sysdeps/names/proctime.c b/sysdeps/names/proctime.c index 24da61d8..2329201a 100644 --- a/sysdeps/names/proctime.c +++ b/sysdeps/names/proctime.c @@ -23,7 +23,7 @@ #include #include -#include +#include "libgtop-i18n.h" const char *glibtop_names_proc_time [GLIBTOP_MAX_PROC_TIME] = { diff --git a/sysdeps/names/procuid.c b/sysdeps/names/procuid.c index 9f8341ba..02142725 100644 --- a/sysdeps/names/procuid.c +++ b/sysdeps/names/procuid.c @@ -23,7 +23,7 @@ #include #include -#include +#include "libgtop-i18n.h" const char *glibtop_names_proc_uid [GLIBTOP_MAX_PROC_UID] = { diff --git a/sysdeps/names/sem_limits.c b/sysdeps/names/sem_limits.c index 42a6beff..26f3dc45 100644 --- a/sysdeps/names/sem_limits.c +++ b/sysdeps/names/sem_limits.c @@ -22,7 +22,7 @@ */ #include -#include +#include "libgtop-i18n.h" const char *glibtop_names_sem_limits [GLIBTOP_MAX_SEM_LIMITS] = { diff --git a/sysdeps/names/shm_limits.c b/sysdeps/names/shm_limits.c index 241ab771..ab6e4485 100644 --- a/sysdeps/names/shm_limits.c +++ b/sysdeps/names/shm_limits.c @@ -22,7 +22,7 @@ */ #include -#include +#include "libgtop-i18n.h" const char *glibtop_names_shm_limits [GLIBTOP_MAX_SHM_LIMITS] = { diff --git a/sysdeps/names/swap.c b/sysdeps/names/swap.c index 592d9022..462699fb 100644 --- a/sysdeps/names/swap.c +++ b/sysdeps/names/swap.c @@ -22,7 +22,7 @@ */ #include -#include +#include "libgtop-i18n.h" const char *glibtop_names_swap [GLIBTOP_MAX_SWAP] = { diff --git a/sysdeps/names/sysdeps.c b/sysdeps/names/sysdeps.c index 4f3ad7aa..d5b8c7ee 100644 --- a/sysdeps/names/sysdeps.c +++ b/sysdeps/names/sysdeps.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include "libgtop-i18n.h" const char *glibtop_names_sysdeps [GLIBTOP_MAX_SYSDEPS] = { diff --git a/sysdeps/names/uptime.c b/sysdeps/names/uptime.c index 93c446a9..49857b68 100644 --- a/sysdeps/names/uptime.c +++ b/sysdeps/names/uptime.c @@ -22,7 +22,7 @@ */ #include -#include +#include "libgtop-i18n.h" const char *glibtop_names_uptime [GLIBTOP_MAX_UPTIME] = {