From 35488aef904b03d01dd721939f6913749dabd3ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Dejean?= Date: Mon, 13 Sep 2004 15:21:54 +0000 Subject: [PATCH] bumped to 2.8.1. * configure.in: bumped to 2.8.1. * sysdeps/common/fsusage.c: * sysdeps/common/gnuslib.c: (glibtop_make_connection), (connect_to_unix_server), (glibtop_internet_addr): * sysdeps/linux/glibtop_server.c: (get_pageshift): * sysdeps/linux/glibtop_server.h: * sysdeps/linux/open.c: (glibtop_open_s): * sysdeps/linux/ppp.c: (is_ISDN_on): Cleanups. Thanks to Kjartan Maraas. Closes #151557. --- ChangeLog | 13 +++++++++++++ configure.in | 2 +- sysdeps/common/fsusage.c | 22 +++++++++++----------- sysdeps/common/gnuslib.c | 10 +++------- sysdeps/linux/glibtop_server.c | 4 ++-- sysdeps/linux/glibtop_server.h | 2 +- sysdeps/linux/open.c | 2 +- sysdeps/linux/ppp.c | 2 +- 8 files changed, 33 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index f56975c5..7cf40627 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2004-09-13 Benoît Dejean + + * configure.in: bumped to 2.8.1. + + * sysdeps/common/fsusage.c: + * sysdeps/common/gnuslib.c: (glibtop_make_connection), + (connect_to_unix_server), (glibtop_internet_addr): + * sysdeps/linux/glibtop_server.c: (get_pageshift): + * sysdeps/linux/glibtop_server.h: + * sysdeps/linux/open.c: (glibtop_open_s): + * sysdeps/linux/ppp.c: (is_ISDN_on): Cleanups. Thanks to Kjartan Maraas. + Closes #151557. + 2004-09-13 Benoît Dejean * NEWS: diff --git a/configure.in b/configure.in index bb1094bb..ab2c7d69 100644 --- a/configure.in +++ b/configure.in @@ -8,7 +8,7 @@ AC_CANONICAL_SYSTEM LIBGTOP_MAJOR_VERSION=2 LIBGTOP_MINOR_VERSION=8 -LIBGTOP_MICRO_VERSION=0 +LIBGTOP_MICRO_VERSION=1 LIBGTOP_VERSION=$LIBGTOP_MAJOR_VERSION.$LIBGTOP_MINOR_VERSION.$LIBGTOP_MICRO_VERSION AM_INIT_AUTOMAKE(libgtop, $LIBGTOP_VERSION) diff --git a/sysdeps/common/fsusage.c b/sysdeps/common/fsusage.c index 579d4ba2..b680afc8 100644 --- a/sysdeps/common/fsusage.c +++ b/sysdeps/common/fsusage.c @@ -16,7 +16,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#if HAVE_CONFIG_H +#ifdef HAVE_CONFIG_H # include #endif @@ -26,26 +26,26 @@ #include #include -#if HAVE_LIMITS_H +#ifdef HAVE_LIMITS_H # include #endif #ifndef CHAR_BIT # define CHAR_BIT 8 #endif -#if HAVE_SYS_PARAM_H +#ifdef HAVE_SYS_PARAM_H # include #endif -#if HAVE_SYS_MOUNT_H +#ifdef HAVE_SYS_MOUNT_H # include #endif -#if HAVE_SYS_VFS_H +#ifdef HAVE_SYS_VFS_H # include #endif -#if HAVE_SYS_FS_S5PARAM_H /* Fujitsu UXP/V */ +#ifdef HAVE_SYS_FS_S5PARAM_H /* Fujitsu UXP/V */ # include #endif @@ -53,21 +53,21 @@ # include /* SVR2 */ #endif -#if HAVE_FCNTL_H +#ifdef HAVE_FCNTL_H # include #endif -#if HAVE_SYS_STATFS_H +#ifdef HAVE_SYS_STATFS_H # include #endif -#if HAVE_DUSTAT_H /* AIX PS/2 */ +#ifdef HAVE_DUSTAT_H /* AIX PS/2 */ # include #endif -#if HAVE_SYS_STATVFS_H /* SVR4 */ +#ifdef HAVE_SYS_STATVFS_H /* SVR4 */ # include -int statvfs (); +int statvfs (const char *path, struct statvfs *buf); #endif /* Many space usage primitives use all 1 bits to denote a value that is diff --git a/sysdeps/common/gnuslib.c b/sysdeps/common/gnuslib.c index 2fb1a241..23581b07 100644 --- a/sysdeps/common/gnuslib.c +++ b/sysdeps/common/gnuslib.c @@ -58,10 +58,7 @@ static int connect_to_internet_server (const char *serverhost, u_short port); #include int -glibtop_make_connection (hostarg, portarg, s) - const char *hostarg; - int portarg; - int *s; +glibtop_make_connection (const char *hostarg, int portarg, int *s) { #ifdef INTERNET_DOMAIN_SOCKETS char *ptr; @@ -186,7 +183,7 @@ connect_to_unix_server (void) #else /* HIDE_UNIX_SOCKET */ sprintf (server.sun_path, "/tmp/lgtd%d", (int) geteuid ()); #endif /* HIDE_UNIX_SOCKET */ - if (connect (s, (struct sockaddr *) &server, strlen (server.sun_path) + 2) < 0) + if (connect (s, (struct sockaddr *)&server, strlen (server.sun_path) + 2) < 0) glibtop_error_io ("unable to connect to local"); return (s); @@ -201,8 +198,7 @@ connect_to_unix_server (void) * internet address passed. Return -1 on error. */ long -glibtop_internet_addr (host) - const char *host; +glibtop_internet_addr (const char *host) { struct hostent *hp; /* pointer to host info for remote host */ IN_ADDR numeric_addr; /* host address */ diff --git a/sysdeps/linux/glibtop_server.c b/sysdeps/linux/glibtop_server.c index 7d1bd232..74b784ef 100644 --- a/sysdeps/linux/glibtop_server.c +++ b/sysdeps/linux/glibtop_server.c @@ -10,7 +10,7 @@ #include /* gcc warning bug */ -unsigned get_pageshift(); +unsigned get_pageshift(void); unsigned long long @@ -86,7 +86,7 @@ file_to_buffer(glibtop *server, char *buffer, const char *filename) #warning "Ignore the following warning" -unsigned get_pageshift() +unsigned get_pageshift(void) { static unsigned pageshift = 0; diff --git a/sysdeps/linux/glibtop_server.h b/sysdeps/linux/glibtop_server.h index 80796c20..b3451b10 100644 --- a/sysdeps/linux/glibtop_server.h +++ b/sysdeps/linux/glibtop_server.h @@ -39,7 +39,7 @@ G_BEGIN_DECLS #define LINUX_VERSION_CODE(x,y,z) (0x10000*(x) + 0x100*(y) + z) -unsigned get_pageshift(); +unsigned get_pageshift(void); static inline char* next_token(const char *p) diff --git a/sysdeps/linux/open.c b/sysdeps/linux/open.c index c75c3c2f..ee35ba2b 100644 --- a/sysdeps/linux/open.c +++ b/sysdeps/linux/open.c @@ -81,7 +81,7 @@ glibtop_open_s (glibtop *server, const char *program_name, break; } -#if DEBUG +#ifdef DEBUG printf ("\nThis machine has %d CPUs.\n\n", server->ncpu); #endif } diff --git a/sysdeps/linux/ppp.c b/sysdeps/linux/ppp.c index baf02902..0d222218 100644 --- a/sysdeps/linux/ppp.c +++ b/sysdeps/linux/ppp.c @@ -82,7 +82,7 @@ get_ISDN_stats (glibtop *server, int *in, int *out) static gboolean is_ISDN_on (glibtop *server, int *online) { - FILE *f = 0; + FILE *f = NULL; char buffer [BUFSIZ], *p; int i;