modifications for compilation under Mac OS X

applied patches extracted from submission by Marc Newsam (tested under Mac OS 9)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Gilles Depeyrot
2001-02-15 21:51:14 +00:00
parent f0c5ebdc0d
commit 03e11df547
149 changed files with 1693 additions and 761 deletions

View File

@@ -76,6 +76,15 @@
else
return (void *)0;
}
#elif defined(__APPLE__) && defined(__UNIX__)
char *dlopen(char *path, int mode /* mode is ignored */);
void *dlsym(void *handle, char *symbol);
int dlclose(void *handle);
char *dlerror();
# define wxDllOpen(lib) dlopen(lib.fn_str(), 0)
# define wxDllGetSymbol(handle, name) dlsym(handle, name)
# define wxDllClose dlclose
#elif defined(__WINDOWS__)
// using LoadLibraryEx under Win32 to avoid name clash with LoadLibrary
# ifdef __WIN32__
@@ -221,7 +230,7 @@ wxDllLoader::LoadLibrary(const wxString & libname, bool *success)
{
wxDllType handle;
#if defined(__WXMAC__)
#if defined(__WXMAC__) && !defined(__UNIX__)
FSSpec myFSSpec ;
Ptr myMainAddr ;
Str255 myErrName ;
@@ -294,13 +303,17 @@ wxDllLoader::GetSymbol(wxDllType dllHandle, const wxString &name)
{
void *symbol = NULL; // return value
#if defined( __WXMAC__ )
#if defined(__WXMAC__) && !defined(__UNIX__)
Ptr symAddress ;
CFragSymbolClass symClass ;
Str255 symName ;
strcpy( (char*) symName , name ) ;
c2pstr( (char*) symName ) ;
#if TARGET_CARBON
c2pstrcpy( (StringPtr) symName , name ) ;
#else
strcpy( (char *) symName , name ) ;
c2pstr( (char *) symName ) ;
#endif
if ( FindSymbol( dllHandle , symName , &symAddress , &symClass ) == noErr )
symbol = (void *)symAddress ;