This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: next porting question for gcj
- To: cygwin-apps at cygwin dot com
- Subject: Re: next porting question for gcj
- From: Christopher Faylor <cgf at redhat dot com>
- Date: Mon, 16 Apr 2001 00:05:43 -0400
- Cc: newlib at sources dot redhat dot com
- References: <01b301c0c621$063e4ae0$0200a8c0@lifelesswks> <200104160327.XAA06356@envy.delorie.com> <01dc01c0c628$23c1f880$0200a8c0@lifelesswks>
- Reply-To: cygwin-apps at cygwin dot com
On Mon, Apr 16, 2001 at 01:48:45PM +1000, Robert Collins wrote:
>I've done some debug tracking and patched gcj to apparently work
>correctly under cygwin. libjava just seems to have some header issues.
>
>Would inserting the __builtin_alloca define be a reasonable workaround?
>(__CYGWIN__ protected of course).
IMO, newlib's stdlib.h should have something like this in it:
#ifdef __GNUC__
# define alloca __builtin_alloca
#endif
Does this make sense? Or is this a little too generic for newlib?
It may be that some platforms, supported by newlib and gcc, do not
support __builtin_alloca.
The alternative would be to do something like:
#if defined(__GNU__) && defined(_USE_BUILTIN_ALLOCA)
# define alloca __builtin_alloca
#endif
and have features.h:
#define _USE_BUILTIN_ALLOCA
Comments?
cgf