summaryrefslogtreecommitdiff
path: root/sysdeps
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 /sysdeps
parentba36a20cb81c8b3561b99a2412a9fd71b7cd8c12 (diff)
downloadlibgtop-b67e4c7f7d1a78e3e21b46955097eb33718bf461.tar.gz
- fixed compilation
Diffstat (limited to 'sysdeps')
-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
93 files changed, 216 insertions, 144 deletions
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>