diff --git a/sysdeps/freebsd/cpu.c b/sysdeps/freebsd/cpu.c index 972b338a..a56106c7 100644 --- a/sysdeps/freebsd/cpu.c +++ b/sysdeps/freebsd/cpu.c @@ -28,9 +28,9 @@ #include static const unsigned long _glibtop_sysdeps_cpu = -(1 << GLIBTOP_CPU_TOTAL) + (1 << GLIBTOP_CPU_USER) + -(1 << GLIBTOP_CPU_NICE) + (1 << GLIBTOP_CPU_SYS) + -(1 << GLIBTOP_CPU_IDLE) + (1 << GLIBTOP_CPU_FREQUENCY); +(1L << GLIBTOP_CPU_TOTAL) + (1L << GLIBTOP_CPU_USER) + +(1L << GLIBTOP_CPU_NICE) + (1L << GLIBTOP_CPU_SYS) + +(1L << GLIBTOP_CPU_IDLE) + (1L << GLIBTOP_CPU_FREQUENCY); /* nlist structure for kernel access */ static struct nlist nlst [] = { @@ -70,7 +70,7 @@ glibtop_get_cpu_p (glibtop *server, glibtop_cpu *buf) struct clockinfo ci; size_t length; - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_CPU), 0); + glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_CPU), 0); memset (buf, 0, sizeof (glibtop_cpu)); diff --git a/sysdeps/freebsd/loadavg.c b/sysdeps/freebsd/loadavg.c index 834153bd..b0530e8a 100644 --- a/sysdeps/freebsd/loadavg.c +++ b/sysdeps/freebsd/loadavg.c @@ -28,7 +28,7 @@ #include static const unsigned long _glibtop_sysdeps_loadavg = -(1 << GLIBTOP_LOADAVG_LOADAVG); +(1L << GLIBTOP_LOADAVG_LOADAVG); /* Init function. */ @@ -46,7 +46,7 @@ glibtop_get_loadavg_p (glibtop *server, glibtop_loadavg *buf) double ldavg[3]; int i; - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_LOADAVG), 0); + glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_LOADAVG), 0); memset (buf, 0, sizeof (glibtop_loadavg)); diff --git a/sysdeps/freebsd/mem.c b/sysdeps/freebsd/mem.c index e8b774d8..63a71c41 100644 --- a/sysdeps/freebsd/mem.c +++ b/sysdeps/freebsd/mem.c @@ -32,14 +32,14 @@ #include static const unsigned long _glibtop_sysdeps_mem = -(1 << GLIBTOP_MEM_TOTAL) + (1 << GLIBTOP_MEM_USED) + -(1 << GLIBTOP_MEM_FREE) + -(1 << GLIBTOP_MEM_SHARED) + -(1 << GLIBTOP_MEM_BUFFER) + +(1L << GLIBTOP_MEM_TOTAL) + (1L << GLIBTOP_MEM_USED) + +(1L << GLIBTOP_MEM_FREE) + +(1L << GLIBTOP_MEM_SHARED) + +(1L << GLIBTOP_MEM_BUFFER) + #ifdef __FreeBSD__ -(1 << GLIBTOP_MEM_CACHED) + +(1L << GLIBTOP_MEM_CACHED) + #endif -(1 << GLIBTOP_MEM_USER) + (1 << GLIBTOP_MEM_LOCKED); +(1L << GLIBTOP_MEM_USER) + (1L << GLIBTOP_MEM_LOCKED); #ifndef LOG1024 #define LOG1024 10 @@ -109,7 +109,7 @@ glibtop_get_mem_p (glibtop *server, glibtop_mem *buf) u_int v_total_count; int bufspace; - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_MEM), 0); + glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_MEM), 0); memset (buf, 0, sizeof (glibtop_mem)); diff --git a/sysdeps/freebsd/msg_limits.c b/sysdeps/freebsd/msg_limits.c index be4b9d9f..3c4de8d5 100644 --- a/sysdeps/freebsd/msg_limits.c +++ b/sysdeps/freebsd/msg_limits.c @@ -37,7 +37,7 @@ glibtop_init_msg_limits_p (glibtop *server) void glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf) { - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_MSG_LIMITS), 0); + glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_MSG_LIMITS), 0); memset (buf, 0, sizeof (glibtop_msg_limits)); } @@ -56,9 +56,9 @@ glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf) #include static const unsigned long _glibtop_sysdeps_msg_limits = -(1 << GLIBTOP_IPC_MSGMAX) + (1 << GLIBTOP_IPC_MSGMNI) + -(1 << GLIBTOP_IPC_MSGMNB) + (1 << GLIBTOP_IPC_MSGTQL) + -(1 << GLIBTOP_IPC_MSGSSZ); +(1L << GLIBTOP_IPC_MSGMAX) + (1L << GLIBTOP_IPC_MSGMNI) + +(1L << GLIBTOP_IPC_MSGMNB) + (1L << GLIBTOP_IPC_MSGTQL) + +(1L << GLIBTOP_IPC_MSGSSZ); /* The values in this structure never change at runtime, so we only * read it once during initialization. We have to use the name `_msginfo' @@ -95,7 +95,7 @@ glibtop_init_msg_limits_p (glibtop *server) void glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf) { - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_MSG_LIMITS), 0); + glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_MSG_LIMITS), 0); memset (buf, 0, sizeof (glibtop_msg_limits)); diff --git a/sysdeps/freebsd/netload.c b/sysdeps/freebsd/netload.c index 30821048..cc252326 100644 --- a/sysdeps/freebsd/netload.c +++ b/sysdeps/freebsd/netload.c @@ -39,20 +39,20 @@ #include static const unsigned long _glibtop_sysdeps_netload = -(1 << GLIBTOP_NETLOAD_IF_FLAGS) + -(1 << GLIBTOP_NETLOAD_MTU) + -(1 << GLIBTOP_NETLOAD_SUBNET) + -(1 << GLIBTOP_NETLOAD_ADDRESS) + -(1 << GLIBTOP_NETLOAD_PACKETS_IN) + -(1 << GLIBTOP_NETLOAD_PACKETS_OUT) + -(1 << GLIBTOP_NETLOAD_PACKETS_TOTAL) + -(1 << GLIBTOP_NETLOAD_BYTES_IN) + -(1 << GLIBTOP_NETLOAD_BYTES_OUT) + -(1 << GLIBTOP_NETLOAD_BYTES_TOTAL) + -(1 << GLIBTOP_NETLOAD_ERRORS_IN) + -(1 << GLIBTOP_NETLOAD_ERRORS_OUT) + -(1 << GLIBTOP_NETLOAD_ERRORS_TOTAL) + -(1 << GLIBTOP_NETLOAD_COLLISIONS); +(1L << GLIBTOP_NETLOAD_IF_FLAGS) + +(1L << GLIBTOP_NETLOAD_MTU) + +(1L << GLIBTOP_NETLOAD_SUBNET) + +(1L << GLIBTOP_NETLOAD_ADDRESS) + +(1L << GLIBTOP_NETLOAD_PACKETS_IN) + +(1L << GLIBTOP_NETLOAD_PACKETS_OUT) + +(1L << GLIBTOP_NETLOAD_PACKETS_TOTAL) + +(1L << GLIBTOP_NETLOAD_BYTES_IN) + +(1L << GLIBTOP_NETLOAD_BYTES_OUT) + +(1L << GLIBTOP_NETLOAD_BYTES_TOTAL) + +(1L << GLIBTOP_NETLOAD_ERRORS_IN) + +(1L << GLIBTOP_NETLOAD_ERRORS_OUT) + +(1L << GLIBTOP_NETLOAD_ERRORS_TOTAL) + +(1L << GLIBTOP_NETLOAD_COLLISIONS); /* nlist structure for kernel access */ static struct nlist nlst [] = { @@ -87,7 +87,7 @@ glibtop_get_netload_p (glibtop *server, glibtop_netload *buf, struct in_ifaddr in; } ifaddr; - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_NETLOAD), 0); + glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_NETLOAD), 0); memset (buf, 0, sizeof (glibtop_netload)); diff --git a/sysdeps/freebsd/ppp.c b/sysdeps/freebsd/ppp.c index 8b3bdfe0..792a1e7a 100644 --- a/sysdeps/freebsd/ppp.c +++ b/sysdeps/freebsd/ppp.c @@ -51,11 +51,11 @@ #endif static const unsigned long _glibtop_sysdeps_ppp = -(1 << GLIBTOP_PPP_STATE); +(1L << GLIBTOP_PPP_STATE); #ifdef HAVE_I4B_ACCT static const unsigned long _glibtop_sysdeps_ppp_acct = -(1 << GLIBTOP_PPP_BYTES_IN) + (1 << GLIBTOP_PPP_BYTES_OUT); +(1L << GLIBTOP_PPP_BYTES_IN) + (1L << GLIBTOP_PPP_BYTES_OUT); #endif #endif /* HAVE_I4B */ @@ -99,7 +99,7 @@ glibtop_get_ppp_p (glibtop *server, glibtop_ppp *buf, unsigned short device) #endif int phase; - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PPP), 0); + glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PPP), 0); memset (buf, 0, sizeof (glibtop_ppp)); diff --git a/sysdeps/freebsd/procargs.c b/sysdeps/freebsd/procargs.c index 84a0a619..83b6a78b 100644 --- a/sysdeps/freebsd/procargs.c +++ b/sysdeps/freebsd/procargs.c @@ -33,7 +33,7 @@ #include static const unsigned long _glibtop_sysdeps_proc_args = -(1 << GLIBTOP_PROC_ARGS_SIZE); +(1L << GLIBTOP_PROC_ARGS_SIZE); /* Init function. */ @@ -59,7 +59,7 @@ glibtop_get_proc_args_p (glibtop *server, glibtop_proc_args *buf, struct stat statb; #endif - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_ARGS), 0); + glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_ARGS), 0); memset (buf, 0, sizeof (glibtop_proc_args)); diff --git a/sysdeps/freebsd/procdata.c b/sysdeps/freebsd/procdata.c index 4b76e252..65ec6822 100644 --- a/sysdeps/freebsd/procdata.c +++ b/sysdeps/freebsd/procdata.c @@ -28,7 +28,7 @@ #define LINUX_VERSION(x,y,z) (0x10000*(x) + 0x100*(y) + z) -#define BIT_SHIFT(x) (1 << (x % 32)) +#define BIT_SHIFT(x) (1L << (x % 64)) static const unsigned long _glibtop_sysdeps_procdata_0 = BIT_SHIFT(GLIBTOP_PROCDATA_CMD) + diff --git a/sysdeps/freebsd/prockernel.c b/sysdeps/freebsd/prockernel.c index b1dc4c76..7f0ab38a 100644 --- a/sysdeps/freebsd/prockernel.c +++ b/sysdeps/freebsd/prockernel.c @@ -49,18 +49,18 @@ #endif static const unsigned long _glibtop_sysdeps_proc_kernel_pstats = -(1 << GLIBTOP_PROC_KERNEL_MIN_FLT) + -(1 << GLIBTOP_PROC_KERNEL_MAJ_FLT) + -(1 << GLIBTOP_PROC_KERNEL_CMIN_FLT) + -(1 << GLIBTOP_PROC_KERNEL_CMAJ_FLT); +(1L << GLIBTOP_PROC_KERNEL_MIN_FLT) + +(1L << GLIBTOP_PROC_KERNEL_MAJ_FLT) + +(1L << GLIBTOP_PROC_KERNEL_CMIN_FLT) + +(1L << GLIBTOP_PROC_KERNEL_CMAJ_FLT); static const unsigned long _glibtop_sysdeps_proc_kernel_pcb = -(1 << GLIBTOP_PROC_KERNEL_KSTK_EIP) + -(1 << GLIBTOP_PROC_KERNEL_KSTK_ESP); +(1L << GLIBTOP_PROC_KERNEL_KSTK_EIP) + +(1L << GLIBTOP_PROC_KERNEL_KSTK_ESP); static const unsigned long _glibtop_sysdeps_proc_kernel_wchan = -(1 << GLIBTOP_PROC_KERNEL_NWCHAN) + -(1 << GLIBTOP_PROC_KERNEL_WCHAN); +(1L << GLIBTOP_PROC_KERNEL_NWCHAN) + +(1L << GLIBTOP_PROC_KERNEL_WCHAN); /* Init function. */ @@ -86,7 +86,7 @@ glibtop_get_proc_kernel_p (glibtop *server, char filename [BUFSIZ]; struct stat statb; - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_KERNEL), 0); + glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_KERNEL), 0); memset (buf, 0, sizeof (glibtop_proc_kernel)); @@ -102,13 +102,13 @@ glibtop_get_proc_kernel_p (glibtop *server, glibtop_error_io_r (server, "kvm_getprocs (%d)", pid); buf->nwchan = (unsigned long) pinfo [0].kp_proc.p_wchan &~ KERNBASE; - buf->flags |= (1 << GLIBTOP_PROC_KERNEL_NWCHAN); + buf->flags |= (1L << GLIBTOP_PROC_KERNEL_NWCHAN); if (pinfo [0].kp_proc.p_wchan && pinfo [0].kp_proc.p_wmesg) { strncpy (buf->wchan, pinfo [0].kp_eproc.e_wmesg, sizeof (buf->wchan) - 1); buf->wchan [sizeof (buf->wchan) - 1] = 0; - buf->flags |= (1 << GLIBTOP_PROC_KERNEL_WCHAN); + buf->flags |= (1L << GLIBTOP_PROC_KERNEL_WCHAN); } else { buf->wchan [0] = 0; } diff --git a/sysdeps/freebsd/proclist.c b/sysdeps/freebsd/proclist.c index 11ffa7b1..20353ec5 100644 --- a/sysdeps/freebsd/proclist.c +++ b/sysdeps/freebsd/proclist.c @@ -29,8 +29,8 @@ #include static const unsigned long _glibtop_sysdeps_proclist = -(1 << GLIBTOP_PROCLIST_TOTAL) + (1 << GLIBTOP_PROCLIST_NUMBER) + -(1 << GLIBTOP_PROCLIST_SIZE); +(1L << GLIBTOP_PROCLIST_TOTAL) + (1L << GLIBTOP_PROCLIST_NUMBER) + +(1L << GLIBTOP_PROCLIST_SIZE); /* Fetch list of currently running processes. * The interface of this function is a little bit different from the others: @@ -67,7 +67,7 @@ glibtop_get_proclist_p (glibtop *server, glibtop_proclist *buf, int which, count; int i,j; - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROCLIST), 0); + glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROCLIST), 0); memset (buf, 0, sizeof (glibtop_proclist)); diff --git a/sysdeps/freebsd/procmap.c b/sysdeps/freebsd/procmap.c index e4944e4d..2c9cc251 100644 --- a/sysdeps/freebsd/procmap.c +++ b/sysdeps/freebsd/procmap.c @@ -49,13 +49,13 @@ #include static const unsigned long _glibtop_sysdeps_proc_map = -(1 << GLIBTOP_PROC_MAP_TOTAL) + (1 << GLIBTOP_PROC_MAP_NUMBER) + -(1 << GLIBTOP_PROC_MAP_SIZE); +(1L << GLIBTOP_PROC_MAP_TOTAL) + (1L << GLIBTOP_PROC_MAP_NUMBER) + +(1L << GLIBTOP_PROC_MAP_SIZE); static const unsigned long _glibtop_sysdeps_map_entry = -(1 << GLIBTOP_MAP_ENTRY_START) + (1 << GLIBTOP_MAP_ENTRY_END) + -(1 << GLIBTOP_MAP_ENTRY_OFFSET) + (1 << GLIBTOP_MAP_ENTRY_PERM) + -(1 << GLIBTOP_MAP_ENTRY_INODE) + (1 << GLIBTOP_MAP_ENTRY_DEVICE); +(1L << GLIBTOP_MAP_ENTRY_START) + (1L << GLIBTOP_MAP_ENTRY_END) + +(1L << GLIBTOP_MAP_ENTRY_OFFSET) + (1L << GLIBTOP_MAP_ENTRY_PERM) + +(1L << GLIBTOP_MAP_ENTRY_INODE) + (1L << GLIBTOP_MAP_ENTRY_DEVICE); /* Init function. */ @@ -82,7 +82,7 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf, int count, i = 0; int update = 0; - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_MAP), 0); + glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_MAP), 0); memset (buf, 0, sizeof (glibtop_proc_map)); diff --git a/sysdeps/freebsd/procmem.c b/sysdeps/freebsd/procmem.c index 42140a7d..5217e671 100644 --- a/sysdeps/freebsd/procmem.c +++ b/sysdeps/freebsd/procmem.c @@ -46,12 +46,12 @@ #include static const unsigned long _glibtop_sysdeps_proc_mem = -(1 << GLIBTOP_PROC_MEM_SIZE) + -(1 << GLIBTOP_PROC_MEM_VSIZE) + -(1 << GLIBTOP_PROC_MEM_SHARE) + -(1 << GLIBTOP_PROC_MEM_RESIDENT) + -(1 << GLIBTOP_PROC_MEM_RSS) + -(1 << GLIBTOP_PROC_MEM_RSS_RLIM); +(1L << GLIBTOP_PROC_MEM_SIZE) + +(1L << GLIBTOP_PROC_MEM_VSIZE) + +(1L << GLIBTOP_PROC_MEM_SHARE) + +(1L << GLIBTOP_PROC_MEM_RESIDENT) + +(1L << GLIBTOP_PROC_MEM_RSS) + +(1L << GLIBTOP_PROC_MEM_RSS_RLIM); #ifndef LOG1024 #define LOG1024 10 @@ -98,7 +98,7 @@ glibtop_get_proc_mem_p (glibtop *server, glibtop_proc_mem *buf, struct plimit plimit; int count; - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_MEM), 0); + glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_MEM), 0); memset (buf, 0, sizeof (glibtop_proc_mem)); diff --git a/sysdeps/freebsd/procsegment.c b/sysdeps/freebsd/procsegment.c index 1580f574..915472ef 100644 --- a/sysdeps/freebsd/procsegment.c +++ b/sysdeps/freebsd/procsegment.c @@ -48,7 +48,7 @@ glibtop_get_proc_segment_p (glibtop *server, glibtop_proc_segment *buf, pid_t pid) { - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_SEGMENT), 0); + glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_SEGMENT), 0); memset (buf, 0, sizeof (glibtop_proc_segment)); diff --git a/sysdeps/freebsd/procsignal.c b/sysdeps/freebsd/procsignal.c index 80cb1d45..38826a71 100644 --- a/sysdeps/freebsd/procsignal.c +++ b/sysdeps/freebsd/procsignal.c @@ -28,10 +28,10 @@ #include static const unsigned long _glibtop_sysdeps_proc_signal = -(1 << GLIBTOP_PROC_SIGNAL_SIGNAL) + -(1 << GLIBTOP_PROC_SIGNAL_BLOCKED) + -(1 << GLIBTOP_PROC_SIGNAL_SIGIGNORE) + -(1 << GLIBTOP_PROC_SIGNAL_SIGCATCH); +(1L << GLIBTOP_PROC_SIGNAL_SIGNAL) + +(1L << GLIBTOP_PROC_SIGNAL_BLOCKED) + +(1L << GLIBTOP_PROC_SIGNAL_SIGIGNORE) + +(1L << GLIBTOP_PROC_SIGNAL_SIGCATCH); /* Init function. */ @@ -49,7 +49,7 @@ glibtop_get_proc_signal_p (glibtop *server, struct kinfo_proc *pinfo; int count = 0; - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_SIGNAL), 0); + glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_SIGNAL), 0); memset (buf, 0, sizeof (glibtop_proc_signal)); diff --git a/sysdeps/freebsd/procstate.c b/sysdeps/freebsd/procstate.c index e1a2476d..b04df0fc 100644 --- a/sysdeps/freebsd/procstate.c +++ b/sysdeps/freebsd/procstate.c @@ -33,8 +33,8 @@ #endif static const unsigned long _glibtop_sysdeps_proc_state = -(1 << GLIBTOP_PROC_STATE_CMD) + (1 << GLIBTOP_PROC_STATE_UID) + -(1 << GLIBTOP_PROC_STATE_GID); +(1L << GLIBTOP_PROC_STATE_CMD) + (1L << GLIBTOP_PROC_STATE_UID) + +(1L << GLIBTOP_PROC_STATE_GID); /* Init function. */ @@ -54,7 +54,7 @@ glibtop_get_proc_state_p (glibtop *server, struct kinfo_proc *pinfo; int count = 0; - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_STATE), 0); + glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_STATE), 0); memset (buf, 0, sizeof (glibtop_proc_state)); @@ -97,5 +97,5 @@ glibtop_get_proc_state_p (glibtop *server, return; } - buf->flags |= (1 << GLIBTOP_PROC_STATE_STATE); + buf->flags |= (1L << GLIBTOP_PROC_STATE_STATE); } diff --git a/sysdeps/freebsd/proctime.c b/sysdeps/freebsd/proctime.c index 0f4384b9..2b16e0cd 100644 --- a/sysdeps/freebsd/proctime.c +++ b/sysdeps/freebsd/proctime.c @@ -32,11 +32,11 @@ #endif static const unsigned long _glibtop_sysdeps_proc_time = -(1 << GLIBTOP_PROC_TIME_RTIME) + (1 << GLIBTOP_PROC_TIME_FREQUENCY); +(1L << GLIBTOP_PROC_TIME_RTIME) + (1L << GLIBTOP_PROC_TIME_FREQUENCY); static const unsigned long _glibtop_sysdeps_proc_time_user = -(1 << GLIBTOP_PROC_TIME_UTIME) + (1 << GLIBTOP_PROC_TIME_STIME) + -(1 << GLIBTOP_PROC_TIME_CUTIME) + (1 << GLIBTOP_PROC_TIME_CSTIME); +(1L << GLIBTOP_PROC_TIME_UTIME) + (1L << GLIBTOP_PROC_TIME_STIME) + +(1L << GLIBTOP_PROC_TIME_CUTIME) + (1L << GLIBTOP_PROC_TIME_CSTIME); #define tv2sec(tv) (((u_int64_t) tv.tv_sec * 1000000) + (u_int64_t) tv.tv_usec) @@ -130,7 +130,7 @@ glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf, char filename [BUFSIZ]; struct stat statb; - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_TIME), 0); + glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_TIME), 0); memset (buf, 0, sizeof (glibtop_proc_time)); diff --git a/sysdeps/freebsd/procuid.c b/sysdeps/freebsd/procuid.c index 93e485ec..3f68a3b1 100644 --- a/sysdeps/freebsd/procuid.c +++ b/sysdeps/freebsd/procuid.c @@ -28,11 +28,11 @@ #include static const unsigned long _glibtop_sysdeps_proc_uid = -(1 << GLIBTOP_PROC_UID_UID) + (1 << GLIBTOP_PROC_UID_EUID) + -(1 << GLIBTOP_PROC_UID_EGID) + (1 << GLIBTOP_PROC_UID_PID) + -(1 << GLIBTOP_PROC_UID_PPID) + (1 << GLIBTOP_PROC_UID_PGRP) + -(1 << GLIBTOP_PROC_UID_TPGID) + (1 << GLIBTOP_PROC_UID_PRIORITY) + -(1 << GLIBTOP_PROC_UID_NICE); +(1L << GLIBTOP_PROC_UID_UID) + (1L << GLIBTOP_PROC_UID_EUID) + +(1L << GLIBTOP_PROC_UID_EGID) + (1L << GLIBTOP_PROC_UID_PID) + +(1L << GLIBTOP_PROC_UID_PPID) + (1L << GLIBTOP_PROC_UID_PGRP) + +(1L << GLIBTOP_PROC_UID_TPGID) + (1L << GLIBTOP_PROC_UID_PRIORITY) + +(1L << GLIBTOP_PROC_UID_NICE); /* Init function. */ @@ -51,7 +51,7 @@ glibtop_get_proc_uid_p (glibtop *server, glibtop_proc_uid *buf, struct kinfo_proc *pinfo; int count = 0; - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_UID), 0); + glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_PROC_UID), 0); memset (buf, 0, sizeof (glibtop_proc_uid)); diff --git a/sysdeps/freebsd/sem_limits.c b/sysdeps/freebsd/sem_limits.c index a52b82f9..13b36130 100644 --- a/sysdeps/freebsd/sem_limits.c +++ b/sysdeps/freebsd/sem_limits.c @@ -37,7 +37,7 @@ glibtop_init_sem_limits_p (glibtop *server) void glibtop_get_sem_limits_p (glibtop *server, glibtop_sem_limits *buf) { - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_SEM_LIMITS), 0); + glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_SEM_LIMITS), 0); memset (buf, 0, sizeof (glibtop_sem_limits)); } @@ -56,11 +56,11 @@ glibtop_get_sem_limits_p (glibtop *server, glibtop_sem_limits *buf) #include static unsigned long _glibtop_sysdeps_sem_limits = -(1 << GLIBTOP_IPC_SEMMAP) + (1 << GLIBTOP_IPC_SEMMNI) + -(1 << GLIBTOP_IPC_SEMMNS) + (1 << GLIBTOP_IPC_SEMMNU) + -(1 << GLIBTOP_IPC_SEMMSL) + (1 << GLIBTOP_IPC_SEMOPM) + -(1 << GLIBTOP_IPC_SEMUME) + (1 << GLIBTOP_IPC_SEMUSZ) + -(1 << GLIBTOP_IPC_SEMVMX) + (1 << GLIBTOP_IPC_SEMAEM); +(1L << GLIBTOP_IPC_SEMMAP) + (1L << GLIBTOP_IPC_SEMMNI) + +(1L << GLIBTOP_IPC_SEMMNS) + (1L << GLIBTOP_IPC_SEMMNU) + +(1L << GLIBTOP_IPC_SEMMSL) + (1L << GLIBTOP_IPC_SEMOPM) + +(1L << GLIBTOP_IPC_SEMUME) + (1L << GLIBTOP_IPC_SEMUSZ) + +(1L << GLIBTOP_IPC_SEMVMX) + (1L << GLIBTOP_IPC_SEMAEM); /* The values in this structure never change at runtime, so we only * read it once during initialization. We have to use the name `_seminfo' @@ -97,7 +97,7 @@ glibtop_init_sem_limits_p (glibtop *server) void glibtop_get_sem_limits_p (glibtop *server, glibtop_sem_limits *buf) { - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_SEM_LIMITS), 0); + glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_SEM_LIMITS), 0); memset (buf, 0, sizeof (glibtop_sem_limits)); diff --git a/sysdeps/freebsd/shm_limits.c b/sysdeps/freebsd/shm_limits.c index 0d049549..f8ab72c1 100644 --- a/sysdeps/freebsd/shm_limits.c +++ b/sysdeps/freebsd/shm_limits.c @@ -37,7 +37,7 @@ glibtop_init_shm_limits_p (glibtop *server) void glibtop_get_shm_limits_p (glibtop *server, glibtop_shm_limits *buf) { - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_SHM_LIMITS), 0); + glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_SHM_LIMITS), 0); memset (buf, 0, sizeof (glibtop_shm_limits)); } @@ -56,9 +56,9 @@ glibtop_get_shm_limits_p (glibtop *server, glibtop_shm_limits *buf) #include static unsigned long _glibtop_sysdeps_shm_limits = -(1 << GLIBTOP_IPC_SHMMAX) + (1 << GLIBTOP_IPC_SHMMIN) + -(1 << GLIBTOP_IPC_SHMMNI) + (1 << GLIBTOP_IPC_SHMSEG) + -(1 << GLIBTOP_IPC_SHMALL); +(1L << GLIBTOP_IPC_SHMMAX) + (1L << GLIBTOP_IPC_SHMMIN) + +(1L << GLIBTOP_IPC_SHMMNI) + (1L << GLIBTOP_IPC_SHMSEG) + +(1L << GLIBTOP_IPC_SHMALL); /* The values in this structure never change at runtime, so we only * read it once during initialization. We have to use the name `_shminfo' @@ -95,7 +95,7 @@ glibtop_init_shm_limits_p (glibtop *server) void glibtop_get_shm_limits_p (glibtop *server, glibtop_shm_limits *buf) { - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_SHM_LIMITS), 0); + glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_SHM_LIMITS), 0); memset (buf, 0, sizeof (glibtop_shm_limits)); diff --git a/sysdeps/freebsd/swap.c b/sysdeps/freebsd/swap.c index b6980b3e..d051a2d3 100644 --- a/sysdeps/freebsd/swap.c +++ b/sysdeps/freebsd/swap.c @@ -30,9 +30,9 @@ #include static const unsigned long _glibtop_sysdeps_swap = -(1 << GLIBTOP_SWAP_TOTAL) + (1 << GLIBTOP_SWAP_USED) + -(1 << GLIBTOP_SWAP_FREE) + (1 << GLIBTOP_SWAP_PAGEIN) + -(1 << GLIBTOP_SWAP_PAGEOUT); +(1L << GLIBTOP_SWAP_TOTAL) + (1L << GLIBTOP_SWAP_USED) + +(1L << GLIBTOP_SWAP_FREE) + (1L << GLIBTOP_SWAP_PAGEIN) + +(1L << GLIBTOP_SWAP_PAGEOUT); #if defined(__FreeBSD__) || defined(__bsdi__) @@ -150,7 +150,7 @@ glibtop_get_swap_p (glibtop *server, glibtop_swap *buf) static int swappgsin = -1; static int swappgsout = -1; - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_SWAP), 0); + glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_SWAP), 0); memset (buf, 0, sizeof (glibtop_swap)); diff --git a/sysdeps/freebsd/uptime.c b/sysdeps/freebsd/uptime.c index 5d0ae450..250a72d1 100644 --- a/sysdeps/freebsd/uptime.c +++ b/sysdeps/freebsd/uptime.c @@ -30,11 +30,11 @@ #include static const unsigned long _glibtop_sysdeps_uptime = -(1 << GLIBTOP_UPTIME_UPTIME) + (1 << GLIBTOP_UPTIME_IDLETIME); +(1L << GLIBTOP_UPTIME_UPTIME) + (1L << GLIBTOP_UPTIME_IDLETIME); static const unsigned long _required_cpu_flags = -(1 << GLIBTOP_CPU_TOTAL) + (1 << GLIBTOP_CPU_IDLE) + -(1 << GLIBTOP_CPU_FREQUENCY); +(1L << GLIBTOP_CPU_TOTAL) + (1L << GLIBTOP_CPU_IDLE) + +(1L << GLIBTOP_CPU_FREQUENCY); /* Init function. */ @@ -51,7 +51,7 @@ glibtop_get_uptime_p (glibtop *server, glibtop_uptime *buf) { glibtop_cpu cpu; - glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_UPTIME), 0); + glibtop_init_p (server, (1L << GLIBTOP_SYSDEPS_UPTIME), 0); memset (buf, 0, sizeof (glibtop_uptime));