From 93c9733fdb7eff4936368c9acee7666c9e2bd1b9 Mon Sep 17 00:00:00 2001 From: Erik Troan Date: Wed, 4 Mar 1998 16:51:54 +0000 Subject: include alloca.h if present svn path=/trunk/; revision=108 --- support/popt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'support/popt.c') diff --git a/support/popt.c b/support/popt.c index 8029d60..2afffb9 100644 --- a/support/popt.c +++ b/support/popt.c @@ -8,6 +8,10 @@ #include #include +#if HAVE_ALLOCA_H +# include +#endif + #include "popt.h" struct optionStackEntry { @@ -389,7 +393,8 @@ int poptParseArgvString(char * s, int * argcPtr, char *** argvPtr) { argc++, buf++; } - argv2 = (void * )dst = malloc(argc * sizeof(*argv) + (buf - bufStart)); + dst = malloc(argc * sizeof(*argv) + (buf - bufStart)); + argv2 = (void *) dst; dst += argc * sizeof(*argv); memcpy(argv2, argv, argc * sizeof(*argv)); memcpy(dst, bufStart, buf - bufStart); -- cgit v1.2.1