aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2018-02-04 09:44:23 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2018-02-04 09:44:23 +0000
commit5bb1e00e7c7ad131f285249c177e48271a3c9782 (patch)
treeddb15848414ccf94cd376626013d67604c19e821
parentf074c54f0217028c9244c0d7da2d90625498d3d6 (diff)
downloadports-5bb1e00e7c7ad131f285249c177e48271a3c9782.tar.gz
ports-5bb1e00e7c7ad131f285249c177e48271a3c9782.zip
Notes
-rw-r--r--sysutils/apachetop/Makefile4
-rw-r--r--sysutils/apachetop/files/patch-src_apachetop.cc20
-rw-r--r--sysutils/apachetop/files/patch-src_display.cc20
-rw-r--r--sysutils/apachetop/files/patch-src_hits__circle.cc11
-rw-r--r--sysutils/apachetop/files/patch-src_log.cc56
5 files changed, 110 insertions, 1 deletions
diff --git a/sysutils/apachetop/Makefile b/sysutils/apachetop/Makefile
index 8a317f3300bb..76ef9bb4927a 100644
--- a/sysutils/apachetop/Makefile
+++ b/sysutils/apachetop/Makefile
@@ -5,11 +5,13 @@ PORTNAME= apachetop
PORTVERSION= 0.12.6
PORTREVISION= 5
CATEGORIES= sysutils
-MASTER_SITES= http://lukasz.wasikowski.net/files/
+MASTER_SITES= https://lukasz.wasikowski.net/files/
MAINTAINER= lukasz@wasikowski.net
COMMENT= Apache RealTime log stats
+LICENSE= BSD3CLAUSE
+
GNU_CONFIGURE= yes
USES= ncurses readline
diff --git a/sysutils/apachetop/files/patch-src_apachetop.cc b/sysutils/apachetop/files/patch-src_apachetop.cc
new file mode 100644
index 000000000000..626794173b20
--- /dev/null
+++ b/sysutils/apachetop/files/patch-src_apachetop.cc
@@ -0,0 +1,20 @@
+--- src/apachetop.cc.orig 2005-10-15 16:23:31 UTC
++++ src/apachetop.cc
+@@ -271,7 +271,7 @@ int main(int argc, char *argv[])
+ hm->create(cf.circle_size);
+ /* }}} */
+
+- memset(&gstats, (char) NULL, sizeof(gstats));
++ memset(&gstats, 0, sizeof(gstats));
+ gstats.start = time(NULL);
+
+ signal(SIGINT, &catchsig);
+@@ -465,7 +465,7 @@ int main(int argc, char *argv[])
+ continue;
+ }
+
+- *nextline = (char) NULL;
++ *nextline = '\0';
+ ++nextline;
+
+ /* which parser? */
diff --git a/sysutils/apachetop/files/patch-src_display.cc b/sysutils/apachetop/files/patch-src_display.cc
new file mode 100644
index 000000000000..78b32790f3c1
--- /dev/null
+++ b/sysutils/apachetop/files/patch-src_display.cc
@@ -0,0 +1,20 @@
+--- src/display.cc.orig 2005-10-15 16:10:01 UTC
++++ src/display.cc
+@@ -1191,7 +1191,7 @@ void display_histogram()
+
+ /* compose a row of hashes */
+ memset(line, ' ', hist_width);
+- line[hist_width] = (char)NULL;
++ line[hist_width] = '\0';
+ for(j = 0 ; j < hist_width ; ++j)
+ {
+ if (bar_height[j] > y_scale)
+@@ -1203,7 +1203,7 @@ void display_histogram()
+ }
+
+ memset(horiz_line, '-', hist_width);
+- horiz_line[hist_width] = (char)NULL;
++ horiz_line[hist_width] = '\0';
+ mvprintw(HISTOGRAM_START + hist_height, 2, "0+%*s",
+ hist_width, horiz_line);
+
diff --git a/sysutils/apachetop/files/patch-src_hits__circle.cc b/sysutils/apachetop/files/patch-src_hits__circle.cc
new file mode 100644
index 000000000000..ac6d48e90ef3
--- /dev/null
+++ b/sysutils/apachetop/files/patch-src_hits__circle.cc
@@ -0,0 +1,11 @@
+--- src/hits_circle.cc.orig 2018-02-04 09:36:17 UTC
++++ src/hits_circle.cc
+@@ -24,7 +24,7 @@ int Hits_Circle::create(unsigned int passed_size)
+ }
+
+ reqcount = bytecount = 0;
+- memset(rc_summary, (char) NULL, sizeof(rc_summary));
++ memset(rc_summary, 0, sizeof(rc_summary));
+
+ return 0;
+ }
diff --git a/sysutils/apachetop/files/patch-src_log.cc b/sysutils/apachetop/files/patch-src_log.cc
new file mode 100644
index 000000000000..37a984b25c7c
--- /dev/null
+++ b/sysutils/apachetop/files/patch-src_log.cc
@@ -0,0 +1,56 @@
+--- src/log.cc.orig 2018-02-04 09:36:17 UTC
++++ src/log.cc
+@@ -37,7 +37,7 @@ int CommonLogParser::parse(char *logline, struct logbi
+ if (!bufcp)
+ return -1;
+
+- *bufcp = (char) NULL;
++ *bufcp = '\0';
+ ++bufcp;
+
+ /* quickly figure out if this is an IP or a host. We do this by
+@@ -172,7 +172,7 @@ int CommonLogParser::parse(char *logline, struct logbi
+ /* find the end of referrer and null it */
+ if (!(bufcp = strchr(bufsp, '"')))
+ return -1;
+- *bufcp = (char) NULL;
++ *bufcp = '\0';
+
+ /* unless they want to keep it, skip over the protocol, ie http:// */
+ if ((cf.preserve_ref_protocol == 0) && (bufcp = strstr(bufsp, "://")))
+@@ -230,7 +230,7 @@ char *LogParser::processURL(char **buf) /* {{{ */
+ return NULL;
+
+ /* null the space in front of it */
+- *endptr = (char) NULL;
++ *endptr = '\0';
+
+ /* TODO maybe we can use the protocol someday.. */
+
+@@ -258,7 +258,7 @@ int LogParser::mungeURL(char **url, int *length) /* {{
+ char *bufcp, *endptr, *workptr;
+
+ endptr = *url + *length;
+- *endptr = (char) NULL;
++ *endptr = '\0';
+
+ /* do we want to keep the query string? */
+ if (!cf.keep_querystring)
+@@ -273,7 +273,7 @@ int LogParser::mungeURL(char **url, int *length) /* {{
+ if (workptr < endptr)
+ {
+ /* we're ok */
+- *workptr = (char) NULL;
++ *workptr = '\0';
+ bufcp = workptr+1;
+ }
+ }
+@@ -308,7 +308,7 @@ int LogParser::mungeURL(char **url, int *length) /* {{
+ if (workptr == endptr)
+ bufcp = workptr;
+ }
+- *bufcp = (char) NULL;
++ *bufcp = '\0';
+ }
+
+