if (!con->execAbsolute && strchr(script, '/')) return;
if (!strchr(script, '/') && con->execPath) {
- char *s = alloca(strlen(con->execPath) + strlen(script) + 2);
+ char *s = malloc(strlen(con->execPath) + strlen(script) + 2);
sprintf(s, "%s/%s", con->execPath, script);
argv[pos] = s;
} else {
const struct poptOption * opt = NULL;
int done = 0;
+ /* looks a bit tricky to get rid of alloca properly in this fn */
+#if HAVE_ALLOCA_H
+#define ALLOCA(x) alloca(x)
+#else
+#define ALLOCA(x) malloc(x)
+#endif
+
+
while (!done) {
const char * origOptString = NULL;
poptCallbackType cb = NULL;
/* Make a copy we can hack at */
localOptString = optString =
- strcpy(alloca(strlen(origOptString) + 1),
+ strcpy(ALLOCA(strlen(origOptString) + 1),
origOptString);
if (!optString[0])