View | Details | Raw Unified | Return to bug 227865 | Differences between
and this patch

Collapse All | Expand All

(-)sysutils/apachetop/Makefile (-16 / +12 lines)
Lines 2-39 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	apachetop
4
PORTNAME=	apachetop
5
PORTVERSION=	0.12.6
5
PORTVERSION=	0.18.4
6
PORTREVISION=	5
7
CATEGORIES=	sysutils
6
CATEGORIES=	sysutils
8
MASTER_SITES=	https://www.freebsd.systems/files/
9
7
10
MAINTAINER=	lukasz@wasikowski.net
8
MAINTAINER=	lukasz@wasikowski.net
11
COMMENT=	Apache realtime log stats
9
COMMENT=	Apache realtime log stats
12
10
13
LICENSE=	BSD3CLAUSE
11
LICENSE=	BSD3CLAUSE
12
LICENSE_FILE=	${WRKSRC}/LICENSE
14
13
15
GNU_CONFIGURE=	yes
14
HAS_CONFIGURE=		yes
16
USES=		ncurses readline
15
CONFIGURE_ARGS=	--mandir=${PREFIX}/man
17
16
17
USES=		autoreconf ncurses readline
18
USE_GITHUB=	yes
19
GH_ACCOUNT=	tessus
20
18
PLIST_FILES=	bin/${PORTNAME} man/man1/${PORTNAME}.1.gz
21
PLIST_FILES=	bin/${PORTNAME} man/man1/${PORTNAME}.1.gz
19
22
20
OPTIONS_DEFINE=	ADNS FAM PCRE
23
OPTIONS_DEFINE=	ADNS FAM PCRE
24
21
ADNS_DESC=	Asynchronous-capable DNS support
25
ADNS_DESC=	Asynchronous-capable DNS support
22
23
ADNS_LIB_DEPENDS=	libadns.so:dns/adns
26
ADNS_LIB_DEPENDS=	libadns.so:dns/adns
24
ADNS_CONFIGURE_ON=	--with-adns=${LOCALBASE}
27
ADNS_CONFIGURE_WITH=	adns=${LOCALBASE}
25
28
26
FAM_LIB_DEPENDS=	libfam.so:devel/fam
29
FAM_LIB_DEPENDS=	libfam.so:devel/fam
27
FAM_CONFIGURE_ON=	--with-fam=${LOCALBASE}
30
FAM_CONFIGURE_WITH=	fam=${LOCALBASE}
28
31
29
PCRE_LIB_DEPENDS=	libpcre.so:devel/pcre
32
PCRE_LIB_DEPENDS=	libpcre.so:devel/pcre
30
PCRE_COFNIGURE_ON=	--with-pcre=${LOCALBASE}
33
PCRE_CONFIGURE_WITH=	pcre=${LOCALBASE}
31
34
32
post-patch:
33
	@${REINPLACE_CMD} -E -e 's,struct (circle_struct),\1,g' \
34
		${WRKSRC}/src/hits_circle.*
35
	@${REINPLACE_CMD} -E -e 's,enum (adns_queryflags),\1,g' \
36
		${WRKSRC}/src/log.*
37
	@cd ${WRKSRC} && ${TOUCH} -r configure.ac aclocal.m4 stamp-h.in
38
39
.include <bsd.port.mk>
35
.include <bsd.port.mk>
(-)sysutils/apachetop/distinfo (-2 / +3 lines)
Lines 1-2 Link Here
1
SHA256 (apachetop-0.12.6.tar.gz) = 850062414517055eab2440b788b503d45ebe9b290d4b2e027a5f887ad70f3f29
1
TIMESTAMP = 1535255129
2
SIZE (apachetop-0.12.6.tar.gz) = 126930
2
SHA256 (tessus-apachetop-0.18.4_GH0.tar.gz) = 1cbbfd1bf12275fb21e0cb6068b9050b2fee8c276887054a015bf103a1ae9cc6
3
SIZE (tessus-apachetop-0.18.4_GH0.tar.gz) = 43047
(-)sysutils/apachetop/files/patch-apachetop.h (-11 lines)
Lines 1-11 Link Here
1
--- src/apachetop.h.orig	Tue Dec 30 01:03:05 2003
2
+++ src/apachetop.h	Tue Dec 30 01:03:32 2003
3
@@ -190,7 +190,7 @@
4
 #define DEBUG_OUTPUT "/tmp/atop.debug"
5
 
6
 #ifndef DEFAULT_LOGFILE
7
-# define DEFAULT_LOGFILE "/var/httpd/apache_log"
8
+# define DEFAULT_LOGFILE "/var/log/httpd-access.log"
9
 #endif
10
 #define DEFAULT_CIRCLE_SIZE 30
11
 #define DEFAULT_CIRCLE_MODE TIMED_CIRCLE
