Przeglądaj źródła

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.
Brad King 9 lat temu
rodzic
commit
ceebac93f6
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3 1
      Tests/Plugin/src/example_exe.cxx

+ 3 - 1
Tests/Plugin/src/example_exe.cxx

@@ -31,7 +31,9 @@ int main()
   kwsys::DynamicLoader::LibraryHandle handle =
     kwsys::DynamicLoader::OpenLibrary(libName.c_str());
   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;
   }
   kwsys::DynamicLoader::SymbolPointer sym =