From b2283f7c79c0291901c1ea616190e4befd544767 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Mon, 20 Oct 2003 20:12:28 +0000 Subject: [PATCH] - s/u_int64_t/guint64/ --- ChangeLog | 53 ++++++++++++++++++++++++-- acconfig.h | 2 +- acinclude.m4 | 2 +- backends/common/ChangeLog | 4 ++ backends/common/backend-common.c | 4 +- backends/server/ChangeLog | 6 +++ backends/server/backend-server.c | 4 +- backends/server/backend-server.h | 2 +- backends/server/command.h.in | 6 +-- backends/sysdeps/ChangeLog | 4 ++ backends/sysdeps/backend-sysdeps.c | 4 +- doc/ChangeLog | 4 ++ doc/reference.texi | 52 ++++++++++++------------- include/glibtop/array.h | 2 +- include/glibtop/command.h | 6 +-- include/glibtop/cpu.h | 2 +- include/glibtop/fsusage.h | 2 +- include/glibtop/glibtop-backend-info.h | 2 +- include/glibtop/glibtop-backend.h | 2 +- include/glibtop/glibtop-client.h | 2 +- include/glibtop/inodedb.h | 4 +- include/glibtop/interfaces.h | 12 +++--- include/glibtop/limits.h | 4 +- include/glibtop/loadavg.h | 4 +- include/glibtop/mem.h | 2 +- include/glibtop/mountlist.h | 4 +- include/glibtop/msg_limits.h | 2 +- include/glibtop/netinfo.h | 8 ++-- include/glibtop/netload.h | 2 +- include/glibtop/ppp.h | 2 +- include/glibtop/procargs.h | 2 +- include/glibtop/proccwd.h | 2 +- include/glibtop/prockernel.h | 4 +- include/glibtop/proclist.h | 2 +- include/glibtop/procmap.h | 4 +- include/glibtop/procmem.h | 2 +- include/glibtop/procsegment.h | 2 +- include/glibtop/procsignal.h | 2 +- include/glibtop/procstate.h | 2 +- include/glibtop/proctime.h | 2 +- include/glibtop/procuid.h | 2 +- include/glibtop/sem_limits.h | 2 +- include/glibtop/shm_limits.h | 2 +- include/glibtop/swap.h | 2 +- include/glibtop/sysdeps.h | 2 +- include/glibtop/sysinfo.h | 2 +- include/glibtop/uptime.h | 2 +- lib/glibtop-backend.c | 2 +- lib/glibtop-client.c | 2 +- lib/inodedb.c | 2 +- lib/lib.pl | 6 +-- scripts/ChangeLog | 4 ++ scripts/c_types.pl | 2 +- src/inodedb/README.inodedb | 4 +- src/inodedb/mkinodedb2.c | 8 ++-- sysdeps/aix/ChangeLog | 4 ++ sysdeps/aix/procsignal.c | 2 +- sysdeps/common/ChangeLog | 12 +++++- sysdeps/common/backend.c | 2 +- sysdeps/common/fsusage.c | 22 +++++------ sysdeps/common/fsusage.h | 10 ++--- sysdeps/common/inodedb.c | 2 +- sysdeps/freebsd/ChangeLog | 7 ++++ sysdeps/freebsd/mem.c | 18 ++++----- sysdeps/freebsd/prockernel.c | 22 +++++------ sysdeps/freebsd/procmem.c | 6 +-- sysdeps/freebsd/proctime.c | 6 +-- sysdeps/kernel/ChangeLog | 4 ++ sysdeps/kernel/glibtop_private.h | 2 +- sysdeps/linux/ChangeLog | 5 +++ sysdeps/linux/cpu.c | 2 +- sysdeps/linux/procmap.c | 14 +++---- sysdeps/solaris/ChangeLog | 5 +++ sysdeps/solaris/mem.c | 2 +- sysdeps/solaris/swap.c | 2 +- 75 files changed, 263 insertions(+), 163 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8704ebb2..ff389260 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,48 @@ +2003-10-20 Bastien Nocera + + * 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 * Makefile.am: fix distchecking, release 2.5.0 @@ -929,7 +974,7 @@ 1998-10-20 Martin Baulig * 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 than 64 signals. @@ -939,7 +984,7 @@ [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 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, @@ -1280,14 +1325,14 @@ 1998-07-30 Martin Baulig - * acconfig.h (u_int64_t, int64_t): Added. + * acconfig.h (guint64, int64_t): Added. * lib/lib.awk: Using correct `(1 << GLIBTOP_SYSDEPS_)' in call to `glibtop_init_r'. * 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 the server on a 64bit system. diff --git a/acconfig.h b/acconfig.h index c392ae2a..4ad8f2a5 100644 --- a/acconfig.h +++ b/acconfig.h @@ -126,7 +126,7 @@ #undef HAVE_GUILE #undef ssize_t -#undef u_int64_t +#undef guint64 #undef int64_t #undef HAVE_GLIBTOP_MACHINE_H diff --git a/acinclude.m4 b/acinclude.m4 index 3a328468..70b16cbb 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -43,7 +43,7 @@ dnl AC_DEFUN([GNOME_LIBGTOP_TYPES], [ 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) ]) diff --git a/backends/common/ChangeLog b/backends/common/ChangeLog index b613895f..0aa9b4fb 100644 --- a/backends/common/ChangeLog +++ b/backends/common/ChangeLog @@ -1,3 +1,7 @@ +2003-10-20 Bastien Nocera + + * backend-common.c: (_open_common): s/u_int64_t/guint64/ + 2003-10-20 Bastien Nocera * backend-common.h: fixed compilation diff --git a/backends/common/backend-common.c b/backends/common/backend-common.c index 840f3ee1..4f1bb92c 100644 --- a/backends/common/backend-common.c +++ b/backends/common/backend-common.c @@ -26,7 +26,7 @@ #include static int -_open_common (glibtop_server *, glibtop_backend *, u_int64_t, const char **); +_open_common (glibtop_server *, glibtop_backend *, guint64, const char **); static int _close_common (glibtop_server *, glibtop_backend *, void *closure); @@ -47,7 +47,7 @@ glibtop_backend_info LibGTopBackendInfo_Common = { static int _open_common (glibtop_server *server, glibtop_backend *backend, - u_int64_t features, const char **backend_args) + guint64 features, const char **backend_args) { return 0; } diff --git a/backends/server/ChangeLog b/backends/server/ChangeLog index cab2e7da..d6612a04 100644 --- a/backends/server/ChangeLog +++ b/backends/server/ChangeLog @@ -1,3 +1,9 @@ +2003-10-20 Bastien Nocera + + * backend-server.c: (_open_server): + * backend-server.h: + * command.h.in: s/u_int64_t/guint64/ + 2003-10-20 Bastien Nocera * backend-server.h: diff --git a/backends/server/backend-server.c b/backends/server/backend-server.c index 9add91df..3b24abaf 100644 --- a/backends/server/backend-server.c +++ b/backends/server/backend-server.c @@ -26,7 +26,7 @@ #include static int -_open_server (glibtop_server *, glibtop_backend *, u_int64_t, const char **); +_open_server (glibtop_server *, glibtop_backend *, guint64, const char **); static int _close_server (glibtop_server *, glibtop_backend *, void *); @@ -47,7 +47,7 @@ glibtop_backend_info LibGTopBackendInfo_Server = { static int _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; diff --git a/backends/server/backend-server.h b/backends/server/backend-server.h index a034349a..74a15aea 100644 --- a/backends/server/backend-server.h +++ b/backends/server/backend-server.h @@ -37,7 +37,7 @@ typedef struct _backend_server_private backend_server_private; struct _backend_server_private { - u_int64_t flags; + guint64 flags; int input [2]; /* Pipe client <- server */ int output [2]; /* Pipe client -> server */ pid_t pid; /* PID of the server */ diff --git a/backends/server/command.h.in b/backends/server/command.h.in index b58af274..9c8ceeb1 100644 --- a/backends/server/command.h.in +++ b/backends/server/command.h.in @@ -42,8 +42,8 @@ typedef struct _glibtop_response glibtop_response; struct _glibtop_command { - u_int64_t command; - u_int64_t param_size, send_size, data_size; + guint64 command; + guint64 param_size, send_size, data_size; char parameter [_GLIBTOP_PARAM_SIZE]; }; @@ -51,7 +51,7 @@ struct _glibtop_response { int retval; int glibtop_errno; - u_int64_t recv_size, data_size; + guint64 recv_size, data_size; }; G_END_DECLS diff --git a/backends/sysdeps/ChangeLog b/backends/sysdeps/ChangeLog index 536ae172..5c714ec5 100644 --- a/backends/sysdeps/ChangeLog +++ b/backends/sysdeps/ChangeLog @@ -1,3 +1,7 @@ +2003-10-20 Bastien Nocera + + * backend-sysdeps.c: (_open_sysdeps): s/u_int64_t/guint64/ + 2003-10-20 Bastien Nocera * backend-sysdeps.h: fixed compilation diff --git a/backends/sysdeps/backend-sysdeps.c b/backends/sysdeps/backend-sysdeps.c index e7e98c71..3cb23213 100644 --- a/backends/sysdeps/backend-sysdeps.c +++ b/backends/sysdeps/backend-sysdeps.c @@ -26,7 +26,7 @@ #include static int -_open_sysdeps (glibtop_server *, glibtop_backend *, u_int64_t, const char **); +_open_sysdeps (glibtop_server *, glibtop_backend *, guint64, const char **); static int _close_sysdeps (glibtop_server *, glibtop_backend *, void *); @@ -47,7 +47,7 @@ glibtop_backend_info LibGTopBackendInfo_Sysdeps = { static int _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; diff --git a/doc/ChangeLog b/doc/ChangeLog index 39fdedbf..bc351c7a 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2003-10-20 Bastien Nocera + + * reference.texi: s/u_int64_t/guint64/ + 2003-10-20 Bastien Nocera * Makefile.am: removed traces of guile, intllibs and libgnomesupport diff --git a/doc/reference.texi b/doc/reference.texi index 5799a469..9934b5b5 100644 --- a/doc/reference.texi +++ b/doc/reference.texi @@ -50,7 +50,7 @@ typedef struct _glibtop_cpu glibtop_cpu; struct _glibtop_cpu @{ - u_int64_t flags, + guint64 flags, total, user, nice, @@ -139,7 +139,7 @@ typedef struct _glibtop_mem glibtop_mem; struct _glibtop_mem @{ - u_int64_t flags, + guint64 flags, total, used, free, @@ -207,7 +207,7 @@ typedef struct _glibtop_swap glibtop_swap; struct _glibtop_swap @{ - u_int64_t flags, + guint64 flags, total, used, free, @@ -266,10 +266,10 @@ typedef struct _glibtop_uptime glibtop_uptime; struct _glibtop_uptime @{ - u_int64_t flags; + guint64 flags; double uptime, idletime; - u_int64_t boot_time; + guint64 boot_time; @}; @end cartouche @end example @@ -318,9 +318,9 @@ typedef struct _glibtop_loadavg glibtop_loadavg; struct _glibtop_loadavg @{ - u_int64_t flags; + guint64 flags; double loadavg [3]; - u_int64_t nr_running, + guint64 nr_running, nr_tasks, last_pid; @}; @@ -395,7 +395,7 @@ typedef struct _glibtop_proclist glibtop_proclist; struct _glibtop_proclist @{ - u_int64_t flags, + guint64 flags, number, total, size; @@ -492,7 +492,7 @@ typedef struct _glibtop_proc_state glibtop_proc_state; struct _glibtop_proc_state @{ - u_int64_t flags; + guint64 flags; char cmd[40]; @ifset LIBGTOP-1-1 unsigned state; @@ -618,7 +618,7 @@ typedef struct _glibtop_proc_uid glibtop_proc_uid; struct _glibtop_proc_uid @{ - u_int64_t flags; + guint64 flags; int uid, euid, gid, @@ -698,7 +698,7 @@ typedef struct _glibtop_proc_mem glibtop_proc_mem; struct _glibtop_proc_mem @{ - u_int64_t flags, + guint64 flags, size, vsize, resident, @@ -813,7 +813,7 @@ typedef struct _glibtop_proc_time glibtop_proc_time; struct _glibtop_proc_time @{ - u_int64_t flags, + guint64 flags, start_time, rtime, utime, @@ -881,7 +881,7 @@ typedef struct _glibtop_proc_signal glibtop_proc_signal; struct _glibtop_proc_signal @{ - u_int64_t flags, + guint64 flags, signal [2], blocked [2], sigignore [2], @@ -902,7 +902,7 @@ Mask of caught signals @end table 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 @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 @{ - u_int64_t flags; - u_int64_t k_flags, + guint64 flags; + guint64 k_flags, min_flt, maj_flt, cmin_flt, @@ -1029,7 +1029,7 @@ typedef struct _glibtop_proc_segment glibtop_proc_segment; struct _glibtop_proc_segment @{ - u_int64_t flags, + guint64 flags, text_rss, shlib_rss, data_rss, @@ -1096,7 +1096,7 @@ typedef struct _glibtop_proc_args glibtop_proc_args; struct _glibtop_proc_args @{ - u_int64_t flags, + guint64 flags, size; @}; @end cartouche @@ -1135,7 +1135,7 @@ typedef struct _glibtop_proc_map glibtop_proc_map; struct _glibtop_proc_map @{ - u_int64_t flags, + guint64 flags, number, total, size; @@ -1164,7 +1164,7 @@ typedef struct _glibtop_map_entry 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]; @}; @end cartouche @@ -1222,7 +1222,7 @@ typedef struct _glibtop_netload glibtop_netload; struct _glibtop_netload @{ - u_int64_t flags, + guint64 flags, if_flags, mtu, subnet, @@ -1329,7 +1329,7 @@ typedef struct _glibtop_ppp glibtop_ppp; struct _glibtop_ppp @{ - u_int64_t flags, + guint64 flags, state, bytes_in, bytes_out; @@ -1409,7 +1409,7 @@ typedef struct _glibtop_mountlist glibtop_mountlist; struct _glibtop_mountlist @{ - u_int64_t flags, + guint64 flags, number, total, size; @@ -1438,7 +1438,7 @@ typedef struct _glibtop_mountentry glibtop_mountentry; struct _glibtop_mountentry @{ - u_int64_t dev; + guint64 dev; char devname [GLIBTOP_MOUNTENTRY_LEN+1]; char mountdir [GLIBTOP_MOUNTENTRY_LEN+1]; char type [GLIBTOP_MOUNTENTRY_LEN+1]; @@ -1488,7 +1488,7 @@ typedef struct _glibtop_fsusage glibtop_fsusage; struct _glibtop_fsusage @{ - u_int64_t flags, + guint64 flags, blocks, bfree, bavail, @@ -1639,7 +1639,7 @@ typedef struct _glibtop_sysdeps glibtop_sysdeps; struct _glibtop_sysdeps @{ - u_int64_t flags, + guint64 flags, features, pointer_size, cpu, diff --git a/include/glibtop/array.h b/include/glibtop/array.h index 1259d27b..4d557365 100644 --- a/include/glibtop/array.h +++ b/include/glibtop/array.h @@ -41,7 +41,7 @@ typedef struct _glibtop_array glibtop_array; struct _glibtop_array { - u_int64_t flags, + guint64 flags, number, /* GLIBTOP_ARRAY_NUMBER */ size, /* GLIBTOP_ARRAY_SIZE */ total; /* GLIBTOP_ARRAY_TOTAL */ diff --git a/include/glibtop/command.h b/include/glibtop/command.h index ca5139ff..d6219133 100644 --- a/include/glibtop/command.h +++ b/include/glibtop/command.h @@ -69,8 +69,8 @@ typedef union _glibtop_response_union glibtop_response_union; struct _glibtop_command { - u_int64_t command; - u_int64_t size, data_size; + guint64 command; + guint64 size, data_size; char parameter [_GLIBTOP_PARAM_SIZE]; }; @@ -83,7 +83,7 @@ union _glibtop_response_union struct _glibtop_response { int64_t offset; - u_int64_t size, data_size; + guint64 size, data_size; glibtop_response_union u; }; diff --git a/include/glibtop/cpu.h b/include/glibtop/cpu.h index 799ce3db..cbe081e7 100644 --- a/include/glibtop/cpu.h +++ b/include/glibtop/cpu.h @@ -51,7 +51,7 @@ typedef struct _glibtop_cpu glibtop_cpu; struct _glibtop_cpu { - u_int64_t flags, + guint64 flags, total, /* GLIBTOP_CPU_TOTAL */ user, /* GLIBTOP_CPU_USER */ nice, /* GLIBTOP_CPU_NICE */ diff --git a/include/glibtop/fsusage.h b/include/glibtop/fsusage.h index e3ba7772..ab695639 100644 --- a/include/glibtop/fsusage.h +++ b/include/glibtop/fsusage.h @@ -41,7 +41,7 @@ typedef struct _glibtop_fsusage glibtop_fsusage; struct _glibtop_fsusage { - u_int64_t flags, + guint64 flags, blocks, /* Total blocks. */ bfree, /* Free blocks available to superuser. */ bavail, /* Free blocks available to non-superuser. */ diff --git a/include/glibtop/glibtop-backend-info.h b/include/glibtop/glibtop-backend-info.h index 71bd119d..786545ab 100644 --- a/include/glibtop/glibtop-backend-info.h +++ b/include/glibtop/glibtop-backend-info.h @@ -40,7 +40,7 @@ typedef struct _glibtop_backend_module glibtop_backend_module; typedef struct _glibtop_call_vector glibtop_call_vector; 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 *, glibtop_closure *); diff --git a/include/glibtop/glibtop-backend.h b/include/glibtop/glibtop-backend.h index 90cc5355..63c58cd0 100644 --- a/include/glibtop/glibtop-backend.h +++ b/include/glibtop/glibtop-backend.h @@ -65,7 +65,7 @@ GType glibtop_backend_get_type (void); 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); void diff --git a/include/glibtop/glibtop-client.h b/include/glibtop/glibtop-client.h index 74de1b7b..e389653e 100644 --- a/include/glibtop/glibtop-client.h +++ b/include/glibtop/glibtop-client.h @@ -82,7 +82,7 @@ glibtop_client_propagate_warning (glibtop_client *client, GError *error); void 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 glibtop_client_add_backend (glibtop_client *client, diff --git a/include/glibtop/inodedb.h b/include/glibtop/inodedb.h index ed0343b6..7ce5640d 100644 --- a/include/glibtop/inodedb.h +++ b/include/glibtop/inodedb.h @@ -39,7 +39,7 @@ typedef struct _glibtop_inodedb_key glibtop_inodedb_key; struct _glibtop_inodedb_key { - u_int64_t device, inode; + guint64 device, inode; }; struct _glibtop_inodedb @@ -57,7 +57,7 @@ glibtop_inodedb_open_s (glibtop *server, unsigned databases, unsigned long cache const char * glibtop_inodedb_lookup_s (glibtop *server, glibtop_inodedb *inodedb, - u_int64_t device, u_int64_t inode); + guint64 device, guint64 inode); void glibtop_inodedb_close_s (glibtop *server, glibtop_inodedb *inodedb); diff --git a/include/glibtop/interfaces.h b/include/glibtop/interfaces.h index f9cd4d4c..9999c1a2 100644 --- a/include/glibtop/interfaces.h +++ b/include/glibtop/interfaces.h @@ -151,17 +151,17 @@ enum _glibtop_interface_flags { struct _glibtop_ifaddr { - u_int64_t flags, + guint64 flags, transport; /* GLIBTOP_IFADDR_TRANSPORT */ u_int8_t addr_len, /* GLIBTOP_IFADDR_ADDR_LEN */ address [GLIBTOP_IFADDR_LEN]; /* GLIBTOP_IFADDR_ADDRESS */ - u_int64_t subnet, /* GLIBTOP_IFADDR_SUBNET */ + guint64 subnet, /* GLIBTOP_IFADDR_SUBNET */ scope; /* GLIBTOP_IFADDR_SCOPE */ }; struct _glibtop_interface { - u_int64_t flags, + guint64 flags, if_flags, /* GLIBTOP_INTERFACE_IF_FLAGS */ transport, /* GLIBTOP_INTERFACE_TRANSPORT */ type, /* GLIBTOP_INTERFACE_TYPE */ @@ -177,14 +177,14 @@ struct _glibtop_interface #define glibtop_get_interface_names_r glibtop_get_interface_names_s #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 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 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 #ifdef GLIBTOP_NAMES diff --git a/include/glibtop/limits.h b/include/glibtop/limits.h index b939feff..03450f6e 100644 --- a/include/glibtop/limits.h +++ b/include/glibtop/limits.h @@ -45,8 +45,8 @@ G_BEGIN_DECLS /* Length of a network interface address in bytes. */ #define GLIBTOP_IFADDR_LEN 16 -/* This is ((u_int64_t)-1) */ -#define GLIBTOP_UNLIMITED (~(u_int64_t)0) +/* This is ((guint64)-1) */ +#define GLIBTOP_UNLIMITED (~(guint64)0) /* Maximum length of a backend name. */ #define GLIBTOP_BACKEND_NAME_LEN 40 diff --git a/include/glibtop/loadavg.h b/include/glibtop/loadavg.h index ed3f9f61..3f1c86f8 100644 --- a/include/glibtop/loadavg.h +++ b/include/glibtop/loadavg.h @@ -40,9 +40,9 @@ typedef struct _glibtop_loadavg glibtop_loadavg; struct _glibtop_loadavg { - u_int64_t flags; + guint64 flags; 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 */ last_pid; /* GLIBTOP_LOADAVG_LAST_PID */ }; diff --git a/include/glibtop/mem.h b/include/glibtop/mem.h index 8fe5090a..7dd9c4fb 100644 --- a/include/glibtop/mem.h +++ b/include/glibtop/mem.h @@ -44,7 +44,7 @@ typedef struct _glibtop_mem glibtop_mem; struct _glibtop_mem { - u_int64_t flags, + guint64 flags, total, /* GLIBTOP_MEM_TOTAL */ used, /* GLIBTOP_MEM_USED */ free, /* GLIBTOP_MEM_FREE */ diff --git a/include/glibtop/mountlist.h b/include/glibtop/mountlist.h index bebbd317..e52fb57d 100644 --- a/include/glibtop/mountlist.h +++ b/include/glibtop/mountlist.h @@ -41,7 +41,7 @@ typedef struct _glibtop_mountlist glibtop_mountlist; struct _glibtop_mountentry { - u_int64_t dev; + guint64 dev; char devname [GLIBTOP_MOUNTENTRY_LEN+1]; char mountdir [GLIBTOP_MOUNTENTRY_LEN+1]; char type [GLIBTOP_MOUNTENTRY_LEN+1]; @@ -49,7 +49,7 @@ struct _glibtop_mountentry struct _glibtop_mountlist { - u_int64_t flags, + guint64 flags, number, /* GLIBTOP_MOUNTLIST_NUMBER */ total, /* GLIBTOP_MOUNTLIST_TOTAL */ size; /* GLIBTOP_MOUNTLIST_SIZE */ diff --git a/include/glibtop/msg_limits.h b/include/glibtop/msg_limits.h index 9b2a2111..d6f5c48f 100644 --- a/include/glibtop/msg_limits.h +++ b/include/glibtop/msg_limits.h @@ -43,7 +43,7 @@ typedef struct _glibtop_msg_limits glibtop_msg_limits; struct _glibtop_msg_limits { - u_int64_t flags, + guint64 flags, msgpool, /* GLIBTOP_IPC_MSGPOOL */ msgmap, /* GLIBTOP_IPC_MSGMAP */ msgmax, /* GLIBTOP_IPC_MSGMAX */ diff --git a/include/glibtop/netinfo.h b/include/glibtop/netinfo.h index d36fcf57..0296f710 100644 --- a/include/glibtop/netinfo.h +++ b/include/glibtop/netinfo.h @@ -45,7 +45,7 @@ typedef struct _glibtop_netinfo glibtop_netinfo; struct _glibtop_netinfo { - u_int64_t flags, + guint64 flags, if_flags, /* GLIBTOP_NETINFO_IF_FLAGS */ transport, /* GLIBTOP_NETINFO_TRANSPORT */ mtu; /* GLIBTOP_NETINFO_MTU */ @@ -57,14 +57,14 @@ struct _glibtop_netinfo #define glibtop_get_netinfo_r glibtop_get_netinfo_s #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 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 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 #ifdef GLIBTOP_NAMES diff --git a/include/glibtop/netload.h b/include/glibtop/netload.h index 7e1548ca..d4eb7a59 100644 --- a/include/glibtop/netload.h +++ b/include/glibtop/netload.h @@ -69,7 +69,7 @@ enum { struct _glibtop_netload { - u_int64_t flags, + guint64 flags, if_flags, /* GLIBTOP_NETLOAD_IF_FLAGS */ mtu, /* GLIBTOP_NETLOAD_MTU */ subnet, /* GLIBTOP_NETLOAD_SUBNET */ diff --git a/include/glibtop/ppp.h b/include/glibtop/ppp.h index a9f66fff..9fab24f7 100644 --- a/include/glibtop/ppp.h +++ b/include/glibtop/ppp.h @@ -45,7 +45,7 @@ enum { struct _glibtop_ppp { - u_int64_t flags, + guint64 flags, state, /* GLIBTOP_PPP_STATE */ bytes_in, /* GLIBTOP_PPP_BYTES_IN */ bytes_out; /* GLIBTOP_PPP_BYTES_OUT */ diff --git a/include/glibtop/procargs.h b/include/glibtop/procargs.h index ea275c48..8571c20e 100644 --- a/include/glibtop/procargs.h +++ b/include/glibtop/procargs.h @@ -37,7 +37,7 @@ typedef struct _glibtop_proc_args glibtop_proc_args; struct _glibtop_proc_args { - u_int64_t flags, + guint64 flags, size; /* GLIBTOP_PROC_ARGS_SIZE */ }; diff --git a/include/glibtop/proccwd.h b/include/glibtop/proccwd.h index ac32cc35..840c1a9e 100644 --- a/include/glibtop/proccwd.h +++ b/include/glibtop/proccwd.h @@ -45,7 +45,7 @@ typedef struct _glibtop_proc_cwd glibtop_proc_cwd; struct _glibtop_proc_cwd { - u_int64_t flags, + guint64 flags, size, device, inode; diff --git a/include/glibtop/prockernel.h b/include/glibtop/prockernel.h index 7f9f9d4b..30786a74 100644 --- a/include/glibtop/prockernel.h +++ b/include/glibtop/prockernel.h @@ -47,8 +47,8 @@ typedef struct _glibtop_proc_kernel glibtop_proc_kernel; struct _glibtop_proc_kernel { - u_int64_t flags; - u_int64_t k_flags, /* kernel flags for the process */ + guint64 flags; + guint64 k_flags, /* kernel flags for the process */ min_flt, /* number of minor page faults since * process start */ maj_flt, /* number of major page faults since diff --git a/include/glibtop/proclist.h b/include/glibtop/proclist.h index 8a53e35a..3b9d1d76 100644 --- a/include/glibtop/proclist.h +++ b/include/glibtop/proclist.h @@ -56,7 +56,7 @@ typedef struct _glibtop_proclist glibtop_proclist; struct _glibtop_proclist { - u_int64_t flags, + guint64 flags, number, /* GLIBTOP_PROCLIST_NUMBER */ total, /* GLIBTOP_PROCLIST_TOTAL */ size; /* GLIBTOP_PROCLIST_SIZE */ diff --git a/include/glibtop/procmap.h b/include/glibtop/procmap.h index d5f0fab6..1f04b1a6 100644 --- a/include/glibtop/procmap.h +++ b/include/glibtop/procmap.h @@ -59,13 +59,13 @@ typedef struct _glibtop_proc_map glibtop_proc_map; 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]; }; struct _glibtop_proc_map { - u_int64_t flags, + guint64 flags, number, /* GLIBTOP_PROC_MAP_NUMBER */ total, /* GLIBTOP_PROC_MAP_TOTAL */ size; /* GLIBTOP_PROC_MAP_SIZE */ diff --git a/include/glibtop/procmem.h b/include/glibtop/procmem.h index 8adcb9fb..ceb44d33 100644 --- a/include/glibtop/procmem.h +++ b/include/glibtop/procmem.h @@ -44,7 +44,7 @@ typedef struct _glibtop_proc_mem glibtop_proc_mem; struct _glibtop_proc_mem { - u_int64_t flags, + guint64 flags, size, /* total # of pages of memory */ vsize, /* number of pages of virtual memory ... */ resident, /* number of resident set diff --git a/include/glibtop/procsegment.h b/include/glibtop/procsegment.h index 8e7c254a..7ad3bc4b 100644 --- a/include/glibtop/procsegment.h +++ b/include/glibtop/procsegment.h @@ -46,7 +46,7 @@ typedef struct _glibtop_proc_segment glibtop_proc_segment; struct _glibtop_proc_segment { - u_int64_t flags, + guint64 flags, text_rss, /* text resident set size */ shlib_rss, /* shared-lib resident set size */ data_rss, /* data resident set size */ diff --git a/include/glibtop/procsignal.h b/include/glibtop/procsignal.h index d7880550..9498e93d 100644 --- a/include/glibtop/procsignal.h +++ b/include/glibtop/procsignal.h @@ -42,7 +42,7 @@ typedef struct _glibtop_proc_signal glibtop_proc_signal; struct _glibtop_proc_signal { - u_int64_t flags, + guint64 flags, signal [2], /* mask of pending signals */ blocked [2], /* mask of blocked signals */ sigignore [2], /* mask of ignored signals */ diff --git a/include/glibtop/procstate.h b/include/glibtop/procstate.h index 5687b523..6decb2df 100644 --- a/include/glibtop/procstate.h +++ b/include/glibtop/procstate.h @@ -42,7 +42,7 @@ typedef struct _glibtop_proc_state glibtop_proc_state; struct _glibtop_proc_state { - u_int64_t flags; + guint64 flags; char cmd[40], /* basename of executable file in * call to exec(2) */ state; /* single-char code for process state diff --git a/include/glibtop/proctime.h b/include/glibtop/proctime.h index e49c1d1f..b4c50368 100644 --- a/include/glibtop/proctime.h +++ b/include/glibtop/proctime.h @@ -50,7 +50,7 @@ typedef struct _glibtop_proc_time glibtop_proc_time; struct _glibtop_proc_time { - u_int64_t flags, + guint64 flags, start_time, /* start time of process -- * seconds since 1-1-70 */ rtime, /* real time accumulated by process */ diff --git a/include/glibtop/procuid.h b/include/glibtop/procuid.h index 3c6ea123..d5bccd63 100644 --- a/include/glibtop/procuid.h +++ b/include/glibtop/procuid.h @@ -50,7 +50,7 @@ typedef struct _glibtop_proc_uid glibtop_proc_uid; struct _glibtop_proc_uid { - u_int64_t flags; + guint64 flags; int uid, /* user id */ euid, /* effective user id */ gid, /* group id */ diff --git a/include/glibtop/sem_limits.h b/include/glibtop/sem_limits.h index 047ac083..ab9a28b3 100644 --- a/include/glibtop/sem_limits.h +++ b/include/glibtop/sem_limits.h @@ -46,7 +46,7 @@ typedef struct _glibtop_sem_limits glibtop_sem_limits; struct _glibtop_sem_limits { - u_int64_t flags, + guint64 flags, semmap, /* GLIBTOP_IPC_SEMMAP */ semmni, /* GLIBTOP_IPC_SEMMNI */ semmns, /* GLIBTOP_IPC_SEMMNS */ diff --git a/include/glibtop/shm_limits.h b/include/glibtop/shm_limits.h index 14499823..9b1a5c57 100644 --- a/include/glibtop/shm_limits.h +++ b/include/glibtop/shm_limits.h @@ -41,7 +41,7 @@ typedef struct _glibtop_shm_limits glibtop_shm_limits; struct _glibtop_shm_limits { - u_int64_t flags, + guint64 flags, shmmax, /* GLIBTOP_IPC_SHMMAX */ shmmin, /* GLIBTOP_IPC_SHMMIN */ shmmni, /* GLIBTOP_IPC_SHMMNI */ diff --git a/include/glibtop/swap.h b/include/glibtop/swap.h index ab3c0a76..8e03c96b 100644 --- a/include/glibtop/swap.h +++ b/include/glibtop/swap.h @@ -41,7 +41,7 @@ typedef struct _glibtop_swap glibtop_swap; struct _glibtop_swap { - u_int64_t flags, + guint64 flags, total, /* GLIBTOP_SWAP_TOTAL */ used, /* GLIBTOP_SWAP_USED */ free, /* GLIBTOP_SWAP_FREE */ diff --git a/include/glibtop/sysdeps.h b/include/glibtop/sysdeps.h index 56f0a781..11d2f9c3 100644 --- a/include/glibtop/sysdeps.h +++ b/include/glibtop/sysdeps.h @@ -64,7 +64,7 @@ typedef struct _glibtop_sysdeps glibtop_sysdeps; struct _glibtop_sysdeps { - u_int64_t flags, + guint64 flags, features, /* server features */ cpu, /* glibtop_cpu */ mem, /* glibtop_mem */ diff --git a/include/glibtop/sysinfo.h b/include/glibtop/sysinfo.h index 591b7e20..3db74033 100644 --- a/include/glibtop/sysinfo.h +++ b/include/glibtop/sysinfo.h @@ -49,7 +49,7 @@ struct _glibtop_entry struct _glibtop_sysinfo { - u_int64_t flags, ncpu; + guint64 flags, ncpu; glibtop_entry cpuinfo [GLIBTOP_NCPU]; }; diff --git a/include/glibtop/uptime.h b/include/glibtop/uptime.h index 0eedf726..5f7f2199 100644 --- a/include/glibtop/uptime.h +++ b/include/glibtop/uptime.h @@ -38,7 +38,7 @@ typedef struct _glibtop_uptime glibtop_uptime; struct _glibtop_uptime { - u_int64_t flags; + guint64 flags; double uptime, /* GLIBTOP_UPTIME_UPTIME */ idletime; /* GLIBTOP_UPTIME_IDLETIME */ }; diff --git a/lib/glibtop-backend.c b/lib/glibtop-backend.c index 8606a2be..84dea0d0 100644 --- a/lib/glibtop-backend.c +++ b/lib/glibtop-backend.c @@ -146,7 +146,7 @@ load_extra_libs (glibtop_backend_entry *entry, GError **error) } 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 glibtop_backend_info *info; diff --git a/lib/glibtop-client.c b/lib/glibtop-client.c index 68947fc5..188b1d3e 100644 --- a/lib/glibtop-client.c +++ b/lib/glibtop-client.c @@ -211,7 +211,7 @@ glibtop_client_propagate_warning (glibtop_client *client, GError *error) void 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; GError *error = NULL; diff --git a/lib/inodedb.c b/lib/inodedb.c index 0f1f3e75..249ba86f 100644 --- a/lib/inodedb.c +++ b/lib/inodedb.c @@ -79,7 +79,7 @@ glibtop_inodedb_open_s (glibtop *server, unsigned databases, const char * glibtop_inodedb_lookup_s (glibtop *server, glibtop_inodedb *inodedb, - u_int64_t device, u_int64_t inode) + guint64 device, guint64 inode) { glibtop_inodedb_key key; datum d_key, d_content; diff --git a/lib/lib.pl b/lib/lib.pl index cf5f8b4c..2322aeae 100755 --- a/lib/lib.pl +++ b/lib/lib.pl @@ -37,9 +37,9 @@ print ''; print 'static void'; 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 "\tu_int64_t old_required = *required;\n"; +print "\tguint64 old_required = *required;\n"; print "\t/* Return if we have all required fields. */"; print "\tif ((~present & old_required) == 0)"; print "\t\treturn;\n"; @@ -68,7 +68,7 @@ print '/* Library functions. */'; print ''; $convert{'long'} = 'int64_t'; -$convert{'ulong'} = 'u_int64_t'; +$convert{'ulong'} = 'guint64'; $convert{'pid_t'} = 'pid_t'; $convert{'int'} = 'int'; $convert{'ushort'} = 'unsigned short'; diff --git a/scripts/ChangeLog b/scripts/ChangeLog index d7e3d033..271a7ec0 100644 --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2003-10-20 Bastien Nocera + + * c_types.pl: s/u_int64_t/guint64/ + 2000-01-02 Martin Baulig * c_types.pl ($demarshal_funcs): New variable. diff --git a/scripts/c_types.pl b/scripts/c_types.pl index d9f4a952..06d61e96 100644 --- a/scripts/c_types.pl +++ b/scripts/c_types.pl @@ -50,7 +50,7 @@ my $c_demarshal_func = sub { # $typeinfo = {'long' => ['int64_t', 0], - 'ulong' => ['u_int64_t', 0], + 'ulong' => ['guint64', 0], 'pid_t' => ['pid_t', 0], 'int' => ['int', 0], 'retval' => ['int', 0], diff --git a/src/inodedb/README.inodedb b/src/inodedb/README.inodedb index bbd15db5..12bb8b13 100644 --- a/src/inodedb/README.inodedb +++ b/src/inodedb/README.inodedb @@ -58,10 +58,10 @@ To look up an entry, use the `glibtop_inodedb_lookup ()' function: const char * glibtop_inodedb_lookup (glibtop_inodedb *inodedb, - u_int64_t device, u_int64_t inode) + guint64 device, guint64 inode) const char * 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 `g_free ()' once done with it - or NULL on error. diff --git a/src/inodedb/mkinodedb2.c b/src/inodedb/mkinodedb2.c index a338d322..30d41ddc 100644 --- a/src/inodedb/mkinodedb2.c +++ b/src/inodedb/mkinodedb2.c @@ -75,8 +75,8 @@ main (int argc, char *argv []) d_content.dptr = dirname; d_content.dsize = strlen (dirname) + 1; - key.device = (u_int64_t) statb.st_dev; - key.inode = (u_int64_t) statb.st_ino; + key.device = (guint64) statb.st_dev; + key.inode = (guint64) statb.st_ino; if (gdbm_store (dbf, d_key, d_content, GDBM_REPLACE)) glibtop_error_io ("gdbm_store (%s)", dirname); @@ -113,8 +113,8 @@ main (int argc, char *argv []) d_content.dptr = filename; d_content.dsize = strlen (filename) + 1; - key.device = (u_int64_t) statb.st_dev; - key.inode = (u_int64_t) statb.st_ino; + key.device = (guint64) statb.st_dev; + key.inode = (guint64) statb.st_ino; if (gdbm_store (dbf, d_key, d_content, GDBM_REPLACE)) glibtop_error_io ("gdbm_store (%s)", filename); diff --git a/sysdeps/aix/ChangeLog b/sysdeps/aix/ChangeLog index 7db7af16..8ce5859b 100644 --- a/sysdeps/aix/ChangeLog +++ b/sysdeps/aix/ChangeLog @@ -1,3 +1,7 @@ +2003-10-20 Bastien Nocera + + * procsignal.c: (glibtop_get_proc_signal_s): s/u_int64_t/guint64/ + 2003-10-20 Bastien Nocera * glibtop_machine.h: diff --git a/sysdeps/aix/procsignal.c b/sysdeps/aix/procsignal.c index dbcb7829..29dd88cb 100644 --- a/sysdeps/aix/procsignal.c +++ b/sysdeps/aix/procsignal.c @@ -66,7 +66,7 @@ glibtop_get_proc_signal_s (glibtop *server, glibtop_proc_signal *buf, /* 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++) { diff --git a/sysdeps/common/ChangeLog b/sysdeps/common/ChangeLog index 55120143..e67b7eee 100644 --- a/sysdeps/common/ChangeLog +++ b/sysdeps/common/ChangeLog @@ -1,3 +1,11 @@ +2003-10-20 Bastien Nocera + + * 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 * inodedb.c: @@ -14,9 +22,9 @@ 2000-01-20 Martin Baulig - * 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 disks. - * fsusage.h (struct fs_usage): Use `u_int64_t' here as well. + * fsusage.h (struct fs_usage): Use `guint64' here as well. diff --git a/sysdeps/common/backend.c b/sysdeps/common/backend.c index ce193fa0..d1f744b5 100644 --- a/sysdeps/common/backend.c +++ b/sysdeps/common/backend.c @@ -33,7 +33,7 @@ static int _open_common (glibtop_server *server, glibtop_backend *backend, - u_int64_t features, const char **backend_args) + guint64 features, const char **backend_args) { return 0; } diff --git a/sysdeps/common/fsusage.c b/sysdeps/common/fsusage.c index f5d68df1..2ae9e48a 100644 --- a/sysdeps/common/fsusage.c +++ b/sysdeps/common/fsusage.c @@ -75,9 +75,9 @@ int safe_read (); BLOCKS FROMSIZE-byte blocks, rounding away from zero. TOSIZE must be positive. Return -1 if FROMSIZE is not positive. */ -static u_int64_t +static guint64 adjust_blocks (blocks, fromsize, tosize) - u_int64_t blocks; + guint64 blocks; int fromsize, tosize; { if (tosize <= 0) @@ -88,9 +88,9 @@ adjust_blocks (blocks, fromsize, tosize) if (fromsize == tosize) /* e.g., from 512 to 512 */ return blocks; 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 */ - 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 @@ -107,7 +107,7 @@ get_fs_usage (path, disk, fsp) struct fs_usage *fsp; { #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; @@ -117,7 +117,7 @@ get_fs_usage (path, disk, fsp) #endif /* STAT_STATFS3_OSF1 */ #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; @@ -136,7 +136,7 @@ get_fs_usage (path, disk, fsp) # define SUPERBOFF (SUPERB * 512) # endif # 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; int fd; @@ -166,7 +166,7 @@ get_fs_usage (path, disk, fsp) #endif /* STAT_READ_FILSYS */ #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; @@ -191,7 +191,7 @@ get_fs_usage (path, disk, fsp) #endif /* STAT_STATFS2_BSIZE */ #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; @@ -202,7 +202,7 @@ get_fs_usage (path, disk, fsp) #ifdef STAT_STATFS4 /* SVR3, Dynix, Irix, AIX */ # 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 # define f_bavail f_bfree # endif @@ -227,7 +227,7 @@ get_fs_usage (path, disk, fsp) #ifdef STAT_STATVFS /* SVR4 */ # 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; diff --git a/sysdeps/common/fsusage.h b/sysdeps/common/fsusage.h index 4a108f5f..35cc8ef3 100644 --- a/sysdeps/common/fsusage.h +++ b/sysdeps/common/fsusage.h @@ -18,10 +18,10 @@ /* Space usage statistics for a filesystem. Blocks are 512-byte. */ struct fs_usage { - u_int64_t fsu_blocks; /* Total blocks. */ - u_int64_t fsu_bfree; /* Free blocks available to superuser. */ - u_int64_t fsu_bavail; /* Free blocks available to non-superuser. */ - u_int64_t fsu_files; /* Total file nodes. */ - u_int64_t fsu_ffree; /* Free file nodes. */ + guint64 fsu_blocks; /* Total blocks. */ + guint64 fsu_bfree; /* Free blocks available to superuser. */ + guint64 fsu_bavail; /* Free blocks available to non-superuser. */ + guint64 fsu_files; /* Total file nodes. */ + guint64 fsu_ffree; /* Free file nodes. */ }; diff --git a/sysdeps/common/inodedb.c b/sysdeps/common/inodedb.c index 348cd4ff..0784aaa5 100644 --- a/sysdeps/common/inodedb.c +++ b/sysdeps/common/inodedb.c @@ -79,7 +79,7 @@ glibtop_inodedb_open_s (glibtop *server, unsigned databases, const char * glibtop_inodedb_lookup_s (glibtop *server, glibtop_inodedb *inodedb, - u_int64_t device, u_int64_t inode) + guint64 device, guint64 inode) { glibtop_inodedb_key key; datum d_key, d_content; diff --git a/sysdeps/freebsd/ChangeLog b/sysdeps/freebsd/ChangeLog index dc55b25a..87fd08a1 100644 --- a/sysdeps/freebsd/ChangeLog +++ b/sysdeps/freebsd/ChangeLog @@ -1,3 +1,10 @@ +2003-10-20 Bastien Nocera + + * 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 * swap.c: (glibtop_get_swap_p): fix swap sizes in FreeBSD, diff --git a/sysdeps/freebsd/mem.c b/sysdeps/freebsd/mem.c index 1b96fe7f..cc9ddac3 100644 --- a/sysdeps/freebsd/mem.c +++ b/sysdeps/freebsd/mem.c @@ -192,26 +192,26 @@ glibtop_get_mem_p (glibtop *server, glibtop_mem *buf) v_free_count = vmm.v_free_count; #endif - buf->total = (u_int64_t) pagetok (v_total_count) << LOG1024; - buf->used = (u_int64_t) pagetok (v_used_count) << LOG1024; - buf->free = (u_int64_t) pagetok (v_free_count) << LOG1024; + buf->total = (guint64) pagetok (v_total_count) << LOG1024; + buf->used = (guint64) pagetok (v_used_count) << LOG1024; + buf->free = (guint64) pagetok (v_free_count) << LOG1024; #ifdef __FreeBSD__ - buf->cached = (u_int64_t) pagetok (vmm.v_cache_count) << LOG1024; + buf->cached = (guint64) pagetok (vmm.v_cache_count) << LOG1024; #endif #if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) - buf->locked = (u_int64_t) pagetok (uvmexp.wired) << LOG1024; + buf->locked = (guint64) pagetok (uvmexp.wired) << LOG1024; #else - buf->locked = (u_int64_t) pagetok (vmm.v_wire_count) << LOG1024; + buf->locked = (guint64) pagetok (vmm.v_wire_count) << LOG1024; #endif - buf->shared = (u_int64_t) pagetok (vmt.t_rmshr) << LOG1024; + buf->shared = (guint64) pagetok (vmt.t_rmshr) << LOG1024; #if __FreeBSD__ - buf->buffer = (u_int64_t) bufspace; + buf->buffer = (guint64) bufspace; #else - buf->buffer = (u_int64_t) pagetok (bufspace) << LOG1024; + buf->buffer = (guint64) pagetok (bufspace) << LOG1024; #endif /* user */ diff --git a/sysdeps/freebsd/prockernel.c b/sysdeps/freebsd/prockernel.c index 0dd97ab4..2a00b364 100644 --- a/sysdeps/freebsd/prockernel.c +++ b/sysdeps/freebsd/prockernel.c @@ -141,10 +141,10 @@ glibtop_get_proc_kernel_p (glibtop *server, * leave them 0. */ - buf->min_flt = (u_int64_t) pstats.p_ru.ru_minflt; - buf->maj_flt = (u_int64_t) pstats.p_ru.ru_majflt; - buf->cmin_flt = (u_int64_t) pstats.p_cru.ru_minflt; - buf->cmaj_flt = (u_int64_t) pstats.p_cru.ru_majflt; + buf->min_flt = (guint64) pstats.p_ru.ru_minflt; + buf->maj_flt = (guint64) pstats.p_ru.ru_majflt; + buf->cmin_flt = (guint64) pstats.p_cru.ru_minflt; + buf->cmaj_flt = (guint64) pstats.p_cru.ru_majflt; buf->flags |= _glibtop_sysdeps_proc_kernel_pstats; } @@ -157,21 +157,21 @@ glibtop_get_proc_kernel_p (glibtop *server, #ifdef __FreeBSD__ #ifndef __alpha__ #if (__FreeBSD_version >= 300003) - buf->kstk_esp = (u_int64_t) pcb.pcb_esp; - buf->kstk_eip = (u_int64_t) pcb.pcb_eip; + buf->kstk_esp = (guint64) pcb.pcb_esp; + buf->kstk_eip = (guint64) pcb.pcb_eip; #else - buf->kstk_esp = (u_int64_t) pcb.pcb_ksp; - buf->kstk_eip = (u_int64_t) pcb.pcb_pc; + buf->kstk_esp = (guint64) pcb.pcb_ksp; + buf->kstk_eip = (guint64) pcb.pcb_pc; #endif #else /*xxx FreeBSD/Alpha? */ #endif #else - buf->kstk_esp = (u_int64_t) pcb.pcb_tss.tss_esp0; + buf->kstk_esp = (guint64) pcb.pcb_tss.tss_esp0; #ifdef __bsdi__ - buf->kstk_eip = (u_int64_t) pcb.pcb_tss.tss_eip; + buf->kstk_eip = (guint64) pcb.pcb_tss.tss_eip; #else - buf->kstk_eip = (u_int64_t) pcb.pcb_tss.__tss_eip; + buf->kstk_eip = (guint64) pcb.pcb_tss.__tss_eip; #endif buf->flags |= _glibtop_sysdeps_proc_kernel_pcb; diff --git a/sysdeps/freebsd/procmem.c b/sysdeps/freebsd/procmem.c index 05f66001..f5496f37 100644 --- a/sysdeps/freebsd/procmem.c +++ b/sysdeps/freebsd/procmem.c @@ -144,15 +144,15 @@ glibtop_get_proc_mem_p (glibtop *server, glibtop_proc_mem *buf, return; } - buf->rss_rlim = (u_int64_t) + buf->rss_rlim = (guint64) (plimit.pl_rlimit [RLIMIT_RSS].rlim_cur); 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; - buf->resident = buf->rss = (u_int64_t) pagetok + buf->resident = buf->rss = (guint64) pagetok (vms->vm_rssize) << LOG1024; /* Now we get the shared memory. */ diff --git a/sysdeps/freebsd/proctime.c b/sysdeps/freebsd/proctime.c index 0c71c593..f096d826 100644 --- a/sysdeps/freebsd/proctime.c +++ b/sysdeps/freebsd/proctime.c @@ -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_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. */ @@ -83,7 +83,7 @@ calcru(p, up, sp, ip) #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. */ @@ -188,7 +188,7 @@ glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf, buf->cutime = tv2sec (pstats.p_cru.ru_utime); 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; #else diff --git a/sysdeps/kernel/ChangeLog b/sysdeps/kernel/ChangeLog index ede77326..02f779c6 100644 --- a/sysdeps/kernel/ChangeLog +++ b/sysdeps/kernel/ChangeLog @@ -1,3 +1,7 @@ +2003-10-20 Bastien Nocera + + * glibtop_private.h: s/u_int64_t/guint64/ + 2003-10-20 Bastien Nocera * glibtop_private.h: diff --git a/sysdeps/kernel/glibtop_private.h b/sysdeps/kernel/glibtop_private.h index 012ee1ce..ccbf7615 100644 --- a/sysdeps/kernel/glibtop_private.h +++ b/sysdeps/kernel/glibtop_private.h @@ -48,7 +48,7 @@ glibtop_get_proc_data_swap_s (glibtop *server, libgtop_swap_t *swap); int glibtop_get_proc_data_proclist_s (glibtop *server, libgtop_proclist_t *proclist, - u_int64_t which, u_int64_t arg); + guint64 which, guint64 arg); int glibtop_get_proc_data_proc_state_s (glibtop *server, diff --git a/sysdeps/linux/ChangeLog b/sysdeps/linux/ChangeLog index cc23183e..df858368 100644 --- a/sysdeps/linux/ChangeLog +++ b/sysdeps/linux/ChangeLog @@ -1,3 +1,8 @@ +2003-10-20 Bastien Nocera + + * cpu.c: (glibtop_get_cpu_s): + * procmap.c: (glibtop_get_proc_map_s): s/u_int64_t/guint64/ + 2003-10-20 Bastien Nocera * glibtop_machine.h: diff --git a/sysdeps/linux/cpu.c b/sysdeps/linux/cpu.c index 012670ad..d37eeca9 100644 --- a/sysdeps/linux/cpu.c +++ b/sysdeps/linux/cpu.c @@ -55,7 +55,7 @@ glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf) { char buffer [BUFSIZ], *p; int fd, len, i; - u_int64_t total; + guint64 total; glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0); diff --git a/sysdeps/linux/procmap.c b/sysdeps/linux/procmap.c index 61248261..3912c210 100644 --- a/sysdeps/linux/procmap.c +++ b/sysdeps/linux/procmap.c @@ -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].start = (u_int64_t) start; - entry_list [n].end = (u_int64_t) end; - entry_list [n].offset = (u_int64_t) offset; - entry_list [n].perm = (u_int64_t) perm; - entry_list [n].device = (u_int64_t) (dev_major << 8) + - (u_int64_t) dev_minor; - entry_list [n].inode = (u_int64_t) inode; + entry_list [n].start = (guint64) start; + entry_list [n].end = (guint64) end; + entry_list [n].offset = (guint64) offset; + entry_list [n].perm = (guint64) perm; + entry_list [n].device = (guint64) (dev_major << 8) + + (guint64) dev_minor; + entry_list [n].inode = (guint64) inode; strncpy (entry_list [n].filename, fn, GLIBTOP_MAP_FILENAME_LEN); entry_list [n].filename [GLIBTOP_MAP_FILENAME_LEN] = 0; diff --git a/sysdeps/solaris/ChangeLog b/sysdeps/solaris/ChangeLog index 0c9567de..0b8e6775 100644 --- a/sysdeps/solaris/ChangeLog +++ b/sysdeps/solaris/ChangeLog @@ -1,3 +1,8 @@ +2003-10-20 Bastien Nocera + + * mem.c: (glibtop_get_mem_s): + * swap.c: (glibtop_get_swap_s): s/u_int64_t/guint64/ + 2003-10-20 Bastien Nocera * glibtop_machine.h: diff --git a/sysdeps/solaris/mem.c b/sysdeps/solaris/mem.c index 50461992..5365ed45 100644 --- a/sysdeps/solaris/mem.c +++ b/sysdeps/solaris/mem.c @@ -63,7 +63,7 @@ glibtop_get_mem_s (glibtop *server, glibtop_mem *buf) 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; if(!kc) diff --git a/sysdeps/solaris/swap.c b/sysdeps/solaris/swap.c index b2e4721d..ccc554e1 100644 --- a/sysdeps/solaris/swap.c +++ b/sysdeps/solaris/swap.c @@ -49,7 +49,7 @@ glibtop_get_swap_s (glibtop *server, glibtop_swap *buf) { kstat_ctl_t *kc = server->machine.kc; 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; double rate; kid_t ret;