libs-base/Source/mframe/mframe.foot
mirko cf395d3ea6 * 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
2000-10-28 21:58:48 +00:00

97 lines
2.4 KiB
Text

inline static void*
mframe_arg_addr(arglist_t argf, NSArgumentInfo *info)
{
int offset = info->offset;
#if WORDS_BIGENDIAN
if (info->size < sizeof(int))
{
offset += sizeof(int) - info->size;
}
#endif
if (info->isReg)
{
return(argf->arg_regs + offset);
}
else
{
return(argf->arg_ptr + offset);
}
}
inline static void
mframe_get_arg(arglist_t argf, NSArgumentInfo *info, void* buffer)
{
#if MFRAME_STRUCT_BYREF || MFRAME_FLT_IN_FRAME_AS_DBL
const char *typ = info->type;
#endif
#if MFRAME_STRUCT_BYREF
/*
* If structures are passed in the stack frame by reference - we need
* to copy the actual structure, rather than it's pointer.
*/
if (*typ == _C_STRUCT_B || *typ == _C_UNION_B || *typ == _C_ARY_B)
{
memcpy(buffer, *(void**)mframe_arg_addr(argf, info), info->size);
}
else
#endif
#if MFRAME_FLT_IN_FRAME_AS_DBL
if (*typ == _C_FLT)
{
*(float*)buffer = (float)*(double*)mframe_arg_addr(argf, info);
}
else
#endif
memcpy(buffer, mframe_arg_addr(argf, info), info->size);
}
inline static void
mframe_set_arg(arglist_t argf, NSArgumentInfo *info, void* buffer)
{
#if MFRAME_STRUCT_BYREF || MFRAME_FLT_IN_FRAME_AS_DBL
const char *typ = info->type;
#endif
#if MFRAME_STRUCT_BYREF
/*
* If structures are passed in the stack frame by reference - we need
* to copy a pointer onto the stack rather than the actual structure.
*/
if (*typ == _C_STRUCT_B || *typ == _C_UNION_B || *typ == _C_ARY_B)
{
memcpy(mframe_arg_addr(argf, info), &buffer, sizeof(void*));
}
else
#endif
#if MFRAME_FLT_IN_FRAME_AS_DBL
if (*typ == _C_FLT)
{
*(double*)mframe_arg_addr(argf, info) = *(float*)buffer;
}
else
#endif
memcpy(mframe_arg_addr(argf, info), buffer, info->size);
}
inline static void
mframe_cpy_arg(arglist_t dst, arglist_t src, NSArgumentInfo *info)
{
#if MFRAME_STRUCT_BYREF
const char *typ = info->type;
/*
* If structures are passed in the stack frame by reference - we need
* to copy a pointer onto the stack rather than the actual structure.
*/
if (*typ == _C_STRUCT_B || *typ == _C_UNION_B || *typ == _C_ARY_B)
{
memcpy(mframe_arg_addr(dst, info), mframe_arg_addr(src, info), sizeof(void*));
}
else
#endif
memcpy(mframe_arg_addr(dst, info), mframe_arg_addr(src, info), info->size);
}
#endif /* __mframe_h_GNUSTEP_BASE_INCLUDE */