makes vc++ and win32 gcc/g++ happy
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@47766
7cbeb6ba-43b4-40fd-8cce-
4c39aea84d33
const char *license; /**< if exists, --license will work */
const char *description; /**< long description, possible multiline */
unsigned char strict : 1; /**< fail on errors */
- const Ecore_Getopt_Desc descs[]; /* NULL terminated. */
+ const Ecore_Getopt_Desc *descs; /* NULL terminated. */
};
#define ECORE_GETOPT_STORE_FULL(shortname, longname, help, metavar, type, arg_requirement, default_value) \
# include <config.h>
#endif
+#ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+#elif defined __GNUC__
+# define alloca __builtin_alloca
+#elif defined _AIX
+# define alloca __alloca
+#elif defined _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+#else
+# include <stddef.h>
+# ifdef __cplusplus
+extern "C"
+# endif
+void *alloca (size_t);
+#endif
+
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
static int
_ecore_getopt_parse_find_nonargs_base(const Ecore_Getopt *parser, int argc, char **argv)
{
- char *nonargs[argc];
+ char *nonargs;
int src, dst, used, base;
+ nonargs = alloca(sizeof(char) * argc);
src = 1;
dst = 1;
used = 0;