games-puzzle/cuyo: Fix building with GCC-6 (bug #614366)

Package-Manager: Portage-2.3.5, Repoman-2.3.2
Closes: https://github.com/gentoo/gentoo/pull/4385
This commit is contained in:
Peter-Levine
2017-04-07 18:13:13 -04:00
committed by David Seifert
parent b581f31021
commit 3e10135aa9
2 changed files with 48 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2015 Gentoo Foundation
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
@@ -26,7 +26,8 @@ S=${WORKDIR}/${MY_P}
src_prepare() {
epatch \
"${FILESDIR}"/${P}-gcc44.patch \
"${FILESDIR}"/${P}-gentoo.patch
"${FILESDIR}"/${P}-gentoo.patch \
"${FILESDIR}"/${P}-gcc6.patch
eautoreconf
}

View File

@@ -0,0 +1,45 @@
--- a/src/pfaditerator.h
+++ b/src/pfaditerator.h
@@ -21,6 +21,11 @@
#include "stringzeug.h"
+#if __cplusplus >= 201103L
+#define NOEXCEPT noexcept(false)
+#else
+#define NOEXCEPT
+#endif
/** Iteriert durch alle Pfade, an denen sich eine
@@ -43,7 +48,7 @@
class PfadIterator {
public:
PfadIterator(Str dat, bool auch_gz = false, bool setzDefault = false);
- ~PfadIterator();
+ ~PfadIterator() NOEXCEPT;
/** N<>chster Pfad */
PfadIterator & operator++();
--- a/src/pfaditerator.cpp
+++ b/src/pfaditerator.cpp
@@ -48,7 +48,7 @@
-1 und f<>hren dann gleich ein ++ aus. */
++(*this);
}
-PfadIterator::~PfadIterator() {
+PfadIterator::~PfadIterator() NOEXCEPT {
/** Soll der default-Pfad gesetzt werden? */
if (mSetzDefault) {
--- a/src/xpmladen.cpp
+++ b/src/xpmladen.cpp
@@ -314,7 +314,7 @@
try {
/* Datei laden. Dabei werden gDatAnfang und gDatEnde gesetzt. */
- if (!ladeDatei(na)) return false;
+ if (!ladeDatei(na)) return NULL;
gDatBei = gDatAnfang;