diff -r 6055e296b807 -r a1001281dcb1 loader/utility.cpp --- a/loader/utility.cpp Fri May 14 00:34:36 2010 -0500 +++ b/loader/utility.cpp Fri May 14 00:34:56 2010 -0500 @@ -270,7 +270,7 @@ { #if defined _WIN32 return _fullpath(buffer, path, maxlength) != NULL; -#elif defined __linux__ +#elif defined __linux__ || defined __APPLE__ assert(maxlength >= PATH_MAX); return realpath(path, buffer) != NULL; #endif @@ -289,7 +289,7 @@ mm_GetPlatformError(buffer, maxlength); return NULL; } -#elif defined __linux__ +#elif defined __linux__ || defined __APPLE__ lib = dlopen(path, RTLD_NOW); if (lib == NULL) @@ -307,7 +307,7 @@ { #if defined _WIN32 return GetProcAddress((HMODULE)lib, name); -#elif defined __linux__ +#elif defined __linux__ || defined __APPLE__ return dlsym(lib, name); #endif } @@ -317,7 +317,7 @@ { #if defined _WIN32 FreeLibrary((HMODULE)lib); -#else +#elif defined __linux__ || defined __APPLE__ dlclose(lib); #endif } @@ -333,7 +333,7 @@ return false; HMODULE dll = (HMODULE)mem.AllocationBase; GetModuleFileName(dll, (LPTSTR)buffer, maxlength); -#elif defined __linux__ +#elif defined __linux__ || defined __APPLE__ Dl_info info; if (!dladdr(pAddr, &info)) return false;