2006-06-24 Benoît Dejean <benoit@placenet.org>
* open.c: (glibtop_get_kstats), (glibtop_open_s):
Can't get cpu_stat_kstat, didn't close kstat, this will make other
program used kstat wrong.
Patch by hua.zhang@sun.com.
Closes#345814.
2006-04-04 Julio M. Merino Vidal <jmmv@NetBSD.org>
* libgtop-sysdeps.m4:
* sysdeps/freebsd/msg_limits.c:
Use configure checks to detect whether we need to define either
KERNEL or _KERNEL to get the definition of 'struct msginfo' in a
BSD system. This replaces the previous checks in the code that
relied on __FreeBSD__ and similar macros.
Before this change, the explicit definition of _KERNEL in the
msg_limits.c file broke the build in NetBSD because it made the
system headers pull in stuff unavailable to userland.
Fixes bug #337207.
2006-04-04 Julio M. Merino Vidal <jmmv@NetBSD.org>
* libgtop-sysdeps.m4:
* sysdeps/freebsd/Makefile.am:
Check for the kvm library and use it to link the suid freebsd
sysdeps code (only if available). This library provides all the
kvm_* functions used in it and is needed, at least, under NetBSD.
Fixes bug #337247.
2006-04-04 Julio M. Merino Vidal <jmmv@NetBSD.org>
* sysdeps/freebsd/fsusage.c:
Use statvfs(2) if available instead of statfs(2). The latter was
replaced by the former and is no longer available under, e.g. NetBSD.
Fixes bug #337235.
2006-04-04 Benoît Dejean <benoit@placenet.org>
* sysinfo.c: (init_sysinfo):
Store only strings in values' values. g_strdup these strings.
Even if values is never destroyed, set key_destroy_func to NULL.
Leave description to NULL.
2006-04-04 Julio M. Merino Vidal <jmmv@NetBSD.org>
* sysdeps/freebsd/Makefile.am:
* sysdeps/freebsd/sysinfo.c:
Bring back to life (from the 1.x versions) the sysinfo.c file for
the freebsd sysdeps. The new file comes from the FreeBSD ports
repository and has some minor style changes by me. This is required
to get the glibtop_get_sysinfo_s function used by the sysdeps common
code.
Fixes bug #337251.
2006-04-04 Julio M. Merino Vidal <jmmv@NetBSD.org>
* sysdeps/aix/glibtop_server.h:
* sysdeps/freebsd/glibtop_server.h:
* sysdeps/osf1/glibtop_server.h:
* sysdeps/stub/glibtop_server.h:
* sysdeps/stub_suid/glibtop_server.h:
Synch the list of GLIBTOP_SUID_* constants with those expected by
the lib/sysdeps.c file. Fixes the build under, at least, NetBSD
and FreeBSD.
Fixes bug #337246.
2006-04-04 Julio M. Merino Vidal <jmmv@NetBSD.org>
* sysdeps/freebsd/proctime.c:
Remove obsolete and non-functional code that breaks the build under
NetBSD. It was guarded by a conditional but could not compile
anyway because it referred to an undefined variable.
Fixes bug #337234.
2005-12-12 James Henstridge <james@jamesh.id.au>
* doc/auto-macros.texi.in: remove unused file.
* doc/libgtop2.texi: don't include auto-macros.texi.
* doc/Makefile.am: don't build auto-macros.texi, since none of its
macros are used in the documentation any more.
* include/glibtop/global.h: don't include <config.h> from headers.
* .../*.c: make sure <config.h> is the first thing included.
* acinclude.m4: m4_include() libgtop-sysdeps.m4 rather than
inlining it.
* acinclude.m4, libgtop-sysdeps.m4: use third argument to
AC_DEFINE() to set the comment.
* configure.in: modernise a bit.
* acconfig.h: remove file, since it is deprecated
* autogen.sh: require automake 1.9 instead of 1.4.
* procmap.c: (glibtop_get_proc_map_s):
Small improvements.
Use g_array_sized_new instead of g_array_new with
reserved_size = 100.
Don't use g_array_append_val to avoid copying
glibtop_map_entries. Use g_array_set_size(size + 1) instead.
I've run a little python benchmark and this shows a little
speedup. I hope this would be more sensible in
gnome-system-monitor (glibtop_get_procmap is intensively used for
the 'Writable Memory' column).
* netload.c: (read_value), (linux_2_6_stats), (linux_2_0_stats),
(linux_2_4_stats), (glibtop_get_netload_s): Split implementations.
New (simpler) implementation for 2.6 (/sys is so nice ;)
toplevel configure.in but commited the whole tree. Sorry.
* glibtop_private.c:
* glibtop_private.h:
* proctime.c:
* uptime.c:
Added new function get_boot_time.
Retrieve boot_time from /proc/stat.
* loadavg.c: (glibtop_get_loadavg_s):
* uptime.c: (glibtop_get_uptime_s): Fixed behaviour when locale is not C
s/strtod/g_ascii_strod/. (strtod behaviour is locale specific, which is bad
because linux /proc is always C.