Hi all,
I'm building third party sources under Panther in a Mach-O BSD target.
I'm not using MSL. I'm seeing a link error where 'alloca' cannot be
found.
I understand that usually alloca is an intrinsic function, so I'm
including alloca.h. But in usr/include/alloca.h the function doesn't
seem to be built-in unless the compiler is gcc.
Any suggestions as to how I can get alloca to work with CodeWarrior and
BSD?
Best regards,
--
Allen Cronce
Allen Cronce - 22 Jan 2005 16:51 GMT
I think I solved this, but it's kind of a hack. Basically in my prefix
file I added the following for the Mach-O build:
#define _ALLOCA_H_
#undef alloca
#define alloca(size) __alloca(size)
That prevents the GCC alloca.h from being loaded and it forces the
define of alloca to the intrinsic function name used by CodeWarror.
If there's a better way, I'm all ears...
Best regards,
--
Allen Cronce