From 44e2948246c4f2c6a1d16f7418e464ee8ab4ec55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Fri, 11 Aug 2000 16:58:25 +0200 Subject: [PATCH] Improved handling of alloca(). Rev: src/global.h:1.49 --- src/global.h | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/src/global.h b/src/global.h index 0ee712617f..007a0ced0f 100644 --- a/src/global.h +++ b/src/global.h @@ -5,7 +5,7 @@ \*/ /* - * $Id: global.h,v 1.48 2000/08/10 12:17:07 grubba Exp $ + * $Id: global.h,v 1.49 2000/08/11 14:58:25 grubba Exp $ */ #ifndef GLOBAL_H #define GLOBAL_H @@ -39,6 +39,13 @@ # define _PROTOTYPES #endif /* !_PROTOTYPES */ +/* + * We want to use __builtin functions. + */ +#ifndef __BUILTIN_VA_ARG_INCR +#define __BUILTIN_VA_ARG_INCR 1 +#endif /* !__BUILTIN_VA_ARG_INCR */ + /* * Some structure forward declarations are needed. */ @@ -90,20 +97,26 @@ struct timeval; #endif /* AIX requires this to be the first thing in the file. */ -#ifdef __GNUC__ -# ifdef alloca -# undef alloca -# endif -# define alloca __builtin_alloca +#if HAVE_ALLOCA_H +# include <alloca.h> +# ifdef __GNUC__ +# ifdef alloca +# undef alloca +# endif +# define alloca __builtin_alloca +# endif #else -# if HAVE_ALLOCA_H -# include <alloca.h> +# ifdef __GNUC__ +# ifdef alloca +# undef alloca +# endif +# define alloca __builtin_alloca # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); +void *alloca(); # endif # endif # endif -- GitLab