aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authordemon <demon@FreeBSD.org>2002-10-14 14:57:24 +0800
committerdemon <demon@FreeBSD.org>2002-10-14 14:57:24 +0800
commit7b56f301753719dbf3b632607d7573b4ab366d5c (patch)
tree4f4e5b4e86e5408fee2e04040d66b46401f1ff83 /net
parent081eb2fd7b7bcc746558d05c086a6fc24a130727 (diff)
downloadfreebsd-ports-gnome-7b56f301753719dbf3b632607d7573b4ab366d5c.tar.gz
freebsd-ports-gnome-7b56f301753719dbf3b632607d7573b4ab366d5c.tar.zst
freebsd-ports-gnome-7b56f301753719dbf3b632607d7573b4ab366d5c.zip
Upgrade port to version 2.16;
Add three patches: patch-aa: If you use CHUNK_INPUT without this patch, you end up with many error messages xferstats in free(): warning: modified (chunk-) pointer (or you may want to fix chunks...) patch-ab: If number of "Files Transmitted" is divisible by CHUNK_INPUT without this patch, you end up with error "No data to process." instead of results. patch-ac: Typical beginner's bug in C: feof() is used before read function, where its result is not tested then. Without this patch the last line is counted twice. PR: 44015 Submitted by: Cejka Rudolf <cejkar@fit.vutbr.cz>
Diffstat (limited to 'net')
-rw-r--r--net/xferstats/Makefile4
-rw-r--r--net/xferstats/distinfo2
-rw-r--r--net/xferstats/files/patch-aa10
-rw-r--r--net/xferstats/files/patch-ab23
-rw-r--r--net/xferstats/files/patch-ac84
5 files changed, 119 insertions, 4 deletions
diff --git a/net/xferstats/Makefile b/net/xferstats/Makefile
index a3961a2432d7..24e2a43596e7 100644
--- a/net/xferstats/Makefile
+++ b/net/xferstats/Makefile
@@ -6,15 +6,13 @@
#
PORTNAME= xferstats
-PORTVERSION= 2.14
+PORTVERSION= 2.16
CATEGORIES= net
MASTER_SITES= ftp://ftp.wu-ftpd.org/pub/support/ \
ftp://ftp.gpad.ac.ru/pub/FreeBSD/distfiles/
MAINTAINER= demon@FreeBSD.org
-WRKSRC= ${WRKDIR}/xferstats
-
USE_GNOMENG= yes
USE_GNOME= glib12
GNU_CONFIGURE= yes
diff --git a/net/xferstats/distinfo b/net/xferstats/distinfo
index a8d28c5f800a..d76b558d53b6 100644
--- a/net/xferstats/distinfo
+++ b/net/xferstats/distinfo
@@ -1 +1 @@
-MD5 (xferstats-2.14.tar.gz) = a14bad5dd5acafd615c3fc49a2f4899f
+MD5 (xferstats-2.16.tar.gz) = d3281d6eeef8d04856a17f6d05c326a2
diff --git a/net/xferstats/files/patch-aa b/net/xferstats/files/patch-aa
new file mode 100644
index 000000000000..5d8c8c41f9c8
--- /dev/null
+++ b/net/xferstats/files/patch-aa
@@ -0,0 +1,10 @@
+--- xferstats.x Thu Jan 11 19:35:18 2001
++++ xferstats.h Thu Jan 11 19:35:52 2001
+@@ -39,6 +39,7 @@
+
+ /* glibc's malloc is so damn efficient, chunks actually slow it down. so only
+ * use g_mem_chunks on non-glibc systems */
++#define __GLIBC__
+ #ifdef __GLIBC__
+ # define G_MEM_CHUNK_ALLOC(bar) g_malloc(bar)
+ # define G_MEM_CHUNK_ALLOC0(bar) g_malloc0(bar)
diff --git a/net/xferstats/files/patch-ab b/net/xferstats/files/patch-ab
new file mode 100644
index 000000000000..e07d53caa424
--- /dev/null
+++ b/net/xferstats/files/patch-ab
@@ -0,0 +1,23 @@
+--- xferstats.x Thu Jan 11 19:49:22 2001
++++ xferstats.c Thu Jan 11 19:50:31 2001
+@@ -2486,6 +2486,7 @@
+ {
+ pointers_t * pointers;
+ char * default_logfile;
++ int first = 1;
+
+ /* unbuffer stdout and stderr so output isn't lost */
+ setbuf(stdout, NULL);
+@@ -2559,10 +2560,11 @@
+
+ G_BLOW_CHUNKS();
+
+- if (!pointers->first_ftp_line) {
++ if (first && !pointers->first_ftp_line) {
+ fprintf(stderr, "No data to process.\n");
+ exit(0);
+ }
++ first = 0;
+
+ generate_daily_data(pointers, pointers->first_ftp_line);
+ if (pointers->config->dow_traffic)
diff --git a/net/xferstats/files/patch-ac b/net/xferstats/files/patch-ac
new file mode 100644
index 000000000000..6a0da013c765
--- /dev/null
+++ b/net/xferstats/files/patch-ac
@@ -0,0 +1,84 @@
+--- parselog.c.orig Sun Oct 13 17:39:55 2002
++++ parselog.c Sun Oct 13 17:42:12 2002
+@@ -202,15 +202,11 @@
+
+ while (1) {
+ if (pointers->config->use_stdin) {
+- if (feof(stdin))
++ if (fgets(foo, sizeof(foo), stdin) == NULL)
+ break;
+- /* there's probably a better way to do this :) */
+- fgets(foo, sizeof(foo), stdin);
+ } else {
+- if (feof(log_stream))
++ if (fgets(foo, sizeof(foo), log_stream) == NULL)
+ break;
+-
+- fgets(foo, sizeof(foo), log_stream);
+ }
+
+ if ((len = strlen(foo)) < 42)
+@@ -455,10 +451,8 @@
+ #ifdef HAVE_MMAP
+ if (pointers->config->use_stdin)
+ {
+- if (feof(stdin))
++ if (fgets(foo, sizeof(foo), stdin) == NULL)
+ break;
+- /* there's probably a better way to do this :) */
+- fgets(foo, sizeof(foo), stdin);
+ }
+ else
+ {
+@@ -497,17 +491,13 @@
+ #else /* HAVE_MMAP */
+ if (pointers->config->use_stdin)
+ {
+- if (feof(stdin))
++ if (fgets(foo, sizeof(foo), stdin) == NULL)
+ break;
+- /* there's probably a better way to do this :) */
+- fgets(foo, sizeof(foo), stdin);
+ }
+ else
+ {
+- if (feof(log_stream))
++ if (fgets(foo, sizeof(foo), log_stream) == NULL)
+ break;
+-
+- fgets(foo, sizeof(foo), log_stream);
+ }
+ #endif /* HAVE_MMAP */
+
+@@ -770,10 +760,8 @@
+ #ifdef HAVE_MMAP
+ if (pointers->config->use_stdin)
+ {
+- if (feof(stdin))
++ if (fgets(foo, sizeof(foo), stdin) == NULL)
+ break;
+- /* there's probably a better way to do this :) */
+- fgets(foo, 2047, stdin);
+ }
+ else
+ {
+@@ -812,17 +800,13 @@
+ #else /* HAVE_MMAP */
+ if (pointers->config->use_stdin)
+ {
+- if (feof(stdin))
++ if (fgets(foo, sizeof(foo), stdin) == NULL)
+ break;
+- /* there's probably a better way to do this :) */
+- fgets(foo, 2047, stdin);
+ }
+ else
+ {
+- if (feof(log_stream))
++ if (fgets(foo, sizeof(foo), log_stream) == NULL)
+ break;
+-
+- fgets(foo, sizeof(foo), log_stream);
+ }
+ #endif /* HAVE_MMAP */
+