public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-admin/apachetop/, app-admin/apachetop/files/
@ 2017-12-29 22:33 David Seifert
  0 siblings, 0 replies; 4+ messages in thread
From: David Seifert @ 2017-12-29 22:33 UTC (permalink / raw
  To: gentoo-commits

commit:     da532d475a2b5bcca6eed2dedcd4758fd535054f
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 29 19:50:09 2017 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Fri Dec 29 22:32:23 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da532d47

app-admin/apachetop: Port to EAPI 6

Package-Manager: Portage-2.3.19, Repoman-2.3.6

 app-admin/apachetop/apachetop-0.12.6-r2.ebuild     |  30 ++--
 .../apachetop/files/apachetop-0.12.6-gcc41.patch   |   4 +-
 .../apachetop/files/apachetop-0.12.6-ncurses.patch | 166 +++++++++++++++++++++
 3 files changed, 187 insertions(+), 13 deletions(-)

diff --git a/app-admin/apachetop/apachetop-0.12.6-r2.ebuild b/app-admin/apachetop/apachetop-0.12.6-r2.ebuild
index bb433b83e58..bff79f6bb3b 100644
--- a/app-admin/apachetop/apachetop-0.12.6-r2.ebuild
+++ b/app-admin/apachetop/apachetop-0.12.6-r2.ebuild
@@ -1,8 +1,9 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
-inherit eutils autotools
+EAPI=6
+
+inherit autotools
 
 DESCRIPTION="A realtime Apache log analyzer"
 HOMEPAGE="http://www.webta.org/projects/apachetop"
@@ -14,22 +15,29 @@ KEYWORDS="amd64 hppa ~mips ppc sparc x86"
 IUSE="fam pcre"
 
 RDEPEND="
+	sys-libs/ncurses:0=
+	sys-libs/readline:0=
 	fam? ( virtual/fam )
-	pcre? ( dev-libs/libpcre )
-"
-DEPEND="${RDEPEND}"
+	pcre? ( dev-libs/libpcre )"
+DEPEND="${RDEPEND}
+	virtual/pkgconfig"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-gcc41.patch
+	"${FILESDIR}"/${P}-configure.patch
+	"${FILESDIR}"/${P}-maxpathlen.patch
+	"${FILESDIR}"/${P}-ac_config_header.patch
+	"${FILESDIR}"/${P}-ncurses.patch
+)
 
 src_prepare() {
-	epatch "${FILESDIR}"/${P}-gcc41.patch
-	epatch "${FILESDIR}"/${P}-configure.patch
-	epatch "${FILESDIR}"/${P}-maxpathlen.patch
-	epatch "${FILESDIR}"/${P}-ac_config_header.patch
+	default
 	eautoreconf
 }
 
 src_configure() {
 	econf \
-		--with-logfile=/var/log/apache2/access_log \
+		--with-logfile="${EPREFIX}"/var/log/apache2/access_log \
 		--without-adns \
 		$(use_with fam) \
 		$(use_with pcre)

diff --git a/app-admin/apachetop/files/apachetop-0.12.6-gcc41.patch b/app-admin/apachetop/files/apachetop-0.12.6-gcc41.patch
index 566c9226a3f..6bfb49d9f9d 100644
--- a/app-admin/apachetop/files/apachetop-0.12.6-gcc41.patch
+++ b/app-admin/apachetop/files/apachetop-0.12.6-gcc41.patch
@@ -1,5 +1,5 @@
---- src/resolver.h
-+++ src/resolver.h
+--- a/src/resolver.h
++++ b/src/resolver.h
 @@ -10,8 +10,8 @@
  class Resolver
  {

diff --git a/app-admin/apachetop/files/apachetop-0.12.6-ncurses.patch b/app-admin/apachetop/files/apachetop-0.12.6-ncurses.patch
new file mode 100644
index 00000000000..f12c989c340
--- /dev/null
+++ b/app-admin/apachetop/files/apachetop-0.12.6-ncurses.patch
@@ -0,0 +1,166 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -4,7 +4,7 @@
+ AC_CONFIG_SRCDIR(src/apachetop.cc)
+ 
+ AC_CONFIG_AUX_DIR(config)
+-#AC_CONFIG_MACRO_DIR(m4) # 2.58
++AC_CONFIG_MACRO_DIR(m4)
+ 
+ AC_CONFIG_HEADER(config.h)
+ AM_INIT_AUTOMAKE(apachetop, 0.12.6) # 2.53 only?
+@@ -29,7 +29,6 @@
+ #AC_PROG_CC
+ #AC_PROG_CPP
+ AC_PROG_CXX
+-AC_LANG_CPLUSPLUS
+ 
+ # Checks for header files.
+ AC_HEADER_STDC
+@@ -120,24 +119,9 @@
+ 
+ AC_SEARCH_LIBS([socket], [socket])
+ AC_SEARCH_LIBS([inet_addr], [nsl])
+-AC_SEARCH_LIBS([attron], [ncurses])
+-AC_SEARCH_LIBS([tgetstr], [termcap])
+-AC_SEARCH_LIBS([mvprintw], [curses ncurses] ,
+-	[] ,
+-	[
+-		AC_MSG_ERROR([No useful curses library found!])
+-	]
+-)
+ 
+-AC_SEARCH_LIBS([readline], [readline],
+-	[
+-		AC_DEFINE(HAVE_READLINE,1,[Define if you have readline library])
+-		AC_SUBST(HAVE_READLINE)
+-	] ,
+-	[
+-		AC_MSG_ERROR(readline library not found)
+-	]
+-)
++PKG_CHECK_MODULES([NCURSES], [ncurses])
++AX_LIB_READLINE
+ 
+ 
+ # everything is in CPPFLAGS up to this point, now we move to CXXFLAGS
+--- a/m4/ax_lib_readline.m4
++++ b/m4/ax_lib_readline.m4
+@@ -0,0 +1,107 @@
++# ===========================================================================
++#     https://www.gnu.org/software/autoconf-archive/ax_lib_readline.html
++# ===========================================================================
++#
++# SYNOPSIS
++#
++#   AX_LIB_READLINE
++#
++# DESCRIPTION
++#
++#   Searches for a readline compatible library. If found, defines
++#   `HAVE_LIBREADLINE'. If the found library has the `add_history' function,
++#   sets also `HAVE_READLINE_HISTORY'. Also checks for the locations of the
++#   necessary include files and sets `HAVE_READLINE_H' or
++#   `HAVE_READLINE_READLINE_H' and `HAVE_READLINE_HISTORY_H' or
++#   'HAVE_HISTORY_H' if the corresponding include files exists.
++#
++#   The libraries that may be readline compatible are `libedit',
++#   `libeditline' and `libreadline'. Sometimes we need to link a termcap
++#   library for readline to work, this macro tests these cases too by trying
++#   to link with `libtermcap', `libcurses' or `libncurses' before giving up.
++#
++#   Here is an example of how to use the information provided by this macro
++#   to perform the necessary includes or declarations in a C file:
++#
++#     #ifdef HAVE_LIBREADLINE
++#     #  if defined(HAVE_READLINE_READLINE_H)
++#     #    include <readline/readline.h>
++#     #  elif defined(HAVE_READLINE_H)
++#     #    include <readline.h>
++#     #  else /* !defined(HAVE_READLINE_H) */
++#     extern char *readline ();
++#     #  endif /* !defined(HAVE_READLINE_H) */
++#     char *cmdline = NULL;
++#     #else /* !defined(HAVE_READLINE_READLINE_H) */
++#       /* no readline */
++#     #endif /* HAVE_LIBREADLINE */
++#
++#     #ifdef HAVE_READLINE_HISTORY
++#     #  if defined(HAVE_READLINE_HISTORY_H)
++#     #    include <readline/history.h>
++#     #  elif defined(HAVE_HISTORY_H)
++#     #    include <history.h>
++#     #  else /* !defined(HAVE_HISTORY_H) */
++#     extern void add_history ();
++#     extern int write_history ();
++#     extern int read_history ();
++#     #  endif /* defined(HAVE_READLINE_HISTORY_H) */
++#       /* no history */
++#     #endif /* HAVE_READLINE_HISTORY */
++#
++# LICENSE
++#
++#   Copyright (c) 2008 Ville Laurikari <vl@iki.fi>
++#
++#   Copying and distribution of this file, with or without modification, are
++#   permitted in any medium without royalty provided the copyright notice
++#   and this notice are preserved. This file is offered as-is, without any
++#   warranty.
++
++#serial 7
++
++AU_ALIAS([VL_LIB_READLINE], [AX_LIB_READLINE])
++AC_DEFUN([AX_LIB_READLINE], [
++  AC_CACHE_CHECK([for a readline compatible library],
++                 ax_cv_lib_readline, [
++    ORIG_LIBS="$LIBS"
++    for readline_lib in readline edit editline; do
++      for termcap_lib in "" termcap curses ncurses; do
++        if test -z "$termcap_lib"; then
++          TRY_LIB="-l$readline_lib"
++        else
++          TRY_LIB="-l$readline_lib -l$termcap_lib"
++        fi
++        LIBS="$ORIG_LIBS $TRY_LIB"
++        AC_TRY_LINK_FUNC(readline, ax_cv_lib_readline="$TRY_LIB")
++        if test -n "$ax_cv_lib_readline"; then
++          break
++        fi
++      done
++      if test -n "$ax_cv_lib_readline"; then
++        break
++      fi
++    done
++    if test -z "$ax_cv_lib_readline"; then
++      ax_cv_lib_readline="no"
++    fi
++    LIBS="$ORIG_LIBS"
++  ])
++
++  if test "$ax_cv_lib_readline" != "no"; then
++    LIBS="$LIBS $ax_cv_lib_readline"
++    AC_DEFINE(HAVE_LIBREADLINE, 1,
++              [Define if you have a readline compatible library])
++    AC_CHECK_HEADERS(readline.h readline/readline.h)
++    AC_CACHE_CHECK([whether readline supports history],
++                   ax_cv_lib_readline_history, [
++      ax_cv_lib_readline_history="no"
++      AC_TRY_LINK_FUNC(add_history, ax_cv_lib_readline_history="yes")
++    ])
++    if test "$ax_cv_lib_readline_history" = "yes"; then
++      AC_DEFINE(HAVE_READLINE_HISTORY, 1,
++                [Define if your readline library has \`add_history'])
++      AC_CHECK_HEADERS(history.h readline/history.h)
++    fi
++  fi
++])dnl
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -6,6 +6,7 @@
+                     display.cc hits_circle.cc timed_circle.cc filters.cc \
+ 		    resolver.cc
+ 
++apachetop_LDADD = $(NCURSES_LIBS)
+ 
+ noinst_HEADERS = apachetop.h log.h ohtbl.h map.h queue.h \
+                  display.h hits_circle.h circle.h timed_circle.h filters.h \


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/apachetop/, app-admin/apachetop/files/
@ 2020-01-14  2:43 Jeroen Roovers
  0 siblings, 0 replies; 4+ messages in thread
From: Jeroen Roovers @ 2020-01-14  2:43 UTC (permalink / raw
  To: gentoo-commits

commit:     73e2822bb656b80e296a1a2c18259a2988939f48
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 14 02:20:53 2020 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Tue Jan 14 02:43:17 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73e2822b

app-admin/apachetop: Fix building against sys-libs/ncurses[tinfo]

Package-Manager: Portage-2.3.84, Repoman-2.3.20
Closes: https://bugs.gentoo.org/690082
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 app-admin/apachetop/apachetop-0.18.4.ebuild            |  8 +++++---
 app-admin/apachetop/files/apachetop-0.18.4-tinfo.patch | 11 +++++++++++
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/app-admin/apachetop/apachetop-0.18.4.ebuild b/app-admin/apachetop/apachetop-0.18.4.ebuild
index 2f5954eb82b..c0a18315d1d 100644
--- a/app-admin/apachetop/apachetop-0.18.4.ebuild
+++ b/app-admin/apachetop/apachetop-0.18.4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -19,8 +19,10 @@ RDEPEND="
 	sys-libs/readline:0=
 	fam? ( virtual/fam )
 	pcre? ( dev-libs/libpcre )"
-DEPEND="${RDEPEND}
-	virtual/pkgconfig"
+DEPEND="${RDEPEND}"
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.18.4-tinfo.patch
+)
 
 src_prepare() {
 	default

diff --git a/app-admin/apachetop/files/apachetop-0.18.4-tinfo.patch b/app-admin/apachetop/files/apachetop-0.18.4-tinfo.patch
new file mode 100644
index 00000000000..d975a430914
--- /dev/null
+++ b/app-admin/apachetop/files/apachetop-0.18.4-tinfo.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -133,7 +133,7 @@
+ AC_SEARCH_LIBS([socket], [socket])
+ AC_SEARCH_LIBS([inet_addr], [nsl])
+ AC_SEARCH_LIBS([attron], [ncurses])
+-AC_SEARCH_LIBS([tgetstr], [termcap])
++AC_SEARCH_LIBS([tgetstr], [tinfo termcap])
+ AC_SEARCH_LIBS([mvprintw], [curses ncurses] ,
+     [] ,
+     [


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/apachetop/, app-admin/apachetop/files/
@ 2023-02-14  3:36 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2023-02-14  3:36 UTC (permalink / raw
  To: gentoo-commits

commit:     88aa8a74eeab88275740e1242bec50106b06ae79
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 14 03:36:39 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 14 03:36:39 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88aa8a74

app-admin/apachetop: fix build w/ clang 16

Closes: https://bugs.gentoo.org/894186
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-admin/apachetop/apachetop-0.19.7.ebuild        |  6 +-
 .../apachetop/files/apachetop-0.19.7-c++17.patch   | 90 ++++++++++++++++++++++
 2 files changed, 95 insertions(+), 1 deletion(-)

diff --git a/app-admin/apachetop/apachetop-0.19.7.ebuild b/app-admin/apachetop/apachetop-0.19.7.ebuild
index 816b03798ef0..aaf86e4822f9 100644
--- a/app-admin/apachetop/apachetop-0.19.7.ebuild
+++ b/app-admin/apachetop/apachetop-0.19.7.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -20,6 +20,10 @@ RDEPEND="
 DEPEND="${RDEPEND}"
 BDEPEND="virtual/pkgconfig"
 
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.19.7-c++17.patch
+)
+
 src_configure() {
 	econf \
 		--with-logfile="${EPREFIX}"/var/log/apache2/access_log \

diff --git a/app-admin/apachetop/files/apachetop-0.19.7-c++17.patch b/app-admin/apachetop/files/apachetop-0.19.7-c++17.patch
new file mode 100644
index 000000000000..8ec6508b9e08
--- /dev/null
+++ b/app-admin/apachetop/files/apachetop-0.19.7-c++17.patch
@@ -0,0 +1,90 @@
+https://github.com/tessus/apachetop/pull/13
+
+From f89ae55bb09eb1a67fc73555d149fb85f82bfbd6 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 14 Feb 2023 03:34:36 +0000
+Subject: [PATCH] Fix C++17 compatibility (drop register keyword)
+
+register doesn't do anything in any reasonable C++ compiler anyway, but
+it was deprecated in C++14 and removed in C++17. Without this, apachetop
+will fail to compile with Clang 16 which defaults to -std=c++17.
+
+Bug: https://bugs.gentoo.org/894186
+--- a/src/inlines.cc
++++ b/src/inlines.cc
+@@ -4,10 +4,10 @@
+ #define ONE_EIGHTH      4
+ #define HIGH_BITS       (~((unsigned int)(~0) >> ONE_EIGHTH))
+ 
+-inline unsigned int StringHash(register const char *str)
++inline unsigned int StringHash(const char *str)
+ {
+-	register unsigned int val;
+-	register unsigned int i;
++	unsigned int val;
++	unsigned int i;
+ 
+ 	for (val = 0; *str; str++)
+ 	{
+@@ -19,9 +19,9 @@ inline unsigned int StringHash(register const char *str)
+ 	return val;
+ }
+ 
+-inline unsigned int QuickHash(register const char *str)
++inline unsigned int QuickHash(const char *str)
+ {
+-	register unsigned int val, tmp;
++	unsigned int val, tmp;
+ 
+ 	for(val = 0 ; *str ; str++)
+ 	{
+@@ -32,7 +32,7 @@ inline unsigned int QuickHash(register const char *str)
+ 	return val;
+ }
+ 
+-inline unsigned long TTHash(register const char *str)
++inline unsigned long TTHash(const char *str)
+ {
+ 	unsigned long hash = 5381;
+ 	int c;
+--- a/src/ohtbl.cc
++++ b/src/ohtbl.cc
+@@ -13,7 +13,7 @@ static int primes[] = {101, 241, 499, 1009, 2003, 3001, 4001, 5003,
+ 
+ int OAHash::getNextPrime(int size)
+ {
+-	register int *prime;
++	int *prime;
+ 	for (prime = &primes[0] ; *prime ; prime++)
+ 		if (*prime > size)
+ 			return *prime;
+@@ -51,7 +51,7 @@ void OAHash::destroy(void)
+ 
+ void *OAHash::insert(char *key, void *data)
+ {
+-	register unsigned int p, i;
++	unsigned int p, i;
+ 	void *d;
+  
+ 	// Do not exceed the number of positions in the table.
+@@ -81,7 +81,7 @@ void *OAHash::insert(char *key, void *data)
+ 
+ int OAHash::remove(char *key)
+ {
+-	register unsigned int p, i;
++	unsigned int p, i;
+ 
+ 	for (i = 0; i < positions; ++i)
+ 	{
+@@ -108,7 +108,7 @@ int OAHash::remove(char *key)
+ 
+ void *OAHash::lookup(char *key)
+ {
+-	register unsigned int p, i;
++	unsigned int p, i;
+ 
+ 	for (i = 0; i < positions; ++i)
+ 	{
+-- 
+2.39.1
+


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-admin/apachetop/, app-admin/apachetop/files/
@ 2024-08-30 11:21 Petr Vaněk
  0 siblings, 0 replies; 4+ messages in thread
From: Petr Vaněk @ 2024-08-30 11:21 UTC (permalink / raw
  To: gentoo-commits

commit:     e6a3b040a26edd89a8b263ff278ffd6cd81c1679
Author:     Petr Vaněk <arkamar <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 30 11:12:41 2024 +0000
Commit:     Petr Vaněk <arkamar <AT> gentoo <DOT> org>
CommitDate: Fri Aug 30 11:20:34 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e6a3b040

app-admin/apachetop: drop 0.19.7

Signed-off-by: Petr Vaněk <arkamar <AT> gentoo.org>

 app-admin/apachetop/Manifest                       |  1 -
 app-admin/apachetop/apachetop-0.19.7.ebuild        | 33 --------
 .../apachetop/files/apachetop-0.19.7-c++17.patch   | 90 ----------------------
 3 files changed, 124 deletions(-)

diff --git a/app-admin/apachetop/Manifest b/app-admin/apachetop/Manifest
index 60760ae14846..5cb1caa369b2 100644
--- a/app-admin/apachetop/Manifest
+++ b/app-admin/apachetop/Manifest
@@ -1,2 +1 @@
-DIST apachetop-0.19.7.tar.gz 132665 BLAKE2B 248247c361d1585de68a0a9adae22f98db72991babfb4a75f01fa67ef28443a3c04cf1da9c1ea34ed923599955b58959528cc9e0a881fbb7b463b1d64c0cb7bd SHA512 40d546facee23a9914483c06323940e219602518751d80f729d835c4dbf991c7d1dd9bcebcaa4ca6a2d64799d48c8a00d421bc324afc2959691c962113386969
 DIST apachetop-0.23.2.tar.gz 169381 BLAKE2B fd524e8b313c8536bf016ab481f93d73ff32f256634b9fcc28c035207fda6821298087c240227508c1ab6fb7f80a0879945cc931125204bf81c3897b3d33408e SHA512 c278b6fc286eacb69746547e562c40eec50e7ff55df22a32e9387af057c25801e331c6c4b286726aa1bcee6ebcd3578747aca25be3dfec1745b876e95696d7fc

diff --git a/app-admin/apachetop/apachetop-0.19.7.ebuild b/app-admin/apachetop/apachetop-0.19.7.ebuild
deleted file mode 100644
index aaf86e4822f9..000000000000
--- a/app-admin/apachetop/apachetop-0.19.7.ebuild
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DESCRIPTION="A realtime Apache log analyzer"
-HOMEPAGE="https://github.com/tessus/apachetop"
-SRC_URI="https://github.com/tessus/${PN}/releases/download/${PV}/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ~hppa ~mips ppc sparc x86"
-IUSE="fam pcre"
-
-RDEPEND="
-	sys-libs/ncurses:0=
-	sys-libs/readline:0=
-	fam? ( virtual/fam )
-	pcre? ( dev-libs/libpcre )"
-DEPEND="${RDEPEND}"
-BDEPEND="virtual/pkgconfig"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-0.19.7-c++17.patch
-)
-
-src_configure() {
-	econf \
-		--with-logfile="${EPREFIX}"/var/log/apache2/access_log \
-		--without-adns \
-		$(use_with fam) \
-		$(use_with pcre)
-}

diff --git a/app-admin/apachetop/files/apachetop-0.19.7-c++17.patch b/app-admin/apachetop/files/apachetop-0.19.7-c++17.patch
deleted file mode 100644
index 8ec6508b9e08..000000000000
--- a/app-admin/apachetop/files/apachetop-0.19.7-c++17.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-https://github.com/tessus/apachetop/pull/13
-
-From f89ae55bb09eb1a67fc73555d149fb85f82bfbd6 Mon Sep 17 00:00:00 2001
-From: Sam James <sam@gentoo.org>
-Date: Tue, 14 Feb 2023 03:34:36 +0000
-Subject: [PATCH] Fix C++17 compatibility (drop register keyword)
-
-register doesn't do anything in any reasonable C++ compiler anyway, but
-it was deprecated in C++14 and removed in C++17. Without this, apachetop
-will fail to compile with Clang 16 which defaults to -std=c++17.
-
-Bug: https://bugs.gentoo.org/894186
---- a/src/inlines.cc
-+++ b/src/inlines.cc
-@@ -4,10 +4,10 @@
- #define ONE_EIGHTH      4
- #define HIGH_BITS       (~((unsigned int)(~0) >> ONE_EIGHTH))
- 
--inline unsigned int StringHash(register const char *str)
-+inline unsigned int StringHash(const char *str)
- {
--	register unsigned int val;
--	register unsigned int i;
-+	unsigned int val;
-+	unsigned int i;
- 
- 	for (val = 0; *str; str++)
- 	{
-@@ -19,9 +19,9 @@ inline unsigned int StringHash(register const char *str)
- 	return val;
- }
- 
--inline unsigned int QuickHash(register const char *str)
-+inline unsigned int QuickHash(const char *str)
- {
--	register unsigned int val, tmp;
-+	unsigned int val, tmp;
- 
- 	for(val = 0 ; *str ; str++)
- 	{
-@@ -32,7 +32,7 @@ inline unsigned int QuickHash(register const char *str)
- 	return val;
- }
- 
--inline unsigned long TTHash(register const char *str)
-+inline unsigned long TTHash(const char *str)
- {
- 	unsigned long hash = 5381;
- 	int c;
---- a/src/ohtbl.cc
-+++ b/src/ohtbl.cc
-@@ -13,7 +13,7 @@ static int primes[] = {101, 241, 499, 1009, 2003, 3001, 4001, 5003,
- 
- int OAHash::getNextPrime(int size)
- {
--	register int *prime;
-+	int *prime;
- 	for (prime = &primes[0] ; *prime ; prime++)
- 		if (*prime > size)
- 			return *prime;
-@@ -51,7 +51,7 @@ void OAHash::destroy(void)
- 
- void *OAHash::insert(char *key, void *data)
- {
--	register unsigned int p, i;
-+	unsigned int p, i;
- 	void *d;
-  
- 	// Do not exceed the number of positions in the table.
-@@ -81,7 +81,7 @@ void *OAHash::insert(char *key, void *data)
- 
- int OAHash::remove(char *key)
- {
--	register unsigned int p, i;
-+	unsigned int p, i;
- 
- 	for (i = 0; i < positions; ++i)
- 	{
-@@ -108,7 +108,7 @@ int OAHash::remove(char *key)
- 
- void *OAHash::lookup(char *key)
- {
--	register unsigned int p, i;
-+	unsigned int p, i;
- 
- 	for (i = 0; i < positions; ++i)
- 	{
--- 
-2.39.1
-


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-08-30 11:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-29 22:33 [gentoo-commits] repo/gentoo:master commit in: app-admin/apachetop/, app-admin/apachetop/files/ David Seifert
  -- strict thread matches above, loose matches on Subject: below --
2020-01-14  2:43 Jeroen Roovers
2023-02-14  3:36 Sam James
2024-08-30 11:21 Petr Vaněk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox