Hacks for mframes with small structs

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4693 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 1999-08-03 16:37:08 +00:00
parent bb0b76c3b1
commit 026f571f16
6 changed files with 110 additions and 0 deletions

View file

@ -591,6 +591,15 @@
CASE_TYPE(_C_FLT, float);
CASE_TYPE(_C_DBL, double);
CASE_TYPE(_C_PTR, void*);
case _C_STRUCT_B:
#if MFRAME_STRUCT_BYREF
/* FIXME: This only appears on sparc and ppc machines so far.
structures appear to be aligned on word boundaries.
Hopefully there is a more general way to figure this out */
size = (size<sizeof(int))?4:size;
#endif
memcpy(datum, va_arg(ap, typeof(char[size])), size);
break;
default:
{
memcpy(datum, va_arg(ap, typeof(char[size])), size);