[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] mintlib 0.59 ?



On Wed, 2009-03-11 at 18:15 +0100, David Galvez wrote:
> 2009/2/28 Alan Hourihane <alanh@fairlite.co.uk>:
> > Any chance we can release mintlib 0.59 ?
> >
> > Alan.
> >
> >
> >
> >
> 
> Hi!
> 
> Is still a goal of this new mintlib version to be compilable under gcc 2.95.3?

Yes.

> i get this error trying to compile:

Does the attached help ?

Alan.
Index: argp/argp-help.c
===================================================================
RCS file: /mint/mintlib/argp/argp-help.c,v
retrieving revision 1.2
diff -u -r1.2 argp-help.c
--- argp/argp-help.c	28 Jan 2009 15:13:27 -0000	1.2
+++ argp/argp-help.c	11 Mar 2009 17:23:34 -0000
@@ -180,6 +180,7 @@
 	    const struct uparam_name *un;
 	    int unspec = 0, val = 0;
 	    const char *arg = var;
+	    size_t u;
 
 	    while (isalnum (*arg) || *arg == '-' || *arg == '_')
 	      arg++;
@@ -215,7 +216,6 @@
 	      }
 
 	    un = uparam_names;
-	    size_t u;
 	    for (u = 0; u < nuparam_names; ++un, ++u)
 	      if (strlen (un->name) == var_len
 		  && strncmp (var, un->name, var_len) == 0)
@@ -1772,6 +1772,9 @@
       if (stream)
 	{
 	  va_list ap;
+#ifdef _LIBC
+	  char *buf;
+#endif
 
 #if 0 /* _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE) */
 	  __flockfile (stream);
@@ -1780,8 +1783,6 @@
 	  va_start (ap, fmt);
 
 #ifdef _LIBC
-	  char *buf;
-
 	  if (vasprintf (&buf, fmt, ap) < 0)
 	    buf = NULL;
 
@@ -1847,11 +1848,11 @@
 	  if (fmt)
 	    {
 	      va_list ap;
-
-	      va_start (ap, fmt);
 #ifdef _LIBC
 	      char *buf;
-
+#endif
+	      va_start (ap, fmt);
+#ifdef _LIBC
 	      if (vasprintf (&buf, fmt, ap) < 0)
 		buf = NULL;