(-)sysutils/apachetop/files/patch-resolver.h (-13 lines)
Lines 1-13 Link Here
1
--- src/resolver.h.orig	2005-10-15 18:10:01.000000000 +0200
2
+++ src/resolver.h	2008-11-20 16:14:31.000000000 +0100
3
@@ -10,8 +10,8 @@
4
 class Resolver
5
 {
6
 	public:
7
-	Resolver::Resolver(void);
8
-	Resolver::~Resolver(void);
9
+	Resolver(void);
10
+	~Resolver(void);
11
 	int add_request(char *request, enum resolver_action act);
12
 
13
 
(-)sysutils/apachetop/files/patch-src_apachetop.cc (-20 lines)
Lines 1-20 Link Here
1
--- src/apachetop.cc.orig	2005-10-15 16:23:31 UTC
2
+++ src/apachetop.cc
3
@@ -271,7 +271,7 @@ int main(int argc, char *argv[])
4
 	hm->create(cf.circle_size);
5
 	/* }}} */
6
 
7
-	memset(&gstats, (char) NULL, sizeof(gstats));
8
+	memset(&gstats, 0, sizeof(gstats));
9
 	gstats.start = time(NULL);
10
 
11
 	signal(SIGINT, &catchsig);
12
@@ -465,7 +465,7 @@ int main(int argc, char *argv[])
13
 					continue;
14
 				}
15
 
16
-				*nextline = (char) NULL;
17
+				*nextline = '\0';
18
 				++nextline;
19
 
20
 				/* which parser? */
(-)sysutils/apachetop/files/patch-src_display.cc (-20 lines)
Lines 1-20 Link Here
1
--- src/display.cc.orig	2005-10-15 16:10:01 UTC
2
+++ src/display.cc
3
@@ -1191,7 +1191,7 @@ void display_histogram()
4
 
5
 		/* compose a row of hashes */
6
 		memset(line, ' ', hist_width);
7
-		line[hist_width] = (char)NULL;
8
+		line[hist_width] = '\0';
9
 		for(j = 0 ; j < hist_width ; ++j)
10
 		{
11
 			if (bar_height[j] > y_scale)
12
@@ -1203,7 +1203,7 @@ void display_histogram()
13
 	}
14
 
15
 	memset(horiz_line, '-', hist_width);
16
-	horiz_line[hist_width] = (char)NULL;
17
+	horiz_line[hist_width] = '\0';
18
 	mvprintw(HISTOGRAM_START + hist_height, 2, "0+%*s",
19
 	    hist_width, horiz_line);
20
 	
(-)sysutils/apachetop/files/patch-src_hits__circle.cc (-11 lines)
Lines 1-11 Link Here
1
--- src/hits_circle.cc.orig	2018-02-04 09:36:17 UTC
2
+++ src/hits_circle.cc
3
@@ -24,7 +24,7 @@ int Hits_Circle::create(unsigned int passed_size)
4
 	}
5
 
6
 	reqcount = bytecount = 0;
7
-	memset(rc_summary, (char) NULL, sizeof(rc_summary));
8
+	memset(rc_summary, 0, sizeof(rc_summary));
9
 
10
 	return 0;
11
 }
(-)sysutils/apachetop/files/patch-src_inlines.cc (+37 lines)
Line 0 Link Here
1
--- src/inlines.cc.orig	2018-08-28 11:21:23 UTC
2
+++ src/inlines.cc
3
@@ -4,10 +4,10 @@
4
 #define ONE_EIGHTH      4
5
 #define HIGH_BITS       (~((unsigned int)(~0) >> ONE_EIGHTH))
6
 
