This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC/AIX] xm-aix4.h - Remove alloca #pragma
- From: Peter Schauer <Peter dot Schauer at mytum dot de>
- To: brobecker at gnat dot com (Joel Brobecker)
- Cc: gdb-patches at sources dot redhat dot com, cagney at redhat dot com, kevinb at redhat dot com
- Date: Sun, 8 Aug 2004 09:39:25 +0200 (CEST)
- Subject: Re: [RFC/AIX] xm-aix4.h - Remove alloca #pragma
Could you please try to include malloc.h instead ?
> config/xm-aix4.h contains the following definition:
>
> | /* The IBM compiler requires this in order to properly compile alloca(). */
> | #pragma alloca
>
> I just checked with an IBM C compiler, and indeed, we need this pragma
> or the link will fail. Yuck! Can we solve this problem this way?
>
> . Add a check in configure to link a program using alloca.
> . If pass, we're done.
> . Try again with #pragma alloca
> . If pass, then define #USE_PRAGMA_ALLOCA, or HAVE_PRAGMA_ALLOCA
> or something like this
> . Some other ways to get alloca???
> . If fail, then abort configure, we need alloca.
>
> Then add something like this in defs:
>
> #ifdef USE_PRAGMA_ALLOCA
> #pragma alloca
> #endif
>
> --
> Joel
>
--
Peter Schauer Peter.Schauer@mytum.de