mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
* configure.in: added --with-libxml-include, --with-libxml-library
and --with-libiconv-library. Added -I/usr/local/include and -L/usr/local/lib for FreeBSD. * framework.make: new file. * common.make: added common frameworks defines (library, header paths). * bundle.make: added ALL_FRAMEWORKS_DIRS * rules.make: added frameworks headers flags. Prebuild framework header dir. Set framework name/dir/version. * subproject.make: build framework headers and resource files. * target.make: added SHARED_FRAMEWORK_LINK_CMD * tool.make: added ALL_FRAMEWORKS_DIRS * ld_lib_path.csh: added paths for frameworks. * ld_lib_path.sh (lib_paths): added paths for frameworks. * GNUmakefile.in (MAKE_FILES): added framework.make * Headers/gnustep/base/NSBundle.h: added ivar. * Source/NSBundle.m ([NSBundle +_addFrameworkFromClass:]): new private method to parse NSFramework_* classes. (_bundle_load_callback): added framework support. Wrap classes in a NSValue to avoid implicit initialization. ([NSBundle +allBundles]): added framework support. ([NSBundle +allFrameworks]): implemented. ([NSBundle +bundleForClass:]): get classes from NSValue object. ([NSBundle -classNamed:]): likewise. * Headers/gnustep/base/objc-load.h (LINKER_GETSYMBOL): new define. * Source/objc-load.m (objc_get_symbol_path): get lib path of a Class or Category. * Source/simple-load.h (__objc_dynamic_get_symbol_path): indentifies lib path of a symbol. * Source/dld-load.h (__objc_dynamic_get_symbol_path): not supported. * Source/hpux-load.h (__objc_dynamic_get_symbol_path): not implemented. * Source/mframe/mframe.foot (mframe_get_arg): typ declaration fix. (mframe_set_arg): idem * Headers/gnustep/base/config.h.in: added HAVE_DLADDR * aclocal.m4 (OBJC_SYS_DYNAMIC_LINKER): test for dladdr() * configure.in: added --with-libxml-include and --with-libxml-library, added -I/usr/local/include and -L/usr/local/lib for FreeBSD. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@7918 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
816e1fe6a4
commit
cf395d3ea6
13 changed files with 881 additions and 283 deletions
|
@ -243,3 +243,61 @@ objc_unload_modules(
|
|||
fprintf(errorStream, "Warning: unloading modules not implemented\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
NSString *
|
||||
objc_get_symbol_path(Class theClass, Category *theCategory)
|
||||
{
|
||||
const char *ret;
|
||||
char buf[125], *p = buf;
|
||||
int len = strlen(theClass->name);
|
||||
|
||||
if (!theCategory)
|
||||
{
|
||||
if (len+sizeof(char)*19 > sizeof(buf))
|
||||
{
|
||||
p = malloc(len+sizeof(char)*19);
|
||||
|
||||
if (!p)
|
||||
{
|
||||
fprintf(stderr, "Unable to allocate memory !!");
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
|
||||
memcpy(buf, "__objc_class_name_", sizeof(char)*18);
|
||||
memcpy(&buf[18*sizeof(char)], theClass->name,
|
||||
strlen(theClass->name)+1);
|
||||
}
|
||||
else
|
||||
{
|
||||
len += strlen(theCategory->category_name);
|
||||
|
||||
if (len+sizeof(char)*23 > sizeof(buf))
|
||||
{
|
||||
p = malloc(len+sizeof(char)*23);
|
||||
|
||||
if (!p)
|
||||
{
|
||||
fprintf(stderr, "Unable to allocate memory !!");
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
|
||||
memcpy(buf, "__objc_category_name_", sizeof(char)*21);
|
||||
memcpy(&buf[21*sizeof(char)], theCategory->class_name,
|
||||
strlen(theCategory->class_name)+1);
|
||||
memcpy(&buf[strlen(p)], "_", 2*sizeof(char));
|
||||
memcpy(&buf[strlen(p)], theCategory->category_name,
|
||||
strlen(theCategory->category_name)+1);
|
||||
}
|
||||
|
||||
ret = __objc_dynamic_get_symbol_path(0, p);
|
||||
|
||||
if (p != buf)
|
||||
free(p);
|
||||
|
||||
if (ret)
|
||||
return [NSString stringWithCString:ret];
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue