Index: objc-load.m =================================================================== RCS file: /cvsroot/gnustep/gnustep/core/base/Source/objc-load.m,v retrieving revision 1.21 diff -u -r1.21 objc-load.m --- objc-load.m 8 Jul 2005 11:59:41 -0000 1.21 +++ objc-load.m 22 Jul 2005 18:38:37 -0000 @@ -49,6 +49,7 @@ #include "objc-load.h" #include "Foundation/NSString.h" #include "Foundation/NSDebug.h" +#include "Foundation/NSException.h" /* include the interface to the dynamic linker */ #include "dynamic-load.h" @@ -287,6 +288,21 @@ return 0; } +#ifdef __MINGW__ +NSString * +objc_get_symbol_path(Class theClass, Category *theCategory) +{ + char buf[MAX_PATH]; + MEMORY_BASIC_INFORMATION memInfo; + NSCAssert(!theCategory, @"objc_get_symbol_path doesn't support categories"); + + VirtualQueryEx(GetCurrentProcess(), theClass, &memInfo, sizeof(memInfo)); + if (GetModuleFileName(memInfo.AllocationBase, buf, sizeof(buf))) { + return [NSString stringWithCString:buf]; + } + return 0; +} +#else NSString * objc_get_symbol_path(Class theClass, Category *theCategory) { @@ -348,3 +364,4 @@ return nil; } +#endif