From 42210808fd56b26bed8f06c47dc471ab4184aafc Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 1 Aug 2004 15:53:31 +0200 Subject: [PATCH] Compile fixes for ccc (& cxx) on linux/alpha Mainly explicit template instantiations ndb/src/common/debugger/signaldata/SignalDataPrint.cpp: Explicit template instantiations ndb/src/common/util/SocketServer.cpp: Explicit template instantiations ndb/src/kernel/blocks/backup/BackupInit.cpp: Explicit template instantiations ndb/src/kernel/blocks/dbutil/DbUtil.cpp: Explicit template instantiations ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp: Explicit template instantiations ndb/src/kernel/vm/ArrayPool.hpp: Only define print if #VM_TRACE ndb/src/mgmclient/CpcClient.cpp: Explicit template instantiations ndb/src/ndbapi/NdbDictionaryImpl.cpp: Explicit template instantiations ndb/test/include/NDBT_Table.hpp: Fully qualified type name ndb/test/include/NDBT_Test.hpp: Add destructors (so that v-table isn't empty) ndb/test/run-test/main.cpp: Explicit template instantiations ndb/test/src/HugoOperations.cpp: Explicit template instantiations ndb/test/src/HugoTransactions.cpp: Explicit template instantiations ndb/test/src/NDBT_Test.cpp: Explicit template instantiations ndb/test/src/NdbRestarter.cpp: Explicit template instantiations ndb/test/tools/cpcc.cpp: Explicit template instantiations --- .../common/debugger/signaldata/SignalDataPrint.cpp | 4 +++- ndb/src/common/util/SocketServer.cpp | 3 +++ ndb/src/kernel/blocks/backup/BackupInit.cpp | 3 +++ ndb/src/kernel/blocks/dbutil/DbUtil.cpp | 2 ++ ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp | 3 +++ ndb/src/kernel/vm/ArrayPool.hpp | 2 ++ ndb/src/mgmclient/CpcClient.cpp | 3 ++- ndb/src/ndbapi/NdbDictionaryImpl.cpp | 1 - ndb/test/include/NDBT_Table.hpp | 2 +- ndb/test/include/NDBT_Test.hpp | 13 ++++++++++--- ndb/test/run-test/main.cpp | 2 ++ ndb/test/src/HugoOperations.cpp | 2 ++ ndb/test/src/HugoTransactions.cpp | 2 +- ndb/test/src/NDBT_Test.cpp | 12 +++++++++--- ndb/test/src/NdbRestarter.cpp | 2 ++ ndb/test/tools/cpcc.cpp | 1 + 16 files changed, 46 insertions(+), 11 deletions(-) diff --git a/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp b/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp index d49e316ad38..4f4cf645b39 100644 --- a/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp +++ b/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp @@ -258,5 +258,7 @@ SignalDataPrintFunctions[] = { const unsigned short NO_OF_PRINT_FUNCTIONS = sizeof(SignalDataPrintFunctions)/sizeof(NameFunctionPair); - +template class Bitmask<1>; +template class Bitmask<2>; +template class Bitmask<4>; diff --git a/ndb/src/common/util/SocketServer.cpp b/ndb/src/common/util/SocketServer.cpp index 7c9585ae022..609f17f1a8d 100644 --- a/ndb/src/common/util/SocketServer.cpp +++ b/ndb/src/common/util/SocketServer.cpp @@ -305,3 +305,6 @@ sessionThread_C(void* _sc){ NdbThread_Exit(0); return 0; } + +template class MutexVector; +template class MutexVector; diff --git a/ndb/src/kernel/blocks/backup/BackupInit.cpp b/ndb/src/kernel/blocks/backup/BackupInit.cpp index 36ce1857144..d8cbb36df62 100644 --- a/ndb/src/kernel/blocks/backup/BackupInit.cpp +++ b/ndb/src/kernel/blocks/backup/BackupInit.cpp @@ -213,3 +213,6 @@ Backup::~Backup() BLOCK_FUNCTIONS(Backup); +template class ArrayPool; +template class ArrayPool; +template class ArrayPool; diff --git a/ndb/src/kernel/blocks/dbutil/DbUtil.cpp b/ndb/src/kernel/blocks/dbutil/DbUtil.cpp index 92410e1a784..ecaead3ba5a 100644 --- a/ndb/src/kernel/blocks/dbutil/DbUtil.cpp +++ b/ndb/src/kernel/blocks/dbutil/DbUtil.cpp @@ -2581,3 +2581,5 @@ DbUtil::execUTIL_DESTORY_LOCK_REQ(Signal* signal){ sendSignal(req.senderRef, GSN_UTIL_DESTROY_LOCK_REF, signal, UtilDestroyLockRef::SignalLength, JBB); } + +template class ArrayPool; diff --git a/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp b/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp index fe737fc584b..e38ae566430 100644 --- a/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp +++ b/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp @@ -1010,3 +1010,6 @@ Ndbfs::execDUMP_STATE_ORD(Signal* signal) BLOCK_FUNCTIONS(Ndbfs); +template class Vector; +template class Vector; +template class MemoryChannel; diff --git a/ndb/src/kernel/vm/ArrayPool.hpp b/ndb/src/kernel/vm/ArrayPool.hpp index 4fc6bb97f73..c06f48f2e8e 100644 --- a/ndb/src/kernel/vm/ArrayPool.hpp +++ b/ndb/src/kernel/vm/ArrayPool.hpp @@ -153,6 +153,7 @@ public: * (Run operator NdbOut<< on every element) */ void print(NdbOut & out){ +#ifdef VM_TRACE out << "FirstFree = " << firstFree << endl; for(Uint32 i = 0; i; diff --git a/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/ndb/src/ndbapi/NdbDictionaryImpl.cpp index 5e06665dc0a..010d1c83b55 100644 --- a/ndb/src/ndbapi/NdbDictionaryImpl.cpp +++ b/ndb/src/ndbapi/NdbDictionaryImpl.cpp @@ -2818,5 +2818,4 @@ template class Vector; template class Vector >; template class Vector; template class Vector; -template class Bitmask<4>; diff --git a/ndb/test/include/NDBT_Table.hpp b/ndb/test/include/NDBT_Table.hpp index eee76773106..c0b6443d95b 100644 --- a/ndb/test/include/NDBT_Table.hpp +++ b/ndb/test/include/NDBT_Table.hpp @@ -26,7 +26,7 @@ class NDBT_Attribute : public NdbDictionary::Column { friend class NdbOut& operator <<(class NdbOut&, const NDBT_Attribute &); public: NDBT_Attribute(const char* _name, - Column::Type _type, + NdbDictionary::Column::Type _type, int _length = 1, bool _pk = false, bool _nullable = false): diff --git a/ndb/test/include/NDBT_Test.hpp b/ndb/test/include/NDBT_Test.hpp index 7a5d14689bc..8330c162e14 100644 --- a/ndb/test/include/NDBT_Test.hpp +++ b/ndb/test/include/NDBT_Test.hpp @@ -110,6 +110,7 @@ public: NDBT_Step(NDBT_TestCase* ptest, const char* pname, NDBT_TESTFUNC* pfunc); + virtual ~NDBT_Step() {} int execute(NDBT_Context*); virtual int setUp() = 0; virtual void tearDown() = 0; @@ -132,8 +133,9 @@ public: NDBT_NdbApiStep(NDBT_TestCase* ptest, const char* pname, NDBT_TESTFUNC* pfunc); - int setUp(); - void tearDown(); + virtual ~NDBT_NdbApiStep() {} + virtual int setUp(); + virtual void tearDown(); Ndb* getNdb(); protected: @@ -145,6 +147,7 @@ public: NDBT_ParallelStep(NDBT_TestCase* ptest, const char* pname, NDBT_TESTFUNC* pfunc); + virtual ~NDBT_ParallelStep() {} }; class NDBT_Verifier : public NDBT_NdbApiStep { @@ -152,6 +155,7 @@ public: NDBT_Verifier(NDBT_TestCase* ptest, const char* name, NDBT_TESTFUNC* func); + virtual ~NDBT_Verifier() {} }; class NDBT_Initializer : public NDBT_NdbApiStep { @@ -159,6 +163,7 @@ public: NDBT_Initializer(NDBT_TestCase* ptest, const char* name, NDBT_TESTFUNC* func); + virtual ~NDBT_Initializer() {} }; class NDBT_Finalizer : public NDBT_NdbApiStep { @@ -166,6 +171,7 @@ public: NDBT_Finalizer(NDBT_TestCase* ptest, const char* name, NDBT_TESTFUNC* func); + virtual ~NDBT_Finalizer() {} }; @@ -174,7 +180,8 @@ public: NDBT_TestCase(NDBT_TestSuite* psuite, const char* name, const char* comment); - virtual ~NDBT_TestCase(){}; + virtual ~NDBT_TestCase(){} + // This is the default executor of a test case // When a test case is executed it will need to be suplied with a number of // different parameters and settings, these are passed to the test in the diff --git a/ndb/test/run-test/main.cpp b/ndb/test/run-test/main.cpp index 9e318b0219e..b98bc2a7a74 100644 --- a/ndb/test/run-test/main.cpp +++ b/ndb/test/run-test/main.cpp @@ -970,3 +970,5 @@ setup_hosts(atrt_config& config){ } return true; } + +template class Vector*>; diff --git a/ndb/test/src/HugoOperations.cpp b/ndb/test/src/HugoOperations.cpp index 91263aa29b4..f841de917c0 100644 --- a/ndb/test/src/HugoOperations.cpp +++ b/ndb/test/src/HugoOperations.cpp @@ -791,3 +791,5 @@ HugoOperations::indexUpdateRecord(Ndb*, } return NDBT_OK; } + +template class Vector; diff --git a/ndb/test/src/HugoTransactions.cpp b/ndb/test/src/HugoTransactions.cpp index 7f12484ddc8..9ac99e9de85 100644 --- a/ndb/test/src/HugoTransactions.cpp +++ b/ndb/test/src/HugoTransactions.cpp @@ -2415,4 +2415,4 @@ HugoTransactions::indexUpdateRecords(Ndb* pNdb, return NDBT_OK; } - +template class Vector; diff --git a/ndb/test/src/NDBT_Test.cpp b/ndb/test/src/NDBT_Test.cpp index 1bb00138d3b..3c247dcd7cf 100644 --- a/ndb/test/src/NDBT_Test.cpp +++ b/ndb/test/src/NDBT_Test.cpp @@ -1117,6 +1117,12 @@ void NDBT_Step::print(){ } - - - +template class Vector; +template class Vector; +template class Vector; +template class Vector; +template class Vector; +template class Vector; +template class Vector; +template class Vector; +template class Vector; diff --git a/ndb/test/src/NdbRestarter.cpp b/ndb/test/src/NdbRestarter.cpp index b731cccb259..c4d668adcd4 100644 --- a/ndb/test/src/NdbRestarter.cpp +++ b/ndb/test/src/NdbRestarter.cpp @@ -672,3 +672,5 @@ NdbRestarter::getConfig(){ m_config = ndb_mgm_get_configuration(handle, 0); return m_config; } + +template class Vector; diff --git a/ndb/test/tools/cpcc.cpp b/ndb/test/tools/cpcc.cpp index e768d707bbc..1ff11a05658 100644 --- a/ndb/test/tools/cpcc.cpp +++ b/ndb/test/tools/cpcc.cpp @@ -347,3 +347,4 @@ Operate::evaluate(SimpleCpcClient* c, const SimpleCpcClient::Process & pp){ return true; } +template class Vector*>;