From: Gilles Depeyrot Date: Mon, 2 Apr 2001 20:22:05 +0000 (+0000) Subject: backed out improper casts and corrected prototypes for Mac OS X X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4c27c3c63154cdeb148e7691450d566d788f86b9 backed out improper casts and corrected prototypes for Mac OS X git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9651 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/dynlib.cpp b/src/common/dynlib.cpp index d8b6551c67..796231c31a 100644 --- a/src/common/dynlib.cpp +++ b/src/common/dynlib.cpp @@ -77,10 +77,10 @@ return (void *)0; } #elif defined(__APPLE__) && defined(__UNIX__) -char *dlopen(char *path, int mode /* mode is ignored */); -void *dlsym(void *handle, char *symbol); +void *dlopen(const char *path, int mode /* mode is ignored */); +void *dlsym(void *handle, const char *symbol); int dlclose(void *handle); -char *dlerror(); +const char *dlerror(void); # define wxDllOpen(lib) dlopen(lib.fn_str(), 0) # define wxDllGetSymbol(handle, name) dlsym(handle, name) @@ -247,7 +247,7 @@ wxDllLoader::LoadLibrary(const wxString & libname, bool *success) char zError[256] = ""; wxDllOpen(zError, libname, handle); #else // !Mac - handle = wxDllOpen((char *)libname.c_str()); + handle = wxDllOpen(libname); #endif // OS if ( !handle ) @@ -321,7 +321,7 @@ wxDllLoader::GetSymbol(wxDllType dllHandle, const wxString &name) wxDllGetSymbol(dllHandle, symbol); #else // mb_str() is necessary in Unicode build - symbol = wxDllGetSymbol(dllHandle, (char *)name.mb_str()); + symbol = wxDllGetSymbol(dllHandle, name.mb_str()); #endif if ( !symbol )