diff options
author | Tor Lillqvist <tml@collabora.com> | 2013-09-20 15:38:30 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2013-09-20 15:38:39 +0300 |
commit | 7e124f9e8b7e4c6b98e9ada56c3dff40197e2f9a (patch) | |
tree | 48228c47f1017033299e65de7d350d382b4ee2a1 /sc | |
parent | 1a4258667ecd76cebc823994fd366ec7b622fd42 (diff) |
Blind fix attempt: extern "C" decls must be at outer level
Change-Id: Ic034f63f604d86e420adb0a4106c1501db5a552f
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/formulagroup.cxx | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx index b1808e07dcd3..0e8aa96d57b7 100644 --- a/sc/source/core/tool/formulagroup.cxx +++ b/sc/source/core/tool/formulagroup.cxx @@ -26,6 +26,16 @@ #include <cstdio> +#ifdef DISABLE_DYNLOADING + +extern "C" size_t getOpenCLPlatformCount(void); +extern "C" void fillOpenCLInfo(OpenclPlatformInfo*, size_t); +extern "C" bool switchOpenClDevice(const OUString*, bool); +extern "C" sc::FormulaGroupInterpreter* createFormulaGroupOpenCLInterpreter(); +extern "C" void compileOpenCLKernels(const OUString*); + +#endif + namespace sc { rtl_uString* FormulaGroupContext::intern( const OUString& rStr ) @@ -402,9 +412,6 @@ void FormulaGroupInterpreter::fillOpenCLInfo(std::vector<OpenclPlatformInfo>& rP reinterpret_cast<__fillOpenCLInfo>(fn)(&aPlatforms[0], aPlatforms.size()); rPlatforms.swap(aPlatforms); #else - extern "C" size_t getOpenCLPlatformCount(void); - extern "C" void fillOpenCLInfo(OpenclPlatformInfo*, size_t); - size_t nPlatforms = getOpenCLPlatformCount(); if (!nPlatforms) return; @@ -445,8 +452,6 @@ void FormulaGroupInterpreter::switchOpenCLDevice(const OUString& rDeviceId, bool if(!bSuccess) return; #else - extern "C" bool switchOpenClDevice(const OUString*, bool); - bool bSuccess = switchOpenClDevice(&rDeviceId, bAutoSelect); if(!bSuccess) return; @@ -460,7 +465,6 @@ void FormulaGroupInterpreter::switchOpenCLDevice(const OUString& rDeviceId, bool if ( ScInterpreter::GetGlobalConfig().mbOpenCLEnabled ) { #ifdef DISABLE_DYNLOADING - extern "C" sc::FormulaGroupInterpreter* createFormulaGroupOpenCLInterpreter(); msInstance = createFormulaGroupOpenCLInterpreter(); #else // Dynamically load scopencl shared object, and instantiate the opencl interpreter. @@ -493,7 +497,6 @@ void FormulaGroupInterpreter::compileOpenCLKernels() reinterpret_cast<__compileOpenCLKernels>(fn)(&rConfig.maOpenCLDevice); #else - extern "C" void compileOpenCLKernels(const OUString*); compileOpenCLKernels(&rConfig.maOpenCLDevice); #endif |