Include "popt-gnome.h" instead of "popt.h".
authorMartin Baulig <martin@src.gnome.org>
Sat, 5 Dec 1998 16:25:02 +0000 (16:25 +0000)
committerMartin Baulig <martin@src.gnome.org>
Sat, 5 Dec 1998 16:25:02 +0000 (16:25 +0000)
svn path=/trunk/; revision=503

support/popthelp.c
support/poptparse.c

index 0e2f43a..618f8a2 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
+
 #include "popt-gnome.h"
 #include "poptint.h"
 
index d083824..35eaa43 100644 (file)
@@ -9,11 +9,14 @@
 #include <ctype.h>
 #include <stdlib.h>
 #include <string.h>
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
 
 #include "popt-gnome.h"
 
 int poptParseArgvString(char * s, int * argcPtr, char *** argvPtr) {
-    char * buf = strcpy(alloca(strlen(s) + 1), s);
+    char * buf;
     char * bufStart = buf;
     char * src, * dst;
     char quote = '\0';
@@ -23,6 +26,7 @@ int poptParseArgvString(char * s, int * argcPtr, char *** argvPtr) {
     int argc = 0;
     int i;
 
+    buf = strcpy(alloca(strlen(s) + 1), s);
     src = s;
     dst = buf;
     argv[argc] = buf;