7
-inline unsigned int StringHash(register const char *str)
8
+inline unsigned int StringHash( const char *str)
9
 {
10
-	register unsigned int val;
11
-	register unsigned int i;
12
+	 unsigned int val;
13
+	 unsigned int i;
14
 
15
 	for (val = 0; *str; str++)
16
 	{
17
@@ -19,9 +19,9 @@ inline unsigned int StringHash(register const char *st
18
 	return val;
19
 }
20
 
21
-inline unsigned int QuickHash(register const char *str)
22
+inline unsigned int QuickHash( const char *str)
23
 {
24
-	register unsigned int val, tmp;
25
+	 unsigned int val, tmp;
26
 
27
 	for(val = 0 ; *str ; str++)
28
 	{
29
@@ -32,7 +32,7 @@ inline unsigned int QuickHash(register const char *str
30
 	return val;
31
 }
32
 
33
-inline unsigned long TTHash(register const char *str)
34
+inline unsigned long TTHash( const char *str)
35
 {
36
 	unsigned long hash = 5381;
37
 	int c;
(-)sysutils/apachetop/files/patch-src_log.cc (-54 / +9 lines)
Lines 1-56 Link Here
1
--- src/log.cc.orig	2018-02-04 09:36:17 UTC
1
--- src/log.cc.orig	2018-08-28 11:26:42 UTC
2
+++ src/log.cc
2
+++ src/log.cc
3
@@ -37,7 +37,7 @@ int CommonLogParser::parse(char *logline, struct logbi
3
@@ -72,7 +72,7 @@ int CommonLogParser::parse(char *logline, struct logbi
4
 	if (!bufcp)
4
 			/* fire off a query with adns */
5
 		return -1;
5
 			b->dns_query = new adns_query;
6
 	
6
 			adns_submit(adns, ptr, adns_r_a,
7
-	*bufcp = (char) NULL;
7
-			    (adns_queryflags) NULL, NULL, b->dns_query);
8
+	*bufcp = '\0';
8
+			    (adns_queryflags) 0, 0, b->dns_query);
9
 	++bufcp;
10
 
9
 
11
 	/* quickly figure out if this is an IP or a host. We do this by
10
 			b->ip_pos = im->insert(RESOLVING_STRING);
12
@@ -172,7 +172,7 @@ int CommonLogParser::parse(char *logline, struct logbi
11
 			b->ip_hash = TTHash(RESOLVING_STRING);
13
 	/* find the end of referrer and null it */
14
 	if (!(bufcp = strchr(bufsp, '"')))
15
 		return -1;
16
-	*bufcp = (char) NULL;
17
+	*bufcp = '\0';
18
 
19
 	/* unless they want to keep it, skip over the protocol, ie http:// */
20
 	if ((cf.preserve_ref_protocol == 0) && (bufcp = strstr(bufsp, "://")))
21
@@ -230,7 +230,7 @@ char *LogParser::processURL(char **buf) /* {{{ */
22
 		return NULL;
23
 
24
 	/* null the space in front of it */
25
-	*endptr = (char) NULL;
26
+	*endptr = '\0';
27
 
28
 	/* TODO maybe we can use the protocol someday.. */
29
 
30
@@ -258,7 +258,7 @@ int LogParser::mungeURL(char **url, int *length) /* {{
31
 	char *bufcp, *endptr, *workptr;
32
 
33
 	endptr = *url + *length;
34
-	*endptr = (char) NULL;
35
+	*endptr = '\0';
36
 
37
 	/* do we want to keep the query string? */
38
 	if (!cf.keep_querystring)
39
@@ -273,7 +273,7 @@ int LogParser::mungeURL(char **url, int *length) /* {{
40
 			if (workptr < endptr)
41
 			{
42
 				/* we're ok */
43
-				*workptr = (char) NULL;
44
+				*workptr = '\0';
45
 				bufcp = workptr+1;
46
 			}
47
 		}
48
@@ -308,7 +308,7 @@ int LogParser::mungeURL(char **url, int *length) /* {{
49
 			if (workptr == endptr)
50
 				bufcp = workptr;
51
 		}
52
-		*bufcp = (char) NULL;
53
+		*bufcp = '\0';
54
 	}
55
 
56
 
(-)sysutils/apachetop/files/patch-src_ohtbl.cc (+38 lines)
Line 0 Link Here
1
--- src/ohtbl.cc.orig	2018-08-28 11:24:15 UTC
2
+++ src/ohtbl.cc
3
@@ -13,7 +13,7 @@ static int primes[] = {101, 241, 499, 1009, 2003, 3001
4
 
5
 int OAHash::getNextPrime(int size)
6
 {
7
-	register int *prime;
8
+	 int *prime;
9
 	for (prime = &primes[0] ; *prime ; prime++)
10
 		if (*prime > size)
11
 			return *prime;
12
@@ -51,7 +51,7 @@ void OAHash::destroy(void)
13
 
14
 void *OAHash::insert(char *key, void *data)
15
 {
16
-	register unsigned int p, i;
17
+	 unsigned int p, i;
18
 	void *d;
19
  
20
 	// Do not exceed the number of positions in the table.
21
@@ -81,7 +81,7 @@ void *OAHash::insert(char *key, void *data)
22
 
23
 int OAHash::remove(char *key)
24
 {
25
-	register unsigned int p, i;
26
+	 unsigned int p, i;
27
 
28
 	for (i = 0; i < positions; ++i)
29
 	{
30
@@ -108,7 +108,7 @@ int OAHash::remove(char *key)
31
 
32
 void *OAHash::lookup(char *key)
33
 {
34
-	register unsigned int p, i;
35
+	 unsigned int p, i;
36
 
37
 	for (i = 0; i < positions; ++i)
38
 	{
(-)sysutils/apachetop/pkg-descr (-1 / +1 lines)
Lines 1-4 Link Here
1
ApacheTop watches a logfile generated by Apache (in standard common or
1
ApacheTop watches a logfile generated by Apache (in standard common or
2
combined log format) and generates human-parsable output in realtime.
2
combined log format) and generates human-parsable output in realtime.
3
3
4
WWW: http://www.webta.org/projects/apachetop/
4
WWW: https://github.com/tessus/apachetop 

Return to bug 227865