Tests: Restore fix to Plugin test on Watcom compiler

The fix in commit v3.4.0-rc1~127^2 (Tests: Fix Plugin test on Watcom
compiler, 2015-09-03) was reverted accidentally by automated .c_str()
removal.  Restore it and add a comment explaining why.
This commit is contained in:
Brad King 2016-06-09 09:08:59 -04:00
parent fa277b29e4
commit ceebac93f6
1 changed files with 3 additions and 1 deletions

View File

@ -31,7 +31,9 @@ int main()
kwsys::DynamicLoader::LibraryHandle handle = kwsys::DynamicLoader::LibraryHandle handle =
kwsys::DynamicLoader::OpenLibrary(libName.c_str()); kwsys::DynamicLoader::OpenLibrary(libName.c_str());
if (!handle) { if (!handle) {
std::cerr << "Could not open plugin \"" << libName << "\"!" << std::endl; // Leave the .c_str() on this one. It is needed on OpenWatcom.
std::cerr << "Could not open plugin \"" << libName.c_str() << "\"!"
<< std::endl;
return 1; return 1;
} }
kwsys::DynamicLoader::SymbolPointer sym = kwsys::DynamicLoader::SymbolPointer sym =