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
This commit is contained in:
Gilles Depeyrot
2001-04-02 20:22:05 +00:00
parent 47cf53ef2e
commit 4c27c3c631

View File

@@ -77,10 +77,10 @@
return (void *)0; return (void *)0;
} }
#elif defined(__APPLE__) && defined(__UNIX__) #elif defined(__APPLE__) && defined(__UNIX__)
char *dlopen(char *path, int mode /* mode is ignored */); void *dlopen(const char *path, int mode /* mode is ignored */);
void *dlsym(void *handle, char *symbol); void *dlsym(void *handle, const char *symbol);
int dlclose(void *handle); int dlclose(void *handle);
char *dlerror(); const char *dlerror(void);
# define wxDllOpen(lib) dlopen(lib.fn_str(), 0) # define wxDllOpen(lib) dlopen(lib.fn_str(), 0)
# define wxDllGetSymbol(handle, name) dlsym(handle, name) # define wxDllGetSymbol(handle, name) dlsym(handle, name)
@@ -247,7 +247,7 @@ wxDllLoader::LoadLibrary(const wxString & libname, bool *success)
char zError[256] = ""; char zError[256] = "";
wxDllOpen(zError, libname, handle); wxDllOpen(zError, libname, handle);
#else // !Mac #else // !Mac
handle = wxDllOpen((char *)libname.c_str()); handle = wxDllOpen(libname);
#endif // OS #endif // OS
if ( !handle ) if ( !handle )
@@ -321,7 +321,7 @@ wxDllLoader::GetSymbol(wxDllType dllHandle, const wxString &name)
wxDllGetSymbol(dllHandle, symbol); wxDllGetSymbol(dllHandle, symbol);
#else #else
// mb_str() is necessary in Unicode build // mb_str() is necessary in Unicode build
symbol = wxDllGetSymbol(dllHandle, (char *)name.mb_str()); symbol = wxDllGetSymbol(dllHandle, name.mb_str());
#endif #endif
if ( !symbol ) if ( !symbol )