From 14fc50785ca534511c6e34a469d84788e7598e87 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Fri, 21 Nov 2003 18:04:32 +0000 Subject: [PATCH] Derive the includes from config.h instead of define alloca [r2109] --- ir/adt/xmalloc.h | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/ir/adt/xmalloc.h b/ir/adt/xmalloc.h index 942c3fff1..4ddc4d7f3 100644 --- a/ir/adt/xmalloc.h +++ b/ir/adt/xmalloc.h @@ -14,28 +14,18 @@ #ifndef _XMALLOC_H_ #define _XMALLOC_H_ -#include "host.h" - -/* Declare alloca() */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif -#ifdef __GNUC__ - /* @@@ on a true GNU system, this is defined by stdlib.h */ -# undef alloca -# define alloca(size) __builtin_alloca (size) -#else -# if HAVE_ALLOCA_H -# include -# else -# if defined(_AIX) && !defined(C_ALLOCA) - /* if your version of AIX chokes on this, use gcc @@@ or alloca.o */ - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -void *alloca (); -# endif -# endif -# endif +#ifdef HAVE_ALLOCA_H +#include #endif +#ifdef HAVE_MALLOC_H +#include +#endif + +#include "host.h" /* xmalloc() & friends. -- 2.20.1