tags 527516 + patch
thanks

Please find attached a patch to redefine stack_t to stack_t_, as well
as add a few more changes to prevent the build from failing.

I shall prepare an NMU if needed. Please let me know.

Thank you.

Kumar
diff -Nru --exclude changelog template-new-1.3.8/debian/control template-new-1.3.8/debian/control
--- template-new-1.3.8/debian/control	2009-09-23 22:44:37.000000000 -0500
+++ template-new-1.3.8/debian/control	2009-09-23 22:44:37.000000000 -0500
@@ -2,7 +2,7 @@
 Section: misc
 Priority: optional
 Maintainer: Baruch Even <bar...@debian.org>
-Build-Depends: debhelper (>> 4.0.0), zlib1g-dev, libglib2.0-dev
+Build-Depends: debhelper (>> 4.0.0), zlib1g-dev, libglib2.0-dev, autoconf
 Standards-Version: 3.7.2
 
 Package: template-new
diff -Nru --exclude changelog template-new-1.3.8/src/fmt_ptrn.c template-new-1.3.8/src/fmt_ptrn.c
--- template-new-1.3.8/src/fmt_ptrn.c	2006-09-09 13:05:39.000000000 -0500
+++ template-new-1.3.8/src/fmt_ptrn.c	2009-09-23 22:44:37.000000000 -0500
@@ -121,7 +121,7 @@
 typedef struct stack_t {
 	modifier_t data[STACK_MAX_ITEMS];
 	int size;
-} stack_t;
+} stack_t_;
 
 /* ============================ _modifier_t_valid () ======================= */
 static gboolean _modifier_t_valid(const modifier_t * m)
@@ -131,7 +131,7 @@
 }
 
 /* ============================ _stack_t_valid () ========================== */
-static gboolean _stack_t_valid(const stack_t * s)
+static gboolean _stack_t_valid(const stack_t_ * s)
 {
 	if (s == NULL && s->size != 0)
 		return FALSE;
@@ -139,14 +139,14 @@
 }
 
 /* ============================ _stack_init () ============================= */
-static void _stack_init(stack_t * s)
+static void _stack_init(stack_t_ * s)
 {
 	s->size = 0;
 	assert(_stack_t_valid(s));
 }
 
 /* ============================ _stack_push () ============================= */
-static gboolean _stack_push(fmt_ptrn_t * x, stack_t * s,
+static gboolean _stack_push(fmt_ptrn_t * x, stack_t_ * s,
 			    const modifier_t data)
 {
 	gboolean fnval = FALSE;
@@ -170,7 +170,7 @@
 }
 
 /* ============================ _stack_pop () ============================== */
-static gboolean _stack_pop(stack_t * s, modifier_t * data)
+static gboolean _stack_pop(stack_t_ * s, modifier_t * data)
 {
 	gboolean fnval = FALSE;
 	assert(_stack_t_valid(s));
@@ -188,7 +188,7 @@
 }
 
 /* ============================ _stack_contains () ========================= */
-static int _stack_contains(const stack_t s, const char *n)
+static int _stack_contains(const stack_t_ s, const char *n)
 {
 	int i;
 	assert(_stack_t_valid(&s));
@@ -379,7 +379,7 @@
 
 /* ============================ _read_modifier () ========================== */
 static gboolean _read_modifier(fmt_ptrn_t * x, char **ptrn,
-			       stack_t * modifier)
+			       stack_t_ * modifier)
 {
 	int i = 0;
 	modifier_t m;
@@ -417,7 +417,7 @@
 
 /* ============================ _read_modifiers () ========================= */
 static void _read_modifiers(fmt_ptrn_t * x,
-			    char **ptrn, stack_t * modifier)
+			    char **ptrn, stack_t_ * modifier)
 {
 	assert(_fmt_ptrn_t_valid(x));
 	assert(ptrn != NULL);
@@ -467,7 +467,7 @@
 
 /* ============================ _apply_modifiers () ======================== */
 static void _apply_modifiers(fmt_ptrn_t * x,
-			     buffer_t * str, stack_t * modifier)
+			     buffer_t * str, stack_t_ * modifier)
 {
 	modifier_t m;
 
@@ -563,7 +563,7 @@
 static void _handle_fmt_str(fmt_ptrn_t * x, char **p)
 {
 	/* format string -> %(<modifier_0> ... <modifier_n> <key>:<alt>) */
-	stack_t modifier;
+	stack_t_ modifier;
 	char key[KEY_LEN + 1];
 
 	assert(_fmt_ptrn_t_valid(x));
@@ -640,7 +640,7 @@
 	while (*pattern != 0x00) {
 		if (*pattern == '%' && *(pattern + 1) == '(') {
 			/* format string -> %(<modifier_0> ... <modifier_n> <key>:<alt>) */
-			stack_t modifier;
+			stack_t_ modifier;
 			char key[KEY_LEN + 1];
 
 			assert(*pattern != 0x00);
diff -Nru --exclude changelog template-new-1.3.8/src/new_proj.c template-new-1.3.8/src/new_proj.c
--- template-new-1.3.8/src/new_proj.c	2009-09-23 22:44:37.000000000 -0500
+++ template-new-1.3.8/src/new_proj.c	2009-09-23 22:44:37.000000000 -0500
@@ -186,7 +186,7 @@
 int write_file(const settings_t settings, char *conf_line)
 {
     fmt_ptrn_t x;
-    char *argv[ARG_MAX];
+    char *argv[sysconf(_SC_ARG_MAX)];
     int status, argc = 0, i;
     char *str;
     fmt_ptrn_init(&x);

Reply via email to