From 4ae46da12f2cf6b5501c8032f5197f97997b9aea Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Tue, 10 Apr 2007 22:19:59 +0000 Subject: [PATCH] Fix for solaris. Previous attempted bug fix actually didn't compile on solaris. The solution to get it to work on both linux and solaris was to add a declaration (not a definition) to the alternate file. --- Cantera/clib/src/ct.cpp | 4 ++++ Cantera/clib/src/ctreactor.cpp | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/Cantera/clib/src/ct.cpp b/Cantera/clib/src/ct.cpp index adbbb53e4..3eae8495f 100755 --- a/Cantera/clib/src/ct.cpp +++ b/Cantera/clib/src/ct.cpp @@ -33,6 +33,10 @@ using namespace std; using namespace Cantera; +// declaration for the static storage +// -> The definition is located in ctxml.cpp +template<> Cabinet* Cabinet::__storage; + inline XML_Node* _xml(int i) { return Cabinet::cabinet(false)->item(i); } diff --git a/Cantera/clib/src/ctreactor.cpp b/Cantera/clib/src/ctreactor.cpp index 62c978f0b..7e94fb570 100755 --- a/Cantera/clib/src/ctreactor.cpp +++ b/Cantera/clib/src/ctreactor.cpp @@ -60,6 +60,11 @@ inline ThermoPhase* _th(int n) { return Storage::__storage->__thtable[n]; } + +// declaration for the static storage +// -> The definition is located in ctfunc.cpp +template<> Cabinet* Cabinet::__storage; + inline Func1* _func(int i) { return Cabinet::cabinet()->item(i); }