From 42eddaeaf36d467074f329599193030c3beba8ba Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 20 Oct 1998 04:33:28 +0000 Subject: Make alloca safe. svn path=/trunk/; revision=2115 --- fetchmail.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'fetchmail.h') diff --git a/fetchmail.h b/fetchmail.h index 18de9f6c..f5fb1d41 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -397,6 +397,14 @@ int interface_approve(struct hostdata *); XMALLOCTYPE *xmalloc(int); XMALLOCTYPE *xrealloc(XMALLOCTYPE *, int); char *xstrdup(const char *); +#if defined(HAVE_ALLOCA_H) +#include +#else +#ifdef _AIX + #pragma alloca +#endif +#endif +#define xalloca(ptr, t, n) if (!(ptr = (t) alloca(n))) error(PS_UNDEFINED, 0, "alloca failed") /* protocol driver and methods */ int do_protocol(struct query *, const struct method *); -- cgit v1.2.3