removed #if's - we now decide at runtime whether to use the server or to

* lib/*.c: removed #if's - we now decide at runtime
whether to use the server or to call the appropriate
function for the sysdeps directory.
This commit is contained in:
Martin Baulig
1998-06-01 15:09:03 +00:00
parent 6de9ad750b
commit 67798e0d7d
22 changed files with 217 additions and 127 deletions

View File

@@ -22,16 +22,17 @@
#include <glibtop/proclist.h>
#include <glibtop/command.h>
#if GLIBTOP_SUID_PROCLIST
/* Fetch list of currently running processes. */
unsigned *
glibtop_get_proclist__l (glibtop *server, glibtop_proclist *buf)
{
glibtop_init__r (&server);
return glibtop_call__l (server, GLIBTOP_CMND_PROCLIST, 0, NULL,
sizeof (glibtop_proclist), buf);
}
glibtop_init__r (&server, GLIBTOP_SYSDEPS_PROCLIST, 0);
#endif
if (server->features & GLIBTOP_SYSDEPS_PROCLIST) {
return glibtop_call__l (server, GLIBTOP_CMND_PROCLIST, 0, NULL,
sizeof (glibtop_proclist), buf);
} else {
return glibtop_get_proclist__r (server, buf);
}
}