diff options
author | Karol Wojtaszek <sekretarz@gentoo.org> | 2004-09-13 11:23:35 +0000 |
---|---|---|
committer | Karol Wojtaszek <sekretarz@gentoo.org> | 2004-09-13 11:23:35 +0000 |
commit | 435f51c5ae67a3dee6d13ec786d9c7dc2d72ee36 (patch) | |
tree | 20103215f9cb3d2b62a27f6293d5223ec841c8fa /dev-db/firebird | |
parent | x86 stable - removed memory leaking and excess versions (Manifest recommit) (diff) | |
download | gentoo-2-435f51c5ae67a3dee6d13ec786d9c7dc2d72ee36.tar.gz gentoo-2-435f51c5ae67a3dee6d13ec786d9c7dc2d72ee36.tar.bz2 gentoo-2-435f51c5ae67a3dee6d13ec786d9c7dc2d72ee36.zip |
Fixed gcc-34 compilation issues. Bug #59154
Diffstat (limited to 'dev-db/firebird')
-rw-r--r-- | dev-db/firebird/ChangeLog | 7 | ||||
-rw-r--r-- | dev-db/firebird/files/firebird-1.5.1-gcc34.patch | 139 | ||||
-rw-r--r-- | dev-db/firebird/firebird-1.5.1.ebuild | 9 |
3 files changed, 153 insertions, 2 deletions
diff --git a/dev-db/firebird/ChangeLog b/dev-db/firebird/ChangeLog index bfcf4ae2ebef..161cf771ec28 100644 --- a/dev-db/firebird/ChangeLog +++ b/dev-db/firebird/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-db/firebird # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/firebird/ChangeLog,v 1.22 2004/09/08 15:12:46 gustavoz Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/firebird/ChangeLog,v 1.23 2004/09/13 11:23:35 sekretarz Exp $ + + 13 Sep 2004; Karol Wojtaszek <sekretarz@gentoo.org> + +files/firebird-1.5.1-gcc34.patch, firebird-1.5.1.ebuild: + Fixed gcc-34 compilation issues. Bug #59154, thanks to Canal Vorfeed + <canalvorfeed@mail.ru> 08 Sep 2004; Gustavo Zacarias <gustavoz@gentoo.org> firebird-1.5.1.ebuild: Keyworded ~sparc wrt #63184 diff --git a/dev-db/firebird/files/firebird-1.5.1-gcc34.patch b/dev-db/firebird/files/firebird-1.5.1-gcc34.patch new file mode 100644 index 000000000000..f5ddb4bac4bd --- /dev/null +++ b/dev-db/firebird/files/firebird-1.5.1-gcc34.patch @@ -0,0 +1,139 @@ +diff -uNr firebird-1.5.1.4481-orig/src/common/classes/alloc.h firebird-1.5.1.4481/src/common/classes/alloc.h +--- firebird-1.5.1.4481-orig/src/common/classes/alloc.h 2003-10-30 22:25:52.000000000 +0000 ++++ firebird-1.5.1.4481/src/common/classes/alloc.h 2004-09-12 11:26:47.351584232 +0000 +@@ -237,12 +237,14 @@ + // loaded by host application using STL + + // This is to prevent inclusion of <new> header +-#ifdef __NEW__ ++#ifdef _NEW + #error "alloc.h must be included before <new>" + #endif +-#define __NEW__ ++#define _NEW + namespace std { + class bad_alloc : public exception {}; ++ struct nothrow_t { }; ++ extern const nothrow_t nothrow; + } + // Define operators as static inline to prevent replacement of STL versions + static inline void* operator new(size_t s) { +@@ -258,6 +260,19 @@ + ); + } + ++static inline void* operator new(size_t s, const std::nothrow_t&) { ++#if defined(DEV_BUILD) ++// Do not complain here. It causes client tools to crash on Red Hat 8.0 ++// fprintf(stderr, "You MUST allocate all memory from a pool. Don't use the default global new().\n"); ++#endif // DEV_BUILD ++// return getDefaultMemoryPool()->calloc(s, 0 ++ return getDefaultMemoryPool()->allocate(s, 0 ++#ifdef DEBUG_GDS_ALLOC ++ ,__FILE__,__LINE__ ++#endif ++ ); ++} ++ + static inline void* operator new[](size_t s) { + #if defined(DEV_BUILD) + // Do not complain here. It causes client tools to crash on Red Hat 8.0 +diff -uNr firebird-1.5.1.4481-orig/src/common/classes/array.h firebird-1.5.1.4481/src/common/classes/array.h +--- firebird-1.5.1.4481-orig/src/common/classes/array.h 2004-03-29 07:40:23.000000000 +0000 ++++ firebird-1.5.1.4481/src/common/classes/array.h 2004-09-12 11:31:34.555922536 +0000 +@@ -60,15 +60,15 @@ + class Array : private Storage { + public: + Array(MemoryPool* p) : +- count(0), capacity(getStorageSize()), data(getStorage()), pool(p) {} ++ count(0), capacity(Storage::getStorageSize()), data(Storage::getStorage()), pool(p) {} + Array(MemoryPool* p, int InitialCapacity) : count(0), +- capacity(getStorageSize()), data(getStorage()), pool(p) ++ capacity(Storage::getStorageSize()), data(Storage::getStorage()), pool(p) + { + ensureCapacity(InitialCapacity); + } + ~Array() + { +- if (data != getStorage()) ++ if (data != Storage::getStorage()) + pool->deallocate(data); + } + void clear() { count = 0; }; +@@ -170,7 +170,7 @@ + #endif + )); + memcpy(newdata, data, sizeof(T) * count); +- if (data != getStorage()) ++ if (data != Storage::getStorage()) + pool->deallocate(data); + data = newdata; + capacity = newcapacity; +@@ -188,17 +188,17 @@ + SortedArray(MemoryPool* p, int s) : Array<Value>(p, s) {} + SortedArray(MemoryPool* p) : Array<Value>(p) {} + bool find(const Key& item, int& pos) { +- int highBound = count, lowBound = 0; ++ int highBound = Array<Value>::count, lowBound = 0; + while (highBound > lowBound) { + int temp = (highBound + lowBound) >> 1; +- if (Cmp::compare(item, KeyOfValue::generate(this, data[temp]))) ++ if (Cmp::compare(item, KeyOfValue::generate(this, Array<Value>::data[temp]))) + lowBound = temp + 1; + else + highBound = temp; + } + pos = lowBound; +- return highBound != count && +- !Cmp::compare(KeyOfValue::generate(this, data[lowBound]), item); ++ return highBound != Array<Value>::count && ++ !Cmp::compare(KeyOfValue::generate(this, Array<Value>::data[lowBound]), item); + } + int add(const Value& item) { + int pos; +diff -uNr firebird-1.5.1.4481-orig/src/common/classes/tree.h firebird-1.5.1.4481/src/common/classes/tree.h +--- firebird-1.5.1.4481-orig/src/common/classes/tree.h 2003-10-30 22:25:52.000000000 +0000 ++++ firebird-1.5.1.4481/src/common/classes/tree.h 2004-09-12 11:22:54.754944296 +0000 +@@ -215,7 +215,7 @@ + } + Value& current() const { return (*curr)[curPos]; } + Value& getAddErrorValue() { return addErrorValue; } +- int getCount() const { return count; } ++// int getCount() const { return count; } + private: + BePlusTree(Allocator *_pool, void *rootPage) : pool(_pool), level(0), + curr(new(rootPage) ItemList()), root(rootPage), curPos(0)/*, count(0)*/ {}; +@@ -260,7 +260,7 @@ + static const Key& generate(void *sender, void *item) { + for (int lev = ((NodeList *)sender)->level; lev > 0; lev--) + item = *((NodeList *)item)->begin(); +- return KeyOfValue::generate(item,*((BePlusTree::ItemList *)item)->begin()); ++ return KeyOfValue::generate(item,*(reinterpret_cast<typename BePlusTree<Value,Key,Allocator,KeyOfValue,Cmp,LeafCount,NodeCount>::ItemList *>(item))->begin()); + } + static void setNodeParentAndLevel(void *node, int level, NodeList *parent) { + if (level) { +diff -uNr firebird-1.5.1.4481-orig/src/common/classes/vector.h firebird-1.5.1.4481/src/common/classes/vector.h +--- firebird-1.5.1.4481-orig/src/common/classes/vector.h 2002-12-14 21:43:18.000000000 +0000 ++++ firebird-1.5.1.4481/src/common/classes/vector.h 2004-09-12 11:23:25.422282152 +0000 +@@ -100,17 +100,17 @@ + public: + SortedVector() : Vector<Value, Capacity>() {} + bool find(const Key& item, int& pos) { +- int highBound=count, lowBound=0; ++ int highBound=Vector<Value, Capacity>::count, lowBound=0; + while (highBound > lowBound) { + int temp = (highBound + lowBound) >> 1; +- if (Cmp::compare(item, KeyOfValue::generate(this,data[temp]))) ++ if (Cmp::compare(item, KeyOfValue::generate(this,Vector<Value, Capacity>::data[temp]))) + lowBound = temp+1; + else + highBound = temp; + } + pos = lowBound; +- return highBound != count && +- !Cmp::compare(KeyOfValue::generate(this,data[lowBound]), item); ++ return highBound != Vector<Value, Capacity>::count && ++ !Cmp::compare(KeyOfValue::generate(this,Vector<Value, Capacity>::data[lowBound]), item); + } + int add(const Value& item) { + int pos; diff --git a/dev-db/firebird/firebird-1.5.1.ebuild b/dev-db/firebird/firebird-1.5.1.ebuild index 609b04d3faa5..d5ad83826bab 100644 --- a/dev-db/firebird/firebird-1.5.1.ebuild +++ b/dev-db/firebird/firebird-1.5.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/firebird/firebird-1.5.1.ebuild,v 1.3 2004/09/08 15:12:46 gustavoz Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/firebird/firebird-1.5.1.ebuild,v 1.4 2004/09/13 11:23:35 sekretarz Exp $ inherit flag-o-matic eutils @@ -20,6 +20,13 @@ DEPEND="virtual/libc S=${WORKDIR}/${P}.${extra_ver} +src_unpack() { + unpack ${A} + cd ${S} + + epatch ${FILESDIR}/${P}-gcc34.patch +} + pkg_setup() { enewgroup firebird 450 enewuser firebird 450 /bin/bash /opt/firebird firebird |