summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Baulig <martin@src.gnome.org>1998-12-05 16:25:02 +0000
committerMartin Baulig <martin@src.gnome.org>1998-12-05 16:25:02 +0000
commita77785228d93e098034142fc9103e22304e30414 (patch)
tree63066278055a23b17d648aa577264f1759313ef7
parent3ace2b69f86b34b418f69418b10c3c94a50f8a95 (diff)
downloadgnome-common-a77785228d93e098034142fc9103e22304e30414.tar.gz
Include "popt-gnome.h" instead of "popt.h".
svn path=/trunk/; revision=503
-rw-r--r--support/popthelp.c4
-rw-r--r--support/poptparse.c6
2 files changed, 9 insertions, 1 deletions
diff --git a/support/popthelp.c b/support/popthelp.c
index 0e2f43a..618f8a2 100644
--- a/support/popthelp.c
+++ b/support/popthelp.c
@@ -13,6 +13,10 @@
#include <stdlib.h>
#include <string.h>
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
+
#include "popt-gnome.h"
#include "poptint.h"
diff --git a/support/poptparse.c b/support/poptparse.c
index d083824..35eaa43 100644
--- a/support/poptparse.c
+++ b/support/poptparse.c
@@ -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;