- s/u_int64_t/guint64/

This commit is contained in:
Bastien Nocera
2003-10-20 20:12:28 +00:00
parent adc9a55578
commit b2283f7c79
75 changed files with 263 additions and 163 deletions

View File

@@ -1,3 +1,48 @@
2003-10-20 Bastien Nocera <hadess@hadess.net>
* acconfig.h:
* acinclude.m4:
* include/glibtop/array.h:
* include/glibtop/command.h:
* include/glibtop/cpu.h:
* include/glibtop/fsusage.h:
* include/glibtop/glibtop-backend-info.h:
* include/glibtop/glibtop-backend.h:
* include/glibtop/glibtop-client.h:
* include/glibtop/inodedb.h:
* include/glibtop/interfaces.h:
* include/glibtop/limits.h:
* include/glibtop/loadavg.h:
* include/glibtop/mem.h:
* include/glibtop/mountlist.h:
* include/glibtop/msg_limits.h:
* include/glibtop/netinfo.h:
* include/glibtop/netload.h:
* include/glibtop/ppp.h:
* include/glibtop/procargs.h:
* include/glibtop/proccwd.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/sem_limits.h:
* include/glibtop/shm_limits.h:
* include/glibtop/swap.h:
* include/glibtop/sysdeps.h:
* include/glibtop/sysinfo.h:
* include/glibtop/uptime.h:
* lib/glibtop-backend.c: (glibtop_backend_get):
* lib/glibtop-client.c: (glibtop_client_open_backend):
* lib/inodedb.c: (glibtop_inodedb_lookup_s):
* lib/lib.pl:
* src/inodedb/README.inodedb:
* src/inodedb/mkinodedb2.c: (main): s/u_int64_t/guint64/
2003-10-20 Bastien Nocera <hadess@hadess.net> 2003-10-20 Bastien Nocera <hadess@hadess.net>
* Makefile.am: fix distchecking, release 2.5.0 * Makefile.am: fix distchecking, release 2.5.0
@@ -929,7 +974,7 @@
1998-10-20 Martin Baulig <martin@home-of-linux.org> 1998-10-20 Martin Baulig <martin@home-of-linux.org>
* include/glibtop/proc_signal.h: Use a 2-element-array of * include/glibtop/proc_signal.h: Use a 2-element-array of
type `u_int64_t' for all signal masks instead of just type `guint64' for all signal masks instead of just
scalar numbers. This avoids problems on systems with more scalar numbers. This avoids problems on systems with more
than 64 signals. than 64 signals.
@@ -939,7 +984,7 @@
[NOTE for people porting libgtop: [NOTE for people porting libgtop:
Please use all 64 bits of the `u_int64_t' and not just 32 - the Please use all 64 bits of the `guint64' and not just 32 - the
signal number (as it is used in calls to kill () ...) should be signal number (as it is used in calls to kill () ...) should be
a bit-index into this field; if a process ignores for instance a bit-index into this field; if a process ignores for instance
signal 64, it has the 0-bit of sigcatch[1] set, if it ignores 63, signal 64, it has the 0-bit of sigcatch[1] set, if it ignores 63,
@@ -1280,14 +1325,14 @@
1998-07-30 Martin Baulig <martin@home-of-linux.org> 1998-07-30 Martin Baulig <martin@home-of-linux.org>
* acconfig.h (u_int64_t, int64_t): Added. * acconfig.h (guint64, int64_t): Added.
* lib/lib.awk: Using correct `(1 << GLIBTOP_SYSDEPS_<feature>)' * lib/lib.awk: Using correct `(1 << GLIBTOP_SYSDEPS_<feature>)'
in call to `glibtop_init_r'. in call to `glibtop_init_r'.
* configure.in (GNOME_LIBGTOP_TYPES): New check. * configure.in (GNOME_LIBGTOP_TYPES): New check.
* include/glibtop/*.h: Using `u_int64_t' instead of `unsigned long' * include/glibtop/*.h: Using `guint64' instead of `unsigned long'
and `long' to avoid problems when client is on a 32bit system and and `long' to avoid problems when client is on a 32bit system and
the server on a 64bit system. the server on a 64bit system.

View File

@@ -126,7 +126,7 @@
#undef HAVE_GUILE #undef HAVE_GUILE
#undef ssize_t #undef ssize_t
#undef u_int64_t #undef guint64
#undef int64_t #undef int64_t
#undef HAVE_GLIBTOP_MACHINE_H #undef HAVE_GLIBTOP_MACHINE_H

View File

@@ -43,7 +43,7 @@ dnl
AC_DEFUN([GNOME_LIBGTOP_TYPES], AC_DEFUN([GNOME_LIBGTOP_TYPES],
[ [
AC_CHECK_HEADERS(sys/bitypes.h) AC_CHECK_HEADERS(sys/bitypes.h)
AC_LIBGTOP_CHECK_TYPE(u_int64_t, unsigned long long int) AC_LIBGTOP_CHECK_TYPE(guint64, unsigned long long int)
AC_LIBGTOP_CHECK_TYPE(int64_t, signed long long int) AC_LIBGTOP_CHECK_TYPE(int64_t, signed long long int)
]) ])

View File

@@ -1,3 +1,7 @@
2003-10-20 Bastien Nocera <hadess@hadess.net>
* backend-common.c: (_open_common): s/u_int64_t/guint64/
2003-10-20 Bastien Nocera <hadess@hadess.net> 2003-10-20 Bastien Nocera <hadess@hadess.net>
* backend-common.h: fixed compilation * backend-common.h: fixed compilation

View File

@@ -26,7 +26,7 @@
#include <backend-common.h> #include <backend-common.h>
static int static int
_open_common (glibtop_server *, glibtop_backend *, u_int64_t, const char **); _open_common (glibtop_server *, glibtop_backend *, guint64, const char **);
static int static int
_close_common (glibtop_server *, glibtop_backend *, void *closure); _close_common (glibtop_server *, glibtop_backend *, void *closure);
@@ -47,7 +47,7 @@ glibtop_backend_info LibGTopBackendInfo_Common = {
static int static int
_open_common (glibtop_server *server, glibtop_backend *backend, _open_common (glibtop_server *server, glibtop_backend *backend,
u_int64_t features, const char **backend_args) guint64 features, const char **backend_args)
{ {
return 0; return 0;
} }

View File

@@ -1,3 +1,9 @@
2003-10-20 Bastien Nocera <hadess@hadess.net>
* backend-server.c: (_open_server):
* backend-server.h:
* command.h.in: s/u_int64_t/guint64/
2003-10-20 Bastien Nocera <hadess@hadess.net> 2003-10-20 Bastien Nocera <hadess@hadess.net>
* backend-server.h: * backend-server.h:

View File

@@ -26,7 +26,7 @@
#include <backend-server.h> #include <backend-server.h>
static int static int
_open_server (glibtop_server *, glibtop_backend *, u_int64_t, const char **); _open_server (glibtop_server *, glibtop_backend *, guint64, const char **);
static int static int
_close_server (glibtop_server *, glibtop_backend *, void *); _close_server (glibtop_server *, glibtop_backend *, void *);
@@ -47,7 +47,7 @@ glibtop_backend_info LibGTopBackendInfo_Server = {
static int static int
_open_server (glibtop_server *server, glibtop_backend *backend, _open_server (glibtop_server *server, glibtop_backend *backend,
u_int64_t features, const char **backend_args) guint64 features, const char **backend_args)
{ {
backend_server_private *priv; backend_server_private *priv;

View File

@@ -37,7 +37,7 @@ typedef struct _backend_server_private backend_server_private;
struct _backend_server_private struct _backend_server_private
{ {
u_int64_t flags; guint64 flags;
int input [2]; /* Pipe client <- server */ int input [2]; /* Pipe client <- server */
int output [2]; /* Pipe client -> server */ int output [2]; /* Pipe client -> server */
pid_t pid; /* PID of the server */ pid_t pid; /* PID of the server */

View File

@@ -42,8 +42,8 @@ typedef struct _glibtop_response glibtop_response;
struct _glibtop_command struct _glibtop_command
{ {
u_int64_t command; guint64 command;
u_int64_t param_size, send_size, data_size; guint64 param_size, send_size, data_size;
char parameter [_GLIBTOP_PARAM_SIZE]; char parameter [_GLIBTOP_PARAM_SIZE];
}; };
@@ -51,7 +51,7 @@ struct _glibtop_response
{ {
int retval; int retval;
int glibtop_errno; int glibtop_errno;
u_int64_t recv_size, data_size; guint64 recv_size, data_size;
}; };
G_END_DECLS G_END_DECLS

View File

@@ -1,3 +1,7 @@
2003-10-20 Bastien Nocera <hadess@hadess.net>
* backend-sysdeps.c: (_open_sysdeps): s/u_int64_t/guint64/
2003-10-20 Bastien Nocera <hadess@hadess.net> 2003-10-20 Bastien Nocera <hadess@hadess.net>
* backend-sysdeps.h: fixed compilation * backend-sysdeps.h: fixed compilation

View File

@@ -26,7 +26,7 @@
#include <backend-sysdeps.h> #include <backend-sysdeps.h>
static int static int
_open_sysdeps (glibtop_server *, glibtop_backend *, u_int64_t, const char **); _open_sysdeps (glibtop_server *, glibtop_backend *, guint64, const char **);
static int static int
_close_sysdeps (glibtop_server *, glibtop_backend *, void *); _close_sysdeps (glibtop_server *, glibtop_backend *, void *);
@@ -47,7 +47,7 @@ glibtop_backend_info LibGTopBackendInfo_Sysdeps = {
static int static int
_open_sysdeps (glibtop_server *server, glibtop_backend *backend, _open_sysdeps (glibtop_server *server, glibtop_backend *backend,
u_int64_t features, const char **backend_args) guint64 features, const char **backend_args)
{ {
glibtop_init_func_t *init_fkt; glibtop_init_func_t *init_fkt;

View File

@@ -1,3 +1,7 @@
2003-10-20 Bastien Nocera <hadess@hadess.net>
* reference.texi: s/u_int64_t/guint64/
2003-10-20 Bastien Nocera <hadess@hadess.net> 2003-10-20 Bastien Nocera <hadess@hadess.net>
* Makefile.am: removed traces of guile, intllibs and libgnomesupport * Makefile.am: removed traces of guile, intllibs and libgnomesupport

View File

@@ -50,7 +50,7 @@ typedef struct _glibtop_cpu glibtop_cpu;
struct _glibtop_cpu struct _glibtop_cpu
@{ @{
u_int64_t flags, guint64 flags,
total, total,
user, user,
nice, nice,
@@ -139,7 +139,7 @@ typedef struct _glibtop_mem glibtop_mem;
struct _glibtop_mem struct _glibtop_mem
@{ @{
u_int64_t flags, guint64 flags,
total, total,
used, used,
free, free,
@@ -207,7 +207,7 @@ typedef struct _glibtop_swap glibtop_swap;
struct _glibtop_swap struct _glibtop_swap
@{ @{
u_int64_t flags, guint64 flags,
total, total,
used, used,
free, free,
@@ -266,10 +266,10 @@ typedef struct _glibtop_uptime glibtop_uptime;
struct _glibtop_uptime struct _glibtop_uptime
@{ @{
u_int64_t flags; guint64 flags;
double uptime, double uptime,
idletime; idletime;
u_int64_t boot_time; guint64 boot_time;
@}; @};
@end cartouche @end cartouche
@end example @end example
@@ -318,9 +318,9 @@ typedef struct _glibtop_loadavg glibtop_loadavg;
struct _glibtop_loadavg struct _glibtop_loadavg
@{ @{
u_int64_t flags; guint64 flags;
double loadavg [3]; double loadavg [3];
u_int64_t nr_running, guint64 nr_running,
nr_tasks, nr_tasks,
last_pid; last_pid;
@}; @};
@@ -395,7 +395,7 @@ typedef struct _glibtop_proclist glibtop_proclist;
struct _glibtop_proclist struct _glibtop_proclist
@{ @{
u_int64_t flags, guint64 flags,
number, number,
total, total,
size; size;
@@ -492,7 +492,7 @@ typedef struct _glibtop_proc_state glibtop_proc_state;
struct _glibtop_proc_state struct _glibtop_proc_state
@{ @{
u_int64_t flags; guint64 flags;
char cmd[40]; char cmd[40];
@ifset LIBGTOP-1-1 @ifset LIBGTOP-1-1
unsigned state; unsigned state;
@@ -618,7 +618,7 @@ typedef struct _glibtop_proc_uid glibtop_proc_uid;
struct _glibtop_proc_uid struct _glibtop_proc_uid
@{ @{
u_int64_t flags; guint64 flags;
int uid, int uid,
euid, euid,
gid, gid,
@@ -698,7 +698,7 @@ typedef struct _glibtop_proc_mem glibtop_proc_mem;
struct _glibtop_proc_mem struct _glibtop_proc_mem
@{ @{
u_int64_t flags, guint64 flags,
size, size,
vsize, vsize,
resident, resident,
@@ -813,7 +813,7 @@ typedef struct _glibtop_proc_time glibtop_proc_time;
struct _glibtop_proc_time struct _glibtop_proc_time
@{ @{
u_int64_t flags, guint64 flags,
start_time, start_time,
rtime, rtime,
utime, utime,
@@ -881,7 +881,7 @@ typedef struct _glibtop_proc_signal glibtop_proc_signal;
struct _glibtop_proc_signal struct _glibtop_proc_signal
@{ @{
u_int64_t flags, guint64 flags,
signal [2], signal [2],
blocked [2], blocked [2],
sigignore [2], sigignore [2],
@@ -902,7 +902,7 @@ Mask of caught signals
@end table @end table
All signal masks are interpreted as bit mask; it is an array of two All signal masks are interpreted as bit mask; it is an array of two
@code{u_int64_t}'s so we can save 128 signals there. @code{guint64}'s so we can save 128 signals there.
@page @page
@node glibtop_proc_kernel, glibtop_proc_segment, glibtop_proc_signal, System Dependent @node glibtop_proc_kernel, glibtop_proc_segment, glibtop_proc_signal, System Dependent
@@ -929,8 +929,8 @@ typedef struct _glibtop_proc_kernel glibtop_proc_kernel;
struct _glibtop_proc_kernel struct _glibtop_proc_kernel
@{ @{
u_int64_t flags; guint64 flags;
u_int64_t k_flags, guint64 k_flags,
min_flt, min_flt,
maj_flt, maj_flt,
cmin_flt, cmin_flt,
@@ -1029,7 +1029,7 @@ typedef struct _glibtop_proc_segment glibtop_proc_segment;
struct _glibtop_proc_segment struct _glibtop_proc_segment
@{ @{
u_int64_t flags, guint64 flags,
text_rss, text_rss,
shlib_rss, shlib_rss,
data_rss, data_rss,
@@ -1096,7 +1096,7 @@ typedef struct _glibtop_proc_args glibtop_proc_args;
struct _glibtop_proc_args struct _glibtop_proc_args
@{ @{
u_int64_t flags, guint64 flags,
size; size;
@}; @};
@end cartouche @end cartouche
@@ -1135,7 +1135,7 @@ typedef struct _glibtop_proc_map glibtop_proc_map;
struct _glibtop_proc_map struct _glibtop_proc_map
@{ @{
u_int64_t flags, guint64 flags,
number, number,
total, total,
size; size;
@@ -1164,7 +1164,7 @@ typedef struct _glibtop_map_entry glibtop_map_entry;
struct _glibtop_map_entry struct _glibtop_map_entry
@{ @{
u_int64_t flags, start, end, offset, perm, inode, device; guint64 flags, start, end, offset, perm, inode, device;
char filename [GLIBTOP_MAP_FILENAME_LEN+1]; char filename [GLIBTOP_MAP_FILENAME_LEN+1];
@}; @};
@end cartouche @end cartouche
@@ -1222,7 +1222,7 @@ typedef struct _glibtop_netload glibtop_netload;
struct _glibtop_netload struct _glibtop_netload
@{ @{
u_int64_t flags, guint64 flags,
if_flags, if_flags,
mtu, mtu,
subnet, subnet,
@@ -1329,7 +1329,7 @@ typedef struct _glibtop_ppp glibtop_ppp;
struct _glibtop_ppp struct _glibtop_ppp
@{ @{
u_int64_t flags, guint64 flags,
state, state,
bytes_in, bytes_in,
bytes_out; bytes_out;
@@ -1409,7 +1409,7 @@ typedef struct _glibtop_mountlist glibtop_mountlist;
struct _glibtop_mountlist struct _glibtop_mountlist
@{ @{
u_int64_t flags, guint64 flags,
number, number,
total, total,
size; size;
@@ -1438,7 +1438,7 @@ typedef struct _glibtop_mountentry glibtop_mountentry;
struct _glibtop_mountentry struct _glibtop_mountentry
@{ @{
u_int64_t dev; guint64 dev;
char devname [GLIBTOP_MOUNTENTRY_LEN+1]; char devname [GLIBTOP_MOUNTENTRY_LEN+1];
char mountdir [GLIBTOP_MOUNTENTRY_LEN+1]; char mountdir [GLIBTOP_MOUNTENTRY_LEN+1];
char type [GLIBTOP_MOUNTENTRY_LEN+1]; char type [GLIBTOP_MOUNTENTRY_LEN+1];
@@ -1488,7 +1488,7 @@ typedef struct _glibtop_fsusage glibtop_fsusage;
struct _glibtop_fsusage struct _glibtop_fsusage
@{ @{
u_int64_t flags, guint64 flags,
blocks, blocks,
bfree, bfree,
bavail, bavail,
@@ -1639,7 +1639,7 @@ typedef struct _glibtop_sysdeps glibtop_sysdeps;
struct _glibtop_sysdeps struct _glibtop_sysdeps
@{ @{
u_int64_t flags, guint64 flags,
features, features,
pointer_size, pointer_size,
cpu, cpu,

View File

@@ -41,7 +41,7 @@ typedef struct _glibtop_array glibtop_array;
struct _glibtop_array struct _glibtop_array
{ {
u_int64_t flags, guint64 flags,
number, /* GLIBTOP_ARRAY_NUMBER */ number, /* GLIBTOP_ARRAY_NUMBER */
size, /* GLIBTOP_ARRAY_SIZE */ size, /* GLIBTOP_ARRAY_SIZE */
total; /* GLIBTOP_ARRAY_TOTAL */ total; /* GLIBTOP_ARRAY_TOTAL */

View File

@@ -69,8 +69,8 @@ typedef union _glibtop_response_union glibtop_response_union;
struct _glibtop_command struct _glibtop_command
{ {
u_int64_t command; guint64 command;
u_int64_t size, data_size; guint64 size, data_size;
char parameter [_GLIBTOP_PARAM_SIZE]; char parameter [_GLIBTOP_PARAM_SIZE];
}; };
@@ -83,7 +83,7 @@ union _glibtop_response_union
struct _glibtop_response struct _glibtop_response
{ {
int64_t offset; int64_t offset;
u_int64_t size, data_size; guint64 size, data_size;
glibtop_response_union u; glibtop_response_union u;
}; };

View File

@@ -51,7 +51,7 @@ typedef struct _glibtop_cpu glibtop_cpu;
struct _glibtop_cpu struct _glibtop_cpu
{ {
u_int64_t flags, guint64 flags,
total, /* GLIBTOP_CPU_TOTAL */ total, /* GLIBTOP_CPU_TOTAL */
user, /* GLIBTOP_CPU_USER */ user, /* GLIBTOP_CPU_USER */
nice, /* GLIBTOP_CPU_NICE */ nice, /* GLIBTOP_CPU_NICE */

View File

@@ -41,7 +41,7 @@ typedef struct _glibtop_fsusage glibtop_fsusage;
struct _glibtop_fsusage struct _glibtop_fsusage
{ {
u_int64_t flags, guint64 flags,
blocks, /* Total blocks. */ blocks, /* Total blocks. */
bfree, /* Free blocks available to superuser. */ bfree, /* Free blocks available to superuser. */
bavail, /* Free blocks available to non-superuser. */ bavail, /* Free blocks available to non-superuser. */

View File

@@ -40,7 +40,7 @@ typedef struct _glibtop_backend_module glibtop_backend_module;
typedef struct _glibtop_call_vector glibtop_call_vector; typedef struct _glibtop_call_vector glibtop_call_vector;
typedef int (*glibtop_backend_open_func_t) (glibtop_server *, glibtop_backend *, typedef int (*glibtop_backend_open_func_t) (glibtop_server *, glibtop_backend *,
u_int64_t, const char **); guint64, const char **);
typedef int (*glibtop_backend_close_func_t) (glibtop_server *, glibtop_backend *, typedef int (*glibtop_backend_close_func_t) (glibtop_server *, glibtop_backend *,
glibtop_closure *); glibtop_closure *);

View File

@@ -65,7 +65,7 @@ GType
glibtop_backend_get_type (void); glibtop_backend_get_type (void);
glibtop_backend * glibtop_backend *
glibtop_backend_get (const char *backend_name, u_int64_t features, glibtop_backend_get (const char *backend_name, guint64 features,
const char **backend_args, GError **error); const char **backend_args, GError **error);
void void

View File

@@ -82,7 +82,7 @@ glibtop_client_propagate_warning (glibtop_client *client, GError *error);
void void
glibtop_client_open_backend (glibtop_client *client, const char *backend_name, glibtop_client_open_backend (glibtop_client *client, const char *backend_name,
u_int64_t features, const char **backend_args); guint64 features, const char **backend_args);
void void
glibtop_client_add_backend (glibtop_client *client, glibtop_client_add_backend (glibtop_client *client,

View File

@@ -39,7 +39,7 @@ typedef struct _glibtop_inodedb_key glibtop_inodedb_key;
struct _glibtop_inodedb_key struct _glibtop_inodedb_key
{ {
u_int64_t device, inode; guint64 device, inode;
}; };
struct _glibtop_inodedb struct _glibtop_inodedb
@@ -57,7 +57,7 @@ glibtop_inodedb_open_s (glibtop *server, unsigned databases, unsigned long cache
const char * const char *
glibtop_inodedb_lookup_s (glibtop *server, glibtop_inodedb_lookup_s (glibtop *server,
glibtop_inodedb *inodedb, glibtop_inodedb *inodedb,
u_int64_t device, u_int64_t inode); guint64 device, guint64 inode);
void void
glibtop_inodedb_close_s (glibtop *server, glibtop_inodedb *inodedb); glibtop_inodedb_close_s (glibtop *server, glibtop_inodedb *inodedb);

View File

@@ -151,17 +151,17 @@ enum _glibtop_interface_flags {
struct _glibtop_ifaddr struct _glibtop_ifaddr
{ {
u_int64_t flags, guint64 flags,
transport; /* GLIBTOP_IFADDR_TRANSPORT */ transport; /* GLIBTOP_IFADDR_TRANSPORT */
u_int8_t addr_len, /* GLIBTOP_IFADDR_ADDR_LEN */ u_int8_t addr_len, /* GLIBTOP_IFADDR_ADDR_LEN */
address [GLIBTOP_IFADDR_LEN]; /* GLIBTOP_IFADDR_ADDRESS */ address [GLIBTOP_IFADDR_LEN]; /* GLIBTOP_IFADDR_ADDRESS */
u_int64_t subnet, /* GLIBTOP_IFADDR_SUBNET */ guint64 subnet, /* GLIBTOP_IFADDR_SUBNET */
scope; /* GLIBTOP_IFADDR_SCOPE */ scope; /* GLIBTOP_IFADDR_SCOPE */
}; };
struct _glibtop_interface struct _glibtop_interface
{ {
u_int64_t flags, guint64 flags,
if_flags, /* GLIBTOP_INTERFACE_IF_FLAGS */ if_flags, /* GLIBTOP_INTERFACE_IF_FLAGS */
transport, /* GLIBTOP_INTERFACE_TRANSPORT */ transport, /* GLIBTOP_INTERFACE_TRANSPORT */
type, /* GLIBTOP_INTERFACE_TYPE */ type, /* GLIBTOP_INTERFACE_TYPE */
@@ -177,14 +177,14 @@ struct _glibtop_interface
#define glibtop_get_interface_names_r glibtop_get_interface_names_s #define glibtop_get_interface_names_r glibtop_get_interface_names_s
#endif #endif
glibtop_interface *glibtop_get_interface_names_l (glibtop_client *client, glibtop_array *array, u_int64_t interface, u_int64_t number, u_int64_t instance, u_int64_t strategy); glibtop_interface *glibtop_get_interface_names_l (glibtop_client *client, glibtop_array *array, guint64 interface, guint64 number, guint64 instance, guint64 strategy);
#if GLIBTOP_SUID_INTERFACE_NAMES #if GLIBTOP_SUID_INTERFACE_NAMES
int glibtop_init_interface_names_p (glibtop_server *server, glibtop_closure *closure); int glibtop_init_interface_names_p (glibtop_server *server, glibtop_closure *closure);
glibtop_interface *glibtop_get_interface_names_p (glibtop_server *server, glibtop_closure *closure, glibtop_array *array, u_int64_t interface, u_int64_t number, u_int64_t instance, u_int64_t strategy); glibtop_interface *glibtop_get_interface_names_p (glibtop_server *server, glibtop_closure *closure, glibtop_array *array, guint64 interface, guint64 number, guint64 instance, guint64 strategy);
#else #else
int glibtop_init_interface_names_s (glibtop_server *server, glibtop_closure *closure); int glibtop_init_interface_names_s (glibtop_server *server, glibtop_closure *closure);
glibtop_interface *glibtop_get_interface_names_s (glibtop_server *server, glibtop_closure *closure, glibtop_array *array, u_int64_t interface, u_int64_t number, u_int64_t instance, u_int64_t strategy); glibtop_interface *glibtop_get_interface_names_s (glibtop_server *server, glibtop_closure *closure, glibtop_array *array, guint64 interface, guint64 number, guint64 instance, guint64 strategy);
#endif #endif
#ifdef GLIBTOP_NAMES #ifdef GLIBTOP_NAMES

View File

@@ -45,8 +45,8 @@ G_BEGIN_DECLS
/* Length of a network interface address in bytes. */ /* Length of a network interface address in bytes. */
#define GLIBTOP_IFADDR_LEN 16 #define GLIBTOP_IFADDR_LEN 16
/* This is ((u_int64_t)-1) */ /* This is ((guint64)-1) */
#define GLIBTOP_UNLIMITED (~(u_int64_t)0) #define GLIBTOP_UNLIMITED (~(guint64)0)
/* Maximum length of a backend name. */ /* Maximum length of a backend name. */
#define GLIBTOP_BACKEND_NAME_LEN 40 #define GLIBTOP_BACKEND_NAME_LEN 40

View File

@@ -40,9 +40,9 @@ typedef struct _glibtop_loadavg glibtop_loadavg;
struct _glibtop_loadavg struct _glibtop_loadavg
{ {
u_int64_t flags; guint64 flags;
double loadavg [3]; /* GLIBTOP_LOADAVG_LOADAVG */ double loadavg [3]; /* GLIBTOP_LOADAVG_LOADAVG */
u_int64_t nr_running, /* GLIBTOP_LOADAVG_NR_RUNNING */ guint64 nr_running, /* GLIBTOP_LOADAVG_NR_RUNNING */
nr_tasks, /* GLIBTOP_LOADAVG_NR_TASKS */ nr_tasks, /* GLIBTOP_LOADAVG_NR_TASKS */
last_pid; /* GLIBTOP_LOADAVG_LAST_PID */ last_pid; /* GLIBTOP_LOADAVG_LAST_PID */
}; };

View File

@@ -44,7 +44,7 @@ typedef struct _glibtop_mem glibtop_mem;
struct _glibtop_mem struct _glibtop_mem
{ {
u_int64_t flags, guint64 flags,
total, /* GLIBTOP_MEM_TOTAL */ total, /* GLIBTOP_MEM_TOTAL */
used, /* GLIBTOP_MEM_USED */ used, /* GLIBTOP_MEM_USED */
free, /* GLIBTOP_MEM_FREE */ free, /* GLIBTOP_MEM_FREE */

View File

@@ -41,7 +41,7 @@ typedef struct _glibtop_mountlist glibtop_mountlist;
struct _glibtop_mountentry struct _glibtop_mountentry
{ {
u_int64_t dev; guint64 dev;
char devname [GLIBTOP_MOUNTENTRY_LEN+1]; char devname [GLIBTOP_MOUNTENTRY_LEN+1];
char mountdir [GLIBTOP_MOUNTENTRY_LEN+1]; char mountdir [GLIBTOP_MOUNTENTRY_LEN+1];
char type [GLIBTOP_MOUNTENTRY_LEN+1]; char type [GLIBTOP_MOUNTENTRY_LEN+1];
@@ -49,7 +49,7 @@ struct _glibtop_mountentry
struct _glibtop_mountlist struct _glibtop_mountlist
{ {
u_int64_t flags, guint64 flags,
number, /* GLIBTOP_MOUNTLIST_NUMBER */ number, /* GLIBTOP_MOUNTLIST_NUMBER */
total, /* GLIBTOP_MOUNTLIST_TOTAL */ total, /* GLIBTOP_MOUNTLIST_TOTAL */
size; /* GLIBTOP_MOUNTLIST_SIZE */ size; /* GLIBTOP_MOUNTLIST_SIZE */

View File

@@ -43,7 +43,7 @@ typedef struct _glibtop_msg_limits glibtop_msg_limits;
struct _glibtop_msg_limits struct _glibtop_msg_limits
{ {
u_int64_t flags, guint64 flags,
msgpool, /* GLIBTOP_IPC_MSGPOOL */ msgpool, /* GLIBTOP_IPC_MSGPOOL */
msgmap, /* GLIBTOP_IPC_MSGMAP */ msgmap, /* GLIBTOP_IPC_MSGMAP */
msgmax, /* GLIBTOP_IPC_MSGMAX */ msgmax, /* GLIBTOP_IPC_MSGMAX */

View File

@@ -45,7 +45,7 @@ typedef struct _glibtop_netinfo glibtop_netinfo;
struct _glibtop_netinfo struct _glibtop_netinfo
{ {
u_int64_t flags, guint64 flags,
if_flags, /* GLIBTOP_NETINFO_IF_FLAGS */ if_flags, /* GLIBTOP_NETINFO_IF_FLAGS */
transport, /* GLIBTOP_NETINFO_TRANSPORT */ transport, /* GLIBTOP_NETINFO_TRANSPORT */
mtu; /* GLIBTOP_NETINFO_MTU */ mtu; /* GLIBTOP_NETINFO_MTU */
@@ -57,14 +57,14 @@ struct _glibtop_netinfo
#define glibtop_get_netinfo_r glibtop_get_netinfo_s #define glibtop_get_netinfo_r glibtop_get_netinfo_s
#endif #endif
glibtop_ifaddr *glibtop_get_netinfo_l (glibtop_client *client, glibtop_array *array, glibtop_netinfo *buf, const char *interface, u_int64_t transport); glibtop_ifaddr *glibtop_get_netinfo_l (glibtop_client *client, glibtop_array *array, glibtop_netinfo *buf, const char *interface, guint64 transport);
#if GLIBTOP_SUID_NETINFO #if GLIBTOP_SUID_NETINFO
int glibtop_init_netinfo_p (glibtop_server *server, glibtop_closure *closure); int glibtop_init_netinfo_p (glibtop_server *server, glibtop_closure *closure);
glibtop_ifaddr *glibtop_get_netinfo_p (glibtop_server *server, glibtop_closure *closure, glibtop_array *array, glibtop_netinfo *buf, const char *interface, u_int64_t transport); glibtop_ifaddr *glibtop_get_netinfo_p (glibtop_server *server, glibtop_closure *closure, glibtop_array *array, glibtop_netinfo *buf, const char *interface, guint64 transport);
#else #else
int glibtop_init_netinfo_s (glibtop_server *server, glibtop_closure *closure); int glibtop_init_netinfo_s (glibtop_server *server, glibtop_closure *closure);
glibtop_ifaddr *glibtop_get_netinfo_s (glibtop_server *server, glibtop_closure *closure, glibtop_array *array, glibtop_netinfo *buf, const char *interface, u_int64_t transport); glibtop_ifaddr *glibtop_get_netinfo_s (glibtop_server *server, glibtop_closure *closure, glibtop_array *array, glibtop_netinfo *buf, const char *interface, guint64 transport);
#endif #endif
#ifdef GLIBTOP_NAMES #ifdef GLIBTOP_NAMES

View File

@@ -69,7 +69,7 @@ enum {
struct _glibtop_netload struct _glibtop_netload
{ {
u_int64_t flags, guint64 flags,
if_flags, /* GLIBTOP_NETLOAD_IF_FLAGS */ if_flags, /* GLIBTOP_NETLOAD_IF_FLAGS */
mtu, /* GLIBTOP_NETLOAD_MTU */ mtu, /* GLIBTOP_NETLOAD_MTU */
subnet, /* GLIBTOP_NETLOAD_SUBNET */ subnet, /* GLIBTOP_NETLOAD_SUBNET */

View File

@@ -45,7 +45,7 @@ enum {
struct _glibtop_ppp struct _glibtop_ppp
{ {
u_int64_t flags, guint64 flags,
state, /* GLIBTOP_PPP_STATE */ state, /* GLIBTOP_PPP_STATE */
bytes_in, /* GLIBTOP_PPP_BYTES_IN */ bytes_in, /* GLIBTOP_PPP_BYTES_IN */
bytes_out; /* GLIBTOP_PPP_BYTES_OUT */ bytes_out; /* GLIBTOP_PPP_BYTES_OUT */

View File

@@ -37,7 +37,7 @@ typedef struct _glibtop_proc_args glibtop_proc_args;
struct _glibtop_proc_args struct _glibtop_proc_args
{ {
u_int64_t flags, guint64 flags,
size; /* GLIBTOP_PROC_ARGS_SIZE */ size; /* GLIBTOP_PROC_ARGS_SIZE */
}; };

View File

@@ -45,7 +45,7 @@ typedef struct _glibtop_proc_cwd glibtop_proc_cwd;
struct _glibtop_proc_cwd struct _glibtop_proc_cwd
{ {
u_int64_t flags, guint64 flags,
size, size,
device, device,
inode; inode;

View File

@@ -47,8 +47,8 @@ typedef struct _glibtop_proc_kernel glibtop_proc_kernel;
struct _glibtop_proc_kernel struct _glibtop_proc_kernel
{ {
u_int64_t flags; guint64 flags;
u_int64_t k_flags, /* kernel flags for the process */ guint64 k_flags, /* kernel flags for the process */
min_flt, /* number of minor page faults since min_flt, /* number of minor page faults since
* process start */ * process start */
maj_flt, /* number of major page faults since maj_flt, /* number of major page faults since

View File

@@ -56,7 +56,7 @@ typedef struct _glibtop_proclist glibtop_proclist;
struct _glibtop_proclist struct _glibtop_proclist
{ {
u_int64_t flags, guint64 flags,
number, /* GLIBTOP_PROCLIST_NUMBER */ number, /* GLIBTOP_PROCLIST_NUMBER */
total, /* GLIBTOP_PROCLIST_TOTAL */ total, /* GLIBTOP_PROCLIST_TOTAL */
size; /* GLIBTOP_PROCLIST_SIZE */ size; /* GLIBTOP_PROCLIST_SIZE */

View File

@@ -59,13 +59,13 @@ typedef struct _glibtop_proc_map glibtop_proc_map;
struct _glibtop_map_entry struct _glibtop_map_entry
{ {
u_int64_t flags, start, end, offset, perm, inode, device; guint64 flags, start, end, offset, perm, inode, device;
char filename [GLIBTOP_MAP_FILENAME_LEN+1]; char filename [GLIBTOP_MAP_FILENAME_LEN+1];
}; };
struct _glibtop_proc_map struct _glibtop_proc_map
{ {
u_int64_t flags, guint64 flags,
number, /* GLIBTOP_PROC_MAP_NUMBER */ number, /* GLIBTOP_PROC_MAP_NUMBER */
total, /* GLIBTOP_PROC_MAP_TOTAL */ total, /* GLIBTOP_PROC_MAP_TOTAL */
size; /* GLIBTOP_PROC_MAP_SIZE */ size; /* GLIBTOP_PROC_MAP_SIZE */

View File

@@ -44,7 +44,7 @@ typedef struct _glibtop_proc_mem glibtop_proc_mem;
struct _glibtop_proc_mem struct _glibtop_proc_mem
{ {
u_int64_t flags, guint64 flags,
size, /* total # of pages of memory */ size, /* total # of pages of memory */
vsize, /* number of pages of virtual memory ... */ vsize, /* number of pages of virtual memory ... */
resident, /* number of resident set resident, /* number of resident set

View File

@@ -46,7 +46,7 @@ typedef struct _glibtop_proc_segment glibtop_proc_segment;
struct _glibtop_proc_segment struct _glibtop_proc_segment
{ {
u_int64_t flags, guint64 flags,
text_rss, /* text resident set size */ text_rss, /* text resident set size */
shlib_rss, /* shared-lib resident set size */ shlib_rss, /* shared-lib resident set size */
data_rss, /* data resident set size */ data_rss, /* data resident set size */

View File

@@ -42,7 +42,7 @@ typedef struct _glibtop_proc_signal glibtop_proc_signal;
struct _glibtop_proc_signal struct _glibtop_proc_signal
{ {
u_int64_t flags, guint64 flags,
signal [2], /* mask of pending signals */ signal [2], /* mask of pending signals */
blocked [2], /* mask of blocked signals */ blocked [2], /* mask of blocked signals */
sigignore [2], /* mask of ignored signals */ sigignore [2], /* mask of ignored signals */

View File

@@ -42,7 +42,7 @@ typedef struct _glibtop_proc_state glibtop_proc_state;
struct _glibtop_proc_state struct _glibtop_proc_state
{ {
u_int64_t flags; guint64 flags;
char cmd[40], /* basename of executable file in char cmd[40], /* basename of executable file in
* call to exec(2) */ * call to exec(2) */
state; /* single-char code for process state state; /* single-char code for process state

View File

@@ -50,7 +50,7 @@ typedef struct _glibtop_proc_time glibtop_proc_time;
struct _glibtop_proc_time struct _glibtop_proc_time
{ {
u_int64_t flags, guint64 flags,
start_time, /* start time of process -- start_time, /* start time of process --
* seconds since 1-1-70 */ * seconds since 1-1-70 */
rtime, /* real time accumulated by process */ rtime, /* real time accumulated by process */

View File

@@ -50,7 +50,7 @@ typedef struct _glibtop_proc_uid glibtop_proc_uid;
struct _glibtop_proc_uid struct _glibtop_proc_uid
{ {
u_int64_t flags; guint64 flags;
int uid, /* user id */ int uid, /* user id */
euid, /* effective user id */ euid, /* effective user id */
gid, /* group id */ gid, /* group id */

View File

@@ -46,7 +46,7 @@ typedef struct _glibtop_sem_limits glibtop_sem_limits;
struct _glibtop_sem_limits struct _glibtop_sem_limits
{ {
u_int64_t flags, guint64 flags,
semmap, /* GLIBTOP_IPC_SEMMAP */ semmap, /* GLIBTOP_IPC_SEMMAP */
semmni, /* GLIBTOP_IPC_SEMMNI */ semmni, /* GLIBTOP_IPC_SEMMNI */
semmns, /* GLIBTOP_IPC_SEMMNS */ semmns, /* GLIBTOP_IPC_SEMMNS */

View File

@@ -41,7 +41,7 @@ typedef struct _glibtop_shm_limits glibtop_shm_limits;
struct _glibtop_shm_limits struct _glibtop_shm_limits
{ {
u_int64_t flags, guint64 flags,
shmmax, /* GLIBTOP_IPC_SHMMAX */ shmmax, /* GLIBTOP_IPC_SHMMAX */
shmmin, /* GLIBTOP_IPC_SHMMIN */ shmmin, /* GLIBTOP_IPC_SHMMIN */
shmmni, /* GLIBTOP_IPC_SHMMNI */ shmmni, /* GLIBTOP_IPC_SHMMNI */

View File

@@ -41,7 +41,7 @@ typedef struct _glibtop_swap glibtop_swap;
struct _glibtop_swap struct _glibtop_swap
{ {
u_int64_t flags, guint64 flags,
total, /* GLIBTOP_SWAP_TOTAL */ total, /* GLIBTOP_SWAP_TOTAL */
used, /* GLIBTOP_SWAP_USED */ used, /* GLIBTOP_SWAP_USED */
free, /* GLIBTOP_SWAP_FREE */ free, /* GLIBTOP_SWAP_FREE */

View File

@@ -64,7 +64,7 @@ typedef struct _glibtop_sysdeps glibtop_sysdeps;
struct _glibtop_sysdeps struct _glibtop_sysdeps
{ {
u_int64_t flags, guint64 flags,
features, /* server features */ features, /* server features */
cpu, /* glibtop_cpu */ cpu, /* glibtop_cpu */
mem, /* glibtop_mem */ mem, /* glibtop_mem */

View File

@@ -49,7 +49,7 @@ struct _glibtop_entry
struct _glibtop_sysinfo struct _glibtop_sysinfo
{ {
u_int64_t flags, ncpu; guint64 flags, ncpu;
glibtop_entry cpuinfo [GLIBTOP_NCPU]; glibtop_entry cpuinfo [GLIBTOP_NCPU];
}; };

View File

@@ -38,7 +38,7 @@ typedef struct _glibtop_uptime glibtop_uptime;
struct _glibtop_uptime struct _glibtop_uptime
{ {
u_int64_t flags; guint64 flags;
double uptime, /* GLIBTOP_UPTIME_UPTIME */ double uptime, /* GLIBTOP_UPTIME_UPTIME */
idletime; /* GLIBTOP_UPTIME_IDLETIME */ idletime; /* GLIBTOP_UPTIME_IDLETIME */
}; };

View File

@@ -146,7 +146,7 @@ load_extra_libs (glibtop_backend_entry *entry, GError **error)
} }
glibtop_backend * glibtop_backend *
glibtop_backend_get (const char *backend_name, u_int64_t features, glibtop_backend_get (const char *backend_name, guint64 features,
const char **backend_args, GError **error) const char **backend_args, GError **error)
{ {
const glibtop_backend_info *info; const glibtop_backend_info *info;

View File

@@ -211,7 +211,7 @@ glibtop_client_propagate_warning (glibtop_client *client, GError *error)
void void
glibtop_client_open_backend (glibtop_client *client, const char *backend_name, glibtop_client_open_backend (glibtop_client *client, const char *backend_name,
u_int64_t features, const char **backend_args) guint64 features, const char **backend_args)
{ {
glibtop_backend *backend; glibtop_backend *backend;
GError *error = NULL; GError *error = NULL;

View File

@@ -79,7 +79,7 @@ glibtop_inodedb_open_s (glibtop *server, unsigned databases,
const char * const char *
glibtop_inodedb_lookup_s (glibtop *server, glibtop_inodedb_lookup_s (glibtop *server,
glibtop_inodedb *inodedb, glibtop_inodedb *inodedb,
u_int64_t device, u_int64_t inode) guint64 device, guint64 inode)
{ {
glibtop_inodedb_key key; glibtop_inodedb_key key;
datum d_key, d_content; datum d_key, d_content;

View File

@@ -37,9 +37,9 @@ print '';
print 'static void'; print 'static void';
print '_glibtop_missing_feature (glibtop *server, const char *feature,'; print '_glibtop_missing_feature (glibtop *server, const char *feature,';
print "\t\t\t const u_int64_t present, u_int64_t *required)"; print "\t\t\t const guint64 present, guint64 *required)";
print '{'; print '{';
print "\tu_int64_t old_required = *required;\n"; print "\tguint64 old_required = *required;\n";
print "\t/* Return if we have all required fields. */"; print "\t/* Return if we have all required fields. */";
print "\tif ((~present & old_required) == 0)"; print "\tif ((~present & old_required) == 0)";
print "\t\treturn;\n"; print "\t\treturn;\n";
@@ -68,7 +68,7 @@ print '/* Library functions. */';
print ''; print '';
$convert{'long'} = 'int64_t'; $convert{'long'} = 'int64_t';
$convert{'ulong'} = 'u_int64_t'; $convert{'ulong'} = 'guint64';
$convert{'pid_t'} = 'pid_t'; $convert{'pid_t'} = 'pid_t';
$convert{'int'} = 'int'; $convert{'int'} = 'int';
$convert{'ushort'} = 'unsigned short'; $convert{'ushort'} = 'unsigned short';

View File

@@ -1,3 +1,7 @@
2003-10-20 Bastien Nocera <hadess@hadess.net>
* c_types.pl: s/u_int64_t/guint64/
2000-01-02 Martin Baulig <martin@home-of-linux.org> 2000-01-02 Martin Baulig <martin@home-of-linux.org>
* c_types.pl ($demarshal_funcs): New variable. * c_types.pl ($demarshal_funcs): New variable.

View File

@@ -50,7 +50,7 @@ my $c_demarshal_func = sub {
# #
$typeinfo = {'long' => ['int64_t', 0], $typeinfo = {'long' => ['int64_t', 0],
'ulong' => ['u_int64_t', 0], 'ulong' => ['guint64', 0],
'pid_t' => ['pid_t', 0], 'pid_t' => ['pid_t', 0],
'int' => ['int', 0], 'int' => ['int', 0],
'retval' => ['int', 0], 'retval' => ['int', 0],

View File

@@ -58,10 +58,10 @@ To look up an entry, use the `glibtop_inodedb_lookup ()' function:
const char * const char *
glibtop_inodedb_lookup (glibtop_inodedb *inodedb, glibtop_inodedb_lookup (glibtop_inodedb *inodedb,
u_int64_t device, u_int64_t inode) guint64 device, guint64 inode)
const char * const char *
glibtop_inodedb_lookup_s (glibtop *server, glibtop_inodedb *inodedb, glibtop_inodedb_lookup_s (glibtop *server, glibtop_inodedb *inodedb,
u_int64_t device, u_int64_t inode) guint64 device, guint64 inode)
It will either return a pointer to the filename - which you have to It will either return a pointer to the filename - which you have to
`g_free ()' once done with it - or NULL on error. `g_free ()' once done with it - or NULL on error.

View File

@@ -75,8 +75,8 @@ main (int argc, char *argv [])
d_content.dptr = dirname; d_content.dptr = dirname;
d_content.dsize = strlen (dirname) + 1; d_content.dsize = strlen (dirname) + 1;
key.device = (u_int64_t) statb.st_dev; key.device = (guint64) statb.st_dev;
key.inode = (u_int64_t) statb.st_ino; key.inode = (guint64) statb.st_ino;
if (gdbm_store (dbf, d_key, d_content, GDBM_REPLACE)) if (gdbm_store (dbf, d_key, d_content, GDBM_REPLACE))
glibtop_error_io ("gdbm_store (%s)", dirname); glibtop_error_io ("gdbm_store (%s)", dirname);
@@ -113,8 +113,8 @@ main (int argc, char *argv [])
d_content.dptr = filename; d_content.dptr = filename;
d_content.dsize = strlen (filename) + 1; d_content.dsize = strlen (filename) + 1;
key.device = (u_int64_t) statb.st_dev; key.device = (guint64) statb.st_dev;
key.inode = (u_int64_t) statb.st_ino; key.inode = (guint64) statb.st_ino;
if (gdbm_store (dbf, d_key, d_content, GDBM_REPLACE)) if (gdbm_store (dbf, d_key, d_content, GDBM_REPLACE))
glibtop_error_io ("gdbm_store (%s)", filename); glibtop_error_io ("gdbm_store (%s)", filename);

View File

@@ -1,3 +1,7 @@
2003-10-20 Bastien Nocera <hadess@hadess.net>
* procsignal.c: (glibtop_get_proc_signal_s): s/u_int64_t/guint64/
2003-10-20 Bastien Nocera <hadess@hadess.net> 2003-10-20 Bastien Nocera <hadess@hadess.net>
* glibtop_machine.h: * glibtop_machine.h:

View File

@@ -66,7 +66,7 @@ glibtop_get_proc_signal_s (glibtop *server, glibtop_proc_signal *buf,
/* pending signals */ /* pending signals */
#define NB_BITS (8 * sizeof(u_int64_t)) #define NB_BITS (8 * sizeof(guint64))
for (i = 0; (i < NSIG) && (i < 2 * NB_BITS); i++) for (i = 0; (i < NSIG) && (i < 2 * NB_BITS); i++)
{ {

View File

@@ -1,3 +1,11 @@
2003-10-20 Bastien Nocera <hadess@hadess.net>
* ChangeLog:
* backend.c: (_open_common):
* fsusage.c:
* fsusage.h:
* inodedb.c: (glibtop_inodedb_lookup_s): s/u_int64_t/guint64/
2003-10-20 Bastien Nocera <hadess@hadess.net> 2003-10-20 Bastien Nocera <hadess@hadess.net>
* inodedb.c: * inodedb.c:
@@ -14,9 +22,9 @@
2000-01-20 Martin Baulig <martin@home-of-linux.org> 2000-01-20 Martin Baulig <martin@home-of-linux.org>
* fsusage.c (adjust_blocks): Use `u_int64_t' arguments and * fsusage.c (adjust_blocks): Use `guint64' arguments and
return value to avoid long int overflows on machines with large return value to avoid long int overflows on machines with large
disks. disks.
* fsusage.h (struct fs_usage): Use `u_int64_t' here as well. * fsusage.h (struct fs_usage): Use `guint64' here as well.

View File

@@ -33,7 +33,7 @@
static int static int
_open_common (glibtop_server *server, glibtop_backend *backend, _open_common (glibtop_server *server, glibtop_backend *backend,
u_int64_t features, const char **backend_args) guint64 features, const char **backend_args)
{ {
return 0; return 0;
} }

View File

@@ -75,9 +75,9 @@ int safe_read ();
BLOCKS FROMSIZE-byte blocks, rounding away from zero. BLOCKS FROMSIZE-byte blocks, rounding away from zero.
TOSIZE must be positive. Return -1 if FROMSIZE is not positive. */ TOSIZE must be positive. Return -1 if FROMSIZE is not positive. */
static u_int64_t static guint64
adjust_blocks (blocks, fromsize, tosize) adjust_blocks (blocks, fromsize, tosize)
u_int64_t blocks; guint64 blocks;
int fromsize, tosize; int fromsize, tosize;
{ {
if (tosize <= 0) if (tosize <= 0)
@@ -88,9 +88,9 @@ adjust_blocks (blocks, fromsize, tosize)
if (fromsize == tosize) /* e.g., from 512 to 512 */ if (fromsize == tosize) /* e.g., from 512 to 512 */
return blocks; return blocks;
else if (fromsize > tosize) /* e.g., from 2048 to 512 */ else if (fromsize > tosize) /* e.g., from 2048 to 512 */
return blocks * (u_int64_t)(fromsize / tosize); return blocks * (guint64)(fromsize / tosize);
else /* e.g., from 256 to 512 */ else /* e.g., from 256 to 512 */
return (blocks + (blocks < 0 ? -1 : 1)) / (u_int64_t)(tosize / fromsize); return (blocks + (blocks < 0 ? -1 : 1)) / (guint64)(tosize / fromsize);
} }
/* Fill in the fields of FSP with information about space usage for /* Fill in the fields of FSP with information about space usage for
@@ -107,7 +107,7 @@ get_fs_usage (path, disk, fsp)
struct fs_usage *fsp; struct fs_usage *fsp;
{ {
#ifdef STAT_STATFS3_OSF1 #ifdef STAT_STATFS3_OSF1
# define CONVERT_BLOCKS(B) adjust_blocks ((u_int64_t)(B), fsd.f_fsize, 512) # define CONVERT_BLOCKS(B) adjust_blocks ((guint64)(B), fsd.f_fsize, 512)
struct statfs fsd; struct statfs fsd;
@@ -117,7 +117,7 @@ get_fs_usage (path, disk, fsp)
#endif /* STAT_STATFS3_OSF1 */ #endif /* STAT_STATFS3_OSF1 */
#ifdef STAT_STATFS2_FS_DATA /* Ultrix */ #ifdef STAT_STATFS2_FS_DATA /* Ultrix */
# define CONVERT_BLOCKS(B) adjust_blocks ((u_int64_t)(B), 1024, 512) # define CONVERT_BLOCKS(B) adjust_blocks ((guint64)(B), 1024, 512)
struct fs_data fsd; struct fs_data fsd;
@@ -136,7 +136,7 @@ get_fs_usage (path, disk, fsp)
# define SUPERBOFF (SUPERB * 512) # define SUPERBOFF (SUPERB * 512)
# endif # endif
# define CONVERT_BLOCKS(B) \ # define CONVERT_BLOCKS(B) \
adjust_blocks ((u_int64_t)(B), (fsd.s_type == Fs2b ? 1024 : 512), 512) adjust_blocks ((guint64)(B), (fsd.s_type == Fs2b ? 1024 : 512), 512)
struct filsys fsd; struct filsys fsd;
int fd; int fd;
@@ -166,7 +166,7 @@ get_fs_usage (path, disk, fsp)
#endif /* STAT_READ_FILSYS */ #endif /* STAT_READ_FILSYS */
#ifdef STAT_STATFS2_BSIZE /* 4.3BSD, SunOS 4, HP-UX, AIX */ #ifdef STAT_STATFS2_BSIZE /* 4.3BSD, SunOS 4, HP-UX, AIX */
# define CONVERT_BLOCKS(B) adjust_blocks ((u_int64_t)(B), fsd.f_bsize, 512) # define CONVERT_BLOCKS(B) adjust_blocks ((guint64)(B), fsd.f_bsize, 512)
struct statfs fsd; struct statfs fsd;
@@ -191,7 +191,7 @@ get_fs_usage (path, disk, fsp)
#endif /* STAT_STATFS2_BSIZE */ #endif /* STAT_STATFS2_BSIZE */
#ifdef STAT_STATFS2_FSIZE /* 4.4BSD */ #ifdef STAT_STATFS2_FSIZE /* 4.4BSD */
# define CONVERT_BLOCKS(B) adjust_blocks ((u_int64_t)(B), fsd.f_fsize, 512) # define CONVERT_BLOCKS(B) adjust_blocks ((guint64)(B), fsd.f_fsize, 512)
struct statfs fsd; struct statfs fsd;
@@ -202,7 +202,7 @@ get_fs_usage (path, disk, fsp)
#ifdef STAT_STATFS4 /* SVR3, Dynix, Irix, AIX */ #ifdef STAT_STATFS4 /* SVR3, Dynix, Irix, AIX */
# if _AIX || defined(_CRAY) # if _AIX || defined(_CRAY)
# define CONVERT_BLOCKS(B) adjust_blocks ((u_int64_t)(B), fsd.f_bsize, 512) # define CONVERT_BLOCKS(B) adjust_blocks ((guint64)(B), fsd.f_bsize, 512)
# ifdef _CRAY # ifdef _CRAY
# define f_bavail f_bfree # define f_bavail f_bfree
# endif # endif
@@ -227,7 +227,7 @@ get_fs_usage (path, disk, fsp)
#ifdef STAT_STATVFS /* SVR4 */ #ifdef STAT_STATVFS /* SVR4 */
# define CONVERT_BLOCKS(B) \ # define CONVERT_BLOCKS(B) \
adjust_blocks ((u_int64_t)(B), fsd.f_frsize ? fsd.f_frsize : fsd.f_bsize, 512) adjust_blocks ((guint64)(B), fsd.f_frsize ? fsd.f_frsize : fsd.f_bsize, 512)
struct statvfs fsd; struct statvfs fsd;

View File

@@ -18,10 +18,10 @@
/* Space usage statistics for a filesystem. Blocks are 512-byte. */ /* Space usage statistics for a filesystem. Blocks are 512-byte. */
struct fs_usage struct fs_usage
{ {
u_int64_t fsu_blocks; /* Total blocks. */ guint64 fsu_blocks; /* Total blocks. */
u_int64_t fsu_bfree; /* Free blocks available to superuser. */ guint64 fsu_bfree; /* Free blocks available to superuser. */
u_int64_t fsu_bavail; /* Free blocks available to non-superuser. */ guint64 fsu_bavail; /* Free blocks available to non-superuser. */
u_int64_t fsu_files; /* Total file nodes. */ guint64 fsu_files; /* Total file nodes. */
u_int64_t fsu_ffree; /* Free file nodes. */ guint64 fsu_ffree; /* Free file nodes. */
}; };

View File

@@ -79,7 +79,7 @@ glibtop_inodedb_open_s (glibtop *server, unsigned databases,
const char * const char *
glibtop_inodedb_lookup_s (glibtop *server, glibtop_inodedb_lookup_s (glibtop *server,
glibtop_inodedb *inodedb, glibtop_inodedb *inodedb,
u_int64_t device, u_int64_t inode) guint64 device, guint64 inode)
{ {
glibtop_inodedb_key key; glibtop_inodedb_key key;
datum d_key, d_content; datum d_key, d_content;

View File

@@ -1,3 +1,10 @@
2003-10-20 Bastien Nocera <hadess@hadess.net>
* mem.c: (glibtop_get_mem_p):
* prockernel.c: (glibtop_get_proc_kernel_p):
* procmem.c: (glibtop_get_proc_mem_p):
* proctime.c: (glibtop_get_proc_time_p): s/u_int64_t/guint64/
2003-10-20 Bastien Nocera <hadess@hadess.net> 2003-10-20 Bastien Nocera <hadess@hadess.net>
* swap.c: (glibtop_get_swap_p): fix swap sizes in FreeBSD, * swap.c: (glibtop_get_swap_p): fix swap sizes in FreeBSD,

View File

@@ -192,26 +192,26 @@ glibtop_get_mem_p (glibtop *server, glibtop_mem *buf)
v_free_count = vmm.v_free_count; v_free_count = vmm.v_free_count;
#endif #endif
buf->total = (u_int64_t) pagetok (v_total_count) << LOG1024; buf->total = (guint64) pagetok (v_total_count) << LOG1024;
buf->used = (u_int64_t) pagetok (v_used_count) << LOG1024; buf->used = (guint64) pagetok (v_used_count) << LOG1024;
buf->free = (u_int64_t) pagetok (v_free_count) << LOG1024; buf->free = (guint64) pagetok (v_free_count) << LOG1024;
#ifdef __FreeBSD__ #ifdef __FreeBSD__
buf->cached = (u_int64_t) pagetok (vmm.v_cache_count) << LOG1024; buf->cached = (guint64) pagetok (vmm.v_cache_count) << LOG1024;
#endif #endif
#if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) #if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
buf->locked = (u_int64_t) pagetok (uvmexp.wired) << LOG1024; buf->locked = (guint64) pagetok (uvmexp.wired) << LOG1024;
#else #else
buf->locked = (u_int64_t) pagetok (vmm.v_wire_count) << LOG1024; buf->locked = (guint64) pagetok (vmm.v_wire_count) << LOG1024;
#endif #endif
buf->shared = (u_int64_t) pagetok (vmt.t_rmshr) << LOG1024; buf->shared = (guint64) pagetok (vmt.t_rmshr) << LOG1024;
#if __FreeBSD__ #if __FreeBSD__
buf->buffer = (u_int64_t) bufspace; buf->buffer = (guint64) bufspace;
#else #else
buf->buffer = (u_int64_t) pagetok (bufspace) << LOG1024; buf->buffer = (guint64) pagetok (bufspace) << LOG1024;
#endif #endif
/* user */ /* user */

View File

@@ -141,10 +141,10 @@ glibtop_get_proc_kernel_p (glibtop *server,
* leave them 0. * leave them 0.
*/ */
buf->min_flt = (u_int64_t) pstats.p_ru.ru_minflt; buf->min_flt = (guint64) pstats.p_ru.ru_minflt;
buf->maj_flt = (u_int64_t) pstats.p_ru.ru_majflt; buf->maj_flt = (guint64) pstats.p_ru.ru_majflt;
buf->cmin_flt = (u_int64_t) pstats.p_cru.ru_minflt; buf->cmin_flt = (guint64) pstats.p_cru.ru_minflt;
buf->cmaj_flt = (u_int64_t) pstats.p_cru.ru_majflt; buf->cmaj_flt = (guint64) pstats.p_cru.ru_majflt;
buf->flags |= _glibtop_sysdeps_proc_kernel_pstats; buf->flags |= _glibtop_sysdeps_proc_kernel_pstats;
} }
@@ -157,21 +157,21 @@ glibtop_get_proc_kernel_p (glibtop *server,
#ifdef __FreeBSD__ #ifdef __FreeBSD__
#ifndef __alpha__ #ifndef __alpha__
#if (__FreeBSD_version >= 300003) #if (__FreeBSD_version >= 300003)
buf->kstk_esp = (u_int64_t) pcb.pcb_esp; buf->kstk_esp = (guint64) pcb.pcb_esp;
buf->kstk_eip = (u_int64_t) pcb.pcb_eip; buf->kstk_eip = (guint64) pcb.pcb_eip;
#else #else
buf->kstk_esp = (u_int64_t) pcb.pcb_ksp; buf->kstk_esp = (guint64) pcb.pcb_ksp;
buf->kstk_eip = (u_int64_t) pcb.pcb_pc; buf->kstk_eip = (guint64) pcb.pcb_pc;
#endif #endif
#else #else
/*xxx FreeBSD/Alpha? */ /*xxx FreeBSD/Alpha? */
#endif #endif
#else #else
buf->kstk_esp = (u_int64_t) pcb.pcb_tss.tss_esp0; buf->kstk_esp = (guint64) pcb.pcb_tss.tss_esp0;
#ifdef __bsdi__ #ifdef __bsdi__
buf->kstk_eip = (u_int64_t) pcb.pcb_tss.tss_eip; buf->kstk_eip = (guint64) pcb.pcb_tss.tss_eip;
#else #else
buf->kstk_eip = (u_int64_t) pcb.pcb_tss.__tss_eip; buf->kstk_eip = (guint64) pcb.pcb_tss.__tss_eip;
#endif #endif
buf->flags |= _glibtop_sysdeps_proc_kernel_pcb; buf->flags |= _glibtop_sysdeps_proc_kernel_pcb;

View File

@@ -144,15 +144,15 @@ glibtop_get_proc_mem_p (glibtop *server, glibtop_proc_mem *buf,
return; return;
} }
buf->rss_rlim = (u_int64_t) buf->rss_rlim = (guint64)
(plimit.pl_rlimit [RLIMIT_RSS].rlim_cur); (plimit.pl_rlimit [RLIMIT_RSS].rlim_cur);
vms = &pinfo [0].kp_eproc.e_vm; vms = &pinfo [0].kp_eproc.e_vm;
buf->vsize = buf->size = (u_int64_t) pagetok buf->vsize = buf->size = (guint64) pagetok
(vms->vm_tsize + vms->vm_dsize + vms->vm_ssize) << LOG1024; (vms->vm_tsize + vms->vm_dsize + vms->vm_ssize) << LOG1024;
buf->resident = buf->rss = (u_int64_t) pagetok buf->resident = buf->rss = (guint64) pagetok
(vms->vm_rssize) << LOG1024; (vms->vm_rssize) << LOG1024;
/* Now we get the shared memory. */ /* Now we get the shared memory. */

View File

@@ -39,7 +39,7 @@ static const unsigned long _glibtop_sysdeps_proc_time_user =
(1L << GLIBTOP_PROC_TIME_CUTIME) + (1L << GLIBTOP_PROC_TIME_CSTIME) + (1L << GLIBTOP_PROC_TIME_CUTIME) + (1L << GLIBTOP_PROC_TIME_CSTIME) +
(1L << GLIBTOP_PROC_TIME_START_TIME); (1L << GLIBTOP_PROC_TIME_START_TIME);
#define tv2sec(tv) (((u_int64_t) tv.tv_sec * 1000000) + (u_int64_t) tv.tv_usec) #define tv2sec(tv) (((guint64) tv.tv_sec * 1000000) + (guint64) tv.tv_usec)
/* Init function. */ /* Init function. */
@@ -83,7 +83,7 @@ calcru(p, up, sp, ip)
#if (defined __FreeBSD__) && (__FreeBSD_version >= 300003) #if (defined __FreeBSD__) && (__FreeBSD_version >= 300003)
/* This was changed from a `struct timeval' into a `u_int64_t' /* This was changed from a `struct timeval' into a `guint64'
* on FreeBSD 3.0 and renamed p_rtime -> p_runtime. * on FreeBSD 3.0 and renamed p_rtime -> p_runtime.
*/ */
@@ -188,7 +188,7 @@ glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf,
buf->cutime = tv2sec (pstats.p_cru.ru_utime); buf->cutime = tv2sec (pstats.p_cru.ru_utime);
buf->cstime = tv2sec (pstats.p_cru.ru_stime); buf->cstime = tv2sec (pstats.p_cru.ru_stime);
buf->start_time = (u_int64_t) pstats.p_start.tv_sec; buf->start_time = (guint64) pstats.p_start.tv_sec;
buf->flags |= _glibtop_sysdeps_proc_time_user; buf->flags |= _glibtop_sysdeps_proc_time_user;
#else #else

View File

@@ -1,3 +1,7 @@
2003-10-20 Bastien Nocera <hadess@hadess.net>
* glibtop_private.h: s/u_int64_t/guint64/
2003-10-20 Bastien Nocera <hadess@hadess.net> 2003-10-20 Bastien Nocera <hadess@hadess.net>
* glibtop_private.h: * glibtop_private.h:

View File

@@ -48,7 +48,7 @@ glibtop_get_proc_data_swap_s (glibtop *server, libgtop_swap_t *swap);
int int
glibtop_get_proc_data_proclist_s (glibtop *server, glibtop_get_proc_data_proclist_s (glibtop *server,
libgtop_proclist_t *proclist, libgtop_proclist_t *proclist,
u_int64_t which, u_int64_t arg); guint64 which, guint64 arg);
int int
glibtop_get_proc_data_proc_state_s (glibtop *server, glibtop_get_proc_data_proc_state_s (glibtop *server,

View File

@@ -1,3 +1,8 @@
2003-10-20 Bastien Nocera <hadess@hadess.net>
* cpu.c: (glibtop_get_cpu_s):
* procmap.c: (glibtop_get_proc_map_s): s/u_int64_t/guint64/
2003-10-20 Bastien Nocera <hadess@hadess.net> 2003-10-20 Bastien Nocera <hadess@hadess.net>
* glibtop_machine.h: * glibtop_machine.h:

View File

@@ -55,7 +55,7 @@ glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
{ {
char buffer [BUFSIZ], *p; char buffer [BUFSIZ], *p;
int fd, len, i; int fd, len, i;
u_int64_t total; guint64 total;
glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0); glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0);

View File

@@ -112,13 +112,13 @@ glibtop_get_proc_map_s (glibtop *server, glibtop_proc_map *buf, pid_t pid)
entry_list [n].flags = _glibtop_sysdeps_map_entry; entry_list [n].flags = _glibtop_sysdeps_map_entry;
entry_list [n].start = (u_int64_t) start; entry_list [n].start = (guint64) start;
entry_list [n].end = (u_int64_t) end; entry_list [n].end = (guint64) end;
entry_list [n].offset = (u_int64_t) offset; entry_list [n].offset = (guint64) offset;
entry_list [n].perm = (u_int64_t) perm; entry_list [n].perm = (guint64) perm;
entry_list [n].device = (u_int64_t) (dev_major << 8) + entry_list [n].device = (guint64) (dev_major << 8) +
(u_int64_t) dev_minor; (guint64) dev_minor;
entry_list [n].inode = (u_int64_t) inode; entry_list [n].inode = (guint64) inode;
strncpy (entry_list [n].filename, fn, GLIBTOP_MAP_FILENAME_LEN); strncpy (entry_list [n].filename, fn, GLIBTOP_MAP_FILENAME_LEN);
entry_list [n].filename [GLIBTOP_MAP_FILENAME_LEN] = 0; entry_list [n].filename [GLIBTOP_MAP_FILENAME_LEN] = 0;

View File

@@ -1,3 +1,8 @@
2003-10-20 Bastien Nocera <hadess@hadess.net>
* mem.c: (glibtop_get_mem_s):
* swap.c: (glibtop_get_swap_s): s/u_int64_t/guint64/
2003-10-20 Bastien Nocera <hadess@hadess.net> 2003-10-20 Bastien Nocera <hadess@hadess.net>
* glibtop_machine.h: * glibtop_machine.h:

View File

@@ -63,7 +63,7 @@ glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
memset (buf, 0, sizeof (glibtop_mem)); memset (buf, 0, sizeof (glibtop_mem));
buf->total = (u_int64_t)sysconf(_SC_PHYS_PAGES) << pagesize << 10; buf->total = (guint64)sysconf(_SC_PHYS_PAGES) << pagesize << 10;
buf->flags = _glibtop_sysdeps_mem_os_sysconf; buf->flags = _glibtop_sysdeps_mem_os_sysconf;
if(!kc) if(!kc)

View File

@@ -49,7 +49,7 @@ glibtop_get_swap_s (glibtop *server, glibtop_swap *buf)
{ {
kstat_ctl_t *kc = server->machine.kc; kstat_ctl_t *kc = server->machine.kc;
kstat_t *ksp = server->machine.vminfo_kstat; kstat_t *ksp = server->machine.vminfo_kstat;
u_int64_t swap_resv, swap_alloc, swap_avail, swap_free; guint64 swap_resv, swap_alloc, swap_avail, swap_free;
vminfo_t vminfo; vminfo_t vminfo;
double rate; double rate;
kid_t ret; kid_t ret;