summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@src.gnome.org>2003-10-20 15:20:16 +0000
committerBastien Nocera <hadess@src.gnome.org>2003-10-20 15:20:16 +0000
commitb67e4c7f7d1a78e3e21b46955097eb33718bf461 (patch)
tree005dc92d623f76ab2c244e152770cd6db1b0a38d
parentba36a20cb81c8b3561b99a2412a9fd71b7cd8c12 (diff)
downloadlibgtop-b67e4c7f7d1a78e3e21b46955097eb33718bf461.tar.gz
- fixed compilation
-rw-r--r--ChangeLog77
-rw-r--r--backends/common/ChangeLog4
-rw-r--r--backends/common/backend-common.h1
-rw-r--r--backends/server/ChangeLog7
-rw-r--r--backends/server/backend-server.h1
-rw-r--r--backends/server/command.h.in4
-rw-r--r--backends/server/demarshal.pl1
-rw-r--r--backends/server/server.h5
-rw-r--r--backends/sysdeps/ChangeLog4
-rw-r--r--backends/sysdeps/backend-sysdeps.h1
-rw-r--r--examples/ChangeLog12
-rw-r--r--examples/first.c1
-rw-r--r--examples/mountlist.c1
-rw-r--r--examples/netload.c1
-rw-r--r--examples/procmap.c1
-rw-r--r--examples/second.c1
-rw-r--r--examples/smp.c1
-rw-r--r--examples/sysdeps.c1
-rw-r--r--examples/third.c1
-rw-r--r--examples/timings.c1
-rw-r--r--glibtop.h20
-rw-r--r--include/glibtop/close.h4
-rw-r--r--include/glibtop/command.h4
-rw-r--r--include/glibtop/cpu.h4
-rw-r--r--include/glibtop/error.h4
-rw-r--r--include/glibtop/fsusage.h4
-rw-r--r--include/glibtop/global.h63
-rw-r--r--include/glibtop/inodedb.h4
-rw-r--r--include/glibtop/loadavg.h4
-rw-r--r--include/glibtop/mem.h4
-rw-r--r--include/glibtop/mountlist.h4
-rw-r--r--include/glibtop/msg_limits.h4
-rw-r--r--include/glibtop/netload.h4
-rw-r--r--include/glibtop/open.h4
-rw-r--r--include/glibtop/parameter.h4
-rw-r--r--include/glibtop/ppp.h4
-rw-r--r--include/glibtop/procargs.h4
-rw-r--r--include/glibtop/prockernel.h4
-rw-r--r--include/glibtop/proclist.h4
-rw-r--r--include/glibtop/procmap.h4
-rw-r--r--include/glibtop/procmem.h4
-rw-r--r--include/glibtop/procsegment.h4
-rw-r--r--include/glibtop/procsignal.h4
-rw-r--r--include/glibtop/procstate.h4
-rw-r--r--include/glibtop/proctime.h4
-rw-r--r--include/glibtop/procuid.h4
-rw-r--r--include/glibtop/read.h4
-rw-r--r--include/glibtop/read_data.h4
-rw-r--r--include/glibtop/sem_limits.h4
-rw-r--r--include/glibtop/shm_limits.h4
-rw-r--r--include/glibtop/signal.h4
-rw-r--r--include/glibtop/swap.h4
-rw-r--r--include/glibtop/sysdeps.h4
-rw-r--r--include/glibtop/sysinfo.h4
-rw-r--r--include/glibtop/types.h4
-rw-r--r--include/glibtop/union.h4
-rw-r--r--include/glibtop/uptime.h4
-rw-r--r--include/glibtop/version.h4
-rw-r--r--include/glibtop/write.h4
-rw-r--r--lib/Makefile.am3
-rw-r--r--lib/command.c3
-rw-r--r--lib/init.c1
-rw-r--r--lib/inodedb.c1
-rwxr-xr-xlib/lib.pl3
-rw-r--r--lib/open.c1
-rw-r--r--lib/read.c3
-rw-r--r--lib/read_data.c6
-rw-r--r--lib/structures.pl4
-rw-r--r--lib/write.c3
-rw-r--r--src/daemon/ChangeLog6
-rw-r--r--src/daemon/Makefile.am2
-rw-r--r--src/daemon/daemon.h5
-rw-r--r--src/daemon/gnuserv.c9
-rw-r--r--sysdeps/aix/ChangeLog11
-rw-r--r--sysdeps/aix/glibtop_machine.h4
-rw-r--r--sysdeps/aix/glibtop_server.h4
-rw-r--r--sysdeps/aix/glibtop_suid.h4
-rw-r--r--sysdeps/aix/procargs.c1
-rw-r--r--sysdeps/aix/proclist.c1
-rw-r--r--sysdeps/aix/procmap.c1
-rw-r--r--sysdeps/aix/utils.c1
-rw-r--r--sysdeps/aix/utils.h4
-rw-r--r--sysdeps/common/ChangeLog5
-rw-r--r--sysdeps/common/inodedb.c1
-rw-r--r--sysdeps/common/mountlist.c107
-rw-r--r--sysdeps/freebsd/ChangeLog11
-rw-r--r--sysdeps/freebsd/glibtop_machine.h4
-rw-r--r--sysdeps/freebsd/glibtop_server.h4
-rw-r--r--sysdeps/freebsd/glibtop_suid.h4
-rw-r--r--sysdeps/freebsd/open.c1
-rw-r--r--sysdeps/freebsd/procargs.c1
-rw-r--r--sysdeps/freebsd/proclist.c1
-rw-r--r--sysdeps/freebsd/procmap.c1
-rw-r--r--sysdeps/freebsd/swap.c2
-rw-r--r--sysdeps/kernel/ChangeLog9
-rw-r--r--sysdeps/kernel/glibtop_private.h4
-rw-r--r--sysdeps/kernel/glibtop_server.h4
-rw-r--r--sysdeps/kernel/kernel.h4
-rw-r--r--sysdeps/kernel/procargs.c1
-rw-r--r--sysdeps/kernel/proclist.c1
-rw-r--r--sysdeps/kernel/procmap.c1
-rw-r--r--sysdeps/linux/ChangeLog9
-rw-r--r--sysdeps/linux/glibtop_machine.h4
-rw-r--r--sysdeps/linux/glibtop_server.h4
-rw-r--r--sysdeps/linux/ppp.c1
-rw-r--r--sysdeps/linux/procargs.c3
-rw-r--r--sysdeps/linux/proclist.c1
-rw-r--r--sysdeps/linux/procmap.c1
-rw-r--r--sysdeps/names/cpu.c1
-rw-r--r--sysdeps/names/fsusage.c1
-rw-r--r--sysdeps/names/loadavg.c1
-rw-r--r--sysdeps/names/mem.c1
-rw-r--r--sysdeps/names/mountlist.c1
-rw-r--r--sysdeps/names/msg_limits.c1
-rw-r--r--sysdeps/names/netinfo.c1
-rw-r--r--sysdeps/names/netload.c1
-rw-r--r--sysdeps/names/ppp.c1
-rw-r--r--sysdeps/names/procargs.c1
-rw-r--r--sysdeps/names/proccwd.c1
-rw-r--r--sysdeps/names/prockernel.c1
-rw-r--r--sysdeps/names/proclist.c1
-rw-r--r--sysdeps/names/procmap.c1
-rw-r--r--sysdeps/names/procmem.c1
-rw-r--r--sysdeps/names/procsegment.c1
-rw-r--r--sysdeps/names/procsignal.c1
-rw-r--r--sysdeps/names/procstate.c1
-rw-r--r--sysdeps/names/proctime.c1
-rw-r--r--sysdeps/names/procuid.c1
-rw-r--r--sysdeps/names/sem_limits.c1
-rw-r--r--sysdeps/names/shm_limits.c1
-rw-r--r--sysdeps/names/swap.c1
-rw-r--r--sysdeps/names/sysdeps.c1
-rw-r--r--sysdeps/names/uptime.c1
-rw-r--r--sysdeps/osf1/ChangeLog8
-rw-r--r--sysdeps/osf1/glibtop_machine.h4
-rw-r--r--sysdeps/osf1/glibtop_server.h4
-rw-r--r--sysdeps/osf1/glibtop_suid.h4
-rw-r--r--sysdeps/osf1/procargs.c1
-rw-r--r--sysdeps/osf1/proclist.c1
-rw-r--r--sysdeps/osf1/procmap.c1
-rw-r--r--sysdeps/solaris/ChangeLog11
-rw-r--r--sysdeps/solaris/glibtop_machine.h4
-rw-r--r--sysdeps/solaris/glibtop_private.h4
-rw-r--r--sysdeps/solaris/glibtop_server.h4
-rw-r--r--sysdeps/solaris/glibtop_suid.h4
-rw-r--r--sysdeps/solaris/procargs.c1
-rw-r--r--sysdeps/solaris/proclist.c1
-rw-r--r--sysdeps/solaris/procmap.c1
-rw-r--r--sysdeps/solaris/safeio.h4
-rw-r--r--sysdeps/stub/ChangeLog6
-rw-r--r--sysdeps/stub/glibtop_server.h4
-rw-r--r--sysdeps/stub/procargs.c1
-rw-r--r--sysdeps/stub/procmap.c1
-rw-r--r--sysdeps/stub_suid/ChangeLog9
-rw-r--r--sysdeps/stub_suid/glibtop_machine.h4
-rw-r--r--sysdeps/stub_suid/glibtop_server.h4
-rw-r--r--sysdeps/stub_suid/glibtop_suid.h4
-rw-r--r--sysdeps/stub_suid/open.c1
-rw-r--r--sysdeps/stub_suid/procargs.c1
-rw-r--r--sysdeps/stub_suid/procmap.c1
-rw-r--r--sysdeps/sun4/ChangeLog8
-rw-r--r--sysdeps/sun4/glibtop_machine.h4
-rw-r--r--sysdeps/sun4/glibtop_server.h4
-rw-r--r--sysdeps/sun4/glibtop_suid.h4
-rw-r--r--sysdeps/sun4/open.c1
-rw-r--r--sysdeps/sun4/proclist.c1
166 files changed, 434 insertions, 333 deletions
diff --git a/ChangeLog b/ChangeLog
index 797a8250..ce95e2e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,82 @@
2003-10-20 Bastien Nocera <hadess@hadess.net>
+ * glibtop.h:
+ * include/glibtop/close.h:
+ * include/glibtop/command.h:
+ * include/glibtop/cpu.h:
+ * include/glibtop/error.h:
+ * include/glibtop/fsusage.h:
+ * include/glibtop/global.h:
+ * include/glibtop/inodedb.h:
+ * include/glibtop/loadavg.h:
+ * include/glibtop/mem.h:
+ * include/glibtop/mountlist.h:
+ * include/glibtop/msg_limits.h:
+ * include/glibtop/netload.h:
+ * include/glibtop/open.h:
+ * include/glibtop/parameter.h:
+ * include/glibtop/ppp.h:
+ * include/glibtop/procargs.h:
+ * include/glibtop/prockernel.h:
+ * include/glibtop/proclist.h:
+ * include/glibtop/procmap.h:
+ * include/glibtop/procmem.h:
+ * include/glibtop/procsegment.h:
+ * include/glibtop/procsignal.h:
+ * include/glibtop/procstate.h:
+ * include/glibtop/proctime.h:
+ * include/glibtop/procuid.h:
+ * include/glibtop/read.h:
+ * include/glibtop/read_data.h:
+ * include/glibtop/sem_limits.h:
+ * include/glibtop/shm_limits.h:
+ * include/glibtop/signal.h:
+ * include/glibtop/swap.h:
+ * include/glibtop/sysdeps.h:
+ * include/glibtop/sysinfo.h:
+ * include/glibtop/types.h:
+ * include/glibtop/union.h:
+ * include/glibtop/uptime.h:
+ * include/glibtop/version.h:
+ * include/glibtop/write.h:
+ * lib/Makefile.am:
+ * lib/command.c: (glibtop_call_l):
+ * lib/init.c:
+ * lib/inodedb.c:
+ * lib/lib.pl:
+ * lib/open.c:
+ * lib/read.c:
+ * lib/read_data.c: (glibtop_read_data_l):
+ * lib/structures.pl:
+ * 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/netinfo.c:
+ * sysdeps/names/netload.c:
+ * sysdeps/names/ppp.c:
+ * sysdeps/names/procargs.c:
+ * sysdeps/names/proccwd.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: fixed compilation
+
+2003-10-20 Bastien Nocera <hadess@hadess.net>
+
* RELNOTES-0.25: removed
* RELNOTES-1.0: removed
* RELNOTES-1.0.x: removed
diff --git a/backends/common/ChangeLog b/backends/common/ChangeLog
index 9dacdd00..b613895f 100644
--- a/backends/common/ChangeLog
+++ b/backends/common/ChangeLog
@@ -1,3 +1,7 @@
+2003-10-20 Bastien Nocera <hadess@hadess.net>
+
+ * backend-common.h: fixed compilation
+
2000-11-26 Martin Baulig <martin@home-of-linux.org>
* glibtop-backend-private.h: Removed.
diff --git a/backends/common/backend-common.h b/backends/common/backend-common.h
index c47b5cf1..56b07b18 100644
--- a/backends/common/backend-common.h
+++ b/backends/common/backend-common.h
@@ -30,7 +30,6 @@
#include <glibtop/global.h>
#include <glibtop/open.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/glibtop-backend.h>
#include <glibtop/glibtop-backend-info.h>
diff --git a/backends/server/ChangeLog b/backends/server/ChangeLog
index a7b8aa24..cab2e7da 100644
--- a/backends/server/ChangeLog
+++ b/backends/server/ChangeLog
@@ -1,5 +1,12 @@
2003-10-20 Bastien Nocera <hadess@hadess.net>
+ * backend-server.h:
+ * command.h.in:
+ * demarshal.pl:
+ * server.h: fixed compilation
+
+2003-10-20 Bastien Nocera <hadess@hadess.net>
+
* backend-server.c: (_open_server):
* command.c: (glibtop_call_i):
* demarshal.pl:
diff --git a/backends/server/backend-server.h b/backends/server/backend-server.h
index 636519d1..a034349a 100644
--- a/backends/server/backend-server.h
+++ b/backends/server/backend-server.h
@@ -30,7 +30,6 @@
#include <glibtop/global.h>
#include <glibtop/open.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/glibtop-backend.h>
#include <glibtop/glibtop-backend-info.h>
diff --git a/backends/server/command.h.in b/backends/server/command.h.in
index 4be0a9d3..b58af274 100644
--- a/backends/server/command.h.in
+++ b/backends/server/command.h.in
@@ -31,7 +31,7 @@
#include <glibtop.h>
#include <glibtop/union.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
@@GLIBTOP_COMMAND_CONSTANTS@@
@@ -54,6 +54,6 @@ struct _glibtop_response
u_int64_t recv_size, data_size;
};
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/backends/server/demarshal.pl b/backends/server/demarshal.pl
index cf9e4e0b..41d1c282 100644
--- a/backends/server/demarshal.pl
+++ b/backends/server/demarshal.pl
@@ -26,7 +26,6 @@ print '';
print '#include <glibtop.h>';
print '#include <glibtop/open.h>';
-print '#include <glibtop/xmalloc.h>';
print '';
print '#include <glibtop/sysdeps.h>';
print '#include <glibtop/union.h>';
diff --git a/backends/server/server.h b/backends/server/server.h
index b6ab8d1a..605f4704 100644
--- a/backends/server/server.h
+++ b/backends/server/server.h
@@ -31,7 +31,6 @@
#include <glibtop/open.h>
#include <glibtop/union.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/parameter.h>
#include <fcntl.h>
@@ -44,7 +43,7 @@
#include "command.h"
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
/* Some don't have LOG_PERROR */
#ifndef LOG_PERROR
@@ -80,6 +79,6 @@ glibtop_send_version_i (glibtop *server, int fd);
extern int enable_debug;
extern int verbose_output;
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/backends/sysdeps/ChangeLog b/backends/sysdeps/ChangeLog
index be917a57..536ae172 100644
--- a/backends/sysdeps/ChangeLog
+++ b/backends/sysdeps/ChangeLog
@@ -1,3 +1,7 @@
+2003-10-20 Bastien Nocera <hadess@hadess.net>
+
+ * backend-sysdeps.h: fixed compilation
+
2000-11-26 Martin Baulig <martin@home-of-linux.org>
* glibtop-backend-private.h: Removed.
diff --git a/backends/sysdeps/backend-sysdeps.h b/backends/sysdeps/backend-sysdeps.h
index 65a73da8..db2bff06 100644
--- a/backends/sysdeps/backend-sysdeps.h
+++ b/backends/sysdeps/backend-sysdeps.h
@@ -30,7 +30,6 @@
#include <glibtop/global.h>
#include <glibtop/open.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/glibtop-backend.h>
#include <glibtop/glibtop-backend-info.h>
diff --git a/examples/ChangeLog b/examples/ChangeLog
index bfd088c6..7882a04f 100644
--- a/examples/ChangeLog
+++ b/examples/ChangeLog
@@ -1,5 +1,17 @@
2003-10-20 Bastien Nocera <hadess@hadess.net>
+ * first.c:
+ * mountlist.c:
+ * netload.c:
+ * procmap.c:
+ * second.c:
+ * smp.c:
+ * sysdeps.c:
+ * third.c:
+ * timings.c: fixed compilation
+
+2003-10-20 Bastien Nocera <hadess@hadess.net>
+
* Makefile.am: removed traces of guile, intllibs and libgnomesupport
2001-01-14 Abel Cheung <maddog@linux.org.hk>
diff --git a/examples/first.c b/examples/first.c
index d57513fd..d3e7de17 100644
--- a/examples/first.c
+++ b/examples/first.c
@@ -26,7 +26,6 @@
#include <glibtop.h>
#include <glibtop/open.h>
#include <glibtop/close.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/parameter.h>
diff --git a/examples/mountlist.c b/examples/mountlist.c
index bbfccf2b..f9c51dc8 100644
--- a/examples/mountlist.c
+++ b/examples/mountlist.c
@@ -26,7 +26,6 @@
#include <glibtop.h>
#include <glibtop/open.h>
#include <glibtop/close.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/parameter.h>
diff --git a/examples/netload.c b/examples/netload.c
index 5e7524f6..82c01350 100644
--- a/examples/netload.c
+++ b/examples/netload.c
@@ -26,7 +26,6 @@
#include <glibtop.h>
#include <glibtop/open.h>
#include <glibtop/close.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/parameter.h>
diff --git a/examples/procmap.c b/examples/procmap.c
index f3e0ac0f..2259ba00 100644
--- a/examples/procmap.c
+++ b/examples/procmap.c
@@ -26,7 +26,6 @@
#include <glibtop.h>
#include <glibtop/open.h>
#include <glibtop/close.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/parameter.h>
diff --git a/examples/second.c b/examples/second.c
index 15f18d80..c612be30 100644
--- a/examples/second.c
+++ b/examples/second.c
@@ -27,7 +27,6 @@
#include <glibtop.h>
#include <glibtop/open.h>
#include <glibtop/close.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/union.h>
#include <glibtop/sysdeps.h>
diff --git a/examples/smp.c b/examples/smp.c
index f55df9ed..501cde91 100644
--- a/examples/smp.c
+++ b/examples/smp.c
@@ -26,7 +26,6 @@
#include <glibtop.h>
#include <glibtop/cpu.h>
-#include <glibtop/xmalloc.h>
int
main (int argc, char *argv [])
diff --git a/examples/sysdeps.c b/examples/sysdeps.c
index 08fa15a0..a8370f17 100644
--- a/examples/sysdeps.c
+++ b/examples/sysdeps.c
@@ -26,7 +26,6 @@
#include <glibtop.h>
#include <glibtop/open.h>
#include <glibtop/close.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/parameter.h>
diff --git a/examples/third.c b/examples/third.c
index d94ab5cf..264e138a 100644
--- a/examples/third.c
+++ b/examples/third.c
@@ -27,7 +27,6 @@
#include <glibtop/open.h>
#include <glibtop/close.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/union.h>
#include <glibtop/sysdeps.h>
diff --git a/examples/timings.c b/examples/timings.c
index 4f62c41c..c5d9f99d 100644
--- a/examples/timings.c
+++ b/examples/timings.c
@@ -26,7 +26,6 @@
#include <glibtop.h>
#include <glibtop/open.h>
#include <glibtop/close.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/parameter.h>
diff --git a/glibtop.h b/glibtop.h
index 6a5727ab..53a407d8 100644
--- a/glibtop.h
+++ b/glibtop.h
@@ -84,24 +84,4 @@ glibtop_init_s (glibtop **server_ptr,
unsigned long features,
unsigned flags);
-#ifdef GLIBTOP_GUILE
-
-/* You need to link with -lgtop_guile to get this stuff here. */
-
-void glibtop_boot_guile (void);
-
-#endif
-
-#ifdef GLIBTOP_GUILE_NAMES
-
-/* You need to link with -lgtop_guile_names to get this stuff here. */
-
-void glibtop_boot_guile_names (void);
-
-#ifndef GLIBTOP_NAMES
-#define GLIBTOP_NAMES
-#endif
-
-#endif
-
#endif
diff --git a/include/glibtop/close.h b/include/glibtop/close.h
index 98bde6cd..2408aec8 100644
--- a/include/glibtop/close.h
+++ b/include/glibtop/close.h
@@ -26,13 +26,13 @@
#include <glibtop.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
void glibtop_close_r (glibtop *server);
void glibtop_close_s (glibtop *server);
void glibtop_close_p (glibtop *server);
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/command.h b/include/glibtop/command.h
index 02eced03..ca5139ff 100644
--- a/include/glibtop/command.h
+++ b/include/glibtop/command.h
@@ -28,7 +28,7 @@
#include <glibtop/sysdeps.h>
#include <glibtop/union.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_CMND_QUIT 0
#define GLIBTOP_CMND_SYSDEPS 1
@@ -97,6 +97,6 @@ void *
glibtop_call_s (glibtop *server, unsigned command, size_t send_size,
const void *send_buf, size_t recv_size, void *recv_buf);
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/cpu.h b/include/glibtop/cpu.h
index 96dd6200..799ce3db 100644
--- a/include/glibtop/cpu.h
+++ b/include/glibtop/cpu.h
@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_CPU_TOTAL 0
#define GLIBTOP_CPU_USER 1
@@ -94,6 +94,6 @@ extern const char *glibtop_descriptions_cpu [];
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/error.h b/include/glibtop/error.h
index 1434e495..2d8fa81d 100644
--- a/include/glibtop/error.h
+++ b/include/glibtop/error.h
@@ -26,7 +26,7 @@
#include <glibtop.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#ifndef G_GNUC_UNUSED
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
@@ -131,6 +131,6 @@ glibtop_warn_io (char *format, ...)
#endif /* no __GNUC__ */
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/fsusage.h b/include/glibtop/fsusage.h
index 2b90552c..e3ba7772 100644
--- a/include/glibtop/fsusage.h
+++ b/include/glibtop/fsusage.h
@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_FSUSAGE_BLOCKS 0
#define GLIBTOP_FSUSAGE_BFREE 1
@@ -67,6 +67,6 @@ extern const char *glibtop_descriptions_fsusage [];
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/global.h b/include/glibtop/global.h
index 65ff0544..0d39e0da 100644
--- a/include/glibtop/global.h
+++ b/include/glibtop/global.h
@@ -24,43 +24,14 @@
#ifndef __GLIBTOP_GLOBAL_H__
#define __GLIBTOP_GLOBAL_H__
+#include <glib.h>
+
#ifdef _IN_LIBGTOP
#include <config.h>
#endif
-/*
- * All declarations are enclosed in BEGIN_LIBGTOP_DECLS and
- * END_LIBGTOP_DECLS so that C++ compilers don't mangle their names.
- *
- */
-
-#undef BEGIN_LIBGTOP_DECLS
-#undef END_LIBGTOP_DECLS
-#ifdef __cplusplus
-# define BEGIN_LIBGTOP_DECLS extern "C" {
-# define END_LIBGTOP_DECLS }
-#else
-# define BEGIN_LIBGTOP_DECLS /* empty */
-# define END_LIBGTOP_DECLS /* empty */
-#endif
-
#ifdef _IN_LIBGTOP
-/* Provide macros to feature the GCC function attribute.
- */
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
-#define G_GNUC_NORETURN \
- __attribute__((noreturn))
-#define G_GNUC_CONST \
- __attribute__((const))
-#define G_GNUC_UNUSED \
- __attribute__((unused))
-#else /* !__GNUC__ */
-#define G_GNUC_NORETURN
-#define G_GNUC_CONST
-#define G_GNUC_UNUSED
-#endif /* !__GNUC__ */
-
#endif /* _IN_LIBGTOP */
#if TIME_WITH_SYS_TIME
@@ -74,27 +45,6 @@
# endif
#endif
-#ifdef NEED_GNOMESUPPORT_H
-#include <gnomesupport.h>
-#endif
-
-#ifdef WITHOUT_GUILE
-#undef GLIBTOP_GUILE
-#undef GLIBTOP_GUILE_NAMES
-#endif
-
-#ifdef GLIBTOP_GUILE
-#include <guile/gh.h>
-#endif
-
-#ifdef _IN_LIBGTOP
-#if (defined HAVE_LIBINTL_H) || (defined HAVE_GETTEXT)
-#include <libintl.h>
-#else
-#include <libgettext.h>
-#endif
-#endif
-
#include <stdio.h>
#include <stdlib.h>
@@ -124,18 +74,13 @@
#ifdef _IN_LIBGTOP
-BEGIN_LIBGTOP_DECLS
-
-#ifndef _
-#define _(String) dgettext (PACKAGE, String)
-#define N_(String) (String)
-#endif
+G_BEGIN_DECLS
#ifndef HAVE_STRERROR
char *strerror (int errno);
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif /* _IN_LIBGTOP */
diff --git a/include/glibtop/inodedb.h b/include/glibtop/inodedb.h
index 5dc0017d..ed0343b6 100644
--- a/include/glibtop/inodedb.h
+++ b/include/glibtop/inodedb.h
@@ -31,7 +31,7 @@
#define GLIBTOP_INODEDB_ALL 7
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
typedef struct _glibtop_inodedb glibtop_inodedb;
@@ -62,6 +62,6 @@ glibtop_inodedb_lookup_s (glibtop *server,
void
glibtop_inodedb_close_s (glibtop *server, glibtop_inodedb *inodedb);
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/loadavg.h b/include/glibtop/loadavg.h
index ddcd08e6..ed3f9f61 100644
--- a/include/glibtop/loadavg.h
+++ b/include/glibtop/loadavg.h
@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_LOADAVG_LOADAVG 0
#define GLIBTOP_LOADAVG_NR_RUNNING 1
@@ -76,6 +76,6 @@ extern const char *glibtop_descriptions_loadavg [];
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/mem.h b/include/glibtop/mem.h
index 2ae4d4b2..8fe5090a 100644
--- a/include/glibtop/mem.h
+++ b/include/glibtop/mem.h
@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_MEM_TOTAL 0
#define GLIBTOP_MEM_USED 1
@@ -84,6 +84,6 @@ extern const char *glibtop_descriptions_mem [];
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/mountlist.h b/include/glibtop/mountlist.h
index 2927b5a7..bebbd317 100644
--- a/include/glibtop/mountlist.h
+++ b/include/glibtop/mountlist.h
@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_MOUNTLIST_NUMBER 0
#define GLIBTOP_MOUNTLIST_TOTAL 1
@@ -76,6 +76,6 @@ extern const char *glibtop_descriptions_mountlist [];
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/msg_limits.h b/include/glibtop/msg_limits.h
index b9208721..9b2a2111 100644
--- a/include/glibtop/msg_limits.h
+++ b/include/glibtop/msg_limits.h
@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_IPC_MSGPOOL 0
#define GLIBTOP_IPC_MSGMAP 1
@@ -82,7 +82,7 @@ extern const char *glibtop_descriptions_msg_limits [];
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/netload.h b/include/glibtop/netload.h
index 90c09a5a..7e1548ca 100644
--- a/include/glibtop/netload.h
+++ b/include/glibtop/netload.h
@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_NETLOAD_IF_FLAGS 0
#define GLIBTOP_NETLOAD_MTU 1
@@ -115,6 +115,6 @@ extern const char *glibtop_descriptions_netload [];
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/open.h b/include/glibtop/open.h
index 6c898dc2..77cf8dd1 100644
--- a/include/glibtop/open.h
+++ b/include/glibtop/open.h
@@ -26,7 +26,7 @@
#include <glibtop/read.h>
#include <glibtop/error.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define _GLIBTOP_INIT_STATE_INIT 0x10000
#define _GLIBTOP_INIT_STATE_OPEN 0x20000
@@ -68,6 +68,6 @@ glibtop_open_s (glibtop *server, const char *program_name,
const unsigned long features, const unsigned flags);
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/parameter.h b/include/glibtop/parameter.h
index 1c09a406..d1d84255 100644
--- a/include/glibtop/parameter.h
+++ b/include/glibtop/parameter.h
@@ -25,7 +25,7 @@
#include <glibtop.h>
#include <glibtop/open.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_PARAM_METHOD 1
#define GLIBTOP_PARAM_FEATURES 2
@@ -46,6 +46,6 @@ void
glibtop_set_parameter_l (glibtop *server, const unsigned parameter,
const void *data_ptr, size_t data_size);
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/ppp.h b/include/glibtop/ppp.h
index 1a4ec64a..a9f66fff 100644
--- a/include/glibtop/ppp.h
+++ b/include/glibtop/ppp.h
@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_PPP_STATE 0
#define GLIBTOP_PPP_BYTES_IN 1
@@ -80,6 +80,6 @@ extern const char *glibtop_descriptions_ppp [];
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/procargs.h b/include/glibtop/procargs.h
index c1a6016e..ea275c48 100644
--- a/include/glibtop/procargs.h
+++ b/include/glibtop/procargs.h
@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_PROC_ARGS_SIZE 0
@@ -78,6 +78,6 @@ extern const char *glibtop_descriptions_proc_args [];
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/prockernel.h b/include/glibtop/prockernel.h
index 09d6ad31..7f9f9d4b 100644
--- a/include/glibtop/prockernel.h
+++ b/include/glibtop/prockernel.h
@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_PROC_KERNEL_K_FLAGS 0
#define GLIBTOP_PROC_KERNEL_MIN_FLT 1
@@ -93,6 +93,6 @@ extern const char *glibtop_descriptions_proc_kernel [];
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/proclist.h b/include/glibtop/proclist.h
index 00d3beed..8a53e35a 100644
--- a/include/glibtop/proclist.h
+++ b/include/glibtop/proclist.h
@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_PROCLIST_NUMBER 0
#define GLIBTOP_PROCLIST_TOTAL 1
@@ -99,6 +99,6 @@ extern const char *glibtop_descriptions_proclist [];
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/procmap.h b/include/glibtop/procmap.h
index 0846bc28..d5f0fab6 100644
--- a/include/glibtop/procmap.h
+++ b/include/glibtop/procmap.h
@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_PROC_MAP_NUMBER 0
#define GLIBTOP_PROC_MAP_TOTAL 1
@@ -105,6 +105,6 @@ extern const char *glibtop_descriptions_proc_map [];
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/procmem.h b/include/glibtop/procmem.h
index 7738c711..8adcb9fb 100644
--- a/include/glibtop/procmem.h
+++ b/include/glibtop/procmem.h
@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_PROC_MEM_SIZE 0
#define GLIBTOP_PROC_MEM_VSIZE 1
@@ -84,6 +84,6 @@ extern const char *glibtop_descriptions_proc_mem [];
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/procsegment.h b/include/glibtop/procsegment.h
index e00444be..8e7c254a 100644
--- a/include/glibtop/procsegment.h
+++ b/include/glibtop/procsegment.h
@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_PROC_SEGMENT_TEXT_RSS 0
#define GLIBTOP_PROC_SEGMENT_SHLIB_RSS 1
@@ -87,6 +87,6 @@ extern const char *glibtop_descriptions_proc_segment [];
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/procsignal.h b/include/glibtop/procsignal.h
index 4a9bd162..d7880550 100644
--- a/include/glibtop/procsignal.h
+++ b/include/glibtop/procsignal.h
@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_PROC_SIGNAL_SIGNAL 0
#define GLIBTOP_PROC_SIGNAL_BLOCKED 1
@@ -78,6 +78,6 @@ extern const char *glibtop_descriptions_proc_signal [];
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/procstate.h b/include/glibtop/procstate.h
index ae3fec18..5687b523 100644
--- a/include/glibtop/procstate.h
+++ b/include/glibtop/procstate.h
@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_PROC_STATE_CMD 0
#define GLIBTOP_PROC_STATE_STATE 1
@@ -85,6 +85,6 @@ extern const char *glibtop_descriptions_proc_state [];
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/proctime.h b/include/glibtop/proctime.h
index 236af2e4..e49c1d1f 100644
--- a/include/glibtop/proctime.h
+++ b/include/glibtop/proctime.h
@@ -28,7 +28,7 @@
#include <glibtop/cpu.h>
#include <glibtop/global.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_PROC_TIME_START_TIME 0
#define GLIBTOP_PROC_TIME_RTIME 1
@@ -99,6 +99,6 @@ extern const char *glibtop_descriptions_proc_time [];
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/procuid.h b/include/glibtop/procuid.h
index 3be378db..3c6ea123 100644
--- a/include/glibtop/procuid.h
+++ b/include/glibtop/procuid.h
@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_PROC_UID_UID 0
#define GLIBTOP_PROC_UID_EUID 1
@@ -94,6 +94,6 @@ extern const char *glibtop_descriptions_proc_uid [];
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/read.h b/include/glibtop/read.h
index e4862ba6..c7ea13ab 100644
--- a/include/glibtop/read.h
+++ b/include/glibtop/read.h
@@ -27,13 +27,13 @@
#include <glibtop.h>
#include <glibtop/error.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define glibtop_read(p1, p2) glibtop_read(glibtop_global_server, p1, p2)
void glibtop_read_l (glibtop *server, size_t size, void *buf);
void glibtop_read_s (glibtop *server, size_t size, void *buf);
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/read_data.h b/include/glibtop/read_data.h
index 07bfec05..aa1dbb5d 100644
--- a/include/glibtop/read_data.h
+++ b/include/glibtop/read_data.h
@@ -27,13 +27,13 @@
#include <glibtop.h>
#include <glibtop/error.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define glibtop_read_data() glibtop_read_data_r(glibtop_global_server)
void *glibtop_read_data_l (glibtop *server);
void *glibtop_read_data_s (glibtop *server);
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/sem_limits.h b/include/glibtop/sem_limits.h
index e9576ff7..047ac083 100644
--- a/include/glibtop/sem_limits.h
+++ b/include/glibtop/sem_limits.h
@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_IPC_SEMMAP 0
#define GLIBTOP_IPC_SEMMNI 1
@@ -88,6 +88,6 @@ extern const char *glibtop_descriptions_sem_limits [];
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/shm_limits.h b/include/glibtop/shm_limits.h
index db7db793..14499823 100644
--- a/include/glibtop/shm_limits.h
+++ b/include/glibtop/shm_limits.h
@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_IPC_SHMMAX 0
#define GLIBTOP_IPC_SHMMIN 1
@@ -78,6 +78,6 @@ extern const char *glibtop_descriptions_shm_limits [];
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/signal.h b/include/glibtop/signal.h
index f8235b40..90cfb97d 100644
--- a/include/glibtop/signal.h
+++ b/include/glibtop/signal.h
@@ -30,7 +30,7 @@
#include <sys/signal.h>
#endif
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
typedef struct _glibtop_signame glibtop_signame;
@@ -42,6 +42,6 @@ struct _glibtop_signame
extern const glibtop_signame glibtop_sys_siglist [];
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/swap.h b/include/glibtop/swap.h
index 049c2c2f..ab3c0a76 100644
--- a/include/glibtop/swap.h
+++ b/include/glibtop/swap.h
@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_SWAP_TOTAL 0
#define GLIBTOP_SWAP_USED 1
@@ -78,6 +78,6 @@ extern const char *glibtop_descriptions_swap [];
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/sysdeps.h b/include/glibtop/sysdeps.h
index 125cdf01..56f0a781 100644
--- a/include/glibtop/sysdeps.h
+++ b/include/glibtop/sysdeps.h
@@ -26,7 +26,7 @@
#include <glibtop.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_SYSDEPS_FEATURES 0
#define GLIBTOP_SYSDEPS_CPU 1
@@ -105,6 +105,6 @@ extern const char *glibtop_descriptions_sysdeps [];
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/sysinfo.h b/include/glibtop/sysinfo.h
index 4dc53605..591b7e20 100644
--- a/include/glibtop/sysinfo.h
+++ b/include/glibtop/sysinfo.h
@@ -30,7 +30,7 @@
#include <glib.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_SYSINFO_CPUINFO 0
@@ -59,6 +59,6 @@ struct _glibtop_sysinfo
glibtop_sysinfo *glibtop_get_sysinfo_s (glibtop *server);
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/types.h b/include/glibtop/types.h
index ab052b08..28cea3ff 100644
--- a/include/glibtop/types.h
+++ b/include/glibtop/types.h
@@ -24,7 +24,7 @@
#ifndef __GLIBTOP_TYPES_H__
#define __GLIBTOP_TYPES_H__
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_TYPE_LONG 1
#define GLIBTOP_TYPE_ULONG 2
@@ -33,6 +33,6 @@ BEGIN_LIBGTOP_DECLS
#define GLIBTOP_TYPE_CHAR 5
#define GLIBTOP_TYPE_STRING 6
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/union.h b/include/glibtop/union.h
index 22dfe67d..db1cc203 100644
--- a/include/glibtop/union.h
+++ b/include/glibtop/union.h
@@ -50,7 +50,7 @@
#include <glibtop/netload.h>
#include <glibtop/ppp.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
typedef union _glibtop_union glibtop_union;
@@ -80,6 +80,6 @@ union _glibtop_union
glibtop_ppp ppp;
};
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/uptime.h b/include/glibtop/uptime.h
index a487eb47..0eedf726 100644
--- a/include/glibtop/uptime.h
+++ b/include/glibtop/uptime.h
@@ -27,7 +27,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_UPTIME_UPTIME 0
#define GLIBTOP_UPTIME_IDLETIME 1
@@ -72,6 +72,6 @@ extern const char *glibtop_descriptions_uptime [];
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/version.h b/include/glibtop/version.h
index 92354833..67d9ab10 100644
--- a/include/glibtop/version.h
+++ b/include/glibtop/version.h
@@ -29,7 +29,7 @@
#define LIBGTOP_VERSION_STRING "Libgtop %s server version %s (%u,%u,%u,%u)."
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#if _IN_LIBGTOP
@@ -37,6 +37,6 @@ void glibtop_send_version (glibtop *server, int fd);
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/include/glibtop/write.h b/include/glibtop/write.h
index bff8d4e7..36d11e68 100644
--- a/include/glibtop/write.h
+++ b/include/glibtop/write.h
@@ -27,13 +27,13 @@
#include <glibtop.h>
#include <glibtop/error.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define glibtop_write(p1, p2) glibtop_write(glibtop_global_server, p1, p2)
void glibtop_write_l (glibtop *server, size_t size, void *buf);
void glibtop_write_s (glibtop *server, size_t size, void *buf);
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/lib/Makefile.am b/lib/Makefile.am
index cc1183cc..106d5836 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1,4 +1,3 @@
-LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
INCLUDES = @INCLUDES@
@@ -9,7 +8,7 @@ libgtop_2_0_la_SOURCES = init.c open.c close.c command.c read.c \
sysdeps.c
libgtop_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
-libgtop_2_0_la_LIBADD = $(top_builddir)/sysdeps/common/libgtop_common-2.0.la $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps-2.0.la $(sysdeps_suid_lib)
+libgtop_2_0_la_LIBADD = $(GLIB_LIBS) $(top_builddir)/sysdeps/common/libgtop_common-2.0.la $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps-2.0.la $(sysdeps_suid_lib)
BUILT_SOURCES = lib.c
diff --git a/lib/command.c b/lib/command.c
index 593d9df8..d95512bc 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -26,7 +26,6 @@
#include <glibtop/read_data.h>
#include <glibtop/command.h>
-#include <glibtop/xmalloc.h>
void *
glibtop_call_l (glibtop *server, unsigned command, size_t send_size,
@@ -66,7 +65,7 @@ glibtop_call_l (glibtop *server, unsigned command, size_t send_size,
recv_size);
if (response.data_size) {
- void *ptr = g_malloc (server, response.data_size);
+ void *ptr = g_malloc (response.data_size);
glibtop_read_l (server, response.data_size, ptr);
diff --git a/lib/init.c b/lib/init.c
index 07778b4b..e9e8c7f1 100644
--- a/lib/init.c
+++ b/lib/init.c
@@ -22,7 +22,6 @@
*/
#include <glibtop.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/sysdeps.h>
#include <glibtop/parameter.h>
diff --git a/lib/inodedb.c b/lib/inodedb.c
index 1920ad20..0f1f3e75 100644
--- a/lib/inodedb.c
+++ b/lib/inodedb.c
@@ -23,7 +23,6 @@
#include <glibtop.h>
#include <glibtop/error.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/inodedb.h>
#include <pwd.h>
diff --git a/lib/lib.pl b/lib/lib.pl
index c854ab9f..cf5f8b4c 100755
--- a/lib/lib.pl
+++ b/lib/lib.pl
@@ -20,11 +20,14 @@ print '/* lib.c */';
print "/* This is a generated file. Please modify `lib.pl' */";
print '';
+print '#include <config.h>';
+print '';
print '#include <glibtop.h>';
print '#include <glibtop/open.h>';
print '';
print '#include <glibtop/sysdeps.h>';
print '#include <glibtop/union.h>';
+print '#include <libgnome/gnome-i18n.h>';
print '';
print '#include <glibtop/command.h>';
diff --git a/lib/open.c b/lib/open.c
index abc5724f..24fdbfb5 100644
--- a/lib/open.c
+++ b/lib/open.c
@@ -26,7 +26,6 @@
#include <glibtop/version.h>
#include <glibtop/sysdeps.h>
#include <glibtop/command.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/gnuserv.h>
diff --git a/lib/read.c b/lib/read.c
index dd6af726..c30e640b 100644
--- a/lib/read.c
+++ b/lib/read.c
@@ -21,7 +21,10 @@
Boston, MA 02111-1307, USA.
*/
+#include <config.h>
#include <glibtop/read.h>
+#include <libgnome/gnome-i18n.h>
+
/* Reads some data from server. */
diff --git a/lib/read_data.c b/lib/read_data.c
index f04072d0..cded34eb 100644
--- a/lib/read_data.c
+++ b/lib/read_data.c
@@ -21,8 +21,10 @@
Boston, MA 02111-1307, USA.
*/
-#include <glibtop/xmalloc.h>
+#include <config.h>
+
#include <glibtop/read_data.h>
+#include <libgnome/gnome-i18n.h>
/* Reads some data from server. */
@@ -54,7 +56,7 @@ glibtop_read_data_l (glibtop *server)
if (!size) return NULL;
- ptr = g_malloc (server, size);
+ ptr = g_malloc (size);
if (server->socket) {
ret = recv (server->socket, ptr, size, 0);
diff --git a/lib/structures.pl b/lib/structures.pl
index fab039f2..976dc560 100644
--- a/lib/structures.pl
+++ b/lib/structures.pl
@@ -65,7 +65,7 @@ print qq[\#define __GLIBTOP_STRUCTURES_H__];
print '';
print qq[\#include <glibtop.h>];
print '';
-print qq[BEGIN_LIBGTOP_DECLS];
+print qq[G_BEGIN_DECLS];
print '';
for ($nr = 0; $nr < $structure_count; $nr++) {
@@ -77,7 +77,7 @@ for ($nr = 0; $nr < $structure_count; $nr++) {
print '';
printf (qq[\#define %-40s\t%d\n], 'GLIBTOP_MAX_STRUCTURES', $structure_count);
print '';
-print qq[END_LIBGTOP_DECLS];
+print qq[G_END_DECLS];
print '';
print qq[\#endif /* __GLIBTOP_STRUCTURES_H__ */];
diff --git a/lib/write.c b/lib/write.c
index 591badd2..5ee360eb 100644
--- a/lib/write.c
+++ b/lib/write.c
@@ -21,7 +21,10 @@
Boston, MA 02111-1307, USA.
*/
+#include <config.h>
+
#include <glibtop/write.h>
+#include <libgnome/gnome-i18n.h>
/* Writes some data to server. */
diff --git a/src/daemon/ChangeLog b/src/daemon/ChangeLog
index 28d499ab..161233d5 100644
--- a/src/daemon/ChangeLog
+++ b/src/daemon/ChangeLog
@@ -1,5 +1,11 @@
2003-10-20 Bastien Nocera <hadess@hadess.net>
+ * Makefile.am:
+ * daemon.h:
+ * gnuserv.c: (main): fixed compilation
+
+2003-10-20 Bastien Nocera <hadess@hadess.net>
+
* main.c: (handle_parent_connection):
* slave.c: (handle_slave_connection):
replace all the xmalloc crap by glib memory management functions
diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am
index 6ed0de74..f55090ef 100644
--- a/src/daemon/Makefile.am
+++ b/src/daemon/Makefile.am
@@ -43,7 +43,7 @@ libgtop_daemon2_LDADD = $(top_builddir)/lib/libgtop-2.0.la \
@libs_xauth@
libgtop_server2_SOURCES = server.c slave.c io.c version.c daemon.h
-libgtop_server2_LDADD = $(top_builddir)/sysdeps/@sysdeps_dir@/libgtop_sysdeps_suid-2.0.la \
+libgtop_server2_LDADD = $(GLIB_LIBS) $(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/daemon.h b/src/daemon/daemon.h
index 9539db37..e049e391 100644
--- a/src/daemon/daemon.h
+++ b/src/daemon/daemon.h
@@ -30,7 +30,6 @@
#include <glibtop/open.h>
#include <glibtop/union.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/version.h>
#include <glibtop/command.h>
#include <glibtop/parameter.h>
@@ -40,7 +39,7 @@
#include <sys/socket.h>
#include <syslog.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
/* Some don't have LOG_PERROR */
#ifndef LOG_PERROR
@@ -76,6 +75,6 @@ void syslog_io_message (int priority, char *format, ...);
extern int enable_debug;
extern int verbose_output;
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/src/daemon/gnuserv.c b/src/daemon/gnuserv.c
index d9db4c5d..ada70048 100644
--- a/src/daemon/gnuserv.c
+++ b/src/daemon/gnuserv.c
@@ -29,11 +29,14 @@
* ../etc/gnuserv.README relative to the directory containing this file)
*/
+#include <config.h>
+
+#include <libgnome/gnome-i18n.h>
#include <glibtop.h>
#include <glibtop/open.h>
#include <glibtop/close.h>
#include <glibtop/command.h>
-#include <glibtop/xmalloc.h>
+
#include <glibtop/parameter.h>
@@ -461,7 +464,7 @@ const struct poptOption popt_options [] = {
};
int
-main (int argc, char *argv [])
+main (int argc, const char **argv)
{
const unsigned method = GLIBTOP_METHOD_PIPE;
const unsigned long features = GLIBTOP_SYSDEPS_ALL;
@@ -475,7 +478,7 @@ main (int argc, char *argv [])
if (!program_invocation_name) {
char *arg;
- program_invocation_name = argv[0];
+ program_invocation_name = (char *) argv[0];
arg = strrchr (argv[0], '/');
program_invocation_short_name =
arg ? (arg + 1) : program_invocation_name;
diff --git a/sysdeps/aix/ChangeLog b/sysdeps/aix/ChangeLog
index 03f85ca0..7db7af16 100644
--- a/sysdeps/aix/ChangeLog
+++ b/sysdeps/aix/ChangeLog
@@ -1,5 +1,16 @@
2003-10-20 Bastien Nocera <hadess@hadess.net>
+ * glibtop_machine.h:
+ * glibtop_server.h:
+ * glibtop_suid.h:
+ * procargs.c:
+ * proclist.c:
+ * procmap.c:
+ * utils.c:
+ * utils.h: fixed compilation
+
+2003-10-20 Bastien Nocera <hadess@hadess.net>
+
* procargs.c: (glibtop_get_proc_args_s):
* proclist.c: (glibtop_get_proclist_s):
replace all the xmalloc crap by glib memory management functions
diff --git a/sysdeps/aix/glibtop_machine.h b/sysdeps/aix/glibtop_machine.h
index 508d6c21..8b4ebf5e 100644
--- a/sysdeps/aix/glibtop_machine.h
+++ b/sysdeps/aix/glibtop_machine.h
@@ -26,7 +26,7 @@
#include <procinfo.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
typedef struct _glibtop_machine glibtop_machine;
@@ -48,6 +48,6 @@ struct _glibtop_machine
struct procsinfo last_pinfo;
};
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif /* __GLIBTOP_MACHINE_H__ */
diff --git a/sysdeps/aix/glibtop_server.h b/sysdeps/aix/glibtop_server.h
index ca57af36..ab16cc5d 100644
--- a/sysdeps/aix/glibtop_server.h
+++ b/sysdeps/aix/glibtop_server.h
@@ -24,7 +24,7 @@
#ifndef __GLIBTOP_SERVER_H__
#define __GLIBTOP_SERVER_H__
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_SUID_CPU (1 << GLIBTOP_SYSDEPS_CPU)
#define GLIBTOP_SUID_MEM 0
@@ -47,6 +47,6 @@ BEGIN_LIBGTOP_DECLS
#define GLIBTOP_SUID_NETLOAD (1 << GLIBTOP_SYSDEPS_NETLOAD)
#define GLIBTOP_SUID_PPP 0
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/sysdeps/aix/glibtop_suid.h b/sysdeps/aix/glibtop_suid.h
index 0d971143..bc47b020 100644
--- a/sysdeps/aix/glibtop_suid.h
+++ b/sysdeps/aix/glibtop_suid.h
@@ -24,7 +24,7 @@
#ifndef __GLIBTOP_SUID_H__
#define __GLIBTOP_SUID_H__
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#if _IN_LIBGTOP
#include <sys/param.h>
@@ -47,6 +47,6 @@ glibtop_open_p (glibtop *server, const char *program_name,
const unsigned long features,
const unsigned flags);
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/sysdeps/aix/procargs.c b/sysdeps/aix/procargs.c
index af55e1cb..856b7f6d 100644
--- a/sysdeps/aix/procargs.c
+++ b/sysdeps/aix/procargs.c
@@ -25,7 +25,6 @@
#include <glibtop.h>
#include <glibtop/error.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/procargs.h>
#include "utils.h"
diff --git a/sysdeps/aix/proclist.c b/sysdeps/aix/proclist.c
index 3cf11d96..a5746996 100644
--- a/sysdeps/aix/proclist.c
+++ b/sysdeps/aix/proclist.c
@@ -24,7 +24,6 @@
#include <procinfo.h>
#include <glibtop.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/proclist.h>
static const unsigned long _glibtop_sysdeps_proclist =
diff --git a/sysdeps/aix/procmap.c b/sysdeps/aix/procmap.c
index 2ed372aa..5076ee07 100644
--- a/sysdeps/aix/procmap.c
+++ b/sysdeps/aix/procmap.c
@@ -24,7 +24,6 @@
#include <glibtop.h>
#include <glibtop/error.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/procmap.h>
static const unsigned long _glibtop_sysdeps_proc_map = 0;
diff --git a/sysdeps/aix/utils.c b/sysdeps/aix/utils.c
index e230eb77..b0108418 100644
--- a/sysdeps/aix/utils.c
+++ b/sysdeps/aix/utils.c
@@ -29,7 +29,6 @@
#include <glibtop.h>
#include <glibtop/error.h>
-#include <glibtop/xmalloc.h>
#include "glibtop_suid.h"
#include "utils.h"
diff --git a/sysdeps/aix/utils.h b/sysdeps/aix/utils.h
index f845f61a..b41796cc 100644
--- a/sysdeps/aix/utils.h
+++ b/sysdeps/aix/utils.h
@@ -24,7 +24,7 @@
#ifndef __UTILS_H__
#define __UTILS_H__
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
extern off_t
_glibtop_get_kmem_offset(glibtop* server, char* kname);
@@ -40,6 +40,6 @@ extern int
_glibtop_vmgetinfo (void *out, int command, int arg);
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif /* __UTILS_H__ */
diff --git a/sysdeps/common/ChangeLog b/sysdeps/common/ChangeLog
index aa795abd..55120143 100644
--- a/sysdeps/common/ChangeLog
+++ b/sysdeps/common/ChangeLog
@@ -1,5 +1,10 @@
2003-10-20 Bastien Nocera <hadess@hadess.net>
+ * inodedb.c:
+ * mountlist.c: (glibtop_get_mountlist_s): fixed compilation
+
+2003-10-20 Bastien Nocera <hadess@hadess.net>
+
* Makefile.am:
* inodedb.c: (glibtop_inodedb_open_s), (glibtop_inodedb_close_s):
* mountlist.c: (glibtop_get_mountlist_s):
diff --git a/sysdeps/common/inodedb.c b/sysdeps/common/inodedb.c
index df5777d6..348cd4ff 100644
--- a/sysdeps/common/inodedb.c
+++ b/sysdeps/common/inodedb.c
@@ -23,7 +23,6 @@
#include <glibtop.h>
#include <glibtop/error.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/inodedb.h>
#include <pwd.h>
diff --git a/sysdeps/common/mountlist.c b/sysdeps/common/mountlist.c
index ce8f3dea..d35914a7 100644
--- a/sysdeps/common/mountlist.c
+++ b/sysdeps/common/mountlist.c
@@ -19,6 +19,7 @@
#include <config.h>
#endif
+#include <glib.h>
#include <stdio.h>
#include <sys/types.h>
#include "mountlist.h"
@@ -35,20 +36,10 @@ void free ();
#endif
#include <glibtop.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/mountlist.h>
static struct mount_entry *read_filesystem_list (int need_fs_type, int all_fs);
-#undef xmalloc
-#undef xrealloc
-#undef xstrdup
-
-#define xmalloc(p1) g_malloc (NULL, p1)
-#define xrealloc(p1,p2) g_realloc (p1, p2)
-#define xstrdup(p1) g_strdup (NULL, p1)
-#define xfree(p1) g_free (NULL, p1)
-
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
@@ -264,7 +255,7 @@ read_filesystem_list (need_fs_type, all_fs)
struct mount_entry *mtail;
/* Start the list off with a dummy entry. */
- me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
+ me = (struct mount_entry *) g_malloc (sizeof (struct mount_entry));
me->me_next = NULL;
mount_list = mtail = me;
@@ -284,10 +275,10 @@ read_filesystem_list (need_fs_type, all_fs)
p = mntlist;
while(p){
mnt = p->ment;
- me = (struct mount_entry*) xmalloc(sizeof (struct mount_entry));
- me->me_devname = xstrdup(mnt->mnt_fsname);
- me->me_mountdir = xstrdup(mnt->mnt_dir);
- me->me_type = xstrdup(mnt->mnt_type);
+ me = (struct mount_entry*) g_malloc(sizeof (struct mount_entry));
+ me->me_devname = g_strdup(mnt->mnt_fsname);
+ me->me_mountdir = g_strdup(mnt->mnt_dir);
+ me->me_type = g_strdup(mnt->mnt_type);
me->me_dev = -1;
me->me_next = NULL;
mtail->me_next = me;
@@ -315,10 +306,10 @@ read_filesystem_list (need_fs_type, all_fs)
|| !strcmp (mnt->mnt_type, "auto")))
continue;
- me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
- me->me_devname = xstrdup (mnt->mnt_fsname);
- me->me_mountdir = xstrdup (mnt->mnt_dir);
- me->me_type = xstrdup (mnt->mnt_type);
+ me = (struct mount_entry *) g_malloc (sizeof (struct mount_entry));
+ me->me_devname = g_strdup (mnt->mnt_fsname);
+ me->me_mountdir = g_strdup (mnt->mnt_dir);
+ me->me_type = g_strdup (mnt->mnt_type);
devopt = strstr (mnt->mnt_opts, "dev=");
if (devopt)
{
@@ -351,13 +342,13 @@ read_filesystem_list (need_fs_type, all_fs)
return NULL;
while (entries-- > 0)
{
- me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
- me->me_devname = xstrdup (fsp->f_mntfromname);
- me->me_mountdir = xstrdup (fsp->f_mntonname);
+ me = (struct mount_entry *) g_malloc (sizeof (struct mount_entry));
+ me->me_devname = g_strdup (fsp->f_mntfromname);
+ me->me_mountdir = g_strdup (fsp->f_mntonname);
#if defined(__NetBSD__) || defined(__OpenBSD__)
- me->me_type = xstrdup (fsp->f_fstypename);
+ me->me_type = g_strdup (fsp->f_fstypename);
#else
- me->me_type = xstrdup (fstype_to_string (fsp->f_type));
+ me->me_type = g_strdup (fstype_to_string (fsp->f_type));
#endif
me->me_dev = (dev_t) -1; /* Magic; means not known yet. */
me->me_next = NULL;
@@ -379,10 +370,10 @@ read_filesystem_list (need_fs_type, all_fs)
while ((val = getmnt (&offset, &fsd, sizeof (fsd), NOSTAT_MANY,
(char *) 0)) > 0)
{
- me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
- me->me_devname = xstrdup (fsd.fd_req.devname);
- me->me_mountdir = xstrdup (fsd.fd_req.path);
- me->me_type = xstrdup (gt_names[fsd.fd_req.fstype]);
+ me = (struct mount_entry *) g_malloc (sizeof (struct mount_entry));
+ me->me_devname = g_strdup (fsd.fd_req.devname);
+ me->me_mountdir = g_strdup (fsd.fd_req.path);
+ me->me_type = g_strdup (gt_names[fsd.fd_req.fstype]);
me->me_dev = fsd.fd_req.dev;
me->me_next = NULL;
@@ -405,7 +396,7 @@ read_filesystem_list (need_fs_type, all_fs)
return (NULL);
bufsize = (1 + numsys) * sizeof (struct statfs);
- stats = (struct statfs *)xmalloc (bufsize);
+ stats = (struct statfs *) g_malloc (bufsize);
numsys = getfsstat (stats, bufsize, MNT_WAIT);
if (numsys < 0)
@@ -416,10 +407,10 @@ read_filesystem_list (need_fs_type, all_fs)
for (counter = 0; counter < numsys; counter++)
{
- me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
- me->me_devname = xstrdup (stats[counter].f_mntfromname);
- me->me_mountdir = xstrdup (stats[counter].f_mntonname);
- me->me_type = xstrdup (mnt_names[stats[counter].f_type]);
+ me = (struct mount_entry *) g_malloc (sizeof (struct mount_entry));
+ me->me_devname = g_strdup (stats[counter].f_mntfromname);
+ me->me_mountdir = g_strdup (stats[counter].f_mntonname);
+ me->me_type = g_strdup (mnt_names[stats[counter].f_type]);
me->me_dev = (dev_t) -1; /* Magic; means not known yet. */
me->me_next = NULL;
@@ -444,17 +435,17 @@ read_filesystem_list (need_fs_type, all_fs)
while (fread (&mnt, sizeof mnt, 1, fp) > 0)
{
- me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
+ me = (struct mount_entry *) g_malloc (sizeof (struct mount_entry));
#ifdef GETFSTYP /* SVR3. */
- me->me_devname = xstrdup (mnt.mt_dev);
+ me->me_devname = g_strdup (mnt.mt_dev);
#else
- me->me_devname = xmalloc (strlen (mnt.mt_dev) + 6);
+ me->me_devname = g_malloc (strlen (mnt.mt_dev) + 6);
strcpy (me->me_devname, "/dev/");
strcpy (me->me_devname + 5, mnt.mt_dev);
#endif
- me->me_mountdir = xstrdup (mnt.mt_filsys);
+ me->me_mountdir = g_strdup (mnt.mt_filsys);
me->me_dev = (dev_t) -1; /* Magic; means not known yet. */
- me->me_type = xstrdup ("");
+ me->me_type = g_strdup ("");
#ifdef GETFSTYP /* SVR3. */
if (need_fs_type)
{
@@ -463,7 +454,7 @@ read_filesystem_list (need_fs_type, all_fs)
if (statfs (me->me_mountdir, &fsd, sizeof fsd, 0) != -1
&& sysfs (GETFSTYP, fsd.f_fstyp, typebuf) != -1)
- me->me_type = xstrdup (typebuf);
+ me->me_type = g_strdup (typebuf);
}
#endif
me->me_next = NULL;
@@ -483,10 +474,10 @@ read_filesystem_list (need_fs_type, all_fs)
struct mntent **mnttbl=getmnttbl(),**ent;
for (ent=mnttbl;*ent;ent++)
{
- me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
- me->me_devname = xstrdup ( (*ent)->mt_resource);
- me->me_mountdir = xstrdup( (*ent)->mt_directory);
- me->me_type = xstrdup ((*ent)->mt_fstype);
+ me = (struct mount_entry *) g_malloc (sizeof (struct mount_entry));
+ me->me_devname = g_strdup ( (*ent)->mt_resource);
+ me->me_mountdir = g_strdup( (*ent)->mt_directory);
+ me->me_type = g_strdup ((*ent)->mt_fstype);
me->me_dev = (dev_t) -1; /* Magic; means not known yet. */
me->me_next = NULL;
@@ -511,10 +502,10 @@ read_filesystem_list (need_fs_type, all_fs)
while ((ret = getmntent (fp, &mnt)) == 0)
{
- me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
- me->me_devname = xstrdup (mnt.mnt_special);
- me->me_mountdir = xstrdup (mnt.mnt_mountp);
- me->me_type = xstrdup (mnt.mnt_fstype);
+ me = (struct mount_entry *) g_malloc (sizeof (struct mount_entry));
+ me->me_devname = g_strdup (mnt.mnt_special);
+ me->me_mountdir = g_strdup (mnt.mnt_mountp);
+ me->me_type = g_strdup (mnt.mnt_fstype);
me->me_dev = (dev_t) -1; /* Magic; means not known yet. */
me->me_next = NULL;
@@ -538,7 +529,7 @@ read_filesystem_list (need_fs_type, all_fs)
/* Ask how many bytes to allocate for the mounted filesystem info. */
mntctl (MCTL_QUERY, sizeof bufsize, (struct vmount *) &bufsize);
- entries = xmalloc (bufsize);
+ entries = g_malloc (bufsize);
/* Get the list of mounted filesystems. */
mntctl (MCTL_QUERY, bufsize, (struct vmount *) entries);
@@ -547,7 +538,7 @@ read_filesystem_list (need_fs_type, all_fs)
thisent += vmp->vmt_length)
{
vmp = (struct vmount *) thisent;
- me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
+ me = (struct mount_entry *) g_malloc (sizeof (struct mount_entry));
if (vmp->vmt_flags & MNT_REMOTE)
{
char *host, *path;
@@ -555,18 +546,18 @@ read_filesystem_list (need_fs_type, all_fs)
/* Prepend the remote pathname. */
host = thisent + vmp->vmt_data[VMT_HOSTNAME].vmt_off;
path = thisent + vmp->vmt_data[VMT_OBJECT].vmt_off;
- me->me_devname = xmalloc (strlen (host) + strlen (path) + 2);
+ me->me_devname = g_malloc (strlen (host) + strlen (path) + 2);
strcpy (me->me_devname, host);
strcat (me->me_devname, ":");
strcat (me->me_devname, path);
}
else
{
- me->me_devname = xstrdup (thisent +
+ me->me_devname = g_strdup (thisent +
vmp->vmt_data[VMT_OBJECT].vmt_off);
}
- me->me_mountdir = xstrdup (thisent + vmp->vmt_data[VMT_STUB].vmt_off);
- me->me_type = xstrdup (fstype_to_string (vmp->vmt_gfstype));
+ me->me_mountdir = g_strdup (thisent + vmp->vmt_data[VMT_STUB].vmt_off);
+ me->me_type = g_strdup (fstype_to_string (vmp->vmt_gfstype));
me->me_dev = (dev_t) -1; /* vmt_fsid might be the info we want. */
me->me_next = NULL;
@@ -613,7 +604,7 @@ glibtop_get_mountlist_s (glibtop *server, glibtop_mountlist *buf, int all_fs)
buf->total = buf->number * buf->size;
- mount_list = g_malloc (server, buf->total);
+ mount_list = g_malloc (buf->total);
/* Write data into mount_list. */
@@ -634,10 +625,10 @@ glibtop_get_mountlist_s (glibtop *server, glibtop_mountlist *buf, int all_fs)
for (count = 0, tmp = me; tmp; count++, tmp = next) {
next = tmp->me_next;
- xfree (tmp->me_devname);
- xfree (tmp->me_mountdir);
- xfree (tmp->me_type);
- xfree (tmp);
+ g_free (tmp->me_devname);
+ g_free (tmp->me_mountdir);
+ g_free (tmp->me_type);
+ g_free (tmp);
}
return mount_list;
diff --git a/sysdeps/freebsd/ChangeLog b/sysdeps/freebsd/ChangeLog
index 16ca55c3..ee1abfb6 100644
--- a/sysdeps/freebsd/ChangeLog
+++ b/sysdeps/freebsd/ChangeLog
@@ -1,5 +1,16 @@
2003-10-20 Bastien Nocera <hadess@hadess.net>
+ * glibtop_machine.h:
+ * glibtop_server.h:
+ * glibtop_suid.h:
+ * open.c:
+ * procargs.c:
+ * proclist.c:
+ * procmap.c:
+ * swap.c: fixed compilation
+
+2003-10-20 Bastien Nocera <hadess@hadess.net>
+
* procargs.c: (glibtop_get_proc_args_p):
* proclist.c: (glibtop_get_proclist_p):
* procmap.c: (glibtop_get_proc_map_p):
diff --git a/sysdeps/freebsd/glibtop_machine.h b/sysdeps/freebsd/glibtop_machine.h
index 192c3b7f..d7922681 100644
--- a/sysdeps/freebsd/glibtop_machine.h
+++ b/sysdeps/freebsd/glibtop_machine.h
@@ -39,7 +39,7 @@
#include <osreldate.h>
#endif
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
typedef struct _glibtop_machine glibtop_machine;
@@ -54,6 +54,6 @@ struct _glibtop_machine
kvm_t *kd;
};
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif /* __GLIBTOP_MACHINE_H__ */
diff --git a/sysdeps/freebsd/glibtop_server.h b/sysdeps/freebsd/glibtop_server.h
index ccf3d29d..8bfa4a6c 100644
--- a/sysdeps/freebsd/glibtop_server.h
+++ b/sysdeps/freebsd/glibtop_server.h
@@ -24,7 +24,7 @@
#ifndef __GLIBTOP_SERVER_H__
#define __GLIBTOP_SERVER_H__
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_SUID_CPU (1 << GLIBTOP_SYSDEPS_CPU)
#define GLIBTOP_SUID_MEM (1 << GLIBTOP_SYSDEPS_MEM)
@@ -47,6 +47,6 @@ BEGIN_LIBGTOP_DECLS
#define GLIBTOP_SUID_NETLOAD (1 << GLIBTOP_SYSDEPS_NETLOAD)
#define GLIBTOP_SUID_PPP (1 << GLIBTOP_SYSDEPS_PPP)
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/sysdeps/freebsd/glibtop_suid.h b/sysdeps/freebsd/glibtop_suid.h
index 18ad4b76..829cc51c 100644
--- a/sysdeps/freebsd/glibtop_suid.h
+++ b/sysdeps/freebsd/glibtop_suid.h
@@ -24,7 +24,7 @@
#ifndef __GLIBTOP_SUID_H__
#define __GLIBTOP_SUID_H__
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#if _IN_LIBGTOP
#include <sys/param.h>
@@ -53,6 +53,6 @@ glibtop_open_p (glibtop *server, const char *program_name,
const unsigned long features,
const unsigned flags);
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/sysdeps/freebsd/open.c b/sysdeps/freebsd/open.c
index ea95d16f..3689c159 100644
--- a/sysdeps/freebsd/open.c
+++ b/sysdeps/freebsd/open.c
@@ -23,7 +23,6 @@
#include <glibtop.h>
#include <glibtop/open.h>
-#include <glibtop/xmalloc.h>
/* !!! THIS FUNCTION RUNS SUID ROOT - CHANGE WITH CAUTION !!! */
diff --git a/sysdeps/freebsd/procargs.c b/sysdeps/freebsd/procargs.c
index 8e0ff2e7..77bfc87f 100644
--- a/sysdeps/freebsd/procargs.c
+++ b/sysdeps/freebsd/procargs.c
@@ -23,7 +23,6 @@
#include <glibtop.h>
#include <glibtop/error.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/procargs.h>
#include <glibtop_suid.h>
diff --git a/sysdeps/freebsd/proclist.c b/sysdeps/freebsd/proclist.c
index 789e6937..692c9bc6 100644
--- a/sysdeps/freebsd/proclist.c
+++ b/sysdeps/freebsd/proclist.c
@@ -23,7 +23,6 @@
#include <glibtop.h>
#include <glibtop/error.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/proclist.h>
#include <glibtop_suid.h>
diff --git a/sysdeps/freebsd/procmap.c b/sysdeps/freebsd/procmap.c
index cf32421d..f769b608 100644
--- a/sysdeps/freebsd/procmap.c
+++ b/sysdeps/freebsd/procmap.c
@@ -23,7 +23,6 @@
#include <glibtop.h>
#include <glibtop/error.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/procmap.h>
#include <glibtop_suid.h>
diff --git a/sysdeps/freebsd/swap.c b/sysdeps/freebsd/swap.c
index b28d74b1..43305976 100644
--- a/sysdeps/freebsd/swap.c
+++ b/sysdeps/freebsd/swap.c
@@ -25,8 +25,6 @@
#include <glibtop/error.h>
#include <glibtop/swap.h>
-#include <glibtop/xmalloc.h>
-
#include <glibtop_suid.h>
static const unsigned long _glibtop_sysdeps_swap =
diff --git a/sysdeps/kernel/ChangeLog b/sysdeps/kernel/ChangeLog
index f9b5a978..ede77326 100644
--- a/sysdeps/kernel/ChangeLog
+++ b/sysdeps/kernel/ChangeLog
@@ -1,5 +1,14 @@
2003-10-20 Bastien Nocera <hadess@hadess.net>
+ * glibtop_private.h:
+ * glibtop_server.h:
+ * kernel.h:
+ * procargs.c:
+ * proclist.c:
+ * procmap.c: fixed compilation
+
+2003-10-20 Bastien Nocera <hadess@hadess.net>
+
* proclist.c: (glibtop_get_proclist_s): replace all the xmalloc crap
by glib memory management functions
diff --git a/sysdeps/kernel/glibtop_private.h b/sysdeps/kernel/glibtop_private.h
index dd8f47ea..012ee1ce 100644
--- a/sysdeps/kernel/glibtop_private.h
+++ b/sysdeps/kernel/glibtop_private.h
@@ -34,7 +34,7 @@
#undef LIBGTOP_VERSION
#include <linux/libgtop.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
int
glibtop_get_proc_data_stat_s (glibtop *server, libgtop_stat_t *stat);
@@ -84,6 +84,6 @@ glibtop_get_proc_data_netload_s (glibtop *server,
libgtop_netload_t *netload,
const char *device);
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif /* __GLIBTOP_PRIVATE_H__ */
diff --git a/sysdeps/kernel/glibtop_server.h b/sysdeps/kernel/glibtop_server.h
index b3822d47..5a8c68e9 100644
--- a/sysdeps/kernel/glibtop_server.h
+++ b/sysdeps/kernel/glibtop_server.h
@@ -24,7 +24,7 @@
#ifndef __GLIBTOP_SERVER_H__
#define __GLIBTOP_SERVER_H__
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_SUID_CPU 0
#define GLIBTOP_SUID_MEM 0
@@ -47,6 +47,6 @@ BEGIN_LIBGTOP_DECLS
#define GLIBTOP_SUID_NETLOAD 0
#define GLIBTOP_SUID_PPP 0
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/sysdeps/kernel/kernel.h b/sysdeps/kernel/kernel.h
index bfa8ac9f..824fbedb 100644
--- a/sysdeps/kernel/kernel.h
+++ b/sysdeps/kernel/kernel.h
@@ -31,10 +31,10 @@
#include <syscall.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
extern int table (int, union table *, const void *);
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/sysdeps/kernel/procargs.c b/sysdeps/kernel/procargs.c
index 7bf1b682..72a45f3b 100644
--- a/sysdeps/kernel/procargs.c
+++ b/sysdeps/kernel/procargs.c
@@ -23,7 +23,6 @@
#include <glibtop.h>
#include <glibtop/error.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/procargs.h>
static const unsigned long _glibtop_sysdeps_proc_args = 0;
diff --git a/sysdeps/kernel/proclist.c b/sysdeps/kernel/proclist.c
index 2311e6f8..bf8baee3 100644
--- a/sysdeps/kernel/proclist.c
+++ b/sysdeps/kernel/proclist.c
@@ -22,7 +22,6 @@
*/
#include <glibtop.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/proclist.h>
#include "kernel.h"
diff --git a/sysdeps/kernel/procmap.c b/sysdeps/kernel/procmap.c
index 48a99400..05a368c9 100644
--- a/sysdeps/kernel/procmap.c
+++ b/sysdeps/kernel/procmap.c
@@ -23,7 +23,6 @@
#include <glibtop.h>
#include <glibtop/error.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/procmap.h>
static const unsigned long _glibtop_sysdeps_proc_map = 0;
diff --git a/sysdeps/linux/ChangeLog b/sysdeps/linux/ChangeLog
index eed7464d..cc23183e 100644
--- a/sysdeps/linux/ChangeLog
+++ b/sysdeps/linux/ChangeLog
@@ -1,5 +1,14 @@
2003-10-20 Bastien Nocera <hadess@hadess.net>
+ * glibtop_machine.h:
+ * glibtop_server.h:
+ * ppp.c:
+ * procargs.c: (glibtop_get_proc_args_s):
+ * proclist.c:
+ * procmap.c: fixed compilation
+
+2003-10-20 Bastien Nocera <hadess@hadess.net>
+
* ppp.c: (get_ISDN_stats):
* procargs.c: (glibtop_get_proc_args_s):
* proclist.c: (glibtop_get_proclist_s):
diff --git a/sysdeps/linux/glibtop_machine.h b/sysdeps/linux/glibtop_machine.h
index 9386b1b4..fb8e34c2 100644
--- a/sysdeps/linux/glibtop_machine.h
+++ b/sysdeps/linux/glibtop_machine.h
@@ -28,7 +28,7 @@
#include <fcntl.h>
#include <ctype.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#if _IN_LIBGTOP
@@ -53,6 +53,6 @@ struct _glibtop_machine
char proc_status [BUFSIZ];
};
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/sysdeps/linux/glibtop_server.h b/sysdeps/linux/glibtop_server.h
index e96b1169..924747e7 100644
--- a/sysdeps/linux/glibtop_server.h
+++ b/sysdeps/linux/glibtop_server.h
@@ -27,7 +27,7 @@
#include <fcntl.h>
#include <ctype.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#ifdef _IN_LIBGTOP
@@ -130,6 +130,6 @@ proc_stat_after_cmd (char *p)
#define GLIBTOP_SUID_NETLOAD 0
#define GLIBTOP_SUID_PPP 0
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/sysdeps/linux/ppp.c b/sysdeps/linux/ppp.c
index 99808e88..483d1239 100644
--- a/sysdeps/linux/ppp.c
+++ b/sysdeps/linux/ppp.c
@@ -23,7 +23,6 @@
#include <glibtop.h>
#include <glibtop/error.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/ppp.h>
#include <linux/isdn.h>
diff --git a/sysdeps/linux/procargs.c b/sysdeps/linux/procargs.c
index 3e4b63b2..6db194d6 100644
--- a/sysdeps/linux/procargs.c
+++ b/sysdeps/linux/procargs.c
@@ -23,7 +23,6 @@
#include <glibtop.h>
#include <glibtop/error.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/procargs.h>
static const unsigned long _glibtop_sysdeps_proc_args =
@@ -57,7 +56,7 @@ glibtop_get_proc_args_s (glibtop *server, glibtop_proc_args *buf,
if (cmdline < 0) return NULL;
if (max_len) {
- retval = g_malloc (server, max_len+1);
+ retval = g_malloc (max_len+1);
len = read (cmdline, retval, max_len);
close (cmdline);
diff --git a/sysdeps/linux/proclist.c b/sysdeps/linux/proclist.c
index 11900bc2..23e9761d 100644
--- a/sysdeps/linux/proclist.c
+++ b/sysdeps/linux/proclist.c
@@ -22,7 +22,6 @@
*/
#include <config.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/proclist.h>
#include <glibtop/procuid.h>
diff --git a/sysdeps/linux/procmap.c b/sysdeps/linux/procmap.c
index 87129d20..61248261 100644
--- a/sysdeps/linux/procmap.c
+++ b/sysdeps/linux/procmap.c
@@ -23,7 +23,6 @@
#include <glibtop.h>
#include <glibtop/error.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/procmap.h>
static const unsigned long _glibtop_sysdeps_proc_map =
diff --git a/sysdeps/names/cpu.c b/sysdeps/names/cpu.c
index dcb274f9..24952379 100644
--- a/sysdeps/names/cpu.c
+++ b/sysdeps/names/cpu.c
@@ -22,6 +22,7 @@
*/
#include <glibtop/cpu.h>
+#include <libgnome/gnome-i18n.h>
const char *glibtop_names_cpu [GLIBTOP_MAX_CPU] =
{
diff --git a/sysdeps/names/fsusage.c b/sysdeps/names/fsusage.c
index 48bd491a..b679508a 100644
--- a/sysdeps/names/fsusage.c
+++ b/sysdeps/names/fsusage.c
@@ -22,6 +22,7 @@
*/
#include <glibtop/fsusage.h>
+#include <libgnome/gnome-i18n.h>
const char *glibtop_names_fsusage [GLIBTOP_MAX_FSUSAGE] =
{
diff --git a/sysdeps/names/loadavg.c b/sysdeps/names/loadavg.c
index ec6cbdc2..c954072f 100644
--- a/sysdeps/names/loadavg.c
+++ b/sysdeps/names/loadavg.c
@@ -22,6 +22,7 @@
*/
#include <glibtop/loadavg.h>
+#include <libgnome/gnome-i18n.h>
const char *glibtop_names_loadavg [GLIBTOP_MAX_LOADAVG] =
{
diff --git a/sysdeps/names/mem.c b/sysdeps/names/mem.c
index 44dbcd64..c1aba5a2 100644
--- a/sysdeps/names/mem.c
+++ b/sysdeps/names/mem.c
@@ -22,6 +22,7 @@
*/
#include <glibtop/mem.h>
+#include <libgnome/gnome-i18n.h>
const char *glibtop_names_mem [GLIBTOP_MAX_MEM] =
{
diff --git a/sysdeps/names/mountlist.c b/sysdeps/names/mountlist.c
index 5f555ee8..67af18d6 100644
--- a/sysdeps/names/mountlist.c
+++ b/sysdeps/names/mountlist.c
@@ -22,6 +22,7 @@
*/
#include <glibtop/mountlist.h>
+#include <libgnome/gnome-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 585a68d6..19eb920b 100644
--- a/sysdeps/names/msg_limits.c
+++ b/sysdeps/names/msg_limits.c
@@ -22,6 +22,7 @@
*/
#include <glibtop/msg_limits.h>
+#include <libgnome/gnome-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 ebf47722..62cb4ae5 100644
--- a/sysdeps/names/netinfo.c
+++ b/sysdeps/names/netinfo.c
@@ -24,6 +24,7 @@
*/
#include <glibtop/netinfo.h>
+#include <libgnome/gnome-i18n.h>
const char *glibtop_names_netinfo[GLIBTOP_MAX_NETINFO] =
{
diff --git a/sysdeps/names/netload.c b/sysdeps/names/netload.c
index 5e23fac1..e7c19c68 100644
--- a/sysdeps/names/netload.c
+++ b/sysdeps/names/netload.c
@@ -22,6 +22,7 @@
*/
#include <glibtop/netload.h>
+#include <libgnome/gnome-i18n.h>
const char *glibtop_names_netload [GLIBTOP_MAX_NETLOAD] =
{
diff --git a/sysdeps/names/ppp.c b/sysdeps/names/ppp.c
index 849c5878..d37094fd 100644
--- a/sysdeps/names/ppp.c
+++ b/sysdeps/names/ppp.c
@@ -22,6 +22,7 @@
*/
#include <glibtop/ppp.h>
+#include <libgnome/gnome-i18n.h>
const char *glibtop_names_ppp [GLIBTOP_MAX_PPP] =
{
diff --git a/sysdeps/names/procargs.c b/sysdeps/names/procargs.c
index 85610c8f..a411d6cc 100644
--- a/sysdeps/names/procargs.c
+++ b/sysdeps/names/procargs.c
@@ -22,6 +22,7 @@
*/
#include <glibtop/procargs.h>
+#include <libgnome/gnome-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 32b86037..992a92d0 100644
--- a/sysdeps/names/proccwd.c
+++ b/sysdeps/names/proccwd.c
@@ -25,6 +25,7 @@
#include <glibtop.h>
#include <glibtop/proccwd.h>
+#include <libgnome/gnome-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 2a78efcc..1f5bc71b 100644
--- a/sysdeps/names/prockernel.c
+++ b/sysdeps/names/prockernel.c
@@ -23,6 +23,7 @@
#include <glibtop.h>
#include <glibtop/prockernel.h>
+#include <libgnome/gnome-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 274b5251..284cb57d 100644
--- a/sysdeps/names/proclist.c
+++ b/sysdeps/names/proclist.c
@@ -22,6 +22,7 @@
*/
#include <glibtop/proclist.h>
+#include <libgnome/gnome-i18n.h>
const char *glibtop_names_proclist [GLIBTOP_MAX_PROCLIST] =
{
diff --git a/sysdeps/names/procmap.c b/sysdeps/names/procmap.c
index 8e8e7ed3..d9f54ada 100644
--- a/sysdeps/names/procmap.c
+++ b/sysdeps/names/procmap.c
@@ -22,6 +22,7 @@
*/
#include <glibtop/procmap.h>
+#include <libgnome/gnome-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 6f9f4e09..33543961 100644
--- a/sysdeps/names/procmem.c
+++ b/sysdeps/names/procmem.c
@@ -23,6 +23,7 @@
#include <glibtop.h>
#include <glibtop/procmem.h>
+#include <libgnome/gnome-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 bcb5c329..5524f3bf 100644
--- a/sysdeps/names/procsegment.c
+++ b/sysdeps/names/procsegment.c
@@ -23,6 +23,7 @@
#include <glibtop.h>
#include <glibtop/procsegment.h>
+#include <libgnome/gnome-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 d6806db1..bcae7427 100644
--- a/sysdeps/names/procsignal.c
+++ b/sysdeps/names/procsignal.c
@@ -23,6 +23,7 @@
#include <glibtop.h>
#include <glibtop/procsignal.h>
+#include <libgnome/gnome-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 057a00f2..8e3ac0eb 100644
--- a/sysdeps/names/procstate.c
+++ b/sysdeps/names/procstate.c
@@ -23,6 +23,7 @@
#include <glibtop.h>
#include <glibtop/procstate.h>
+#include <libgnome/gnome-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 33456e50..24da61d8 100644
--- a/sysdeps/names/proctime.c
+++ b/sysdeps/names/proctime.c
@@ -23,6 +23,7 @@
#include <glibtop.h>
#include <glibtop/proctime.h>
+#include <libgnome/gnome-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 1caa8c64..1fd98cda 100644
--- a/sysdeps/names/procuid.c
+++ b/sysdeps/names/procuid.c
@@ -23,6 +23,7 @@
#include <glibtop.h>
#include <glibtop/procuid.h>
+#include <libgnome/gnome-i18n.h>
#define GLIBTOP_PROC_UID_UID 0
#define GLIBTOP_PROC_UID_EUID 1
diff --git a/sysdeps/names/sem_limits.c b/sysdeps/names/sem_limits.c
index 1c337cd6..42a6beff 100644
--- a/sysdeps/names/sem_limits.c
+++ b/sysdeps/names/sem_limits.c
@@ -22,6 +22,7 @@
*/
#include <glibtop/sem_limits.h>
+#include <libgnome/gnome-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 d0b42d71..241ab771 100644
--- a/sysdeps/names/shm_limits.c
+++ b/sysdeps/names/shm_limits.c
@@ -22,6 +22,7 @@
*/
#include <glibtop/shm_limits.h>
+#include <libgnome/gnome-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 29319ce1..592d9022 100644
--- a/sysdeps/names/swap.c
+++ b/sysdeps/names/swap.c
@@ -22,6 +22,7 @@
*/
#include <glibtop/swap.h>
+#include <libgnome/gnome-i18n.h>
const char *glibtop_names_swap [GLIBTOP_MAX_SWAP] =
{
diff --git a/sysdeps/names/sysdeps.c b/sysdeps/names/sysdeps.c
index 36e8b749..4f3ad7aa 100644
--- a/sysdeps/names/sysdeps.c
+++ b/sysdeps/names/sysdeps.c
@@ -22,6 +22,7 @@
#include <config.h>
#include <glibtop/union.h>
#include <glibtop/sysdeps.h>
+#include <libgnome/gnome-i18n.h>
const char *glibtop_names_sysdeps [GLIBTOP_MAX_SYSDEPS] =
{
diff --git a/sysdeps/names/uptime.c b/sysdeps/names/uptime.c
index e4e728f7..9475128d 100644
--- a/sysdeps/names/uptime.c
+++ b/sysdeps/names/uptime.c
@@ -22,6 +22,7 @@
*/
#include <glibtop/uptime.h>
+#include <libgnome/gnome-i18n.h>
const char *glibtop_names_uptime [GLIBTOP_MAX_UPTIME] =
{
diff --git a/sysdeps/osf1/ChangeLog b/sysdeps/osf1/ChangeLog
index d87225f7..bc26b330 100644
--- a/sysdeps/osf1/ChangeLog
+++ b/sysdeps/osf1/ChangeLog
@@ -1,5 +1,13 @@
2003-10-20 Bastien Nocera <hadess@hadess.net>
+ * glibtop_server.h:
+ * glibtop_suid.h:
+ * procargs.c:
+ * proclist.c:
+ * procmap.c: fixed compilation
+
+2003-10-20 Bastien Nocera <hadess@hadess.net>
+
* proclist.c: (glibtop_get_proclist_p):
replace all the xmalloc crap by glib memory management functions
diff --git a/sysdeps/osf1/glibtop_machine.h b/sysdeps/osf1/glibtop_machine.h
index a4424818..7ad6d06d 100644
--- a/sysdeps/osf1/glibtop_machine.h
+++ b/sysdeps/osf1/glibtop_machine.h
@@ -32,7 +32,7 @@
#undef user
#undef idle
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
int table (int id, int index, char *addr, int nel, u_int lel);
@@ -45,6 +45,6 @@ struct _glibtop_machine
unsigned proctable_entries; /* Max entries in the proctable */
};
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/sysdeps/osf1/glibtop_server.h b/sysdeps/osf1/glibtop_server.h
index 47d69199..7f83c86d 100644
--- a/sysdeps/osf1/glibtop_server.h
+++ b/sysdeps/osf1/glibtop_server.h
@@ -24,7 +24,7 @@
#ifndef __GLIBTOP_SERVER_H__
#define __GLIBTOP_SERVER_H__
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_SUID_CPU 0
#define GLIBTOP_SUID_MEM 0
@@ -47,6 +47,6 @@ BEGIN_LIBGTOP_DECLS
#define GLIBTOP_SUID_NETLOAD (1 << GLIBTOP_SYSDEPS_NETLOAD)
#define GLIBTOP_SUID_PPP 0
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/sysdeps/osf1/glibtop_suid.h b/sysdeps/osf1/glibtop_suid.h
index a83fd3cc..0d0fefd2 100644
--- a/sysdeps/osf1/glibtop_suid.h
+++ b/sysdeps/osf1/glibtop_suid.h
@@ -26,7 +26,7 @@
#include <sys/table.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
static inline void glibtop_suid_enter (glibtop *server) {
setreuid (server->machine.uid, server->machine.euid);
@@ -45,6 +45,6 @@ glibtop_open_p (glibtop *server, const char *program_name,
const unsigned long features,
const unsigned flags);
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/sysdeps/osf1/procargs.c b/sysdeps/osf1/procargs.c
index 67c183e8..90d05c9c 100644
--- a/sysdeps/osf1/procargs.c
+++ b/sysdeps/osf1/procargs.c
@@ -23,7 +23,6 @@
#include <glibtop.h>
#include <glibtop/error.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/procargs.h>
static const unsigned long _glibtop_sysdeps_proc_args = 0;
diff --git a/sysdeps/osf1/proclist.c b/sysdeps/osf1/proclist.c
index 35953c53..14ec1cb1 100644
--- a/sysdeps/osf1/proclist.c
+++ b/sysdeps/osf1/proclist.c
@@ -23,7 +23,6 @@
#include <glibtop.h>
#include <glibtop/error.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/proclist.h>
#include <glibtop_suid.h>
diff --git a/sysdeps/osf1/procmap.c b/sysdeps/osf1/procmap.c
index 0b9bd6e0..44d91b24 100644
--- a/sysdeps/osf1/procmap.c
+++ b/sysdeps/osf1/procmap.c
@@ -23,7 +23,6 @@
#include <glibtop.h>
#include <glibtop/error.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/procmap.h>
static const unsigned long _glibtop_sysdeps_proc_map = 0;
diff --git a/sysdeps/solaris/ChangeLog b/sysdeps/solaris/ChangeLog
index e67739ce..0c9567de 100644
--- a/sysdeps/solaris/ChangeLog
+++ b/sysdeps/solaris/ChangeLog
@@ -1,5 +1,16 @@
2003-10-20 Bastien Nocera <hadess@hadess.net>
+ * glibtop_machine.h:
+ * glibtop_private.h:
+ * glibtop_server.h:
+ * glibtop_suid.h:
+ * procargs.c:
+ * proclist.c:
+ * procmap.c:
+ * safeio.h: fixed compilation
+
+2003-10-20 Bastien Nocera <hadess@hadess.net>
+
* procargs.c: (glibtop_get_proc_args_s):
* proclist.c: (glibtop_get_proclist_s):
* procmap.c: (glibtop_get_proc_map_s):
diff --git a/sysdeps/solaris/glibtop_machine.h b/sysdeps/solaris/glibtop_machine.h
index 26a80de4..36de52ff 100644
--- a/sysdeps/solaris/glibtop_machine.h
+++ b/sysdeps/solaris/glibtop_machine.h
@@ -36,7 +36,7 @@
#include <kvm.h>
#include <sys/sysinfo.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
typedef struct _glibtop_machine glibtop_machine;
@@ -73,6 +73,6 @@ struct _glibtop_machine
#endif
};
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif /* __GLIBTOP_MACHINE_H__ */
diff --git a/sysdeps/solaris/glibtop_private.h b/sysdeps/solaris/glibtop_private.h
index 7d921daf..043ab018 100644
--- a/sysdeps/solaris/glibtop_private.h
+++ b/sysdeps/solaris/glibtop_private.h
@@ -38,7 +38,7 @@
# error Cannot compile without <procfs.h> or <sys/procfs.h>
#endif
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#ifdef HAVE_PROCFS_H
@@ -63,6 +63,6 @@ int glibtop_get_proc_credentials_s(glibtop *, struct prcred *, gid_t *, pid_t);
/* Reread kstat chains */
void glibtop_get_kstats(glibtop *);
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif /* __GLIBTOP_PRIVATE_H__ */
diff --git a/sysdeps/solaris/glibtop_server.h b/sysdeps/solaris/glibtop_server.h
index 0a13e6d4..f2aab06c 100644
--- a/sysdeps/solaris/glibtop_server.h
+++ b/sysdeps/solaris/glibtop_server.h
@@ -24,7 +24,7 @@
#ifndef __GLIBTOP_SERVER_H__
#define __GLIBTOP_SERVER_H__
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_SUID_CPU 0
#define GLIBTOP_SUID_MEM 0
@@ -47,6 +47,6 @@ BEGIN_LIBGTOP_DECLS
#define GLIBTOP_SUID_NETLOAD 0
#define GLIBTOP_SUID_PPP 0
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/sysdeps/solaris/glibtop_suid.h b/sysdeps/solaris/glibtop_suid.h
index b88421ff..3753cba1 100644
--- a/sysdeps/solaris/glibtop_suid.h
+++ b/sysdeps/solaris/glibtop_suid.h
@@ -24,7 +24,7 @@
#ifndef __GLIBTOP_SUID_H__
#define __GLIBTOP_SUID_H__
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
static inline void glibtop_suid_enter (glibtop *server) {
setreuid (server->machine.uid, server->machine.euid);
@@ -43,6 +43,6 @@ glibtop_open_p (glibtop *server, const char *program_name,
const unsigned long features,
const unsigned flags);
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/sysdeps/solaris/procargs.c b/sysdeps/solaris/procargs.c
index 85582862..37af38ad 100644
--- a/sysdeps/solaris/procargs.c
+++ b/sysdeps/solaris/procargs.c
@@ -23,7 +23,6 @@
#include <glibtop.h>
#include <glibtop/error.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/procargs.h>
static const unsigned long _glibtop_sysdeps_proc_args =
diff --git a/sysdeps/solaris/proclist.c b/sysdeps/solaris/proclist.c
index 44965bbf..ec78a339 100644
--- a/sysdeps/solaris/proclist.c
+++ b/sysdeps/solaris/proclist.c
@@ -23,7 +23,6 @@
#include <glibtop.h>
#include <glibtop/proclist.h>
-#include <glibtop/xmalloc.h>
#include <sys/stat.h>
#include <unistd.h>
diff --git a/sysdeps/solaris/procmap.c b/sysdeps/solaris/procmap.c
index 6ac000f6..8df46424 100644
--- a/sysdeps/solaris/procmap.c
+++ b/sysdeps/solaris/procmap.c
@@ -24,7 +24,6 @@
#include <glibtop.h>
#include <glibtop/error.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/procmap.h>
#include <errno.h>
diff --git a/sysdeps/solaris/safeio.h b/sysdeps/solaris/safeio.h
index b6808e81..f9959dea 100644
--- a/sysdeps/solaris/safeio.h
+++ b/sysdeps/solaris/safeio.h
@@ -26,7 +26,7 @@
#include <sys/stat.h>
#include <dirent.h>
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
int
s_open(const char *, int);
@@ -43,6 +43,6 @@ s_pread(int, void *, size_t, off_t);
int
s_closedir(DIR *);
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/sysdeps/stub/ChangeLog b/sysdeps/stub/ChangeLog
index 0cb0e05c..deb0ce78 100644
--- a/sysdeps/stub/ChangeLog
+++ b/sysdeps/stub/ChangeLog
@@ -1,3 +1,9 @@
+2003-10-20 Bastien Nocera <hadess@hadess.net>
+
+ * glibtop_server.h:
+ * procargs.c:
+ * procmap.c: fixed compilation
+
2001-10-17 Abel Cheung <maddog@linux.org.hk>
* Makefile.am: move header to $(includedir)/libgtop-1.0/glibtop.
diff --git a/sysdeps/stub/glibtop_server.h b/sysdeps/stub/glibtop_server.h
index b3822d47..5a8c68e9 100644
--- a/sysdeps/stub/glibtop_server.h
+++ b/sysdeps/stub/glibtop_server.h
@@ -24,7 +24,7 @@
#ifndef __GLIBTOP_SERVER_H__
#define __GLIBTOP_SERVER_H__
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_SUID_CPU 0
#define GLIBTOP_SUID_MEM 0
@@ -47,6 +47,6 @@ BEGIN_LIBGTOP_DECLS
#define GLIBTOP_SUID_NETLOAD 0
#define GLIBTOP_SUID_PPP 0
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/sysdeps/stub/procargs.c b/sysdeps/stub/procargs.c
index 7d010d5e..c009839b 100644
--- a/sysdeps/stub/procargs.c
+++ b/sysdeps/stub/procargs.c
@@ -23,7 +23,6 @@
#include <glibtop.h>
#include <glibtop/error.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/procargs.h>
static const unsigned long _glibtop_sysdeps_proc_args = 0;
diff --git a/sysdeps/stub/procmap.c b/sysdeps/stub/procmap.c
index 5a6c479a..0626de71 100644
--- a/sysdeps/stub/procmap.c
+++ b/sysdeps/stub/procmap.c
@@ -24,7 +24,6 @@
#include <glibtop.h>
#include <glibtop/error.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/procmap.h>
static const unsigned long _glibtop_sysdeps_proc_map = 0;
diff --git a/sysdeps/stub_suid/ChangeLog b/sysdeps/stub_suid/ChangeLog
index 4d7d7bec..71717038 100644
--- a/sysdeps/stub_suid/ChangeLog
+++ b/sysdeps/stub_suid/ChangeLog
@@ -1,3 +1,12 @@
+2003-10-20 Bastien Nocera <hadess@hadess.net>
+
+ * glibtop_machine.h:
+ * glibtop_server.h:
+ * glibtop_suid.h:
+ * open.c:
+ * procargs.c:
+ * procmap.c: fixed compilation
+
2001-10-17 Abel Cheung <maddog@linux.org.hk>
* Makefile.am: move header to $(includedir)/libgtop-1.0/glibtop.
diff --git a/sysdeps/stub_suid/glibtop_machine.h b/sysdeps/stub_suid/glibtop_machine.h
index 835f177f..b2f5d250 100644
--- a/sysdeps/stub_suid/glibtop_machine.h
+++ b/sysdeps/stub_suid/glibtop_machine.h
@@ -24,7 +24,7 @@
#ifndef __GLIBTOP_MACHINE_H__
#define __GLIBTOP_MACHINE_H__
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
typedef struct _glibtop_machine glibtop_machine;
@@ -34,6 +34,6 @@ struct _glibtop_machine
gid_t gid, egid; /* Real and effective group id */
};
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/sysdeps/stub_suid/glibtop_server.h b/sysdeps/stub_suid/glibtop_server.h
index ccf3d29d..8bfa4a6c 100644
--- a/sysdeps/stub_suid/glibtop_server.h
+++ b/sysdeps/stub_suid/glibtop_server.h
@@ -24,7 +24,7 @@
#ifndef __GLIBTOP_SERVER_H__
#define __GLIBTOP_SERVER_H__
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_SUID_CPU (1 << GLIBTOP_SYSDEPS_CPU)
#define GLIBTOP_SUID_MEM (1 << GLIBTOP_SYSDEPS_MEM)
@@ -47,6 +47,6 @@ BEGIN_LIBGTOP_DECLS
#define GLIBTOP_SUID_NETLOAD (1 << GLIBTOP_SYSDEPS_NETLOAD)
#define GLIBTOP_SUID_PPP (1 << GLIBTOP_SYSDEPS_PPP)
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/sysdeps/stub_suid/glibtop_suid.h b/sysdeps/stub_suid/glibtop_suid.h
index b88421ff..3753cba1 100644
--- a/sysdeps/stub_suid/glibtop_suid.h
+++ b/sysdeps/stub_suid/glibtop_suid.h
@@ -24,7 +24,7 @@
#ifndef __GLIBTOP_SUID_H__
#define __GLIBTOP_SUID_H__
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
static inline void glibtop_suid_enter (glibtop *server) {
setreuid (server->machine.uid, server->machine.euid);
@@ -43,6 +43,6 @@ glibtop_open_p (glibtop *server, const char *program_name,
const unsigned long features,
const unsigned flags);
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/sysdeps/stub_suid/open.c b/sysdeps/stub_suid/open.c
index 3357ad25..86c2ab6f 100644
--- a/sysdeps/stub_suid/open.c
+++ b/sysdeps/stub_suid/open.c
@@ -23,7 +23,6 @@
#include <glibtop.h>
#include <glibtop/open.h>
-#include <glibtop/xmalloc.h>
/* !!! THIS FUNCTION RUNS SUID ROOT - CHANGE WITH CAUTION !!! */
diff --git a/sysdeps/stub_suid/procargs.c b/sysdeps/stub_suid/procargs.c
index 67c183e8..90d05c9c 100644
--- a/sysdeps/stub_suid/procargs.c
+++ b/sysdeps/stub_suid/procargs.c
@@ -23,7 +23,6 @@
#include <glibtop.h>
#include <glibtop/error.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/procargs.h>
static const unsigned long _glibtop_sysdeps_proc_args = 0;
diff --git a/sysdeps/stub_suid/procmap.c b/sysdeps/stub_suid/procmap.c
index 0b9bd6e0..44d91b24 100644
--- a/sysdeps/stub_suid/procmap.c
+++ b/sysdeps/stub_suid/procmap.c
@@ -23,7 +23,6 @@
#include <glibtop.h>
#include <glibtop/error.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/procmap.h>
static const unsigned long _glibtop_sysdeps_proc_map = 0;
diff --git a/sysdeps/sun4/ChangeLog b/sysdeps/sun4/ChangeLog
index 3ab3c2c7..525fc80b 100644
--- a/sysdeps/sun4/ChangeLog
+++ b/sysdeps/sun4/ChangeLog
@@ -1,5 +1,13 @@
2003-10-20 Bastien Nocera <hadess@hadess.net>
+ * glibtop_machine.h:
+ * glibtop_server.h:
+ * glibtop_suid.h:
+ * open.c:
+ * proclist.c: fixed compilation
+
+2003-10-20 Bastien Nocera <hadess@hadess.net>
+
* open.c: (glibtop_open_p):
* proclist.c: (glibtop_get_proclist_p):
replace all the xmalloc crap by glib memory management functions
diff --git a/sysdeps/sun4/glibtop_machine.h b/sysdeps/sun4/glibtop_machine.h
index 8ab56840..ca074537 100644
--- a/sysdeps/sun4/glibtop_machine.h
+++ b/sysdeps/sun4/glibtop_machine.h
@@ -48,7 +48,7 @@
#include "loadavg.h"
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
/* Older versions of SunOS don't have a typedef for pid_t.
Hopefully this will catch all those cases without causing other problems.
@@ -112,6 +112,6 @@ struct proc *_glibtop_find_pid (void *void_server, pid_t pid);
#endif
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/sysdeps/sun4/glibtop_server.h b/sysdeps/sun4/glibtop_server.h
index e631e43e..ffdff197 100644
--- a/sysdeps/sun4/glibtop_server.h
+++ b/sysdeps/sun4/glibtop_server.h
@@ -24,7 +24,7 @@
#ifndef __GLIBTOP_SERVER_H__
#define __GLIBTOP_SERVER_H__
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
#define GLIBTOP_SUID_CPU (1 << GLIBTOP_SYSDEPS_CPU)
#define GLIBTOP_SUID_MEM (1 << GLIBTOP_SYSDEPS_MEM)
@@ -44,6 +44,6 @@ BEGIN_LIBGTOP_DECLS
#define GLIBTOP_SUID_PROC_SEGMENT (1 << GLIBTOP_SYSDEPS_PROC_SEGMENT)
#define GLIBTOP_SUID_PROC_MAP (1 << GLIBTOP_SYSDEPS_PROC_MAP)
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/sysdeps/sun4/glibtop_suid.h b/sysdeps/sun4/glibtop_suid.h
index 18d3b1d3..d6527538 100644
--- a/sysdeps/sun4/glibtop_suid.h
+++ b/sysdeps/sun4/glibtop_suid.h
@@ -24,7 +24,7 @@
#ifndef __GLIBTOP_SUID_H__
#define __GLIBTOP_SUID_H__
-BEGIN_LIBGTOP_DECLS
+G_BEGIN_DECLS
static inline void glibtop_suid_enter (glibtop *server) {
setregid (server->machine.gid, server->machine.egid);
@@ -43,6 +43,6 @@ glibtop_open_p (glibtop *server, const char *program_name,
const unsigned long features,
const unsigned flags);
-END_LIBGTOP_DECLS
+G_END_DECLS
#endif
diff --git a/sysdeps/sun4/open.c b/sysdeps/sun4/open.c
index e68884fa..a1bf813a 100644
--- a/sysdeps/sun4/open.c
+++ b/sysdeps/sun4/open.c
@@ -23,7 +23,6 @@
#include <glibtop.h>
#include <glibtop/open.h>
-#include <glibtop/xmalloc.h>
struct nlist _glibtop_nlist[] = {
#ifdef i386
diff --git a/sysdeps/sun4/proclist.c b/sysdeps/sun4/proclist.c
index 4719a6bd..56d93d19 100644
--- a/sysdeps/sun4/proclist.c
+++ b/sysdeps/sun4/proclist.c
@@ -22,7 +22,6 @@
*/
#include <glibtop.h>
-#include <glibtop/xmalloc.h>
#include <glibtop/proclist.h>
#include <glibtop_suid.h>