Using u_int64_t' instead of
unsigned long' and `long' to avoid problems
1998-07-30 Martin Baulig <martin@home-of-linux.org> * include/glibtop/*.h: Using `u_int64_t' instead of `unsigned long' and `long' to avoid problems when client is on a 32bit system and the server on a 64bit system.
This commit is contained in:
committed by
Martin Baulig
parent
d18a6cf2ce
commit
902b6a8f16
@@ -62,9 +62,8 @@ typedef union _glibtop_response_union glibtop_response_union;
|
||||
|
||||
struct _glibtop_command
|
||||
{
|
||||
glibtop server;
|
||||
unsigned command;
|
||||
size_t size, data_size;
|
||||
u_int64_t command;
|
||||
u_int64_t size, data_size;
|
||||
char parameter [_GLIBTOP_PARAM_SIZE];
|
||||
};
|
||||
|
||||
@@ -76,8 +75,8 @@ union _glibtop_response_union
|
||||
|
||||
struct _glibtop_response
|
||||
{
|
||||
off_t offset;
|
||||
size_t size, data_size;
|
||||
int64_t offset;
|
||||
u_int64_t size, data_size;
|
||||
glibtop_response_union u;
|
||||
};
|
||||
|
||||
|
@@ -40,7 +40,7 @@ typedef struct _glibtop_cpu glibtop_cpu;
|
||||
|
||||
struct _glibtop_cpu
|
||||
{
|
||||
unsigned long flags,
|
||||
u_int64_t flags,
|
||||
total, /* GLIBTOP_CPU_TOTAL */
|
||||
user, /* GLIBTOP_CPU_USER */
|
||||
nice, /* GLIBTOP_CPU_NICE */
|
||||
|
@@ -39,7 +39,7 @@ typedef struct _glibtop_fsusage glibtop_fsusage;
|
||||
|
||||
struct _glibtop_fsusage
|
||||
{
|
||||
unsigned long flags,
|
||||
u_int64_t flags,
|
||||
blocks, /* Total blocks. */
|
||||
bfree, /* Free blocks available to superuser. */
|
||||
bavail, /* Free blocks available to non-superuser. */
|
||||
|
@@ -35,7 +35,7 @@ typedef struct _glibtop_loadavg glibtop_loadavg;
|
||||
|
||||
struct _glibtop_loadavg
|
||||
{
|
||||
unsigned long flags;
|
||||
u_int64_t flags;
|
||||
double loadavg [3]; /* GLIBTOP_LOADAVG_LOADAVG */
|
||||
};
|
||||
|
||||
|
@@ -42,7 +42,7 @@ typedef struct _glibtop_mem glibtop_mem;
|
||||
|
||||
struct _glibtop_mem
|
||||
{
|
||||
unsigned long flags,
|
||||
u_int64_t flags,
|
||||
total, /* GLIBTOP_MEM_TOTAL */
|
||||
used, /* GLIBTOP_MEM_USED */
|
||||
free, /* GLIBTOP_MEM_FREE */
|
||||
|
@@ -33,7 +33,7 @@ __BEGIN_DECLS
|
||||
|
||||
#define GLIBTOP_MAX_MOUNTLIST 3
|
||||
|
||||
#define GLIBTOP_MOUNTENTRY_LEN 80
|
||||
#define GLIBTOP_MOUNTENTRY_LEN 79
|
||||
|
||||
typedef struct _glibtop_mountentry glibtop_mountentry;
|
||||
|
||||
@@ -41,15 +41,15 @@ typedef struct _glibtop_mountlist glibtop_mountlist;
|
||||
|
||||
struct _glibtop_mountentry
|
||||
{
|
||||
u_int64_t dev;
|
||||
char devname [GLIBTOP_MOUNTENTRY_LEN+1];
|
||||
char mountdir [GLIBTOP_MOUNTENTRY_LEN+1];
|
||||
char type [GLIBTOP_MOUNTENTRY_LEN+1];
|
||||
dev_t dev;
|
||||
};
|
||||
|
||||
struct _glibtop_mountlist
|
||||
{
|
||||
unsigned long flags,
|
||||
u_int64_t flags,
|
||||
number, /* GLIBTOP_MOUNTLIST_NUMBER */
|
||||
total, /* GLIBTOP_MOUNTLIST_TOTAL */
|
||||
size; /* GLIBTOP_MOUNTLIST_SIZE */
|
||||
|
@@ -41,7 +41,7 @@ typedef struct _glibtop_msg_limits glibtop_msg_limits;
|
||||
|
||||
struct _glibtop_msg_limits
|
||||
{
|
||||
unsigned long flags,
|
||||
u_int64_t flags,
|
||||
msgpool, /* GLIBTOP_IPC_MSGPOOL */
|
||||
msgmap, /* GLIBTOP_IPC_MSGMAP */
|
||||
msgmax, /* GLIBTOP_IPC_MSGMAX */
|
||||
|
@@ -44,8 +44,8 @@ typedef struct _glibtop_proc_kernel glibtop_proc_kernel;
|
||||
|
||||
struct _glibtop_proc_kernel
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned long k_flags, /* kernel flags for the process */
|
||||
u_int64_t flags;
|
||||
u_int64_t 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
|
||||
|
@@ -37,7 +37,7 @@ typedef struct _glibtop_proclist glibtop_proclist;
|
||||
|
||||
struct _glibtop_proclist
|
||||
{
|
||||
unsigned long flags,
|
||||
u_int64_t flags,
|
||||
number, /* GLIBTOP_PROCLIST_NUMBER */
|
||||
total, /* GLIBTOP_PROCLIST_TOTAL */
|
||||
size; /* GLIBTOP_PROCLIST_SIZE */
|
||||
|
@@ -42,8 +42,8 @@ typedef struct _glibtop_proc_mem glibtop_proc_mem;
|
||||
|
||||
struct _glibtop_proc_mem
|
||||
{
|
||||
unsigned long flags;
|
||||
long size, /* total # of pages of memory */
|
||||
u_int64_t flags,
|
||||
size, /* total # of pages of memory */
|
||||
vsize, /* number of pages of virtual memory ... */
|
||||
resident, /* number of resident set
|
||||
* (non-swapped) pages (4k) */
|
||||
|
@@ -43,12 +43,12 @@ typedef struct _glibtop_proc_segment glibtop_proc_segment;
|
||||
|
||||
struct _glibtop_proc_segment
|
||||
{
|
||||
unsigned long flags;
|
||||
long trs, /* text resident set size */
|
||||
u_int64_t flags,
|
||||
trs, /* text resident set size */
|
||||
lrs, /* shared-lib resident set size */
|
||||
drs, /* data resident set size */
|
||||
dt; /* dirty pages */
|
||||
unsigned long start_code,
|
||||
dt, /* dirty pages */
|
||||
start_code,
|
||||
/* address of beginning of code segment */
|
||||
end_code, /* address of end of code segment */
|
||||
start_stack; /* address of the bottom of stack segment */
|
||||
|
@@ -40,8 +40,8 @@ typedef struct _glibtop_proc_signal glibtop_proc_signal;
|
||||
|
||||
struct _glibtop_proc_signal
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned long long signal, /* mask of pending signals */
|
||||
u_int64_t flags,
|
||||
signal, /* mask of pending signals */
|
||||
blocked, /* mask of blocked signals */
|
||||
sigignore, /* mask of ignored signals */
|
||||
sigcatch; /* mask of caught signals */
|
||||
|
@@ -40,7 +40,7 @@ typedef struct _glibtop_proc_state glibtop_proc_state;
|
||||
|
||||
struct _glibtop_proc_state
|
||||
{
|
||||
unsigned long flags;
|
||||
u_int64_t flags;
|
||||
char cmd[40], /* basename of executable file in
|
||||
* call to exec(2) */
|
||||
state; /* single-char code for process state
|
||||
|
@@ -43,8 +43,8 @@ typedef struct _glibtop_proc_time glibtop_proc_time;
|
||||
|
||||
struct _glibtop_proc_time
|
||||
{
|
||||
unsigned long flags;
|
||||
long start_time, /* start time of process --
|
||||
u_int64_t flags,
|
||||
start_time, /* start time of process --
|
||||
* seconds since 1-1-70 */
|
||||
utime, /* user-mode CPU time accumulated by process */
|
||||
stime, /* kernel-mode CPU time accumulated by process */
|
||||
|
@@ -48,7 +48,7 @@ typedef struct _glibtop_proc_uid glibtop_proc_uid;
|
||||
|
||||
struct _glibtop_proc_uid
|
||||
{
|
||||
unsigned long flags;
|
||||
u_int64_t flags;
|
||||
int uid, /* user id */
|
||||
euid, /* effective user id */
|
||||
gid, /* group id */
|
||||
|
@@ -44,7 +44,7 @@ typedef struct _glibtop_sem_limits glibtop_sem_limits;
|
||||
|
||||
struct _glibtop_sem_limits
|
||||
{
|
||||
unsigned long flags,
|
||||
u_int64_t flags,
|
||||
semmap, /* GLIBTOP_IPC_SEMMAP */
|
||||
semmni, /* GLIBTOP_IPC_SEMMNI */
|
||||
semmns, /* GLIBTOP_IPC_SEMMNS */
|
||||
|
@@ -39,7 +39,7 @@ typedef struct _glibtop_shm_limits glibtop_shm_limits;
|
||||
|
||||
struct _glibtop_shm_limits
|
||||
{
|
||||
unsigned long flags,
|
||||
u_int64_t flags,
|
||||
shmmax, /* GLIBTOP_IPC_SHMMAX */
|
||||
shmmin, /* GLIBTOP_IPC_SHMMIN */
|
||||
shmmni, /* GLIBTOP_IPC_SHMMNI */
|
||||
|
@@ -37,7 +37,7 @@ typedef struct _glibtop_swap glibtop_swap;
|
||||
|
||||
struct _glibtop_swap
|
||||
{
|
||||
unsigned long flags,
|
||||
u_int64_t flags,
|
||||
total, /* GLIBTOP_SWAP_TOTAL */
|
||||
used, /* GLIBTOP_SWAP_USED */
|
||||
free; /* GLIBTOP_SWAP_FREE */
|
||||
|
@@ -55,7 +55,7 @@ typedef struct _glibtop_sysdeps glibtop_sysdeps;
|
||||
|
||||
struct _glibtop_sysdeps
|
||||
{
|
||||
unsigned long flags,
|
||||
u_int64_t flags,
|
||||
features, /* server features */
|
||||
cpu, /* glibtop_cpu */
|
||||
mem, /* glibtop_mem */
|
||||
|
@@ -36,7 +36,7 @@ typedef struct _glibtop_uptime glibtop_uptime;
|
||||
|
||||
struct _glibtop_uptime
|
||||
{
|
||||
unsigned long flags;
|
||||
u_int64_t flags;
|
||||
double uptime, /* GLIBTOP_UPTIME_UPTIME */
|
||||
idletime; /* GLIBTOP_UPTIME_IDLETIME */
|
||||
};
|
||||
|
Reference in New Issue
Block a user