Mercurial > octave
diff liboctave/util/oct-shlib.cc @ 21236:5d23ea5c733a
eliminate configuration macros from lo-cutils.h
* lo-cutils.h, lo-cutils.c (octave_w32_library_search): Delete.
Don't include windows.h
* oct-shlib.cc: (octave_w32_library_search): Delete extern decl.
(octave_w32_shlib::octave_w32_shlib): Declare msg as const char*.
(octave_w32_shlib::search): Call GetProcAddress directly.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 09 Feb 2016 13:37:25 -0500 |
parents | f7d1050b9b53 |
children | 40de9f8f23a6 |
line wrap: on
line diff
--- a/liboctave/util/oct-shlib.cc Tue Feb 09 10:35:28 2016 -0800 +++ b/liboctave/util/oct-shlib.cc Tue Feb 09 13:37:25 2016 -0500 @@ -345,17 +345,17 @@ if (! handle) { DWORD lastError = GetLastError (); - char *msg; + const char *msg; switch (lastError) { case ERROR_MOD_NOT_FOUND: case ERROR_DLL_NOT_FOUND: - msg = "could not find library or dependents"; + msg = "could not find library or dependencies"; break; case ERROR_INVALID_DLL: - msg = "library or its dependents are damaged"; + msg = "library or its dependencies are damaged"; break; case ERROR_DLL_INIT_FAILED: @@ -376,11 +376,6 @@ FreeLibrary (handle); } -extern "C" -{ - void * octave_w32_search (HINSTANCE handle, const char * name); -} - void * octave_w32_shlib::search (const std::string& name, octave_shlib::name_mangler mangler) @@ -396,7 +391,7 @@ if (mangler) sym_name = mangler (name); - function = octave_w32_library_search (handle, sym_name.c_str ()); + function = reinterpret_cast <void *> (GetProcAddress (handle, sym_name.c_str ())); return function; }