Re: [RFA/commit] include alloca.h if available.

Pedro Alves
2010-08-31T19:55:48Z

On Tuesday 31 August 2010 20:05:11, Joel Brobecker wrote:
> On LynxOS, alloca is defined in allocal.h. This fixes one warning that
> occurs when building GDBserver for LynxOS.

No objections here. One note.

> gdb/gdbserver/ChangeLog:
>
> * configure.ac: Add configure check for alloca.
> * configure, config.in: Regenerate.

> * server.h: Include alloca.h if it exists.

Every include of malloc.h in gdbserver's common code:

$ grep malloc\\.h *.c
gdbreplay.c:#include <malloc.h>
mem-break.c:#include <malloc.h>
server.c:#include <malloc.h>
tracepoint.c:#include <malloc.h>
utils.c:#include <malloc.h>
win32-low.c:#include <malloc.h>

is there for alloca on mingw32. It might have made
sense to keep those together. I don't really care that
much either way, just pointing it out. :-)

--
Pedro Alves