File work-around-g-problem-in-SLE11.patch of Package firebird30

From: Michal Kubecek <mkubecek@suse.cz>
Date: Wed, 29 Jun 2016 08:42:27 +0200
Subject: work around g++ problem in SLE11

SLE11 version of g++ requires full template parameters when referencing
a base class constructor. As Firebird 3 code uses only class name in
several places, patch it to add full base class specification if built
on SLE11 (or anything older than OpenSuSE 11.4).

Another problem is the MAX_TRA_NUMBER constant: old g++ requires it to
be explicitely marked with LL suffix if it exceeds the range of long int.
---
 src/common/StatusHolder.h        |  4 ++--
 src/common/classes/alloc.cpp     |  6 +++---
 src/include/firebird/Interface.h |  4 ++--
 src/jrd/Mapping.cpp              |  4 ++--
 src/jrd/constants.h              |  2 +-
 src/jrd/trace/TraceObjects.h     |  4 ++--
 src/yvalve/YObjects.h            |  2 +-
 src/yvalve/why.cpp               | 18 +++++++++---------
 8 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/src/common/StatusHolder.h b/src/common/StatusHolder.h
index e2d444f5192f..398076640779 100644
--- a/src/common/StatusHolder.h
+++ b/src/common/StatusHolder.h
@@ -141,7 +141,7 @@ class DynamicStatusVector : public DynamicVector<ISC_STATUS_LENGTH>
 {
 public:
 	DynamicStatusVector()
-		: DynamicVector(*getDefaultMemoryPool())
+		: DynamicVector<ISC_STATUS_LENGTH>(*getDefaultMemoryPool())
 	{ }
 
 	ISC_STATUS load(const IStatus* status);
@@ -254,7 +254,7 @@ class StatusHolder : public BaseStatus<StatusHolder>
 {
 public:
 	StatusHolder()
-		: BaseStatus(*getDefaultMemoryPool()), m_raised(false)
+		: BaseStatus<StatusHolder>(*getDefaultMemoryPool()), m_raised(false)
 	{ }
 
 	ISC_STATUS save(IStatus* status);
diff --git a/src/common/classes/alloc.cpp b/src/common/classes/alloc.cpp
index accd5d07487a..264eb66f8157 100644
--- a/src/common/classes/alloc.cpp
+++ b/src/common/classes/alloc.cpp
@@ -405,7 +405,7 @@ public:
 	{
 		MemBlock* rc = new(memory) MemBlock(size);
 
-		MemBaseHunk::newBlock(size);
+		MemBaseHunk<MemSmallHunk>::newBlock(size);
 
 		return rc;
 	}
@@ -441,7 +441,7 @@ private:
 
 public:
 	MemMediumHunk(MemMediumHunk** top, size_t spaceAllocated)
-		: MemBaseHunk(spaceAllocated, hdrSize()),
+		: MemBaseHunk<MemMediumHunk>(spaceAllocated, hdrSize()),
 		  prev(NULL),
 		  useCount(0)
 	{
@@ -468,7 +468,7 @@ public:
 	{
 		MemBlock* rc = new(memory) MemBlock(size, this);
 
-		MemBaseHunk::newBlock(size);
+		MemBaseHunk<MemMediumHunk>::newBlock(size);
 		incrUsage();
 
 		return rc;
diff --git a/src/include/firebird/Interface.h b/src/include/firebird/Interface.h
index 29eb8ba1e862..70e6f4e35fbf 100644
--- a/src/include/firebird/Interface.h
+++ b/src/include/firebird/Interface.h
@@ -240,7 +240,7 @@ namespace Firebird
 	{
 	public:
 		CheckStatusWrapper(IStatus* aStatus)
-			: BaseStatusWrapper(aStatus)
+			: BaseStatusWrapper<CheckStatusWrapper>(aStatus)
 		{
 		}
 
@@ -254,7 +254,7 @@ namespace Firebird
 	{
 	public:
 		ThrowStatusWrapper(IStatus* aStatus)
-			: BaseStatusWrapper(aStatus)
+			: BaseStatusWrapper<ThrowStatusWrapper>(aStatus)
 		{
 		}
 
diff --git a/src/jrd/Mapping.cpp b/src/jrd/Mapping.cpp
index a2008f580e64..21ab7dda607f 100644
--- a/src/jrd/Mapping.cpp
+++ b/src/jrd/Mapping.cpp
@@ -881,11 +881,11 @@ class DbHandle : public AutoPtr<IAttachment, SimpleRelease<IAttachment> >
 {
 public:
 	DbHandle()
-		: AutoPtr()
+		: AutoPtr<IAttachment, SimpleRelease<IAttachment> >()
 	{ }
 
 	DbHandle(IAttachment* att)
-		: AutoPtr(att)
+		: AutoPtr<IAttachment, SimpleRelease<IAttachment> >(att)
 	{
 		if (att)
 			att->addRef();
diff --git a/src/jrd/constants.h b/src/jrd/constants.h
index 2f8c9ebe57c7..830e2dedb902 100644
--- a/src/jrd/constants.h
+++ b/src/jrd/constants.h
@@ -442,7 +442,7 @@ const int DDL_TRIGGER_DROP_MAPPING				= 47;
 #define PASSWORD_SWITCH "PASSWORD"
 
 // The highest transaction number possible
-const TraNumber MAX_TRA_NUMBER = 0x0000FFFFFFFFFFFF;	// ~2.8 * 10^14
+const TraNumber MAX_TRA_NUMBER = 0x0000FFFFFFFFFFFFLL;	// ~2.8 * 10^14
 
 // Number of streams, conjuncts, indices that will be statically allocated
 // in various arrays. Larger numbers will have to be allocated dynamically
diff --git a/src/jrd/trace/TraceObjects.h b/src/jrd/trace/TraceObjects.h
index 5bfce6c3b7c5..bf6f42ba9dc9 100644
--- a/src/jrd/trace/TraceObjects.h
+++ b/src/jrd/trace/TraceObjects.h
@@ -143,7 +143,7 @@ class TraceBLRStatementImpl : public BLRPrinter<TraceBLRStatementImpl>
 {
 public:
 	TraceBLRStatementImpl(const jrd_req* stmt, PerformanceInfo* perf) :
-		BLRPrinter(stmt->getStatement()->blr.begin(), stmt->getStatement()->blr.getCount()),
+		BLRPrinter<TraceBLRStatementImpl>(stmt->getStatement()->blr.begin(), stmt->getStatement()->blr.getCount()),
 		m_stmt(stmt),
 		m_perf(perf)
 	{}
@@ -161,7 +161,7 @@ class TraceFailedBLRStatement : public BLRPrinter<TraceFailedBLRStatement>
 {
 public:
 	TraceFailedBLRStatement(const unsigned char* blr, unsigned length) :
-		BLRPrinter(blr, length)
+		BLRPrinter<TraceFailedBLRStatement>(blr, length)
 	{}
 
 	ISC_INT64 getStmtID()		{ return 0; }
diff --git a/src/yvalve/YObjects.h b/src/yvalve/YObjects.h
index 78b568eef3a3..529d75dc9586 100644
--- a/src/yvalve/YObjects.h
+++ b/src/yvalve/YObjects.h
@@ -253,7 +253,7 @@ public:
 
 private:
 	YTransaction(YTransaction* from)
-		: YHelper(from->next),
+		: YHelper<YTransaction, Firebird::ITransactionImpl<YTransaction, Firebird::CheckStatusWrapper> >(from->next),
 		  attachment(from->attachment),
 		  childBlobs(getPool()),
 		  childCursors(getPool()),
diff --git a/src/yvalve/why.cpp b/src/yvalve/why.cpp
index ecdf018bc34b..e9564e399303 100644
--- a/src/yvalve/why.cpp
+++ b/src/yvalve/why.cpp
@@ -3848,7 +3848,7 @@ YHelper<Impl, Intf>::YHelper(NextInterface* aNext)
 
 
 YEvents::YEvents(YAttachment* aAttachment, IEvents* aNext, IEventCallback* aCallback)
-	: YHelper(aNext)
+	: YHelper<YEvents, Firebird::IEventsImpl<YEvents, Firebird::CheckStatusWrapper> >(aNext)
 {
 	attachment = aAttachment;
 	callback = aCallback;
@@ -3905,7 +3905,7 @@ void YEvents::cancel(CheckStatusWrapper* status)
 
 
 YRequest::YRequest(YAttachment* aAttachment, IRequest* aNext)
-	: YHelper(aNext),
+	: YHelper<YRequest, Firebird::IRequestImpl<YRequest, Firebird::CheckStatusWrapper> >(aNext),
 	  attachment(aAttachment),
 	  userHandle(NULL)
 {
@@ -4045,7 +4045,7 @@ void YRequest::free(CheckStatusWrapper* status)
 
 
 YBlob::YBlob(YAttachment* aAttachment, YTransaction* aTransaction, IBlob* aNext)
-	: YHelper(aNext),
+	: YHelper<YBlob, Firebird::IBlobImpl<YBlob, Firebird::CheckStatusWrapper> >(aNext),
 	  attachment(aAttachment),
 	  transaction(aTransaction)
 {
@@ -4169,7 +4169,7 @@ int YBlob::seek(CheckStatusWrapper* status, int mode, int offset)
 
 
 YStatement::YStatement(YAttachment* aAttachment, IStatement* aNext)
-	: YHelper(aNext),
+	: YHelper<YStatement, Firebird::IStatementImpl<YStatement, Firebird::CheckStatusWrapper> >(aNext),
 	  attachment(aAttachment), cursor(NULL), input(true), output(false)
 {
 	attachment->childStatements.add(this);
@@ -4436,7 +4436,7 @@ void YStatement::free(CheckStatusWrapper* status)
 
 
 YResultSet::YResultSet(YAttachment* anAttachment, YTransaction* aTransaction, IResultSet* aNext)
-	: YHelper(aNext),
+	: YHelper<YResultSet, Firebird::IResultSetImpl<YResultSet, Firebird::CheckStatusWrapper> >(aNext),
 	  attachment(anAttachment),
 	  transaction(aTransaction),
 	  statement(NULL)
@@ -4447,7 +4447,7 @@ YResultSet::YResultSet(YAttachment* anAttachment, YTransaction* aTransaction, IR
 
 YResultSet::YResultSet(YAttachment* anAttachment, YTransaction* aTransaction,
 			YStatement* aStatement, IResultSet* aNext)
-	: YHelper(aNext),
+	: YHelper<YResultSet, Firebird::IResultSetImpl<YResultSet, Firebird::CheckStatusWrapper> >(aNext),
 	  attachment(anAttachment),
 	  transaction(aTransaction),
 	  statement(aStatement)
@@ -4673,7 +4673,7 @@ void YResultSet::close(CheckStatusWrapper* status)
 
 
 YTransaction::YTransaction(YAttachment* aAttachment, ITransaction* aNext)
-	: YHelper(aNext),
+	: YHelper<YTransaction, Firebird::ITransactionImpl<YTransaction, Firebird::CheckStatusWrapper> >(aNext),
 	  attachment(aAttachment),
 	  childBlobs(getPool()),
 	  childCursors(getPool()),
@@ -4936,7 +4936,7 @@ YTransaction* YTransaction::enterDtc(CheckStatusWrapper* status)
 
 
 YAttachment::YAttachment(IProvider* aProvider, IAttachment* aNext, const PathName& aDbPath)
-	: YHelper(aNext),
+	: YHelper<YAttachment, Firebird::IAttachmentImpl<YAttachment, Firebird::CheckStatusWrapper> >(aNext),
 	  provider(aProvider),
 	  dbPath(getPool(), aDbPath),
 	  childBlobs(getPool()),
@@ -5509,7 +5509,7 @@ void YAttachment::getNextTransaction(CheckStatusWrapper* status, ITransaction* t
 
 
 YService::YService(IProvider* aProvider, IService* aNext, bool utf8)
-	: YHelper(aNext),
+	: YHelper<YService, Firebird::IServiceImpl<YService, Firebird::CheckStatusWrapper> >(aNext),
 	  provider(aProvider),
 	  utf8Connection(utf8)
 {
-- 
2.9.0

openSUSE Build Service is sponsored by